From d9a257746b056439168b48c3289b855c6107c0f2 Mon Sep 17 00:00:00 2001 From: chmanie Date: Wed, 8 Jan 2025 16:54:35 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20JoinColo?= =?UTF-8?q?ny/colonyJS@514f005618d9759a7d2b32701011aef7c860ec0c=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- advanced.js | 10 +++++----- basic.js | 8 ++++---- events.js | 8 ++++---- index.js | 6 +++--- local-basic.js | 8 ++++---- local-motions.js | 10 +++++----- local-reputation.js | 10 +++++----- metamask.js | 8 ++++---- motions.js | 10 +++++----- 9 files changed, 39 insertions(+), 39 deletions(-) diff --git a/advanced.js b/advanced.js index 6269b5433..ea43c7483 100644 --- a/advanced.js +++ b/advanced.js @@ -1,13 +1,13 @@ -"use strict";(()=>{var H6=Object.create;var $s=Object.defineProperty;var q6=Object.getOwnPropertyDescriptor;var G6=Object.getOwnPropertyNames;var z6=Object.getPrototypeOf,K6=Object.prototype.hasOwnProperty;var W6=(n,e,t)=>e in n?$s(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),Gi=(n,e)=>{for(var t in e)$s(n,t,{get:e[t],enumerable:!0})},J6=(n,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of G6(e))!K6.call(n,i)&&i!==t&&$s(n,i,{get:()=>e[i],enumerable:!(a=q6(e,i))||a.enumerable});return n};var _n=(n,e,t)=>(t=n!=null?H6(z6(n)):{},J6(e||!n||!n.__esModule?$s(t,"default",{value:n,enumerable:!0}):t,n));var xe=(n,e,t)=>(W6(n,typeof e!="symbol"?e+"":e,t),t);var Wp=ae(()=>{});var yd=ae((Jp,pd)=>{(function(n,e){"use strict";function t(C,u){if(!C)throw new Error(u||"Assertion failed")}function a(C,u){C.super_=u;var y=function(){};y.prototype=u.prototype,C.prototype=new y,C.prototype.constructor=C}function i(C,u,y){if(i.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=i:e.BN=i,i.BN=i,i.wordSize=26;var r;try{typeof window<"u"&&typeof window.Buffer<"u"?r=window.Buffer:r=Wp().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(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 b=s(C,y);return y-1>=u&&(b|=s(C,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(C,u,y,b){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()},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"],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];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=I[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(C){for(var u=new Array(C.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-C.length+1);P<=c;P++){var D=d-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[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,W=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,Ka=w[6]|0,Fe=Ka&8191,Le=Ka>>>13,Wa=w[7]|0,Ue=Wa&8191,Ve=Wa>>>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,Ke=Qa>>>13,Xa=A[1]|0,We=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,Ke),d=d+Math.imul(P,ze)|0,m=Math.imul(P,Ke);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,Ke),d=d+Math.imul(W,ze)|0,m=Math.imul(W,Ke),g=g+Math.imul(c,We)|0,d=d+Math.imul(c,Je)|0,d=d+Math.imul(P,We)|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,Ke),d=d+Math.imul(Q,ze)|0,m=Math.imul(Q,Ke),g=g+Math.imul(V,We)|0,d=d+Math.imul(V,Je)|0,d=d+Math.imul(W,We)|0,m=m+Math.imul(W,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,Ke),d=d+Math.imul(le,ze)|0,m=Math.imul(le,Ke),g=g+Math.imul(X,We)|0,d=d+Math.imul(X,Je)|0,d=d+Math.imul(Q,We)|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(W,$e)|0,m=m+Math.imul(W,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,Ke),d=d+Math.imul(De,ze)|0,m=Math.imul(De,Ke),g=g+Math.imul(Z,We)|0,d=d+Math.imul(Z,Je)|0,d=d+Math.imul(le,We)|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(W,Xe)|0,m=m+Math.imul(W,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,Ke),d=d+Math.imul(Be,ze)|0,m=Math.imul(Be,Ke),g=g+Math.imul(Ne,We)|0,d=d+Math.imul(Ne,Je)|0,d=d+Math.imul(De,We)|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(W,Ze)|0,m=m+Math.imul(W,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,Ke),d=d+Math.imul(Le,ze)|0,m=Math.imul(Le,Ke),g=g+Math.imul(Oe,We)|0,d=d+Math.imul(Oe,Je)|0,d=d+Math.imul(Be,We)|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(W,tt)|0,m=m+Math.imul(W,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,Ke),d=d+Math.imul(Ve,ze)|0,m=Math.imul(Ve,Ke),g=g+Math.imul(Fe,We)|0,d=d+Math.imul(Fe,Je)|0,d=d+Math.imul(Le,We)|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(W,at)|0,m=m+Math.imul(W,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,Ke),d=d+Math.imul(He,ze)|0,m=Math.imul(He,Ke),g=g+Math.imul(Ue,We)|0,d=d+Math.imul(Ue,Je)|0,d=d+Math.imul(Ve,We)|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(W,rt)|0,m=m+Math.imul(W,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,Ke),d=d+Math.imul(Ge,ze)|0,m=Math.imul(Ge,Ke),g=g+Math.imul(je,We)|0,d=d+Math.imul(je,Je)|0,d=d+Math.imul(He,We)|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(W,ot)|0,m=m+Math.imul(W,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,We),d=Math.imul(qe,Je),d=d+Math.imul(Ge,We)|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(W,dt)|0,m=m+Math.imul(W,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(C,u,y){y.negative=u.negative^C.negative,y.length=C.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(C,u,y){return U(C,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(C,u){this.x=C,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 $(C,u){this.name=C,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(C){if(typeof C=="string"){var u=i._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 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(C){q.call(this,C),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 pd>"u"||pd,Jp)});var gy=ae((Dg,to)=>{(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 to=="object"&&to.exports,o=typeof define=="function"&&define.amd,l=!a.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",p="0123456789abcdef".split(""),f=[31,7936,2031616,520093696],x=[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};(a.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(c){return Object.prototype.toString.call(c)==="[object Array]"}),l&&(a.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,W){return new d(c,P,W).update(V)[D]()}},$=function(c,P,D){return function(V,W,ee,X){return u["cshake"+c].update(V,W,ee,X)[D]()}},de=function(c,P,D){return function(V,W,ee,X){return u["kmac"+c].update(V,W,ee,X)[D]()}},T=function(c,P,D,V){for(var W=0;W>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(n);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(n)}else throw new Error(n);P=!0}for(var V=this.blocks,W=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)<=W){for(this.start=Z-W,this.block=V[X],Z=0;Z>8,D=c&255;D>0;)W.unshift(D),c=c>>8,D=c&255,++V;return P?W.push(V):W.unshift(V),this.update(W),W.length},d.prototype.encodeString=function(c){var P,D=typeof c;if(D!=="string"){if(D==="object"){if(c===null)throw new Error(n);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(n)}else throw new Error(n);P=!0}var V=0,W=c.length;if(P)V=W;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),W=0)}return V&&(Q=P[W],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,W=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[W],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,W,ee,X,Q,yt,Z,le,Ga,Ne,De,za,Oe,Be,Ka,Fe,Le,Wa,Ue,Ve,Ja,je,He,$a,qe,Ge,Qa,ze,Ke,Xa,We,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)W=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=W^(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^(W<<1|ee>>>31),D=Ga^(ee<<1|W>>>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,Ka=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,Ke=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,We=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,Wa=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^~Ka&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&Wa,c[3]=Ka^~Le&Ue,c[12]=$a^~Ge&ze,c[13]=qe^~Qa&Ke,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^~Wa&Ve,c[5]=Le^~Ue&Ja,c[14]=Ge^~ze&Xa,c[15]=Qa^~Ke&We,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]=Wa^~Ve&za,c[7]=Ue^~Ja&Oe,c[16]=ze^~Xa&je,c[17]=Ke^~We&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&Ka,c[18]=Xa^~je&$a,c[19]=We^~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{c0.exports=f0;function f0(n,e){if(!n)throw new Error(e||"Assertion failed")}f0.equal=function(e,t,a){if(e!=t)throw new Error(a||"Assertion failed: "+e+" != "+t)}});var m0=ae((E3,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 a=function(){};a.prototype=t.prototype,e.prototype=new a,e.prototype.constructor=e}}});var An=ae(Pe=>{"use strict";var Z2=rr(),eh=m0();Pe.inherits=eh;function th(n,e){return(n.charCodeAt(e)&64512)!==55296||e<0||e+1>=n.length?!1:(n.charCodeAt(e+1)&64512)===56320}function nh(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):th(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}Pe.htonl=h0;function ih(n,e){for(var t="",a=0;a>>0}return r}Pe.join32=rh;function sh(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}Pe.split32=sh;function oh(n,e){return n>>>e|n<<32-e}Pe.rotr32=oh;function uh(n,e){return n<>>32-e}Pe.rotl32=uh;function dh(n,e){return n+e>>>0}Pe.sum32=dh;function lh(n,e,t){return n+e+t>>>0}Pe.sum32_3=lh;function ph(n,e,t,a){return n+e+t+a>>>0}Pe.sum32_4=ph;function yh(n,e,t,a,i){return n+e+t+a+i>>>0}Pe.sum32_5=yh;function fh(n,e,t,a){var i=n[e],r=n[e+1],s=a+r>>>0,o=(s>>0,n[e+1]=s}Pe.sum64=fh;function ch(n,e,t,a){var i=e+a>>>0,r=(i>>0}Pe.sum64_hi=ch;function mh(n,e,t,a){var i=e+a;return i>>>0}Pe.sum64_lo=mh;function hh(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}Pe.sum64_4_hi=hh;function xh(n,e,t,a,i,r,s,o){var l=e+a+r+o;return l>>>0}Pe.sum64_4_lo=xh;function bh(n,e,t,a,i,r,s,o,l,p){var f=0,x=e;x=x+a>>>0,f+=x>>0,f+=x>>0,f+=x>>0,f+=x>>0}Pe.sum64_5_hi=bh;function gh(n,e,t,a,i,r,s,o,l,p){var f=e+a+r+o+p;return f>>>0}Pe.sum64_5_lo=gh;function Th(n,e,t){var a=e<<32-t|n>>>t;return a>>>0}Pe.rotr64_hi=Th;function vh(n,e,t){var a=n<<32-t|e>>>t;return a>>>0}Pe.rotr64_lo=vh;function wh(n,e,t){return n>>>t}Pe.shr64_hi=wh;function _h(n,e,t){var a=n<<32-t|e>>>t;return a>>>0}Pe.shr64_lo=_h});var sr=ae(T0=>{"use strict";var g0=An(),kh=rr();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}T0.BlockHash=_o;_o.prototype.update=function(e,t){if(e=g0.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=g0.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 Ah=An(),qn=Ah.rotr32;function Eh(n,e,t,a){if(n===0)return v0(e,t,a);if(n===1||n===3)return _0(e,t,a);if(n===2)return w0(e,t,a)}la.ft_1=Eh;function v0(n,e,t){return n&e^~n&t}la.ch32=v0;function w0(n,e,t){return n&e^n&t^e&t}la.maj32=w0;function _0(n,e,t){return n^e^t}la.p32=_0;function Mh(n){return qn(n,2)^qn(n,13)^qn(n,22)}la.s0_256=Mh;function Ch(n){return qn(n,6)^qn(n,11)^qn(n,25)}la.s1_256=Ch;function Ih(n){return qn(n,7)^qn(n,18)^n>>>3}la.g0_256=Ih;function Sh(n){return qn(n,17)^qn(n,19)^n>>>10}la.g1_256=Sh});var E0=ae((S3,A0)=>{"use strict";var or=An(),Rh=sr(),Ph=Vd(),jd=or.rotl32,Zr=or.sum32,Nh=or.sum32_5,Dh=Ph.ft_1,k0=Rh.BlockHash,Oh=[1518500249,1859775393,2400959708,3395469782];function Gn(){if(!(this instanceof Gn))return new Gn;k0.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}or.inherits(Gn,k0);A0.exports=Gn;Gn.blockSize=512;Gn.outSize=160;Gn.hmacStrength=80;Gn.padLength=64;Gn.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 ur=An(),Bh=sr(),dr=Vd(),Fh=rr(),En=ur.sum32,Lh=ur.sum32_4,Uh=ur.sum32_5,Vh=dr.ch32,jh=dr.maj32,Hh=dr.s0_256,qh=dr.s1_256,Gh=dr.g0_256,zh=dr.g1_256,M0=Bh.BlockHash,Kh=[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;M0.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=Kh,this.W=new Array(64)}ur.inherits(zn,M0);C0.exports=zn;zn.blockSize=512;zn.outSize=256;zn.hmacStrength=192;zn.padLength=64;zn.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 qd=An(),I0=Hd();function pa(){if(!(this instanceof pa))return new pa;I0.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}qd.inherits(pa,I0);S0.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 Kd=ae((N3,O0)=>{"use strict";var Qt=An(),Wh=sr(),Jh=rr(),Kn=Qt.rotr64_hi,Wn=Qt.rotr64_lo,P0=Qt.shr64_hi,N0=Qt.shr64_lo,Ra=Qt.sum64,Gd=Qt.sum64_hi,zd=Qt.sum64_lo,$h=Qt.sum64_4_hi,Qh=Qt.sum64_4_lo,Xh=Qt.sum64_5_hi,Yh=Qt.sum64_5_lo,D0=Wh.BlockHash,Zh=[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 Mn(){if(!(this instanceof Mn))return new Mn;D0.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=Zh,this.W=new Array(160)}Qt.inherits(Mn,D0);O0.exports=Mn;Mn.blockSize=1024;Mn.outSize=512;Mn.hmacStrength=192;Mn.padLength=128;Mn.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 Wd=An(),B0=Kd();function ya(){if(!(this instanceof ya))return new ya;B0.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}Wd.inherits(ya,B0);F0.exports=ya;ya.blockSize=1024;ya.outSize=384;ya.hmacStrength=192;ya.padLength=128;ya.prototype._digest=function(e){return e==="hex"?Wd.toHex32(this.h.slice(0,12),"big"):Wd.split32(this.h.slice(0,12),"big")}});var U0=ae(lr=>{"use strict";lr.sha1=E0();lr.sha224=R0();lr.sha256=Hd();lr.sha384=L0();lr.sha512=Kd()});var z0=ae(G0=>{"use strict";var yi=An(),yx=sr(),ko=yi.rotl32,V0=yi.sum32,es=yi.sum32_3,j0=yi.sum32_4,q0=yx.BlockHash;function Jn(){if(!(this instanceof Jn))return new Jn;q0.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}yi.inherits(Jn,q0);G0.ripemd160=Jn;Jn.blockSize=512;Jn.outSize=160;Jn.hmacStrength=192;Jn.padLength=64;Jn.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,f=r,x=s,I=o,_=0;_<80;_++){var v=V0(ko(j0(a,H0(_,i,r,s),e[mx[_]+t],fx(_)),xx[_]),o);a=o,o=s,s=ko(r,10),r=i,i=v,v=V0(ko(j0(l,H0(79-_,p,f,x),e[hx[_]+t],cx(_)),bx[_]),I),l=I,I=x,x=ko(f,10),f=p,p=v}v=es(this.h[1],r,x),this.h[1]=es(this.h[2],s,I),this.h[2]=es(this.h[3],o,l),this.h[3]=es(this.h[4],a,p),this.h[4]=es(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 H0(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 fx(n){return n<=15?0:n<=31?1518500249:n<=47?1859775393:n<=63?2400959708:2840853838}function cx(n){return n<=15?1352829926:n<=31?1548603684:n<=47?1836072691:n<=63?2053994217:0}var mx=[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],hx=[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],xx=[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],bx=[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 W0=ae((F3,K0)=>{"use strict";var gx=An(),Tx=rr();function pr(n,e,t){if(!(this instanceof pr))return new pr(n,e,t);this.Hash=n,this.blockSize=n.blockSize/8,this.outSize=n.outSize/8,this.inner=null,this.outer=null,this._init(gx.toArray(e,t))}K0.exports=pr;pr.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),Tx(e.length<=this.blockSize);for(var t=e.length;t{var Rt=J0;Rt.utils=An();Rt.common=sr();Rt.sha=U0();Rt.ripemd=z0();Rt.hmac=W0();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,_f)=>{"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&&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],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],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,W=P%4,this._Ke[V][W]=m[k],this._Kd[h-V][W]=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=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,G=J,c=$,P,D,V,W,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],W=(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]=(W+de[D-7]|0)+(ee+de[D-16]|0)|0;for(D=0;D<64;D++)W=(((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+W|0,g=k,k=h,h=A,A=W+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,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,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 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=a(_,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=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 I={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"?Af.exports=I:typeof define=="function"&&define.amd?define(I):n&&(n.scrypt&&(n._scrypt=n.scrypt),n.scrypt=I)})(bl)});var Qf=ae((E4,$f)=>{"use strict";var Jo="qpzry9x8gf2tvdw0s3jn54khce6mua7l",_l={};for(ls=0;ls>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 Wf(n){for(var e=1,t=0;t126)return"Invalid prefix ("+n+")";e=Tr(e)^a>>5}for(e=Tr(e),t=0;tt)throw new TypeError("Exceeds length limit");n=n.toLowerCase();var a=Wf(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=Tr(a)^s,i+=Jo.charAt(s)}for(r=0;r<6;++r)a=Tr(a);for(a^=1,r=0;r<6;++r){var o=a>>(5-r)*5&31;i+=Jo.charAt(o)}return i}function Jf(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=Wf(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 i5(){var n=Jf.apply(null,arguments);if(typeof n=="object")return n}function r5(n){var e=Jf.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function $o(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 Xl=="object"&&typeof Yl<"u"?Yl.exports=e():typeof define=="function"&&define.amd?define(e):(n=typeof globalThis<"u"?globalThis:n||self,n.fetchRetry=e())})(Xl,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,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(I,_){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)I(U);else if(typeof x=="function")try{return Promise.resolve(x(L,null,U)).then(function(H){H?S(L,null,U):I(U)}).catch(_)}catch(H){_(H)}else L=0}function t(a){this.name="ArgumentError",this.message=a}return n})});var Zl=ae(fu=>{"use strict";Object.defineProperty(fu,"__esModule",{value:!0});fu.$dictionary=void 0;fu.$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 Ds=ae((NA,pm)=>{pm.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}});var tp=ae(La=>{var Ee=Ds(),ep=()=>[{type:Ee.RANGE,from:48,to:57}],ym=()=>[{type:Ee.CHAR,value:95},{type:Ee.RANGE,from:97,to:122},{type:Ee.RANGE,from:65,to:90}].concat(ep()),fm=()=>[{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}],Q5=()=>[{type:Ee.CHAR,value:10},{type:Ee.CHAR,value:13},{type:Ee.CHAR,value:8232},{type:Ee.CHAR,value:8233}];La.words=()=>({type:Ee.SET,set:ym(),not:!1});La.notWords=()=>({type:Ee.SET,set:ym(),not:!0});La.ints=()=>({type:Ee.SET,set:ep(),not:!1});La.notInts=()=>({type:Ee.SET,set:ep(),not:!0});La.whitespace=()=>({type:Ee.SET,set:fm(),not:!1});La.notWhitespace=()=>({type:Ee.SET,set:fm(),not:!0});La.anyChar=()=>({type:Ee.SET,set:Q5(),not:!0})});var mm=ae(Os=>{var cm=Ds(),Rr=tp(),X5="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?",Y5={0:0,t:9,n:10,v:11,f:12,r:13};Os.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 f=a?8:r?parseInt(r,16):s?parseInt(s,16):o?parseInt(o,8):l?X5.indexOf(l):Y5[p],x=String.fromCharCode(f);return/[[\]{}^$.|?*+()]/.test(x)&&(x="\\"+x),x}),n};Os.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(Rr.words());else if(i[2])t.push(Rr.ints());else if(i[3])t.push(Rr.whitespace());else if(i[4])t.push(Rr.notWords());else if(i[5])t.push(Rr.notInts());else if(i[6])t.push(Rr.notWhitespace());else if(i[7])t.push({type:cm.RANGE,from:(i[8]||i[9]).charCodeAt(0),to:i[10].charCodeAt(0)});else if(r=i[12])t.push({type:cm.CHAR,value:r.charCodeAt(0)});else return[t,a.lastIndex];Os.error(e,"Unterminated character class")};Os.error=(n,e)=>{throw new SyntaxError("Invalid regular expression: /"+n+"/: "+e)}});var hm=ae(Bs=>{var cu=Ds();Bs.wordBoundary=()=>({type:cu.POSITION,value:"b"});Bs.nonWordBoundary=()=>({type:cu.POSITION,value:"B"});Bs.begin=()=>({type:cu.POSITION,value:"^"});Bs.end=()=>({type:cu.POSITION,value:"$"})});var xm=ae((FA,np)=>{var Pr=mm(),xn=Ds(),Ai=tp(),mu=hm();np.exports=n=>{var e=0,t,a,i={type:xn.ROOT,stack:[]},r=i,s=i.stack,o=[],l=O=>{Pr.error(n,`Nothing to repeat at column ${O-1}`)},p=Pr.strToChars(n);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 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}))}};bm.exports=Ua});var vm=ae((UA,Tm)=>{var hu=xm(),Fs=gm(),Ei=hu.types;Tm.exports=class Ls{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:Ls.prototype.max!=null?Ls.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 Ei.ROOT:case Ei.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 Z5=Mi&&Mi.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Mi,"__esModule",{value:!0});Mi.RandomGenerator=void 0;var eb=Z5(vm()),tb;(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 eb.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()}})(tb=Mi.RandomGenerator||(Mi.RandomGenerator={}))});var Us=ae(Nr=>{"use strict";var nb=Nr&&Nr.__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(Nr,"__esModule",{value:!0});Nr.TypeGuardError=void 0;var ab=function(n){nb(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);Nr.TypeGuardError=ab});var _m=ae(xu=>{"use strict";Object.defineProperty(xu,"__esModule",{value:!0});xu.$any=void 0;var ib=function(n){return n!==void 0?JSON.parse(JSON.stringify(n)):void 0};xu.$any=ib});var km=ae(bu=>{"use strict";Object.defineProperty(bu,"__esModule",{value:!0});bu.$every=void 0;var rb=function(n,e){for(var t=null,a=0;a{"use strict";Object.defineProperty(gu,"__esModule",{value:!0});gu.$guard=void 0;var sb=Us(),ob=function(n){return function(e,t){if(e===!0)throw new sb.TypeGuardError({method:n,path:t.path,expected:t.expected,value:t.value});return!1}};gu.$guard=ob});var Em=ae(Tu=>{"use strict";Object.defineProperty(Tu,"__esModule",{value:!0});Tu.$is_between=void 0;var ub=function(n,e,t){return e<=n&&n<=t};Tu.$is_between=ub});var Mm=ae(vu=>{"use strict";Object.defineProperty(vu,"__esModule",{value:!0});vu.$is_custom=void 0;var db=Zl(),lb=function(n,e,t,a){var i,r=(i=db.$dictionary.get(n))===null||i===void 0?void 0:i.get(e);return r===void 0?!0:r(t)(a)};vu.$is_custom=lb});var Cm=ae(wu=>{"use strict";Object.defineProperty(wu,"__esModule",{value:!0});wu.$is_date=void 0;var pb=function(n){return yb.test(n)};wu.$is_date=pb;var yb=/^(\d{4})-(\d{2})-(\d{2})$/});var Im=ae(_u=>{"use strict";Object.defineProperty(_u,"__esModule",{value:!0});_u.$is_datetime=void 0;var fb=function(n){return!isNaN(new Date(n).getTime())};_u.$is_datetime=fb});var Sm=ae(ku=>{"use strict";Object.defineProperty(ku,"__esModule",{value:!0});ku.$is_email=void 0;var cb=function(n){return mb.test(n)};ku.$is_email=cb;var mb=/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i});var Rm=ae(Au=>{"use strict";Object.defineProperty(Au,"__esModule",{value:!0});Au.$is_ipv4=void 0;var hb=function(n){return xb.test(n)};Au.$is_ipv4=hb;var xb=/^(?: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 Pm=ae(Eu=>{"use strict";Object.defineProperty(Eu,"__esModule",{value:!0});Eu.$is_ipv6=void 0;var bb=function(n){return gb.test(n)};Eu.$is_ipv6=bb;var gb=/^(([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 Nm=ae(Mu=>{"use strict";Object.defineProperty(Mu,"__esModule",{value:!0});Mu.$is_url=void 0;var Tb=function(n){return vb.test(n)};Mu.$is_url=Tb;var vb=/^[a-zA-Z0-9]+:\/\/(?:www.)?[-a-zA-Z0-9@:%._+~#=]{1,256}.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/});var Dm=ae(Cu=>{"use strict";Object.defineProperty(Cu,"__esModule",{value:!0});Cu.$is_uuid=void 0;var wb=function(n){return _b.test(n)};Cu.$is_uuid=wb;var _b=/^(?:[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 Om=ae(Iu=>{"use strict";Object.defineProperty(Iu,"__esModule",{value:!0});Iu.$join=void 0;var kb=function(n){return Ab(n)?".".concat(n):"[".concat(JSON.stringify(n),"]")};Iu.$join=kb;var Ab=function(n){return Eb(n)===!1&&/^[a-zA-Z_$][a-zA-Z_$0-9]*$/g.test(n)},Eb=function(n){return Mb.has(n)},Mb=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=ae(Su=>{"use strict";Object.defineProperty(Su,"__esModule",{value:!0});Su.$number=void 0;var Cb=Us(),Ib=function(n){if(isFinite(n)===!1)throw new Cb.TypeGuardError({method:"typia.stringify",expected:"number",value:n,message:"Error on typia.stringify(): infinite or not a number."});return n};Su.$number=Ib});var Fm=ae(Ru=>{"use strict";Object.defineProperty(Ru,"__esModule",{value:!0});Ru.$report=void 0;var Sb=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}};Ru.$report=Sb});var Lm=ae(Pu=>{"use strict";Object.defineProperty(Pu,"__esModule",{value:!0});Pu.$rest=void 0;var Rb=function(n){return n.length===2?"":","+n.substring(1,n.length-1)};Pu.$rest=Rb});var Um=ae(Nu=>{"use strict";Object.defineProperty(Nu,"__esModule",{value:!0});Nu.$string=void 0;var Pb=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,'"')};Nu.$string=Pb});var Vm=ae(Du=>{"use strict";Object.defineProperty(Du,"__esModule",{value:!0});Du.$tail=void 0;var Nb=function(n){return n[n.length-1]===","?n.substring(0,n.length-1):n};Du.$tail=Nb});var Gm=ae(Ci=>{"use strict";var Vt=Ci&&Ci.__assign||function(){return Vt=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 Vt(Vt({},n.is()),{number:Kb.$number,string:$b.$string,tail:Qb.$tail,rest:Jb.$rest,throws:e(t)})},n.clone=function(t){return Vt(Vt({},n.is()),{throws:e(t),any:Db.$any})},n.prune=function(t){return Vt(Vt({},n.is()),{throws:e(t)})},n.random=function(){return{generator:jm.RandomGenerator,pick:jm.RandomGenerator.pick}};var e=function(t){return function(a){throw new Hm.TypeGuardError(Vt(Vt({},a),{method:"typia.".concat(t)}))}}})(Xb=Ci.Namespace||(Ci.Namespace={}))});var zm=ae(Vs=>{"use strict";Object.defineProperty(Vs,"__esModule",{value:!0});Vs.MapUtil=void 0;var Yb;(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}}})(Yb=Vs.MapUtil||(Vs.MapUtil={}))});var Wm=ae(Km=>{"use strict";Object.defineProperty(Km,"__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 t6=ae(e6=>{"use strict";Object.defineProperty(e6,"__esModule",{value:!0})});var a6=ae(n6=>{"use strict";Object.defineProperty(n6,"__esModule",{value:!0})});var mp=ae(z=>{"use strict";var Zb=z&&z.__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]}),Ii=z&&z.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Zb(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 Dr=Zl(),Me=Gm(),e1=zm();Ii(Wm(),z);Ii($m(),z);Ii(Xm(),z);Ii(Zm(),z);Ii(t6(),z);Ii(a6(),z);Ii(Us(),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(n){var e,t;return n?(t=(e=Dr.$dictionary.get(n))===null||e===void 0?void 0:e.size)!==null&&t!==void 0?t:0:Dr.$dictionary.size},has:function(n){return function(e){var t,a;return(a=(t=Dr.$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=Dr.$dictionary.get(n))===null||t===void 0?void 0:t.get(e)}},insert:function(n){return function(e){return function(t){var a=e1.MapUtil.take(Dr.$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=Dr.$dictionary.get(n))===null||t===void 0?void 0:t.delete(e))!==null&&a!==void 0?a:!1}}};function t1(){re("application")}z.application=t1;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 n1(){re("metadata")}z.metadata=n1;function yp(){re("random")}z.random=yp;Object.assign(yp,Me.Namespace.random());function a1(){re("literals")}z.literals=a1;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 i6(){re("createAssert")}z.createAssert=i6;Object.assign(i6,ap);function r6(){re("createAssertType")}z.createAssertType=r6;Object.assign(r6,ip);function s6(){re("createIs")}z.createIs=s6;Object.assign(s6,Ou);function o6(){re("createValidate")}z.createValidate=o6;Object.assign(o6,Bu);function u6(){re("createAssertEquals")}z.createAssertEquals=u6;Object.assign(u6,rp);function d6(){re("createEquals")}z.createEquals=d6;Object.assign(d6,sp);function l6(){re("createValidateEquals")}z.createValidateEquals=l6;Object.assign(l6,op);function p6(){re("createIsParse")}z.createIsParse=p6;Object.assign(p6,dp);function y6(){re("createAssertParse")}z.createAssertParse=y6;Object.assign(y6,up);function f6(){re("createValidateParse")}z.createValidateParse=f6;Object.assign(f6,lp);function c6(){re("createStringify")}z.createStringify=c6;Object.assign(c6,pp);function m6(){re("createAssertStringify")}z.createAssertStringify=m6;Object.assign(m6,Fu);function h6(){re("createIsStringify")}z.createIsStringify=h6;Object.assign(h6,Lu);function x6(){re("createValidateStringify")}z.createValidateStringify=x6;Object.assign(x6,Uu);function b6(){re("createRandom")}z.createRandom=b6;Object.assign(b6,yp);function g6(){re("createClone")}z.createClone=g6;Object.assign(g6,fp);function T6(){re("createAssertClone")}z.createAssertClone=T6;Object.assign(T6,Vu);function v6(){re("createIsClone")}z.createIsClone=v6;Object.assign(v6,ju);function w6(){re("createValidateClone")}z.createValidateClone=w6;Object.assign(w6,Hu);function _6(){re("createPrune")}z.createPrune=_6;Object.assign(_6,cp);function k6(){re("createAssertPrune")}z.createAssertPrune=k6;Object.assign(k6,qu);function A6(){re("createIsPrune")}z.createIsPrune=A6;Object.assign(A6,Gu);function E6(){re("createValidatePrune")}z.createValidatePrune=E6;Object.assign(E6,zu);function re(n){throw new Error("Error on typia.".concat(n,'(): no transform has been configured. Run "npx typia setup" command.'))}});var C6=ae(gn=>{"use strict";var M6=gn&&gn.__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]}),i1=gn&&gn.__setModuleDefault||(Object.create?function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}:function(n,e){n.default=e}),r1=gn&&gn.__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)&&M6(e,n,t);return i1(e,n),e},s1=gn&&gn.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&M6(e,n,t)};Object.defineProperty(gn,"__esModule",{value:!0});var o1=r1(mp());gn.default=o1;s1(mp(),gn)});var Ll={};Gi(Ll,{BaseContract:()=>fr,BigNumber:()=>F,Contract:()=>oe,ContractFactory:()=>hi,FixedNumber:()=>ft,Signer:()=>St,VoidSigner:()=>da,Wallet:()=>In,Wordlist:()=>hn,constants:()=>ht,errors:()=>Kt,getDefaultProvider:()=>su,logger:()=>Rc,providers:()=>ta,utils:()=>te,version:()=>uu,wordlists:()=>bi});var sy=_n(yd());var $p="logger/5.7.0";var Qp=!1,Xp=!1,Qs={debug:1,default:2,info:2,warning:3,error:4,off:5},Yp=Qs.default,fd=null;function $6(){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 Zp=$6(),cd;(function(n){n.DEBUG="DEBUG",n.INFO="INFO",n.WARNING="WARNING",n.ERROR="ERROR",n.OFF="OFF"})(cd||(cd={}));var Kt;(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"})(Kt||(Kt={}));var ey="0123456789abcdef",E=class{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){let a=e.toLowerCase();Qs[a]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(Yp>Qs[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(Xp)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 f="";for(let x=0;x>4],f+=ey[p[x]&15];i.push(l+"=Uint8Array(0x"+f+")")}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 Kt.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 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+" ]"),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"),Zp&&this.throwError("platform missing String.prototype.normalize",E.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:Zp})}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 fd||(fd=new E($p)),fd}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",E.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),Qp){if(!e)return;this.globalLogger().throwError("error censorship permanent",E.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}Xp=!!e,Qp=!!t}static setLogLevel(e){let t=Qs[e.toLowerCase()];if(t==null){E.globalLogger().warn("invalid log level - "+e);return}Yp=t}static from(e){return new E(e)}};E.errors=Kt;E.levels=cd;var ty="bytes/5.7.0";var wt=new E(ty);function ay(n){return!!n.toHexString}function zi(n){return n.slice||(n.slice=function(){let e=Array.prototype.slice.call(arguments);return zi(new Uint8Array(Array.prototype.slice.apply(n,e)))}),n}function ia(n){return ie(n)&&!(n.length%2)||on(n)}function ny(n){return typeof n=="number"&&n==n&&n%1===0}function on(n){if(n==null)return!1;if(n.constructor===Uint8Array)return!0;if(typeof n=="string"||!ny(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"){wt.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),zi(new Uint8Array(t))}if(e.allowMissingPrefix&&typeof n=="string"&&n.substring(0,2)!=="0x"&&(n="0x"+n),ay(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":wt.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),zi(a)}function Zt(n){let e=j(n);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(n,e-n.length),zi(t)}function ie(n,e){return!(typeof n!="string"||!n.match(/^0x[0-9A-Fa-f]*$/)||e&&n.length!==2+2*e)}var md="0123456789abcdef";function K(n,e){if(e||(e={}),typeof n=="number"){wt.checkSafeUint53(n,"invalid hexlify value");let t="";for(;n;)t=md[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),ay(n))return n.toHexString();if(ie(n))return n.length%2&&(e.hexPad==="left"?n="0x0"+n.substring(2):e.hexPad==="right"?n+="0":wt.throwArgumentError("hex data is odd-length","value",n)),n.toLowerCase();if(on(n)){let t="0x";for(let a=0;a>4]+md[i&15]}return t}return wt.throwArgumentError("invalid hexlify value","value",n)}function Nt(n){if(typeof n!="string")n=K(n);else if(!ie(n)||n.length%2)return null;return(n.length-2)/2}function Ce(n,e,t){return typeof n!="string"?n=K(n):(!ie(n)||n.length%2)&&wt.throwArgumentError("invalid hexData","value",n),e=2+2*e,t!=null?"0x"+n.substring(e,2+2*t):"0x"+n.substring(e)}function _t(n){let e="0x";return n.forEach(t=>{e+=K(t).substring(2)}),e}function Un(n){let e=hd(K(n,{hexPad:"left"}));return e==="0x"?"0x0":e}function hd(n){typeof n!="string"&&(n=K(n)),ie(n)||wt.throwArgumentError("invalid hex string","value",n),n=n.substring(2);let e=0;for(;e2*e+2&&wt.throwArgumentError("value out of range","value",arguments[1]);n.length<2*e+2;)n="0x0"+n.substring(2);return n}function Vn(n){let e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(ia(n)){let t=j(n);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]):wt.throwArgumentError("invalid signature string","signature",n),e.v<27&&(e.v===0||e.v===1?e.v+=27:wt.throwArgumentError("signature invalid v byte","signature",n)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(t[32]|=128),e._vs=K(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=si(j(e._vs),32);e._vs=K(i);let r=i[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=r:e.recoveryParam!==r&&wt.throwArgumentError("signature recoveryParam mismatch _vs","signature",n),i[0]&=127;let s=K(i);e.s==null?e.s=s:e.s!==s&&wt.throwArgumentError("signature v mismatch _vs","signature",n)}if(e.recoveryParam==null)e.v==null?wt.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&&wt.throwArgumentError("signature recoveryParam mismatch v","signature",n)}e.r==null||!ie(e.r)?wt.throwArgumentError("signature missing or invalid r","signature",n):e.r=me(e.r,32),e.s==null||!ie(e.s)?wt.throwArgumentError("signature missing or invalid s","signature",n):e.s=me(e.s,32);let t=j(e.s);t[0]>=128&&wt.throwArgumentError("signature s out of range","signature",n),e.recoveryParam&&(t[0]|=128);let a=K(t);e._vs&&(ie(e._vs)||wt.throwArgumentError("signature invalid _vs","signature",n),e._vs=me(e._vs,32)),e._vs==null?e._vs=a:e._vs!==a&&wt.throwArgumentError("signature _vs mismatch v and s","signature",n)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function Vr(n){return n=Vn(n),K(ye([n.r,n.s,n.recoveryParam?"0x1c":"0x1b"]))}var Xs="bignumber/5.7.0";var jr=sy.default.BN,ra=new E(Xs),xd={},iy=9007199254740991;function oy(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"||on(n))}var ry=!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 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 ra.throwError("this platform does not support BigInt",E.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?ry||(ry=!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,Hr(e)):e.match(/^-?[0-9]+$/)?new F(xd,Hr(new jr(e))):ra.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&un("underflow","BigNumber.from",e),(e>=iy||e<=-iy)&&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 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 ra.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}};function Hr(n){if(typeof n!="string")return Hr(n.toString(16));if(n[0]==="-")return n=n.substring(1),n[0]==="-"&&ra.throwArgumentError("invalid hex","value",n),n=Hr(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 Wt(n){return F.from(Hr(n))}function be(n){let e=F.from(n).toHexString();return e[0]==="-"?new jr("-"+e.substring(3),16):new jr(e.substring(2),16)}function un(n,e,t){let a={fault:n,operation:e};return t!=null&&(a.value=t),ra.throwError(n,E.errors.NUMERIC_FAULT,a)}function bd(n){return new jr(n,36).toString(16)}function gd(n){return new jr(n,16).toString(36)}var jt=new E(Xs),qr={},dy=F.from(0),ly=F.from(-1);function py(n,e,t,a){let i={fault:e,operation:t};return a!==void 0&&(i.value=a),jt.throwError(n,E.errors.NUMERIC_FAULT,i)}var Gr="0";for(;Gr.length<256;)Gr+=Gr;function Td(n){if(typeof n!="number")try{n=F.from(n).toNumber()}catch{}return typeof n=="number"&&n>=0&&n<=256&&!(n%1)?"1"+Gr.substring(0,n):jt.throwArgumentError("invalid decimal size","decimals",n)}function Ki(n,e){e==null&&(e=0);let t=Td(e);n=F.from(n);let a=n.lt(dy);a&&(n=n.mul(ly));let i=n.mod(t).toString();for(;i.length2&&jt.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&&py("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),a=r("width","number",a),i=r("decimals","number",i)}return a%8&&jt.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",a),i>80&&jt.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new sa(qr,t,a,i)}},ft=class{constructor(e,t,a,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=a,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),a=dn(e._value,e.format.decimals);return ft.fromValue(t.add(a),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),a=dn(e._value,e.format.decimals);return ft.fromValue(t.sub(a),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),a=dn(e._value,e.format.decimals);return ft.fromValue(t.mul(a).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),a=dn(e._value,e.format.decimals);return ft.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=ft.from(e[0],this.format),a=!e[1].match(/^(0*)$/);return this.isNegative()&&a&&(t=t.subUnsafe(uy.toFormat(t.format))),t}ceiling(){let e=this.toString().split(".");e.length===1&&e.push("0");let t=ft.from(e[0],this.format),a=!e[1].match(/^(0*)$/);return!this.isNegative()&&a&&(t=t.addUnsafe(uy.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 a=ft.from("1"+Gr.substring(0,e),this.format),i=Q6.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&&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,a){return a==null&&t!=null&&!oy(t)&&(a=t,t=null),t==null&&(t=0),a==null&&(a="fixed"),ft.fromString(Ki(e,t),sa.from(a))}static fromString(e,t){t==null&&(t="fixed");let a=sa.from(t),i=dn(e,a.decimals);!a.signed&&i.lt(dy)&&py("unsigned value cannot be negative","overflow","value",e);let r=null;a.signed?r=i.toTwos(a.width).toHexString():(r=i.toHexString(),r=me(r,a.width/8));let s=Ki(i,a.decimals);return new ft(qr,r,s,a)}static fromBytes(e,t){t==null&&(t="fixed");let a=sa.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=Ki(i,a.decimals);return new ft(qr,r,s,a)}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(a){if(a.code!==E.errors.INVALID_ARGUMENT)throw a}return jt.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}},uy=ft.from(1),Q6=ft.from("0.5");var yy="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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Ys=new E(yy);function B(n,e,t){Object.defineProperty(n,e,{enumerable:!0,value:t,writable:!1})}function mt(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 Ie(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 Wi(n,e){(!n||typeof n!="object")&&Ys.throwArgumentError("invalid object","object",n),Object.keys(n).forEach(t=>{e[t]||Ys.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 Y6={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function fy(n){if(n==null||Y6[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;tct(e)));if(typeof n=="object"){let e={};for(let t in n){let a=n[t];a!==void 0&&B(e,t,ct(a))}return e}return Ys.throwArgumentError(`Cannot deepCopy ${typeof n}`,"object",n)}function ct(n){return Z6(n)}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={},cy={calldata:!0,memory:!0,storage:!0},e2={calldata:!0,memory:!0};function Zs(n,e){if(n==="bytes"||n==="string"){if(cy[e])return!0}else if(n==="address"){if(e==="payable")return!0}else if((n.indexOf("[")>=0||n==="tuple")&&e2[e])return!0;return(cy[e]||e==="payable")&&Te.throwArgumentError("invalid modifier","name",e),!1}function t2(n,e){let t=n;function a(o){Te.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!==ge.sighash&&(t+=this.type),t+="("+this.components.map(a=>a.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:Ji(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(pt.fromObject):null})}static fromString(e,t){function a(i){return pt.fromObject({name:i.name,type:i.type,indexed:i.indexed,components:i.components})}return a(t2(e,!!t))}static isParamType(e){return!!(e!=null&&e._isParamType)}};function zr(n,e){return i2(n).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(a=>JSON.parse(a.format(e)))});let t="";return e!==ge.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map(a=>a.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(Wr);t||Te.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:Te.warn("unknown modifier: "+i)}}),Ht.fromObject({name:t[1].trim(),anonymous:a,inputs:zr(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}};function hy(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 xy(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 by(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 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(a=>JSON.parse(a.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(a=>a.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=by(e);t.constant&&Te.throwArgumentError("constructor cannot be constant","value",e);let a={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,a)}static fromString(e){let t={type:"constructor"};e=hy(e,t);let a=e.match(Wr);return(!a||a[1].trim()!=="constructor")&&Te.throwArgumentError("invalid constructor string","value",e),t.inputs=zr(a[2].trim(),!1),xy(a[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(a=>JSON.parse(a.format(e))),outputs:this.outputs.map(a=>JSON.parse(a.format(e)))});let t="";return e!==ge.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map(a=>a.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(a=>a.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=by(e),a={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,a)}static fromString(e){let t={type:"function"};e=hy(e,t);let a=e.split(" returns ");a.length>2&&Te.throwArgumentError("invalid function string","value",e);let i=a[0].match(Wr);if(i||Te.throwArgumentError("invalid function signature","value",e),t.name=i[1].trim(),t.name&&Kr(t.name),t.inputs=zr(i[2],!1),xy(i[3].trim(),t),a.length>1){let r=a[1].match(Wr);(r[1].trim()!=""||r[3].trim()!="")&&Te.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 my(n){let e=n.format();return(e==="Error(string)"||e==="Panic(uint256)")&&Te.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",n),n}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(a=>JSON.parse(a.format(e)))});let t="";return e!==ge.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map(a=>a.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 my(new tn(oi,t))}static fromString(e){let t={type:"error"},a=e.match(Wr);return a||Te.throwArgumentError("invalid error signature","value",e),t.name=a[1].trim(),t.name&&Kr(t.name),t.inputs=zr(a[2],!1),my(tn.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}};function Ji(n){return n.match(/^uint($|[^1-9])/)?n="uint256"+n.substring(4):n.match(/^int($|[^1-9])/)&&(n="int256"+n.substring(3)),n}var a2=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function Kr(n){return(!n||!n.match(a2))&&Te.throwArgumentError(`invalid identifier "${n}"`,"value",n),n}var Wr=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function i2(n){n=n.trim();let e=[],t="",a=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,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 K(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):di.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: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 a=this._peekBytes(0,e,!!t);return this._offset+=a.length,a.slice(0,e)}readValue(){return F.from(this.readBytes(this.wordSize))}};var Ty=_n(gy());function fe(n){return"0x"+Ty.default.keccak_256(j(n))}var no={};Gi(no,{decode:()=>Jr,encode:()=>oa});var vy="rlp/5.7.0";var Hn=new E(vy);function wy(n){let e=[];for(;n;)e.unshift(n&255),n>>=8;return e}function _y(n,e,t){let a=0;for(let i=0;ie+1+a&&Hn.throwError("child data too short",E.errors.BUFFER_OVERRUN,{})}return{consumed:1+a,result:i}}function Ey(n,e){if(n.length===0&&Hn.throwError("data too short",E.errors.BUFFER_OVERRUN,{}),n[e]>=248){let t=n[e]-247;e+1+t>n.length&&Hn.throwError("data short segment too short",E.errors.BUFFER_OVERRUN,{});let a=_y(n,e+1,t);return e+1+t+a>n.length&&Hn.throwError("data long segment too short",E.errors.BUFFER_OVERRUN,{}),ky(n,e,e+1+t,t+a)}else if(n[e]>=192){let t=n[e]-192;return e+1+t>n.length&&Hn.throwError("data array too short",E.errors.BUFFER_OVERRUN,{}),ky(n,e,e+1,t)}else if(n[e]>=184){let t=n[e]-183;e+1+t>n.length&&Hn.throwError("data array too short",E.errors.BUFFER_OVERRUN,{});let a=_y(n,e+1,t);e+1+t+a>n.length&&Hn.throwError("data array too short",E.errors.BUFFER_OVERRUN,{});let i=K(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&&Hn.throwError("data too short",E.errors.BUFFER_OVERRUN,{});let a=K(n.slice(e+1,e+1+t));return{consumed:1+t,result:a}}return{consumed:1,result:K(n[e])}}function Jr(n){let e=j(n),t=Ey(e,0);return t.consumed!==e.length&&Hn.throwArgumentError("invalid rlp data","data",n),t.result}var My="address/5.7.0";var Ma=new E(My);function Cy(n){ie(n,20)||Ma.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 r2=9007199254740991;function s2(n){return Math.log10?Math.log10(n):Math.log(n)/Math.LN10}var wd={};for(let n=0;n<10;n++)wd[String(n)]=String(n);for(let n=0;n<26;n++)wd[String.fromCharCode(65+n)]=String(10+n);var Iy=Math.floor(s2(r2));function Sy(n){n=n.toUpperCase(),n=n.substring(4)+n.substring(0,2)+"00";let e=n.split("").map(a=>wd[a]).join("");for(;e.length>=Iy;){let a=e.substring(0,Iy);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 ce(n){let e=null;if(typeof n!="string"&&Ma.throwArgumentError("invalid address","address",n),n.match(/^(0x)?[0-9a-fA-F]{40}$/))n.substring(0,2)!=="0x"&&(n="0x"+n),e=Cy(n),n.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==n&&Ma.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)!==Sy(n)&&Ma.throwArgumentError("bad icap checksum","address",n),e=bd(n.substring(4));e.length<40;)e="0"+e;e=Cy("0x"+e)}else Ma.throwArgumentError("invalid address","address",n);return e}function Ry(n){try{return ce(n),!0}catch{}return!1}function Py(n){let e=gd(ce(n).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+Sy("XE00"+e)+e}function li(n){let e=null;try{e=ce(n.from)}catch{Ma.throwArgumentError("missing from address","transaction",n)}let t=Zt(j(F.from(n.nonce).toHexString()));return ce(Ce(fe(oa([e,t])),12))}function Ny(n,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(Ce(fe(ye(["0xff",ce(n),e,t])),12))}var ao=class extends kt{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=ce(t)}catch(a){this._throwError(a.message,t)}return e.writeValue(t)}decode(e){return ce(me(e.readValue().toHexString(),20))}};var io=class extends kt{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 _d(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 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!==a.length&&Qi.throwArgumentError("types/value length mismatch","tuple",t);let i=new ui(n.wordSize),r=new ui(n.wordSize),s=[];e.forEach((l,p)=>{let f=a[p];if(l.dynamic){let x=r.length;l.encode(r,f);let I=i.writeUpdatableValue();s.push(_=>{I(_+x)})}else l.encode(i,f)}),s.forEach(l=>{l(i.length)});let o=n.appendWriter(i);return o+=n.appendWriter(r),o}function kd(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 ro=class extends kt{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&&Qi.throwError("insufficient data length",E.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let a=[];for(let i=0;ipo,EtherSymbol:()=>Ly,HashZero:()=>Yi,MaxInt256:()=>Fy,MaxUint256:()=>co,MinInt256:()=>By,NegativeOne:()=>yo,One:()=>fo,Two:()=>Dy,WeiPerEther:()=>Oy,Zero:()=>Xi});var po="0x0000000000000000000000000000000000000000";var yo=F.from(-1),Xi=F.from(0),fo=F.from(1),Dy=F.from(2),Oy=F.from("1000000000000000000"),co=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),By=F.from("-0x8000000000000000000000000000000000000000000000000000000000000000"),Fy=F.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");var Yi="0x0000000000000000000000000000000000000000000000000000000000000000";var Ly="\u039E";var mo=class extends kt{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=co.mask(e.wordSize*8);if(this.signed){let r=i.mask(this.size*8-1);(a.gt(r)||a.lt(r.add(fo).mul(yo)))&&this._throwError("value out-of-bounds",t)}else(a.lt(Xi)||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 Uy="strings/5.7.0";var Vy=new E(Uy),Gt;(function(n){n.current="",n.NFC="NFC",n.NFD="NFD",n.NFKC="NFKC",n.NFKD="NFKD"})(Gt||(Gt={}));var Bt;(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"})(Bt||(Bt={}));function o2(n,e,t,a,i){return Vy.throwArgumentError(`invalid codepoint at offset ${e}; ${n}`,"bytes",t)}function jy(n,e,t,a,i){if(n===Bt.BAD_PREFIX||n===Bt.UNEXPECTED_CONTINUE){let r=0;for(let s=e+1;s>6===2;s++)r++;return r}return n===Bt.OVERRUN?t.length-e-1:0}function u2(n,e,t,a,i){return n===Bt.OVERLONG?(a.push(i),0):(a.push(65533),jy(n,e,t,a,i))}var ho=Object.freeze({error:o2,ignore:jy,replace:u2});function Ed(n,e){e==null&&(e=ho.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(Bt.UNEXPECTED_CONTINUE,a-1,n,t):a+=e(Bt.BAD_PREFIX,a-1,n,t);continue}if(a-1+r>=n.length){a+=e(Bt.OVERRUN,a-1,n,t);continue}let o=i&(1<<8-r-1)-1;for(let l=0;l1114111){a+=e(Bt.OUT_OF_RANGE,a-1-r,n,t,o);continue}if(o>=55296&&o<=57343){a+=e(Bt.UTF16_SURROGATE,a-1-r,n,t,o);continue}if(o<=s){a+=e(Bt.OVERLONG,a-1-r,n,t,o);continue}t.push(o)}}return t}function ve(n,e=Gt.current){e!=Gt.current&&(Vy.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 Ad(n){let e="0000"+n.toString(16);return"\\u"+e.substring(e.length-4)}function Md(n,e){return'"'+Ed(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?Ad(t):(t-=65536,Ad((t>>10&1023)+55296)+Ad((t&1023)+56320))}).join("")+'"'}function xo(n){return n.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function Jt(n,e){return xo(Ed(n,e))}function Ca(n,e=Gt.current){return Ed(ve(n,e))}function Cd(n){let e=ve(n);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return K(ye([e,Yi]).slice(0,32))}function Id(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 Jt(e.slice(0,t))}function d2(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 Hy(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 Rd(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 l2=Hy("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"),p2="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(n=>parseInt(n,16)),y2=[{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}],f2=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"),c2=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"),m2=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",d2),h2=Hy("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 x2(n){return n.reduce((e,t)=>(t.forEach(a=>{e.push(a)}),e),[])}function b2(n){return!!Rd(n,l2)}function g2(n){let e=Rd(n,y2);if(e)return[n+e.s];let t=f2[n];if(t)return t;let a=c2[n];if(a)return[n+a[0]];let i=m2[n];return i||null}function T2(n){return!!Rd(n,h2)}function Pd(n){if(n.match(/^[a-z0-9-]*$/i)&&n.length<=59)return n.toLowerCase();let e=Ca(n);e=x2(e.map(a=>{if(p2.indexOf(a)>=0)return[];if(a>=65024&&a<=65039)return[];let i=g2(a);return i||[a]})),e=Ca(xo(e),Gt.NFKC),e.forEach(a=>{if(T2(a))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(a=>{if(b2(a))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 $r{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 kt{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 _d(e,this.coders,t)}decode(e){return e.coerce(this.name,kd(e,this.coders))}};var go=new E(jn),v2=new RegExp(/^bytes([0-9]*)$/),w2=new RegExp(/^(u?int)([0-9]*)$/),Zi=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(a=>this._getCoder(a)),e.name);case"":return new lo(e.name)}let t=e.type.match(w2);if(t){let a=parseInt(t[2]||"256");return(a===0||a>256||a%8!==0)&&go.throwArgumentError("invalid "+t[1]+" bit length","param",e),new mo(a/8,t[1]==="int",e.name)}if(t=e.type.match(v2),t){let a=parseInt(t[1]);return(a===0||a>32)&&go.throwArgumentError("invalid bytes length","param",e),new uo(a,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 a=e.map(s=>this._getCoder(pt.from(s))),i=new pi(a,"_"),r=this._getWriter();return i.encode(r,t),r.data}decode(e,t,a){let i=e.map(s=>this._getCoder(pt.from(s)));return new pi(i,"_").decode(this._getReader(j(t),a))}},Qr=new Zi;function nn(n){return fe(ve(n))}var To="hash/5.7.0";var Nd={};Gi(Nd,{decode:()=>er,encode:()=>tr});function er(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 _2(n){let e={};for(let t=0;t>--l&1}let x=31,I=Math.pow(2,x),_=I>>>1,v=_>>1,S=I-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=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 A2(n){let e=0;return()=>n[e++]}function zy(n){return A2(k2(n))}function E2(n){return n&1?~n>>1:n>>1}function M2(n,e){let t=Array(n);for(let a=0;ae[s]):t}function Ky(n){let e=[];for(;;){let t=n();if(t==0)break;e.push(S2(t,n))}for(;;){let t=n()-1;if(t<0)break;e.push(R2(t,n))}return _2(Gy(e))}function I2(n){let e=[];for(;;){let t=n();if(t==0)break;e.push(t)}return e}function Wy(n,e,t){let a=Array(n).fill(void 0).map(()=>[]);for(let i=0;ia[s].push(r));return a}function S2(n,e){let t=1+e(),a=e(),i=I2(e),r=Wy(i.length,1+n,e);return Gy(r.map((s,o)=>{let l=s[0],p=s.slice(1);return Array(i[o]).fill(void 0).map((f,x)=>{let I=x*a;return[l+x*t,p.map(_=>_+I)]})}))}function R2(n,e){let t=1+e();return Wy(t,1+n,e).map(i=>[i[0],i.slice(1)])}function Jy(n){let e=Xr(n).sort((a,i)=>a-i);return t();function t(){let a=[];for(;;){let p=Xr(n,e);if(p.length==0)break;a.push({set:new Set(p),node:t()})}a.sort((p,f)=>f.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 $y(){return zy(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 vo=$y(),P2=new Set(Xr(vo)),N2=new Set(Xr(vo)),D2=Ky(vo),O2=Jy(vo),Qy=45,Xy=95;function Yy(n){return Ca(n)}function B2(n){return n.filter(e=>e!=65039)}function Zy(n){for(let e of n.split(".")){let t=Yy(e);try{for(let a=t.lastIndexOf(Xy)-1;a>=0;a--)if(t[a]!==Xy)throw new Error("underscore only allowed at start");if(t.length>=4&&t.every(a=>a<128)&&t[2]===Qy&&t[3]===Qy)throw new Error("invalid label extension")}catch(a){throw new Error(`Invalid label "${e}": ${a.message}`)}}return n}function e0(n){return Zy(F2(n,B2))}function F2(n,e){let t=Yy(n).reverse(),a=[];for(;t.length;){let i=U2(t);if(i){a.push(...e(i));continue}let r=t.pop();if(P2.has(r)){a.push(r);continue}if(N2.has(r))continue;let s=D2[r];if(s){a.push(...s);continue}throw new Error(`Disallowed codepoint: 0x${r.toString(16).toUpperCase()}`)}return Zy(L2(String.fromCodePoint(...a)))}function L2(n){return n.normalize("NFC")}function U2(n,e){var t;let a=O2,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 V2=new E(To),n0=new Uint8Array(32);n0.fill(0);function t0(n){if(n.length===0)throw new Error("invalid ENS name; empty component");return n}function Dd(n){let e=ve(e0(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(t0(e.slice(a))),t}function Od(n){try{return Dd(n).length!==0}catch{}return!1}function Ia(n){typeof n!="string"&&V2.throwArgumentError("invalid ENS name; not a string","name",n);let e=n0,t=Dd(n);for(;t.length;)e=fe(ye([e,fe(t.pop())]));return K(e)}function Yr(n){return K(ye(Dd(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 a0=`Ethereum Signed Message: -`;function nr(n){return typeof n=="string"&&(n=ve(n)),fe(ye([ve(a0),ve(String(n.length)),n]))}var j2=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},xt=new E(To),o0=new Uint8Array(32);o0.fill(0);var H2=F.from(-1),u0=F.from(0),d0=F.from(1),q2=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function G2(n){let e=j(n),t=e.length%32;return t?_t([e,o0.slice(t)]):K(e)}var z2=me(d0.toHexString(),32),K2=me(u0.toHexString(),32),i0={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Bd=["name","version","chainId","verifyingContract","salt"];function r0(n){return function(e){return typeof e!="string"&&xt.throwArgumentError(`invalid domain value for ${JSON.stringify(n)}`,`domain.${n}`,e),e}}var W2={name:r0("name"),version:r0("version"),chainId:function(n){try{return F.from(n).toString()}catch{}return xt.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",n)},verifyingContract:function(n){try{return ce(n).toLowerCase()}catch{}return xt.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 K(e)}catch{}return xt.throwArgumentError('invalid domain value "salt"',"domain.salt",n)}};function Fd(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))&&xt.throwArgumentError("invalid numeric width","type",n);let i=q2.mask(t?a-1:a),r=t?i.add(d0).mul(H2):u0;return function(s){let o=F.from(s);return(o.lt(r)||o.gt(i))&&xt.throwArgumentError(`value out-of-bounds for ${n}`,"value",s),me(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))&&xt.throwArgumentError("invalid bytes width","type",n),function(a){return j(a).length!==t&&xt.throwArgumentError(`invalid length for ${n}`,"value",a),G2(a)}}}switch(n){case"address":return function(e){return me(ce(e),32)};case"bool":return function(e){return e?z2:K2};case"bytes":return function(e){return fe(e)};case"string":return function(e){return nn(e)}}return null}function s0(n,e){return`${n}(${e.map(({name:t,type:a})=>a+" "+t).join(",")})`}var bt=class{constructor(e){B(this,"types",Object.freeze(ct(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]&&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)&&(a[f]||xt.throwArgumentError(`unknown type ${JSON.stringify(f)}`,"types",e),a[f].push(o),t[o][f]=!0)})}let r=Object.keys(a).filter(o=>a[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=>{!a[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]=s0(o,e[o])+l.map(p=>s0(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(_t(l))}}let a=this.types[e];if(a){let i=nn(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),_t(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,a){if(Fd(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&&xt.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),{}):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,a){return bt.from(t).hashStruct(e,a)}static hashDomain(e){let t=[];for(let a in e){let i=i0[a];i||xt.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(a)}`,"domain",e),t.push({name:a,type:i})}return t.sort((a,i)=>Bd.indexOf(a.name)-Bd.indexOf(i.name)),bt.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,a){return _t(["0x1901",bt.hashDomain(e),bt.from(t).hash(a)])}static hash(e,t,a){return fe(bt.encode(e,t,a))}static resolveNames(e,t,a,i){return j2(this,void 0,void 0,function*(){e=we(e);let r={};e.verifyingContract&&!ie(e.verifyingContract,20)&&(r[e.verifyingContract]="0x");let s=bt.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){bt.hashDomain(e);let i={},r=[];Bd.forEach(l=>{let p=e[l];p!=null&&(i[l]=W2[l](p),r.push({name:l,type:i0[l]}))});let s=bt.from(t),o=we(t);return o.EIP712Domain?xt.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 K(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 ar=class extends en{},ir=class extends en{},Ld=class extends en{},ua=class extends en{static isIndexed(e){return!!(e&&e._isIndexed)}},J2={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function l0(n,e){let t=new Error(`deferred error during ABI decoding triggered accessing ${n}`);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(a=>qt.from(a)).filter(a=>a!=null)),B(this,"_abiCoder",mt(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){gt.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]){gt.warn("duplicate definition - "+r);return}i[r]=a}),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(a=>a.format(e));return e===ge.json?JSON.stringify(t.map(a=>JSON.parse(a))):t}static getAbiCoder(){return Qr}static getAddress(e){return ce(e)}static getSighash(e){return Ce(nn(e.format()),0,4)}static getEventTopic(e){return nn(e.format())}getFunction(e){if(ie(e)){for(let a in this.functions)if(e===this.getSighash(a))return this.functions[a];gt.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?gt.throwArgumentError("no matching function","name",a):i.length>1&>.throwArgumentError("multiple matching functions","name",a),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 a=e.toLowerCase();for(let i in this.events)if(a===this.getEventTopic(i))return this.events[i];gt.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?gt.throwArgumentError("no matching event","name",a):i.length>1&>.throwArgumentError("multiple matching events","name",a),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 a=mt(this.constructor,"getSighash");for(let i in this.errors){let r=this.errors[i];if(e===a(r))return this.errors[i]}gt.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?gt.throwArgumentError("no matching error","name",a):i.length>1&>.throwArgumentError("multiple matching errors","name",a),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 a=j(t);return K(a.slice(0,4))!==this.getSighash(e)&>.throwArgumentError(`data signature does not match error ${e.name}.`,"data",K(a)),this._decodeParams(e.inputs,a.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 a=j(t);return K(a.slice(0,4))!==this.getSighash(e)&>.throwArgumentError(`data signature does not match function ${e.name}.`,"data",K(a)),this._decodeParams(e.inputs,a.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 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=K(a.slice(0,4)),f=J2[p];if(f)s=this._abiCoder.decode(f.inputs,a.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,a.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:K(t),errorArgs:s,errorName:o,errorSignature:l,reason:i})}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&>.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"?nn(s):r.type==="bytes"?fe(K(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(K(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?a.push(null):o.baseType==="array"||o.baseType==="tuple"?gt.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&>.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(nn(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 I=this.getEventTopic(e);(!ie(a[0],32)||a[0].toLowerCase()!==I)&>.throwError("fragment/topic mismatch",E.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:I,value:a[0]}),a=a.slice(1)}let i=[],r=[],s=[];e.inputs.forEach((I,_)=>{I.indexed?I.type==="string"||I.type==="bytes"||I.baseType==="tuple"||I.baseType==="array"?(i.push(pt.fromObject({type:"bytes32",name:I.name})),s.push(!0)):(i.push(I),s.push(!1)):(r.push(I),s.push(!1))});let o=a!=null?this._abiCoder.decode(i,ye(a)):null,l=this._abiCoder.decode(r,t,!0),p=[],f=0,x=0;e.inputs.forEach((I,_)=>{if(I.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(I.name&&p[I.name]==null){let v=p[_];v instanceof Error?Object.defineProperty(p,I.name,{enumerable:!0,get:()=>{throw l0(`property ${JSON.stringify(I.name)}`,v)}}):p[I.name]=v}});for(let I=0;I{throw l0(`index ${I}`,_)}})}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=K(e),a=this.getError(t.substring(0,10).toLowerCase());return a?new Ld({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 p0="abstract-provider/5.7.0";var $2=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Q2=new E(p0),wo=class extends en{static isForkEvent(e){return!!(e&&e._isForkEvent)}};var $t=class{constructor(){Q2.checkAbstract(new.target,$t),B(this,"_isProvider",!0)}getFeeData(){return $2(this,void 0,void 0,function*(){let{block:e,gasPrice:t}=yield Ie({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 y0="abstract-signer/5.7.0";var kn=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},ln=new E(y0),X2=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],Y2=[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 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 a=yield Ie(this.checkTransaction(e));return yield this.provider.call(a,t)})}sendTransaction(e){return kn(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 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 a in e)X2.indexOf(a)===-1&&ln.throwArgumentError("invalid transaction key: "+a,"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(a=>(a[0].toLowerCase()!==a[1].toLowerCase()&&ln.throwArgumentError("from address mismatch","transaction",e),a[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 a=t.maxFeePerGas!=null||t.maxPriorityFeePerGas!=null;if(t.gasPrice!=null&&(t.type===2||a)?ln.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(t.type===0||t.type===1)&&a&&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?(a&&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(Y2.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 Ie(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,a){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new da(this.address,e)}};var pe=_n(yd()),$n=_n(Jd());function yr(n,e,t){return t={path:e,exports:{},require:function(a,i){return vx(a,i??t.path)}},n(t,t.exports),t.exports}function vx(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var Yd=Q0;function Q0(n,e){if(!n)throw new Error(e||"Assertion failed")}Q0.equal=function(e,t,a){if(e!=t)throw new Error(a||"Assertion failed: "+e+" != "+t)};var Cn=yr(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,I=f&255;x?l.push(x,I):l.push(I)}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(I>>1)-1?S=(I>>1)-L:S=L,_.isubn(S)):S=0,x[v]=S,_.iushrn(1)}return x}t.getNAF=a;function i(l,p){var f=[[],[]];l=l.clone(),p=p.clone();for(var x=0,I=0,_;l.cmpn(-x)>0||p.cmpn(-I)>0;){var v=l.andln(3)+x&3,S=p.andln(3)+I&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)+I&7,(_===3||_===5)&&v===2?O=-S:O=S),f[1].push(O),2*x===L+1&&(x=1-x),2*I===O+1&&(I=1-I),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,wx=an.getJSF,Co=an.assert;function Na(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 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){Co(e.precomputed);var a=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),I=r;I>0;I--){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];Co(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,a,i,r){var s=this._wnafT1,o=this._wnafT2,l=this._wnafT3,p=0,f,x,I;for(f=0;f=1;f-=2){var v=f-1,S=f;if(s[v]!==1||s[S]!==1){l[v]=Mo(a[v],s[v],this._bitLength),l[S]=Mo(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=wx(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;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?I=o[x][R-1>>1]:R<0&&(I=o[x][-R-1>>1].neg()),I.type==="affine"?J=J.mixedAdd(I):J=J.add(I))}}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 a=[this],i=this,r=0;r=0&&(_=p,v=f),x.negative&&(x=x.neg(),I=I.neg()),_.negative&&(_=_.neg(),v=v.neg()),[{a:x,b:I},{a:_,b:v}]};fn.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),f=s.mul(i.b),x=e.sub(o).sub(l),I=p.add(f).neg();return{k1:x,k2:I}};fn.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)};fn.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};fn.prototype._endoWnafMulAdd=function(e,t,a){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 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)};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,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)};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,a){var i=[this,t],r=[e,a];return this.curve.endo?this.curve._endoWnafMulAdd(i,r):this.curve._wnafMulAdd(1,i,r,2)};Mt.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)};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 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};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(n,e,t,a){fi.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}Zd(Pt,fi.BasePoint);fn.prototype.jpoint=function(e,t,a){return new Pt(this,e,t,a)};Pt.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)};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(),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 f=l.redSqr(),x=f.redMul(l),I=i.redMul(f),_=p.redSqr().redIAdd(x).redISub(I).redISub(I),v=p.redMul(I.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(),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(),f=p.redMul(o),x=a.redMul(p),I=l.redSqr().redIAdd(f).redISub(x).redISub(x),_=l.redMul(x.redISub(I)).redISub(r.redMul(f)),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 a=this;for(t=0;t=0)return!1;if(a.redIAdd(r),this.x.cmp(a)===0)return!0}};Pt.prototype.inspect=function(){return this.isInfinity()?"":""};Pt.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var Ao=yr(function(n,e){"use strict";var t=e;t.base=fi,t.short=kx,t.mont=null,t.edwards=null}),Eo=yr(function(n,e){"use strict";var t=e,a=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,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:$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(n){if(!(this instanceof Pa))return new Pa(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=Cn.toArray(n.entropy,n.entropyEnc||"hex"),t=Cn.toArray(n.nonce,n.nonceEnc||"hex"),a=Cn.toArray(n.pers,n.persEnc||"hex");Yd(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,t,a)}var X0=Pa;Pa.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};Pa.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=Cn.toArray(a,i||"hex"),this._update(a));for(var r=[];r.length"};var Ax=an.assert;function Io(n,e){if(n instanceof Io)return n;this._importDER(n,e)||(Ax(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 So=Io;function Ex(){this.place=0}function $d(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 $0(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)}Io.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=$0(t),a=$0(a);!a[0]&&!(a[1]&128);)a=a.slice(1);var i=[2];Qd(i,t.length),i=i.concat(t),i.push(2),Qd(i,a.length);var r=i.concat(a),s=[48];return Qd(s,r.length),s=s.concat(r),an.encode(s,e)};var Mx=function(){throw new Error("unsupported")},Y0=an.assert;function pn(n){if(!(this instanceof pn))return new pn(n);typeof n=="string"&&(Y0(Object.prototype.hasOwnProperty.call(Eo,n),"Unknown curve "+n),n=Eo[n]),n instanceof Eo.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 Cx=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 X0({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||Mx(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)}};pn.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};pn.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 X0({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 I=this.g.mul(x);if(!I.isInfinity()){var _=I.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=(I.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,a,i){e=this._truncateToN(new pe.default(e,16)),a=this.keyFromPublic(a,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,a.getPublic(),p),f.isInfinity()?!1:f.eqXToP(r)):(f=this.g.mulAdd(l,a.getPublic(),p),f.isInfinity()?!1:f.getX().umod(this.n).cmp(r)===0)};pn.prototype.recoverPubKey=function(n,e,t,a){Y0((3&t)===t,"The recovery param is more than two bits"),e=new So(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 f=e.r.invm(i),x=i.sub(r).mul(f).umod(i),I=o.mul(f).umod(i);return this.g.mulAdd(x,s,I)};pn.prototype.getKeyRecoveryParam=function(n,e,t,a){if(e=new So(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 Ix=yr(function(n,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=Cx,t.eddsa=null}),Z0=Ix.ec;var ef="signing-key/5.7.0";var nl=new E(ef),tl=null;function Qn(){return tl||(tl=new Z0("secp256k1")),tl}var cn=class{constructor(e){B(this,"curve","secp256k1"),B(this,"privateKey",K(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)),a=Qn().keyFromPublic(j(e));return"0x"+t.pub.add(a.pub).encodeCompressed("hex")}signDigest(e){let t=Qn().keyFromPrivate(j(this.privateKey)),a=j(e);a.length!==32&&nl.throwArgumentError("bad digest length","digest",e);let i=t.sign(a,{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)),a=Qn().keyFromPublic(j(ts(e)));return me("0x"+t.derive(a.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}};function Ro(n,e){let t=Vn(e),a={r:j(t.r),s:j(t.s)};return"0x"+Qn().recoverPubKey(j(n),a,t.recoveryParam).encode("hex",!1)}function ts(n,e){let t=j(n);if(t.length===32){let a=new cn(t);return e?"0x"+Qn().keyFromPrivate(t).getPublic(!0,"hex"):a.publicKey}else{if(t.length===33)return e?K(t):"0x"+Qn().keyFromPublic(t).getPublic(!1,"hex");if(t.length===65)return e?"0x"+Qn().keyFromPublic(t).getPublic(!0,"hex"):K(t)}return nl.throwArgumentError("invalid public or private key","key","[REDACTED]")}var tf="transactions/5.7.0";var Ut=new E(tf),Po;(function(n){n[n.legacy=0]="legacy",n[n.eip2930=1]="eip2930",n[n.eip1559=2]="eip1559"})(Po||(Po={}));function il(n){return n==="0x"?null:ce(n)}function Lt(n){return n==="0x"?Xi:F.from(n)}var Sx=[{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"}],Rx={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function mn(n){let e=ts(n);return ce(Ce(fe(Ce(e,1)),12))}function ci(n,e){return mn(Ro(j(n),e))}function rn(n,e){let t=Zt(F.from(n).toHexString());return t.length>32&&Ut.throwArgumentError("invalid length for "+e,"transaction:"+e,n),t}function al(n,e){return{address:ce(n),storageKeys:(e||[]).map((t,a)=>(Nt(t)!==32&&Ut.throwArgumentError("invalid access list storageKey",`accessList[${n}:${a}]`,t),t.toLowerCase()))}}function sn(n){if(Array.isArray(n))return n.map((t,a)=>Array.isArray(t)?(t.length>2&&Ut.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${a}]`,t),al(t[0],t[1])):al(t.address,t.storageKeys));let e=Object.keys(n).map(t=>{let a=n[t].reduce((i,r)=>(i[r]=!0,i),{});return al(t,Object.keys(a).sort())});return e.sort((t,a)=>t.address.localeCompare(a.address)),e}function nf(n){return sn(n).map(e=>[e.address,e.storageKeys])}function af(n,e){if(n.gasPrice!=null){let a=F.from(n.gasPrice),i=F.from(n.maxFeePerGas||0);a.eq(i)||Ut.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:a,maxFeePerGas:i})}let t=[rn(n.chainId||0,"chainId"),rn(n.nonce||0,"nonce"),rn(n.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),rn(n.maxFeePerGas||0,"maxFeePerGas"),rn(n.gasLimit||0,"gasLimit"),n.to!=null?ce(n.to):"0x",rn(n.value||0,"value"),n.data||"0x",nf(n.accessList||[])];if(e){let a=Vn(e);t.push(rn(a.recoveryParam,"recoveryParam")),t.push(Zt(a.r)),t.push(Zt(a.s))}return _t(["0x02",oa(t)])}function rf(n,e){let t=[rn(n.chainId||0,"chainId"),rn(n.nonce||0,"nonce"),rn(n.gasPrice||0,"gasPrice"),rn(n.gasLimit||0,"gasLimit"),n.to!=null?ce(n.to):"0x",rn(n.value||0,"value"),n.data||"0x",nf(n.accessList||[])];if(e){let a=Vn(e);t.push(rn(a.recoveryParam,"recoveryParam")),t.push(Zt(a.r)),t.push(Zt(a.s))}return _t(["0x01",oa(t)])}function Px(n,e){Wi(n,Rx);let t=[];Sx.forEach(function(s){let o=n[s.name]||[],l={};s.numeric&&(l.hexPad="left"),o=j(K(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(K(o))});let a=0;if(n.chainId!=null?(a=n.chainId,typeof a!="number"&&Ut.throwArgumentError("invalid transaction.chainId","transaction",n)):e&&!ia(e)&&e.v>28&&(a=Math.floor((e.v-35)/2)),a!==0&&(t.push(K(a)),t.push("0x"),t.push("0x")),!e)return oa(t);let i=Vn(e),r=27+i.recoveryParam;return a!==0?(t.pop(),t.pop(),t.pop(),r+=a*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(K(r)),t.push(Zt(j(i.r))),t.push(Zt(j(i.s))),oa(t)}function ns(n,e){if(n.type==null||n.type===0)return n.accessList!=null&&Ut.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",n),Px(n,e);switch(n.type){case 1:return rf(n,e);case 2:return af(n,e);default:break}return Ut.throwError(`unsupported transaction type: ${n.type}`,E.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:n.type})}function sf(n,e,t){try{let a=Lt(e[0]).toNumber();if(a!==0&&a!==1)throw new Error("bad recid");n.v=a}catch{Ut.throwArgumentError("invalid v for transaction type: 1","v",e[0])}n.r=me(e[1],32),n.s=me(e[2],32);try{let a=fe(t(n));n.from=ci(a,{r:n.r,s:n.s,recoveryParam:n.v})}catch{}}function Nx(n){let e=Jr(n.slice(1));e.length!==9&&e.length!==12&&Ut.throwArgumentError("invalid component count for transaction type: 2","payload",K(n));let t=Lt(e[2]),a=Lt(e[3]),i={type:2,chainId:Lt(e[0]).toNumber(),nonce:Lt(e[1]).toNumber(),maxPriorityFeePerGas:t,maxFeePerGas:a,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(n),sf(i,e.slice(9),af)),i}function Dx(n){let e=Jr(n.slice(1));e.length!==8&&e.length!==11&&Ut.throwArgumentError("invalid component count for transaction type: 1","payload",K(n));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(n),sf(t,e.slice(8),rf)),t}function Ox(n){let e=Jr(n);e.length!==9&&e.length!==6&&Ut.throwArgumentError("invalid raw transaction","rawTransaction",n);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 a=t.v-27,i=e.slice(0,6);t.chainId!==0&&(i.push(K(t.chainId)),i.push("0x"),i.push("0x"),a-=t.chainId*2+8);let r=fe(oa(i));try{t.from=ci(r,{r:K(t.r),s:K(t.s),recoveryParam:a})}catch{}t.hash=fe(n)}return t.type=null,t}function No(n){let e=j(n);if(e[0]>127)return Ox(e);switch(e[0]){case 1:return Dx(e);case 2:return Nx(e);default:break}return Ut.throwError(`unsupported transaction type: ${e[0]}`,E.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}var of="contracts/5.7.0";var Da=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Se=new E(of),Bx={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(n,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{}n||Se.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&&Se.throwArgumentError("resolver or addr is not configured for ENS name","name",t),a})}function as(n,e,t){return Da(this,void 0,void 0,function*(){return Array.isArray(t)?yield Promise.all(t.map((a,i)=>as(n,Array.isArray(e)?e[i]:e[a.name],a))):t.type==="address"?yield Do(n,e):t.type==="tuple"?yield as(n,e,t.components):t.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(a=>as(n,a,t.arrayChildren))):Promise.reject(Se.makeError("invalid value for array",E.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function Fo(n,e,t){return Da(this,void 0,void 0,function*(){let a={};t.length===e.inputs.length+1&&typeof t[t.length-1]=="object"&&(a=we(t.pop())),Se.checkArgumentCount(t.length,e.inputs.length,"passed to contract"),n.signer?a.from?a.from=Ie({override:Do(n.signer,a.from),signer:n.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})):a.from=n.signer.getAddress():a.from&&(a.from=Do(n.provider,a.from));let i=yield Ie({args:as(n.signer||n.provider,t,e.inputs),address:n.resolvedAddress,overrides:Ie(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=sn(o.accessList)),s.gasLimit==null&&e.gas!=null){let p=21e3,f=j(r);for(let x=0;xa[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 Fx(n,e){return function(...t){return Fo(n,e,t)}}function Lx(n,e){let t=n.signer||n.provider;return function(...a){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(n,e,a);return yield t.estimateGas(i)})}}function df(n,e){let t=e.wait.bind(e);e.wait=a=>t(a).then(i=>(i.events=i.logs.map(r=>{let s=ct(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 lf(n,e,t){let a=n.signer||n.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=we(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 Fo(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 Ux(n,e){return function(...t){return Da(this,void 0,void 0,function*(){n.signer||Se.throwError("sending a transaction requires a signer",E.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),n.deployTransaction!=null&&(yield n._deployed());let a=yield Fo(n,e,t),i=yield n.signer.sendTransaction(a);return df(n,i),i})}}function uf(n,e,t){return e.constant?lf(n,e,t):Ux(n,e)}function pf(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 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(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]}},rl=class extends mi{constructor(){super("error",null)}},Oo=class extends mi{constructor(e,t,a,i){let r={address:e},s=t.getEventTopic(a);i?(s!==i[0]&&Se.throwArgumentError("topic mismatch","topics",i),r.topics=i.slice()):r.topics=[s],super(pf(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=$i(e.args);if(t.length)throw t[0].error;let a=(e.args||[]).slice();return a.push(e),a}},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=(a,i)=>this.interface.decodeEventLog(t.eventFragment,a,i),e.args=t.args}catch{}}},fr=class{constructor(e,t,a){B(this,"interface",mt(new.target,"getInterface")(t)),a==null?(B(this,"provider",null),B(this,"signer",null)):St.isSigner(a)?(B(this,"provider",a.provider||null),B(this,"signer",a)):$t.isProvider(a)?(B(this,"provider",a),B(this,"signer",null)):Se.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]]):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,uf(this,o,!0)),this.functions[s]==null&&B(this.functions,s,uf(this,o,!1)),this.callStatic[s]==null&&B(this.callStatic,s,lf(this,o,!0)),this.populateTransaction[s]==null&&B(this.populateTransaction,s,Fx(this,o)),this.estimateGas[s]==null&&B(this.estimateGas,s,Lx(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=we(e||{});return["from","to"].forEach(function(a){t[a]!=null&&Se.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 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 a=e.topics[0];if(typeof a!="string")throw new Error("invalid topic");let i=this.interface.getEvent(a);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(pf(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,a){let i=ct(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||Se.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=we(i.filter);return typeof t=="string"&&ie(t,32)?(a!=null&&Se.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 fr{},hi=class{constructor(e,t,a){let i=null;typeof t=="string"?i=t:on(t)?i=K(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),a&&!St.isSigner(a)&&Se.throwArgumentError("invalid signer","signer",a),B(this,"bytecode",i),B(this,"interface",mt(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=we(e.pop());for(let a in t)if(!Bx[a])throw new Error("unknown transaction override "+a)}return["data","from","to"].forEach(a=>{t[a]!=null&&Se.throwError("cannot override "+a,E.errors.UNSUPPORTED_OPERATION,{operation:a})}),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=K(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 a=yield as(this.signer,e,this.interface.deploy.inputs);a.push(t);let i=this.getDeployTransaction(...a),r=yield this.signer.sendTransaction(i),s=mt(this.constructor,"getContractAddress")(r),o=mt(this.constructor,"getContract")(s,this.interface,this.signer);return df(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 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 li(e)}static getContract(e,t,a){return new oe(e,t,a)}};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;)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 I=j(ca(i,n,l));r||(r=I.length,f=new Uint8Array(r),s=Math.ceil(a/r),p=a-(s-1)*r),f.set(I);for(let S=1;S{var H6=Object.create;var $s=Object.defineProperty;var q6=Object.getOwnPropertyDescriptor;var G6=Object.getOwnPropertyNames;var z6=Object.getPrototypeOf,K6=Object.prototype.hasOwnProperty;var W6=(n,e,t)=>e in n?$s(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),Gi=(n,e)=>{for(var t in e)$s(n,t,{get:e[t],enumerable:!0})},J6=(n,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of G6(e))!K6.call(n,i)&&i!==t&&$s(n,i,{get:()=>e[i],enumerable:!(a=q6(e,i))||a.enumerable});return n};var _n=(n,e,t)=>(t=n!=null?H6(z6(n)):{},J6(e||!n||!n.__esModule?$s(t,"default",{value:n,enumerable:!0}):t,n));var xe=(n,e,t)=>(W6(n,typeof e!="symbol"?e+"":e,t),t);var Wp=ae(()=>{});var fd=ae((Jp,yd)=>{(function(n,e){"use strict";function t(C,u){if(!C)throw new Error(u||"Assertion failed")}function a(C,u){C.super_=u;var y=function(){};y.prototype=u.prototype,C.prototype=new y,C.prototype.constructor=C}function i(C,u,y){if(i.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=i:e.BN=i,i.BN=i,i.wordSize=26;var r;try{typeof window<"u"&&typeof window.Buffer<"u"?r=window.Buffer:r=Wp().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(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 b=s(C,y);return y-1>=u&&(b|=s(C,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(C,u,y,b){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()},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"],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];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=I[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(C){for(var u=new Array(C.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-C.length+1);P<=c;P++){var D=d-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[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,W=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,Ka=w[6]|0,Fe=Ka&8191,Le=Ka>>>13,Wa=w[7]|0,Ue=Wa&8191,Ve=Wa>>>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,Ke=Qa>>>13,Xa=A[1]|0,We=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,Ke),d=d+Math.imul(P,ze)|0,m=Math.imul(P,Ke);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,Ke),d=d+Math.imul(W,ze)|0,m=Math.imul(W,Ke),g=g+Math.imul(c,We)|0,d=d+Math.imul(c,Je)|0,d=d+Math.imul(P,We)|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,Ke),d=d+Math.imul(Q,ze)|0,m=Math.imul(Q,Ke),g=g+Math.imul(V,We)|0,d=d+Math.imul(V,Je)|0,d=d+Math.imul(W,We)|0,m=m+Math.imul(W,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,Ke),d=d+Math.imul(le,ze)|0,m=Math.imul(le,Ke),g=g+Math.imul(X,We)|0,d=d+Math.imul(X,Je)|0,d=d+Math.imul(Q,We)|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(W,$e)|0,m=m+Math.imul(W,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,Ke),d=d+Math.imul(De,ze)|0,m=Math.imul(De,Ke),g=g+Math.imul(Z,We)|0,d=d+Math.imul(Z,Je)|0,d=d+Math.imul(le,We)|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(W,Xe)|0,m=m+Math.imul(W,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,Ke),d=d+Math.imul(Be,ze)|0,m=Math.imul(Be,Ke),g=g+Math.imul(Ne,We)|0,d=d+Math.imul(Ne,Je)|0,d=d+Math.imul(De,We)|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(W,Ze)|0,m=m+Math.imul(W,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 Yu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Yu>>>26)|0,Yu&=67108863,g=Math.imul(Fe,ze),d=Math.imul(Fe,Ke),d=d+Math.imul(Le,ze)|0,m=Math.imul(Le,Ke),g=g+Math.imul(Oe,We)|0,d=d+Math.imul(Oe,Je)|0,d=d+Math.imul(Be,We)|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(W,tt)|0,m=m+Math.imul(W,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,Ke),d=d+Math.imul(Ve,ze)|0,m=Math.imul(Ve,Ke),g=g+Math.imul(Fe,We)|0,d=d+Math.imul(Fe,Je)|0,d=d+Math.imul(Le,We)|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(W,at)|0,m=m+Math.imul(W,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 ed=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(ed>>>26)|0,ed&=67108863,g=Math.imul(je,ze),d=Math.imul(je,Ke),d=d+Math.imul(He,ze)|0,m=Math.imul(He,Ke),g=g+Math.imul(Ue,We)|0,d=d+Math.imul(Ue,Je)|0,d=d+Math.imul(Ve,We)|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(W,rt)|0,m=m+Math.imul(W,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 td=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(td>>>26)|0,td&=67108863,g=Math.imul(qe,ze),d=Math.imul(qe,Ke),d=d+Math.imul(Ge,ze)|0,m=Math.imul(Ge,Ke),g=g+Math.imul(je,We)|0,d=d+Math.imul(je,Je)|0,d=d+Math.imul(He,We)|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(W,ot)|0,m=m+Math.imul(W,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 nd=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(nd>>>26)|0,nd&=67108863,g=Math.imul(qe,We),d=Math.imul(qe,Je),d=d+Math.imul(Ge,We)|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(W,dt)|0,m=m+Math.imul(W,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,$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 id=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(id>>>26)|0,id&=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 rd=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(rd>>>26)|0,rd&=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 sd=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(sd>>>26)|0,sd&=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 od=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(od>>>26)|0,od&=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 ud=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(ud>>>26)|0,ud&=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 dd=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(dd>>>26)|0,dd&=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 ld=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(ld>>>26)|0,ld&=67108863,g=Math.imul(qe,dt),d=Math.imul(qe,lt),d=d+Math.imul(Ge,dt)|0,m=Math.imul(Ge,lt);var pd=(k+g|0)+((d&8191)<<13)|0;return k=(m+(d>>>13)|0)+(pd>>>26)|0,pd&=67108863,h[0]=wa,h[1]=_a,h[2]=ka,h[3]=Aa,h[4]=Ea,h[5]=Yu,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(C,u,y){y.negative=u.negative^C.negative,y.length=C.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(C,u,y){return U(C,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(C,u){this.x=C,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 $(C,u){this.name=C,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(C){if(typeof C=="string"){var u=i._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 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(C){q.call(this,C),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 yd>"u"||yd,Jp)});var gy=ae((Dg,to)=>{(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 to=="object"&&to.exports,o=typeof define=="function"&&define.amd,l=!a.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",p="0123456789abcdef".split(""),f=[31,7936,2031616,520093696],x=[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};(a.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(c){return Object.prototype.toString.call(c)==="[object Array]"}),l&&(a.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,W){return new d(c,P,W).update(V)[D]()}},$=function(c,P,D){return function(V,W,ee,X){return u["cshake"+c].update(V,W,ee,X)[D]()}},de=function(c,P,D){return function(V,W,ee,X){return u["kmac"+c].update(V,W,ee,X)[D]()}},T=function(c,P,D,V){for(var W=0;W>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(n);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(n)}else throw new Error(n);P=!0}for(var V=this.blocks,W=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)<=W){for(this.start=Z-W,this.block=V[X],Z=0;Z>8,D=c&255;D>0;)W.unshift(D),c=c>>8,D=c&255,++V;return P?W.push(V):W.unshift(V),this.update(W),W.length},d.prototype.encodeString=function(c){var P,D=typeof c;if(D!=="string"){if(D==="object"){if(c===null)throw new Error(n);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(n)}else throw new Error(n);P=!0}var V=0,W=c.length;if(P)V=W;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),W=0)}return V&&(Q=P[W],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,W=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[W],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,W,ee,X,Q,yt,Z,le,Ga,Ne,De,za,Oe,Be,Ka,Fe,Le,Wa,Ue,Ve,Ja,je,He,$a,qe,Ge,Qa,ze,Ke,Xa,We,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)W=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=W^(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^(W<<1|ee>>>31),D=Ga^(ee<<1|W>>>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,Ka=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,Ke=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,We=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,Wa=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^~Ka&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&Wa,c[3]=Ka^~Le&Ue,c[12]=$a^~Ge&ze,c[13]=qe^~Qa&Ke,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^~Wa&Ve,c[5]=Le^~Ue&Ja,c[14]=Ge^~ze&Xa,c[15]=Qa^~Ke&We,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]=Wa^~Ve&za,c[7]=Ue^~Ja&Oe,c[16]=ze^~Xa&je,c[17]=Ke^~We&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&Ka,c[18]=Xa^~je&$a,c[19]=We^~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{c0.exports=f0;function f0(n,e){if(!n)throw new Error(e||"Assertion failed")}f0.equal=function(e,t,a){if(e!=t)throw new Error(a||"Assertion failed: "+e+" != "+t)}});var m0=ae((E3,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 a=function(){};a.prototype=t.prototype,e.prototype=new a,e.prototype.constructor=e}}});var An=ae(Pe=>{"use strict";var Z2=rr(),eh=m0();Pe.inherits=eh;function th(n,e){return(n.charCodeAt(e)&64512)!==55296||e<0||e+1>=n.length?!1:(n.charCodeAt(e+1)&64512)===56320}function nh(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):th(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}Pe.htonl=h0;function ih(n,e){for(var t="",a=0;a>>0}return r}Pe.join32=rh;function sh(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}Pe.split32=sh;function oh(n,e){return n>>>e|n<<32-e}Pe.rotr32=oh;function uh(n,e){return n<>>32-e}Pe.rotl32=uh;function dh(n,e){return n+e>>>0}Pe.sum32=dh;function lh(n,e,t){return n+e+t>>>0}Pe.sum32_3=lh;function ph(n,e,t,a){return n+e+t+a>>>0}Pe.sum32_4=ph;function yh(n,e,t,a,i){return n+e+t+a+i>>>0}Pe.sum32_5=yh;function fh(n,e,t,a){var i=n[e],r=n[e+1],s=a+r>>>0,o=(s>>0,n[e+1]=s}Pe.sum64=fh;function ch(n,e,t,a){var i=e+a>>>0,r=(i>>0}Pe.sum64_hi=ch;function mh(n,e,t,a){var i=e+a;return i>>>0}Pe.sum64_lo=mh;function hh(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}Pe.sum64_4_hi=hh;function xh(n,e,t,a,i,r,s,o){var l=e+a+r+o;return l>>>0}Pe.sum64_4_lo=xh;function bh(n,e,t,a,i,r,s,o,l,p){var f=0,x=e;x=x+a>>>0,f+=x>>0,f+=x>>0,f+=x>>0,f+=x>>0}Pe.sum64_5_hi=bh;function gh(n,e,t,a,i,r,s,o,l,p){var f=e+a+r+o+p;return f>>>0}Pe.sum64_5_lo=gh;function Th(n,e,t){var a=e<<32-t|n>>>t;return a>>>0}Pe.rotr64_hi=Th;function vh(n,e,t){var a=n<<32-t|e>>>t;return a>>>0}Pe.rotr64_lo=vh;function wh(n,e,t){return n>>>t}Pe.shr64_hi=wh;function _h(n,e,t){var a=n<<32-t|e>>>t;return a>>>0}Pe.shr64_lo=_h});var sr=ae(T0=>{"use strict";var g0=An(),kh=rr();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}T0.BlockHash=_o;_o.prototype.update=function(e,t){if(e=g0.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=g0.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 Ah=An(),qn=Ah.rotr32;function Eh(n,e,t,a){if(n===0)return v0(e,t,a);if(n===1||n===3)return _0(e,t,a);if(n===2)return w0(e,t,a)}la.ft_1=Eh;function v0(n,e,t){return n&e^~n&t}la.ch32=v0;function w0(n,e,t){return n&e^n&t^e&t}la.maj32=w0;function _0(n,e,t){return n^e^t}la.p32=_0;function Mh(n){return qn(n,2)^qn(n,13)^qn(n,22)}la.s0_256=Mh;function Ch(n){return qn(n,6)^qn(n,11)^qn(n,25)}la.s1_256=Ch;function Ih(n){return qn(n,7)^qn(n,18)^n>>>3}la.g0_256=Ih;function Sh(n){return qn(n,17)^qn(n,19)^n>>>10}la.g1_256=Sh});var E0=ae((S3,A0)=>{"use strict";var or=An(),Rh=sr(),Ph=jd(),Hd=or.rotl32,Zr=or.sum32,Nh=or.sum32_5,Dh=Ph.ft_1,k0=Rh.BlockHash,Oh=[1518500249,1859775393,2400959708,3395469782];function Gn(){if(!(this instanceof Gn))return new Gn;k0.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}or.inherits(Gn,k0);A0.exports=Gn;Gn.blockSize=512;Gn.outSize=160;Gn.hmacStrength=80;Gn.padLength=64;Gn.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 ur=An(),Bh=sr(),dr=jd(),Fh=rr(),En=ur.sum32,Lh=ur.sum32_4,Uh=ur.sum32_5,Vh=dr.ch32,jh=dr.maj32,Hh=dr.s0_256,qh=dr.s1_256,Gh=dr.g0_256,zh=dr.g1_256,M0=Bh.BlockHash,Kh=[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;M0.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=Kh,this.W=new Array(64)}ur.inherits(zn,M0);C0.exports=zn;zn.blockSize=512;zn.outSize=256;zn.hmacStrength=192;zn.padLength=64;zn.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 Gd=An(),I0=qd();function pa(){if(!(this instanceof pa))return new pa;I0.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}Gd.inherits(pa,I0);S0.exports=pa;pa.blockSize=512;pa.outSize=224;pa.hmacStrength=192;pa.padLength=64;pa.prototype._digest=function(e){return e==="hex"?Gd.toHex32(this.h.slice(0,7),"big"):Gd.split32(this.h.slice(0,7),"big")}});var Wd=ae((N3,O0)=>{"use strict";var Qt=An(),Wh=sr(),Jh=rr(),Kn=Qt.rotr64_hi,Wn=Qt.rotr64_lo,P0=Qt.shr64_hi,N0=Qt.shr64_lo,Ra=Qt.sum64,zd=Qt.sum64_hi,Kd=Qt.sum64_lo,$h=Qt.sum64_4_hi,Qh=Qt.sum64_4_lo,Xh=Qt.sum64_5_hi,Yh=Qt.sum64_5_lo,D0=Wh.BlockHash,Zh=[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 Mn(){if(!(this instanceof Mn))return new Mn;D0.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=Zh,this.W=new Array(160)}Qt.inherits(Mn,D0);O0.exports=Mn;Mn.blockSize=1024;Mn.outSize=512;Mn.hmacStrength=192;Mn.padLength=128;Mn.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 Jd=An(),B0=Wd();function ya(){if(!(this instanceof ya))return new ya;B0.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}Jd.inherits(ya,B0);F0.exports=ya;ya.blockSize=1024;ya.outSize=384;ya.hmacStrength=192;ya.padLength=128;ya.prototype._digest=function(e){return e==="hex"?Jd.toHex32(this.h.slice(0,12),"big"):Jd.split32(this.h.slice(0,12),"big")}});var U0=ae(lr=>{"use strict";lr.sha1=E0();lr.sha224=R0();lr.sha256=qd();lr.sha384=L0();lr.sha512=Wd()});var z0=ae(G0=>{"use strict";var yi=An(),yx=sr(),ko=yi.rotl32,V0=yi.sum32,es=yi.sum32_3,j0=yi.sum32_4,q0=yx.BlockHash;function Jn(){if(!(this instanceof Jn))return new Jn;q0.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}yi.inherits(Jn,q0);G0.ripemd160=Jn;Jn.blockSize=512;Jn.outSize=160;Jn.hmacStrength=192;Jn.padLength=64;Jn.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,f=r,x=s,I=o,_=0;_<80;_++){var v=V0(ko(j0(a,H0(_,i,r,s),e[mx[_]+t],fx(_)),xx[_]),o);a=o,o=s,s=ko(r,10),r=i,i=v,v=V0(ko(j0(l,H0(79-_,p,f,x),e[hx[_]+t],cx(_)),bx[_]),I),l=I,I=x,x=ko(f,10),f=p,p=v}v=es(this.h[1],r,x),this.h[1]=es(this.h[2],s,I),this.h[2]=es(this.h[3],o,l),this.h[3]=es(this.h[4],a,p),this.h[4]=es(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 H0(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 fx(n){return n<=15?0:n<=31?1518500249:n<=47?1859775393:n<=63?2400959708:2840853838}function cx(n){return n<=15?1352829926:n<=31?1548603684:n<=47?1836072691:n<=63?2053994217:0}var mx=[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],hx=[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],xx=[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],bx=[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 W0=ae((F3,K0)=>{"use strict";var gx=An(),Tx=rr();function pr(n,e,t){if(!(this instanceof pr))return new pr(n,e,t);this.Hash=n,this.blockSize=n.blockSize/8,this.outSize=n.outSize/8,this.inner=null,this.outer=null,this._init(gx.toArray(e,t))}K0.exports=pr;pr.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),Tx(e.length<=this.blockSize);for(var t=e.length;t{var Rt=J0;Rt.utils=An();Rt.common=sr();Rt.sha=U0();Rt.ripemd=z0();Rt.hmac=W0();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 cl=ae((fl,_f)=>{"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&&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],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],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,W=P%4,this._Ke[V][W]=m[k],this._Kd[h-V][W]=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=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,G=J,c=$,P,D,V,W,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],W=(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]=(W+de[D-7]|0)+(ee+de[D-16]|0)|0;for(D=0;D<64;D++)W=(((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+W|0,g=k,k=h,h=A,A=W+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,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,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 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=a(_,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=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 I={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"?Af.exports=I:typeof define=="function"&&define.amd?define(I):n&&(n.scrypt&&(n._scrypt=n.scrypt),n.scrypt=I)})(gl)});var Qf=ae((E4,$f)=>{"use strict";var Jo="qpzry9x8gf2tvdw0s3jn54khce6mua7l",kl={};for(ls=0;ls>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 Wf(n){for(var e=1,t=0;t126)return"Invalid prefix ("+n+")";e=Tr(e)^a>>5}for(e=Tr(e),t=0;tt)throw new TypeError("Exceeds length limit");n=n.toLowerCase();var a=Wf(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=Tr(a)^s,i+=Jo.charAt(s)}for(r=0;r<6;++r)a=Tr(a);for(a^=1,r=0;r<6;++r){var o=a>>(5-r)*5&31;i+=Jo.charAt(o)}return i}function Jf(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=Wf(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 i5(){var n=Jf.apply(null,arguments);if(typeof n=="object")return n}function r5(n){var e=Jf.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function $o(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 Xl=="object"&&typeof Yl<"u"?Yl.exports=e():typeof define=="function"&&define.amd?define(e):(n=typeof globalThis<"u"?globalThis:n||self,n.fetchRetry=e())})(Xl,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,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(I,_){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)I(U);else if(typeof x=="function")try{return Promise.resolve(x(L,null,U)).then(function(H){H?S(L,null,U):I(U)}).catch(_)}catch(H){_(H)}else L=0}function t(a){this.name="ArgumentError",this.message=a}return n})});var Zl=ae(cu=>{"use strict";Object.defineProperty(cu,"__esModule",{value:!0});cu.$dictionary=void 0;cu.$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 Ds=ae((DA,pm)=>{pm.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}});var tp=ae(La=>{var Ee=Ds(),ep=()=>[{type:Ee.RANGE,from:48,to:57}],ym=()=>[{type:Ee.CHAR,value:95},{type:Ee.RANGE,from:97,to:122},{type:Ee.RANGE,from:65,to:90}].concat(ep()),fm=()=>[{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}],Q5=()=>[{type:Ee.CHAR,value:10},{type:Ee.CHAR,value:13},{type:Ee.CHAR,value:8232},{type:Ee.CHAR,value:8233}];La.words=()=>({type:Ee.SET,set:ym(),not:!1});La.notWords=()=>({type:Ee.SET,set:ym(),not:!0});La.ints=()=>({type:Ee.SET,set:ep(),not:!1});La.notInts=()=>({type:Ee.SET,set:ep(),not:!0});La.whitespace=()=>({type:Ee.SET,set:fm(),not:!1});La.notWhitespace=()=>({type:Ee.SET,set:fm(),not:!0});La.anyChar=()=>({type:Ee.SET,set:Q5(),not:!0})});var mm=ae(Os=>{var cm=Ds(),Rr=tp(),X5="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?",Y5={0:0,t:9,n:10,v:11,f:12,r:13};Os.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 f=a?8:r?parseInt(r,16):s?parseInt(s,16):o?parseInt(o,8):l?X5.indexOf(l):Y5[p],x=String.fromCharCode(f);return/[[\]{}^$.|?*+()]/.test(x)&&(x="\\"+x),x}),n};Os.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(Rr.words());else if(i[2])t.push(Rr.ints());else if(i[3])t.push(Rr.whitespace());else if(i[4])t.push(Rr.notWords());else if(i[5])t.push(Rr.notInts());else if(i[6])t.push(Rr.notWhitespace());else if(i[7])t.push({type:cm.RANGE,from:(i[8]||i[9]).charCodeAt(0),to:i[10].charCodeAt(0)});else if(r=i[12])t.push({type:cm.CHAR,value:r.charCodeAt(0)});else return[t,a.lastIndex];Os.error(e,"Unterminated character class")};Os.error=(n,e)=>{throw new SyntaxError("Invalid regular expression: /"+n+"/: "+e)}});var hm=ae(Bs=>{var mu=Ds();Bs.wordBoundary=()=>({type:mu.POSITION,value:"b"});Bs.nonWordBoundary=()=>({type:mu.POSITION,value:"B"});Bs.begin=()=>({type:mu.POSITION,value:"^"});Bs.end=()=>({type:mu.POSITION,value:"$"})});var xm=ae((LA,np)=>{var Pr=mm(),xn=Ds(),Ai=tp(),hu=hm();np.exports=n=>{var e=0,t,a,i={type:xn.ROOT,stack:[]},r=i,s=i.stack,o=[],l=O=>{Pr.error(n,`Nothing to repeat at column ${O-1}`)},p=Pr.strToChars(n);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 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}))}};bm.exports=Ua});var vm=ae((VA,Tm)=>{var xu=xm(),Fs=gm(),Ei=xu.types;Tm.exports=class Ls{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:Ls.prototype.max!=null?Ls.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 Ei.ROOT:case Ei.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 Z5=Mi&&Mi.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Mi,"__esModule",{value:!0});Mi.RandomGenerator=void 0;var eb=Z5(vm()),tb;(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 eb.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()}})(tb=Mi.RandomGenerator||(Mi.RandomGenerator={}))});var Us=ae(Nr=>{"use strict";var nb=Nr&&Nr.__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(Nr,"__esModule",{value:!0});Nr.TypeGuardError=void 0;var ab=function(n){nb(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);Nr.TypeGuardError=ab});var _m=ae(bu=>{"use strict";Object.defineProperty(bu,"__esModule",{value:!0});bu.$any=void 0;var ib=function(n){return n!==void 0?JSON.parse(JSON.stringify(n)):void 0};bu.$any=ib});var km=ae(gu=>{"use strict";Object.defineProperty(gu,"__esModule",{value:!0});gu.$every=void 0;var rb=function(n,e){for(var t=null,a=0;a{"use strict";Object.defineProperty(Tu,"__esModule",{value:!0});Tu.$guard=void 0;var sb=Us(),ob=function(n){return function(e,t){if(e===!0)throw new sb.TypeGuardError({method:n,path:t.path,expected:t.expected,value:t.value});return!1}};Tu.$guard=ob});var Em=ae(vu=>{"use strict";Object.defineProperty(vu,"__esModule",{value:!0});vu.$is_between=void 0;var ub=function(n,e,t){return e<=n&&n<=t};vu.$is_between=ub});var Mm=ae(wu=>{"use strict";Object.defineProperty(wu,"__esModule",{value:!0});wu.$is_custom=void 0;var db=Zl(),lb=function(n,e,t,a){var i,r=(i=db.$dictionary.get(n))===null||i===void 0?void 0:i.get(e);return r===void 0?!0:r(t)(a)};wu.$is_custom=lb});var Cm=ae(_u=>{"use strict";Object.defineProperty(_u,"__esModule",{value:!0});_u.$is_date=void 0;var pb=function(n){return yb.test(n)};_u.$is_date=pb;var yb=/^(\d{4})-(\d{2})-(\d{2})$/});var Im=ae(ku=>{"use strict";Object.defineProperty(ku,"__esModule",{value:!0});ku.$is_datetime=void 0;var fb=function(n){return!isNaN(new Date(n).getTime())};ku.$is_datetime=fb});var Sm=ae(Au=>{"use strict";Object.defineProperty(Au,"__esModule",{value:!0});Au.$is_email=void 0;var cb=function(n){return mb.test(n)};Au.$is_email=cb;var mb=/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i});var Rm=ae(Eu=>{"use strict";Object.defineProperty(Eu,"__esModule",{value:!0});Eu.$is_ipv4=void 0;var hb=function(n){return xb.test(n)};Eu.$is_ipv4=hb;var xb=/^(?: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 Pm=ae(Mu=>{"use strict";Object.defineProperty(Mu,"__esModule",{value:!0});Mu.$is_ipv6=void 0;var bb=function(n){return gb.test(n)};Mu.$is_ipv6=bb;var gb=/^(([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 Nm=ae(Cu=>{"use strict";Object.defineProperty(Cu,"__esModule",{value:!0});Cu.$is_url=void 0;var Tb=function(n){return vb.test(n)};Cu.$is_url=Tb;var vb=/^[a-zA-Z0-9]+:\/\/(?:www.)?[-a-zA-Z0-9@:%._+~#=]{1,256}.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/});var Dm=ae(Iu=>{"use strict";Object.defineProperty(Iu,"__esModule",{value:!0});Iu.$is_uuid=void 0;var wb=function(n){return _b.test(n)};Iu.$is_uuid=wb;var _b=/^(?:[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 Om=ae(Su=>{"use strict";Object.defineProperty(Su,"__esModule",{value:!0});Su.$join=void 0;var kb=function(n){return Ab(n)?".".concat(n):"[".concat(JSON.stringify(n),"]")};Su.$join=kb;var Ab=function(n){return Eb(n)===!1&&/^[a-zA-Z_$][a-zA-Z_$0-9]*$/g.test(n)},Eb=function(n){return Mb.has(n)},Mb=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=ae(Ru=>{"use strict";Object.defineProperty(Ru,"__esModule",{value:!0});Ru.$number=void 0;var Cb=Us(),Ib=function(n){if(isFinite(n)===!1)throw new Cb.TypeGuardError({method:"typia.stringify",expected:"number",value:n,message:"Error on typia.stringify(): infinite or not a number."});return n};Ru.$number=Ib});var Fm=ae(Pu=>{"use strict";Object.defineProperty(Pu,"__esModule",{value:!0});Pu.$report=void 0;var Sb=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}};Pu.$report=Sb});var Lm=ae(Nu=>{"use strict";Object.defineProperty(Nu,"__esModule",{value:!0});Nu.$rest=void 0;var Rb=function(n){return n.length===2?"":","+n.substring(1,n.length-1)};Nu.$rest=Rb});var Um=ae(Du=>{"use strict";Object.defineProperty(Du,"__esModule",{value:!0});Du.$string=void 0;var Pb=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,'"')};Du.$string=Pb});var Vm=ae(Ou=>{"use strict";Object.defineProperty(Ou,"__esModule",{value:!0});Ou.$tail=void 0;var Nb=function(n){return n[n.length-1]===","?n.substring(0,n.length-1):n};Ou.$tail=Nb});var Gm=ae(Ci=>{"use strict";var Vt=Ci&&Ci.__assign||function(){return Vt=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 Vt(Vt({},n.is()),{number:Kb.$number,string:$b.$string,tail:Qb.$tail,rest:Jb.$rest,throws:e(t)})},n.clone=function(t){return Vt(Vt({},n.is()),{throws:e(t),any:Db.$any})},n.prune=function(t){return Vt(Vt({},n.is()),{throws:e(t)})},n.random=function(){return{generator:jm.RandomGenerator,pick:jm.RandomGenerator.pick}};var e=function(t){return function(a){throw new Hm.TypeGuardError(Vt(Vt({},a),{method:"typia.".concat(t)}))}}})(Xb=Ci.Namespace||(Ci.Namespace={}))});var zm=ae(Vs=>{"use strict";Object.defineProperty(Vs,"__esModule",{value:!0});Vs.MapUtil=void 0;var Yb;(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}}})(Yb=Vs.MapUtil||(Vs.MapUtil={}))});var Wm=ae(Km=>{"use strict";Object.defineProperty(Km,"__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 t6=ae(e6=>{"use strict";Object.defineProperty(e6,"__esModule",{value:!0})});var a6=ae(n6=>{"use strict";Object.defineProperty(n6,"__esModule",{value:!0})});var mp=ae(z=>{"use strict";var Zb=z&&z.__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]}),Ii=z&&z.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Zb(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 Dr=Zl(),Me=Gm(),e1=zm();Ii(Wm(),z);Ii($m(),z);Ii(Xm(),z);Ii(Zm(),z);Ii(t6(),z);Ii(a6(),z);Ii(Us(),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 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 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(n){var e,t;return n?(t=(e=Dr.$dictionary.get(n))===null||e===void 0?void 0:e.size)!==null&&t!==void 0?t:0:Dr.$dictionary.size},has:function(n){return function(e){var t,a;return(a=(t=Dr.$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=Dr.$dictionary.get(n))===null||t===void 0?void 0:t.get(e)}},insert:function(n){return function(e){return function(t){var a=e1.MapUtil.take(Dr.$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=Dr.$dictionary.get(n))===null||t===void 0?void 0:t.delete(e))!==null&&a!==void 0?a:!1}}};function t1(){re("application")}z.application=t1;function up(){re("assertParse")}z.assertParse=up;Object.assign(up,Me.Namespace.assert("assertParse"));function dp(){re("isParse")}z.isParse=dp;Object.assign(dp,Bu);function lp(){re("validateParse")}z.validateParse=lp;Object.assign(lp,Fu);function pp(){re("stringify")}z.stringify=pp;Object.assign(pp,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 n1(){re("metadata")}z.metadata=n1;function yp(){re("random")}z.random=yp;Object.assign(yp,Me.Namespace.random());function a1(){re("literals")}z.literals=a1;function fp(){re("clone")}z.clone=fp;Object.assign(fp,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 cp(){re("prune")}z.prune=cp;Object.assign(cp,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 Ku(){re("validatePrune")}z.validatePrune=Ku;Object.assign(Ku,Me.Namespace.prune("validatePrune"));Object.assign(Ku,Me.Namespace.validate());function i6(){re("createAssert")}z.createAssert=i6;Object.assign(i6,ap);function r6(){re("createAssertType")}z.createAssertType=r6;Object.assign(r6,ip);function s6(){re("createIs")}z.createIs=s6;Object.assign(s6,Bu);function o6(){re("createValidate")}z.createValidate=o6;Object.assign(o6,Fu);function u6(){re("createAssertEquals")}z.createAssertEquals=u6;Object.assign(u6,rp);function d6(){re("createEquals")}z.createEquals=d6;Object.assign(d6,sp);function l6(){re("createValidateEquals")}z.createValidateEquals=l6;Object.assign(l6,op);function p6(){re("createIsParse")}z.createIsParse=p6;Object.assign(p6,dp);function y6(){re("createAssertParse")}z.createAssertParse=y6;Object.assign(y6,up);function f6(){re("createValidateParse")}z.createValidateParse=f6;Object.assign(f6,lp);function c6(){re("createStringify")}z.createStringify=c6;Object.assign(c6,pp);function m6(){re("createAssertStringify")}z.createAssertStringify=m6;Object.assign(m6,Lu);function h6(){re("createIsStringify")}z.createIsStringify=h6;Object.assign(h6,Uu);function x6(){re("createValidateStringify")}z.createValidateStringify=x6;Object.assign(x6,Vu);function b6(){re("createRandom")}z.createRandom=b6;Object.assign(b6,yp);function g6(){re("createClone")}z.createClone=g6;Object.assign(g6,fp);function T6(){re("createAssertClone")}z.createAssertClone=T6;Object.assign(T6,ju);function v6(){re("createIsClone")}z.createIsClone=v6;Object.assign(v6,Hu);function w6(){re("createValidateClone")}z.createValidateClone=w6;Object.assign(w6,qu);function _6(){re("createPrune")}z.createPrune=_6;Object.assign(_6,cp);function k6(){re("createAssertPrune")}z.createAssertPrune=k6;Object.assign(k6,Gu);function A6(){re("createIsPrune")}z.createIsPrune=A6;Object.assign(A6,zu);function E6(){re("createValidatePrune")}z.createValidatePrune=E6;Object.assign(E6,Ku);function re(n){throw new Error("Error on typia.".concat(n,'(): no transform has been configured. Run "npx typia setup" command.'))}});var C6=ae(gn=>{"use strict";var M6=gn&&gn.__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]}),i1=gn&&gn.__setModuleDefault||(Object.create?function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}:function(n,e){n.default=e}),r1=gn&&gn.__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)&&M6(e,n,t);return i1(e,n),e},s1=gn&&gn.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&M6(e,n,t)};Object.defineProperty(gn,"__esModule",{value:!0});var o1=r1(mp());gn.default=o1;s1(mp(),gn)});var Ul={};Gi(Ul,{BaseContract:()=>fr,BigNumber:()=>F,Contract:()=>oe,ContractFactory:()=>hi,FixedNumber:()=>ft,Signer:()=>St,VoidSigner:()=>da,Wallet:()=>In,Wordlist:()=>hn,constants:()=>ht,errors:()=>Kt,getDefaultProvider:()=>su,logger:()=>Rc,providers:()=>ta,utils:()=>te,version:()=>uu,wordlists:()=>bi});var sy=_n(fd());var $p="logger/5.7.0";var Qp=!1,Xp=!1,Qs={debug:1,default:2,info:2,warning:3,error:4,off:5},Yp=Qs.default,cd=null;function $6(){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 Zp=$6(),md;(function(n){n.DEBUG="DEBUG",n.INFO="INFO",n.WARNING="WARNING",n.ERROR="ERROR",n.OFF="OFF"})(md||(md={}));var Kt;(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"})(Kt||(Kt={}));var ey="0123456789abcdef",E=class{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){let a=e.toLowerCase();Qs[a]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(Yp>Qs[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(Xp)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 f="";for(let x=0;x>4],f+=ey[p[x]&15];i.push(l+"=Uint8Array(0x"+f+")")}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 Kt.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 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+" ]"),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"),Zp&&this.throwError("platform missing String.prototype.normalize",E.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:Zp})}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 cd||(cd=new E($p)),cd}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",E.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),Qp){if(!e)return;this.globalLogger().throwError("error censorship permanent",E.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}Xp=!!e,Qp=!!t}static setLogLevel(e){let t=Qs[e.toLowerCase()];if(t==null){E.globalLogger().warn("invalid log level - "+e);return}Yp=t}static from(e){return new E(e)}};E.errors=Kt;E.levels=md;var ty="bytes/5.7.0";var wt=new E(ty);function ay(n){return!!n.toHexString}function zi(n){return n.slice||(n.slice=function(){let e=Array.prototype.slice.call(arguments);return zi(new Uint8Array(Array.prototype.slice.apply(n,e)))}),n}function ia(n){return ie(n)&&!(n.length%2)||on(n)}function ny(n){return typeof n=="number"&&n==n&&n%1===0}function on(n){if(n==null)return!1;if(n.constructor===Uint8Array)return!0;if(typeof n=="string"||!ny(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"){wt.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),zi(new Uint8Array(t))}if(e.allowMissingPrefix&&typeof n=="string"&&n.substring(0,2)!=="0x"&&(n="0x"+n),ay(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":wt.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),zi(a)}function Zt(n){let e=j(n);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(n,e-n.length),zi(t)}function ie(n,e){return!(typeof n!="string"||!n.match(/^0x[0-9A-Fa-f]*$/)||e&&n.length!==2+2*e)}var hd="0123456789abcdef";function K(n,e){if(e||(e={}),typeof n=="number"){wt.checkSafeUint53(n,"invalid hexlify value");let t="";for(;n;)t=hd[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),ay(n))return n.toHexString();if(ie(n))return n.length%2&&(e.hexPad==="left"?n="0x0"+n.substring(2):e.hexPad==="right"?n+="0":wt.throwArgumentError("hex data is odd-length","value",n)),n.toLowerCase();if(on(n)){let t="0x";for(let a=0;a>4]+hd[i&15]}return t}return wt.throwArgumentError("invalid hexlify value","value",n)}function Nt(n){if(typeof n!="string")n=K(n);else if(!ie(n)||n.length%2)return null;return(n.length-2)/2}function Ce(n,e,t){return typeof n!="string"?n=K(n):(!ie(n)||n.length%2)&&wt.throwArgumentError("invalid hexData","value",n),e=2+2*e,t!=null?"0x"+n.substring(e,2+2*t):"0x"+n.substring(e)}function _t(n){let e="0x";return n.forEach(t=>{e+=K(t).substring(2)}),e}function Un(n){let e=xd(K(n,{hexPad:"left"}));return e==="0x"?"0x0":e}function xd(n){typeof n!="string"&&(n=K(n)),ie(n)||wt.throwArgumentError("invalid hex string","value",n),n=n.substring(2);let e=0;for(;e2*e+2&&wt.throwArgumentError("value out of range","value",arguments[1]);n.length<2*e+2;)n="0x0"+n.substring(2);return n}function Vn(n){let e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(ia(n)){let t=j(n);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]):wt.throwArgumentError("invalid signature string","signature",n),e.v<27&&(e.v===0||e.v===1?e.v+=27:wt.throwArgumentError("signature invalid v byte","signature",n)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(t[32]|=128),e._vs=K(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=si(j(e._vs),32);e._vs=K(i);let r=i[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=r:e.recoveryParam!==r&&wt.throwArgumentError("signature recoveryParam mismatch _vs","signature",n),i[0]&=127;let s=K(i);e.s==null?e.s=s:e.s!==s&&wt.throwArgumentError("signature v mismatch _vs","signature",n)}if(e.recoveryParam==null)e.v==null?wt.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&&wt.throwArgumentError("signature recoveryParam mismatch v","signature",n)}e.r==null||!ie(e.r)?wt.throwArgumentError("signature missing or invalid r","signature",n):e.r=me(e.r,32),e.s==null||!ie(e.s)?wt.throwArgumentError("signature missing or invalid s","signature",n):e.s=me(e.s,32);let t=j(e.s);t[0]>=128&&wt.throwArgumentError("signature s out of range","signature",n),e.recoveryParam&&(t[0]|=128);let a=K(t);e._vs&&(ie(e._vs)||wt.throwArgumentError("signature invalid _vs","signature",n),e._vs=me(e._vs,32)),e._vs==null?e._vs=a:e._vs!==a&&wt.throwArgumentError("signature _vs mismatch v and s","signature",n)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function Vr(n){return n=Vn(n),K(ye([n.r,n.s,n.recoveryParam?"0x1c":"0x1b"]))}var Xs="bignumber/5.7.0";var jr=sy.default.BN,ra=new E(Xs),bd={},iy=9007199254740991;function oy(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"||on(n))}var ry=!1,F=class{constructor(e,t){e!==bd&&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 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 ra.throwError("this platform does not support BigInt",E.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?ry||(ry=!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(bd,Hr(e)):e.match(/^-?[0-9]+$/)?new F(bd,Hr(new jr(e))):ra.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&un("underflow","BigNumber.from",e),(e>=iy||e<=-iy)&&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 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 ra.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}};function Hr(n){if(typeof n!="string")return Hr(n.toString(16));if(n[0]==="-")return n=n.substring(1),n[0]==="-"&&ra.throwArgumentError("invalid hex","value",n),n=Hr(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 Wt(n){return F.from(Hr(n))}function be(n){let e=F.from(n).toHexString();return e[0]==="-"?new jr("-"+e.substring(3),16):new jr(e.substring(2),16)}function un(n,e,t){let a={fault:n,operation:e};return t!=null&&(a.value=t),ra.throwError(n,E.errors.NUMERIC_FAULT,a)}function gd(n){return new jr(n,36).toString(16)}function Td(n){return new jr(n,16).toString(36)}var jt=new E(Xs),qr={},dy=F.from(0),ly=F.from(-1);function py(n,e,t,a){let i={fault:e,operation:t};return a!==void 0&&(i.value=a),jt.throwError(n,E.errors.NUMERIC_FAULT,i)}var Gr="0";for(;Gr.length<256;)Gr+=Gr;function vd(n){if(typeof n!="number")try{n=F.from(n).toNumber()}catch{}return typeof n=="number"&&n>=0&&n<=256&&!(n%1)?"1"+Gr.substring(0,n):jt.throwArgumentError("invalid decimal size","decimals",n)}function Ki(n,e){e==null&&(e=0);let t=vd(e);n=F.from(n);let a=n.lt(dy);a&&(n=n.mul(ly));let i=n.mod(t).toString();for(;i.length2&&jt.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&&py("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),a=r("width","number",a),i=r("decimals","number",i)}return a%8&&jt.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",a),i>80&&jt.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new sa(qr,t,a,i)}},ft=class{constructor(e,t,a,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=a,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),a=dn(e._value,e.format.decimals);return ft.fromValue(t.add(a),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),a=dn(e._value,e.format.decimals);return ft.fromValue(t.sub(a),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),a=dn(e._value,e.format.decimals);return ft.fromValue(t.mul(a).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),a=dn(e._value,e.format.decimals);return ft.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=ft.from(e[0],this.format),a=!e[1].match(/^(0*)$/);return this.isNegative()&&a&&(t=t.subUnsafe(uy.toFormat(t.format))),t}ceiling(){let e=this.toString().split(".");e.length===1&&e.push("0");let t=ft.from(e[0],this.format),a=!e[1].match(/^(0*)$/);return!this.isNegative()&&a&&(t=t.addUnsafe(uy.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 a=ft.from("1"+Gr.substring(0,e),this.format),i=Q6.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&&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,a){return a==null&&t!=null&&!oy(t)&&(a=t,t=null),t==null&&(t=0),a==null&&(a="fixed"),ft.fromString(Ki(e,t),sa.from(a))}static fromString(e,t){t==null&&(t="fixed");let a=sa.from(t),i=dn(e,a.decimals);!a.signed&&i.lt(dy)&&py("unsigned value cannot be negative","overflow","value",e);let r=null;a.signed?r=i.toTwos(a.width).toHexString():(r=i.toHexString(),r=me(r,a.width/8));let s=Ki(i,a.decimals);return new ft(qr,r,s,a)}static fromBytes(e,t){t==null&&(t="fixed");let a=sa.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=Ki(i,a.decimals);return new ft(qr,r,s,a)}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(a){if(a.code!==E.errors.INVALID_ARGUMENT)throw a}return jt.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}},uy=ft.from(1),Q6=ft.from("0.5");var yy="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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Ys=new E(yy);function B(n,e,t){Object.defineProperty(n,e,{enumerable:!0,value:t,writable:!1})}function mt(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 Ie(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 Wi(n,e){(!n||typeof n!="object")&&Ys.throwArgumentError("invalid object","object",n),Object.keys(n).forEach(t=>{e[t]||Ys.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 Y6={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function fy(n){if(n==null||Y6[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;tct(e)));if(typeof n=="object"){let e={};for(let t in n){let a=n[t];a!==void 0&&B(e,t,ct(a))}return e}return Ys.throwArgumentError(`Cannot deepCopy ${typeof n}`,"object",n)}function ct(n){return Z6(n)}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={},cy={calldata:!0,memory:!0,storage:!0},e2={calldata:!0,memory:!0};function Zs(n,e){if(n==="bytes"||n==="string"){if(cy[e])return!0}else if(n==="address"){if(e==="payable")return!0}else if((n.indexOf("[")>=0||n==="tuple")&&e2[e])return!0;return(cy[e]||e==="payable")&&Te.throwArgumentError("invalid modifier","name",e),!1}function t2(n,e){let t=n;function a(o){Te.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!==ge.sighash&&(t+=this.type),t+="("+this.components.map(a=>a.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:Ji(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(pt.fromObject):null})}static fromString(e,t){function a(i){return pt.fromObject({name:i.name,type:i.type,indexed:i.indexed,components:i.components})}return a(t2(e,!!t))}static isParamType(e){return!!(e!=null&&e._isParamType)}};function zr(n,e){return i2(n).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(a=>JSON.parse(a.format(e)))});let t="";return e!==ge.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map(a=>a.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(Wr);t||Te.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:Te.warn("unknown modifier: "+i)}}),Ht.fromObject({name:t[1].trim(),anonymous:a,inputs:zr(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}};function hy(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 xy(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 by(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 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(a=>JSON.parse(a.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(a=>a.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=by(e);t.constant&&Te.throwArgumentError("constructor cannot be constant","value",e);let a={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,a)}static fromString(e){let t={type:"constructor"};e=hy(e,t);let a=e.match(Wr);return(!a||a[1].trim()!=="constructor")&&Te.throwArgumentError("invalid constructor string","value",e),t.inputs=zr(a[2].trim(),!1),xy(a[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(a=>JSON.parse(a.format(e))),outputs:this.outputs.map(a=>JSON.parse(a.format(e)))});let t="";return e!==ge.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map(a=>a.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(a=>a.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=by(e),a={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,a)}static fromString(e){let t={type:"function"};e=hy(e,t);let a=e.split(" returns ");a.length>2&&Te.throwArgumentError("invalid function string","value",e);let i=a[0].match(Wr);if(i||Te.throwArgumentError("invalid function signature","value",e),t.name=i[1].trim(),t.name&&Kr(t.name),t.inputs=zr(i[2],!1),xy(i[3].trim(),t),a.length>1){let r=a[1].match(Wr);(r[1].trim()!=""||r[3].trim()!="")&&Te.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 my(n){let e=n.format();return(e==="Error(string)"||e==="Panic(uint256)")&&Te.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",n),n}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(a=>JSON.parse(a.format(e)))});let t="";return e!==ge.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map(a=>a.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 my(new tn(oi,t))}static fromString(e){let t={type:"error"},a=e.match(Wr);return a||Te.throwArgumentError("invalid error signature","value",e),t.name=a[1].trim(),t.name&&Kr(t.name),t.inputs=zr(a[2],!1),my(tn.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}};function Ji(n){return n.match(/^uint($|[^1-9])/)?n="uint256"+n.substring(4):n.match(/^int($|[^1-9])/)&&(n="int256"+n.substring(3)),n}var a2=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function Kr(n){return(!n||!n.match(a2))&&Te.throwArgumentError(`invalid identifier "${n}"`,"value",n),n}var Wr=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function i2(n){n=n.trim();let e=[],t="",a=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)}}},di=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 K(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):di.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: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 di(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 Ty=_n(gy());function fe(n){return"0x"+Ty.default.keccak_256(j(n))}var no={};Gi(no,{decode:()=>Jr,encode:()=>oa});var vy="rlp/5.7.0";var Hn=new E(vy);function wy(n){let e=[];for(;n;)e.unshift(n&255),n>>=8;return e}function _y(n,e,t){let a=0;for(let i=0;ie+1+a&&Hn.throwError("child data too short",E.errors.BUFFER_OVERRUN,{})}return{consumed:1+a,result:i}}function Ey(n,e){if(n.length===0&&Hn.throwError("data too short",E.errors.BUFFER_OVERRUN,{}),n[e]>=248){let t=n[e]-247;e+1+t>n.length&&Hn.throwError("data short segment too short",E.errors.BUFFER_OVERRUN,{});let a=_y(n,e+1,t);return e+1+t+a>n.length&&Hn.throwError("data long segment too short",E.errors.BUFFER_OVERRUN,{}),ky(n,e,e+1+t,t+a)}else if(n[e]>=192){let t=n[e]-192;return e+1+t>n.length&&Hn.throwError("data array too short",E.errors.BUFFER_OVERRUN,{}),ky(n,e,e+1,t)}else if(n[e]>=184){let t=n[e]-183;e+1+t>n.length&&Hn.throwError("data array too short",E.errors.BUFFER_OVERRUN,{});let a=_y(n,e+1,t);e+1+t+a>n.length&&Hn.throwError("data array too short",E.errors.BUFFER_OVERRUN,{});let i=K(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&&Hn.throwError("data too short",E.errors.BUFFER_OVERRUN,{});let a=K(n.slice(e+1,e+1+t));return{consumed:1+t,result:a}}return{consumed:1,result:K(n[e])}}function Jr(n){let e=j(n),t=Ey(e,0);return t.consumed!==e.length&&Hn.throwArgumentError("invalid rlp data","data",n),t.result}var My="address/5.7.0";var Ma=new E(My);function Cy(n){ie(n,20)||Ma.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 r2=9007199254740991;function s2(n){return Math.log10?Math.log10(n):Math.log(n)/Math.LN10}var _d={};for(let n=0;n<10;n++)_d[String(n)]=String(n);for(let n=0;n<26;n++)_d[String.fromCharCode(65+n)]=String(10+n);var Iy=Math.floor(s2(r2));function Sy(n){n=n.toUpperCase(),n=n.substring(4)+n.substring(0,2)+"00";let e=n.split("").map(a=>_d[a]).join("");for(;e.length>=Iy;){let a=e.substring(0,Iy);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 ce(n){let e=null;if(typeof n!="string"&&Ma.throwArgumentError("invalid address","address",n),n.match(/^(0x)?[0-9a-fA-F]{40}$/))n.substring(0,2)!=="0x"&&(n="0x"+n),e=Cy(n),n.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==n&&Ma.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)!==Sy(n)&&Ma.throwArgumentError("bad icap checksum","address",n),e=gd(n.substring(4));e.length<40;)e="0"+e;e=Cy("0x"+e)}else Ma.throwArgumentError("invalid address","address",n);return e}function Ry(n){try{return ce(n),!0}catch{}return!1}function Py(n){let e=Td(ce(n).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+Sy("XE00"+e)+e}function li(n){let e=null;try{e=ce(n.from)}catch{Ma.throwArgumentError("missing from address","transaction",n)}let t=Zt(j(F.from(n.nonce).toHexString()));return ce(Ce(fe(oa([e,t])),12))}function Ny(n,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(Ce(fe(ye(["0xff",ce(n),e,t])),12))}var ao=class extends kt{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=ce(t)}catch(a){this._throwError(a.message,t)}return e.writeValue(t)}decode(e){return ce(me(e.readValue().toHexString(),20))}};var io=class extends kt{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 kd(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 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!==a.length&&Qi.throwArgumentError("types/value length mismatch","tuple",t);let i=new ui(n.wordSize),r=new ui(n.wordSize),s=[];e.forEach((l,p)=>{let f=a[p];if(l.dynamic){let x=r.length;l.encode(r,f);let I=i.writeUpdatableValue();s.push(_=>{I(_+x)})}else l.encode(i,f)}),s.forEach(l=>{l(i.length)});let o=n.appendWriter(i);return o+=n.appendWriter(r),o}function Ad(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 ro=class extends kt{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&&Qi.throwError("insufficient data length",E.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let a=[];for(let i=0;ipo,EtherSymbol:()=>Ly,HashZero:()=>Yi,MaxInt256:()=>Fy,MaxUint256:()=>co,MinInt256:()=>By,NegativeOne:()=>yo,One:()=>fo,Two:()=>Dy,WeiPerEther:()=>Oy,Zero:()=>Xi});var po="0x0000000000000000000000000000000000000000";var yo=F.from(-1),Xi=F.from(0),fo=F.from(1),Dy=F.from(2),Oy=F.from("1000000000000000000"),co=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),By=F.from("-0x8000000000000000000000000000000000000000000000000000000000000000"),Fy=F.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");var Yi="0x0000000000000000000000000000000000000000000000000000000000000000";var Ly="\u039E";var mo=class extends kt{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=co.mask(e.wordSize*8);if(this.signed){let r=i.mask(this.size*8-1);(a.gt(r)||a.lt(r.add(fo).mul(yo)))&&this._throwError("value out-of-bounds",t)}else(a.lt(Xi)||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 Uy="strings/5.7.0";var Vy=new E(Uy),Gt;(function(n){n.current="",n.NFC="NFC",n.NFD="NFD",n.NFKC="NFKC",n.NFKD="NFKD"})(Gt||(Gt={}));var Bt;(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"})(Bt||(Bt={}));function o2(n,e,t,a,i){return Vy.throwArgumentError(`invalid codepoint at offset ${e}; ${n}`,"bytes",t)}function jy(n,e,t,a,i){if(n===Bt.BAD_PREFIX||n===Bt.UNEXPECTED_CONTINUE){let r=0;for(let s=e+1;s>6===2;s++)r++;return r}return n===Bt.OVERRUN?t.length-e-1:0}function u2(n,e,t,a,i){return n===Bt.OVERLONG?(a.push(i),0):(a.push(65533),jy(n,e,t,a,i))}var ho=Object.freeze({error:o2,ignore:jy,replace:u2});function Md(n,e){e==null&&(e=ho.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(Bt.UNEXPECTED_CONTINUE,a-1,n,t):a+=e(Bt.BAD_PREFIX,a-1,n,t);continue}if(a-1+r>=n.length){a+=e(Bt.OVERRUN,a-1,n,t);continue}let o=i&(1<<8-r-1)-1;for(let l=0;l1114111){a+=e(Bt.OUT_OF_RANGE,a-1-r,n,t,o);continue}if(o>=55296&&o<=57343){a+=e(Bt.UTF16_SURROGATE,a-1-r,n,t,o);continue}if(o<=s){a+=e(Bt.OVERLONG,a-1-r,n,t,o);continue}t.push(o)}}return t}function ve(n,e=Gt.current){e!=Gt.current&&(Vy.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 Ed(n){let e="0000"+n.toString(16);return"\\u"+e.substring(e.length-4)}function Cd(n,e){return'"'+Md(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?Ed(t):(t-=65536,Ed((t>>10&1023)+55296)+Ed((t&1023)+56320))}).join("")+'"'}function xo(n){return n.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function Jt(n,e){return xo(Md(n,e))}function Ca(n,e=Gt.current){return Md(ve(n,e))}function Id(n){let e=ve(n);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return K(ye([e,Yi]).slice(0,32))}function Sd(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 Jt(e.slice(0,t))}function d2(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 Hy(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 Pd(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 l2=Hy("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"),p2="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(n=>parseInt(n,16)),y2=[{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}],f2=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"),c2=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"),m2=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",d2),h2=Hy("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 x2(n){return n.reduce((e,t)=>(t.forEach(a=>{e.push(a)}),e),[])}function b2(n){return!!Pd(n,l2)}function g2(n){let e=Pd(n,y2);if(e)return[n+e.s];let t=f2[n];if(t)return t;let a=c2[n];if(a)return[n+a[0]];let i=m2[n];return i||null}function T2(n){return!!Pd(n,h2)}function Nd(n){if(n.match(/^[a-z0-9-]*$/i)&&n.length<=59)return n.toLowerCase();let e=Ca(n);e=x2(e.map(a=>{if(p2.indexOf(a)>=0)return[];if(a>=65024&&a<=65039)return[];let i=g2(a);return i||[a]})),e=Ca(xo(e),Gt.NFKC),e.forEach(a=>{if(T2(a))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(a=>{if(b2(a))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 $r{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 kt{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 kd(e,this.coders,t)}decode(e){return e.coerce(this.name,Ad(e,this.coders))}};var go=new E(jn),v2=new RegExp(/^bytes([0-9]*)$/),w2=new RegExp(/^(u?int)([0-9]*)$/),Zi=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(a=>this._getCoder(a)),e.name);case"":return new lo(e.name)}let t=e.type.match(w2);if(t){let a=parseInt(t[2]||"256");return(a===0||a>256||a%8!==0)&&go.throwArgumentError("invalid "+t[1]+" bit length","param",e),new mo(a/8,t[1]==="int",e.name)}if(t=e.type.match(v2),t){let a=parseInt(t[1]);return(a===0||a>32)&&go.throwArgumentError("invalid bytes length","param",e),new uo(a,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 a=e.map(s=>this._getCoder(pt.from(s))),i=new pi(a,"_"),r=this._getWriter();return i.encode(r,t),r.data}decode(e,t,a){let i=e.map(s=>this._getCoder(pt.from(s)));return new pi(i,"_").decode(this._getReader(j(t),a))}},Qr=new Zi;function nn(n){return fe(ve(n))}var To="hash/5.7.0";var Dd={};Gi(Dd,{decode:()=>er,encode:()=>tr});function er(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 _2(n){let e={};for(let t=0;t>--l&1}let x=31,I=Math.pow(2,x),_=I>>>1,v=_>>1,S=I-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=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 A2(n){let e=0;return()=>n[e++]}function zy(n){return A2(k2(n))}function E2(n){return n&1?~n>>1:n>>1}function M2(n,e){let t=Array(n);for(let a=0;ae[s]):t}function Ky(n){let e=[];for(;;){let t=n();if(t==0)break;e.push(S2(t,n))}for(;;){let t=n()-1;if(t<0)break;e.push(R2(t,n))}return _2(Gy(e))}function I2(n){let e=[];for(;;){let t=n();if(t==0)break;e.push(t)}return e}function Wy(n,e,t){let a=Array(n).fill(void 0).map(()=>[]);for(let i=0;ia[s].push(r));return a}function S2(n,e){let t=1+e(),a=e(),i=I2(e),r=Wy(i.length,1+n,e);return Gy(r.map((s,o)=>{let l=s[0],p=s.slice(1);return Array(i[o]).fill(void 0).map((f,x)=>{let I=x*a;return[l+x*t,p.map(_=>_+I)]})}))}function R2(n,e){let t=1+e();return Wy(t,1+n,e).map(i=>[i[0],i.slice(1)])}function Jy(n){let e=Xr(n).sort((a,i)=>a-i);return t();function t(){let a=[];for(;;){let p=Xr(n,e);if(p.length==0)break;a.push({set:new Set(p),node:t()})}a.sort((p,f)=>f.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 $y(){return zy(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 vo=$y(),P2=new Set(Xr(vo)),N2=new Set(Xr(vo)),D2=Ky(vo),O2=Jy(vo),Qy=45,Xy=95;function Yy(n){return Ca(n)}function B2(n){return n.filter(e=>e!=65039)}function Zy(n){for(let e of n.split(".")){let t=Yy(e);try{for(let a=t.lastIndexOf(Xy)-1;a>=0;a--)if(t[a]!==Xy)throw new Error("underscore only allowed at start");if(t.length>=4&&t.every(a=>a<128)&&t[2]===Qy&&t[3]===Qy)throw new Error("invalid label extension")}catch(a){throw new Error(`Invalid label "${e}": ${a.message}`)}}return n}function e0(n){return Zy(F2(n,B2))}function F2(n,e){let t=Yy(n).reverse(),a=[];for(;t.length;){let i=U2(t);if(i){a.push(...e(i));continue}let r=t.pop();if(P2.has(r)){a.push(r);continue}if(N2.has(r))continue;let s=D2[r];if(s){a.push(...s);continue}throw new Error(`Disallowed codepoint: 0x${r.toString(16).toUpperCase()}`)}return Zy(L2(String.fromCodePoint(...a)))}function L2(n){return n.normalize("NFC")}function U2(n,e){var t;let a=O2,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 V2=new E(To),n0=new Uint8Array(32);n0.fill(0);function t0(n){if(n.length===0)throw new Error("invalid ENS name; empty component");return n}function Od(n){let e=ve(e0(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(t0(e.slice(a))),t}function Bd(n){try{return Od(n).length!==0}catch{}return!1}function Ia(n){typeof n!="string"&&V2.throwArgumentError("invalid ENS name; not a string","name",n);let e=n0,t=Od(n);for(;t.length;)e=fe(ye([e,fe(t.pop())]));return K(e)}function Yr(n){return K(ye(Od(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 a0=`Ethereum Signed Message: +`;function nr(n){return typeof n=="string"&&(n=ve(n)),fe(ye([ve(a0),ve(String(n.length)),n]))}var j2=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},xt=new E(To),o0=new Uint8Array(32);o0.fill(0);var H2=F.from(-1),u0=F.from(0),d0=F.from(1),q2=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function G2(n){let e=j(n),t=e.length%32;return t?_t([e,o0.slice(t)]):K(e)}var z2=me(d0.toHexString(),32),K2=me(u0.toHexString(),32),i0={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Fd=["name","version","chainId","verifyingContract","salt"];function r0(n){return function(e){return typeof e!="string"&&xt.throwArgumentError(`invalid domain value for ${JSON.stringify(n)}`,`domain.${n}`,e),e}}var W2={name:r0("name"),version:r0("version"),chainId:function(n){try{return F.from(n).toString()}catch{}return xt.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",n)},verifyingContract:function(n){try{return ce(n).toLowerCase()}catch{}return xt.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 K(e)}catch{}return xt.throwArgumentError('invalid domain value "salt"',"domain.salt",n)}};function Ld(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))&&xt.throwArgumentError("invalid numeric width","type",n);let i=q2.mask(t?a-1:a),r=t?i.add(d0).mul(H2):u0;return function(s){let o=F.from(s);return(o.lt(r)||o.gt(i))&&xt.throwArgumentError(`value out-of-bounds for ${n}`,"value",s),me(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))&&xt.throwArgumentError("invalid bytes width","type",n),function(a){return j(a).length!==t&&xt.throwArgumentError(`invalid length for ${n}`,"value",a),G2(a)}}}switch(n){case"address":return function(e){return me(ce(e),32)};case"bool":return function(e){return e?z2:K2};case"bytes":return function(e){return fe(e)};case"string":return function(e){return nn(e)}}return null}function s0(n,e){return`${n}(${e.map(({name:t,type:a})=>a+" "+t).join(",")})`}var bt=class{constructor(e){B(this,"types",Object.freeze(ct(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]&&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),!Ld(f)&&(a[f]||xt.throwArgumentError(`unknown type ${JSON.stringify(f)}`,"types",e),a[f].push(o),t[o][f]=!0)})}let r=Object.keys(a).filter(o=>a[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=>{!a[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]=s0(o,e[o])+l.map(p=>s0(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&&xt.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",o);let l=o.map(r);return this._types[i]&&(l=l.map(fe)),fe(_t(l))}}let a=this.types[e];if(a){let i=nn(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),_t(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,a){if(Ld(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&&xt.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),{}):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,a){return bt.from(t).hashStruct(e,a)}static hashDomain(e){let t=[];for(let a in e){let i=i0[a];i||xt.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(a)}`,"domain",e),t.push({name:a,type:i})}return t.sort((a,i)=>Fd.indexOf(a.name)-Fd.indexOf(i.name)),bt.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,a){return _t(["0x1901",bt.hashDomain(e),bt.from(t).hash(a)])}static hash(e,t,a){return fe(bt.encode(e,t,a))}static resolveNames(e,t,a,i){return j2(this,void 0,void 0,function*(){e=we(e);let r={};e.verifyingContract&&!ie(e.verifyingContract,20)&&(r[e.verifyingContract]="0x");let s=bt.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){bt.hashDomain(e);let i={},r=[];Fd.forEach(l=>{let p=e[l];p!=null&&(i[l]=W2[l](p),r.push({name:l,type:i0[l]}))});let s=bt.from(t),o=we(t);return o.EIP712Domain?xt.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 K(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 ar=class extends en{},ir=class extends en{},Ud=class extends en{},ua=class extends en{static isIndexed(e){return!!(e&&e._isIndexed)}},J2={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function l0(n,e){let t=new Error(`deferred error during ABI decoding triggered accessing ${n}`);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(a=>qt.from(a)).filter(a=>a!=null)),B(this,"_abiCoder",mt(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){gt.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]){gt.warn("duplicate definition - "+r);return}i[r]=a}),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(a=>a.format(e));return e===ge.json?JSON.stringify(t.map(a=>JSON.parse(a))):t}static getAbiCoder(){return Qr}static getAddress(e){return ce(e)}static getSighash(e){return Ce(nn(e.format()),0,4)}static getEventTopic(e){return nn(e.format())}getFunction(e){if(ie(e)){for(let a in this.functions)if(e===this.getSighash(a))return this.functions[a];gt.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?gt.throwArgumentError("no matching function","name",a):i.length>1&>.throwArgumentError("multiple matching functions","name",a),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 a=e.toLowerCase();for(let i in this.events)if(a===this.getEventTopic(i))return this.events[i];gt.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?gt.throwArgumentError("no matching event","name",a):i.length>1&>.throwArgumentError("multiple matching events","name",a),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 a=mt(this.constructor,"getSighash");for(let i in this.errors){let r=this.errors[i];if(e===a(r))return this.errors[i]}gt.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?gt.throwArgumentError("no matching error","name",a):i.length>1&>.throwArgumentError("multiple matching errors","name",a),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 a=j(t);return K(a.slice(0,4))!==this.getSighash(e)&>.throwArgumentError(`data signature does not match error ${e.name}.`,"data",K(a)),this._decodeParams(e.inputs,a.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 a=j(t);return K(a.slice(0,4))!==this.getSighash(e)&>.throwArgumentError(`data signature does not match function ${e.name}.`,"data",K(a)),this._decodeParams(e.inputs,a.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 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=K(a.slice(0,4)),f=J2[p];if(f)s=this._abiCoder.decode(f.inputs,a.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,a.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:K(t),errorArgs:s,errorName:o,errorSignature:l,reason:i})}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&>.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"?nn(s):r.type==="bytes"?fe(K(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(K(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?a.push(null):o.baseType==="array"||o.baseType==="tuple"?gt.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&>.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(nn(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 I=this.getEventTopic(e);(!ie(a[0],32)||a[0].toLowerCase()!==I)&>.throwError("fragment/topic mismatch",E.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:I,value:a[0]}),a=a.slice(1)}let i=[],r=[],s=[];e.inputs.forEach((I,_)=>{I.indexed?I.type==="string"||I.type==="bytes"||I.baseType==="tuple"||I.baseType==="array"?(i.push(pt.fromObject({type:"bytes32",name:I.name})),s.push(!0)):(i.push(I),s.push(!1)):(r.push(I),s.push(!1))});let o=a!=null?this._abiCoder.decode(i,ye(a)):null,l=this._abiCoder.decode(r,t,!0),p=[],f=0,x=0;e.inputs.forEach((I,_)=>{if(I.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(I.name&&p[I.name]==null){let v=p[_];v instanceof Error?Object.defineProperty(p,I.name,{enumerable:!0,get:()=>{throw l0(`property ${JSON.stringify(I.name)}`,v)}}):p[I.name]=v}});for(let I=0;I{throw l0(`index ${I}`,_)}})}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=K(e),a=this.getError(t.substring(0,10).toLowerCase());return a?new Ud({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 p0="abstract-provider/5.7.0";var $2=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Q2=new E(p0),wo=class extends en{static isForkEvent(e){return!!(e&&e._isForkEvent)}};var $t=class{constructor(){Q2.checkAbstract(new.target,$t),B(this,"_isProvider",!0)}getFeeData(){return $2(this,void 0,void 0,function*(){let{block:e,gasPrice:t}=yield Ie({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 y0="abstract-signer/5.7.0";var kn=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},ln=new E(y0),X2=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],Y2=[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 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 a=yield Ie(this.checkTransaction(e));return yield this.provider.call(a,t)})}sendTransaction(e){return kn(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 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 a in e)X2.indexOf(a)===-1&&ln.throwArgumentError("invalid transaction key: "+a,"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(a=>(a[0].toLowerCase()!==a[1].toLowerCase()&&ln.throwArgumentError("from address mismatch","transaction",e),a[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 a=t.maxFeePerGas!=null||t.maxPriorityFeePerGas!=null;if(t.gasPrice!=null&&(t.type===2||a)?ln.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(t.type===0||t.type===1)&&a&&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?(a&&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(Y2.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 Ie(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,a){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new da(this.address,e)}};var pe=_n(fd()),$n=_n($d());function yr(n,e,t){return t={path:e,exports:{},require:function(a,i){return vx(a,i??t.path)}},n(t,t.exports),t.exports}function vx(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var Zd=Q0;function Q0(n,e){if(!n)throw new Error(e||"Assertion failed")}Q0.equal=function(e,t,a){if(e!=t)throw new Error(a||"Assertion failed: "+e+" != "+t)};var Cn=yr(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,I=f&255;x?l.push(x,I):l.push(I)}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(I>>1)-1?S=(I>>1)-L:S=L,_.isubn(S)):S=0,x[v]=S,_.iushrn(1)}return x}t.getNAF=a;function i(l,p){var f=[[],[]];l=l.clone(),p=p.clone();for(var x=0,I=0,_;l.cmpn(-x)>0||p.cmpn(-I)>0;){var v=l.andln(3)+x&3,S=p.andln(3)+I&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)+I&7,(_===3||_===5)&&v===2?O=-S:O=S),f[1].push(O),2*x===L+1&&(x=1-x),2*I===O+1&&(I=1-I),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,wx=an.getJSF,Co=an.assert;function Na(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 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){Co(e.precomputed);var a=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),I=r;I>0;I--){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];Co(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,a,i,r){var s=this._wnafT1,o=this._wnafT2,l=this._wnafT3,p=0,f,x,I;for(f=0;f=1;f-=2){var v=f-1,S=f;if(s[v]!==1||s[S]!==1){l[v]=Mo(a[v],s[v],this._bitLength),l[S]=Mo(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=wx(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;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?I=o[x][R-1>>1]:R<0&&(I=o[x][-R-1>>1].neg()),I.type==="affine"?J=J.mixedAdd(I):J=J.add(I))}}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 a=[this],i=this,r=0;r=0&&(_=p,v=f),x.negative&&(x=x.neg(),I=I.neg()),_.negative&&(_=_.neg(),v=v.neg()),[{a:x,b:I},{a:_,b:v}]};fn.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),f=s.mul(i.b),x=e.sub(o).sub(l),I=p.add(f).neg();return{k1:x,k2:I}};fn.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)};fn.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};fn.prototype._endoWnafMulAdd=function(e,t,a){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 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)};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,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)};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,a){var i=[this,t],r=[e,a];return this.curve.endo?this.curve._endoWnafMulAdd(i,r):this.curve._wnafMulAdd(1,i,r,2)};Mt.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)};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 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};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(n,e,t,a){fi.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}el(Pt,fi.BasePoint);fn.prototype.jpoint=function(e,t,a){return new Pt(this,e,t,a)};Pt.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)};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(),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 f=l.redSqr(),x=f.redMul(l),I=i.redMul(f),_=p.redSqr().redIAdd(x).redISub(I).redISub(I),v=p.redMul(I.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(),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(),f=p.redMul(o),x=a.redMul(p),I=l.redSqr().redIAdd(f).redISub(x).redISub(x),_=l.redMul(x.redISub(I)).redISub(r.redMul(f)),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 a=this;for(t=0;t=0)return!1;if(a.redIAdd(r),this.x.cmp(a)===0)return!0}};Pt.prototype.inspect=function(){return this.isInfinity()?"":""};Pt.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var Ao=yr(function(n,e){"use strict";var t=e;t.base=fi,t.short=kx,t.mont=null,t.edwards=null}),Eo=yr(function(n,e){"use strict";var t=e,a=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,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:$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(n){if(!(this instanceof Pa))return new Pa(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=Cn.toArray(n.entropy,n.entropyEnc||"hex"),t=Cn.toArray(n.nonce,n.nonceEnc||"hex"),a=Cn.toArray(n.pers,n.persEnc||"hex");Zd(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,t,a)}var X0=Pa;Pa.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};Pa.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=Cn.toArray(a,i||"hex"),this._update(a));for(var r=[];r.length"};var Ax=an.assert;function Io(n,e){if(n instanceof Io)return n;this._importDER(n,e)||(Ax(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 So=Io;function Ex(){this.place=0}function Qd(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 $0(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)}Io.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=$0(t),a=$0(a);!a[0]&&!(a[1]&128);)a=a.slice(1);var i=[2];Xd(i,t.length),i=i.concat(t),i.push(2),Xd(i,a.length);var r=i.concat(a),s=[48];return Xd(s,r.length),s=s.concat(r),an.encode(s,e)};var Mx=function(){throw new Error("unsupported")},Y0=an.assert;function pn(n){if(!(this instanceof pn))return new pn(n);typeof n=="string"&&(Y0(Object.prototype.hasOwnProperty.call(Eo,n),"Unknown curve "+n),n=Eo[n]),n instanceof Eo.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 Cx=pn;pn.prototype.keyPair=function(e){return new tl(this,e)};pn.prototype.keyFromPrivate=function(e,t){return tl.fromPrivate(this,e,t)};pn.prototype.keyFromPublic=function(e,t){return tl.fromPublic(this,e,t)};pn.prototype.genKeyPair=function(e){e||(e={});for(var t=new X0({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||Mx(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)}};pn.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};pn.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 X0({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 I=this.g.mul(x);if(!I.isInfinity()){var _=I.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=(I.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,a,i){e=this._truncateToN(new pe.default(e,16)),a=this.keyFromPublic(a,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,a.getPublic(),p),f.isInfinity()?!1:f.eqXToP(r)):(f=this.g.mulAdd(l,a.getPublic(),p),f.isInfinity()?!1:f.getX().umod(this.n).cmp(r)===0)};pn.prototype.recoverPubKey=function(n,e,t,a){Y0((3&t)===t,"The recovery param is more than two bits"),e=new So(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 f=e.r.invm(i),x=i.sub(r).mul(f).umod(i),I=o.mul(f).umod(i);return this.g.mulAdd(x,s,I)};pn.prototype.getKeyRecoveryParam=function(n,e,t,a){if(e=new So(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 Ix=yr(function(n,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=Cx,t.eddsa=null}),Z0=Ix.ec;var ef="signing-key/5.7.0";var al=new E(ef),nl=null;function Qn(){return nl||(nl=new Z0("secp256k1")),nl}var cn=class{constructor(e){B(this,"curve","secp256k1"),B(this,"privateKey",K(e)),Nt(this.privateKey)!==32&&al.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)),a=Qn().keyFromPublic(j(e));return"0x"+t.pub.add(a.pub).encodeCompressed("hex")}signDigest(e){let t=Qn().keyFromPrivate(j(this.privateKey)),a=j(e);a.length!==32&&al.throwArgumentError("bad digest length","digest",e);let i=t.sign(a,{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)),a=Qn().keyFromPublic(j(ts(e)));return me("0x"+t.derive(a.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}};function Ro(n,e){let t=Vn(e),a={r:j(t.r),s:j(t.s)};return"0x"+Qn().recoverPubKey(j(n),a,t.recoveryParam).encode("hex",!1)}function ts(n,e){let t=j(n);if(t.length===32){let a=new cn(t);return e?"0x"+Qn().keyFromPrivate(t).getPublic(!0,"hex"):a.publicKey}else{if(t.length===33)return e?K(t):"0x"+Qn().keyFromPublic(t).getPublic(!1,"hex");if(t.length===65)return e?"0x"+Qn().keyFromPublic(t).getPublic(!0,"hex"):K(t)}return al.throwArgumentError("invalid public or private key","key","[REDACTED]")}var tf="transactions/5.7.0";var Ut=new E(tf),Po;(function(n){n[n.legacy=0]="legacy",n[n.eip2930=1]="eip2930",n[n.eip1559=2]="eip1559"})(Po||(Po={}));function rl(n){return n==="0x"?null:ce(n)}function Lt(n){return n==="0x"?Xi:F.from(n)}var Sx=[{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"}],Rx={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function mn(n){let e=ts(n);return ce(Ce(fe(Ce(e,1)),12))}function ci(n,e){return mn(Ro(j(n),e))}function rn(n,e){let t=Zt(F.from(n).toHexString());return t.length>32&&Ut.throwArgumentError("invalid length for "+e,"transaction:"+e,n),t}function il(n,e){return{address:ce(n),storageKeys:(e||[]).map((t,a)=>(Nt(t)!==32&&Ut.throwArgumentError("invalid access list storageKey",`accessList[${n}:${a}]`,t),t.toLowerCase()))}}function sn(n){if(Array.isArray(n))return n.map((t,a)=>Array.isArray(t)?(t.length>2&&Ut.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${a}]`,t),il(t[0],t[1])):il(t.address,t.storageKeys));let e=Object.keys(n).map(t=>{let a=n[t].reduce((i,r)=>(i[r]=!0,i),{});return il(t,Object.keys(a).sort())});return e.sort((t,a)=>t.address.localeCompare(a.address)),e}function nf(n){return sn(n).map(e=>[e.address,e.storageKeys])}function af(n,e){if(n.gasPrice!=null){let a=F.from(n.gasPrice),i=F.from(n.maxFeePerGas||0);a.eq(i)||Ut.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:a,maxFeePerGas:i})}let t=[rn(n.chainId||0,"chainId"),rn(n.nonce||0,"nonce"),rn(n.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),rn(n.maxFeePerGas||0,"maxFeePerGas"),rn(n.gasLimit||0,"gasLimit"),n.to!=null?ce(n.to):"0x",rn(n.value||0,"value"),n.data||"0x",nf(n.accessList||[])];if(e){let a=Vn(e);t.push(rn(a.recoveryParam,"recoveryParam")),t.push(Zt(a.r)),t.push(Zt(a.s))}return _t(["0x02",oa(t)])}function rf(n,e){let t=[rn(n.chainId||0,"chainId"),rn(n.nonce||0,"nonce"),rn(n.gasPrice||0,"gasPrice"),rn(n.gasLimit||0,"gasLimit"),n.to!=null?ce(n.to):"0x",rn(n.value||0,"value"),n.data||"0x",nf(n.accessList||[])];if(e){let a=Vn(e);t.push(rn(a.recoveryParam,"recoveryParam")),t.push(Zt(a.r)),t.push(Zt(a.s))}return _t(["0x01",oa(t)])}function Px(n,e){Wi(n,Rx);let t=[];Sx.forEach(function(s){let o=n[s.name]||[],l={};s.numeric&&(l.hexPad="left"),o=j(K(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(K(o))});let a=0;if(n.chainId!=null?(a=n.chainId,typeof a!="number"&&Ut.throwArgumentError("invalid transaction.chainId","transaction",n)):e&&!ia(e)&&e.v>28&&(a=Math.floor((e.v-35)/2)),a!==0&&(t.push(K(a)),t.push("0x"),t.push("0x")),!e)return oa(t);let i=Vn(e),r=27+i.recoveryParam;return a!==0?(t.pop(),t.pop(),t.pop(),r+=a*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(K(r)),t.push(Zt(j(i.r))),t.push(Zt(j(i.s))),oa(t)}function ns(n,e){if(n.type==null||n.type===0)return n.accessList!=null&&Ut.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",n),Px(n,e);switch(n.type){case 1:return rf(n,e);case 2:return af(n,e);default:break}return Ut.throwError(`unsupported transaction type: ${n.type}`,E.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:n.type})}function sf(n,e,t){try{let a=Lt(e[0]).toNumber();if(a!==0&&a!==1)throw new Error("bad recid");n.v=a}catch{Ut.throwArgumentError("invalid v for transaction type: 1","v",e[0])}n.r=me(e[1],32),n.s=me(e[2],32);try{let a=fe(t(n));n.from=ci(a,{r:n.r,s:n.s,recoveryParam:n.v})}catch{}}function Nx(n){let e=Jr(n.slice(1));e.length!==9&&e.length!==12&&Ut.throwArgumentError("invalid component count for transaction type: 2","payload",K(n));let t=Lt(e[2]),a=Lt(e[3]),i={type:2,chainId:Lt(e[0]).toNumber(),nonce:Lt(e[1]).toNumber(),maxPriorityFeePerGas:t,maxFeePerGas:a,gasPrice:null,gasLimit:Lt(e[4]),to:rl(e[5]),value:Lt(e[6]),data:e[7],accessList:sn(e[8])};return e.length===9||(i.hash=fe(n),sf(i,e.slice(9),af)),i}function Dx(n){let e=Jr(n.slice(1));e.length!==8&&e.length!==11&&Ut.throwArgumentError("invalid component count for transaction type: 1","payload",K(n));let t={type:1,chainId:Lt(e[0]).toNumber(),nonce:Lt(e[1]).toNumber(),gasPrice:Lt(e[2]),gasLimit:Lt(e[3]),to:rl(e[4]),value:Lt(e[5]),data:e[6],accessList:sn(e[7])};return e.length===8||(t.hash=fe(n),sf(t,e.slice(8),rf)),t}function Ox(n){let e=Jr(n);e.length!==9&&e.length!==6&&Ut.throwArgumentError("invalid raw transaction","rawTransaction",n);let t={nonce:Lt(e[0]).toNumber(),gasPrice:Lt(e[1]),gasLimit:Lt(e[2]),to:rl(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 a=t.v-27,i=e.slice(0,6);t.chainId!==0&&(i.push(K(t.chainId)),i.push("0x"),i.push("0x"),a-=t.chainId*2+8);let r=fe(oa(i));try{t.from=ci(r,{r:K(t.r),s:K(t.s),recoveryParam:a})}catch{}t.hash=fe(n)}return t.type=null,t}function No(n){let e=j(n);if(e[0]>127)return Ox(e);switch(e[0]){case 1:return Dx(e);case 2:return Nx(e);default:break}return Ut.throwError(`unsupported transaction type: ${e[0]}`,E.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}var of="contracts/5.7.0";var Da=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Se=new E(of),Bx={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(n,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{}n||Se.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&&Se.throwArgumentError("resolver or addr is not configured for ENS name","name",t),a})}function as(n,e,t){return Da(this,void 0,void 0,function*(){return Array.isArray(t)?yield Promise.all(t.map((a,i)=>as(n,Array.isArray(e)?e[i]:e[a.name],a))):t.type==="address"?yield Do(n,e):t.type==="tuple"?yield as(n,e,t.components):t.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(a=>as(n,a,t.arrayChildren))):Promise.reject(Se.makeError("invalid value for array",E.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function Fo(n,e,t){return Da(this,void 0,void 0,function*(){let a={};t.length===e.inputs.length+1&&typeof t[t.length-1]=="object"&&(a=we(t.pop())),Se.checkArgumentCount(t.length,e.inputs.length,"passed to contract"),n.signer?a.from?a.from=Ie({override:Do(n.signer,a.from),signer:n.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})):a.from=n.signer.getAddress():a.from&&(a.from=Do(n.provider,a.from));let i=yield Ie({args:as(n.signer||n.provider,t,e.inputs),address:n.resolvedAddress,overrides:Ie(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=sn(o.accessList)),s.gasLimit==null&&e.gas!=null){let p=21e3,f=j(r);for(let x=0;xa[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 Fx(n,e){return function(...t){return Fo(n,e,t)}}function Lx(n,e){let t=n.signer||n.provider;return function(...a){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(n,e,a);return yield t.estimateGas(i)})}}function df(n,e){let t=e.wait.bind(e);e.wait=a=>t(a).then(i=>(i.events=i.logs.map(r=>{let s=ct(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 lf(n,e,t){let a=n.signer||n.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=we(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 Fo(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 Ux(n,e){return function(...t){return Da(this,void 0,void 0,function*(){n.signer||Se.throwError("sending a transaction requires a signer",E.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),n.deployTransaction!=null&&(yield n._deployed());let a=yield Fo(n,e,t),i=yield n.signer.sendTransaction(a);return df(n,i),i})}}function uf(n,e,t){return e.constant?lf(n,e,t):Ux(n,e)}function pf(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 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(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]}},sl=class extends mi{constructor(){super("error",null)}},Oo=class extends mi{constructor(e,t,a,i){let r={address:e},s=t.getEventTopic(a);i?(s!==i[0]&&Se.throwArgumentError("topic mismatch","topics",i),r.topics=i.slice()):r.topics=[s],super(pf(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=$i(e.args);if(t.length)throw t[0].error;let a=(e.args||[]).slice();return a.push(e),a}},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=(a,i)=>this.interface.decodeEventLog(t.eventFragment,a,i),e.args=t.args}catch{}}},fr=class{constructor(e,t,a){B(this,"interface",mt(new.target,"getInterface")(t)),a==null?(B(this,"provider",null),B(this,"signer",null)):St.isSigner(a)?(B(this,"provider",a.provider||null),B(this,"signer",a)):$t.isProvider(a)?(B(this,"provider",a),B(this,"signer",null)):Se.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]]):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,uf(this,o,!0)),this.functions[s]==null&&B(this.functions,s,uf(this,o,!1)),this.callStatic[s]==null&&B(this.callStatic,s,lf(this,o,!0)),this.populateTransaction[s]==null&&B(this.populateTransaction,s,Fx(this,o)),this.estimateGas[s]==null&&B(this.estimateGas,s,Lx(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=we(e||{});return["from","to"].forEach(function(a){t[a]!=null&&Se.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 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 sl);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 a=e.topics[0];if(typeof a!="string")throw new Error("invalid topic");let i=this.interface.getEvent(a);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(pf(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,a){let i=ct(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||Se.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=we(i.filter);return typeof t=="string"&&ie(t,32)?(a!=null&&Se.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 fr{},hi=class{constructor(e,t,a){let i=null;typeof t=="string"?i=t:on(t)?i=K(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),a&&!St.isSigner(a)&&Se.throwArgumentError("invalid signer","signer",a),B(this,"bytecode",i),B(this,"interface",mt(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=we(e.pop());for(let a in t)if(!Bx[a])throw new Error("unknown transaction override "+a)}return["data","from","to"].forEach(a=>{t[a]!=null&&Se.throwError("cannot override "+a,E.errors.UNSUPPORTED_OPERATION,{operation:a})}),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=K(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 a=yield as(this.signer,e,this.interface.deploy.inputs);a.push(t);let i=this.getDeployTransaction(...a),r=yield this.signer.sendTransaction(i),s=mt(this.constructor,"getContractAddress")(r),o=mt(this.constructor,"getContract")(s,this.interface,this.signer);return df(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 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 li(e)}static getContract(e,t,a){return new oe(e,t,a)}};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;)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 I=j(ca(i,n,l));r||(r=I.length,f=new Uint8Array(r),s=Math.ceil(a/r),p=a-(s-1)*r),f.set(I);for(let S=1;S=256)throw new Error("Depth too large!");return xf(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(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 a=new Uint8Array(37);if(e&hr){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(ca(Xn.sha512,this.chainCode,a)),r=i.slice(0,32),s=i.slice(32),o=null,l=null;this.privateKey?o=Uo(F.from(r).add(this.privateKey).mod(qx)):l=new cn(K(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 Ct(mr,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 a=this;for(let i=0;i=hr)throw new Error("invalid path index - "+r);a=a._derive(hr+s)}else if(r.match(/^[0-9]+$/)){let s=parseInt(r);if(s>=hr)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(ca(Xn.sha512,Gx,a));return new Ct(mr,Uo(i.slice(0,32)),null,"0x00000000",Uo(i.slice(32)),0,0,t)}static fromMnemonic(e,t,a){return a=dl(a),e=gi(xr(e,a),a),Ct._fromSeed(ll(e,t),{phrase:e,path:"m",locale:a.locale})}static fromSeed(e){return Ct._fromSeed(e,null)}static fromExtendedKey(e){let t=fa.decode(e);(t.length!==82||xf(t.slice(0,78))!==e)&&ss.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");let a=t[4],i=K(t.slice(5,9)),r=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(mr,null,K(o),i,s,r,a,null);case"0x0488ade4":case"0x04358394 ":if(o[0]!==0)break;return new Ct(mr,K(o.slice(1)),null,i,s,r,a,null)}return ss.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}};function ll(n,e){e||(e="");let t=ve("mnemonic"+e,Gt.NFKD);return xi(ve(n,Gt.NFKD),t,2048,64,"sha512")}function xr(n,e){e=dl(e),ss.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=bf(s);if((j(Xt(a.slice(0,r/8)))[0]&o)!==(a[a.length-1]&o))throw new Error("invalid checksum");return K(a.slice(0,r/8))}function gi(n,e){if(e=dl(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]&zx(8-a)),a+=3);let i=n.length/4,r=j(Xt(n))[0]&bf(i);return t[t.length-1]<<=i,t[t.length-1]|=r>>8-i,e.join(t.map(s=>e.getWord(s)))}function gf(n,e){try{return xr(n,e),!0}catch{}return!1}function Tf(n){return(typeof n!="number"||n<0||n>=hr||n%1)&&ss.throwArgumentError("invalid account index","index",n),`m/44'/60'/${n}'/0/0`}var vf="random/5.7.0";var pl=new E(vf);function Kx(){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 wf=Kx(),Vo=wf.crypto||wf.msCrypto;(!Vo||!Vo.getRandomValues)&&(pl.warn("WARNING: Missing strong random number source"),Vo={getRandomValues:function(n){return pl.throwError("no secure random source avaialble",E.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function Yn(n){(n<=0||n>1024||n%1||n!=n)&&pl.throwArgumentError("invalid length","length",n);let e=new Uint8Array(n);return Vo.getRandomValues(e),j(e)}function os(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 cl=_n(fl());var jo="json-wallets/5.7.0";function ha(n){return typeof n=="string"&&n.substring(0,2)!=="0x"&&(n="0x"+n),j(n)}function br(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 xa.default.Counter(x),J=new xa.default.ModeOfOperation.ctr(O,M),$=j(J.encrypt(i)),de=fe(ye([U,$])),T={address:n.address.substring(2).toLowerCase(),id:kf(I),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:K(x).substring(2)},ciphertext:K($).substring(2),kdf:"scrypt",kdfparams:{salt:K(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)),C=new Date,u=C.getUTCFullYear()+"-"+br(C.getUTCMonth()+1,2)+"-"+br(C.getUTCDate(),2)+"T"+br(C.getUTCHours(),2)+"-"+br(C.getUTCMinutes(),2)+"-"+br(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:l,version:"0.1"}}return JSON.stringify(T)})}function Nf(n,e,t){if(Ho(n)){t&&t(0);let a=hl(n,e);return t&&t(1),Promise.resolve(a)}return qo(n)?Pf(n,e,t):Promise.reject(new Error("invalid JSON wallet"))}function Df(n,e){if(Ho(n))return hl(n,e);if(qo(n))return Rf(n,e);throw new Error("invalid JSON wallet")}var Of="wallet/5.7.0";var Bf=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},gr=new E(Of);function Xx(n){return n!=null&&ie(n.privateKey,32)&&n.address!=null}function Yx(n){let e=n.mnemonic;return e&&e.phrase}var In=class extends St{constructor(e,t){if(super(),Xx(e)){let a=new cn(e.privateKey);if(B(this,"_signingKey",()=>a),B(this,"address",mn(this.publicKey)),this.address!==ce(e.address)&&gr.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),Yx(e)){let i=e.mnemonic;B(this,"_mnemonic",()=>({phrase:i.phrase,path:i.path||ma,locale:i.locale||"en"}));let r=this.mnemonic,s=Ct.fromMnemonic(r.phrase,null,r.locale).derivePath(r.path);mn(s.privateKey)!==this.address&&gr.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else B(this,"_mnemonic",()=>null)}else{if(cn.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 a=new cn(e);B(this,"_signingKey",()=>a)}B(this,"_mnemonic",()=>null),B(this,"address",mn(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 In(this,e)}signTransaction(e){return Ie(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 a=this._signingKey().signDigest(fe(ns(t)));return ns(t,a)})}signMessage(e){return Bf(this,void 0,void 0,function*(){return Vr(this._signingKey().signDigest(nr(e)))})}_signTypedData(e,t,a){return Bf(this,void 0,void 0,function*(){let i=yield bt.resolveNames(e,t,a,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(bt.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={}),vl(this,e,t,a)}static createRandom(e){let t=Yn(16);e||(e={}),e.extraEntropy&&(t=j(Ce(fe(ye([t,e.extraEntropy])),0,16)));let a=gi(t,e.locale);return In.fromMnemonic(a,e.path,e.locale)}static fromEncryptedJson(e,t,a){return Nf(e,t,a).then(i=>new In(i))}static fromEncryptedJsonSync(e,t){return new In(Df(e,t))}static fromMnemonic(e,t,a){return t||(t=ma),new In(Ct.fromMnemonic(e,null,a).derivePath(t))}};function Ff(n,e){return ci(nr(n),e)}function Lf(n,e,t,a){return ci(bt.hash(n,e,t),a)}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:()=>Dl,JsonRpcBatchProvider:()=>ru,JsonRpcProvider:()=>Yt,JsonRpcSigner:()=>_r,NodesmithProvider:()=>Ms,PocketProvider:()=>Cs,Provider:()=>$t,Resolver:()=>wr,StaticJsonRpcProvider:()=>bs,UrlJsonRpcProvider:()=>It,Web3Provider:()=>Is,WebSocketProvider:()=>Ta,getDefaultProvider:()=>su,getNetwork:()=>ds,isCommunityResourcable:()=>kl,isCommunityResource:()=>ys,showThrottleMessage:()=>Zn});var Uf="networks/5.7.1";var Vf=new E(Uf);function Zx(n){return n&&typeof n.renetwork=="function"}function ba(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 ba(t)},e}function Ko(n,e){let t=function(a,i){return a.JsonRpcProvider?new a.JsonRpcProvider(n,e):null};return t.renetwork=function(a){return Ko(n,a)},t}var jf={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:ba("homestead")},Hf={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:ba("ropsten")},qf={chainId:63,name:"classicMordor",_defaultProvider:Ko("https://www.ethercluster.com/mordor","classicMordor")},zo={unspecified:{chainId:0,name:"unspecified"},homestead:jf,mainnet:jf,morden:{chainId:2,name:"morden"},ropsten:Hf,testnet:Hf,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:Ko("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:qf,classicTestnet:qf,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:Ko("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 ds(n){if(n==null)return null;if(typeof n=="number"){for(let a in zo){let i=zo[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=zo[n];return a==null?null:{name:a.name,chainId:a.chainId,ensAddress:a.ensAddress,_defaultProvider:a._defaultProvider||null}}let e=zo[n.name];if(!e)return typeof n.chainId!="number"&&Vf.throwArgumentError("invalid network chainId","network",n),n;n.chainId!==0&&n.chainId!==e.chainId&&Vf.throwArgumentError("network chainId mismatch","network",n);let t=n._defaultProvider||null;return t==null&&e._defaultProvider&&(Zx(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 Gf="web/5.7.1";var e5=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})};function zf(n,e){return e5(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 t5=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Sn=new E(Gf);function Kf(n){return new Promise(e=>{setTimeout(e,n)})}function Oa(n,e){if(n==null)return null;if(typeof n=="string")return n;if(ia(n)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return Jt(n)}catch{}return K(n)}return n}function n5(n){return ve(n.replace(/%([0-9a-f][0-9a-f])/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))}function wl(n,e,t){let a=typeof n=="object"&&n.throttleLimit!=null?n.throttleLimit:12;Sn.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;Sn.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"},f=!1,x=2*60*1e3;if(typeof n=="string")l=n;else if(typeof n=="object"){if((n==null||n.url==null)&&Sn.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&&(f=!0);if(p.allowGzip=!!n.allowGzip,n.user!=null&&n.password!=null){l.substring(0,6)!=="https:"&&n.allowInsecureAuthentication!==!0&&Sn.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 "+tr(ve(O))}}n.skipFetchSetup!=null&&(p.skipFetchSetup=!!n.skipFetchSetup),n.fetchOptions!=null&&(p.fetchOptions=we(n.fetchOptions))}let I=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),_=l?l.match(I):null;if(_)try{let O={statusCode:200,statusMessage:"OK",headers:{"content-type":_[1]||"text/plain"},body:_[2]?er(_[3]):n5(_[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: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(Sn.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 t5(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: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){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=ve(e);let r=typeof n=="string"?{url:n}:we(n);r.headers?Object.keys(r.headers).filter(o=>o.toLowerCase()==="content-type").length!==0||(r.headers=we(r.headers),r.headers["content-type"]="application/json"):r.headers={"content-type":"application/json"},n=r}return wl(n,i,a)}function Pn(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,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(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()&&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(f){s()&&a(f)})}p()})}var Cl=_n(Qf());var ke="providers/5.7.2";var ps=new E(ke),Y=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),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(a),maxPriorityFeePerGas:Y.allowNull(a),maxFeePerGas:Y.allowNull(a),gasLimit:a,to:Y.allowNull(t,null),value:a,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(a),gasPrice:Y.allowNull(a),maxPriorityFeePerGas:Y.allowNull(a),maxFeePerGas:Y.allowNull(a),to:Y.allowNull(t),value:Y.allowNull(a),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:a,logsBloom:Y.allowNull(r),blockHash:s,transactionHash:s,logs:Y.arrayOf(this.receiptLog.bind(this)),blockNumber:l,confirmations:Y.allowNull(l,null),cumulativeGasUsed:a,effectiveGasPrice:Y.allowNull(a),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:a,gasUsed:a,miner:Y.allowNull(t),extraData:r,transactions:Y.allowNull(Y.arrayOf(s)),baseFeePerGas:Y.allowNull(a)},e.blockWithTransactions=we(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 a=this.hex(e,t);if(a.length%2!==0)throw new Error("invalid data; odd-length - "+e);return a}address(e){return ce(e)}callAddress(e){if(!ie(e,32))return null;let t=ce(Ce(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 a=this.hex(e,t);return Nt(a)!==32?ps.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 me(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=Y.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 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 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 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 a=F.from(t.root).toNumber();a===0||a===1?(t.status!=null&&t.status!==a&&ps.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=a,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 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 kl(n){return n&&typeof n.isCommunityResource=="function"}function ys(n){return kl(n)&&n.isCommunityResource()}var Xf=!1;function Zn(){Xf||(Xf=!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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},he=new E(ke),l5=10;function Yf(n){return n==null?"null":(Nt(n)!==32&&he.throwArgumentError("invalid topic","topic",n),n.toLowerCase())}function Zf(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[Yf(i)]=!0});let a=Object.keys(t);return a.sort(),a.join("|")}else return Yf(e)}).join("&")}function p5(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 vr(n){if(typeof n=="string"){if(n=n.toLowerCase(),Nt(n)===32)return"tx:"+n;if(n.indexOf(":")===-1)return n}else{if(Array.isArray(n))return"filter:*:"+Zf(n);if(wo.isForkEvent(n))throw he.warn("not implemented"),new Error("not implemented");if(n&&typeof n=="object")return"filter:"+(n.address||"*")+":"+Zf(n.topics||[])}throw new Error("invalid event - "+n)}function fs(){return new Date().getTime()}function ec(n){return new Promise(e=>{setTimeout(e,n)})}var y5=["block","network","pending","poll"],Il=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=p5(e[2]),i={};return a.length>0&&(i.topics=a),t&&t!=="*"&&(i.address=t),i}pollable(){return this.tag.indexOf(":")>=0||y5.indexOf(this.tag)>=0}},f5={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(n){return me(F.from(n).toHexString(),32)}function tc(n){return fa.encode(ye([n,Ce(Xt(Xt(n)),0,4)]))}var ic=new RegExp("^(ipfs)://(.*)$","i"),nc=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),ic,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Qo(n,e){try{return Jt(cs(n,e))}catch{}return null}function cs(n,e){if(n==="0x")return null;let t=F.from(Ce(n,e,e+32)).toNumber(),a=F.from(Ce(n,t,t+32)).toNumber();return Ce(n,t+32,t+32+a)}function El(n){return n.match(/^ipfs:\/\/ipfs\//i)?n=n.substring(12):n.match(/^ipfs:\/\//i)?n=n.substring(7):he.throwArgumentError("unsupported IPFS format","link",n),`https://gateway.ipfs.io/ipfs/${n}`}function ac(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 c5(n){if(n.length%32===0)return n;let e=new Uint8Array(Math.ceil(n.length/32)*32);return e.set(n),e}function rc(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:_t([e,Ia(this.name),t||"0x"])},i=!1;(yield this.supportsWildcard())&&(i=!0,a.data=_t(["0x9061b923",rc([Yr(this.name),a.data])]));try{let r=yield this.provider.call(a);return j(r).length%32===4&&he.throwError("resolver threw error",E.errors.CALL_EXCEPTION,{transaction:a,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 a=yield this._fetch(e,t);return a!=null?cs(a,0):null})}_getAddress(e,t){let a=f5[String(e)];if(a==null&&he.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 tc(ye([[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 tc(ye([[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=Cl.default.toWords(i.slice(2));return o.unshift(s),Cl.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===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",Al(e));if(t==null||t==="0x")return null;let a=this._getAddress(e,t);return a==null&&he.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 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 a=yield this._fetchBytes("0x59d1d43c",K(t));return a==null||a==="0x"?null:Jt(a)})}},Ml=null,m5=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 Pn(()=>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 ds(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 Rn({url:p,errorPassThrough:!0},f,(_,v)=>(_.status=v.statusCode,_));if(x.data)return x.data;let I=x.message||"unknown error";if(x.status>=400&&x.status<500)return he.throwError(`response not found during CCIP fetch: ${I}`,E.errors.SERVER_ERROR,{url:l,errorMessage:I});s.push(I)}return he.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(fs()-r.respTime<=e)return r.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}let t=fs(),a=Ie({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=fs();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=m5++,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)he.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${a})`),this.emit("error",he.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 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 ec(0),this._network;let a=he.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=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,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,f=function(){return p?!0:(p=!0,l.forEach(I=>{I()}),!1)},x=I=>{I.confirmations{this.removeListener(e,x)}),i){let I=i.startBlock,_=null,v=S=>ue(this,void 0,void 0,function*(){p||(yield ec(1e3),this.getTransactionCount(i.from).then(L=>ue(this,void 0,void 0,function*(){if(!p){if(L<=i.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),l.push(()=>{this.removeListener("block",v)})}if(typeof a=="number"&&a>0){let I=setTimeout(()=>{f()||o(he.makeError("timeout exceeded",E.errors.TIMEOUT,{timeout:a}))},a);I.unref&&I.unref(),l.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",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 Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getBalance",a);try{return F.from(i)}catch(r){return he.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 Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getTransactionCount",a);try{return F.from(i).toNumber()}catch(r){return he.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 Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getCode",a);try{return K(i)}catch(r){return he.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 Ie({address:this._getAddress(e),blockTag:this._getBlockTag(a),position:Promise.resolve(t).then(s=>Un(s))}),r=yield this.perform("getStorageAt",i);try{return K(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,a){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&&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&&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=>K(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?K(r):null))}),this.formatter.transactionRequest(yield Ie(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 Ie(t))})}_call(e,t,a){return ue(this,void 0,void 0,function*(){a>=l5&&he.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"&&Nt(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(),f=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&&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 Pn(()=>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 Pn(()=>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 Ie({filter:this._getFilter(e)}),a=yield this.perform("getLogs",t);return a.forEach(i=>{i.removed==null&&(i.removed=!1)}),Y.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&&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 a=yield this._getResolver(t,"getResolver");if(a!=null){let i=new wr(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||he.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"+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(a){if(ie(e))throw a}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",a=yield this._getResolver(t,"lookupAddress");if(a==null)return null;let i=Qo(yield this.call({to:a,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 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=Qo(yield this.call({to:s,data:"0x691f3431"+Ia(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 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,a){let i=new Il(vr(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=vr(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=vr(e);return this._events.filter(a=>a.tag===t).length}listeners(e){if(e==null)return this._events.map(a=>a.listener);let t=vr(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=vr(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=vr(e);this._events=this._events.filter(i=>i.tag!==a?!0:(t.push(i),!1))}return t.forEach(a=>{this._stopEvent(a)}),this}};var ga=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},At=new E(ke),h5=["call","estimateGas"];function hs(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=hs(n[t],e);if(a)return a}return null}if(typeof n=="string")try{return hs(JSON.parse(n),e)}catch{}return null}function oc(n,e,t){let a=t.transaction||t.signedTransaction;if(n==="call"){let r=hs(e,!0);if(r)return r.data;At.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=hs(e.body,!1);r==null&&(r=hs(e,!1)),r&&At.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)&&At.throwError("insufficient funds for intrinsic transaction cost",E.errors.INSUFFICIENT_FUNDS,{error:e,method:n,transaction:a}),i.match(/nonce (is )?too low/i)&&At.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)&&At.throwError("replacement fee too low",E.errors.REPLACEMENT_UNDERPRICED,{error:e,method:n,transaction:a}),i.match(/only replay-protected/i)&&At.throwError("legacy pre-eip-155 transactions not supported",E.errors.UNSUPPORTED_OPERATION,{error:e,method:n,transaction:a}),h5.indexOf(n)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&At.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 sc(n){return new Promise(function(e){setTimeout(e,n)})}function x5(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 ms(n){return n&&n.toLowerCase()}var Sl={},_r=class extends St{constructor(e,t,a){if(super(),e!==Sl)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)):At.throwArgumentError("invalid address or index","addressOrIndex",a)}connect(e){return At.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&&At.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(a=>(a&&(a=a.toLowerCase()),a));if(e.gasLimit==null){let a=we(e);a.from=t,e.gasLimit=this.provider.estimateGas(a)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(a=>ga(this,void 0,void 0,function*(){if(a==null)return null;let i=yield this.provider.resolveName(a);return i==null&&At.throwArgumentError("provided ENS name resolves to null","tx.to",a),i}))),Ie({tx:Ie(e),sender:t}).then(({tx:a,sender:i})=>{a.from!=null?a.from.toLowerCase()!==i&&At.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)&&At.throwError("user rejected transaction",E.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:a}),oc("sendTransaction",s,r)))})}signTransaction(e){return At.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),a=yield this.sendUncheckedTransaction(e);try{return yield Pn(()=>ga(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 ga(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(e):e,a=yield this.getAddress();try{return yield this.provider.send("personal_sign",[K(t),a.toLowerCase()])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&At.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"signMessage",from:a,messageData:e}),i}})}_legacySignMessage(e){return ga(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(e):e,a=yield this.getAddress();try{return yield this.provider.send("eth_sign",[a.toLowerCase(),K(t)])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&At.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:a,messageData:e}),i}})}_signTypedData(e,t,a){return ga(this,void 0,void 0,function*(){let i=yield bt.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(bt.getPayload(i.domain,t,i.value))])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&At.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,a=yield this.getAddress();return t.send("personal_unlockAccount",[a.toLowerCase(),e,null])})}},Rl=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:a=>this.provider.waitForTransaction(t,a)}))}},b5={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 a=t;a==null&&(a=new Promise((i,r)=>{setTimeout(()=>{this.detectNetwork().then(s=>{i(s)},s=>{r(s)})},0)})),super(a),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 ga(this,void 0,void 0,function*(){yield sc(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(a){return At.throwError("could not detect network",E.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:a})}}return At.throwError("could not detect network",E.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new _r(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 a={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:ct(a),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(a),x5).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",[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),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 a=mt(this.constructor,"hexlifyTransaction");return["eth_call",[a(t.transaction,{from:!0}),t.blockTag]]}case"estimateGas":{let a=mt(this.constructor,"hexlifyTransaction");return["eth_estimateGas",[a(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 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=we(t),t.transaction=we(i),delete t.transaction.type)}}let a=this.prepareRequest(e,t);a==null&&At.throwError(e+" not implemented",E.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(a[0],a[1])}catch(i){return oc(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 sc(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=we(b5);if(t)for(let r in t)t[r]&&(a[r]=!0);Wi(e,a);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]=K(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(ke);kr=function(){e.throwError("WebSockets not supported in this environment",E.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var Pl=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Xo=new E(ke),g5=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 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 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){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 a=g5++;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 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: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 Pl(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 T5=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},xs=new E(ke),bs=class extends Yt{detectNetwork(){let e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return T5(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})}},It=class extends bs{constructor(e,t){xs.checkAbstract(new.target,It),e=mt(new.target,"getNetwork")(e),t=mt(new.target,"getApiKey")(t);let a=mt(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(){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 uc=new E(ke),Yo="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC",gs=class extends Ta{constructor(e,t){let a=new Ar(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===Yo}},Ar=class extends It{static getWebSocketProvider(e,t){return new gs(e,t)}static getApiKey(e){return e==null?Yo:(e&&typeof e!="string"&&uc.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:uc.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+a+t,throttleCallback:(i,r)=>(t===Yo&&Zn(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===Yo}};var v5=new E(ke),Zo="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function w5(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 v5.throwArgumentError("unsupported network","name",n)}var Ts=class extends It{isCommunityResource(){return this.apiKey===Zo}static getApiKey(e){return e??Zo}static getUrl(e,t){t==null&&(t=Zo);let a={allowGzip:!0,url:"https://"+w5(e.name)+t,throttleCallback:(i,r)=>(t.apiKey===Zo&&Zn(),Promise.resolve(!0))};return t.projectSecret!=null&&(a.user="",a.password=t.projectSecret),a}};var _5=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},dc=new E(ke),vs=class extends It{static getApiKey(e){return e!=null&&dc.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:dc.throwArgumentError("unsupported network","network",arguments[0])}return a}perform(e,t){let a=Object.create(null,{perform:{get:()=>super.perform}});return _5(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 eu=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Ba=new E(ke);function lc(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=Un(K(a)):t==="accessList"?a="["+sn(a).map(i=>`{address:"${i.address}",storageKeys:["${i.storageKeys.join('","')}"]}`).join(",")+"]":a=K(a),e[t]=a)}return e}function k5(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 pc(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 yc(n){if(n==="pending")throw new Error("pending not supported");return n==="latest"?n:parseInt(n.substring(2),16)}function Nl(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;Ba.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/)&&Ba.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/)&&Ba.throwError("nonce has already been used",E.errors.NONCE_EXPIRED,{error:e,method:n,transaction:t}),a.match(/another transaction with same nonce/)&&Ba.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/)&&Ba.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 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 Ba.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 eu(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"?pc:k5;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||pc);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 a=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=lc(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=lc(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=yc(t.filter.fromBlock)),t.filter.toBlock&&(i.toBlock=yc(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(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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Ti=new E(ke);function tu(){return new Date().getTime()}function fc(n){let e=null;for(let t=0;te?null:(a+i)/2}function Er(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=>Er(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=Er(a),JSON.stringify(t)+":"+a}).join(",")+"}"}throw new Error("unknown value type: "+typeof n)}var A5=1;function mc(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 E5=[E.errors.CALL_EXCEPTION,E.errors.INSUFFICIENT_FUNDS,E.errors.NONCE_EXPIRED,E.errors.REPLACEMENT_UNDERPRICED,E.errors.UNPREDICTABLE_GAS_LIMIT],M5=["address","args","errorArgs","errorSignature","method","transaction"];function nu(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 C5(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 I5(n,e,t){let a=Er;switch(e){case"getBlockNumber":return function(i){let r=i.map(o=>o.result),s=cc(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 cc(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=we(i),i.confirmations=-1,Er(i))};break;case"getBlock":t.includeTransactions?a=function(i){return i==null?null:(i=we(i),i.transactions=i.transactions.map(r=>(r=we(r),r.confirmations=-1,r)),Er(i))}:a=function(i){return i==null?null:Er(i)};break;default:throw new Error("unknown method: "+e)}return C5(a,n.quorum)}function _s(n,e){return au(this,void 0,void 0,function*(){let t=n.provider;return t.blockNumber!=null&&t.blockNumber>=e||e===-1?t:Pn(()=>new Promise((a,i)=>{setTimeout(function(){return t.blockNumber>=e?a(t):n.cancelled?a(null):a(void 0)},0)}),{oncePoll:t})})}function S5(n,e,t,a){return au(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 _s(n,e)),i[t](a.address,a.blockTag||"latest");case"getStorageAt":return a.blockTag&&ie(a.blockTag)&&(i=yield _s(n,e)),i.getStorageAt(a.address,a.position,a.blockTag||"latest");case"getBlock":return a.blockTag&&ie(a.blockTag)&&(i=yield _s(n,e)),i[a.includeTransactions?"getBlockWithTransactions":"getBlock"](a.blockTag||a.blockHash);case"call":case"estimateGas":return a.blockTag&&ie(a.blockTag)&&(i=yield _s(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 _s(n,e)),i.getLogs(r)}}return Ti.throwError("unknown method error",E.errors.UNKNOWN_ERROR,{method:t,params:a})})}var ks=class extends ea{constructor(e,t){e.length===0&&Ti.throwArgumentError("missing providers","providers",e);let a=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=we(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)&&Ti.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&&Ti.throwArgumentError("quorum will always fail; larger than total weight","quorum",t);let r=fc(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 au(this,void 0,void 0,function*(){let e=yield Promise.all(this.providerConfigs.map(t=>t.provider.getNetwork()));return fc(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=S5(_,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 _=a(x);if(_!==void 0)return i.forEach(v=>{v.staller&&v.staller.cancel(),v.cancelled=!0}),_;o||(yield mc(100).getPromise()),o=!1}let I=i.reduce((_,v)=>{if(!v.done||v.error==null)return _;let S=v.error.code;return E5.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={};M5.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(ke),As="84842078b09946638c03157f83405213",Es=class extends Ta{constructor(e,t){let a=new Mr(e,t),i=a.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",a.projectId),B(this,"projectId",a.projectId),B(this,"projectSecret",a.projectSecret)}isCommunityResource(){return this.projectId===As}},Mr=class extends It{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?(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 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:iu.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===As&&Zn(),Promise.resolve(!0))};return t.projectSecret!=null&&(i.user="",i.password=t.projectSecret),i}isCommunityResource(){return this.projectId===As}};var ru=class extends Yt{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: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 I=new Error(x.error.message);I.code=x.error.code,I.data=x.error.data,p.reject(I)}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(ke),R5="ETHERS_JS_SHARED",Ms=class extends It{static getApiKey(e){return e&&typeof e!="string"&&Ol.throwArgumentError("invalid apiKey","apiKey",e),e||R5}static getUrl(e,t){Ol.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:Ol.throwArgumentError("unsupported network","network",arguments[0])}return a+"?apiKey="+t}};var hc=new E(ke),xc="62e1ad51b37b8e00394bda3b",Cs=class extends It{static getApiKey(e){let t={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return e==null?t.applicationId=xc:typeof e=="string"?t.applicationId=e:e.applicationSecretKey!=null?(t.applicationId=e.applicationId,t.applicationSecretKey=e.applicationSecretKey):e.applicationId?t.applicationId=e.applicationId:hc.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:hc.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===xc}};var bc=new E(ke),P5=1;function gc(n,e){let t="Web3LegacyFetcher";return function(a,i){let r={method:a,params:i,id:P5++,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 N5(n){return function(e,t){t==null&&(t=[]);let a={method:e,params:t};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:ct(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 Is=class extends Yt{constructor(e,t){e==null&&bc.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=N5(e)):e.sendAsync?i=gc(e,e.sendAsync.bind(e)):e.send?i=gc(e,e.send.bind(e)):bc.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 Tc=new E(ke);function su(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 Yt(n);case"ws":case"wss":return new Ta(n);default:Tc.throwArgumentError("unsupported URL scheme","network",n)}}let t=ds(n);return(!t||!t._defaultProvider)&&Tc.throwError("unsupported getDefaultProvider network",E.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:n}),t._defaultProvider({FallbackProvider:ks,AlchemyProvider:Ar,AnkrProvider:Ts,CloudflareProvider:vs,EtherscanProvider:ws,InfuraProvider:Mr,JsonRpcProvider:Yt,NodesmithProvider:Ms,PocketProvider:Cs,Web3Provider:Is,IpcProvider:null},e)}var te={};Gi(te,{AbiCoder:()=>Zi,ConstructorFragment:()=>Dt,ErrorFragment:()=>tn,EventFragment:()=>Ht,FormatTypes:()=>ge,Fragment:()=>qt,FunctionFragment:()=>Ot,HDNode:()=>Ct,Indexed:()=>ua,Interface:()=>Sa,LogDescription:()=>ar,Logger:()=>E,ParamType:()=>pt,RLP:()=>no,SigningKey:()=>cn,SupportedAlgorithm:()=>Xn,TransactionDescription:()=>ir,TransactionTypes:()=>Po,UnicodeNormalizationForm:()=>Gt,Utf8ErrorFuncs:()=>ho,Utf8ErrorReason:()=>Bt,_TypedDataEncoder:()=>bt,_fetchData:()=>wl,_toEscapedUtf8String:()=>Md,accessListify:()=>sn,arrayify:()=>j,base58:()=>fa,base64:()=>Nd,checkProperties:()=>Wi,checkResultErrors:()=>$i,commify:()=>Cc,computeAddress:()=>mn,computeHmac:()=>ca,computePublicKey:()=>ts,concat:()=>ye,deepCopy:()=>ct,defaultAbiCoder:()=>Qr,defaultPath:()=>ma,defineReadOnly:()=>B,dnsEncode:()=>Yr,entropyToMnemonic:()=>gi,fetchJson:()=>Rn,formatBytes32String:()=>Cd,formatEther:()=>Ic,formatUnits:()=>Bl,getAccountPath:()=>Tf,getAddress:()=>ce,getContractAddress:()=>li,getCreate2Address:()=>Ny,getIcapAddress:()=>Py,getJsonWalletAddress:()=>xl,getStatic:()=>mt,hashMessage:()=>nr,hexConcat:()=>_t,hexDataLength:()=>Nt,hexDataSlice:()=>Ce,hexStripZeros:()=>hd,hexValue:()=>Un,hexZeroPad:()=>me,hexlify:()=>K,id:()=>nn,isAddress:()=>Ry,isBytes:()=>on,isBytesLike:()=>ia,isHexString:()=>ie,isValidMnemonic:()=>gf,isValidName:()=>Od,joinSignature:()=>Vr,keccak256:()=>fe,mnemonicToEntropy:()=>xr,mnemonicToSeed:()=>ll,namehash:()=>Ia,nameprep:()=>Pd,parseBytes32String:()=>Id,parseEther:()=>Sc,parseTransaction:()=>No,parseUnits:()=>Fl,poll:()=>Pn,randomBytes:()=>Yn,recoverAddress:()=>ci,recoverPublicKey:()=>Ro,resolveProperties:()=>Ie,ripemd160:()=>is,serializeTransaction:()=>ns,sha256:()=>Xt,sha512:()=>sl,shallowCopy:()=>we,shuffled:()=>os,solidityKeccak256:()=>_c,solidityPack:()=>ou,soliditySha256:()=>kc,splitSignature:()=>Vn,stripZeros:()=>Zt,toUtf8Bytes:()=>ve,toUtf8CodePoints:()=>Ca,toUtf8String:()=>Jt,verifyMessage:()=>Ff,verifyTypedData:()=>Lf,zeroPad:()=>si});var vc="solidity/5.7.0";var D5=new RegExp("^bytes([0-9]+)$"),O5=new RegExp("^(u?int)([0-9]*)$"),B5=new RegExp("^(.*)\\[([0-9]*)\\]$"),F5="0000000000000000000000000000000000000000000000000000000000000000",Cr=new E(vc);function wc(n,e,t){switch(n){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 a=n.match(O5);if(a){let i=parseInt(a[2]||"256");return(a[2]&&String(i)!==a[2]||i%8!==0||i===0||i>256)&&Cr.throwArgumentError("invalid number type","type",n),t&&(i=256),e=F.from(e).toTwos(i),si(e,i/8)}if(a=n.match(D5),a){let i=parseInt(a[1]);return(String(i)!==a[1]||i===0||i>32)&&Cr.throwArgumentError("invalid bytes type","type",n),j(e).byteLength!==i&&Cr.throwArgumentError(`invalid value for ${n}`,"value",e),t?j((e+F5).substring(0,66)):e}if(a=n.match(B5),a&&Array.isArray(e)){let i=a[1];parseInt(a[2]||String(e.length))!=e.length&&Cr.throwArgumentError(`invalid array length for ${n}`,"value",e);let s=[];return e.forEach(function(o){s.push(wc(i,o,!0))}),ye(s)}return Cr.throwArgumentError("invalid type","type",n)}function ou(n,e){n.length!=e.length&&Cr.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);let t=[];return n.forEach(function(a,i){t.push(wc(a,e[i]))}),K(ye(t))}function _c(n,e){return fe(ou(n,e))}function kc(n,e){return Xt(ou(n,e))}var Ac="units/5.7.0";var Ec=new E(Ac),Mc=["wei","kwei","mwei","gwei","szabo","finney","ether"];function Cc(n){let e=String(n).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||n==="."||n==="-.")&&Ec.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 Bl(n,e){if(typeof e=="string"){let t=Mc.indexOf(e);t!==-1&&(e=3*t)}return Ki(n,e??18)}function Fl(n,e){if(typeof n!="string"&&Ec.throwArgumentError("value must be a string","value",n),typeof e=="string"){let t=Mc.indexOf(e);t!==-1&&(e=3*t)}return dn(n,e??18)}function Ic(n){return Bl(n,18)}function Sc(n){return Fl(n,18)}var uu="ethers/5.7.2";var Rc=new E(uu);try{let n=window;n._ethers==null&&(n._ethers=Ll)}catch{}var Nn;(function(n){n.Mainnet="Mainnet",n.Custom="Custom",n.Gnosis="Xdai",n.Goerli="Goerli",n.Xdai="Xdai",n.XdaiQa="XdaiQa",n.ArbitrumOne="ArbitrumOne",n.ArbitrumSepolia="ArbitrumSepolia"})(Nn||(Nn={}));var Pc;(function(n){n[n.Custom=0]="Custom",n[n.Mainnet=1]="Mainnet",n[n.Goerli=5]="Goerli",n[n.Gnosis=100]="Gnosis",n[n.Xdai=100]="Xdai",n[n.XdaiQa=100]="XdaiQa",n[n.ArbitrumSepolia=421614]="ArbitrumSepolia",n[n.ArbitrumOne=42161]="ArbitrumOne"})(Pc||(Pc={}));var du;(function(n){n.Mainnet="0x5346D0f80e2816FaD329F2c140c870ffc3c3E2Ef",n.Goerli="0x79073fc2117dD054FCEdaCad1E7018C9CbE3ec0B",n.Xdai="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.XdaiQa="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.Custom="",n.ArbitrumOne="0xcccccdcc0ccf6c708d860e19353c5f9a49accccc",n.ArbitrumSepolia="0x7777494e3d8cce0D3570E21FEf820F9Fee077777"})(du||(du={}));var Ir;(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",n.ArbitrumOne="https://app.colony.io/reputation/arbitrum-one",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/reputation/arbitrum-sepolia"})(Ir||(Ir={}));var lu;(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="",n.ArbitrumOne="https://app.colony.io/metatransaction/arbitrum-one",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/metatransaction/arbitrum-sepolia"})(lu||(lu={}));var Ul;(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="",n.ArbitrumOne="https://app.colony.io/public-rpc/",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/public-rpc/"})(Ul||(Ul={}));var Ss;(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",n.ArbitrumOne=".colony.joincolony.arbitrum",n.ArbitrumSepolia=".colony.joincolony.sepolia"})(Ss||(Ss={}));var Rs;(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",n.ArbitrumOne=".user.joincolony.arbitrum",n.ArbitrumSepolia=".user.joincolony.sepolia"})(Rs||(Rs={}));var Vl;(function(n){let e;(function(i){i.ETH="0x0000000000000000000000000000000000000000",i.CLNY="0x3E828ac5C480069D4765654Fb4b8733b910b13b2",i.USDC="0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"})(e=n.Mainnet||(n.Mainnet={}));let t;(function(i){i.XDAI="0x0000000000000000000000000000000000000000",i.CLNY="0xc9B6218AffE8Aba68a13899Cbf7cF7f14DDd304C",i.USDC="0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83"})(t=n.Gnosis||(n.Gnosis={}));let a;(function(i){i.ETH="0x0000000000000000000000000000000000000000",i.CLNY="0xcccccdcc0ccf6c708d860e19353c5f9a49accccc",i.USDC="0xaf88d065e77c8cC2239327C5EDb3A432268e5831"})(a=n.ArbitrumOne||(n.ArbitrumOne={}))})(Vl||(Vl={}));var _e;(function(n){n[n.RootDomain=1]="RootDomain",n[n.RootTeam=1]="RootTeam",n[n.RootPot=1]="RootPot",n[n.SkillIgnore=0]="SkillIgnore"})(_e||(_e={}));var zt;(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"})(zt||(zt={}));var Hl="0x12345678",jl;(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"})(jl||(jl={}));var vt;(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"})(vt||(vt={}));var Ae;(function(n){n.FundingQueue="FundingQueue",n.IVotingReputation="IVotingReputation",n.MultisigPermissions="MultisigPermissions",n.OneTxPayment="OneTxPayment",n.ReputationBootstrapper="ReputationBootstrapper",n.StagedExpenditure="StagedExpenditure",n.StakedExpenditure="StakedExpenditure",n.StreamingPayments="StreamingPayments",n.TokenSupplier="TokenSupplier",n.VotingReputation="VotingReputation"})(Ae||(Ae={}));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=(n,e)=>{throw new Error(`${e}: ${n}`)},zl=n=>n!=null;var{keccak256:U5,toUtf8Bytes:V5}=te,{MaxUint256:j5}=ht;var Ps=n=>te.formatEther(n),Dc=n=>te.parseEther(n),pu=n=>Dc(n[0]),Kl=n=>{let e=n.reduce((t,a)=>t|1<{let e=F.from(n);return[...Array(vt.LAST_ROLE).keys()].map(t=>e.shr(t).mask(1).eq(1)?t:null).filter(zl)},_i=async(n,e,t,a)=>{if(F.from(t).eq(F.from(a)))return j5;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)},Fa=n=>U5(V5(n));var Sr=async(n,e)=>(await wi.connect(n,e).version()).toNumber(),Wl=(n,e)=>n.map(t=>{try{return e.parseLog(t)}catch{return null}}).filter(zl);var{hexDataSlice:Jl}=te,{MaxUint256:H5}=ht,Oc=n=>{let e=Jl(n,0,3),t=F.from(Jl(n,4,35)),a=F.from(Jl(n,36,67));return{sig:e,permissionDomainId:t,childSkillIndex:a}},Bc=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),H5,r];let o=F.from(_e.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 _i(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]},q5=async(n,e,t,a,i)=>{let r=await Promise.all(a.map(s=>Bc(n,e,t,s,i)));for(let s=0;sArray.isArray(a)?a.length===1?na(n,e,t,a[0],i):q5(n,e,t,a,i):Bc(n,e,t,a,i);var{MaxUint256:Fc}=ht,{AddressZero:G5}=ht;async function z5(n,e){let t;try{return t=await n.getCapabilityRoles(te.hexZeroPad(e,4)),yu(t)}catch{return[]}}async function Ns(n,e,t,a,i,r,s){let o,{skillId:l}=await e.getDomain(i),{sig:p,permissionDomainId:f,childSkillIndex:x}=Oc(s),I=vi.connect(r,a.signer||a.provider),_=await z5(I,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 ${_e.RootDomain}`);o=Fc}else{let{skillId:U}=await e.getDomain(f),H=await n.getChildSkillId(U,x);if(H.eq(l))o=Fc;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,G5);return{actionCid:o,key:v,value:S,branchMask:L,siblings:O}}var{AddressZero:K5}=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,a){this.colony=t,this.network=e;let i=a?.network||Nn.ArbitrumOne;this.endpointUrl=a?.customEndpointUrl||Ir[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 aa.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 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 a=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${a}/${i}`;return aa.fetchReputation(r)}async getTotalReputation(e,t){let a=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${a}/${i}/${K5}/noProof`,s=await aa.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 Et=n=>Array.from(Array(n-1)).map((e,t)=>t+1);var Lc=10,Mk=Et(Lc),Uc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Vc=Lc-1;var jc=3,Sk=Et(jc),Hc={1:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],2:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]},qc=jc-1;var Gc=10,Nk=Et(Gc),zc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Kc=Gc-1;var Wc=7,Bk=Et(Wc),Jc={1:[],2:[],3:[],4:[],5:[],6:[]},$c=Wc-1;var Qc=8,Uk=Et(Qc),Xc={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3],6:[1,2,3],7:[1,2,3]},Yc=Qc-1;var Zc=5,Hk=Et(Zc),em={1:[1,2,3,4,5,6,7,8,9,10,11,12,13],2:[1,2,3,4,5,6,7,8,9,10,11,12,13],3:[1,2,3,4,5,6,7,8,9,10,11,12,13],4:[1,2,3,4,5,6,7,8,9,10,11,12,13]},tm=Zc-1;var nm=7,zk=Et(nm),am={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3],6:[1,2,3]},im=nm-1;var rm=10,Jk=Et(rm),sm={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},om=rm-1;var um=14,Xk=Et(um),$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],11:[1,2,3,4,5,6],12:[1,2,3,4,5,6],13:[1,2,3,4,5,6]},Ql=um-1;var dm=18,W5=Et(dm),eA=dm-1;var J5=(n,e)=>{switch(n){case Ae.FundingQueue:return Uc[e];case Ae.IVotingReputation:return $l[e];case Ae.MultisigPermissions:return Hc[e];case Ae.OneTxPayment:return zc[e];case Ae.ReputationBootstrapper:return Jc[e];case Ae.StagedExpenditure:return em[e];case Ae.StakedExpenditure:return Xc[e];case Ae.StreamingPayments:return am[e];case Ae.TokenSupplier:return sm[e];case Ae.VotingReputation:return $l[e];default:return Nc(n,"Could not find extension with name")}},ki=(n,e,t)=>{let a=J5(n,e);return!!a&&!a.includes(t)};var $5={[Ae.FundingQueue]:Vc,[Ae.IVotingReputation]:Ql,[Ae.MultisigPermissions]:qc,[Ae.OneTxPayment]:Kc,[Ae.ReputationBootstrapper]:$c,[Ae.StagedExpenditure]:tm,[Ae.StakedExpenditure]:Yc,[Ae.StreamingPayments]:im,[Ae.TokenSupplier]:om,[Ae.VotingReputation]:Ql};var R6=_n(lm(),1);var bp=_n(C6(),1);var Re;(function(n){n.DEFAULT="default",n.Annotation="annotation",n.Colony="colony",n.Decision="decision",n.Domain="domain",n.Misc="misc"})(Re||(Re={}));var xp=2,hp;(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"})(hp||(hp={}));var I6=n=>`Validation error(s): +`)}static register(e,t){if(t||(t=e.locale),jx)try{let a=window;a._ethers&&a._ethers.wordlists&&(a._ethers.wordlists[t]||B(a._ethers.wordlists,t,e))}catch{}}};var Hx="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo",rs=null;function mf(n){if(rs==null&&(rs=Hx.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),hn.check(n)!=="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"))throw rs=null,new Error("BIP39 Wordlist for en (English) FAILED")}var ul=class extends hn{constructor(){super("en")}getWord(e){return mf(this),rs[e]}getWordIndex(e){return mf(this),rs.indexOf(e)}},dl=new ul;hn.register(dl);var bi={en:dl};var hf="hdnode/5.7.0";var ss=new E(hf),qx=F.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),Gx=ve("Bitcoin seed"),hr=2147483648;function bf(n){return(1<=256)throw new Error("Depth too large!");return xf(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(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 a=new Uint8Array(37);if(e&hr){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(ca(Xn.sha512,this.chainCode,a)),r=i.slice(0,32),s=i.slice(32),o=null,l=null;this.privateKey?o=Uo(F.from(r).add(this.privateKey).mod(qx)):l=new cn(K(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 Ct(mr,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 a=this;for(let i=0;i=hr)throw new Error("invalid path index - "+r);a=a._derive(hr+s)}else if(r.match(/^[0-9]+$/)){let s=parseInt(r);if(s>=hr)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(ca(Xn.sha512,Gx,a));return new Ct(mr,Uo(i.slice(0,32)),null,"0x00000000",Uo(i.slice(32)),0,0,t)}static fromMnemonic(e,t,a){return a=ll(a),e=gi(xr(e,a),a),Ct._fromSeed(pl(e,t),{phrase:e,path:"m",locale:a.locale})}static fromSeed(e){return Ct._fromSeed(e,null)}static fromExtendedKey(e){let t=fa.decode(e);(t.length!==82||xf(t.slice(0,78))!==e)&&ss.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");let a=t[4],i=K(t.slice(5,9)),r=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(mr,null,K(o),i,s,r,a,null);case"0x0488ade4":case"0x04358394 ":if(o[0]!==0)break;return new Ct(mr,K(o.slice(1)),null,i,s,r,a,null)}return ss.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}};function pl(n,e){e||(e="");let t=ve("mnemonic"+e,Gt.NFKD);return xi(ve(n,Gt.NFKD),t,2048,64,"sha512")}function xr(n,e){e=ll(e),ss.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=bf(s);if((j(Xt(a.slice(0,r/8)))[0]&o)!==(a[a.length-1]&o))throw new Error("invalid checksum");return K(a.slice(0,r/8))}function gi(n,e){if(e=ll(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]&zx(8-a)),a+=3);let i=n.length/4,r=j(Xt(n))[0]&bf(i);return t[t.length-1]<<=i,t[t.length-1]|=r>>8-i,e.join(t.map(s=>e.getWord(s)))}function gf(n,e){try{return xr(n,e),!0}catch{}return!1}function Tf(n){return(typeof n!="number"||n<0||n>=hr||n%1)&&ss.throwArgumentError("invalid account index","index",n),`m/44'/60'/${n}'/0/0`}var vf="random/5.7.0";var yl=new E(vf);function Kx(){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 wf=Kx(),Vo=wf.crypto||wf.msCrypto;(!Vo||!Vo.getRandomValues)&&(yl.warn("WARNING: Missing strong random number source"),Vo={getRandomValues:function(n){return yl.throwError("no secure random source avaialble",E.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function Yn(n){(n<=0||n>1024||n%1||n!=n)&&yl.throwArgumentError("invalid length","length",n);let e=new Uint8Array(n);return Vo.getRandomValues(e),j(e)}function os(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 ml=_n(cl());var jo="json-wallets/5.7.0";function ha(n){return typeof n=="string"&&n.substring(0,2)!=="0x"&&(n="0x"+n),j(n)}function br(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 xa.default.Counter(x),J=new xa.default.ModeOfOperation.ctr(O,M),$=j(J.encrypt(i)),de=fe(ye([U,$])),T={address:n.address.substring(2).toLowerCase(),id:kf(I),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:K(x).substring(2)},ciphertext:K($).substring(2),kdf:"scrypt",kdfparams:{salt:K(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)),C=new Date,u=C.getUTCFullYear()+"-"+br(C.getUTCMonth()+1,2)+"-"+br(C.getUTCDate(),2)+"T"+br(C.getUTCHours(),2)+"-"+br(C.getUTCMinutes(),2)+"-"+br(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:l,version:"0.1"}}return JSON.stringify(T)})}function Nf(n,e,t){if(Ho(n)){t&&t(0);let a=xl(n,e);return t&&t(1),Promise.resolve(a)}return qo(n)?Pf(n,e,t):Promise.reject(new Error("invalid JSON wallet"))}function Df(n,e){if(Ho(n))return xl(n,e);if(qo(n))return Rf(n,e);throw new Error("invalid JSON wallet")}var Of="wallet/5.7.0";var Bf=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},gr=new E(Of);function Xx(n){return n!=null&&ie(n.privateKey,32)&&n.address!=null}function Yx(n){let e=n.mnemonic;return e&&e.phrase}var In=class extends St{constructor(e,t){if(super(),Xx(e)){let a=new cn(e.privateKey);if(B(this,"_signingKey",()=>a),B(this,"address",mn(this.publicKey)),this.address!==ce(e.address)&&gr.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),Yx(e)){let i=e.mnemonic;B(this,"_mnemonic",()=>({phrase:i.phrase,path:i.path||ma,locale:i.locale||"en"}));let r=this.mnemonic,s=Ct.fromMnemonic(r.phrase,null,r.locale).derivePath(r.path);mn(s.privateKey)!==this.address&&gr.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else B(this,"_mnemonic",()=>null)}else{if(cn.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 a=new cn(e);B(this,"_signingKey",()=>a)}B(this,"_mnemonic",()=>null),B(this,"address",mn(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 In(this,e)}signTransaction(e){return Ie(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 a=this._signingKey().signDigest(fe(ns(t)));return ns(t,a)})}signMessage(e){return Bf(this,void 0,void 0,function*(){return Vr(this._signingKey().signDigest(nr(e)))})}_signTypedData(e,t,a){return Bf(this,void 0,void 0,function*(){let i=yield bt.resolveNames(e,t,a,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(bt.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={}),wl(this,e,t,a)}static createRandom(e){let t=Yn(16);e||(e={}),e.extraEntropy&&(t=j(Ce(fe(ye([t,e.extraEntropy])),0,16)));let a=gi(t,e.locale);return In.fromMnemonic(a,e.path,e.locale)}static fromEncryptedJson(e,t,a){return Nf(e,t,a).then(i=>new In(i))}static fromEncryptedJsonSync(e,t){return new In(Df(e,t))}static fromMnemonic(e,t,a){return t||(t=ma),new In(Ct.fromMnemonic(e,null,a).derivePath(t))}};function Ff(n,e){return ci(nr(n),e)}function Lf(n,e,t,a){return ci(bt.hash(n,e,t),a)}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:()=>Ol,JsonRpcBatchProvider:()=>ru,JsonRpcProvider:()=>Yt,JsonRpcSigner:()=>_r,NodesmithProvider:()=>Ms,PocketProvider:()=>Cs,Provider:()=>$t,Resolver:()=>wr,StaticJsonRpcProvider:()=>bs,UrlJsonRpcProvider:()=>It,Web3Provider:()=>Is,WebSocketProvider:()=>Ta,getDefaultProvider:()=>su,getNetwork:()=>ds,isCommunityResourcable:()=>Al,isCommunityResource:()=>ys,showThrottleMessage:()=>Zn});var Uf="networks/5.7.1";var Vf=new E(Uf);function Zx(n){return n&&typeof n.renetwork=="function"}function ba(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 ba(t)},e}function Ko(n,e){let t=function(a,i){return a.JsonRpcProvider?new a.JsonRpcProvider(n,e):null};return t.renetwork=function(a){return Ko(n,a)},t}var jf={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:ba("homestead")},Hf={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:ba("ropsten")},qf={chainId:63,name:"classicMordor",_defaultProvider:Ko("https://www.ethercluster.com/mordor","classicMordor")},zo={unspecified:{chainId:0,name:"unspecified"},homestead:jf,mainnet:jf,morden:{chainId:2,name:"morden"},ropsten:Hf,testnet:Hf,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:Ko("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:qf,classicTestnet:qf,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:Ko("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 ds(n){if(n==null)return null;if(typeof n=="number"){for(let a in zo){let i=zo[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=zo[n];return a==null?null:{name:a.name,chainId:a.chainId,ensAddress:a.ensAddress,_defaultProvider:a._defaultProvider||null}}let e=zo[n.name];if(!e)return typeof n.chainId!="number"&&Vf.throwArgumentError("invalid network chainId","network",n),n;n.chainId!==0&&n.chainId!==e.chainId&&Vf.throwArgumentError("network chainId mismatch","network",n);let t=n._defaultProvider||null;return t==null&&e._defaultProvider&&(Zx(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 Gf="web/5.7.1";var e5=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})};function zf(n,e){return e5(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 t5=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Sn=new E(Gf);function Kf(n){return new Promise(e=>{setTimeout(e,n)})}function Oa(n,e){if(n==null)return null;if(typeof n=="string")return n;if(ia(n)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return Jt(n)}catch{}return K(n)}return n}function n5(n){return ve(n.replace(/%([0-9a-f][0-9a-f])/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))}function _l(n,e,t){let a=typeof n=="object"&&n.throttleLimit!=null?n.throttleLimit:12;Sn.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;Sn.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"},f=!1,x=2*60*1e3;if(typeof n=="string")l=n;else if(typeof n=="object"){if((n==null||n.url==null)&&Sn.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&&(f=!0);if(p.allowGzip=!!n.allowGzip,n.user!=null&&n.password!=null){l.substring(0,6)!=="https:"&&n.allowInsecureAuthentication!==!0&&Sn.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 "+tr(ve(O))}}n.skipFetchSetup!=null&&(p.skipFetchSetup=!!n.skipFetchSetup),n.fetchOptions!=null&&(p.fetchOptions=we(n.fetchOptions))}let I=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),_=l?l.match(I):null;if(_)try{let O={statusCode:200,statusMessage:"OK",headers:{"content-type":_[1]||"text/plain"},body:_[2]?er(_[3]):n5(_[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: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(Sn.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 t5(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: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){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=ve(e);let r=typeof n=="string"?{url:n}:we(n);r.headers?Object.keys(r.headers).filter(o=>o.toLowerCase()==="content-type").length!==0||(r.headers=we(r.headers),r.headers["content-type"]="application/json"):r.headers={"content-type":"application/json"},n=r}return _l(n,i,a)}function Pn(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,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(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()&&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(f){s()&&a(f)})}p()})}var Il=_n(Qf());var ke="providers/5.7.2";var ps=new E(ke),Y=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),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(a),maxPriorityFeePerGas:Y.allowNull(a),maxFeePerGas:Y.allowNull(a),gasLimit:a,to:Y.allowNull(t,null),value:a,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(a),gasPrice:Y.allowNull(a),maxPriorityFeePerGas:Y.allowNull(a),maxFeePerGas:Y.allowNull(a),to:Y.allowNull(t),value:Y.allowNull(a),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:a,logsBloom:Y.allowNull(r),blockHash:s,transactionHash:s,logs:Y.arrayOf(this.receiptLog.bind(this)),blockNumber:l,confirmations:Y.allowNull(l,null),cumulativeGasUsed:a,effectiveGasPrice:Y.allowNull(a),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:a,gasUsed:a,miner:Y.allowNull(t),extraData:r,transactions:Y.allowNull(Y.arrayOf(s)),baseFeePerGas:Y.allowNull(a)},e.blockWithTransactions=we(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 a=this.hex(e,t);if(a.length%2!==0)throw new Error("invalid data; odd-length - "+e);return a}address(e){return ce(e)}callAddress(e){if(!ie(e,32))return null;let t=ce(Ce(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 a=this.hex(e,t);return Nt(a)!==32?ps.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 me(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=Y.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 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 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 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 a=F.from(t.root).toNumber();a===0||a===1?(t.status!=null&&t.status!==a&&ps.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=a,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 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 Al(n){return n&&typeof n.isCommunityResource=="function"}function ys(n){return Al(n)&&n.isCommunityResource()}var Xf=!1;function Zn(){Xf||(Xf=!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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},he=new E(ke),l5=10;function Yf(n){return n==null?"null":(Nt(n)!==32&&he.throwArgumentError("invalid topic","topic",n),n.toLowerCase())}function Zf(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[Yf(i)]=!0});let a=Object.keys(t);return a.sort(),a.join("|")}else return Yf(e)}).join("&")}function p5(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 vr(n){if(typeof n=="string"){if(n=n.toLowerCase(),Nt(n)===32)return"tx:"+n;if(n.indexOf(":")===-1)return n}else{if(Array.isArray(n))return"filter:*:"+Zf(n);if(wo.isForkEvent(n))throw he.warn("not implemented"),new Error("not implemented");if(n&&typeof n=="object")return"filter:"+(n.address||"*")+":"+Zf(n.topics||[])}throw new Error("invalid event - "+n)}function fs(){return new Date().getTime()}function ec(n){return new Promise(e=>{setTimeout(e,n)})}var y5=["block","network","pending","poll"],Sl=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=p5(e[2]),i={};return a.length>0&&(i.topics=a),t&&t!=="*"&&(i.address=t),i}pollable(){return this.tag.indexOf(":")>=0||y5.indexOf(this.tag)>=0}},f5={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(n){return me(F.from(n).toHexString(),32)}function tc(n){return fa.encode(ye([n,Ce(Xt(Xt(n)),0,4)]))}var ic=new RegExp("^(ipfs)://(.*)$","i"),nc=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),ic,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Qo(n,e){try{return Jt(cs(n,e))}catch{}return null}function cs(n,e){if(n==="0x")return null;let t=F.from(Ce(n,e,e+32)).toNumber(),a=F.from(Ce(n,t,t+32)).toNumber();return Ce(n,t+32,t+32+a)}function Ml(n){return n.match(/^ipfs:\/\/ipfs\//i)?n=n.substring(12):n.match(/^ipfs:\/\//i)?n=n.substring(7):he.throwArgumentError("unsupported IPFS format","link",n),`https://gateway.ipfs.io/ipfs/${n}`}function ac(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 c5(n){if(n.length%32===0)return n;let e=new Uint8Array(Math.ceil(n.length/32)*32);return e.set(n),e}function rc(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:_t([e,Ia(this.name),t||"0x"])},i=!1;(yield this.supportsWildcard())&&(i=!0,a.data=_t(["0x9061b923",rc([Yr(this.name),a.data])]));try{let r=yield this.provider.call(a);return j(r).length%32===4&&he.throwError("resolver threw error",E.errors.CALL_EXCEPTION,{transaction:a,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 a=yield this._fetch(e,t);return a!=null?cs(a,0):null})}_getAddress(e,t){let a=f5[String(e)];if(a==null&&he.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 tc(ye([[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 tc(ye([[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=Il.default.toWords(i.slice(2));return o.unshift(s),Il.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===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",El(e));if(t==null||t==="0x")return null;let a=this._getAddress(e,t);return a==null&&he.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 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 a=yield this._fetchBytes("0x59d1d43c",K(t));return a==null||a==="0x"?null:Jt(a)})}},Cl=null,m5=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 Pn(()=>this._ready().then(e=>e,e=>{if(!(e.code===E.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return Cl==null&&(Cl=new Y),Cl}static getNetwork(e){return ds(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 Rn({url:p,errorPassThrough:!0},f,(_,v)=>(_.status=v.statusCode,_));if(x.data)return x.data;let I=x.message||"unknown error";if(x.status>=400&&x.status<500)return he.throwError(`response not found during CCIP fetch: ${I}`,E.errors.SERVER_ERROR,{url:l,errorMessage:I});s.push(I)}return he.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(fs()-r.respTime<=e)return r.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}let t=fs(),a=Ie({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=fs();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=m5++,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)he.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${a})`),this.emit("error",he.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 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 ec(0),this._network;let a=he.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=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,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,f=function(){return p?!0:(p=!0,l.forEach(I=>{I()}),!1)},x=I=>{I.confirmations{this.removeListener(e,x)}),i){let I=i.startBlock,_=null,v=S=>ue(this,void 0,void 0,function*(){p||(yield ec(1e3),this.getTransactionCount(i.from).then(L=>ue(this,void 0,void 0,function*(){if(!p){if(L<=i.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),l.push(()=>{this.removeListener("block",v)})}if(typeof a=="number"&&a>0){let I=setTimeout(()=>{f()||o(he.makeError("timeout exceeded",E.errors.TIMEOUT,{timeout:a}))},a);I.unref&&I.unref(),l.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",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 Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getBalance",a);try{return F.from(i)}catch(r){return he.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 Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getTransactionCount",a);try{return F.from(i).toNumber()}catch(r){return he.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 Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getCode",a);try{return K(i)}catch(r){return he.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 Ie({address:this._getAddress(e),blockTag:this._getBlockTag(a),position:Promise.resolve(t).then(s=>Un(s))}),r=yield this.perform("getStorageAt",i);try{return K(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,a){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&&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&&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=>K(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?K(r):null))}),this.formatter.transactionRequest(yield Ie(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 Ie(t))})}_call(e,t,a){return ue(this,void 0,void 0,function*(){a>=l5&&he.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"&&Nt(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(),f=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&&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 Pn(()=>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 Pn(()=>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 Ie({filter:this._getFilter(e)}),a=yield this.perform("getLogs",t);return a.forEach(i=>{i.removed==null&&(i.removed=!1)}),Y.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&&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 a=yield this._getResolver(t,"getResolver");if(a!=null){let i=new wr(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||he.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"+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(a){if(ie(e))throw a}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",a=yield this._getResolver(t,"lookupAddress");if(a==null)return null;let i=Qo(yield this.call({to:a,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 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=Qo(yield this.call({to:s,data:"0x691f3431"+Ia(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 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,a){let i=new Sl(vr(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=vr(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=vr(e);return this._events.filter(a=>a.tag===t).length}listeners(e){if(e==null)return this._events.map(a=>a.listener);let t=vr(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=vr(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=vr(e);this._events=this._events.filter(i=>i.tag!==a?!0:(t.push(i),!1))}return t.forEach(a=>{this._stopEvent(a)}),this}};var ga=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},At=new E(ke),h5=["call","estimateGas"];function hs(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=hs(n[t],e);if(a)return a}return null}if(typeof n=="string")try{return hs(JSON.parse(n),e)}catch{}return null}function oc(n,e,t){let a=t.transaction||t.signedTransaction;if(n==="call"){let r=hs(e,!0);if(r)return r.data;At.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=hs(e.body,!1);r==null&&(r=hs(e,!1)),r&&At.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)&&At.throwError("insufficient funds for intrinsic transaction cost",E.errors.INSUFFICIENT_FUNDS,{error:e,method:n,transaction:a}),i.match(/nonce (is )?too low/i)&&At.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)&&At.throwError("replacement fee too low",E.errors.REPLACEMENT_UNDERPRICED,{error:e,method:n,transaction:a}),i.match(/only replay-protected/i)&&At.throwError("legacy pre-eip-155 transactions not supported",E.errors.UNSUPPORTED_OPERATION,{error:e,method:n,transaction:a}),h5.indexOf(n)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&At.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 sc(n){return new Promise(function(e){setTimeout(e,n)})}function x5(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 ms(n){return n&&n.toLowerCase()}var Rl={},_r=class extends St{constructor(e,t,a){if(super(),e!==Rl)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)):At.throwArgumentError("invalid address or index","addressOrIndex",a)}connect(e){return At.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&&At.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(a=>(a&&(a=a.toLowerCase()),a));if(e.gasLimit==null){let a=we(e);a.from=t,e.gasLimit=this.provider.estimateGas(a)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(a=>ga(this,void 0,void 0,function*(){if(a==null)return null;let i=yield this.provider.resolveName(a);return i==null&&At.throwArgumentError("provided ENS name resolves to null","tx.to",a),i}))),Ie({tx:Ie(e),sender:t}).then(({tx:a,sender:i})=>{a.from!=null?a.from.toLowerCase()!==i&&At.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)&&At.throwError("user rejected transaction",E.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:a}),oc("sendTransaction",s,r)))})}signTransaction(e){return At.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),a=yield this.sendUncheckedTransaction(e);try{return yield Pn(()=>ga(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 ga(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(e):e,a=yield this.getAddress();try{return yield this.provider.send("personal_sign",[K(t),a.toLowerCase()])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&At.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"signMessage",from:a,messageData:e}),i}})}_legacySignMessage(e){return ga(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(e):e,a=yield this.getAddress();try{return yield this.provider.send("eth_sign",[a.toLowerCase(),K(t)])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&At.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:a,messageData:e}),i}})}_signTypedData(e,t,a){return ga(this,void 0,void 0,function*(){let i=yield bt.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(bt.getPayload(i.domain,t,i.value))])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&At.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,a=yield this.getAddress();return t.send("personal_unlockAccount",[a.toLowerCase(),e,null])})}},Pl=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:a=>this.provider.waitForTransaction(t,a)}))}},b5={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 a=t;a==null&&(a=new Promise((i,r)=>{setTimeout(()=>{this.detectNetwork().then(s=>{i(s)},s=>{r(s)})},0)})),super(a),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 ga(this,void 0,void 0,function*(){yield sc(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(a){return At.throwError("could not detect network",E.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:a})}}return At.throwError("could not detect network",E.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new _r(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 a={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:ct(a),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(a),x5).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",[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),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 a=mt(this.constructor,"hexlifyTransaction");return["eth_call",[a(t.transaction,{from:!0}),t.blockTag]]}case"estimateGas":{let a=mt(this.constructor,"hexlifyTransaction");return["eth_estimateGas",[a(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 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=we(t),t.transaction=we(i),delete t.transaction.type)}}let a=this.prepareRequest(e,t);a==null&&At.throwError(e+" not implemented",E.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(a[0],a[1])}catch(i){return oc(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 sc(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=we(b5);if(t)for(let r in t)t[r]&&(a[r]=!0);Wi(e,a);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]=K(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(ke);kr=function(){e.throwError("WebSockets not supported in this environment",E.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var Nl=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Xo=new E(ke),g5=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 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 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){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 Nl(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 a=g5++;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 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: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 Nl(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 T5=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},xs=new E(ke),bs=class extends Yt{detectNetwork(){let e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return T5(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})}},It=class extends bs{constructor(e,t){xs.checkAbstract(new.target,It),e=mt(new.target,"getNetwork")(e),t=mt(new.target,"getApiKey")(t);let a=mt(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(){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 uc=new E(ke),Yo="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC",gs=class extends Ta{constructor(e,t){let a=new Ar(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===Yo}},Ar=class extends It{static getWebSocketProvider(e,t){return new gs(e,t)}static getApiKey(e){return e==null?Yo:(e&&typeof e!="string"&&uc.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:uc.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+a+t,throttleCallback:(i,r)=>(t===Yo&&Zn(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===Yo}};var v5=new E(ke),Zo="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function w5(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 v5.throwArgumentError("unsupported network","name",n)}var Ts=class extends It{isCommunityResource(){return this.apiKey===Zo}static getApiKey(e){return e??Zo}static getUrl(e,t){t==null&&(t=Zo);let a={allowGzip:!0,url:"https://"+w5(e.name)+t,throttleCallback:(i,r)=>(t.apiKey===Zo&&Zn(),Promise.resolve(!0))};return t.projectSecret!=null&&(a.user="",a.password=t.projectSecret),a}};var _5=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},dc=new E(ke),vs=class extends It{static getApiKey(e){return e!=null&&dc.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:dc.throwArgumentError("unsupported network","network",arguments[0])}return a}perform(e,t){let a=Object.create(null,{perform:{get:()=>super.perform}});return _5(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 eu=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Ba=new E(ke);function lc(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=Un(K(a)):t==="accessList"?a="["+sn(a).map(i=>`{address:"${i.address}",storageKeys:["${i.storageKeys.join('","')}"]}`).join(",")+"]":a=K(a),e[t]=a)}return e}function k5(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 pc(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 yc(n){if(n==="pending")throw new Error("pending not supported");return n==="latest"?n:parseInt(n.substring(2),16)}function Dl(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;Ba.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/)&&Ba.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/)&&Ba.throwError("nonce has already been used",E.errors.NONCE_EXPIRED,{error:e,method:n,transaction:t}),a.match(/another transaction with same nonce/)&&Ba.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/)&&Ba.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 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 Ba.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 eu(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"?pc:k5;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||pc);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 a=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=>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=lc(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=lc(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=yc(t.filter.fromBlock)),t.filter.toBlock&&(i.toBlock=yc(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(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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Ti=new E(ke);function tu(){return new Date().getTime()}function fc(n){let e=null;for(let t=0;te?null:(a+i)/2}function Er(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=>Er(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=Er(a),JSON.stringify(t)+":"+a}).join(",")+"}"}throw new Error("unknown value type: "+typeof n)}var A5=1;function mc(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 E5=[E.errors.CALL_EXCEPTION,E.errors.INSUFFICIENT_FUNDS,E.errors.NONCE_EXPIRED,E.errors.REPLACEMENT_UNDERPRICED,E.errors.UNPREDICTABLE_GAS_LIMIT],M5=["address","args","errorArgs","errorSignature","method","transaction"];function nu(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 C5(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 I5(n,e,t){let a=Er;switch(e){case"getBlockNumber":return function(i){let r=i.map(o=>o.result),s=cc(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 cc(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=we(i),i.confirmations=-1,Er(i))};break;case"getBlock":t.includeTransactions?a=function(i){return i==null?null:(i=we(i),i.transactions=i.transactions.map(r=>(r=we(r),r.confirmations=-1,r)),Er(i))}:a=function(i){return i==null?null:Er(i)};break;default:throw new Error("unknown method: "+e)}return C5(a,n.quorum)}function _s(n,e){return au(this,void 0,void 0,function*(){let t=n.provider;return t.blockNumber!=null&&t.blockNumber>=e||e===-1?t:Pn(()=>new Promise((a,i)=>{setTimeout(function(){return t.blockNumber>=e?a(t):n.cancelled?a(null):a(void 0)},0)}),{oncePoll:t})})}function S5(n,e,t,a){return au(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 _s(n,e)),i[t](a.address,a.blockTag||"latest");case"getStorageAt":return a.blockTag&&ie(a.blockTag)&&(i=yield _s(n,e)),i.getStorageAt(a.address,a.position,a.blockTag||"latest");case"getBlock":return a.blockTag&&ie(a.blockTag)&&(i=yield _s(n,e)),i[a.includeTransactions?"getBlockWithTransactions":"getBlock"](a.blockTag||a.blockHash);case"call":case"estimateGas":return a.blockTag&&ie(a.blockTag)&&(i=yield _s(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 _s(n,e)),i.getLogs(r)}}return Ti.throwError("unknown method error",E.errors.UNKNOWN_ERROR,{method:t,params:a})})}var ks=class extends ea{constructor(e,t){e.length===0&&Ti.throwArgumentError("missing providers","providers",e);let a=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=we(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)&&Ti.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&&Ti.throwArgumentError("quorum will always fail; larger than total weight","quorum",t);let r=fc(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 au(this,void 0,void 0,function*(){let e=yield Promise.all(this.providerConfigs.map(t=>t.provider.getNetwork()));return fc(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=S5(_,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 _=a(x);if(_!==void 0)return i.forEach(v=>{v.staller&&v.staller.cancel(),v.cancelled=!0}),_;o||(yield mc(100).getPromise()),o=!1}let I=i.reduce((_,v)=>{if(!v.done||v.error==null)return _;let S=v.error.code;return E5.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={};M5.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 Ol=null;var iu=new E(ke),As="84842078b09946638c03157f83405213",Es=class extends Ta{constructor(e,t){let a=new Mr(e,t),i=a.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",a.projectId),B(this,"projectId",a.projectId),B(this,"projectSecret",a.projectSecret)}isCommunityResource(){return this.projectId===As}},Mr=class extends It{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?(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 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:iu.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===As&&Zn(),Promise.resolve(!0))};return t.projectSecret!=null&&(i.user="",i.password=t.projectSecret),i}isCommunityResource(){return this.projectId===As}};var ru=class extends Yt{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: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 I=new Error(x.error.message);I.code=x.error.code,I.data=x.error.data,p.reject(I)}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(ke),R5="ETHERS_JS_SHARED",Ms=class extends It{static getApiKey(e){return e&&typeof e!="string"&&Bl.throwArgumentError("invalid apiKey","apiKey",e),e||R5}static getUrl(e,t){Bl.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:Bl.throwArgumentError("unsupported network","network",arguments[0])}return a+"?apiKey="+t}};var hc=new E(ke),xc="62e1ad51b37b8e00394bda3b",Cs=class extends It{static getApiKey(e){let t={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return e==null?t.applicationId=xc:typeof e=="string"?t.applicationId=e:e.applicationSecretKey!=null?(t.applicationId=e.applicationId,t.applicationSecretKey=e.applicationSecretKey):e.applicationId?t.applicationId=e.applicationId:hc.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:hc.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===xc}};var bc=new E(ke),P5=1;function gc(n,e){let t="Web3LegacyFetcher";return function(a,i){let r={method:a,params:i,id:P5++,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 N5(n){return function(e,t){t==null&&(t=[]);let a={method:e,params:t};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:ct(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 Is=class extends Yt{constructor(e,t){e==null&&bc.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=N5(e)):e.sendAsync?i=gc(e,e.sendAsync.bind(e)):e.send?i=gc(e,e.send.bind(e)):bc.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 Tc=new E(ke);function su(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 Yt(n);case"ws":case"wss":return new Ta(n);default:Tc.throwArgumentError("unsupported URL scheme","network",n)}}let t=ds(n);return(!t||!t._defaultProvider)&&Tc.throwError("unsupported getDefaultProvider network",E.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:n}),t._defaultProvider({FallbackProvider:ks,AlchemyProvider:Ar,AnkrProvider:Ts,CloudflareProvider:vs,EtherscanProvider:ws,InfuraProvider:Mr,JsonRpcProvider:Yt,NodesmithProvider:Ms,PocketProvider:Cs,Web3Provider:Is,IpcProvider:null},e)}var te={};Gi(te,{AbiCoder:()=>Zi,ConstructorFragment:()=>Dt,ErrorFragment:()=>tn,EventFragment:()=>Ht,FormatTypes:()=>ge,Fragment:()=>qt,FunctionFragment:()=>Ot,HDNode:()=>Ct,Indexed:()=>ua,Interface:()=>Sa,LogDescription:()=>ar,Logger:()=>E,ParamType:()=>pt,RLP:()=>no,SigningKey:()=>cn,SupportedAlgorithm:()=>Xn,TransactionDescription:()=>ir,TransactionTypes:()=>Po,UnicodeNormalizationForm:()=>Gt,Utf8ErrorFuncs:()=>ho,Utf8ErrorReason:()=>Bt,_TypedDataEncoder:()=>bt,_fetchData:()=>_l,_toEscapedUtf8String:()=>Cd,accessListify:()=>sn,arrayify:()=>j,base58:()=>fa,base64:()=>Dd,checkProperties:()=>Wi,checkResultErrors:()=>$i,commify:()=>Cc,computeAddress:()=>mn,computeHmac:()=>ca,computePublicKey:()=>ts,concat:()=>ye,deepCopy:()=>ct,defaultAbiCoder:()=>Qr,defaultPath:()=>ma,defineReadOnly:()=>B,dnsEncode:()=>Yr,entropyToMnemonic:()=>gi,fetchJson:()=>Rn,formatBytes32String:()=>Id,formatEther:()=>Ic,formatUnits:()=>Fl,getAccountPath:()=>Tf,getAddress:()=>ce,getContractAddress:()=>li,getCreate2Address:()=>Ny,getIcapAddress:()=>Py,getJsonWalletAddress:()=>bl,getStatic:()=>mt,hashMessage:()=>nr,hexConcat:()=>_t,hexDataLength:()=>Nt,hexDataSlice:()=>Ce,hexStripZeros:()=>xd,hexValue:()=>Un,hexZeroPad:()=>me,hexlify:()=>K,id:()=>nn,isAddress:()=>Ry,isBytes:()=>on,isBytesLike:()=>ia,isHexString:()=>ie,isValidMnemonic:()=>gf,isValidName:()=>Bd,joinSignature:()=>Vr,keccak256:()=>fe,mnemonicToEntropy:()=>xr,mnemonicToSeed:()=>pl,namehash:()=>Ia,nameprep:()=>Nd,parseBytes32String:()=>Sd,parseEther:()=>Sc,parseTransaction:()=>No,parseUnits:()=>Ll,poll:()=>Pn,randomBytes:()=>Yn,recoverAddress:()=>ci,recoverPublicKey:()=>Ro,resolveProperties:()=>Ie,ripemd160:()=>is,serializeTransaction:()=>ns,sha256:()=>Xt,sha512:()=>ol,shallowCopy:()=>we,shuffled:()=>os,solidityKeccak256:()=>_c,solidityPack:()=>ou,soliditySha256:()=>kc,splitSignature:()=>Vn,stripZeros:()=>Zt,toUtf8Bytes:()=>ve,toUtf8CodePoints:()=>Ca,toUtf8String:()=>Jt,verifyMessage:()=>Ff,verifyTypedData:()=>Lf,zeroPad:()=>si});var vc="solidity/5.7.0";var D5=new RegExp("^bytes([0-9]+)$"),O5=new RegExp("^(u?int)([0-9]*)$"),B5=new RegExp("^(.*)\\[([0-9]*)\\]$"),F5="0000000000000000000000000000000000000000000000000000000000000000",Cr=new E(vc);function wc(n,e,t){switch(n){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 a=n.match(O5);if(a){let i=parseInt(a[2]||"256");return(a[2]&&String(i)!==a[2]||i%8!==0||i===0||i>256)&&Cr.throwArgumentError("invalid number type","type",n),t&&(i=256),e=F.from(e).toTwos(i),si(e,i/8)}if(a=n.match(D5),a){let i=parseInt(a[1]);return(String(i)!==a[1]||i===0||i>32)&&Cr.throwArgumentError("invalid bytes type","type",n),j(e).byteLength!==i&&Cr.throwArgumentError(`invalid value for ${n}`,"value",e),t?j((e+F5).substring(0,66)):e}if(a=n.match(B5),a&&Array.isArray(e)){let i=a[1];parseInt(a[2]||String(e.length))!=e.length&&Cr.throwArgumentError(`invalid array length for ${n}`,"value",e);let s=[];return e.forEach(function(o){s.push(wc(i,o,!0))}),ye(s)}return Cr.throwArgumentError("invalid type","type",n)}function ou(n,e){n.length!=e.length&&Cr.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);let t=[];return n.forEach(function(a,i){t.push(wc(a,e[i]))}),K(ye(t))}function _c(n,e){return fe(ou(n,e))}function kc(n,e){return Xt(ou(n,e))}var Ac="units/5.7.0";var Ec=new E(Ac),Mc=["wei","kwei","mwei","gwei","szabo","finney","ether"];function Cc(n){let e=String(n).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||n==="."||n==="-.")&&Ec.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 Fl(n,e){if(typeof e=="string"){let t=Mc.indexOf(e);t!==-1&&(e=3*t)}return Ki(n,e??18)}function Ll(n,e){if(typeof n!="string"&&Ec.throwArgumentError("value must be a string","value",n),typeof e=="string"){let t=Mc.indexOf(e);t!==-1&&(e=3*t)}return dn(n,e??18)}function Ic(n){return Fl(n,18)}function Sc(n){return Ll(n,18)}var uu="ethers/5.7.2";var Rc=new E(uu);try{let n=window;n._ethers==null&&(n._ethers=Ul)}catch{}var Nn;(function(n){n.Mainnet="Mainnet",n.Custom="Custom",n.Gnosis="Xdai",n.Goerli="Goerli",n.Xdai="Xdai",n.XdaiQa="XdaiQa",n.ArbitrumOne="ArbitrumOne",n.ArbitrumSepolia="ArbitrumSepolia"})(Nn||(Nn={}));var Pc;(function(n){n[n.Custom=0]="Custom",n[n.Mainnet=1]="Mainnet",n[n.Goerli=5]="Goerli",n[n.Gnosis=100]="Gnosis",n[n.Xdai=100]="Xdai",n[n.XdaiQa=100]="XdaiQa",n[n.ArbitrumSepolia=421614]="ArbitrumSepolia",n[n.ArbitrumOne=42161]="ArbitrumOne"})(Pc||(Pc={}));var du;(function(n){n.Mainnet="0x5346D0f80e2816FaD329F2c140c870ffc3c3E2Ef",n.Goerli="0x79073fc2117dD054FCEdaCad1E7018C9CbE3ec0B",n.Xdai="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.XdaiQa="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.Custom="",n.ArbitrumOne="0xcccccdcc0ccf6c708d860e19353c5f9a49accccc",n.ArbitrumSepolia="0x7777494e3d8cce0D3570E21FEf820F9Fee077777"})(du||(du={}));var Ir;(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",n.ArbitrumOne="https://app.colony.io/reputation/arbitrum-one",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/reputation/arbitrum-sepolia"})(Ir||(Ir={}));var lu;(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="",n.ArbitrumOne="https://app.colony.io/metatransaction/arbitrum-one",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/metatransaction/arbitrum-sepolia"})(lu||(lu={}));var Vl;(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="",n.ArbitrumOne="https://app.colony.io/public-rpc/",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/public-rpc/"})(Vl||(Vl={}));var Ss;(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",n.ArbitrumOne=".colony.joincolony.arbitrum",n.ArbitrumSepolia=".colony.joincolony.sepolia"})(Ss||(Ss={}));var Rs;(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",n.ArbitrumOne=".user.joincolony.arbitrum",n.ArbitrumSepolia=".user.joincolony.sepolia"})(Rs||(Rs={}));var jl;(function(n){let e;(function(i){i.ETH="0x0000000000000000000000000000000000000000",i.CLNY="0x3E828ac5C480069D4765654Fb4b8733b910b13b2",i.USDC="0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"})(e=n.Mainnet||(n.Mainnet={}));let t;(function(i){i.XDAI="0x0000000000000000000000000000000000000000",i.CLNY="0xc9B6218AffE8Aba68a13899Cbf7cF7f14DDd304C",i.USDC="0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83"})(t=n.Gnosis||(n.Gnosis={}));let a;(function(i){i.ETH="0x0000000000000000000000000000000000000000",i.CLNY="0xcccccdcc0ccf6c708d860e19353c5f9a49accccc",i.USDC="0xaf88d065e77c8cC2239327C5EDb3A432268e5831"})(a=n.ArbitrumOne||(n.ArbitrumOne={}))})(jl||(jl={}));var _e;(function(n){n[n.RootDomain=1]="RootDomain",n[n.RootTeam=1]="RootTeam",n[n.RootPot=1]="RootPot",n[n.SkillIgnore=0]="SkillIgnore"})(_e||(_e={}));var zt;(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"})(zt||(zt={}));var ql="0x12345678",Hl;(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"})(Hl||(Hl={}));var vt;(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"})(vt||(vt={}));var Ae;(function(n){n.FundingQueue="FundingQueue",n.IVotingReputation="IVotingReputation",n.MultisigPermissions="MultisigPermissions",n.OneTxPayment="OneTxPayment",n.ReputationBootstrapper="ReputationBootstrapper",n.StagedExpenditure="StagedExpenditure",n.StakedExpenditure="StakedExpenditure",n.StreamingPayments="StreamingPayments",n.TokenSupplier="TokenSupplier",n.VotingReputation="VotingReputation"})(Ae||(Ae={}));var Gl=[{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(Gl)}static connect(e,t){return new oe(e,Gl,t)}};xe(vi,"abi",Gl);var zl=[{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"}],wi=class{static createInterface(){return new te.Interface(zl)}static connect(e,t){return new oe(e,zl,t)}};xe(wi,"abi",zl);var Nc=(n,e)=>{throw new Error(`${e}: ${n}`)},pu=n=>n!=null;var{keccak256:U5,toUtf8Bytes:V5}=te,{MaxUint256:j5}=ht;var Ps=n=>te.formatEther(n),Dc=n=>te.parseEther(n),yu=n=>Dc(n[0]),Kl=n=>{let e=n.reduce((t,a)=>t|1<{let e=F.from(n);return[...Array(vt.LAST_ROLE).keys()].map(t=>e.shr(t).mask(1).eq(1)?t:null).filter(pu)},_i=async(n,e,t,a)=>{if(F.from(t).eq(F.from(a)))return j5;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)},Fa=n=>U5(V5(n));var Sr=async(n,e)=>(await wi.connect(n,e).version()).toNumber(),Wl=(n,e)=>n.map(t=>{try{return e.parseLog(t)}catch{return null}}).filter(pu);var{hexDataSlice:Jl}=te,{MaxUint256:H5}=ht,Oc=n=>{let e=Jl(n,0,3),t=F.from(Jl(n,4,35)),a=F.from(Jl(n,36,67));return{sig:e,permissionDomainId:t,childSkillIndex:a}},Bc=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),H5,r];let o=F.from(_e.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 _i(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]},q5=async(n,e,t,a,i)=>{let r=await Promise.all(a.map(s=>Bc(n,e,t,s,i)));for(let s=0;sArray.isArray(a)?a.length===1?na(n,e,t,a[0],i):q5(n,e,t,a,i):Bc(n,e,t,a,i);var{MaxUint256:Fc}=ht,{AddressZero:G5}=ht;async function z5(n,e){let t;try{return t=await n.getCapabilityRoles(te.hexZeroPad(e,4)),fu(t)}catch{return[]}}async function Ns(n,e,t,a,i,r,s){let o,{skillId:l}=await e.getDomain(i),{sig:p,permissionDomainId:f,childSkillIndex:x}=Oc(s),I=vi.connect(r,a.signer||a.provider),_=await z5(I,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 ${_e.RootDomain}`);o=Fc}else{let{skillId:U}=await e.getDomain(f),H=await n.getChildSkillId(U,x);if(H.eq(l))o=Fc;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,G5);return{actionCid:o,key:v,value:S,branchMask:L,siblings:O}}var{AddressZero:K5}=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,a){this.colony=t,this.network=e;let i=a?.network||Nn.ArbitrumOne;this.endpointUrl=a?.customEndpointUrl||Ir[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 aa.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 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 a=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${a}/${i}`;return aa.fetchReputation(r)}async getTotalReputation(e,t){let a=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${a}/${i}/${K5}/noProof`,s=await aa.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 Et=n=>Array.from(Array(n-1)).map((e,t)=>t+1);var Lc=10,Mk=Et(Lc),Uc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Vc=Lc-1;var jc=3,Sk=Et(jc),Hc={1:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],2:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]},qc=jc-1;var Gc=10,Nk=Et(Gc),zc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Kc=Gc-1;var Wc=7,Bk=Et(Wc),Jc={1:[],2:[],3:[],4:[],5:[],6:[]},$c=Wc-1;var Qc=8,Uk=Et(Qc),Xc={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3],6:[1,2,3],7:[1,2,3]},Yc=Qc-1;var Zc=5,Hk=Et(Zc),em={1:[1,2,3,4,5,6,7,8,9,10,11,12,13],2:[1,2,3,4,5,6,7,8,9,10,11,12,13],3:[1,2,3,4,5,6,7,8,9,10,11,12,13],4:[1,2,3,4,5,6,7,8,9,10,11,12,13]},tm=Zc-1;var nm=7,zk=Et(nm),am={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3],6:[1,2,3]},im=nm-1;var rm=10,Jk=Et(rm),sm={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},om=rm-1;var um=14,Xk=Et(um),$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],11:[1,2,3,4,5,6],12:[1,2,3,4,5,6],13:[1,2,3,4,5,6]},Ql=um-1;var dm=18,W5=Et(dm),eA=dm-1;var J5=(n,e)=>{switch(n){case Ae.FundingQueue:return Uc[e];case Ae.IVotingReputation:return $l[e];case Ae.MultisigPermissions:return Hc[e];case Ae.OneTxPayment:return zc[e];case Ae.ReputationBootstrapper:return Jc[e];case Ae.StagedExpenditure:return em[e];case Ae.StakedExpenditure:return Xc[e];case Ae.StreamingPayments:return am[e];case Ae.TokenSupplier:return sm[e];case Ae.VotingReputation:return $l[e];default:return Nc(n,"Could not find extension with name")}},ki=(n,e,t)=>{let a=J5(n,e);return!!a&&!a.includes(t)};var $5={[Ae.FundingQueue]:Vc,[Ae.IVotingReputation]:Ql,[Ae.MultisigPermissions]:qc,[Ae.OneTxPayment]:Kc,[Ae.ReputationBootstrapper]:$c,[Ae.StagedExpenditure]:tm,[Ae.StakedExpenditure]:Yc,[Ae.StreamingPayments]:im,[Ae.TokenSupplier]:om,[Ae.VotingReputation]:Ql};var R6=_n(lm(),1);var bp=_n(C6(),1);var Re;(function(n){n.DEFAULT="default",n.Annotation="annotation",n.Colony="colony",n.Decision="decision",n.Domain="domain",n.Misc="misc"})(Re||(Re={}));var xp=2,hp;(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"})(hp||(hp={}));var I6=n=>`Validation error(s): ${n.map(t=>`Error in ${t.path}. Seen: ${t.value}, expected: ${t.expected}`).join(` -`)}`,u1=n=>({...n,isWhitelistActivated:n.isWhitelistActivated||!1,colonySafes:n.colonySafes||[],colonyTokens:n.colonyTokens||[],verifiedAddresses:n.verifiedAddresses||[]}),gp=(n,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&&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"?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 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}))&&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"?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: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}})(n);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 a=I6(t.errors);throw new Error(a)};var S6=(n,e)=>{let t=n===Re.Colony?u1(e):e,a=(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&&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"?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 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}))&&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"?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: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}})({name:n,data:t,version:xp});if(!a.success){let i=I6(a.errors);throw new Error(i)}return a.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,R6.default)(fetch,{headers:{Accept:"application/json"},retryOn:[404,503],retries:3,retryDelay:5e3}),js={[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]:""},Or=class{adapter;constructor(e){this.adapter=e||new vp}static eventSupportsMetadata(e){return!!Object.keys(js).includes(e)}async getMetadata(e,t){let a=this.adapter.getIpfsUrl(e),r=await(await wp(a)).json();return gp(r,t)}async getMetadataForEvent(e,t){let a=this.adapter.getIpfsUrl(t),r=await(await wp(a)).json(),s=Object.entries(js).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),a=await wp(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=S6(e,t),i=JSON.stringify(a);return this.adapter.uploadJson(i)}};var d1=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||d1;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"}],Si=class{static createInterface(){return new te.Interface(Mp)}static connect(e,t){return new oe(e,Mp,t)}};xe(Si,"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:"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:"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:[{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:"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:"returnData",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",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:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],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:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"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:[],name:"unlock",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"}],P6="0x60c060405234801561001057600080fd5b5060405161205738038061205783398101604081905261002f91610307565b60008060018161003d6101ab565b6001600160a01b031681526020810191909152604001600090812091909155556100656101ab565b600480546001600160a01b0319166001600160a01b039290921691909117905561008d6101ab565b6001600160a01b03167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a260066100ce8482610413565b5060056100db8382610413565b5060ff81166080526007805460ff1916600117905560405146907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f90610123906006906104d1565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051601f19818403018152919052805160209091012060a0525061054692505050565b60003633301480156101be575060348110155b1561024757600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e881146102365733935050505090565b5001516001600160a01b0316919050565b3391505090565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261027557600080fd5b81516001600160401b0381111561028e5761028e61024e565b604051601f8201601f19908116603f011681016001600160401b03811182821017156102bc576102bc61024e565b6040528181528382016020018510156102d457600080fd5b60005b828110156102f3576020818601810151838301820152016102d7565b506000918101602001919091529392505050565b60008060006060848603121561031c57600080fd5b83516001600160401b0381111561033257600080fd5b61033e86828701610264565b602086015190945090506001600160401b0381111561035c57600080fd5b61036886828701610264565b925050604084015160ff8116811461037f57600080fd5b809150509250925092565b600181811c9082168061039e57607f821691505b6020821081036103be57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561040e57806000526020600020601f840160051c810160208510156103eb5750805b601f840160051c820191505b8181101561040b57600081556001016103f7565b50505b505050565b81516001600160401b0381111561042c5761042c61024e565b6104408161043a845461038a565b846103c4565b6020601f821160018114610474576000831561045c5750848201515b600019600385901b1c1916600184901b17845561040b565b600084815260208120601f198516915b828110156104a45787850151825560209485019460019092019101610484565b50848210156104c25786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b60008083546104df8161038a565b6001821680156104f6576001811461050b5761053b565b60ff198316865281151582028601935061053b565b86600052602060002060005b8381101561053357815488820152600190910190602001610517565b505081860193505b509195945050505050565b60805160a051611ae5610572600039600081816102e10152610f870152600061029b0152611ae56000f3fe6080604052600436106101815760003560e01c80637a9e5e4b116100d1578063a69df4b51161008a578063bf7e214f11610064578063bf7e214f146104b1578063cf309012146104d1578063d505accf146104eb578063dd62ed3e1461050b57600080fd5b8063a69df4b51461047c578063a9059cbb14610491578063b3eac1d8146103b957600080fd5b80637a9e5e4b146103995780637ecebe00146103b95780638da5cb5b146103ef57806395d89b41146104275780639dc29fac1461043c578063a0712d681461045c57600080fd5b806330adf81f1161013e57806340c10f191161011857806340c10f191461030357806342966c68146103235780636281133d1461034357806370a082311461036357600080fd5b806330adf81f14610255578063313ce567146102895780633644e515146102cf57600080fd5b806306fdde0314610186578063095ea7b3146101b15780630c53c51c146101e157806313af4035146101f457806318160ddd1461021657806323b872dd14610235575b600080fd5b34801561019257600080fd5b5061019b610551565b6040516101a891906115b0565b60405180910390f35b3480156101bd57600080fd5b506101d16101cc3660046115d8565b6105df565b60405190151581526020016101a8565b61019b6101ef3660046116bf565b610672565b34801561020057600080fd5b5061021461020f366004611733565b610859565b005b34801561022257600080fd5b506000545b6040519081526020016101a8565b34801561024157600080fd5b506101d1610250366004611750565b6108dc565b34801561026157600080fd5b506102277f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b34801561029557600080fd5b506102bd7f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101a8565b3480156102db57600080fd5b506102277f000000000000000000000000000000000000000000000000000000000000000081565b34801561030f57600080fd5b5061021461031e3660046115d8565b610950565b34801561032f57600080fd5b5061021461033e366004611791565b610a3f565b34801561034f57600080fd5b506101d161035e3660046117aa565b610a53565b34801561036f57600080fd5b5061022761037e366004611733565b6001600160a01b031660009081526001602052604090205490565b3480156103a557600080fd5b506102146103b4366004611733565b610ba7565b3480156103c557600080fd5b506102276103d4366004611733565b6001600160a01b031660009081526008602052604090205490565b3480156103fb57600080fd5b5060045461040f906001600160a01b031681565b6040516001600160a01b0390911681526020016101a8565b34801561043357600080fd5b5061019b610c18565b34801561044857600080fd5b506102146104573660046115d8565b610c25565b34801561046857600080fd5b50610214610477366004611791565b610e1c565b34801561048857600080fd5b50610214610e54565b34801561049d57600080fd5b506101d16104ac3660046115d8565b610e87565b3480156104bd57600080fd5b5060035461040f906001600160a01b031681565b3480156104dd57600080fd5b506007546101d19060ff1681565b3480156104f757600080fd5b50610214610506366004611831565b610ea2565b34801561051757600080fd5b506102276105263660046118a0565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6006805461055e906118d9565b80601f016020809104026020016040519081016040528092919081815260200182805461058a906118d9565b80156105d75780601f106105ac576101008083540402835291602001916105d7565b820191906000526020600020905b8154815290600101906020018083116105ba57829003601f168201915b505050505081565b600081600260006105ee611191565b6001600160a01b0390811682526020808301939093526040918201600090812091881680825291909352912091909155610626611191565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161066091815260200190565b60405180910390a35060015b92915050565b60606106a186610697886001600160a01b031660009081526008602052604090205490565b4688888888610a53565b6107045760405162461bcd60e51b815260206004820152602960248201527f6d6574617472616e73616374696f6e2d7369676e65722d7369676e617475726560448201526805adad2e6dac2e8c6d60bb1b60648201526084015b60405180910390fd5b61070d86611234565b6000306001600160a01b0316867f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e88960405160200161074e93929190611913565b60408051601f19818403018152908290526107689161194c565b6000604051808303816000865af19150503d80600081146107a5576040519150601f19603f3d011682016040523d82523d6000602084013e6107aa565b606091505b50925090508061080d5760405162461bcd60e51b815260206004820152602860248201527f636f6c6f6e792d6d65746174782d66756e6374696f6e2d63616c6c2d756e737560448201526718d8d95cdcd99d5b60c21b60648201526084016106fb565b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b87610837611191565b8860405161084793929190611968565b60405180910390a15095945050505050565b610876610864611191565b6000356001600160e01b031916611260565b6108925760405162461bcd60e51b81526004016106fb9061199d565b600480546001600160a01b0319166001600160a01b0383169081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60075460009060ff161561093d576108f5610864611191565b61093d5760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b61094884848461133b565b949350505050565b61095b610864611191565b6109775760405162461bcd60e51b81526004016106fb9061199d565b6001600160a01b0382166000908152600160205260408120805483929061099f9084906119e1565b92505081905550806000808282546109b791906119e1565b90915550506040518181526001600160a01b038316907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a26040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b610a50610a4a611191565b82610c25565b50565b600080610ad088308989604051602001610a7094939291906119f4565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b6040805160008082526020820180845284905260ff87169282019290925260608101889052608081018790529192509060019060a0016020604051602081039080840390855afa158015610b28573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610b8b5760405162461bcd60e51b815260206004820152601f60248201527f636f6c6f6e792d6d65746174782d696e76616c69642d7369676e61747572650060448201526064016106fb565b6001600160a01b038a8116911614915050979650505050505050565b610bb2610864611191565b610bce5760405162461bcd60e51b81526004016106fb9061199d565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6005805461055e906118d9565b610c2d611191565b6001600160a01b0316826001600160a01b031614610d2d576001600160a01b03821660009081526002602052604081208291610c67611191565b6001600160a01b03166001600160a01b03168152602001908152602001600020541015610cd65760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03821660009081526002602052604081208291610cf8611191565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610d279190611a3a565b90915550505b6001600160a01b038216600090815260016020526040902054811115610d955760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b03821660009081526001602052604081208054839290610dbd908490611a3a565b9250508190555080600080828254610dd59190611a3a565b90915550506040518181526001600160a01b038316907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59060200160405180910390a25050565b610e27610864611191565b610e435760405162461bcd60e51b81526004016106fb9061199d565b610a50610e4e611191565b82610950565b610e5f610864611191565b610e7b5760405162461bcd60e51b81526004016106fb9061199d565b6007805460ff19169055565b6000610e9b610e94611191565b84846108dc565b9392505050565b60075460ff1615610f0057610eb8610864611191565b610f005760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b42841015610f505760405162461bcd60e51b815260206004820152601d60248201527f636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e6500000060448201526064016106fb565b6040805180820182526002815261190160f01b6020808301919091526001600160a01b038a166000908152600890915291822080547f0000000000000000000000000000000000000000000000000000000000000000917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c9188610fd983611a4d565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161103d93929190611a66565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa1580156110a8573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906110de5750886001600160a01b0316816001600160a01b0316145b61112a5760405162461bcd60e51b815260206004820152601e60248201527f636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e6174757265000060448201526064016106fb565b6001600160a01b038981166000818152600260209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b60003633301480156111a4575060348110155b1561122d57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e8811461121c5733935050505090565b5001516001600160a01b0316919050565b3391505090565b6001600160a01b038116600090815260086020526040812080549161125883611a4d565b919050555050565b6000306001600160a01b0384160361127a5750600161066c565b6004546001600160a01b03908116908416036112985750600161066c565b6003546001600160a01b03166112b05750600061066c565b60035460405163b700961360e01b81526001600160a01b0385811660048301523060248301526001600160e01b0319851660448301529091169063b700961390606401602060405180830381865afa158015611310573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113349190611a8d565b905061066c565b6000611345611191565b6001600160a01b0316846001600160a01b031614611445576001600160a01b0384166000908152600260205260408120839161137f611191565b6001600160a01b03166001600160a01b031681526020019081526020016000205410156113ee5760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03841660009081526002602052604081208391611410611191565b6001600160a01b03166001600160a01b03168152602001908152602001600020600082825461143f9190611a3a565b90915550505b6001600160a01b0384166000908152600160205260409020548211156114ad5760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b038416600090815260016020526040812080548492906114d5908490611a3a565b90915550506001600160a01b038316600090815260016020526040812080548492906115029084906119e1565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161154e91815260200190565b60405180910390a35060019392505050565b60005b8381101561157b578181015183820152602001611563565b50506000910152565b6000815180845261159c816020860160208601611560565b601f01601f19169290920160200192915050565b602081526000610e9b6020830184611584565b6001600160a01b0381168114610a5057600080fd5b600080604083850312156115eb57600080fd5b82356115f6816115c3565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261162b57600080fd5b813567ffffffffffffffff81111561164557611645611604565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561167457611674611604565b60405281815283820160200185101561168c57600080fd5b816020850160208301376000918101602001919091529392505050565b803560ff811681146116ba57600080fd5b919050565b600080600080600060a086880312156116d757600080fd5b85356116e2816115c3565b9450602086013567ffffffffffffffff8111156116fe57600080fd5b61170a8882890161161a565b9450506040860135925060608601359150611727608087016116a9565b90509295509295909350565b60006020828403121561174557600080fd5b8135610e9b816115c3565b60008060006060848603121561176557600080fd5b8335611770816115c3565b92506020840135611780816115c3565b929592945050506040919091013590565b6000602082840312156117a357600080fd5b5035919050565b600080600080600080600060e0888a0312156117c557600080fd5b87356117d0816115c3565b96506020880135955060408801359450606088013567ffffffffffffffff8111156117fa57600080fd5b6118068a828b0161161a565b9450506080880135925060a0880135915061182360c089016116a9565b905092959891949750929550565b600080600080600080600060e0888a03121561184c57600080fd5b8735611857816115c3565b96506020880135611867816115c3565b95506040880135945060608801359350611883608089016116a9565b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156118b357600080fd5b82356118be816115c3565b915060208301356118ce816115c3565b809150509250929050565b600181811c908216806118ed57607f821691505b60208210810361190d57634e487b7160e01b600052602260045260246000fd5b50919050565b60008451611925818460208901611560565b919091019283525060601b6bffffffffffffffffffffffff19166020820152603401919050565b6000825161195e818460208701611560565b9190910192915050565b6001600160a01b0384811682528316602082015260606040820181905260009061199490830184611584565b95945050505050565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561066c5761066c6119cb565b8481526bffffffffffffffffffffffff198460601b16602082015282603482015260008251611a2a816054850160208701611560565b9190910160540195945050505050565b8181038181111561066c5761066c6119cb565b600060018201611a5f57611a5f6119cb565b5060010190565b60008451611a78818460208901611560565b91909101928352506020820152604001919050565b600060208284031215611a9f57600080fd5b81518015158114610e9b57600080fdfea264697066735822122090928a66070125904780390eb49d45fe12c136aec641b1db69316e0ffefc6da764736f6c634300081b0033",f1=n=>n.length>1,Dn=class extends hi{constructor(...e){f1(e)?super(...e):super(Ku,P6,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(Ku)}static connect(e,t){return new oe(e,Ku,t)}};xe(Dn,"bytecode",P6),xe(Dn,"abi",Ku);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:"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:"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:[{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:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",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:"_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:"_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:"returnData",type:"bytes"}],stateMutability:"payable",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:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"",type:"address"}],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"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",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:"_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:"_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:"_token",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"incrementLockCounterTo",outputs:[],stateMutability:"nonpayable",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:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"pure",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetwork",type:"address"}],name:"setColonyNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",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:"_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:"_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:"_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:"_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"}],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(n){n.TokenClient="TokenClient",n.TokenLockingClient="TokenLockingClient"})(Pi||(Pi={}));var On;(function(n){n.Colony="Colony",n.ColonyLegacy="ColonyLegacy",n.Erc20="Erc20",n.Erc2612="Erc2612",n.Sai="Sai"})(On||(On={}));var{AddressZero:x1}=ht;async function b1(n){try{await n.authority();return}catch{throw new Error("Token can not be assigned a TokenAuthority")}}var g1=async(n,e)=>{let t,a=!0,i=!0;t=Dn.connect(n,e);try{await t.totalSupply()}catch(r){throw new Error(`Token is probably not a valid ERC20 token, got ${r.message}`)}try{await t.locked(),await b1(t)}catch{a=!1}try{await t.nonces(x1)}catch{i=!1}return a?t.tokenClientType=On.Colony:i?(t=vn.connect(n,e),t.tokenClientType=On.Erc2612):(t=Tn.connect(n,e),t.tokenClientType=On.Erc20),t.clientType=Pi.TokenClient,t},Ip=g1;var T1=(n,e)=>{let t=Ri.connect(n,e);return t.clientType=Pi.TokenLockingClient,t},Sp=T1;var{AddressZero:Rp}=ht,v1=Tn.connect(Rp,new ta.BaseProvider(3656691)).interface,w1=Si.connect(Rp,new ta.BaseProvider(3656691)).interface,_1=vn.connect(Rp,new ta.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"},{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:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{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:"returnData",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:"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:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"}],Hs=class{static createInterface(){return new te.Interface(Pp)}static connect(e,t){return new oe(e,Pp,t)}};Hs.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:"returnData",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(Np)}static connect(e,t){return new oe(e,Np,t)}};qs.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:!1,internalType:"address",name:"bridgeAddress",type:"address"}],name:"BridgeSet",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:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateSentToBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateStoredFromBridge",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:"uint256",name:"skillId",type:"uint256"}],name:"SkillAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillCreationStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillStoredFromBridge",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:[{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"address",name:"_resolver",type:"address"}],name:"addColonyVersion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_resolver",type:"address"}],name:"addExtensionToNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"addPendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPendingSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"addReputationUpdateLogFromBridge",outputs:[],stateMutability:"nonpayable",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:"_parentSkillId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"addSkillFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",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:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"chainId",type:"uint256"}],name:"bridgeCurrentRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"bridgePendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"skillId",type:"uint256"}],name:"bridgeSkillIfNotMiningChain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"burnUnneededRewards",outputs:[],stateMutability:"nonpayable",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:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"}],name:"claimMiningReward",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:"address",name:"_tokenAddress",type:"address"}],name:"createMetaColony",outputs:[],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:"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:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateExtension",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:"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:"returnData",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"getBridgedReputationUpdateCount",outputs:[{internalType:"uint256",name:"bridgedReputationCount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"}],name:"getBridgedSkillCounts",outputs:[{internalType:"uint256",name:"skillCount",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:"uint256",name:"_id",type:"uint256"}],name:"getColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyBridgeAddress",outputs:[{internalType:"address",name:"bridge",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCreationSalt",outputs:[{internalType:"bytes32",name:"salt",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"}],name:"getColonyVersionResolver",outputs:[{internalType:"address",name:"_resolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentColonyVersion",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getENSRegistrar",outputs:[{internalType:"address",name:"_address",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:[{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:[],name:"getFeeInverse",outputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMetaColony",outputs:[{internalType:"address payable",name:"_colonyAddress",type:"address"}],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:"getMiningChainId",outputs:[{internalType:"uint256",name:"reputationMiningChainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"}],name:"getMiningDelegator",outputs:[{internalType:"address",name:"_delegator",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiningResolver",outputs:[{internalType:"address",name:"miningResolverAddress",type:"address"}],stateMutability:"view",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:"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:"address",name:"_token",type:"address"}],name:"getPayoutWhitelist",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"getPendingReputationUpdate",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:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.PendingReputationUpdate",name:"update",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"getPendingSkillAddition",outputs:[{internalType:"uint256",name:"parentId",type:"uint256"}],stateMutability:"view",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:"_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:[{internalType:"bool",name:"_active",type:"bool"}],name:"getReputationMiningCycle",outputs:[{internalType:"address",name:"_repMiningCycleAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningCycleReward",outputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningSkillId",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"view",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:"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_deprecated",type:"bool"}],internalType:"struct ColonyNetworkDataTypes.Skill",name:"_skill",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSkillCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTokenLocking",outputs:[{internalType:"address",name:"_lockingAddress",type:"address"}],stateMutability:"view",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:"miningChainId",type:"uint256"},{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"}],name:"initialiseReputationMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[{internalType:"uint256",name:"_rootLocalSkillId",type:"uint256"}],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:"address",name:"_colony",type:"address"}],name:"isColony",outputs:[{internalType:"bool",name:"_addressIsColony",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],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:"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:"_stakers",type:"address[]"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"punishStakers",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:"_username",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerUserLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_bridgeAddress",type:"address"}],name:"setColonyBridgeAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],name:"setFeeInverse",outputs:[],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:"_miningResolverAddress",type:"address"}],name:"setMiningResolver",outputs:[],stateMutability:"nonpayable",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:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",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:"uint256",name:"_amount",type:"uint256"}],name:"setReputationMiningCycleReward",outputs:[],stateMutability:"nonpayable",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:[{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"},{internalType:"uint256",name:"nonce",type:"uint256"}],name:"setReputationRootHashFromBridge",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:"address",name:"_tokenLockingAddress",type:"address"}],name:"setTokenLocking",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:"uint256",name:"_amount",type:"uint256"}],name:"stakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"startNextCycle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"startTokenAuction",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:"bytes32",name:"_extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"unstakeForMining",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:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"}],Ni=class{static createInterface(){return new te.Interface(Dp)}static connect(e,t){return new oe(e,Dp,t)}};Ni.abi=Dp;var va=class{constructor({contract:e,config:t,method:a,args:i,eventData:r,txConfig:s}){this.config=t,this.contract=e,this.method=a,this.args=i,this.eventData=r,this.txConfig=s}async getArgs(e){let t=[];return typeof this.args=="function"?t=await this.args():t=this.args,e&&t.push(e),t}async getTx(e){let t=await this.getArgs(e);return await this.contract.functions[this.method].apply(this.contract,t)}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.config.ipfs.getMetadataForEvent.bind(this.config.ipfs,js[this.txConfig.metadataType],t.metadata);return[t,e,a]}return[t,e]}return[{},e]}async broadcastMetaTx(e){let{provider:t}=this.config.getSigner();if(!t)throw new Error("No provider found");let i=await(await fetch(`${this.config.metaTxBroadcasterEndpoint}/broadcast`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();if(i.status!=="success")throw new Error(`Could not send Metatransaction. Reason given: ${i.data.reason}`);if(!i.data?.txHash)throw new Error("Could not get transaction hash from broadcaster response");return t.getTransaction(i.data.txHash)}async waitForMetaTx(e){let t=await e.wait();return t.parsedLogs=Wl(t.logs,this.contract.interface),t}tx(){return{send:async e=>{let t=await this.getTx(e);return[t,this.getMined.bind(this,t)]},mined:async e=>{let t=await this.getTx(e);return this.getMined(t)},encode:async()=>{let e=await this.getArgs();return this.contract.interface.encodeFunctionData(this.method,e)}}}};var{arrayify:A1,solidityKeccak256:E1,splitSignature:M1}=te,Va=class extends va{async sendMetaTransaction(e,t){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let a=this.config.getSigner(),{provider:i}=a;if(!i)throw new Error("No provider found");let r;this.config.network===Nn.Custom?r=1:r=(await i.getNetwork()).chainId;let s=await a.getAddress(),o=await this.contract.functions.getMetatransactionNonce(s),l=E1(["uint256","address","uint256","bytes"],[o.toString(),t,r,e]),p=A1(l),f=await a.signMessage(p),{r:x,s:I,v:_}=M1(f),v={target:t,payload:e,userAddress:s,r:x,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(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}},Wu=(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=_e.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 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"}],Di=class{static createInterface(){return new te.Interface(Op)}static connect(e,t){return new oe(e,Op,t)}};Di.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"}],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:[],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(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:[{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(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{AddressZero:D1}=ht,Bn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Fa(Bn.extensionType),e.address);if(t===D1)throw new Error(`${Bn.extensionType} extension is not installed for this Colony`);let a=await Sr(t,e.config.signerOrProvider);if(!ki(Bn.extensionType,a,e.version))throw new Error(`Version ${a} of the ${Bn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Bn.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${Bn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new Bn(e,r,a)}static getLatestSupportedVersion(){return Bn.supportedVersions[Bn.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||_e.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[_]),I=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,I,x,s,_e.SkillIgnore]},async _=>({...ne("OneTxPaymentMade",_)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Fa(Ae.OneTxPayment),t],async a=>({...ne("ExtensionUpgraded",a)}))}},ja=Bn;ja.supportedVersions=[{version:3,factory:Fi},{version:4,factory:Li},{version:5,factory:Ui}],ja.extensionType=Ae.OneTxPayment;var Fn=class{constructor(e,t){typeof t=="string"?this.tokenClient=Tn.connect(t,e.config.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 Gs=class extends Fn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=Dn.connect(a,t.config.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 zs=class extends Fn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=vn.connect(a,t.config.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 N6=async(n,e)=>{let t=await Ip(e,n.config.signerOrProvider);switch(t.tokenClientType){case On.Colony:return new Gs(n,t);case On.Erc20:return new Fn(n,t);case On.Erc2612:return new zs(n,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"}],Vi=class{static createInterface(){return new te.Interface(jp)}static connect(e,t){return new oe(e,jp,t)}};Vi.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"}],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{AddressZero:Gp}=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===Gp)throw new Error(`${Ln.extensionType} extension is not installed for this Colony`);let a=await Sr(t,e.config.signerOrProvider);if(!ki(Ln.extensionType,a,e.version))throw new Error(`Version ${a} of the ${Ln.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Ln.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${Ln.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new Ln(e,r,a)}static getLatestSupportedVersion(){return Ln.supportedVersions[Ln.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 Ns(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),this.colony.reputation,this.votingReputationContract,e,Gp,Hl);return[e,t,Gp,Hl,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.config.ipfs.uploadMetadata(Re.Decision,t),[e,a]},async a=>({...ne("Annotation",a)}),{metadataType:Re.Decision})}approveStake(e,t=_e.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{...Wu("UserTokenApproved",a,i.getInternalTokenLockingContract().interface)}})}stakeMotion(e,t,a){let i=async()=>{let r=await this.colony.config.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(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 I=await this.getMinStake(o,t);if(F.from(a).lt(I))throw new Error(`The staked amount is too small. Please stake at least ${Ps(I)}`);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),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!==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.config.getSigner().getAddress(),{key:p,value:f,branchMask:x,siblings:I}=await this.colony.reputation.getReputationWithProofs(o,l,s),_=await this.createMotionSalt(e),v=te.solidityKeccak256(["bytes","uint256"],[_,t]);return[e,v,p,f,x,I]};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!==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.config.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:I,value:_,branchMask:v,siblings:S}=p;return[e,f,F.from(x),I,_,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!==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.config.getSigner().getAddress(),p=await _i(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),t,r),{key:f,value:x,branchMask:I,siblings:_}=await this.colony.reputation.getReputationWithProofs(o,l,s);return[e,t,p,f,x,I,_]};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!==zt.Finalizable)throw new Error(`Motion cannot be finalized. It's currently in "${zt[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",[Fa(Ae.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}}},Ha=Ln;Ha.supportedVersions=[{version:7,factory:Vi},{version:8,factory:ji},{version:9,factory:Hi}],Ha.extensionType=Ae.VotingReputation;var L1={["motion"]:Ha,["oneTx"]:ja},Fr=class{static async connect(e,t){let a=await Sr(t,e.config.signerOrProvider),i=Fr.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.config.signerOrProvider),s=await r.getToken(),o=await N6(e,s),l=new Fr(e,r,o,a);return await l.updateExtensions(),l}static getLatestSupportedVersion(){return Fr.supportedVersions[Fr.supportedVersions.length-1].version}constructor(e,t,a,i){this.colony=t,this.colonyNetwork=e,this.config=e.config,this.address=t.address,this.ext={},this.reputation=new aa(e.getInternalNetworkContract(),t,{customEndpointUrl:e.config.reputationOracleEndpoint}),this.token=a,this.version=i}createColonyTxCreator(e,t,a,i,r){return new Br({colony:this,config:this.colonyNetwork.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createPermissionedColonyTxCreator(e,t,a,i,r,s){return new Br({colony:this,config:this.colonyNetwork.config,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 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.config.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.config.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.config.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 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=_e.RootDomain,s=a||_e.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(),I=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,I,_,v,S,e,o]},async l=>({...ne("ColonyFundsMovedBetweenFundingPots",l)}))}async getReputation(e,t=_e.RootDomain,a=3){let{skillId:i}=await this.colony.getDomain(t);return this.reputation.getReputationFraction(i,e,void 0,a)}async getReputationPoints(e,t=_e.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(address,address,bytes,bool)",a)}))}annotateTransaction(e,t){return this.createColonyTxCreator(this.colony,"annotateTransaction",async()=>{let a;return typeof t=="string"?a=t:a=await this.config.ipfs.uploadMetadata(Re.Annotation,t),[e,a]},async a=>({...ne("Annotation",a)}),{metadataType:Re.Annotation})}installExtension(e){let t=L1[e],a=t.getLatestSupportedVersion(),{extensionType:i}=t;if(!ki(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",[Fa(i),t.getLatestSupportedVersion()],async s=>({...Wu("ExtensionInstalled",s,r.interface)}))}async getRoles(e,t=_e.RootDomain){let a=await this.colony.getUserRoles(e,t);return yu(a)}setRoles(e,t,a=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let i=await this.getRoles(e,a),r=Array.from(new Set([...i,...[].concat(t)])),s=Kl(r);return[e,a,s]},{roles:vt.Architecture,domain:a},async i=>({...ne("ColonyRoleSet",i),...ne("RecoveryRoleSet",i)}))}unsetRoles(e,t,a=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let r=(await this.getRoles(e,a)).filter(o=>![].concat(t).includes(o)),s=Kl(r);return[e,a,s]},{roles:vt.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=_e.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=_e.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:vt.Arbitration},async i=>({...ne("ArbitraryReputationUpdate",i)}))}},Lr=Fr;Lr.supportedVersions=[{version:11,factory:Di},{version:12,factory:Oi},{version:13,factory:Bi}];var{splitSignature:U1}=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,a]){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let i=this.contract.signer,{provider:r}=i;if(!r)throw new Error("No provider found");let s;this.config.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:a,nonce:l.toString(),deadline:f}),{r:I,s:_,v}=U1(x),S={target:e,owner:o,spender:t,value:a.toString(),deadline:f,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=Sp(this.address,e.config.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 Ws=class{constructor(e,t){let a=t?.network||Nn.ArbitrumOne;this.metaTxBroadcasterEndpoint=t?.metaTxBroadcasterEndpoint||lu[a],this.ipfs=new Or(t?.ipfsAdapter),this.network=a,this.reputationOracleEndpoint=t?.reputationOracleEndpoint||Ir[a],this.signerOrProvider=e}getSigner(){if(!(this.signerOrProvider instanceof St))throw new Error("Need a signer to create a transaction");return this.signerOrProvider}};var{namehash:D6}=te,{AddressZero:zp}=ht,Js=class{constructor(e,t){this.config=new Ws(e,t),this.contract=Ni.connect(t?.customNetworkAddress||du[this.config.network],e)}async getTokenLocking(){if(!this.locking){let e=await this.contract.getTokenLocking();this.locking=new Ks(this,e)}return this.locking}getInternalNetworkContract(){return this.contract}createTxCreator(e,t,a,i,r){return new va({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createMetaTxCreator(e,t,a,i,r){return new Va({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createEip2612TxCreator(e,t,a,i,r){return new $u({config:this.config,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[zp,e.name,e.symbol,e.decimals||18,0,t,""]}return[e,"","",0,0,t,""]};return a?this.createMetaTxCreator(this.contract,"createColonyForFrontend",async()=>{let r=await i();return typeof a=="string"?r[6]=a:r[6]=await this.config.ipfs.uploadMetadata(Re.Colony,a),r},async r=>({...ne("TokenDeployed",r),...ne("ColonyAdded",r),...ne("TokenAuthorityDeployed",r)}),{metadataType:Re.Colony}):this.createMetaTxCreator(this.contract,"createColonyForFrontend",i,async r=>({...ne("TokenDeployed",r),...ne("ColonyAdded",r),...ne("TokenAuthorityDeployed",r)}))}async getColony(e){return Lr.connect(this,e)}async getMetaColony(){let e=await this.contract.getMetaColony();return this.getColony(e)}async getColonyLabel(e){let t=await this.contract.lookupRegisteredENSDomain(e);return t?t.replace(Ss[this.config.network],""):null}async getColonyAddress(e){let t=D6(`${e}${Ss[this.config.network]}`),a=await this.contract.addr(t);return a!==zp?a:null}async getUsername(e){let t=await this.contract.lookupRegisteredENSDomain(e);return t?t.replace(Rs[this.config.network],""):null}async getUserAddress(e){let t=D6(`${e}${Rs[this.config.network]}`),a=await this.contract.addr(t);return a!==zp?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.contract,"registerUserLabel",t,async a=>({...ne("UserLabelRegistered",a)}))}deployToken(e,t,a=18){return this.createMetaTxCreator(this.contract,"deployTokenViaNetwork",[e,t,a],async i=>({...ne("TokenDeployed",i)}))}};var{isAddress:V1}=te,O6=new ta.Web3Provider(window.ethereum),qi,qa={},j1=async(n,e)=>new Js(e,{ipfsAdapter:new kp("INVALID")}).getColony(n),H1=async()=>{let n=await qi.getBalance();return Ps(n)},q1=async()=>{let n="QmTwksWE2Zn4icTvk5E7QZb1vucGNuu5GUCFZ361r8gKXM",[{domainId:e,fundingPotId:t},,a]=await qi.createTeam(n).tx().mined();if(!e||!t||!a)throw new Error("Transaction event data not found");let i=await a();if(!i)throw new Error("No metadata found");console.info(i);let[{domainId:r}]=await qi.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}},G1=async()=>{if(!qa.domainId)throw new Error("No domain created yet");let[,n]=await qi.moveFundsToTeam(pu`0.66`,qa.domainId).tx().mined();return n},z1=async n=>{if(!qi.ext.oneTx)throw new Error("OneTxPayment extension not installed");let[,e]=await qi.ext.oneTx.pay(n,pu`0.42`,qa.domainId).tx().mined();return e},K1=async()=>(await O6.send("eth_requestAccounts",[]),O6.getSigner()),Qu=document.querySelector("#address"),B6=document.querySelector("#button_connect"),F6=document.querySelector("#button_team"),L6=document.querySelector("#button_fund"),U6=document.querySelector("#recipient"),V6=document.querySelector("#button_pay"),Kp=document.querySelector("#error"),j6=document.querySelector("#result");if(!Qu||!U6||!Kp||!j6||!B6||!F6||!L6||!V6)throw new Error("Could not find all required HTML elements");var Ur=n=>{Kp.innerText=`Found an error: ${n.message}`,console.error(n)},W1=()=>{Kp.innerText=""},wn=n=>{j6.innerText=n};B6.addEventListener("click",async()=>{W1();let n=Qu.value;if(!V1(n))return Ur(new Error("This is not a valid address"));wn("Processing...");let e=await K1();try{let t=await j1(Qu.value,e);qi=t;let a=await H1(),i=await t.token.symbol();wn(` +`)}`,u1=n=>({...n,isWhitelistActivated:n.isWhitelistActivated||!1,colonySafes:n.colonySafes||[],colonyTokens:n.colonyTokens||[],verifiedAddresses:n.verifiedAddresses||[]}),gp=(n,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&&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"?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 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}))&&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"?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: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}})(n);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 a=I6(t.errors);throw new Error(a)};var S6=(n,e)=>{let t=n===Re.Colony?u1(e):e,a=(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&&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"?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 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}))&&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"?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: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}})({name:n,data:t,version:xp});if(!a.success){let i=I6(a.errors);throw new Error(i)}return a.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,R6.default)(fetch,{headers:{Accept:"application/json"},retryOn:[404,503],retries:3,retryDelay:5e3}),js={[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]:""},Or=class{adapter;constructor(e){this.adapter=e||new vp}static eventSupportsMetadata(e){return!!Object.keys(js).includes(e)}async getMetadata(e,t){let a=this.adapter.getIpfsUrl(e),r=await(await wp(a)).json();return gp(r,t)}async getMetadataForEvent(e,t){let a=this.adapter.getIpfsUrl(t),r=await(await wp(a)).json(),s=Object.entries(js).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),a=await wp(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=S6(e,t),i=JSON.stringify(a);return this.adapter.uploadJson(i)}};var d1=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||d1;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"}],Si=class{static createInterface(){return new te.Interface(Mp)}static connect(e,t){return new oe(e,Mp,t)}};xe(Si,"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:"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:"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:[{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:"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:"returnData",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",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:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],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:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"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:[],name:"unlock",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"}],P6="0x60c060405234801561001057600080fd5b5060405161205738038061205783398101604081905261002f91610307565b60008060018161003d6101ab565b6001600160a01b031681526020810191909152604001600090812091909155556100656101ab565b600480546001600160a01b0319166001600160a01b039290921691909117905561008d6101ab565b6001600160a01b03167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a260066100ce8482610413565b5060056100db8382610413565b5060ff81166080526007805460ff1916600117905560405146907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f90610123906006906104d1565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051601f19818403018152919052805160209091012060a0525061054692505050565b60003633301480156101be575060348110155b1561024757600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e881146102365733935050505090565b5001516001600160a01b0316919050565b3391505090565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261027557600080fd5b81516001600160401b0381111561028e5761028e61024e565b604051601f8201601f19908116603f011681016001600160401b03811182821017156102bc576102bc61024e565b6040528181528382016020018510156102d457600080fd5b60005b828110156102f3576020818601810151838301820152016102d7565b506000918101602001919091529392505050565b60008060006060848603121561031c57600080fd5b83516001600160401b0381111561033257600080fd5b61033e86828701610264565b602086015190945090506001600160401b0381111561035c57600080fd5b61036886828701610264565b925050604084015160ff8116811461037f57600080fd5b809150509250925092565b600181811c9082168061039e57607f821691505b6020821081036103be57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561040e57806000526020600020601f840160051c810160208510156103eb5750805b601f840160051c820191505b8181101561040b57600081556001016103f7565b50505b505050565b81516001600160401b0381111561042c5761042c61024e565b6104408161043a845461038a565b846103c4565b6020601f821160018114610474576000831561045c5750848201515b600019600385901b1c1916600184901b17845561040b565b600084815260208120601f198516915b828110156104a45787850151825560209485019460019092019101610484565b50848210156104c25786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b60008083546104df8161038a565b6001821680156104f6576001811461050b5761053b565b60ff198316865281151582028601935061053b565b86600052602060002060005b8381101561053357815488820152600190910190602001610517565b505081860193505b509195945050505050565b60805160a051611ae5610572600039600081816102e10152610f870152600061029b0152611ae56000f3fe6080604052600436106101815760003560e01c80637a9e5e4b116100d1578063a69df4b51161008a578063bf7e214f11610064578063bf7e214f146104b1578063cf309012146104d1578063d505accf146104eb578063dd62ed3e1461050b57600080fd5b8063a69df4b51461047c578063a9059cbb14610491578063b3eac1d8146103b957600080fd5b80637a9e5e4b146103995780637ecebe00146103b95780638da5cb5b146103ef57806395d89b41146104275780639dc29fac1461043c578063a0712d681461045c57600080fd5b806330adf81f1161013e57806340c10f191161011857806340c10f191461030357806342966c68146103235780636281133d1461034357806370a082311461036357600080fd5b806330adf81f14610255578063313ce567146102895780633644e515146102cf57600080fd5b806306fdde0314610186578063095ea7b3146101b15780630c53c51c146101e157806313af4035146101f457806318160ddd1461021657806323b872dd14610235575b600080fd5b34801561019257600080fd5b5061019b610551565b6040516101a891906115b0565b60405180910390f35b3480156101bd57600080fd5b506101d16101cc3660046115d8565b6105df565b60405190151581526020016101a8565b61019b6101ef3660046116bf565b610672565b34801561020057600080fd5b5061021461020f366004611733565b610859565b005b34801561022257600080fd5b506000545b6040519081526020016101a8565b34801561024157600080fd5b506101d1610250366004611750565b6108dc565b34801561026157600080fd5b506102277f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b34801561029557600080fd5b506102bd7f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101a8565b3480156102db57600080fd5b506102277f000000000000000000000000000000000000000000000000000000000000000081565b34801561030f57600080fd5b5061021461031e3660046115d8565b610950565b34801561032f57600080fd5b5061021461033e366004611791565b610a3f565b34801561034f57600080fd5b506101d161035e3660046117aa565b610a53565b34801561036f57600080fd5b5061022761037e366004611733565b6001600160a01b031660009081526001602052604090205490565b3480156103a557600080fd5b506102146103b4366004611733565b610ba7565b3480156103c557600080fd5b506102276103d4366004611733565b6001600160a01b031660009081526008602052604090205490565b3480156103fb57600080fd5b5060045461040f906001600160a01b031681565b6040516001600160a01b0390911681526020016101a8565b34801561043357600080fd5b5061019b610c18565b34801561044857600080fd5b506102146104573660046115d8565b610c25565b34801561046857600080fd5b50610214610477366004611791565b610e1c565b34801561048857600080fd5b50610214610e54565b34801561049d57600080fd5b506101d16104ac3660046115d8565b610e87565b3480156104bd57600080fd5b5060035461040f906001600160a01b031681565b3480156104dd57600080fd5b506007546101d19060ff1681565b3480156104f757600080fd5b50610214610506366004611831565b610ea2565b34801561051757600080fd5b506102276105263660046118a0565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6006805461055e906118d9565b80601f016020809104026020016040519081016040528092919081815260200182805461058a906118d9565b80156105d75780601f106105ac576101008083540402835291602001916105d7565b820191906000526020600020905b8154815290600101906020018083116105ba57829003601f168201915b505050505081565b600081600260006105ee611191565b6001600160a01b0390811682526020808301939093526040918201600090812091881680825291909352912091909155610626611191565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161066091815260200190565b60405180910390a35060015b92915050565b60606106a186610697886001600160a01b031660009081526008602052604090205490565b4688888888610a53565b6107045760405162461bcd60e51b815260206004820152602960248201527f6d6574617472616e73616374696f6e2d7369676e65722d7369676e617475726560448201526805adad2e6dac2e8c6d60bb1b60648201526084015b60405180910390fd5b61070d86611234565b6000306001600160a01b0316867f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e88960405160200161074e93929190611913565b60408051601f19818403018152908290526107689161194c565b6000604051808303816000865af19150503d80600081146107a5576040519150601f19603f3d011682016040523d82523d6000602084013e6107aa565b606091505b50925090508061080d5760405162461bcd60e51b815260206004820152602860248201527f636f6c6f6e792d6d65746174782d66756e6374696f6e2d63616c6c2d756e737560448201526718d8d95cdcd99d5b60c21b60648201526084016106fb565b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b87610837611191565b8860405161084793929190611968565b60405180910390a15095945050505050565b610876610864611191565b6000356001600160e01b031916611260565b6108925760405162461bcd60e51b81526004016106fb9061199d565b600480546001600160a01b0319166001600160a01b0383169081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60075460009060ff161561093d576108f5610864611191565b61093d5760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b61094884848461133b565b949350505050565b61095b610864611191565b6109775760405162461bcd60e51b81526004016106fb9061199d565b6001600160a01b0382166000908152600160205260408120805483929061099f9084906119e1565b92505081905550806000808282546109b791906119e1565b90915550506040518181526001600160a01b038316907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a26040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b610a50610a4a611191565b82610c25565b50565b600080610ad088308989604051602001610a7094939291906119f4565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b6040805160008082526020820180845284905260ff87169282019290925260608101889052608081018790529192509060019060a0016020604051602081039080840390855afa158015610b28573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610b8b5760405162461bcd60e51b815260206004820152601f60248201527f636f6c6f6e792d6d65746174782d696e76616c69642d7369676e61747572650060448201526064016106fb565b6001600160a01b038a8116911614915050979650505050505050565b610bb2610864611191565b610bce5760405162461bcd60e51b81526004016106fb9061199d565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6005805461055e906118d9565b610c2d611191565b6001600160a01b0316826001600160a01b031614610d2d576001600160a01b03821660009081526002602052604081208291610c67611191565b6001600160a01b03166001600160a01b03168152602001908152602001600020541015610cd65760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03821660009081526002602052604081208291610cf8611191565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610d279190611a3a565b90915550505b6001600160a01b038216600090815260016020526040902054811115610d955760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b03821660009081526001602052604081208054839290610dbd908490611a3a565b9250508190555080600080828254610dd59190611a3a565b90915550506040518181526001600160a01b038316907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59060200160405180910390a25050565b610e27610864611191565b610e435760405162461bcd60e51b81526004016106fb9061199d565b610a50610e4e611191565b82610950565b610e5f610864611191565b610e7b5760405162461bcd60e51b81526004016106fb9061199d565b6007805460ff19169055565b6000610e9b610e94611191565b84846108dc565b9392505050565b60075460ff1615610f0057610eb8610864611191565b610f005760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b42841015610f505760405162461bcd60e51b815260206004820152601d60248201527f636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e6500000060448201526064016106fb565b6040805180820182526002815261190160f01b6020808301919091526001600160a01b038a166000908152600890915291822080547f0000000000000000000000000000000000000000000000000000000000000000917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c9188610fd983611a4d565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161103d93929190611a66565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa1580156110a8573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906110de5750886001600160a01b0316816001600160a01b0316145b61112a5760405162461bcd60e51b815260206004820152601e60248201527f636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e6174757265000060448201526064016106fb565b6001600160a01b038981166000818152600260209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b60003633301480156111a4575060348110155b1561122d57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e8811461121c5733935050505090565b5001516001600160a01b0316919050565b3391505090565b6001600160a01b038116600090815260086020526040812080549161125883611a4d565b919050555050565b6000306001600160a01b0384160361127a5750600161066c565b6004546001600160a01b03908116908416036112985750600161066c565b6003546001600160a01b03166112b05750600061066c565b60035460405163b700961360e01b81526001600160a01b0385811660048301523060248301526001600160e01b0319851660448301529091169063b700961390606401602060405180830381865afa158015611310573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113349190611a8d565b905061066c565b6000611345611191565b6001600160a01b0316846001600160a01b031614611445576001600160a01b0384166000908152600260205260408120839161137f611191565b6001600160a01b03166001600160a01b031681526020019081526020016000205410156113ee5760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03841660009081526002602052604081208391611410611191565b6001600160a01b03166001600160a01b03168152602001908152602001600020600082825461143f9190611a3a565b90915550505b6001600160a01b0384166000908152600160205260409020548211156114ad5760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b038416600090815260016020526040812080548492906114d5908490611a3a565b90915550506001600160a01b038316600090815260016020526040812080548492906115029084906119e1565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161154e91815260200190565b60405180910390a35060019392505050565b60005b8381101561157b578181015183820152602001611563565b50506000910152565b6000815180845261159c816020860160208601611560565b601f01601f19169290920160200192915050565b602081526000610e9b6020830184611584565b6001600160a01b0381168114610a5057600080fd5b600080604083850312156115eb57600080fd5b82356115f6816115c3565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261162b57600080fd5b813567ffffffffffffffff81111561164557611645611604565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561167457611674611604565b60405281815283820160200185101561168c57600080fd5b816020850160208301376000918101602001919091529392505050565b803560ff811681146116ba57600080fd5b919050565b600080600080600060a086880312156116d757600080fd5b85356116e2816115c3565b9450602086013567ffffffffffffffff8111156116fe57600080fd5b61170a8882890161161a565b9450506040860135925060608601359150611727608087016116a9565b90509295509295909350565b60006020828403121561174557600080fd5b8135610e9b816115c3565b60008060006060848603121561176557600080fd5b8335611770816115c3565b92506020840135611780816115c3565b929592945050506040919091013590565b6000602082840312156117a357600080fd5b5035919050565b600080600080600080600060e0888a0312156117c557600080fd5b87356117d0816115c3565b96506020880135955060408801359450606088013567ffffffffffffffff8111156117fa57600080fd5b6118068a828b0161161a565b9450506080880135925060a0880135915061182360c089016116a9565b905092959891949750929550565b600080600080600080600060e0888a03121561184c57600080fd5b8735611857816115c3565b96506020880135611867816115c3565b95506040880135945060608801359350611883608089016116a9565b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156118b357600080fd5b82356118be816115c3565b915060208301356118ce816115c3565b809150509250929050565b600181811c908216806118ed57607f821691505b60208210810361190d57634e487b7160e01b600052602260045260246000fd5b50919050565b60008451611925818460208901611560565b919091019283525060601b6bffffffffffffffffffffffff19166020820152603401919050565b6000825161195e818460208701611560565b9190910192915050565b6001600160a01b0384811682528316602082015260606040820181905260009061199490830184611584565b95945050505050565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561066c5761066c6119cb565b8481526bffffffffffffffffffffffff198460601b16602082015282603482015260008251611a2a816054850160208701611560565b9190910160540195945050505050565b8181038181111561066c5761066c6119cb565b600060018201611a5f57611a5f6119cb565b5060010190565b60008451611a78818460208901611560565b91909101928352506020820152604001919050565b600060208284031215611a9f57600080fd5b81518015158114610e9b57600080fdfea264697066735822122090928a66070125904780390eb49d45fe12c136aec641b1db69316e0ffefc6da764736f6c634300081b0033",f1=n=>n.length>1,Dn=class extends hi{constructor(...e){f1(e)?super(...e):super(Wu,P6,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(Wu)}static connect(e,t){return new oe(e,Wu,t)}};xe(Dn,"bytecode",P6),xe(Dn,"abi",Wu);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:"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:"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:[{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:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",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:"_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:"_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:"returnData",type:"bytes"}],stateMutability:"payable",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:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"",type:"address"}],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"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",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:"_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:"_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:"_token",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"incrementLockCounterTo",outputs:[],stateMutability:"nonpayable",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:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"pure",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetwork",type:"address"}],name:"setColonyNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",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:"_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:"_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:"_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:"_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"}],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(n){n.TokenClient="TokenClient",n.TokenLockingClient="TokenLockingClient"})(Pi||(Pi={}));var On;(function(n){n.Colony="Colony",n.ColonyLegacy="ColonyLegacy",n.Erc20="Erc20",n.Erc2612="Erc2612",n.Sai="Sai"})(On||(On={}));var{AddressZero:x1}=ht;async function b1(n){try{await n.authority();return}catch{throw new Error("Token can not be assigned a TokenAuthority")}}var g1=async(n,e)=>{let t,a=!0,i=!0;t=Dn.connect(n,e);try{await t.totalSupply()}catch(r){throw new Error(`Token is probably not a valid ERC20 token, got ${r.message}`)}try{await t.locked(),await b1(t)}catch{a=!1}try{await t.nonces(x1)}catch{i=!1}return a?t.tokenClientType=On.Colony:i?(t=vn.connect(n,e),t.tokenClientType=On.Erc2612):(t=Tn.connect(n,e),t.tokenClientType=On.Erc20),t.clientType=Pi.TokenClient,t},Ip=g1;var T1=(n,e)=>{let t=Ri.connect(n,e);return t.clientType=Pi.TokenLockingClient,t},Sp=T1;var{AddressZero:Rp}=ht,v1=Tn.connect(Rp,new ta.BaseProvider(3656691)).interface,w1=Si.connect(Rp,new ta.BaseProvider(3656691)).interface,_1=vn.connect(Rp,new ta.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"},{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:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{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:"returnData",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:"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:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"}],Hs=class{static createInterface(){return new te.Interface(Pp)}static connect(e,t){return new oe(e,Pp,t)}};Hs.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:"returnData",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(Np)}static connect(e,t){return new oe(e,Np,t)}};qs.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:!1,internalType:"address",name:"bridgeAddress",type:"address"}],name:"BridgeSet",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:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateSentToBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateStoredFromBridge",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:"uint256",name:"skillId",type:"uint256"}],name:"SkillAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillCreationStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillStoredFromBridge",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:[{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"address",name:"_resolver",type:"address"}],name:"addColonyVersion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_resolver",type:"address"}],name:"addExtensionToNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"addPendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPendingSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"addReputationUpdateLogFromBridge",outputs:[],stateMutability:"nonpayable",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:"_parentSkillId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"addSkillFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",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:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"chainId",type:"uint256"}],name:"bridgeCurrentRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"bridgePendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"skillId",type:"uint256"}],name:"bridgeSkillIfNotMiningChain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"burnUnneededRewards",outputs:[],stateMutability:"nonpayable",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:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"}],name:"claimMiningReward",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:"address",name:"_tokenAddress",type:"address"}],name:"createMetaColony",outputs:[],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:"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:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateExtension",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:"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:"returnData",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"getBridgedReputationUpdateCount",outputs:[{internalType:"uint256",name:"bridgedReputationCount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"}],name:"getBridgedSkillCounts",outputs:[{internalType:"uint256",name:"skillCount",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:"uint256",name:"_id",type:"uint256"}],name:"getColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyBridgeAddress",outputs:[{internalType:"address",name:"bridge",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCreationSalt",outputs:[{internalType:"bytes32",name:"salt",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"}],name:"getColonyVersionResolver",outputs:[{internalType:"address",name:"_resolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentColonyVersion",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getENSRegistrar",outputs:[{internalType:"address",name:"_address",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:[{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:[],name:"getFeeInverse",outputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMetaColony",outputs:[{internalType:"address payable",name:"_colonyAddress",type:"address"}],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:"getMiningChainId",outputs:[{internalType:"uint256",name:"reputationMiningChainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"}],name:"getMiningDelegator",outputs:[{internalType:"address",name:"_delegator",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiningResolver",outputs:[{internalType:"address",name:"miningResolverAddress",type:"address"}],stateMutability:"view",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:"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:"address",name:"_token",type:"address"}],name:"getPayoutWhitelist",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"getPendingReputationUpdate",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:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.PendingReputationUpdate",name:"update",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"getPendingSkillAddition",outputs:[{internalType:"uint256",name:"parentId",type:"uint256"}],stateMutability:"view",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:"_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:[{internalType:"bool",name:"_active",type:"bool"}],name:"getReputationMiningCycle",outputs:[{internalType:"address",name:"_repMiningCycleAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningCycleReward",outputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningSkillId",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"view",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:"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_deprecated",type:"bool"}],internalType:"struct ColonyNetworkDataTypes.Skill",name:"_skill",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSkillCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTokenLocking",outputs:[{internalType:"address",name:"_lockingAddress",type:"address"}],stateMutability:"view",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:"miningChainId",type:"uint256"},{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"}],name:"initialiseReputationMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[{internalType:"uint256",name:"_rootLocalSkillId",type:"uint256"}],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:"address",name:"_colony",type:"address"}],name:"isColony",outputs:[{internalType:"bool",name:"_addressIsColony",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],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:"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:"_stakers",type:"address[]"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"punishStakers",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:"_username",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerUserLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_bridgeAddress",type:"address"}],name:"setColonyBridgeAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],name:"setFeeInverse",outputs:[],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:"_miningResolverAddress",type:"address"}],name:"setMiningResolver",outputs:[],stateMutability:"nonpayable",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:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",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:"uint256",name:"_amount",type:"uint256"}],name:"setReputationMiningCycleReward",outputs:[],stateMutability:"nonpayable",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:[{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"},{internalType:"uint256",name:"nonce",type:"uint256"}],name:"setReputationRootHashFromBridge",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:"address",name:"_tokenLockingAddress",type:"address"}],name:"setTokenLocking",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:"uint256",name:"_amount",type:"uint256"}],name:"stakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"startNextCycle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"startTokenAuction",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:"bytes32",name:"_extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"unstakeForMining",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:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"}],Ni=class{static createInterface(){return new te.Interface(Dp)}static connect(e,t){return new oe(e,Dp,t)}};Ni.abi=Dp;var va=class{constructor({contract:e,config:t,method:a,args:i,eventData:r,txConfig:s}){this.config=t,this.contract=e,this.method=a,this.args=i,this.eventData=r,this.txConfig=s}async getArgs(e){let t=[];return typeof this.args=="function"?t=await this.args():t=this.args,e&&t.push(e),t}async getTx(e){let t=await this.getArgs(e);return await this.contract.functions[this.method].apply(this.contract,t)}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.config.ipfs.getMetadataForEvent.bind(this.config.ipfs,js[this.txConfig.metadataType],t.metadata);return[t,e,a]}return[t,e]}return[{},e]}async broadcastMetaTx(e){let{provider:t}=this.config.getSigner();if(!t)throw new Error("No provider found");let i=await(await fetch(`${this.config.metaTxBroadcasterEndpoint}/broadcast`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();if(i.status!=="success")throw new Error(`Could not send Metatransaction. Reason given: ${i.data.reason}`);if(!i.data?.txHash)throw new Error("Could not get transaction hash from broadcaster response");return t.getTransaction(i.data.txHash)}async waitForMetaTx(e){let t=await e.wait();return t.parsedLogs=Wl(t.logs,this.contract.interface),t}tx(){return{send:async e=>{let t=await this.getTx(e);return[t,this.getMined.bind(this,t)]},mined:async e=>{let t=await this.getTx(e);return this.getMined(t)},encode:async()=>{let e=await this.getArgs();return this.contract.interface.encodeFunctionData(this.method,e)}}}};var{arrayify:A1,solidityKeccak256:E1,splitSignature:M1}=te,Va=class extends va{async sendMetaTransaction(e,t){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let a=this.config.getSigner(),{provider:i}=a;if(!i)throw new Error("No provider found");let r;this.config.network===Nn.Custom?r=1:r=(await i.getNetwork()).chainId;let s=await a.getAddress(),o=await this.contract.functions.getMetatransactionNonce(s),l=E1(["uint256","address","uint256","bytes"],[o.toString(),t,r,e]),p=A1(l),f=await a.signMessage(p),{r:x,s:I,v:_}=M1(f),v={target:t,payload:e,userAddress:s,r:x,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(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}},Ju=(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=_e.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 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"}],Di=class{static createInterface(){return new te.Interface(Op)}static connect(e,t){return new oe(e,Op,t)}};Di.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"}],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:[],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(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:[{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(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{AddressZero:D1}=ht,Bn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Fa(Bn.extensionType),e.address);if(t===D1)throw new Error(`${Bn.extensionType} extension is not installed for this Colony`);let a=await Sr(t,e.config.signerOrProvider);if(!ki(Bn.extensionType,a,e.version))throw new Error(`Version ${a} of the ${Bn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Bn.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${Bn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new Bn(e,r,a)}static getLatestSupportedVersion(){return Bn.supportedVersions[Bn.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||_e.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[_]),I=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,I,x,s,_e.SkillIgnore]},async _=>({...ne("OneTxPaymentMade",_)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Fa(Ae.OneTxPayment),t],async a=>({...ne("ExtensionUpgraded",a)}))}},ja=Bn;ja.supportedVersions=[{version:3,factory:Fi},{version:4,factory:Li},{version:5,factory:Ui}],ja.extensionType=Ae.OneTxPayment;var Fn=class{constructor(e,t){typeof t=="string"?this.tokenClient=Tn.connect(t,e.config.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 Gs=class extends Fn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=Dn.connect(a,t.config.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 zs=class extends Fn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=vn.connect(a,t.config.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 N6=async(n,e)=>{let t=await Ip(e,n.config.signerOrProvider);switch(t.tokenClientType){case On.Colony:return new Gs(n,t);case On.Erc20:return new Fn(n,t);case On.Erc2612:return new zs(n,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"}],Vi=class{static createInterface(){return new te.Interface(jp)}static connect(e,t){return new oe(e,jp,t)}};Vi.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"}],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{AddressZero:Gp}=ht;var $u=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===Gp)throw new Error(`${Ln.extensionType} extension is not installed for this Colony`);let a=await Sr(t,e.config.signerOrProvider);if(!ki(Ln.extensionType,a,e.version))throw new Error(`Version ${a} of the ${Ln.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Ln.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${Ln.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new Ln(e,r,a)}static getLatestSupportedVersion(){return Ln.supportedVersions[Ln.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 Ns(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),this.colony.reputation,this.votingReputationContract,e,Gp,ql);return[e,t,Gp,ql,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.config.ipfs.uploadMetadata(Re.Decision,t),[e,a]},async a=>({...ne("Annotation",a)}),{metadataType:Re.Decision})}approveStake(e,t=_e.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{...Ju("UserTokenApproved",a,i.getInternalTokenLockingContract().interface)}})}stakeMotion(e,t,a){let i=async()=>{let r=await this.colony.config.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(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 I=await this.getMinStake(o,t);if(F.from(a).lt(I))throw new Error(`The staked amount is too small. Please stake at least ${Ps(I)}`);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),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!==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.config.getSigner().getAddress(),{key:p,value:f,branchMask:x,siblings:I}=await this.colony.reputation.getReputationWithProofs(o,l,s),_=await this.createMotionSalt(e),v=te.solidityKeccak256(["bytes","uint256"],[_,t]);return[e,v,p,f,x,I]};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!==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.config.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:I,value:_,branchMask:v,siblings:S}=p;return[e,f,F.from(x),I,_,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!==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.config.getSigner().getAddress(),p=await _i(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),t,r),{key:f,value:x,branchMask:I,siblings:_}=await this.colony.reputation.getReputationWithProofs(o,l,s);return[e,t,p,f,x,I,_]};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!==zt.Finalizable)throw new Error(`Motion cannot be finalized. It's currently in "${zt[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",[Fa(Ae.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}}},Ha=Ln;Ha.supportedVersions=[{version:7,factory:Vi},{version:8,factory:ji},{version:9,factory:Hi}],Ha.extensionType=Ae.VotingReputation;var L1={["motion"]:Ha,["oneTx"]:ja},Fr=class{static async connect(e,t){let a=await Sr(t,e.config.signerOrProvider),i=Fr.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.config.signerOrProvider),s=await r.getToken(),o=await N6(e,s),l=new Fr(e,r,o,a);return await l.updateExtensions(),l}static getLatestSupportedVersion(){return Fr.supportedVersions[Fr.supportedVersions.length-1].version}constructor(e,t,a,i){this.colony=t,this.colonyNetwork=e,this.config=e.config,this.address=t.address,this.ext={},this.reputation=new aa(e.getInternalNetworkContract(),t,{customEndpointUrl:e.config.reputationOracleEndpoint}),this.token=a,this.version=i}createColonyTxCreator(e,t,a,i,r){return new Br({colony:this,config:this.colonyNetwork.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createPermissionedColonyTxCreator(e,t,a,i,r,s){return new Br({colony:this,config:this.colonyNetwork.config,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 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.config.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.config.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.config.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 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=_e.RootDomain,s=a||_e.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(),I=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,I,_,v,S,e,o]},async l=>({...ne("ColonyFundsMovedBetweenFundingPots",l)}))}async getReputation(e,t=_e.RootDomain,a=3){let{skillId:i}=await this.colony.getDomain(t);return this.reputation.getReputationFraction(i,e,void 0,a)}async getReputationPoints(e,t=_e.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(address,address,bytes,bool)",a)}))}annotateTransaction(e,t){return this.createColonyTxCreator(this.colony,"annotateTransaction",async()=>{let a;return typeof t=="string"?a=t:a=await this.config.ipfs.uploadMetadata(Re.Annotation,t),[e,a]},async a=>({...ne("Annotation",a)}),{metadataType:Re.Annotation})}installExtension(e){let t=L1[e],a=t.getLatestSupportedVersion(),{extensionType:i}=t;if(!ki(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",[Fa(i),t.getLatestSupportedVersion()],async s=>({...Ju("ExtensionInstalled",s,r.interface)}))}async getRoles(e,t=_e.RootDomain){let a=await this.colony.getUserRoles(e,t);return fu(a)}setRoles(e,t,a=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let i=await this.getRoles(e,a),r=Array.from(new Set([...i,...[].concat(t)])),s=Kl(r);return[e,a,s]},{roles:vt.Architecture,domain:a},async i=>({...ne("ColonyRoleSet",i),...ne("RecoveryRoleSet",i)}))}unsetRoles(e,t,a=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let r=(await this.getRoles(e,a)).filter(o=>![].concat(t).includes(o)),s=Kl(r);return[e,a,s]},{roles:vt.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=_e.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=_e.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:vt.Arbitration},async i=>({...ne("ArbitraryReputationUpdate",i)}))}},Lr=Fr;Lr.supportedVersions=[{version:11,factory:Di},{version:12,factory:Oi},{version:13,factory:Bi}];var{splitSignature:U1}=te,Qu=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,a]){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let i=this.contract.signer,{provider:r}=i;if(!r)throw new Error("No provider found");let s;this.config.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:a,nonce:l.toString(),deadline:f}),{r:I,s:_,v}=U1(x),S={target:e,owner:o,spender:t,value:a.toString(),deadline:f,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=Sp(this.address,e.config.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 Ws=class{constructor(e,t){let a=t?.network||Nn.ArbitrumOne;this.metaTxBroadcasterEndpoint=t?.metaTxBroadcasterEndpoint||lu[a],this.ipfs=new Or(t?.ipfsAdapter),this.network=a,this.reputationOracleEndpoint=t?.reputationOracleEndpoint||Ir[a],this.signerOrProvider=e}getSigner(){if(!(this.signerOrProvider instanceof St))throw new Error("Need a signer to create a transaction");return this.signerOrProvider}};var{namehash:D6}=te,{AddressZero:zp}=ht,Js=class{constructor(e,t){this.config=new Ws(e,t),this.contract=Ni.connect(t?.customNetworkAddress||du[this.config.network],e)}async getTokenLocking(){if(!this.locking){let e=await this.contract.getTokenLocking();this.locking=new Ks(this,e)}return this.locking}getInternalNetworkContract(){return this.contract}createTxCreator(e,t,a,i,r){return new va({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createMetaTxCreator(e,t,a,i,r){return new Va({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createEip2612TxCreator(e,t,a,i,r){return new Qu({config:this.config,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[zp,e.name,e.symbol,e.decimals||18,0,t,""]}return[e,"","",0,0,t,""]};return a?this.createMetaTxCreator(this.contract,"createColonyForFrontend",async()=>{let r=await i();return typeof a=="string"?r[6]=a:r[6]=await this.config.ipfs.uploadMetadata(Re.Colony,a),r},async r=>({...ne("TokenDeployed",r),...ne("ColonyAdded",r),...ne("TokenAuthorityDeployed",r)}),{metadataType:Re.Colony}):this.createMetaTxCreator(this.contract,"createColonyForFrontend",i,async r=>({...ne("TokenDeployed",r),...ne("ColonyAdded",r),...ne("TokenAuthorityDeployed",r)}))}async getColony(e){return Lr.connect(this,e)}async getMetaColony(){let e=await this.contract.getMetaColony();return this.getColony(e)}async getColonyLabel(e){let t=await this.contract.lookupRegisteredENSDomain(e);return t?t.replace(Ss[this.config.network],""):null}async getColonyAddress(e){let t=D6(`${e}${Ss[this.config.network]}`),a=await this.contract.addr(t);return a!==zp?a:null}async getUsername(e){let t=await this.contract.lookupRegisteredENSDomain(e);return t?t.replace(Rs[this.config.network],""):null}async getUserAddress(e){let t=D6(`${e}${Rs[this.config.network]}`),a=await this.contract.addr(t);return a!==zp?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.contract,"registerUserLabel",t,async a=>({...ne("UserLabelRegistered",a)}))}deployToken(e,t,a=18){return this.createMetaTxCreator(this.contract,"deployTokenViaNetwork",[e,t,a],async i=>({...ne("TokenDeployed",i)}))}};var{isAddress:V1}=te,O6=new ta.Web3Provider(window.ethereum),qi,qa={},j1=async(n,e)=>new Js(e,{ipfsAdapter:new kp("INVALID")}).getColony(n),H1=async()=>{let n=await qi.getBalance();return Ps(n)},q1=async()=>{let n="QmTwksWE2Zn4icTvk5E7QZb1vucGNuu5GUCFZ361r8gKXM",[{domainId:e,fundingPotId:t},,a]=await qi.createTeam(n).tx().mined();if(!e||!t||!a)throw new Error("Transaction event data not found");let i=await a();if(!i)throw new Error("No metadata found");console.info(i);let[{domainId:r}]=await qi.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}},G1=async()=>{if(!qa.domainId)throw new Error("No domain created yet");let[,n]=await qi.moveFundsToTeam(yu`0.66`,qa.domainId).tx().mined();return n},z1=async n=>{if(!qi.ext.oneTx)throw new Error("OneTxPayment extension not installed");let[,e]=await qi.ext.oneTx.pay(n,yu`0.42`,qa.domainId).tx().mined();return e},K1=async()=>(await O6.send("eth_requestAccounts",[]),O6.getSigner()),Xu=document.querySelector("#address"),B6=document.querySelector("#button_connect"),F6=document.querySelector("#button_team"),L6=document.querySelector("#button_fund"),U6=document.querySelector("#recipient"),V6=document.querySelector("#button_pay"),Kp=document.querySelector("#error"),j6=document.querySelector("#result");if(!Xu||!U6||!Kp||!j6||!B6||!F6||!L6||!V6)throw new Error("Could not find all required HTML elements");var Ur=n=>{Kp.innerText=`Found an error: ${n.message}`,console.error(n)},W1=()=>{Kp.innerText=""},wn=n=>{j6.innerText=n};B6.addEventListener("click",async()=>{W1();let n=Xu.value;if(!V1(n))return Ur(new Error("This is not a valid address"));wn("Processing...");let e=await K1();try{let t=await j1(Xu.value,e);qi=t;let a=await H1(),i=await t.token.symbol();wn(` Connected to Colony with address: ${n}. Colony version: ${t.version}. Native token funding: ${a} ${i} - `)}catch(t){Ur(t),wn("")}finally{Qu.value=""}return null});F6.addEventListener("click",async()=>{try{wn("Processing...");let{domainId:n,domainName:e,domainPurpose:t,fundingPotId:a}=await q1();qa.domainId=n,qa.fundingPotId=a,wn(`Team with domainId ${n} and fundingPotId ${a} successfully created. It is called "${e}" and has the purpose "${t}"`)}catch(n){Ur(n),wn("")}});L6.addEventListener("click",async()=>{if(!qa.domainId||!qa.fundingPotId)return Ur(new Error("Please create a domain first"));wn("Processing...");try{let n=await G1();console.info(n)}catch(n){Ur(n),wn("")}return wn(`Successfully funded domain ${qa.domainId}`)});V6.addEventListener("click",async()=>{let n=U6.value;wn("Processing...");try{let e=await z1(n);console.info(e)}catch(e){Ur(e),wn("")}wn(`Successfully paid 0.42 tokens to ${n}`)});})(); + `)}catch(t){Ur(t),wn("")}finally{Xu.value=""}return null});F6.addEventListener("click",async()=>{try{wn("Processing...");let{domainId:n,domainName:e,domainPurpose:t,fundingPotId:a}=await q1();qa.domainId=n,qa.fundingPotId=a,wn(`Team with domainId ${n} and fundingPotId ${a} successfully created. It is called "${e}" and has the purpose "${t}"`)}catch(n){Ur(n),wn("")}});L6.addEventListener("click",async()=>{if(!qa.domainId||!qa.fundingPotId)return Ur(new Error("Please create a domain first"));wn("Processing...");try{let n=await G1();console.info(n)}catch(n){Ur(n),wn("")}return wn(`Successfully funded domain ${qa.domainId}`)});V6.addEventListener("click",async()=>{let n=U6.value;wn("Processing...");try{let e=await z1(n);console.info(e)}catch(e){Ur(e),wn("")}wn(`Successfully paid 0.42 tokens to ${n}`)});})(); /** * [js-sha3]{@link https://github.com/emn178/js-sha3} * diff --git a/basic.js b/basic.js index 621b69a89..d362a7b9b 100644 --- a/basic.js +++ b/basic.js @@ -1,9 +1,9 @@ -"use strict";(()=>{var R6=Object.create;var Ks=Object.defineProperty;var P6=Object.getOwnPropertyDescriptor;var N6=Object.getOwnPropertyNames;var D6=Object.getPrototypeOf,O6=Object.prototype.hasOwnProperty;var B6=(n,e,t)=>e in n?Ks(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)Ks(n,t,{get:e[t],enumerable:!0})},F6=(n,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of N6(e))!O6.call(n,i)&&i!==t&&Ks(n,i,{get:()=>e[i],enumerable:!(a=P6(e,i))||a.enumerable});return n};var wn=(n,e,t)=>(t=n!=null?R6(D6(n)):{},F6(e||!n||!n.__esModule?Ks(t,"default",{value:n,enumerable:!0}):t,n));var xe=(n,e,t)=>(B6(n,typeof e!="symbol"?e+"":e,t),t);var jp=ae(()=>{});var od=ae((Hp,sd)=>{(function(n,e){"use strict";function t(C,u){if(!C)throw new Error(u||"Assertion failed")}function a(C,u){C.super_=u;var y=function(){};y.prototype=u.prototype,C.prototype=new y,C.prototype.constructor=C}function i(C,u,y){if(i.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=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(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 b=s(C,y);return y-1>=u&&(b|=s(C,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(C,u,y,b){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()},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"],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];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=I[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(C){for(var u=new Array(C.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-C.length+1);P<=c;P++){var D=d-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[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,W=D>>>13,ee=w[2]|0,Y=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,Ka=w[8]|0,je=Ka&8191,He=Ka>>>13,Wa=w[9]|0,qe=Wa&8191,Ge=Wa>>>13,Ja=A[0]|0,ze=Ja&8191,Ke=Ja>>>13,$a=A[1]|0,We=$a&8191,Je=$a>>>13,Qa=A[2]|0,$e=Qa&8191,Qe=Qa>>>13,Ya=A[3]|0,Ye=Ya&8191,Xe=Ya>>>13,Xa=A[4]|0,Ze=Xa&8191,et=Xa>>>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,Ke),d=d+Math.imul(P,ze)|0,m=Math.imul(P,Ke);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,Ke),d=d+Math.imul(W,ze)|0,m=Math.imul(W,Ke),g=g+Math.imul(c,We)|0,d=d+Math.imul(c,Je)|0,d=d+Math.imul(P,We)|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(Y,ze),d=Math.imul(Y,Ke),d=d+Math.imul(Q,ze)|0,m=Math.imul(Q,Ke),g=g+Math.imul(V,We)|0,d=d+Math.imul(V,Je)|0,d=d+Math.imul(W,We)|0,m=m+Math.imul(W,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,Ke),d=d+Math.imul(le,ze)|0,m=Math.imul(le,Ke),g=g+Math.imul(Y,We)|0,d=d+Math.imul(Y,Je)|0,d=d+Math.imul(Q,We)|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(W,$e)|0,m=m+Math.imul(W,Qe)|0,g=g+Math.imul(c,Ye)|0,d=d+Math.imul(c,Xe)|0,d=d+Math.imul(P,Ye)|0,m=m+Math.imul(P,Xe)|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,Ke),d=d+Math.imul(De,ze)|0,m=Math.imul(De,Ke),g=g+Math.imul(Z,We)|0,d=d+Math.imul(Z,Je)|0,d=d+Math.imul(le,We)|0,m=m+Math.imul(le,Je)|0,g=g+Math.imul(Y,$e)|0,d=d+Math.imul(Y,Qe)|0,d=d+Math.imul(Q,$e)|0,m=m+Math.imul(Q,Qe)|0,g=g+Math.imul(V,Ye)|0,d=d+Math.imul(V,Xe)|0,d=d+Math.imul(W,Ye)|0,m=m+Math.imul(W,Xe)|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,Ke),d=d+Math.imul(Be,ze)|0,m=Math.imul(Be,Ke),g=g+Math.imul(Ne,We)|0,d=d+Math.imul(Ne,Je)|0,d=d+Math.imul(De,We)|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(Y,Ye)|0,d=d+Math.imul(Y,Xe)|0,d=d+Math.imul(Q,Ye)|0,m=m+Math.imul(Q,Xe)|0,g=g+Math.imul(V,Ze)|0,d=d+Math.imul(V,et)|0,d=d+Math.imul(W,Ze)|0,m=m+Math.imul(W,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 Ku=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Ku>>>26)|0,Ku&=67108863,g=Math.imul(Fe,ze),d=Math.imul(Fe,Ke),d=d+Math.imul(Le,ze)|0,m=Math.imul(Le,Ke),g=g+Math.imul(Oe,We)|0,d=d+Math.imul(Oe,Je)|0,d=d+Math.imul(Be,We)|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,Ye)|0,d=d+Math.imul(Z,Xe)|0,d=d+Math.imul(le,Ye)|0,m=m+Math.imul(le,Xe)|0,g=g+Math.imul(Y,Ze)|0,d=d+Math.imul(Y,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(W,tt)|0,m=m+Math.imul(W,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 Wu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Wu>>>26)|0,Wu&=67108863,g=Math.imul(Ue,ze),d=Math.imul(Ue,Ke),d=d+Math.imul(Ve,ze)|0,m=Math.imul(Ve,Ke),g=g+Math.imul(Fe,We)|0,d=d+Math.imul(Fe,Je)|0,d=d+Math.imul(Le,We)|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,Ye)|0,d=d+Math.imul(Ne,Xe)|0,d=d+Math.imul(De,Ye)|0,m=m+Math.imul(De,Xe)|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(Y,tt)|0,d=d+Math.imul(Y,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(W,at)|0,m=m+Math.imul(W,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,Ke),d=d+Math.imul(He,ze)|0,m=Math.imul(He,Ke),g=g+Math.imul(Ue,We)|0,d=d+Math.imul(Ue,Je)|0,d=d+Math.imul(Ve,We)|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,Ye)|0,d=d+Math.imul(Oe,Xe)|0,d=d+Math.imul(Be,Ye)|0,m=m+Math.imul(Be,Xe)|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(Y,at)|0,d=d+Math.imul(Y,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(W,rt)|0,m=m+Math.imul(W,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,Ke),d=d+Math.imul(Ge,ze)|0,m=Math.imul(Ge,Ke),g=g+Math.imul(je,We)|0,d=d+Math.imul(je,Je)|0,d=d+Math.imul(He,We)|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,Ye)|0,d=d+Math.imul(Fe,Xe)|0,d=d+Math.imul(Le,Ye)|0,m=m+Math.imul(Le,Xe)|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(Y,rt)|0,d=d+Math.imul(Y,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(W,ot)|0,m=m+Math.imul(W,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,We),d=Math.imul(qe,Je),d=d+Math.imul(Ge,We)|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,Ye)|0,d=d+Math.imul(Ue,Xe)|0,d=d+Math.imul(Ve,Ye)|0,m=m+Math.imul(Ve,Xe)|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(Y,ot)|0,d=d+Math.imul(Y,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(W,dt)|0,m=m+Math.imul(W,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,$e),d=Math.imul(qe,Qe),d=d+Math.imul(Ge,$e)|0,m=Math.imul(Ge,Qe),g=g+Math.imul(je,Ye)|0,d=d+Math.imul(je,Xe)|0,d=d+Math.imul(He,Ye)|0,m=m+Math.imul(He,Xe)|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(Y,dt)|0,d=d+Math.imul(Y,lt)|0,d=d+Math.imul(Q,dt)|0,m=m+Math.imul(Q,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,Ye),d=Math.imul(qe,Xe),d=d+Math.imul(Ge,Ye)|0,m=Math.imul(Ge,Xe),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]=Ku,h[6]=Wu,h[7]=Ju,h[8]=$u,h[9]=Qu,h[10]=Yu,h[11]=Xu,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(C,u,y){y.negative=u.negative^C.negative,y.length=C.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(C,u,y){return U(C,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(C,u){this.x=C,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 $(C,u){this.name=C,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(C){if(typeof C=="string"){var u=i._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 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(C){q.call(this,C),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 sd>"u"||sd,Hp)});var fy=ae((gg,Xs)=>{(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 Xs=="object"&&Xs.exports,o=typeof define=="function"&&define.amd,l=!a.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",p="0123456789abcdef".split(""),f=[31,7936,2031616,520093696],x=[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};(a.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(c){return Object.prototype.toString.call(c)==="[object Array]"}),l&&(a.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,W){return new d(c,P,W).update(V)[D]()}},$=function(c,P,D){return function(V,W,ee,Y){return u["cshake"+c].update(V,W,ee,Y)[D]()}},de=function(c,P,D){return function(V,W,ee,Y){return u["kmac"+c].update(V,W,ee,Y)[D]()}},T=function(c,P,D,V){for(var W=0;W>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(n);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(n)}else throw new Error(n);P=!0}for(var V=this.blocks,W=this.byteCount,ee=c.length,Y=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)<=W){for(this.start=Z-W,this.block=V[Y],Z=0;Z>8,D=c&255;D>0;)W.unshift(D),c=c>>8,D=c&255,++V;return P?W.push(V):W.unshift(V),this.update(W),W.length},d.prototype.encodeString=function(c){var P,D=typeof c;if(D!=="string"){if(D==="object"){if(c===null)throw new Error(n);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(n)}else throw new Error(n);P=!0}var V=0,W=c.length;if(P)V=W;else for(var ee=0;ee=57344?V+=3:(Y=65536+((Y&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),W=0)}return V&&(Q=P[W],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 c=this.blockCount,P=this.s,D=this.outputBlocks,V=this.extraBytes,W=0,ee=0,Y=this.outputBits>>3,Q;V?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%c===0&&G(P)}return V&&(Q=ee<<2,yt=P[W],Y[Q]=yt&255,V>1&&(Y[Q+1]=yt>>8&255),V>2&&(Y[Q+2]=yt>>16&255)),Y};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,W,ee,Y,Q,yt,Z,le,Ha,Ne,De,qa,Oe,Be,Ga,Fe,Le,za,Ue,Ve,Ka,je,He,Wa,qe,Ge,Ja,ze,Ke,$a,We,Je,Qa,$e,Qe,Ya,Ye,Xe,Xa,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)W=c[0]^c[10]^c[20]^c[30]^c[40],ee=c[1]^c[11]^c[21]^c[31]^c[41],Y=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^(Y<<1|Q>>>31),D=De^(Q<<1|Y>>>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=W^(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=Y^(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^(W<<1|ee>>>31),D=Ha^(ee<<1|W>>>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,Ke=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,We=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,Ya=c[26]<<25|c[27]>>>7,Ye=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,Wa=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,Xe=c[38]<<8|c[39]>>>24,Xa=c[39]<<8|c[38]>>>24,Ve=c[48]<<14|c[49]>>>18,Ka=c[49]<<14|c[48]>>>18,c[0]=qa^~Be&Fe,c[1]=Oe^~Ga&Le,c[10]=je^~Wa&Ge,c[11]=He^~qe&Ja,c[20]=Je^~$e&Ya,c[21]=Qa^~Qe&Ye,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]=Wa^~Ge&ze,c[13]=qe^~Ja&Ke,c[22]=$e^~Ya&Xe,c[23]=Qe^~Ye&Xa,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&Ka,c[14]=Ge^~ze&$a,c[15]=Ja^~Ke&We,c[24]=Ya^~Xe&Ze,c[25]=Ye^~Xa&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^~Ka&Oe,c[16]=ze^~$a&je,c[17]=Ke^~We&He,c[26]=Xe^~Ze&Je,c[27]=Xa^~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]=Ka^~Oe&Ga,c[18]=$a^~je&Wa,c[19]=We^~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)Xs.exports=u;else{for(b=0;b{u0.exports=o0;function o0(n,e){if(!n)throw new Error(e||"Assertion failed")}o0.equal=function(e,t,a){if(e!=t)throw new Error(a||"Assertion failed: "+e+" != "+t)}});var d0=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 a=function(){};a.prototype=t.prototype,e.prototype=new a,e.prototype.constructor=e}}});var kn=ae(Pe=>{"use strict";var H2=nr(),q2=d0();Pe.inherits=q2;function G2(n,e){return(n.charCodeAt(e)&64512)!==55296||e<0||e+1>=n.length?!1:(n.charCodeAt(e+1)&64512)===56320}function z2(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):G2(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}Pe.htonl=l0;function W2(n,e){for(var t="",a=0;a>>0}return r}Pe.join32=J2;function $2(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}Pe.split32=$2;function Q2(n,e){return n>>>e|n<<32-e}Pe.rotr32=Q2;function Y2(n,e){return n<>>32-e}Pe.rotl32=Y2;function X2(n,e){return n+e>>>0}Pe.sum32=X2;function Z2(n,e,t){return n+e+t>>>0}Pe.sum32_3=Z2;function eh(n,e,t,a){return n+e+t+a>>>0}Pe.sum32_4=eh;function th(n,e,t,a,i){return n+e+t+a+i>>>0}Pe.sum32_5=th;function nh(n,e,t,a){var i=n[e],r=n[e+1],s=a+r>>>0,o=(s>>0,n[e+1]=s}Pe.sum64=nh;function ah(n,e,t,a){var i=e+a>>>0,r=(i>>0}Pe.sum64_hi=ah;function ih(n,e,t,a){var i=e+a;return i>>>0}Pe.sum64_lo=ih;function rh(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}Pe.sum64_4_hi=rh;function sh(n,e,t,a,i,r,s,o){var l=e+a+r+o;return l>>>0}Pe.sum64_4_lo=sh;function oh(n,e,t,a,i,r,s,o,l,p){var f=0,x=e;x=x+a>>>0,f+=x>>0,f+=x>>0,f+=x>>0,f+=x>>0}Pe.sum64_5_hi=oh;function uh(n,e,t,a,i,r,s,o,l,p){var f=e+a+r+o+p;return f>>>0}Pe.sum64_5_lo=uh;function dh(n,e,t){var a=e<<32-t|n>>>t;return a>>>0}Pe.rotr64_hi=dh;function lh(n,e,t){var a=n<<32-t|e>>>t;return a>>>0}Pe.rotr64_lo=lh;function ph(n,e,t){return n>>>t}Pe.shr64_hi=ph;function yh(n,e,t){var a=n<<32-t|e>>>t;return a>>>0}Pe.shr64_lo=yh});var ar=ae(c0=>{"use strict";var f0=kn(),fh=nr();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}c0.BlockHash=To;To.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 a=e.length%this._delta8;this.pending=e.slice(e.length-a,e.length),this.pending.length===0&&(this.pending=null),e=f0.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 ch=kn(),Hn=ch.rotr32;function mh(n,e,t,a){if(n===0)return m0(e,t,a);if(n===1||n===3)return x0(e,t,a);if(n===2)return h0(e,t,a)}da.ft_1=mh;function m0(n,e,t){return n&e^~n&t}da.ch32=m0;function h0(n,e,t){return n&e^n&t^e&t}da.maj32=h0;function x0(n,e,t){return n^e^t}da.p32=x0;function hh(n){return Hn(n,2)^Hn(n,13)^Hn(n,22)}da.s0_256=hh;function xh(n){return Hn(n,6)^Hn(n,11)^Hn(n,25)}da.s1_256=xh;function bh(n){return Hn(n,7)^Hn(n,18)^n>>>3}da.g0_256=bh;function gh(n){return Hn(n,17)^Hn(n,19)^n>>>10}da.g1_256=gh});var T0=ae((m3,g0)=>{"use strict";var ir=kn(),Th=ar(),vh=Od(),Bd=ir.rotl32,$r=ir.sum32,wh=ir.sum32_5,_h=vh.ft_1,b0=Th.BlockHash,kh=[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)}ir.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 a=this.W,i=0;i<16;i++)a[i]=e[t+i];for(;i{"use strict";var rr=kn(),Ah=ar(),sr=Od(),Eh=nr(),An=rr.sum32,Mh=rr.sum32_4,Ch=rr.sum32_5,Ih=sr.ch32,Sh=sr.maj32,Rh=sr.s0_256,Ph=sr.s1_256,Nh=sr.g0_256,Dh=sr.g1_256,v0=Ah.BlockHash,Oh=[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=Oh,this.W=new Array(64)}rr.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 a=this.W,i=0;i<16;i++)a[i]=e[t+i];for(;i{"use strict";var Ld=kn(),_0=Fd();function la(){if(!(this instanceof la))return new la;_0.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}Ld.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"?Ld.toHex32(this.h.slice(0,7),"big"):Ld.split32(this.h.slice(0,7),"big")}});var jd=ae((b3,I0)=>{"use strict";var Qt=kn(),Bh=ar(),Fh=nr(),zn=Qt.rotr64_hi,Kn=Qt.rotr64_lo,E0=Qt.shr64_hi,M0=Qt.shr64_lo,Sa=Qt.sum64,Ud=Qt.sum64_hi,Vd=Qt.sum64_lo,Lh=Qt.sum64_4_hi,Uh=Qt.sum64_4_lo,Vh=Qt.sum64_5_hi,jh=Qt.sum64_5_lo,C0=Bh.BlockHash,Hh=[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=Hh,this.W=new Array(160)}Qt.inherits(En,C0);I0.exports=En;En.blockSize=1024;En.outSize=512;En.hmacStrength=192;En.padLength=128;En.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 Hd=kn(),S0=jd();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]}Hd.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"?Hd.toHex32(this.h.slice(0,12),"big"):Hd.split32(this.h.slice(0,12),"big")}});var N0=ae(or=>{"use strict";or.sha1=T0();or.sha224=A0();or.sha256=Fd();or.sha384=P0();or.sha512=jd()});var U0=ae(L0=>{"use strict";var li=kn(),tx=ar(),vo=li.rotl32,D0=li.sum32,Qr=li.sum32_3,O0=li.sum32_4,F0=tx.BlockHash;function Wn(){if(!(this instanceof Wn))return new Wn;F0.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}li.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 a=this.h[0],i=this.h[1],r=this.h[2],s=this.h[3],o=this.h[4],l=a,p=i,f=r,x=s,I=o,_=0;_<80;_++){var v=D0(vo(O0(a,B0(_,i,r,s),e[ix[_]+t],nx(_)),sx[_]),o);a=o,o=s,s=vo(r,10),r=i,i=v,v=D0(vo(O0(l,B0(79-_,p,f,x),e[rx[_]+t],ax(_)),ox[_]),I),l=I,I=x,x=vo(f,10),f=p,p=v}v=Qr(this.h[1],r,x),this.h[1]=Qr(this.h[2],s,I),this.h[2]=Qr(this.h[3],o,l),this.h[3]=Qr(this.h[4],a,p),this.h[4]=Qr(this.h[0],i,f),this.h[0]=v};Wn.prototype._digest=function(e){return e==="hex"?li.toHex32(this.h,"little"):li.split32(this.h,"little")};function B0(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 nx(n){return n<=15?0:n<=31?1518500249:n<=47?1859775393:n<=63?2400959708:2840853838}function ax(n){return n<=15?1352829926:n<=31?1548603684:n<=47?1836072691:n<=63?2053994217:0}var ix=[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],rx=[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],sx=[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],ox=[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((w3,V0)=>{"use strict";var ux=kn(),dx=nr();function ur(n,e,t){if(!(this instanceof ur))return new ur(n,e,t);this.Hash=n,this.blockSize=n.blockSize/8,this.outSize=n.outSize/8,this.inner=null,this.outer=null,this._init(ux.toArray(e,t))}V0.exports=ur;ur.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),dx(e.length<=this.blockSize);for(var t=e.length;t{var Rt=H0;Rt.utils=kn();Rt.common=ar();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 ul=ae((ol,xf)=>{"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&&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],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],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,W=P%4,this._Ke[V][W]=m[k],this._Kd[h-V][W]=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=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,G=J,c=$,P,D,V,W,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],W=(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]=(W+de[D-7]|0)+(ee+de[D-16]|0)|0;for(D=0;D<64;D++)W=(((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+W|0,g=k,k=h,h=A,A=W+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,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,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 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=a(_,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=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 I={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 fl<"u"?gf.exports=I:typeof define=="function"&&define.amd?define(I):n&&(n.scrypt&&(n._scrypt=n.scrypt),n.scrypt=I)})(fl)});var Gf=ae((p4,qf)=>{"use strict";var zo="qpzry9x8gf2tvdw0s3jn54khce6mua7l",bl={};for(ss=0;ss>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 jf(n){for(var e=1,t=0;t126)return"Invalid prefix ("+n+")";e=xr(e)^a>>5}for(e=xr(e),t=0;tt)throw new TypeError("Exceeds length limit");n=n.toLowerCase();var a=jf(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=xr(a)^s,i+=zo.charAt(s)}for(r=0;r<6;++r)a=xr(a);for(a^=1,r=0;r<6;++r){var o=a>>(5-r)*5&31;i+=zo.charAt(o)}return i}function Hf(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=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 "+n:{prefix:r,words:l}}function Wx(){var n=Hf.apply(null,arguments);if(typeof n=="object")return n}function Jx(n){var e=Hf.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function Ko(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 zl=="object"&&typeof Kl<"u"?Kl.exports=e():typeof define=="function"&&define.amd?define(e):(n=typeof globalThis<"u"?globalThis:n||self,n.fetchRetry=e())})(zl,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,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(I,_){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)I(U);else if(typeof x=="function")try{return Promise.resolve(x(L,null,U)).then(function(H){H?S(L,null,U):I(U)}).catch(_)}catch(H){_(H)}else L=0}function t(a){this.name="ArgumentError",this.message=a}return n})});var Wl=ae(du=>{"use strict";Object.defineProperty(du,"__esModule",{value:!0});du.$dictionary=void 0;du.$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 Rs=ae((bA,im)=>{im.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}});var $l=ae(Fa=>{var Ee=Rs(),Jl=()=>[{type:Ee.RANGE,from:48,to:57}],rm=()=>[{type:Ee.CHAR,value:95},{type:Ee.RANGE,from:97,to:122},{type:Ee.RANGE,from:65,to:90}].concat(Jl()),sm=()=>[{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}],U5=()=>[{type:Ee.CHAR,value:10},{type:Ee.CHAR,value:13},{type:Ee.CHAR,value:8232},{type:Ee.CHAR,value:8233}];Fa.words=()=>({type:Ee.SET,set:rm(),not:!1});Fa.notWords=()=>({type:Ee.SET,set:rm(),not:!0});Fa.ints=()=>({type:Ee.SET,set:Jl(),not:!1});Fa.notInts=()=>({type:Ee.SET,set:Jl(),not:!0});Fa.whitespace=()=>({type:Ee.SET,set:sm(),not:!1});Fa.notWhitespace=()=>({type:Ee.SET,set:sm(),not:!0});Fa.anyChar=()=>({type:Ee.SET,set:U5(),not:!0})});var um=ae(Ps=>{var om=Rs(),Cr=$l(),V5="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?",j5={0:0,t:9,n:10,v:11,f:12,r:13};Ps.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 f=a?8:r?parseInt(r,16):s?parseInt(s,16):o?parseInt(o,8):l?V5.indexOf(l):j5[p],x=String.fromCharCode(f);return/[[\]{}^$.|?*+()]/.test(x)&&(x="\\"+x),x}),n};Ps.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(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:om.RANGE,from:(i[8]||i[9]).charCodeAt(0),to:i[10].charCodeAt(0)});else if(r=i[12])t.push({type:om.CHAR,value:r.charCodeAt(0)});else return[t,a.lastIndex];Ps.error(e,"Unterminated character class")};Ps.error=(n,e)=>{throw new SyntaxError("Invalid regular expression: /"+n+"/: "+e)}});var dm=ae(Ns=>{var lu=Rs();Ns.wordBoundary=()=>({type:lu.POSITION,value:"b"});Ns.nonWordBoundary=()=>({type:lu.POSITION,value:"B"});Ns.begin=()=>({type:lu.POSITION,value:"^"});Ns.end=()=>({type:lu.POSITION,value:"$"})});var lm=ae((wA,Ql)=>{var Ir=um(),xn=Rs(),_i=$l(),pu=dm();Ql.exports=n=>{var e=0,t,a,i={type:xn.ROOT,stack:[]},r=i,s=i.stack,o=[],l=O=>{Ir.error(n,`Nothing to repeat at column ${O-1}`)},p=Ir.strToChars(n);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 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}))}};pm.exports=La});var cm=ae((kA,fm)=>{var yu=lm(),Ds=ym(),ki=yu.types;fm.exports=class Os{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:Os.prototype.max!=null?Os.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 ki.ROOT:case ki.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 H5=Ai&&Ai.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ai,"__esModule",{value:!0});Ai.RandomGenerator=void 0;var q5=H5(cm()),G5;(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 q5.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()}})(G5=Ai.RandomGenerator||(Ai.RandomGenerator={}))});var Bs=ae(Sr=>{"use strict";var z5=Sr&&Sr.__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(Sr,"__esModule",{value:!0});Sr.TypeGuardError=void 0;var K5=function(n){z5(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);Sr.TypeGuardError=K5});var hm=ae(fu=>{"use strict";Object.defineProperty(fu,"__esModule",{value:!0});fu.$any=void 0;var W5=function(n){return n!==void 0?JSON.parse(JSON.stringify(n)):void 0};fu.$any=W5});var xm=ae(cu=>{"use strict";Object.defineProperty(cu,"__esModule",{value:!0});cu.$every=void 0;var J5=function(n,e){for(var t=null,a=0;a{"use strict";Object.defineProperty(mu,"__esModule",{value:!0});mu.$guard=void 0;var $5=Bs(),Q5=function(n){return function(e,t){if(e===!0)throw new $5.TypeGuardError({method:n,path:t.path,expected:t.expected,value:t.value});return!1}};mu.$guard=Q5});var gm=ae(hu=>{"use strict";Object.defineProperty(hu,"__esModule",{value:!0});hu.$is_between=void 0;var Y5=function(n,e,t){return e<=n&&n<=t};hu.$is_between=Y5});var Tm=ae(xu=>{"use strict";Object.defineProperty(xu,"__esModule",{value:!0});xu.$is_custom=void 0;var X5=Wl(),Z5=function(n,e,t,a){var i,r=(i=X5.$dictionary.get(n))===null||i===void 0?void 0:i.get(e);return r===void 0?!0:r(t)(a)};xu.$is_custom=Z5});var vm=ae(bu=>{"use strict";Object.defineProperty(bu,"__esModule",{value:!0});bu.$is_date=void 0;var eb=function(n){return tb.test(n)};bu.$is_date=eb;var tb=/^(\d{4})-(\d{2})-(\d{2})$/});var wm=ae(gu=>{"use strict";Object.defineProperty(gu,"__esModule",{value:!0});gu.$is_datetime=void 0;var nb=function(n){return!isNaN(new Date(n).getTime())};gu.$is_datetime=nb});var _m=ae(Tu=>{"use strict";Object.defineProperty(Tu,"__esModule",{value:!0});Tu.$is_email=void 0;var ab=function(n){return ib.test(n)};Tu.$is_email=ab;var ib=/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i});var km=ae(vu=>{"use strict";Object.defineProperty(vu,"__esModule",{value:!0});vu.$is_ipv4=void 0;var rb=function(n){return sb.test(n)};vu.$is_ipv4=rb;var sb=/^(?: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 Am=ae(wu=>{"use strict";Object.defineProperty(wu,"__esModule",{value:!0});wu.$is_ipv6=void 0;var ob=function(n){return ub.test(n)};wu.$is_ipv6=ob;var ub=/^(([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 Em=ae(_u=>{"use strict";Object.defineProperty(_u,"__esModule",{value:!0});_u.$is_url=void 0;var db=function(n){return lb.test(n)};_u.$is_url=db;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 Mm=ae(ku=>{"use strict";Object.defineProperty(ku,"__esModule",{value:!0});ku.$is_uuid=void 0;var pb=function(n){return yb.test(n)};ku.$is_uuid=pb;var yb=/^(?:[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 Cm=ae(Au=>{"use strict";Object.defineProperty(Au,"__esModule",{value:!0});Au.$join=void 0;var fb=function(n){return cb(n)?".".concat(n):"[".concat(JSON.stringify(n),"]")};Au.$join=fb;var cb=function(n){return mb(n)===!1&&/^[a-zA-Z_$][a-zA-Z_$0-9]*$/g.test(n)},mb=function(n){return hb.has(n)},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 Im=ae(Eu=>{"use strict";Object.defineProperty(Eu,"__esModule",{value:!0});Eu.$number=void 0;var xb=Bs(),bb=function(n){if(isFinite(n)===!1)throw new xb.TypeGuardError({method:"typia.stringify",expected:"number",value:n,message:"Error on typia.stringify(): infinite or not a number."});return n};Eu.$number=bb});var Sm=ae(Mu=>{"use strict";Object.defineProperty(Mu,"__esModule",{value:!0});Mu.$report=void 0;var gb=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}};Mu.$report=gb});var Rm=ae(Cu=>{"use strict";Object.defineProperty(Cu,"__esModule",{value:!0});Cu.$rest=void 0;var Tb=function(n){return n.length===2?"":","+n.substring(1,n.length-1)};Cu.$rest=Tb});var Pm=ae(Iu=>{"use strict";Object.defineProperty(Iu,"__esModule",{value:!0});Iu.$string=void 0;var vb=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,'"')};Iu.$string=vb});var Nm=ae(Su=>{"use strict";Object.defineProperty(Su,"__esModule",{value:!0});Su.$tail=void 0;var wb=function(n){return n[n.length-1]===","?n.substring(0,n.length-1):n};Su.$tail=wb});var Fm=ae(Ei=>{"use strict";var Vt=Ei&&Ei.__assign||function(){return Vt=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 Vt(Vt({},n.is()),{number:Ob.$number,string:Lb.$string,tail:Ub.$tail,rest:Fb.$rest,throws:e(t)})},n.clone=function(t){return Vt(Vt({},n.is()),{throws:e(t),any:_b.$any})},n.prune=function(t){return Vt(Vt({},n.is()),{throws:e(t)})},n.random=function(){return{generator:Dm.RandomGenerator,pick:Dm.RandomGenerator.pick}};var e=function(t){return function(a){throw new Om.TypeGuardError(Vt(Vt({},a),{method:"typia.".concat(t)}))}}})(Vb=Ei.Namespace||(Ei.Namespace={}))});var Lm=ae(Fs=>{"use strict";Object.defineProperty(Fs,"__esModule",{value:!0});Fs.MapUtil=void 0;var jb;(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}}})(jb=Fs.MapUtil||(Fs.MapUtil={}))});var Vm=ae(Um=>{"use strict";Object.defineProperty(Um,"__esModule",{value:!0})});var Hm=ae(jm=>{"use strict";Object.defineProperty(jm,"__esModule",{value:!0})});var Gm=ae(qm=>{"use strict";Object.defineProperty(qm,"__esModule",{value:!0})});var Km=ae(zm=>{"use strict";Object.defineProperty(zm,"__esModule",{value:!0})});var Jm=ae(Wm=>{"use strict";Object.defineProperty(Wm,"__esModule",{value:!0})});var Qm=ae($m=>{"use strict";Object.defineProperty($m,"__esModule",{value:!0})});var dp=ae(z=>{"use strict";var Hb=z&&z.__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]}),Mi=z&&z.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Hb(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 Rr=Wl(),Me=Fm(),qb=Lm();Mi(Vm(),z);Mi(Hm(),z);Mi(Gm(),z);Mi(Km(),z);Mi(Jm(),z);Mi(Qm(),z);Mi(Bs(),z);function Yl(){re("assert")}z.assert=Yl;Object.assign(Yl,Me.Namespace.assert("assert"));function Xl(){re("assertType")}z.assertType=Xl;Object.assign(Xl,Me.Namespace.assert("assertType"));function Ru(){re("is")}z.is=Ru;Object.assign(Ru,Me.Namespace.assert("is"));function Pu(){re("validate")}z.validate=Pu;Object.assign(Pu,Me.Namespace.validate());function Zl(){re("assertEquals")}z.assertEquals=Zl;Object.assign(Zl,Me.Namespace.assert("assertEquals"));function ep(){re("equals")}z.equals=ep;Object.assign(ep,Me.Namespace.is());function tp(){re("validateEquals")}z.validateEquals=tp;Object.assign(tp,Me.Namespace.validate());z.customValidators={size:function(n){var e,t;return n?(t=(e=Rr.$dictionary.get(n))===null||e===void 0?void 0:e.size)!==null&&t!==void 0?t:0:Rr.$dictionary.size},has:function(n){return function(e){var t,a;return(a=(t=Rr.$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=Rr.$dictionary.get(n))===null||t===void 0?void 0:t.get(e)}},insert:function(n){return function(e){return function(t){var a=qb.MapUtil.take(Rr.$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=Rr.$dictionary.get(n))===null||t===void 0?void 0:t.delete(e))!==null&&a!==void 0?a:!1}}};function Gb(){re("application")}z.application=Gb;function np(){re("assertParse")}z.assertParse=np;Object.assign(np,Me.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,Me.Namespace.stringify("stringify"));function Nu(){re("assertStringify")}z.assertStringify=Nu;Object.assign(Nu,Me.Namespace.assert("assertStringify"));Object.assign(Nu,Me.Namespace.stringify("assertStringify"));function Du(){re("isStringify")}z.isStringify=Du;Object.assign(Du,Me.Namespace.is());Object.assign(Du,Me.Namespace.stringify("isStringify"));function Ou(){re("validateStringify")}z.validateStringify=Ou;Object.assign(Ou,Me.Namespace.validate());Object.assign(Ou,Me.Namespace.stringify("validateStringify"));function zb(){re("metadata")}z.metadata=zb;function sp(){re("random")}z.random=sp;Object.assign(sp,Me.Namespace.random());function Kb(){re("literals")}z.literals=Kb;function op(){re("clone")}z.clone=op;Object.assign(op,Me.Namespace.clone("clone"));function Bu(){re("assertClone")}z.assertClone=Bu;Object.assign(Bu,Me.Namespace.assert("assertClone"));Object.assign(Bu,Me.Namespace.clone("assertClone"));function Fu(){re("isClone")}z.isClone=Fu;Object.assign(Fu,Me.Namespace.is());Object.assign(Fu,Me.Namespace.clone("isClone"));function Lu(){re("validateClone")}z.validateClone=Lu;Object.assign(Lu,Me.Namespace.validate());Object.assign(Lu,Me.Namespace.clone("validateClone"));function up(){re("prune")}z.prune=up;Object.assign(up,Me.Namespace.prune("prune"));function Uu(){re("assertPrune")}z.assertPrune=Uu;Object.assign(Uu,Me.Namespace.assert("assertPrune"));Object.assign(Uu,Me.Namespace.prune("assertPrune"));function Vu(){re("isPrune")}z.isPrune=Vu;Object.assign(Vu,Me.Namespace.is());Object.assign(Vu,Me.Namespace.prune("isPrune"));function ju(){re("validatePrune")}z.validatePrune=ju;Object.assign(ju,Me.Namespace.prune("validatePrune"));Object.assign(ju,Me.Namespace.validate());function Ym(){re("createAssert")}z.createAssert=Ym;Object.assign(Ym,Yl);function Xm(){re("createAssertType")}z.createAssertType=Xm;Object.assign(Xm,Xl);function Zm(){re("createIs")}z.createIs=Zm;Object.assign(Zm,Ru);function e6(){re("createValidate")}z.createValidate=e6;Object.assign(e6,Pu);function t6(){re("createAssertEquals")}z.createAssertEquals=t6;Object.assign(t6,Zl);function n6(){re("createEquals")}z.createEquals=n6;Object.assign(n6,ep);function a6(){re("createValidateEquals")}z.createValidateEquals=a6;Object.assign(a6,tp);function i6(){re("createIsParse")}z.createIsParse=i6;Object.assign(i6,ap);function r6(){re("createAssertParse")}z.createAssertParse=r6;Object.assign(r6,np);function s6(){re("createValidateParse")}z.createValidateParse=s6;Object.assign(s6,ip);function o6(){re("createStringify")}z.createStringify=o6;Object.assign(o6,rp);function u6(){re("createAssertStringify")}z.createAssertStringify=u6;Object.assign(u6,Nu);function d6(){re("createIsStringify")}z.createIsStringify=d6;Object.assign(d6,Du);function l6(){re("createValidateStringify")}z.createValidateStringify=l6;Object.assign(l6,Ou);function p6(){re("createRandom")}z.createRandom=p6;Object.assign(p6,sp);function y6(){re("createClone")}z.createClone=y6;Object.assign(y6,op);function f6(){re("createAssertClone")}z.createAssertClone=f6;Object.assign(f6,Bu);function c6(){re("createIsClone")}z.createIsClone=c6;Object.assign(c6,Fu);function m6(){re("createValidateClone")}z.createValidateClone=m6;Object.assign(m6,Lu);function h6(){re("createPrune")}z.createPrune=h6;Object.assign(h6,up);function x6(){re("createAssertPrune")}z.createAssertPrune=x6;Object.assign(x6,Uu);function b6(){re("createIsPrune")}z.createIsPrune=b6;Object.assign(b6,Vu);function g6(){re("createValidatePrune")}z.createValidatePrune=g6;Object.assign(g6,ju);function re(n){throw new Error("Error on typia.".concat(n,'(): no transform has been configured. Run "npx typia setup" command.'))}});var v6=ae(gn=>{"use strict";var T6=gn&&gn.__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]}),Wb=gn&&gn.__setModuleDefault||(Object.create?function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}:function(n,e){n.default=e}),Jb=gn&&gn.__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)&&T6(e,n,t);return Wb(e,n),e},$b=gn&&gn.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&T6(e,n,t)};Object.defineProperty(gn,"__esModule",{value:!0});var Qb=Jb(dp());gn.default=Qb;$b(dp(),gn)});var Nl={};ji(Nl,{BaseContract:()=>lr,BigNumber:()=>F,Contract:()=>oe,ContractFactory:()=>ci,FixedNumber:()=>ft,Signer:()=>St,VoidSigner:()=>ua,Wallet:()=>Cn,Wordlist:()=>hn,constants:()=>ht,errors:()=>Kt,getDefaultProvider:()=>au,logger:()=>Ac,providers:()=>ea,utils:()=>ne,version:()=>ru,wordlists:()=>hi});var ey=wn(od());var qp="logger/5.7.0";var Gp=!1,zp=!1,Ws={debug:1,default:2,info:2,warning:3,error:4,off:5},Kp=Ws.default,ud=null;function L6(){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 Wp=L6(),dd;(function(n){n.DEBUG="DEBUG",n.INFO="INFO",n.WARNING="WARNING",n.ERROR="ERROR",n.OFF="OFF"})(dd||(dd={}));var Kt;(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"})(Kt||(Kt={}));var Jp="0123456789abcdef",E=class{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){let a=e.toLowerCase();Ws[a]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(Kp>Ws[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(zp)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 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(a[l].toString()))}}),i.push(`code=${t}`),i.push(`version=${this.version}`);let r=e,s="";switch(t){case Kt.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 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+" ]"),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"),Wp&&this.throwError("platform missing String.prototype.normalize",E.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:Wp})}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 ud||(ud=new E(qp)),ud}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",E.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),Gp){if(!e)return;this.globalLogger().throwError("error censorship permanent",E.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}zp=!!e,Gp=!!t}static setLogLevel(e){let t=Ws[e.toLowerCase()];if(t==null){E.globalLogger().warn("invalid log level - "+e);return}Kp=t}static from(e){return new E(e)}};E.errors=Kt;E.levels=dd;var $p="bytes/5.7.0";var wt=new E($p);function Yp(n){return!!n.toHexString}function Hi(n){return n.slice||(n.slice=function(){let e=Array.prototype.slice.call(arguments);return Hi(new Uint8Array(Array.prototype.slice.apply(n,e)))}),n}function aa(n){return ie(n)&&!(n.length%2)||on(n)}function Qp(n){return typeof n=="number"&&n==n&&n%1===0}function on(n){if(n==null)return!1;if(n.constructor===Uint8Array)return!0;if(typeof n=="string"||!Qp(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"){wt.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),Hi(new Uint8Array(t))}if(e.allowMissingPrefix&&typeof n=="string"&&n.substring(0,2)!=="0x"&&(n="0x"+n),Yp(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":wt.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),Hi(a)}function Zt(n){let e=j(n);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(n,e-n.length),Hi(t)}function ie(n,e){return!(typeof n!="string"||!n.match(/^0x[0-9A-Fa-f]*$/)||e&&n.length!==2+2*e)}var ld="0123456789abcdef";function K(n,e){if(e||(e={}),typeof n=="number"){wt.checkSafeUint53(n,"invalid hexlify value");let t="";for(;n;)t=ld[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),Yp(n))return n.toHexString();if(ie(n))return n.length%2&&(e.hexPad==="left"?n="0x0"+n.substring(2):e.hexPad==="right"?n+="0":wt.throwArgumentError("hex data is odd-length","value",n)),n.toLowerCase();if(on(n)){let t="0x";for(let a=0;a>4]+ld[i&15]}return t}return wt.throwArgumentError("invalid hexlify value","value",n)}function Nt(n){if(typeof n!="string")n=K(n);else if(!ie(n)||n.length%2)return null;return(n.length-2)/2}function Ce(n,e,t){return typeof n!="string"?n=K(n):(!ie(n)||n.length%2)&&wt.throwArgumentError("invalid hexData","value",n),e=2+2*e,t!=null?"0x"+n.substring(e,2+2*t):"0x"+n.substring(e)}function _t(n){let e="0x";return n.forEach(t=>{e+=K(t).substring(2)}),e}function Ln(n){let e=pd(K(n,{hexPad:"left"}));return e==="0x"?"0x0":e}function pd(n){typeof n!="string"&&(n=K(n)),ie(n)||wt.throwArgumentError("invalid hex string","value",n),n=n.substring(2);let e=0;for(;e2*e+2&&wt.throwArgumentError("value out of range","value",arguments[1]);n.length<2*e+2;)n="0x0"+n.substring(2);return n}function Un(n){let e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(aa(n)){let t=j(n);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]):wt.throwArgumentError("invalid signature string","signature",n),e.v<27&&(e.v===0||e.v===1?e.v+=27:wt.throwArgumentError("signature invalid v byte","signature",n)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(t[32]|=128),e._vs=K(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=ii(j(e._vs),32);e._vs=K(i);let r=i[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=r:e.recoveryParam!==r&&wt.throwArgumentError("signature recoveryParam mismatch _vs","signature",n),i[0]&=127;let s=K(i);e.s==null?e.s=s:e.s!==s&&wt.throwArgumentError("signature v mismatch _vs","signature",n)}if(e.recoveryParam==null)e.v==null?wt.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&&wt.throwArgumentError("signature recoveryParam mismatch v","signature",n)}e.r==null||!ie(e.r)?wt.throwArgumentError("signature missing or invalid r","signature",n):e.r=me(e.r,32),e.s==null||!ie(e.s)?wt.throwArgumentError("signature missing or invalid s","signature",n):e.s=me(e.s,32);let t=j(e.s);t[0]>=128&&wt.throwArgumentError("signature s out of range","signature",n),e.recoveryParam&&(t[0]|=128);let a=K(t);e._vs&&(ie(e._vs)||wt.throwArgumentError("signature invalid _vs","signature",n),e._vs=me(e._vs,32)),e._vs==null?e._vs=a:e._vs!==a&&wt.throwArgumentError("signature _vs mismatch v and s","signature",n)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function Br(n){return n=Un(n),K(ye([n.r,n.s,n.recoveryParam?"0x1c":"0x1b"]))}var Js="bignumber/5.7.0";var Fr=ey.default.BN,ia=new E(Js),yd={},Xp=9007199254740991;function ty(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"||on(n))}var Zp=!1,F=class{constructor(e,t){e!==yd&&ia.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 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 ia.throwError("this platform does not support BigInt",E.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()",E.errors.UNEXPECTED_ARGUMENT,{}):ia.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(yd,Lr(e)):e.match(/^-?[0-9]+$/)?new F(yd,Lr(new Fr(e))):ia.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&un("underflow","BigNumber.from",e),(e>=Xp||e<=-Xp)&&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 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 ia.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}};function Lr(n){if(typeof n!="string")return Lr(n.toString(16));if(n[0]==="-")return n=n.substring(1),n[0]==="-"&&ia.throwArgumentError("invalid hex","value",n),n=Lr(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 Wt(n){return F.from(Lr(n))}function be(n){let e=F.from(n).toHexString();return e[0]==="-"?new Fr("-"+e.substring(3),16):new Fr(e.substring(2),16)}function un(n,e,t){let a={fault:n,operation:e};return t!=null&&(a.value=t),ia.throwError(n,E.errors.NUMERIC_FAULT,a)}function fd(n){return new Fr(n,36).toString(16)}function cd(n){return new Fr(n,16).toString(36)}var jt=new E(Js),Ur={},ay=F.from(0),iy=F.from(-1);function ry(n,e,t,a){let i={fault:e,operation:t};return a!==void 0&&(i.value=a),jt.throwError(n,E.errors.NUMERIC_FAULT,i)}var Vr="0";for(;Vr.length<256;)Vr+=Vr;function md(n){if(typeof n!="number")try{n=F.from(n).toNumber()}catch{}return typeof n=="number"&&n>=0&&n<=256&&!(n%1)?"1"+Vr.substring(0,n):jt.throwArgumentError("invalid decimal size","decimals",n)}function qi(n,e){e==null&&(e=0);let t=md(e);n=F.from(n);let a=n.lt(ay);a&&(n=n.mul(iy));let i=n.mod(t).toString();for(;i.length2&&jt.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&&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),a=r("width","number",a),i=r("decimals","number",i)}return a%8&&jt.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",a),i>80&&jt.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new ra(Ur,t,a,i)}},ft=class{constructor(e,t,a,i){e!==Ur&&jt.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&&jt.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),a=dn(e._value,e.format.decimals);return ft.fromValue(t.add(a),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),a=dn(e._value,e.format.decimals);return ft.fromValue(t.sub(a),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),a=dn(e._value,e.format.decimals);return ft.fromValue(t.mul(a).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),a=dn(e._value,e.format.decimals);return ft.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=ft.from(e[0],this.format),a=!e[1].match(/^(0*)$/);return this.isNegative()&&a&&(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),a=!e[1].match(/^(0*)$/);return!this.isNegative()&&a&&(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 a=ft.from("1"+Vr.substring(0,e),this.format),i=U6.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&&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,a){return a==null&&t!=null&&!ty(t)&&(a=t,t=null),t==null&&(t=0),a==null&&(a="fixed"),ft.fromString(qi(e,t),ra.from(a))}static fromString(e,t){t==null&&(t="fixed");let a=ra.from(t),i=dn(e,a.decimals);!a.signed&&i.lt(ay)&&ry("unsigned value cannot be negative","overflow","value",e);let r=null;a.signed?r=i.toTwos(a.width).toHexString():(r=i.toHexString(),r=me(r,a.width/8));let s=qi(i,a.decimals);return new ft(Ur,r,s,a)}static fromBytes(e,t){t==null&&(t="fixed");let a=ra.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 ft(Ur,r,s,a)}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(a){if(a.code!==E.errors.INVALID_ARGUMENT)throw a}return jt.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}},ny=ft.from(1),U6=ft.from("0.5");var sy="properties/5.7.0";var V6=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},$s=new E(sy);function B(n,e,t){Object.defineProperty(n,e,{enumerable:!0,value:t,writable:!1})}function mt(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 Ie(n){return V6(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 Gi(n,e){(!n||typeof n!="object")&&$s.throwArgumentError("invalid object","object",n),Object.keys(n).forEach(t=>{e[t]||$s.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 j6={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function oy(n){if(n==null||j6[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;tct(e)));if(typeof n=="object"){let e={};for(let t in n){let a=n[t];a!==void 0&&B(e,t,ct(a))}return e}return $s.throwArgumentError(`Cannot deepCopy ${typeof n}`,"object",n)}function ct(n){return H6(n)}var en=class{constructor(e){for(let t in e)this[t]=ct(e[t])}};var Vn="abi/5.7.0";var Te=new E(Vn),ri={},uy={calldata:!0,memory:!0,storage:!0},q6={calldata:!0,memory:!0};function Qs(n,e){if(n==="bytes"||n==="string"){if(uy[e])return!0}else if(n==="address"){if(e==="payable")return!0}else if((n.indexOf("[")>=0||n==="tuple")&&q6[e])return!0;return(uy[e]||e==="payable")&&Te.throwArgumentError("invalid modifier","name",e),!1}function G6(n,e){let t=n;function a(o){Te.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!==ge.sighash&&(t+=this.type),t+="("+this.components.map(a=>a.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:zi(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(pt.fromObject):null})}static fromString(e,t){function a(i){return pt.fromObject({name:i.name,type:i.type,indexed:i.indexed,components:i.components})}return a(G6(e,!!t))}static isParamType(e){return!!(e!=null&&e._isParamType)}};function jr(n,e){return W6(n).map(t=>pt.fromString(t,e))}var qt=class{constructor(e,t){e!==ri&&Te.throwError("use a static from method",E.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),Ys(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(a=>JSON.parse(a.format(e)))});let t="";return e!==ge.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map(a=>a.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(ri,t)}static fromString(e){let t=e.match(qr);t||Te.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:Te.warn("unknown modifier: "+i)}}),Ht.fromObject({name:t[1].trim(),anonymous:a,inputs:jr(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}};function ly(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 py(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 yy(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 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(a=>JSON.parse(a.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(a=>a.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 a={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,a)}static fromString(e){let t={type:"constructor"};e=ly(e,t);let a=e.match(qr);return(!a||a[1].trim()!=="constructor")&&Te.throwArgumentError("invalid constructor string","value",e),t.inputs=jr(a[2].trim(),!1),py(a[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(a=>JSON.parse(a.format(e))),outputs:this.outputs.map(a=>JSON.parse(a.format(e)))});let t="";return e!==ge.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map(a=>a.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(a=>a.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),a={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 Ot(ri,a)}static fromString(e){let t={type:"function"};e=ly(e,t);let a=e.split(" returns ");a.length>2&&Te.throwArgumentError("invalid function string","value",e);let i=a[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),a.length>1){let r=a[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 Ot.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}};function dy(n){let e=n.format();return(e==="Error(string)"||e==="Panic(uint256)")&&Te.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",n),n}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(a=>JSON.parse(a.format(e)))});let t="";return e!==ge.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map(a=>a.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(ri,t))}static fromString(e){let t={type:"error"},a=e.match(qr);return a||Te.throwArgumentError("invalid error signature","value",e),t.name=a[1].trim(),t.name&&Hr(t.name),t.inputs=jr(a[2],!1),dy(tn.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}};function zi(n){return n.match(/^uint($|[^1-9])/)?n="uint256"+n.substring(4):n.match(/^int($|[^1-9])/)&&(n="int256"+n.substring(3)),n}var K6=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function Hr(n){return(!n||!n.match(K6))&&Te.throwArgumentError(`invalid identifier "${n}"`,"value",n),n}var qr=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function W6(n){n=n.trim();let e=[],t="",a=0;for(let i=0;ithis.wordSize&&hd.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)}}},oi=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 K(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):oi.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:hd.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 oi(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 cy=wn(fy());function fe(n){return"0x"+cy.default.keccak_256(j(n))}var Zs={};ji(Zs,{decode:()=>Gr,encode:()=>sa});var my="rlp/5.7.0";var jn=new E(my);function hy(n){let e=[];for(;n;)e.unshift(n&255),n>>=8;return e}function xy(n,e,t){let a=0;for(let i=0;ie+1+a&&jn.throwError("child data too short",E.errors.BUFFER_OVERRUN,{})}return{consumed:1+a,result:i}}function Ty(n,e){if(n.length===0&&jn.throwError("data too short",E.errors.BUFFER_OVERRUN,{}),n[e]>=248){let t=n[e]-247;e+1+t>n.length&&jn.throwError("data short segment too short",E.errors.BUFFER_OVERRUN,{});let a=xy(n,e+1,t);return e+1+t+a>n.length&&jn.throwError("data long segment too short",E.errors.BUFFER_OVERRUN,{}),by(n,e,e+1+t,t+a)}else if(n[e]>=192){let t=n[e]-192;return e+1+t>n.length&&jn.throwError("data array too short",E.errors.BUFFER_OVERRUN,{}),by(n,e,e+1,t)}else if(n[e]>=184){let t=n[e]-183;e+1+t>n.length&&jn.throwError("data array too short",E.errors.BUFFER_OVERRUN,{});let a=xy(n,e+1,t);e+1+t+a>n.length&&jn.throwError("data array too short",E.errors.BUFFER_OVERRUN,{});let i=K(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&&jn.throwError("data too short",E.errors.BUFFER_OVERRUN,{});let a=K(n.slice(e+1,e+1+t));return{consumed:1+t,result:a}}return{consumed:1,result:K(n[e])}}function Gr(n){let e=j(n),t=Ty(e,0);return t.consumed!==e.length&&jn.throwArgumentError("invalid rlp data","data",n),t.result}var vy="address/5.7.0";var Ea=new E(vy);function wy(n){ie(n,20)||Ea.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 J6=9007199254740991;function $6(n){return Math.log10?Math.log10(n):Math.log(n)/Math.LN10}var xd={};for(let n=0;n<10;n++)xd[String(n)]=String(n);for(let n=0;n<26;n++)xd[String.fromCharCode(65+n)]=String(10+n);var _y=Math.floor($6(J6));function ky(n){n=n.toUpperCase(),n=n.substring(4)+n.substring(0,2)+"00";let e=n.split("").map(a=>xd[a]).join("");for(;e.length>=_y;){let a=e.substring(0,_y);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 ce(n){let e=null;if(typeof n!="string"&&Ea.throwArgumentError("invalid address","address",n),n.match(/^(0x)?[0-9a-fA-F]{40}$/))n.substring(0,2)!=="0x"&&(n="0x"+n),e=wy(n),n.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==n&&Ea.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)!==ky(n)&&Ea.throwArgumentError("bad icap checksum","address",n),e=fd(n.substring(4));e.length<40;)e="0"+e;e=wy("0x"+e)}else Ea.throwArgumentError("invalid address","address",n);return e}function Ay(n){try{return ce(n),!0}catch{}return!1}function Ey(n){let e=cd(ce(n).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+ky("XE00"+e)+e}function ui(n){let e=null;try{e=ce(n.from)}catch{Ea.throwArgumentError("missing from address","transaction",n)}let t=Zt(j(F.from(n.nonce).toHexString()));return ce(Ce(fe(sa([e,t])),12))}function My(n,e,t){return Nt(e)!==32&&Ea.throwArgumentError("salt must be 32 bytes","salt",e),Nt(t)!==32&&Ea.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",t),ce(Ce(fe(ye(["0xff",ce(n),e,t])),12))}var eo=class extends kt{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=ce(t)}catch(a){this._throwError(a.message,t)}return e.writeValue(t)}decode(e){return ce(me(e.readValue().toHexString(),20))}};var to=class extends kt{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 Wi=new E(Vn);function bd(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 f=p.localName;return f||Wi.throwError("cannot encode object for signature with missing names",E.errors.INVALID_ARGUMENT,{argument:"values",coder:p,value:t}),l[f]&&Wi.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 Wi.throwArgumentError("invalid tuple value","tuple",t);e.length!==a.length&&Wi.throwArgumentError("types/value length mismatch","tuple",t);let i=new si(n.wordSize),r=new si(n.wordSize),s=[];e.forEach((l,p)=>{let f=a[p];if(l.dynamic){let x=r.length;l.encode(r,f);let I=i.writeUpdatableValue();s.push(_=>{I(_+x)})}else l.encode(i,f)}),s.forEach(l=>{l(i.length)});let o=n.appendWriter(i);return o+=n.appendWriter(r),o}function gd(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 no=class extends kt{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&&Wi.throwError("insufficient data length",E.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let a=[];for(let i=0;ioo,EtherSymbol:()=>Py,HashZero:()=>$i,MaxInt256:()=>Ry,MaxUint256:()=>po,MinInt256:()=>Sy,NegativeOne:()=>uo,One:()=>lo,Two:()=>Cy,WeiPerEther:()=>Iy,Zero:()=>Ji});var oo="0x0000000000000000000000000000000000000000";var uo=F.from(-1),Ji=F.from(0),lo=F.from(1),Cy=F.from(2),Iy=F.from("1000000000000000000"),po=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),Sy=F.from("-0x8000000000000000000000000000000000000000000000000000000000000000"),Ry=F.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");var $i="0x0000000000000000000000000000000000000000000000000000000000000000";var Py="\u039E";var yo=class extends kt{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=po.mask(e.wordSize*8);if(this.signed){let r=i.mask(this.size*8-1);(a.gt(r)||a.lt(r.add(lo).mul(uo)))&&this._throwError("value out-of-bounds",t)}else(a.lt(Ji)||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 Ny="strings/5.7.0";var Dy=new E(Ny),Gt;(function(n){n.current="",n.NFC="NFC",n.NFD="NFD",n.NFKC="NFKC",n.NFKD="NFKD"})(Gt||(Gt={}));var Bt;(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"})(Bt||(Bt={}));function Q6(n,e,t,a,i){return Dy.throwArgumentError(`invalid codepoint at offset ${e}; ${n}`,"bytes",t)}function Oy(n,e,t,a,i){if(n===Bt.BAD_PREFIX||n===Bt.UNEXPECTED_CONTINUE){let r=0;for(let s=e+1;s>6===2;s++)r++;return r}return n===Bt.OVERRUN?t.length-e-1:0}function Y6(n,e,t,a,i){return n===Bt.OVERLONG?(a.push(i),0):(a.push(65533),Oy(n,e,t,a,i))}var fo=Object.freeze({error:Q6,ignore:Oy,replace:Y6});function vd(n,e){e==null&&(e=fo.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(Bt.UNEXPECTED_CONTINUE,a-1,n,t):a+=e(Bt.BAD_PREFIX,a-1,n,t);continue}if(a-1+r>=n.length){a+=e(Bt.OVERRUN,a-1,n,t);continue}let o=i&(1<<8-r-1)-1;for(let l=0;l1114111){a+=e(Bt.OUT_OF_RANGE,a-1-r,n,t,o);continue}if(o>=55296&&o<=57343){a+=e(Bt.UTF16_SURROGATE,a-1-r,n,t,o);continue}if(o<=s){a+=e(Bt.OVERLONG,a-1-r,n,t,o);continue}t.push(o)}}return t}function ve(n,e=Gt.current){e!=Gt.current&&(Dy.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 Td(n){let e="0000"+n.toString(16);return"\\u"+e.substring(e.length-4)}function wd(n,e){return'"'+vd(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?Td(t):(t-=65536,Td((t>>10&1023)+55296)+Td((t&1023)+56320))}).join("")+'"'}function co(n){return n.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function Jt(n,e){return co(vd(n,e))}function Ma(n,e=Gt.current){return vd(ve(n,e))}function _d(n){let e=ve(n);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return K(ye([e,$i]).slice(0,32))}function kd(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 Jt(e.slice(0,t))}function X6(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 By(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 Ed(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 Z6=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"),e2="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(n=>parseInt(n,16)),t2=[{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}],n2=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"),a2=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"),i2=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",X6),r2=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 s2(n){return n.reduce((e,t)=>(t.forEach(a=>{e.push(a)}),e),[])}function o2(n){return!!Ed(n,Z6)}function u2(n){let e=Ed(n,t2);if(e)return[n+e.s];let t=n2[n];if(t)return t;let a=a2[n];if(a)return[n+a[0]];let i=i2[n];return i||null}function d2(n){return!!Ed(n,r2)}function Md(n){if(n.match(/^[a-z0-9-]*$/i)&&n.length<=59)return n.toLowerCase();let e=Ma(n);e=s2(e.map(a=>{if(e2.indexOf(a)>=0)return[];if(a>=65024&&a<=65039)return[];let i=u2(a);return i||[a]})),e=Ma(co(e),Gt.NFKC),e.forEach(a=>{if(d2(a))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(a=>{if(o2(a))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 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 di=class extends kt{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 bd(e,this.coders,t)}decode(e){return e.coerce(this.name,gd(e,this.coders))}};var ho=new E(Vn),l2=new RegExp(/^bytes([0-9]*)$/),p2=new RegExp(/^(u?int)([0-9]*)$/),Qi=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(a=>this._getCoder(a)),e.name);case"":return new so(e.name)}let t=e.type.match(p2);if(t){let a=parseInt(t[2]||"256");return(a===0||a>256||a%8!==0)&&ho.throwArgumentError("invalid "+t[1]+" bit length","param",e),new yo(a/8,t[1]==="int",e.name)}if(t=e.type.match(l2),t){let a=parseInt(t[1]);return(a===0||a>32)&&ho.throwArgumentError("invalid bytes length","param",e),new ro(a,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",E.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});let a=e.map(s=>this._getCoder(pt.from(s))),i=new di(a,"_"),r=this._getWriter();return i.encode(r,t),r.data}decode(e,t,a){let i=e.map(s=>this._getCoder(pt.from(s)));return new di(i,"_").decode(this._getReader(j(t),a))}},Kr=new Qi;function nn(n){return fe(ve(n))}var xo="hash/5.7.0";var Cd={};ji(Cd,{decode:()=>Yi,encode:()=>Xi});function Yi(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 y2(n){let e={};for(let t=0;t>--l&1}let x=31,I=Math.pow(2,x),_=I>>>1,v=_>>1,S=I-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=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 c2(n){let e=0;return()=>n[e++]}function Uy(n){return c2(f2(n))}function m2(n){return n&1?~n>>1:n>>1}function h2(n,e){let t=Array(n);for(let a=0;ae[s]):t}function Vy(n){let e=[];for(;;){let t=n();if(t==0)break;e.push(g2(t,n))}for(;;){let t=n()-1;if(t<0)break;e.push(T2(t,n))}return y2(Ly(e))}function b2(n){let e=[];for(;;){let t=n();if(t==0)break;e.push(t)}return e}function jy(n,e,t){let a=Array(n).fill(void 0).map(()=>[]);for(let i=0;ia[s].push(r));return a}function g2(n,e){let t=1+e(),a=e(),i=b2(e),r=jy(i.length,1+n,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 I=x*a;return[l+x*t,p.map(_=>_+I)]})}))}function T2(n,e){let t=1+e();return jy(t,1+n,e).map(i=>[i[0],i.slice(1)])}function Hy(n){let e=Wr(n).sort((a,i)=>a-i);return t();function t(){let a=[];for(;;){let p=Wr(n,e);if(p.length==0)break;a.push({set:new Set(p),node:t()})}a.sort((p,f)=>f.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 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 bo=qy(),v2=new Set(Wr(bo)),w2=new Set(Wr(bo)),_2=Vy(bo),k2=Hy(bo),Gy=45,zy=95;function Ky(n){return Ma(n)}function A2(n){return n.filter(e=>e!=65039)}function Wy(n){for(let e of n.split(".")){let t=Ky(e);try{for(let a=t.lastIndexOf(zy)-1;a>=0;a--)if(t[a]!==zy)throw new Error("underscore only allowed at start");if(t.length>=4&&t.every(a=>a<128)&&t[2]===Gy&&t[3]===Gy)throw new Error("invalid label extension")}catch(a){throw new Error(`Invalid label "${e}": ${a.message}`)}}return n}function Jy(n){return Wy(E2(n,A2))}function E2(n,e){let t=Ky(n).reverse(),a=[];for(;t.length;){let i=C2(t);if(i){a.push(...e(i));continue}let r=t.pop();if(v2.has(r)){a.push(r);continue}if(w2.has(r))continue;let s=_2[r];if(s){a.push(...s);continue}throw new Error(`Disallowed codepoint: 0x${r.toString(16).toUpperCase()}`)}return Wy(M2(String.fromCodePoint(...a)))}function M2(n){return n.normalize("NFC")}function C2(n,e){var t;let a=k2,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 I2=new E(xo),Qy=new Uint8Array(32);Qy.fill(0);function $y(n){if(n.length===0)throw new Error("invalid ENS name; empty component");return n}function Id(n){let e=ve(Jy(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($y(e.slice(a))),t}function Sd(n){try{return Id(n).length!==0}catch{}return!1}function Ca(n){typeof n!="string"&&I2.throwArgumentError("invalid ENS name; not a string","name",n);let e=Qy,t=Id(n);for(;t.length;)e=fe(ye([e,fe(t.pop())]));return K(e)}function Jr(n){return K(ye(Id(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 Yy=`Ethereum Signed Message: -`;function Zi(n){return typeof n=="string"&&(n=ve(n)),fe(ye([ve(Yy),ve(String(n.length)),n]))}var S2=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},xt=new E(xo),t0=new Uint8Array(32);t0.fill(0);var R2=F.from(-1),n0=F.from(0),a0=F.from(1),P2=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function N2(n){let e=j(n),t=e.length%32;return t?_t([e,t0.slice(t)]):K(e)}var D2=me(a0.toHexString(),32),O2=me(n0.toHexString(),32),Xy={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Rd=["name","version","chainId","verifyingContract","salt"];function Zy(n){return function(e){return typeof e!="string"&&xt.throwArgumentError(`invalid domain value for ${JSON.stringify(n)}`,`domain.${n}`,e),e}}var B2={name:Zy("name"),version:Zy("version"),chainId:function(n){try{return F.from(n).toString()}catch{}return xt.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",n)},verifyingContract:function(n){try{return ce(n).toLowerCase()}catch{}return xt.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 K(e)}catch{}return xt.throwArgumentError('invalid domain value "salt"',"domain.salt",n)}};function Pd(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))&&xt.throwArgumentError("invalid numeric width","type",n);let i=P2.mask(t?a-1:a),r=t?i.add(a0).mul(R2):n0;return function(s){let o=F.from(s);return(o.lt(r)||o.gt(i))&&xt.throwArgumentError(`value out-of-bounds for ${n}`,"value",s),me(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))&&xt.throwArgumentError("invalid bytes width","type",n),function(a){return j(a).length!==t&&xt.throwArgumentError(`invalid length for ${n}`,"value",a),N2(a)}}}switch(n){case"address":return function(e){return me(ce(e),32)};case"bool":return function(e){return e?D2:O2};case"bytes":return function(e){return fe(e)};case"string":return function(e){return nn(e)}}return null}function e0(n,e){return`${n}(${e.map(({name:t,type:a})=>a+" "+t).join(",")})`}var bt=class{constructor(e){B(this,"types",Object.freeze(ct(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]&&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)&&(a[f]||xt.throwArgumentError(`unknown type ${JSON.stringify(f)}`,"types",e),a[f].push(o),t[o][f]=!0)})}let r=Object.keys(a).filter(o=>a[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=>{!a[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=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(_t(l))}}let a=this.types[e];if(a){let i=nn(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),_t(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,a){if(Pd(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&&xt.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),{}):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,a){return bt.from(t).hashStruct(e,a)}static hashDomain(e){let t=[];for(let a in e){let i=Xy[a];i||xt.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(a)}`,"domain",e),t.push({name:a,type:i})}return t.sort((a,i)=>Rd.indexOf(a.name)-Rd.indexOf(i.name)),bt.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,a){return _t(["0x1901",bt.hashDomain(e),bt.from(t).hash(a)])}static hash(e,t,a){return fe(bt.encode(e,t,a))}static resolveNames(e,t,a,i){return S2(this,void 0,void 0,function*(){e=we(e);let r={};e.verifyingContract&&!ie(e.verifyingContract,20)&&(r[e.verifyingContract]="0x");let s=bt.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){bt.hashDomain(e);let i={},r=[];Rd.forEach(l=>{let p=e[l];p!=null&&(i[l]=B2[l](p),r.push({name:l,type:Xy[l]}))});let s=bt.from(t),o=we(t);return o.EIP712Domain?xt.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 K(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(Vn);var er=class extends en{},tr=class extends en{},Nd=class extends en{},oa=class extends en{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 i0(n,e){let t=new Error(`deferred error during ABI decoding triggered accessing ${n}`);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(a=>qt.from(a)).filter(a=>a!=null)),B(this,"_abiCoder",mt(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){gt.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]){gt.warn("duplicate definition - "+r);return}i[r]=a}),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(a=>a.format(e));return e===ge.json?JSON.stringify(t.map(a=>JSON.parse(a))):t}static getAbiCoder(){return Kr}static getAddress(e){return ce(e)}static getSighash(e){return Ce(nn(e.format()),0,4)}static getEventTopic(e){return nn(e.format())}getFunction(e){if(ie(e)){for(let a in this.functions)if(e===this.getSighash(a))return this.functions[a];gt.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?gt.throwArgumentError("no matching function","name",a):i.length>1&>.throwArgumentError("multiple matching functions","name",a),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 a=e.toLowerCase();for(let i in this.events)if(a===this.getEventTopic(i))return this.events[i];gt.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?gt.throwArgumentError("no matching event","name",a):i.length>1&>.throwArgumentError("multiple matching events","name",a),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 a=mt(this.constructor,"getSighash");for(let i in this.errors){let r=this.errors[i];if(e===a(r))return this.errors[i]}gt.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?gt.throwArgumentError("no matching error","name",a):i.length>1&>.throwArgumentError("multiple matching errors","name",a),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 a=j(t);return K(a.slice(0,4))!==this.getSighash(e)&>.throwArgumentError(`data signature does not match error ${e.name}.`,"data",K(a)),this._decodeParams(e.inputs,a.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 a=j(t);return K(a.slice(0,4))!==this.getSighash(e)&>.throwArgumentError(`data signature does not match function ${e.name}.`,"data",K(a)),this._decodeParams(e.inputs,a.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 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=K(a.slice(0,4)),f=F2[p];if(f)s=this._abiCoder.decode(f.inputs,a.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,a.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:K(t),errorArgs:s,errorName:o,errorSignature:l,reason:i})}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&>.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"?nn(s):r.type==="bytes"?fe(K(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(K(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?a.push(null):o.baseType==="array"||o.baseType==="tuple"?gt.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&>.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(nn(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 I=this.getEventTopic(e);(!ie(a[0],32)||a[0].toLowerCase()!==I)&>.throwError("fragment/topic mismatch",E.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:I,value:a[0]}),a=a.slice(1)}let i=[],r=[],s=[];e.inputs.forEach((I,_)=>{I.indexed?I.type==="string"||I.type==="bytes"||I.baseType==="tuple"||I.baseType==="array"?(i.push(pt.fromObject({type:"bytes32",name:I.name})),s.push(!0)):(i.push(I),s.push(!1)):(r.push(I),s.push(!1))});let o=a!=null?this._abiCoder.decode(i,ye(a)):null,l=this._abiCoder.decode(r,t,!0),p=[],f=0,x=0;e.inputs.forEach((I,_)=>{if(I.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(I.name&&p[I.name]==null){let v=p[_];v instanceof Error?Object.defineProperty(p,I.name,{enumerable:!0,get:()=>{throw i0(`property ${JSON.stringify(I.name)}`,v)}}):p[I.name]=v}});for(let I=0;I{throw i0(`index ${I}`,_)}})}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=K(e),a=this.getError(t.substring(0,10).toLowerCase());return a?new Nd({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 r0="abstract-provider/5.7.0";var L2=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},U2=new E(r0),go=class extends en{static isForkEvent(e){return!!(e&&e._isForkEvent)}};var $t=class{constructor(){U2.checkAbstract(new.target,$t),B(this,"_isProvider",!0)}getFeeData(){return L2(this,void 0,void 0,function*(){let{block:e,gasPrice:t}=yield Ie({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 s0="abstract-signer/5.7.0";var _n=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},ln=new E(s0),V2=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],j2=[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 _n(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return _n(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return _n(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 _n(this,void 0,void 0,function*(){this._checkProvider("call");let a=yield Ie(this.checkTransaction(e));return yield this.provider.call(a,t)})}sendTransaction(e){return _n(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 _n(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return _n(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return _n(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return _n(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(let a in e)V2.indexOf(a)===-1&&ln.throwArgumentError("invalid transaction key: "+a,"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(a=>(a[0].toLowerCase()!==a[1].toLowerCase()&&ln.throwArgumentError("from address mismatch","transaction",e),a[0])),t}populateTransaction(e){return _n(this,void 0,void 0,function*(){let t=yield Ie(this.checkTransaction(e));t.to!=null&&(t.to=Promise.resolve(t.to).then(i=>_n(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 a=t.maxFeePerGas!=null||t.maxPriorityFeePerGas!=null;if(t.gasPrice!=null&&(t.type===2||a)?ln.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(t.type===0||t.type===1)&&a&&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?(a&&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(j2.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 Ie(t)})}_checkProvider(e){this.provider||ln.throwError("missing provider",E.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,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 ua(this.address,e)}};var pe=wn(od()),Jn=wn(qd());function dr(n,e,t){return t={path:e,exports:{},require:function(a,i){return lx(a,i??t.path)}},n(t,t.exports),t.exports}function lx(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var Wd=G0;function G0(n,e){if(!n)throw new Error(e||"Assertion failed")}G0.equal=function(e,t,a){if(e!=t)throw new Error(a||"Assertion failed: "+e+" != "+t)};var Mn=dr(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,I=f&255;x?l.push(x,I):l.push(I)}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(I>>1)-1?S=(I>>1)-L:S=L,_.isubn(S)):S=0,x[v]=S,_.iushrn(1)}return x}t.getNAF=a;function i(l,p){var f=[[],[]];l=l.clone(),p=p.clone();for(var x=0,I=0,_;l.cmpn(-x)>0||p.cmpn(-I)>0;){var v=l.andln(3)+x&3,S=p.andln(3)+I&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)+I&7,(_===3||_===5)&&v===2?O=-S:O=S),f[1].push(O),2*x===L+1&&(x=1-x),2*I===O+1&&(I=1-I),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,px=an.getJSF,Ao=an.assert;function Pa(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 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 a=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),I=r;I>0;I--){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,a,i,r){var s=this._wnafT1,o=this._wnafT2,l=this._wnafT3,p=0,f,x,I;for(f=0;f=1;f-=2){var v=f-1,S=f;if(s[v]!==1||s[S]!==1){l[v]=ko(a[v],s[v],this._bitLength),l[S]=ko(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=px(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;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?I=o[x][R-1>>1]:R<0&&(I=o[x][-R-1>>1].neg()),I.type==="affine"?J=J.mixedAdd(I):J=J.add(I))}}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 a=[this],i=this,r=0;r=0&&(_=p,v=f),x.negative&&(x=x.neg(),I=I.neg()),_.negative&&(_=_.neg(),v=v.neg()),[{a:x,b:I},{a:_,b:v}]};fn.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),f=s.mul(i.b),x=e.sub(o).sub(l),I=p.add(f).neg();return{k1:x,k2:I}};fn.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)};fn.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};fn.prototype._endoWnafMulAdd=function(e,t,a){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 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)};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,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)};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,a){var i=[this,t],r=[e,a];return this.curve.endo?this.curve._endoWnafMulAdd(i,r):this.curve._wnafMulAdd(1,i,r,2)};Mt.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)};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 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};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(n,e,t,a){pi.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}Jd(Pt,pi.BasePoint);fn.prototype.jpoint=function(e,t,a){return new Pt(this,e,t,a)};Pt.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)};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(),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 f=l.redSqr(),x=f.redMul(l),I=i.redMul(f),_=p.redSqr().redIAdd(x).redISub(I).redISub(I),v=p.redMul(I.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(),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(),f=p.redMul(o),x=a.redMul(p),I=l.redSqr().redIAdd(f).redISub(x).redISub(x),_=l.redMul(x.redISub(I)).redISub(r.redMul(f)),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 a=this;for(t=0;t=0)return!1;if(a.redIAdd(r),this.x.cmp(a)===0)return!0}};Pt.prototype.inspect=function(){return this.isInfinity()?"":""};Pt.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var wo=dr(function(n,e){"use strict";var t=e;t.base=pi,t.short=fx,t.mont=null,t.edwards=null}),_o=dr(function(n,e){"use strict";var t=e,a=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,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: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(n){if(!(this instanceof Ra))return new Ra(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=Mn.toArray(n.entropy,n.entropyEnc||"hex"),t=Mn.toArray(n.nonce,n.nonceEnc||"hex"),a=Mn.toArray(n.pers,n.persEnc||"hex");Wd(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,t,a)}var z0=Ra;Ra.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};Ra.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=Mn.toArray(a,i||"hex"),this._update(a));for(var r=[];r.length"};var cx=an.assert;function Eo(n,e){if(n instanceof Eo)return n;this._importDER(n,e)||(cx(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 Mo=Eo;function mx(){this.place=0}function Gd(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 q0(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)}Eo.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=q0(t),a=q0(a);!a[0]&&!(a[1]&128);)a=a.slice(1);var i=[2];zd(i,t.length),i=i.concat(t),i.push(2),zd(i,a.length);var r=i.concat(a),s=[48];return zd(s,r.length),s=s.concat(r),an.encode(s,e)};var hx=function(){throw new Error("unsupported")},K0=an.assert;function pn(n){if(!(this instanceof pn))return new pn(n);typeof n=="string"&&(K0(Object.prototype.hasOwnProperty.call(_o,n),"Unknown curve "+n),n=_o[n]),n instanceof _o.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 xx=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 z0({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||hx(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)}};pn.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};pn.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 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 I=this.g.mul(x);if(!I.isInfinity()){var _=I.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=(I.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 Mo({r:v,s:S,recoveryParam:L})}}}}}};pn.prototype.verify=function(e,t,a,i){e=this._truncateToN(new pe.default(e,16)),a=this.keyFromPublic(a,i),t=new Mo(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,a.getPublic(),p),f.isInfinity()?!1:f.eqXToP(r)):(f=this.g.mulAdd(l,a.getPublic(),p),f.isInfinity()?!1:f.getX().umod(this.n).cmp(r)===0)};pn.prototype.recoverPubKey=function(n,e,t,a){K0((3&t)===t,"The recovery param is more than two bits"),e=new Mo(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 f=e.r.invm(i),x=i.sub(r).mul(f).umod(i),I=o.mul(f).umod(i);return this.g.mulAdd(x,s,I)};pn.prototype.getKeyRecoveryParam=function(n,e,t,a){if(e=new Mo(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 bx=dr(function(n,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=xx,t.eddsa=null}),W0=bx.ec;var J0="signing-key/5.7.0";var Yd=new E(J0),Qd=null;function $n(){return Qd||(Qd=new W0("secp256k1")),Qd}var cn=class{constructor(e){B(this,"curve","secp256k1"),B(this,"privateKey",K(e)),Nt(this.privateKey)!==32&&Yd.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)),a=$n().keyFromPublic(j(e));return"0x"+t.pub.add(a.pub).encodeCompressed("hex")}signDigest(e){let t=$n().keyFromPrivate(j(this.privateKey)),a=j(e);a.length!==32&&Yd.throwArgumentError("bad digest length","digest",e);let i=t.sign(a,{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)),a=$n().keyFromPublic(j(Yr(e)));return me("0x"+t.derive(a.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}};function Co(n,e){let t=Un(e),a={r:j(t.r),s:j(t.s)};return"0x"+$n().recoverPubKey(j(n),a,t.recoveryParam).encode("hex",!1)}function Yr(n,e){let t=j(n);if(t.length===32){let a=new cn(t);return e?"0x"+$n().keyFromPrivate(t).getPublic(!0,"hex"):a.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 Yd.throwArgumentError("invalid public or private key","key","[REDACTED]")}var $0="transactions/5.7.0";var Ut=new E($0),Io;(function(n){n[n.legacy=0]="legacy",n[n.eip2930=1]="eip2930",n[n.eip1559=2]="eip1559"})(Io||(Io={}));function Zd(n){return n==="0x"?null:ce(n)}function Lt(n){return n==="0x"?Ji:F.from(n)}var gx=[{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"}],Tx={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function mn(n){let e=Yr(n);return ce(Ce(fe(Ce(e,1)),12))}function yi(n,e){return mn(Co(j(n),e))}function rn(n,e){let t=Zt(F.from(n).toHexString());return t.length>32&&Ut.throwArgumentError("invalid length for "+e,"transaction:"+e,n),t}function Xd(n,e){return{address:ce(n),storageKeys:(e||[]).map((t,a)=>(Nt(t)!==32&&Ut.throwArgumentError("invalid access list storageKey",`accessList[${n}:${a}]`,t),t.toLowerCase()))}}function sn(n){if(Array.isArray(n))return n.map((t,a)=>Array.isArray(t)?(t.length>2&&Ut.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${a}]`,t),Xd(t[0],t[1])):Xd(t.address,t.storageKeys));let e=Object.keys(n).map(t=>{let a=n[t].reduce((i,r)=>(i[r]=!0,i),{});return Xd(t,Object.keys(a).sort())});return e.sort((t,a)=>t.address.localeCompare(a.address)),e}function Q0(n){return sn(n).map(e=>[e.address,e.storageKeys])}function Y0(n,e){if(n.gasPrice!=null){let a=F.from(n.gasPrice),i=F.from(n.maxFeePerGas||0);a.eq(i)||Ut.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:a,maxFeePerGas:i})}let t=[rn(n.chainId||0,"chainId"),rn(n.nonce||0,"nonce"),rn(n.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),rn(n.maxFeePerGas||0,"maxFeePerGas"),rn(n.gasLimit||0,"gasLimit"),n.to!=null?ce(n.to):"0x",rn(n.value||0,"value"),n.data||"0x",Q0(n.accessList||[])];if(e){let a=Un(e);t.push(rn(a.recoveryParam,"recoveryParam")),t.push(Zt(a.r)),t.push(Zt(a.s))}return _t(["0x02",sa(t)])}function X0(n,e){let t=[rn(n.chainId||0,"chainId"),rn(n.nonce||0,"nonce"),rn(n.gasPrice||0,"gasPrice"),rn(n.gasLimit||0,"gasLimit"),n.to!=null?ce(n.to):"0x",rn(n.value||0,"value"),n.data||"0x",Q0(n.accessList||[])];if(e){let a=Un(e);t.push(rn(a.recoveryParam,"recoveryParam")),t.push(Zt(a.r)),t.push(Zt(a.s))}return _t(["0x01",sa(t)])}function vx(n,e){Gi(n,Tx);let t=[];gx.forEach(function(s){let o=n[s.name]||[],l={};s.numeric&&(l.hexPad="left"),o=j(K(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(K(o))});let a=0;if(n.chainId!=null?(a=n.chainId,typeof a!="number"&&Ut.throwArgumentError("invalid transaction.chainId","transaction",n)):e&&!aa(e)&&e.v>28&&(a=Math.floor((e.v-35)/2)),a!==0&&(t.push(K(a)),t.push("0x"),t.push("0x")),!e)return sa(t);let i=Un(e),r=27+i.recoveryParam;return a!==0?(t.pop(),t.pop(),t.pop(),r+=a*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(K(r)),t.push(Zt(j(i.r))),t.push(Zt(j(i.s))),sa(t)}function Xr(n,e){if(n.type==null||n.type===0)return n.accessList!=null&&Ut.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",n),vx(n,e);switch(n.type){case 1:return X0(n,e);case 2:return Y0(n,e);default:break}return Ut.throwError(`unsupported transaction type: ${n.type}`,E.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:n.type})}function Z0(n,e,t){try{let a=Lt(e[0]).toNumber();if(a!==0&&a!==1)throw new Error("bad recid");n.v=a}catch{Ut.throwArgumentError("invalid v for transaction type: 1","v",e[0])}n.r=me(e[1],32),n.s=me(e[2],32);try{let a=fe(t(n));n.from=yi(a,{r:n.r,s:n.s,recoveryParam:n.v})}catch{}}function wx(n){let e=Gr(n.slice(1));e.length!==9&&e.length!==12&&Ut.throwArgumentError("invalid component count for transaction type: 2","payload",K(n));let t=Lt(e[2]),a=Lt(e[3]),i={type:2,chainId:Lt(e[0]).toNumber(),nonce:Lt(e[1]).toNumber(),maxPriorityFeePerGas:t,maxFeePerGas:a,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(n),Z0(i,e.slice(9),Y0)),i}function _x(n){let e=Gr(n.slice(1));e.length!==8&&e.length!==11&&Ut.throwArgumentError("invalid component count for transaction type: 1","payload",K(n));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(n),Z0(t,e.slice(8),X0)),t}function kx(n){let e=Gr(n);e.length!==9&&e.length!==6&&Ut.throwArgumentError("invalid raw transaction","rawTransaction",n);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 a=t.v-27,i=e.slice(0,6);t.chainId!==0&&(i.push(K(t.chainId)),i.push("0x"),i.push("0x"),a-=t.chainId*2+8);let r=fe(sa(i));try{t.from=yi(r,{r:K(t.r),s:K(t.s),recoveryParam:a})}catch{}t.hash=fe(n)}return t.type=null,t}function So(n){let e=j(n);if(e[0]>127)return kx(e);switch(e[0]){case 1:return _x(e);case 2:return wx(e);default:break}return Ut.throwError(`unsupported transaction type: ${e[0]}`,E.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}var ef="contracts/5.7.0";var Na=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Se=new E(ef),Ax={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(n,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{}n||Se.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&&Se.throwArgumentError("resolver or addr is not configured for ENS name","name",t),a})}function Zr(n,e,t){return Na(this,void 0,void 0,function*(){return Array.isArray(t)?yield Promise.all(t.map((a,i)=>Zr(n,Array.isArray(e)?e[i]:e[a.name],a))):t.type==="address"?yield Ro(n,e):t.type==="tuple"?yield Zr(n,e,t.components):t.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(a=>Zr(n,a,t.arrayChildren))):Promise.reject(Se.makeError("invalid value for array",E.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function Do(n,e,t){return Na(this,void 0,void 0,function*(){let a={};t.length===e.inputs.length+1&&typeof t[t.length-1]=="object"&&(a=we(t.pop())),Se.checkArgumentCount(t.length,e.inputs.length,"passed to contract"),n.signer?a.from?a.from=Ie({override:Ro(n.signer,a.from),signer:n.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",E.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),p.override})):a.from=n.signer.getAddress():a.from&&(a.from=Ro(n.provider,a.from));let i=yield Ie({args:Zr(n.signer||n.provider,t,e.inputs),address:n.resolvedAddress,overrides:Ie(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=sn(o.accessList)),s.gasLimit==null&&e.gas!=null){let p=21e3,f=j(r);for(let x=0;xa[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 Ex(n,e){return function(...t){return Do(n,e,t)}}function Mx(n,e){let t=n.signer||n.provider;return function(...a){return Na(this,void 0,void 0,function*(){t||Se.throwError("estimate require a provider or signer",E.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});let i=yield Do(n,e,a);return yield t.estimateGas(i)})}}function nf(n,e){let t=e.wait.bind(e);e.wait=a=>t(a).then(i=>(i.events=i.logs.map(r=>{let s=ct(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 af(n,e,t){let a=n.signer||n.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=we(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 Do(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 Cx(n,e){return function(...t){return Na(this,void 0,void 0,function*(){n.signer||Se.throwError("sending a transaction requires a signer",E.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),n.deployTransaction!=null&&(yield n._deployed());let a=yield Do(n,e,t),i=yield n.signer.sendTransaction(a);return nf(n,i),i})}}function tf(n,e,t){return e.constant?af(n,e,t):Cx(n,e)}function rf(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 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(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]}},el=class extends fi{constructor(){super("error",null)}},Po=class extends fi{constructor(e,t,a,i){let r={address:e},s=t.getEventTopic(a);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",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=Ki(e.args);if(t.length)throw t[0].error;let a=(e.args||[]).slice();return a.push(e),a}},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=(a,i)=>this.interface.decodeEventLog(t.eventFragment,a,i),e.args=t.args}catch{}}},lr=class{constructor(e,t,a){B(this,"interface",mt(new.target,"getInterface")(t)),a==null?(B(this,"provider",null),B(this,"signer",null)):St.isSigner(a)?(B(this,"provider",a.provider||null),B(this,"signer",a)):$t.isProvider(a)?(B(this,"provider",a),B(this,"signer",null)):Se.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]]):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",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,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,Ex(this,o)),this.estimateGas[s]==null&&B(this.estimateGas,s,Mx(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 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",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=we(e||{});return["from","to"].forEach(function(a){t[a]!=null&&Se.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 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 a=e.topics[0];if(typeof a!="string")throw new Error("invalid topic");let i=this.interface.getEvent(a);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(rf(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,a){let i=ct(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||Se.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=we(i.filter);return typeof t=="string"&&ie(t,32)?(a!=null&&Se.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 lr{},ci=class{constructor(e,t,a){let i=null;typeof t=="string"?i=t:on(t)?i=K(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),a&&!St.isSigner(a)&&Se.throwArgumentError("invalid signer","signer",a),B(this,"bytecode",i),B(this,"interface",mt(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=we(e.pop());for(let a in t)if(!Ax[a])throw new Error("unknown transaction override "+a)}return["data","from","to"].forEach(a=>{t[a]!=null&&Se.throwError("cannot override "+a,E.errors.UNSUPPORTED_OPERATION,{operation:a})}),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=K(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 a=yield Zr(this.signer,e,this.interface.deploy.inputs);a.push(t);let i=this.getDeployTransaction(...a),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",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 ui(e)}static getContract(e,t,a){return new oe(e,t,a)}};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;)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 I=j(fa(i,n,l));r||(r=I.length,f=new Uint8Array(r),s=Math.ceil(a/r),p=a-(s-1)*r),f.set(I);for(let S=1;S{var R6=Object.create;var Ks=Object.defineProperty;var P6=Object.getOwnPropertyDescriptor;var N6=Object.getOwnPropertyNames;var D6=Object.getPrototypeOf,O6=Object.prototype.hasOwnProperty;var B6=(n,e,t)=>e in n?Ks(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)Ks(n,t,{get:e[t],enumerable:!0})},F6=(n,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of N6(e))!O6.call(n,i)&&i!==t&&Ks(n,i,{get:()=>e[i],enumerable:!(a=P6(e,i))||a.enumerable});return n};var wn=(n,e,t)=>(t=n!=null?R6(D6(n)):{},F6(e||!n||!n.__esModule?Ks(t,"default",{value:n,enumerable:!0}):t,n));var xe=(n,e,t)=>(B6(n,typeof e!="symbol"?e+"":e,t),t);var jp=ae(()=>{});var ud=ae((Hp,od)=>{(function(n,e){"use strict";function t(C,u){if(!C)throw new Error(u||"Assertion failed")}function a(C,u){C.super_=u;var y=function(){};y.prototype=u.prototype,C.prototype=new y,C.prototype.constructor=C}function i(C,u,y){if(i.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=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(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 b=s(C,y);return y-1>=u&&(b|=s(C,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(C,u,y,b){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()},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"],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];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=I[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(C){for(var u=new Array(C.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-C.length+1);P<=c;P++){var D=d-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[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,W=D>>>13,ee=w[2]|0,Y=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,Ka=w[8]|0,je=Ka&8191,He=Ka>>>13,Wa=w[9]|0,qe=Wa&8191,Ge=Wa>>>13,Ja=A[0]|0,ze=Ja&8191,Ke=Ja>>>13,$a=A[1]|0,We=$a&8191,Je=$a>>>13,Qa=A[2]|0,$e=Qa&8191,Qe=Qa>>>13,Ya=A[3]|0,Ye=Ya&8191,Xe=Ya>>>13,Xa=A[4]|0,Ze=Xa&8191,et=Xa>>>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,Ke),d=d+Math.imul(P,ze)|0,m=Math.imul(P,Ke);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,Ke),d=d+Math.imul(W,ze)|0,m=Math.imul(W,Ke),g=g+Math.imul(c,We)|0,d=d+Math.imul(c,Je)|0,d=d+Math.imul(P,We)|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(Y,ze),d=Math.imul(Y,Ke),d=d+Math.imul(Q,ze)|0,m=Math.imul(Q,Ke),g=g+Math.imul(V,We)|0,d=d+Math.imul(V,Je)|0,d=d+Math.imul(W,We)|0,m=m+Math.imul(W,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,Ke),d=d+Math.imul(le,ze)|0,m=Math.imul(le,Ke),g=g+Math.imul(Y,We)|0,d=d+Math.imul(Y,Je)|0,d=d+Math.imul(Q,We)|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(W,$e)|0,m=m+Math.imul(W,Qe)|0,g=g+Math.imul(c,Ye)|0,d=d+Math.imul(c,Xe)|0,d=d+Math.imul(P,Ye)|0,m=m+Math.imul(P,Xe)|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,Ke),d=d+Math.imul(De,ze)|0,m=Math.imul(De,Ke),g=g+Math.imul(Z,We)|0,d=d+Math.imul(Z,Je)|0,d=d+Math.imul(le,We)|0,m=m+Math.imul(le,Je)|0,g=g+Math.imul(Y,$e)|0,d=d+Math.imul(Y,Qe)|0,d=d+Math.imul(Q,$e)|0,m=m+Math.imul(Q,Qe)|0,g=g+Math.imul(V,Ye)|0,d=d+Math.imul(V,Xe)|0,d=d+Math.imul(W,Ye)|0,m=m+Math.imul(W,Xe)|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,Ke),d=d+Math.imul(Be,ze)|0,m=Math.imul(Be,Ke),g=g+Math.imul(Ne,We)|0,d=d+Math.imul(Ne,Je)|0,d=d+Math.imul(De,We)|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(Y,Ye)|0,d=d+Math.imul(Y,Xe)|0,d=d+Math.imul(Q,Ye)|0,m=m+Math.imul(Q,Xe)|0,g=g+Math.imul(V,Ze)|0,d=d+Math.imul(V,et)|0,d=d+Math.imul(W,Ze)|0,m=m+Math.imul(W,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,Ke),d=d+Math.imul(Le,ze)|0,m=Math.imul(Le,Ke),g=g+Math.imul(Oe,We)|0,d=d+Math.imul(Oe,Je)|0,d=d+Math.imul(Be,We)|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,Ye)|0,d=d+Math.imul(Z,Xe)|0,d=d+Math.imul(le,Ye)|0,m=m+Math.imul(le,Xe)|0,g=g+Math.imul(Y,Ze)|0,d=d+Math.imul(Y,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(W,tt)|0,m=m+Math.imul(W,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,Ke),d=d+Math.imul(Ve,ze)|0,m=Math.imul(Ve,Ke),g=g+Math.imul(Fe,We)|0,d=d+Math.imul(Fe,Je)|0,d=d+Math.imul(Le,We)|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,Ye)|0,d=d+Math.imul(Ne,Xe)|0,d=d+Math.imul(De,Ye)|0,m=m+Math.imul(De,Xe)|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(Y,tt)|0,d=d+Math.imul(Y,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(W,at)|0,m=m+Math.imul(W,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 $u=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+($u>>>26)|0,$u&=67108863,g=Math.imul(je,ze),d=Math.imul(je,Ke),d=d+Math.imul(He,ze)|0,m=Math.imul(He,Ke),g=g+Math.imul(Ue,We)|0,d=d+Math.imul(Ue,Je)|0,d=d+Math.imul(Ve,We)|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,Ye)|0,d=d+Math.imul(Oe,Xe)|0,d=d+Math.imul(Be,Ye)|0,m=m+Math.imul(Be,Xe)|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(Y,at)|0,d=d+Math.imul(Y,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(W,rt)|0,m=m+Math.imul(W,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,Ke),d=d+Math.imul(Ge,ze)|0,m=Math.imul(Ge,Ke),g=g+Math.imul(je,We)|0,d=d+Math.imul(je,Je)|0,d=d+Math.imul(He,We)|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,Ye)|0,d=d+Math.imul(Fe,Xe)|0,d=d+Math.imul(Le,Ye)|0,m=m+Math.imul(Le,Xe)|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(Y,rt)|0,d=d+Math.imul(Y,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(W,ot)|0,m=m+Math.imul(W,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 Yu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Yu>>>26)|0,Yu&=67108863,g=Math.imul(qe,We),d=Math.imul(qe,Je),d=d+Math.imul(Ge,We)|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,Ye)|0,d=d+Math.imul(Ue,Xe)|0,d=d+Math.imul(Ve,Ye)|0,m=m+Math.imul(Ve,Xe)|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(Y,ot)|0,d=d+Math.imul(Y,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(W,dt)|0,m=m+Math.imul(W,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,Ye)|0,d=d+Math.imul(je,Xe)|0,d=d+Math.imul(He,Ye)|0,m=m+Math.imul(He,Xe)|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(Y,dt)|0,d=d+Math.imul(Y,lt)|0,d=d+Math.imul(Q,dt)|0,m=m+Math.imul(Q,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,Ye),d=Math.imul(qe,Xe),d=d+Math.imul(Ge,Ye)|0,m=Math.imul(Ge,Xe),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 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,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 td=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(td>>>26)|0,td&=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 nd=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(nd>>>26)|0,nd&=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 ad=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(ad>>>26)|0,ad&=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 id=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(id>>>26)|0,id&=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 rd=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(rd>>>26)|0,rd&=67108863,g=Math.imul(qe,dt),d=Math.imul(qe,lt),d=d+Math.imul(Ge,dt)|0,m=Math.imul(Ge,lt);var sd=(k+g|0)+((d&8191)<<13)|0;return k=(m+(d>>>13)|0)+(sd>>>26)|0,sd&=67108863,h[0]=va,h[1]=wa,h[2]=_a,h[3]=ka,h[4]=Aa,h[5]=Wu,h[6]=Ju,h[7]=$u,h[8]=Qu,h[9]=Yu,h[10]=Xu,h[11]=Zu,h[12]=ed,h[13]=td,h[14]=nd,h[15]=ad,h[16]=id,h[17]=rd,h[18]=sd,k!==0&&(h[19]=k,b.length++),b};Math.imul||(O=L);function U(C,u,y){y.negative=u.negative^C.negative,y.length=C.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(C,u,y){return U(C,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(C,u){this.x=C,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 $(C,u){this.name=C,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(C){if(typeof C=="string"){var u=i._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 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(C){q.call(this,C),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 od>"u"||od,Hp)});var fy=ae((gg,Xs)=>{(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 Xs=="object"&&Xs.exports,o=typeof define=="function"&&define.amd,l=!a.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",p="0123456789abcdef".split(""),f=[31,7936,2031616,520093696],x=[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};(a.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(c){return Object.prototype.toString.call(c)==="[object Array]"}),l&&(a.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,W){return new d(c,P,W).update(V)[D]()}},$=function(c,P,D){return function(V,W,ee,Y){return u["cshake"+c].update(V,W,ee,Y)[D]()}},de=function(c,P,D){return function(V,W,ee,Y){return u["kmac"+c].update(V,W,ee,Y)[D]()}},T=function(c,P,D,V){for(var W=0;W>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(n);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(n)}else throw new Error(n);P=!0}for(var V=this.blocks,W=this.byteCount,ee=c.length,Y=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)<=W){for(this.start=Z-W,this.block=V[Y],Z=0;Z>8,D=c&255;D>0;)W.unshift(D),c=c>>8,D=c&255,++V;return P?W.push(V):W.unshift(V),this.update(W),W.length},d.prototype.encodeString=function(c){var P,D=typeof c;if(D!=="string"){if(D==="object"){if(c===null)throw new Error(n);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(n)}else throw new Error(n);P=!0}var V=0,W=c.length;if(P)V=W;else for(var ee=0;ee=57344?V+=3:(Y=65536+((Y&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),W=0)}return V&&(Q=P[W],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 c=this.blockCount,P=this.s,D=this.outputBlocks,V=this.extraBytes,W=0,ee=0,Y=this.outputBits>>3,Q;V?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%c===0&&G(P)}return V&&(Q=ee<<2,yt=P[W],Y[Q]=yt&255,V>1&&(Y[Q+1]=yt>>8&255),V>2&&(Y[Q+2]=yt>>16&255)),Y};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,W,ee,Y,Q,yt,Z,le,Ha,Ne,De,qa,Oe,Be,Ga,Fe,Le,za,Ue,Ve,Ka,je,He,Wa,qe,Ge,Ja,ze,Ke,$a,We,Je,Qa,$e,Qe,Ya,Ye,Xe,Xa,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)W=c[0]^c[10]^c[20]^c[30]^c[40],ee=c[1]^c[11]^c[21]^c[31]^c[41],Y=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^(Y<<1|Q>>>31),D=De^(Q<<1|Y>>>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=W^(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=Y^(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^(W<<1|ee>>>31),D=Ha^(ee<<1|W>>>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,Ke=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,We=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,Ya=c[26]<<25|c[27]>>>7,Ye=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,Wa=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,Xe=c[38]<<8|c[39]>>>24,Xa=c[39]<<8|c[38]>>>24,Ve=c[48]<<14|c[49]>>>18,Ka=c[49]<<14|c[48]>>>18,c[0]=qa^~Be&Fe,c[1]=Oe^~Ga&Le,c[10]=je^~Wa&Ge,c[11]=He^~qe&Ja,c[20]=Je^~$e&Ya,c[21]=Qa^~Qe&Ye,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]=Wa^~Ge&ze,c[13]=qe^~Ja&Ke,c[22]=$e^~Ya&Xe,c[23]=Qe^~Ye&Xa,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&Ka,c[14]=Ge^~ze&$a,c[15]=Ja^~Ke&We,c[24]=Ya^~Xe&Ze,c[25]=Ye^~Xa&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^~Ka&Oe,c[16]=ze^~$a&je,c[17]=Ke^~We&He,c[26]=Xe^~Ze&Je,c[27]=Xa^~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]=Ka^~Oe&Ga,c[18]=$a^~je&Wa,c[19]=We^~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)Xs.exports=u;else{for(b=0;b{u0.exports=o0;function o0(n,e){if(!n)throw new Error(e||"Assertion failed")}o0.equal=function(e,t,a){if(e!=t)throw new Error(a||"Assertion failed: "+e+" != "+t)}});var d0=ae((p3,Od)=>{typeof Object.create=="function"?Od.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Od.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 kn=ae(Pe=>{"use strict";var H2=nr(),q2=d0();Pe.inherits=q2;function G2(n,e){return(n.charCodeAt(e)&64512)!==55296||e<0||e+1>=n.length?!1:(n.charCodeAt(e+1)&64512)===56320}function z2(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):G2(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}Pe.htonl=l0;function W2(n,e){for(var t="",a=0;a>>0}return r}Pe.join32=J2;function $2(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}Pe.split32=$2;function Q2(n,e){return n>>>e|n<<32-e}Pe.rotr32=Q2;function Y2(n,e){return n<>>32-e}Pe.rotl32=Y2;function X2(n,e){return n+e>>>0}Pe.sum32=X2;function Z2(n,e,t){return n+e+t>>>0}Pe.sum32_3=Z2;function eh(n,e,t,a){return n+e+t+a>>>0}Pe.sum32_4=eh;function th(n,e,t,a,i){return n+e+t+a+i>>>0}Pe.sum32_5=th;function nh(n,e,t,a){var i=n[e],r=n[e+1],s=a+r>>>0,o=(s>>0,n[e+1]=s}Pe.sum64=nh;function ah(n,e,t,a){var i=e+a>>>0,r=(i>>0}Pe.sum64_hi=ah;function ih(n,e,t,a){var i=e+a;return i>>>0}Pe.sum64_lo=ih;function rh(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}Pe.sum64_4_hi=rh;function sh(n,e,t,a,i,r,s,o){var l=e+a+r+o;return l>>>0}Pe.sum64_4_lo=sh;function oh(n,e,t,a,i,r,s,o,l,p){var f=0,x=e;x=x+a>>>0,f+=x>>0,f+=x>>0,f+=x>>0,f+=x>>0}Pe.sum64_5_hi=oh;function uh(n,e,t,a,i,r,s,o,l,p){var f=e+a+r+o+p;return f>>>0}Pe.sum64_5_lo=uh;function dh(n,e,t){var a=e<<32-t|n>>>t;return a>>>0}Pe.rotr64_hi=dh;function lh(n,e,t){var a=n<<32-t|e>>>t;return a>>>0}Pe.rotr64_lo=lh;function ph(n,e,t){return n>>>t}Pe.shr64_hi=ph;function yh(n,e,t){var a=n<<32-t|e>>>t;return a>>>0}Pe.shr64_lo=yh});var ar=ae(c0=>{"use strict";var f0=kn(),fh=nr();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}c0.BlockHash=To;To.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 a=e.length%this._delta8;this.pending=e.slice(e.length-a,e.length),this.pending.length===0&&(this.pending=null),e=f0.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 ch=kn(),Hn=ch.rotr32;function mh(n,e,t,a){if(n===0)return m0(e,t,a);if(n===1||n===3)return x0(e,t,a);if(n===2)return h0(e,t,a)}da.ft_1=mh;function m0(n,e,t){return n&e^~n&t}da.ch32=m0;function h0(n,e,t){return n&e^n&t^e&t}da.maj32=h0;function x0(n,e,t){return n^e^t}da.p32=x0;function hh(n){return Hn(n,2)^Hn(n,13)^Hn(n,22)}da.s0_256=hh;function xh(n){return Hn(n,6)^Hn(n,11)^Hn(n,25)}da.s1_256=xh;function bh(n){return Hn(n,7)^Hn(n,18)^n>>>3}da.g0_256=bh;function gh(n){return Hn(n,17)^Hn(n,19)^n>>>10}da.g1_256=gh});var T0=ae((m3,g0)=>{"use strict";var ir=kn(),Th=ar(),vh=Bd(),Fd=ir.rotl32,$r=ir.sum32,wh=ir.sum32_5,_h=vh.ft_1,b0=Th.BlockHash,kh=[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)}ir.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 a=this.W,i=0;i<16;i++)a[i]=e[t+i];for(;i{"use strict";var rr=kn(),Ah=ar(),sr=Bd(),Eh=nr(),An=rr.sum32,Mh=rr.sum32_4,Ch=rr.sum32_5,Ih=sr.ch32,Sh=sr.maj32,Rh=sr.s0_256,Ph=sr.s1_256,Nh=sr.g0_256,Dh=sr.g1_256,v0=Ah.BlockHash,Oh=[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=Oh,this.W=new Array(64)}rr.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 a=this.W,i=0;i<16;i++)a[i]=e[t+i];for(;i{"use strict";var Ud=kn(),_0=Ld();function la(){if(!(this instanceof la))return new la;_0.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}Ud.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"?Ud.toHex32(this.h.slice(0,7),"big"):Ud.split32(this.h.slice(0,7),"big")}});var Hd=ae((b3,I0)=>{"use strict";var Qt=kn(),Bh=ar(),Fh=nr(),zn=Qt.rotr64_hi,Kn=Qt.rotr64_lo,E0=Qt.shr64_hi,M0=Qt.shr64_lo,Sa=Qt.sum64,Vd=Qt.sum64_hi,jd=Qt.sum64_lo,Lh=Qt.sum64_4_hi,Uh=Qt.sum64_4_lo,Vh=Qt.sum64_5_hi,jh=Qt.sum64_5_lo,C0=Bh.BlockHash,Hh=[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=Hh,this.W=new Array(160)}Qt.inherits(En,C0);I0.exports=En;En.blockSize=1024;En.outSize=512;En.hmacStrength=192;En.padLength=128;En.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 qd=kn(),S0=Hd();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]}qd.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"?qd.toHex32(this.h.slice(0,12),"big"):qd.split32(this.h.slice(0,12),"big")}});var N0=ae(or=>{"use strict";or.sha1=T0();or.sha224=A0();or.sha256=Ld();or.sha384=P0();or.sha512=Hd()});var U0=ae(L0=>{"use strict";var li=kn(),tx=ar(),vo=li.rotl32,D0=li.sum32,Qr=li.sum32_3,O0=li.sum32_4,F0=tx.BlockHash;function Wn(){if(!(this instanceof Wn))return new Wn;F0.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}li.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 a=this.h[0],i=this.h[1],r=this.h[2],s=this.h[3],o=this.h[4],l=a,p=i,f=r,x=s,I=o,_=0;_<80;_++){var v=D0(vo(O0(a,B0(_,i,r,s),e[ix[_]+t],nx(_)),sx[_]),o);a=o,o=s,s=vo(r,10),r=i,i=v,v=D0(vo(O0(l,B0(79-_,p,f,x),e[rx[_]+t],ax(_)),ox[_]),I),l=I,I=x,x=vo(f,10),f=p,p=v}v=Qr(this.h[1],r,x),this.h[1]=Qr(this.h[2],s,I),this.h[2]=Qr(this.h[3],o,l),this.h[3]=Qr(this.h[4],a,p),this.h[4]=Qr(this.h[0],i,f),this.h[0]=v};Wn.prototype._digest=function(e){return e==="hex"?li.toHex32(this.h,"little"):li.split32(this.h,"little")};function B0(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 nx(n){return n<=15?0:n<=31?1518500249:n<=47?1859775393:n<=63?2400959708:2840853838}function ax(n){return n<=15?1352829926:n<=31?1548603684:n<=47?1836072691:n<=63?2053994217:0}var ix=[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],rx=[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],sx=[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],ox=[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((w3,V0)=>{"use strict";var ux=kn(),dx=nr();function ur(n,e,t){if(!(this instanceof ur))return new ur(n,e,t);this.Hash=n,this.blockSize=n.blockSize/8,this.outSize=n.outSize/8,this.inner=null,this.outer=null,this._init(ux.toArray(e,t))}V0.exports=ur;ur.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),dx(e.length<=this.blockSize);for(var t=e.length;t{var Rt=H0;Rt.utils=kn();Rt.common=ar();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 dl=ae((ul,xf)=>{"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&&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],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],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,W=P%4,this._Ke[V][W]=m[k],this._Kd[h-V][W]=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=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,G=J,c=$,P,D,V,W,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],W=(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]=(W+de[D-7]|0)+(ee+de[D-16]|0)|0;for(D=0;D<64;D++)W=(((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+W|0,g=k,k=h,h=A,A=W+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,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,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 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=a(_,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=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 I={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 cl<"u"?gf.exports=I:typeof define=="function"&&define.amd?define(I):n&&(n.scrypt&&(n._scrypt=n.scrypt),n.scrypt=I)})(cl)});var Gf=ae((p4,qf)=>{"use strict";var zo="qpzry9x8gf2tvdw0s3jn54khce6mua7l",gl={};for(ss=0;ss>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 jf(n){for(var e=1,t=0;t126)return"Invalid prefix ("+n+")";e=xr(e)^a>>5}for(e=xr(e),t=0;tt)throw new TypeError("Exceeds length limit");n=n.toLowerCase();var a=jf(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=xr(a)^s,i+=zo.charAt(s)}for(r=0;r<6;++r)a=xr(a);for(a^=1,r=0;r<6;++r){var o=a>>(5-r)*5&31;i+=zo.charAt(o)}return i}function Hf(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=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 "+n:{prefix:r,words:l}}function Wx(){var n=Hf.apply(null,arguments);if(typeof n=="object")return n}function Jx(n){var e=Hf.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function Ko(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 zl=="object"&&typeof Kl<"u"?Kl.exports=e():typeof define=="function"&&define.amd?define(e):(n=typeof globalThis<"u"?globalThis:n||self,n.fetchRetry=e())})(zl,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,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(I,_){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)I(U);else if(typeof x=="function")try{return Promise.resolve(x(L,null,U)).then(function(H){H?S(L,null,U):I(U)}).catch(_)}catch(H){_(H)}else L=0}function t(a){this.name="ArgumentError",this.message=a}return n})});var Wl=ae(lu=>{"use strict";Object.defineProperty(lu,"__esModule",{value:!0});lu.$dictionary=void 0;lu.$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 Rs=ae((gA,im)=>{im.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}});var $l=ae(Fa=>{var Ee=Rs(),Jl=()=>[{type:Ee.RANGE,from:48,to:57}],rm=()=>[{type:Ee.CHAR,value:95},{type:Ee.RANGE,from:97,to:122},{type:Ee.RANGE,from:65,to:90}].concat(Jl()),sm=()=>[{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}],U5=()=>[{type:Ee.CHAR,value:10},{type:Ee.CHAR,value:13},{type:Ee.CHAR,value:8232},{type:Ee.CHAR,value:8233}];Fa.words=()=>({type:Ee.SET,set:rm(),not:!1});Fa.notWords=()=>({type:Ee.SET,set:rm(),not:!0});Fa.ints=()=>({type:Ee.SET,set:Jl(),not:!1});Fa.notInts=()=>({type:Ee.SET,set:Jl(),not:!0});Fa.whitespace=()=>({type:Ee.SET,set:sm(),not:!1});Fa.notWhitespace=()=>({type:Ee.SET,set:sm(),not:!0});Fa.anyChar=()=>({type:Ee.SET,set:U5(),not:!0})});var um=ae(Ps=>{var om=Rs(),Cr=$l(),V5="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?",j5={0:0,t:9,n:10,v:11,f:12,r:13};Ps.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 f=a?8:r?parseInt(r,16):s?parseInt(s,16):o?parseInt(o,8):l?V5.indexOf(l):j5[p],x=String.fromCharCode(f);return/[[\]{}^$.|?*+()]/.test(x)&&(x="\\"+x),x}),n};Ps.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(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:om.RANGE,from:(i[8]||i[9]).charCodeAt(0),to:i[10].charCodeAt(0)});else if(r=i[12])t.push({type:om.CHAR,value:r.charCodeAt(0)});else return[t,a.lastIndex];Ps.error(e,"Unterminated character class")};Ps.error=(n,e)=>{throw new SyntaxError("Invalid regular expression: /"+n+"/: "+e)}});var dm=ae(Ns=>{var pu=Rs();Ns.wordBoundary=()=>({type:pu.POSITION,value:"b"});Ns.nonWordBoundary=()=>({type:pu.POSITION,value:"B"});Ns.begin=()=>({type:pu.POSITION,value:"^"});Ns.end=()=>({type:pu.POSITION,value:"$"})});var lm=ae((_A,Ql)=>{var Ir=um(),xn=Rs(),_i=$l(),yu=dm();Ql.exports=n=>{var e=0,t,a,i={type:xn.ROOT,stack:[]},r=i,s=i.stack,o=[],l=O=>{Ir.error(n,`Nothing to repeat at column ${O-1}`)},p=Ir.strToChars(n);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 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}))}};pm.exports=La});var cm=ae((AA,fm)=>{var fu=lm(),Ds=ym(),ki=fu.types;fm.exports=class Os{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=fu(e)}_setDefaults(e){this.max=e.max!=null?e.max:Os.prototype.max!=null?Os.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 ki.ROOT:case ki.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 H5=Ai&&Ai.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ai,"__esModule",{value:!0});Ai.RandomGenerator=void 0;var q5=H5(cm()),G5;(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 q5.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()}})(G5=Ai.RandomGenerator||(Ai.RandomGenerator={}))});var Bs=ae(Sr=>{"use strict";var z5=Sr&&Sr.__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(Sr,"__esModule",{value:!0});Sr.TypeGuardError=void 0;var K5=function(n){z5(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);Sr.TypeGuardError=K5});var hm=ae(cu=>{"use strict";Object.defineProperty(cu,"__esModule",{value:!0});cu.$any=void 0;var W5=function(n){return n!==void 0?JSON.parse(JSON.stringify(n)):void 0};cu.$any=W5});var xm=ae(mu=>{"use strict";Object.defineProperty(mu,"__esModule",{value:!0});mu.$every=void 0;var J5=function(n,e){for(var t=null,a=0;a{"use strict";Object.defineProperty(hu,"__esModule",{value:!0});hu.$guard=void 0;var $5=Bs(),Q5=function(n){return function(e,t){if(e===!0)throw new $5.TypeGuardError({method:n,path:t.path,expected:t.expected,value:t.value});return!1}};hu.$guard=Q5});var gm=ae(xu=>{"use strict";Object.defineProperty(xu,"__esModule",{value:!0});xu.$is_between=void 0;var Y5=function(n,e,t){return e<=n&&n<=t};xu.$is_between=Y5});var Tm=ae(bu=>{"use strict";Object.defineProperty(bu,"__esModule",{value:!0});bu.$is_custom=void 0;var X5=Wl(),Z5=function(n,e,t,a){var i,r=(i=X5.$dictionary.get(n))===null||i===void 0?void 0:i.get(e);return r===void 0?!0:r(t)(a)};bu.$is_custom=Z5});var vm=ae(gu=>{"use strict";Object.defineProperty(gu,"__esModule",{value:!0});gu.$is_date=void 0;var eb=function(n){return tb.test(n)};gu.$is_date=eb;var tb=/^(\d{4})-(\d{2})-(\d{2})$/});var wm=ae(Tu=>{"use strict";Object.defineProperty(Tu,"__esModule",{value:!0});Tu.$is_datetime=void 0;var nb=function(n){return!isNaN(new Date(n).getTime())};Tu.$is_datetime=nb});var _m=ae(vu=>{"use strict";Object.defineProperty(vu,"__esModule",{value:!0});vu.$is_email=void 0;var ab=function(n){return ib.test(n)};vu.$is_email=ab;var ib=/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i});var km=ae(wu=>{"use strict";Object.defineProperty(wu,"__esModule",{value:!0});wu.$is_ipv4=void 0;var rb=function(n){return sb.test(n)};wu.$is_ipv4=rb;var sb=/^(?: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 Am=ae(_u=>{"use strict";Object.defineProperty(_u,"__esModule",{value:!0});_u.$is_ipv6=void 0;var ob=function(n){return ub.test(n)};_u.$is_ipv6=ob;var ub=/^(([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 Em=ae(ku=>{"use strict";Object.defineProperty(ku,"__esModule",{value:!0});ku.$is_url=void 0;var db=function(n){return lb.test(n)};ku.$is_url=db;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 Mm=ae(Au=>{"use strict";Object.defineProperty(Au,"__esModule",{value:!0});Au.$is_uuid=void 0;var pb=function(n){return yb.test(n)};Au.$is_uuid=pb;var yb=/^(?:[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 Cm=ae(Eu=>{"use strict";Object.defineProperty(Eu,"__esModule",{value:!0});Eu.$join=void 0;var fb=function(n){return cb(n)?".".concat(n):"[".concat(JSON.stringify(n),"]")};Eu.$join=fb;var cb=function(n){return mb(n)===!1&&/^[a-zA-Z_$][a-zA-Z_$0-9]*$/g.test(n)},mb=function(n){return hb.has(n)},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 Im=ae(Mu=>{"use strict";Object.defineProperty(Mu,"__esModule",{value:!0});Mu.$number=void 0;var xb=Bs(),bb=function(n){if(isFinite(n)===!1)throw new xb.TypeGuardError({method:"typia.stringify",expected:"number",value:n,message:"Error on typia.stringify(): infinite or not a number."});return n};Mu.$number=bb});var Sm=ae(Cu=>{"use strict";Object.defineProperty(Cu,"__esModule",{value:!0});Cu.$report=void 0;var gb=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}};Cu.$report=gb});var Rm=ae(Iu=>{"use strict";Object.defineProperty(Iu,"__esModule",{value:!0});Iu.$rest=void 0;var Tb=function(n){return n.length===2?"":","+n.substring(1,n.length-1)};Iu.$rest=Tb});var Pm=ae(Su=>{"use strict";Object.defineProperty(Su,"__esModule",{value:!0});Su.$string=void 0;var vb=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,'"')};Su.$string=vb});var Nm=ae(Ru=>{"use strict";Object.defineProperty(Ru,"__esModule",{value:!0});Ru.$tail=void 0;var wb=function(n){return n[n.length-1]===","?n.substring(0,n.length-1):n};Ru.$tail=wb});var Fm=ae(Ei=>{"use strict";var Vt=Ei&&Ei.__assign||function(){return Vt=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 Vt(Vt({},n.is()),{number:Ob.$number,string:Lb.$string,tail:Ub.$tail,rest:Fb.$rest,throws:e(t)})},n.clone=function(t){return Vt(Vt({},n.is()),{throws:e(t),any:_b.$any})},n.prune=function(t){return Vt(Vt({},n.is()),{throws:e(t)})},n.random=function(){return{generator:Dm.RandomGenerator,pick:Dm.RandomGenerator.pick}};var e=function(t){return function(a){throw new Om.TypeGuardError(Vt(Vt({},a),{method:"typia.".concat(t)}))}}})(Vb=Ei.Namespace||(Ei.Namespace={}))});var Lm=ae(Fs=>{"use strict";Object.defineProperty(Fs,"__esModule",{value:!0});Fs.MapUtil=void 0;var jb;(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}}})(jb=Fs.MapUtil||(Fs.MapUtil={}))});var Vm=ae(Um=>{"use strict";Object.defineProperty(Um,"__esModule",{value:!0})});var Hm=ae(jm=>{"use strict";Object.defineProperty(jm,"__esModule",{value:!0})});var Gm=ae(qm=>{"use strict";Object.defineProperty(qm,"__esModule",{value:!0})});var Km=ae(zm=>{"use strict";Object.defineProperty(zm,"__esModule",{value:!0})});var Jm=ae(Wm=>{"use strict";Object.defineProperty(Wm,"__esModule",{value:!0})});var Qm=ae($m=>{"use strict";Object.defineProperty($m,"__esModule",{value:!0})});var dp=ae(z=>{"use strict";var Hb=z&&z.__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]}),Mi=z&&z.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Hb(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 Rr=Wl(),Me=Fm(),qb=Lm();Mi(Vm(),z);Mi(Hm(),z);Mi(Gm(),z);Mi(Km(),z);Mi(Jm(),z);Mi(Qm(),z);Mi(Bs(),z);function Yl(){re("assert")}z.assert=Yl;Object.assign(Yl,Me.Namespace.assert("assert"));function Xl(){re("assertType")}z.assertType=Xl;Object.assign(Xl,Me.Namespace.assert("assertType"));function Pu(){re("is")}z.is=Pu;Object.assign(Pu,Me.Namespace.assert("is"));function Nu(){re("validate")}z.validate=Nu;Object.assign(Nu,Me.Namespace.validate());function Zl(){re("assertEquals")}z.assertEquals=Zl;Object.assign(Zl,Me.Namespace.assert("assertEquals"));function ep(){re("equals")}z.equals=ep;Object.assign(ep,Me.Namespace.is());function tp(){re("validateEquals")}z.validateEquals=tp;Object.assign(tp,Me.Namespace.validate());z.customValidators={size:function(n){var e,t;return n?(t=(e=Rr.$dictionary.get(n))===null||e===void 0?void 0:e.size)!==null&&t!==void 0?t:0:Rr.$dictionary.size},has:function(n){return function(e){var t,a;return(a=(t=Rr.$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=Rr.$dictionary.get(n))===null||t===void 0?void 0:t.get(e)}},insert:function(n){return function(e){return function(t){var a=qb.MapUtil.take(Rr.$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=Rr.$dictionary.get(n))===null||t===void 0?void 0:t.delete(e))!==null&&a!==void 0?a:!1}}};function Gb(){re("application")}z.application=Gb;function np(){re("assertParse")}z.assertParse=np;Object.assign(np,Me.Namespace.assert("assertParse"));function ap(){re("isParse")}z.isParse=ap;Object.assign(ap,Pu);function ip(){re("validateParse")}z.validateParse=ip;Object.assign(ip,Nu);function rp(){re("stringify")}z.stringify=rp;Object.assign(rp,Me.Namespace.stringify("stringify"));function Du(){re("assertStringify")}z.assertStringify=Du;Object.assign(Du,Me.Namespace.assert("assertStringify"));Object.assign(Du,Me.Namespace.stringify("assertStringify"));function Ou(){re("isStringify")}z.isStringify=Ou;Object.assign(Ou,Me.Namespace.is());Object.assign(Ou,Me.Namespace.stringify("isStringify"));function Bu(){re("validateStringify")}z.validateStringify=Bu;Object.assign(Bu,Me.Namespace.validate());Object.assign(Bu,Me.Namespace.stringify("validateStringify"));function zb(){re("metadata")}z.metadata=zb;function sp(){re("random")}z.random=sp;Object.assign(sp,Me.Namespace.random());function Kb(){re("literals")}z.literals=Kb;function op(){re("clone")}z.clone=op;Object.assign(op,Me.Namespace.clone("clone"));function Fu(){re("assertClone")}z.assertClone=Fu;Object.assign(Fu,Me.Namespace.assert("assertClone"));Object.assign(Fu,Me.Namespace.clone("assertClone"));function Lu(){re("isClone")}z.isClone=Lu;Object.assign(Lu,Me.Namespace.is());Object.assign(Lu,Me.Namespace.clone("isClone"));function Uu(){re("validateClone")}z.validateClone=Uu;Object.assign(Uu,Me.Namespace.validate());Object.assign(Uu,Me.Namespace.clone("validateClone"));function up(){re("prune")}z.prune=up;Object.assign(up,Me.Namespace.prune("prune"));function Vu(){re("assertPrune")}z.assertPrune=Vu;Object.assign(Vu,Me.Namespace.assert("assertPrune"));Object.assign(Vu,Me.Namespace.prune("assertPrune"));function ju(){re("isPrune")}z.isPrune=ju;Object.assign(ju,Me.Namespace.is());Object.assign(ju,Me.Namespace.prune("isPrune"));function Hu(){re("validatePrune")}z.validatePrune=Hu;Object.assign(Hu,Me.Namespace.prune("validatePrune"));Object.assign(Hu,Me.Namespace.validate());function Ym(){re("createAssert")}z.createAssert=Ym;Object.assign(Ym,Yl);function Xm(){re("createAssertType")}z.createAssertType=Xm;Object.assign(Xm,Xl);function Zm(){re("createIs")}z.createIs=Zm;Object.assign(Zm,Pu);function e6(){re("createValidate")}z.createValidate=e6;Object.assign(e6,Nu);function t6(){re("createAssertEquals")}z.createAssertEquals=t6;Object.assign(t6,Zl);function n6(){re("createEquals")}z.createEquals=n6;Object.assign(n6,ep);function a6(){re("createValidateEquals")}z.createValidateEquals=a6;Object.assign(a6,tp);function i6(){re("createIsParse")}z.createIsParse=i6;Object.assign(i6,ap);function r6(){re("createAssertParse")}z.createAssertParse=r6;Object.assign(r6,np);function s6(){re("createValidateParse")}z.createValidateParse=s6;Object.assign(s6,ip);function o6(){re("createStringify")}z.createStringify=o6;Object.assign(o6,rp);function u6(){re("createAssertStringify")}z.createAssertStringify=u6;Object.assign(u6,Du);function d6(){re("createIsStringify")}z.createIsStringify=d6;Object.assign(d6,Ou);function l6(){re("createValidateStringify")}z.createValidateStringify=l6;Object.assign(l6,Bu);function p6(){re("createRandom")}z.createRandom=p6;Object.assign(p6,sp);function y6(){re("createClone")}z.createClone=y6;Object.assign(y6,op);function f6(){re("createAssertClone")}z.createAssertClone=f6;Object.assign(f6,Fu);function c6(){re("createIsClone")}z.createIsClone=c6;Object.assign(c6,Lu);function m6(){re("createValidateClone")}z.createValidateClone=m6;Object.assign(m6,Uu);function h6(){re("createPrune")}z.createPrune=h6;Object.assign(h6,up);function x6(){re("createAssertPrune")}z.createAssertPrune=x6;Object.assign(x6,Vu);function b6(){re("createIsPrune")}z.createIsPrune=b6;Object.assign(b6,ju);function g6(){re("createValidatePrune")}z.createValidatePrune=g6;Object.assign(g6,Hu);function re(n){throw new Error("Error on typia.".concat(n,'(): no transform has been configured. Run "npx typia setup" command.'))}});var v6=ae(gn=>{"use strict";var T6=gn&&gn.__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]}),Wb=gn&&gn.__setModuleDefault||(Object.create?function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}:function(n,e){n.default=e}),Jb=gn&&gn.__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)&&T6(e,n,t);return Wb(e,n),e},$b=gn&&gn.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&T6(e,n,t)};Object.defineProperty(gn,"__esModule",{value:!0});var Qb=Jb(dp());gn.default=Qb;$b(dp(),gn)});var Dl={};ji(Dl,{BaseContract:()=>lr,BigNumber:()=>F,Contract:()=>oe,ContractFactory:()=>ci,FixedNumber:()=>ft,Signer:()=>St,VoidSigner:()=>ua,Wallet:()=>Cn,Wordlist:()=>hn,constants:()=>ht,errors:()=>Kt,getDefaultProvider:()=>au,logger:()=>Ac,providers:()=>ea,utils:()=>ne,version:()=>ru,wordlists:()=>hi});var ey=wn(ud());var qp="logger/5.7.0";var Gp=!1,zp=!1,Ws={debug:1,default:2,info:2,warning:3,error:4,off:5},Kp=Ws.default,dd=null;function L6(){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 Wp=L6(),ld;(function(n){n.DEBUG="DEBUG",n.INFO="INFO",n.WARNING="WARNING",n.ERROR="ERROR",n.OFF="OFF"})(ld||(ld={}));var Kt;(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"})(Kt||(Kt={}));var Jp="0123456789abcdef",E=class{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){let a=e.toLowerCase();Ws[a]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(Kp>Ws[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(zp)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 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(a[l].toString()))}}),i.push(`code=${t}`),i.push(`version=${this.version}`);let r=e,s="";switch(t){case Kt.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 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+" ]"),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"),Wp&&this.throwError("platform missing String.prototype.normalize",E.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:Wp})}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 dd||(dd=new E(qp)),dd}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",E.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),Gp){if(!e)return;this.globalLogger().throwError("error censorship permanent",E.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}zp=!!e,Gp=!!t}static setLogLevel(e){let t=Ws[e.toLowerCase()];if(t==null){E.globalLogger().warn("invalid log level - "+e);return}Kp=t}static from(e){return new E(e)}};E.errors=Kt;E.levels=ld;var $p="bytes/5.7.0";var wt=new E($p);function Yp(n){return!!n.toHexString}function Hi(n){return n.slice||(n.slice=function(){let e=Array.prototype.slice.call(arguments);return Hi(new Uint8Array(Array.prototype.slice.apply(n,e)))}),n}function aa(n){return ie(n)&&!(n.length%2)||on(n)}function Qp(n){return typeof n=="number"&&n==n&&n%1===0}function on(n){if(n==null)return!1;if(n.constructor===Uint8Array)return!0;if(typeof n=="string"||!Qp(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"){wt.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),Hi(new Uint8Array(t))}if(e.allowMissingPrefix&&typeof n=="string"&&n.substring(0,2)!=="0x"&&(n="0x"+n),Yp(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":wt.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),Hi(a)}function Zt(n){let e=j(n);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(n,e-n.length),Hi(t)}function ie(n,e){return!(typeof n!="string"||!n.match(/^0x[0-9A-Fa-f]*$/)||e&&n.length!==2+2*e)}var pd="0123456789abcdef";function K(n,e){if(e||(e={}),typeof n=="number"){wt.checkSafeUint53(n,"invalid hexlify value");let t="";for(;n;)t=pd[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),Yp(n))return n.toHexString();if(ie(n))return n.length%2&&(e.hexPad==="left"?n="0x0"+n.substring(2):e.hexPad==="right"?n+="0":wt.throwArgumentError("hex data is odd-length","value",n)),n.toLowerCase();if(on(n)){let t="0x";for(let a=0;a>4]+pd[i&15]}return t}return wt.throwArgumentError("invalid hexlify value","value",n)}function Nt(n){if(typeof n!="string")n=K(n);else if(!ie(n)||n.length%2)return null;return(n.length-2)/2}function Ce(n,e,t){return typeof n!="string"?n=K(n):(!ie(n)||n.length%2)&&wt.throwArgumentError("invalid hexData","value",n),e=2+2*e,t!=null?"0x"+n.substring(e,2+2*t):"0x"+n.substring(e)}function _t(n){let e="0x";return n.forEach(t=>{e+=K(t).substring(2)}),e}function Ln(n){let e=yd(K(n,{hexPad:"left"}));return e==="0x"?"0x0":e}function yd(n){typeof n!="string"&&(n=K(n)),ie(n)||wt.throwArgumentError("invalid hex string","value",n),n=n.substring(2);let e=0;for(;e2*e+2&&wt.throwArgumentError("value out of range","value",arguments[1]);n.length<2*e+2;)n="0x0"+n.substring(2);return n}function Un(n){let e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(aa(n)){let t=j(n);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]):wt.throwArgumentError("invalid signature string","signature",n),e.v<27&&(e.v===0||e.v===1?e.v+=27:wt.throwArgumentError("signature invalid v byte","signature",n)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(t[32]|=128),e._vs=K(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=ii(j(e._vs),32);e._vs=K(i);let r=i[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=r:e.recoveryParam!==r&&wt.throwArgumentError("signature recoveryParam mismatch _vs","signature",n),i[0]&=127;let s=K(i);e.s==null?e.s=s:e.s!==s&&wt.throwArgumentError("signature v mismatch _vs","signature",n)}if(e.recoveryParam==null)e.v==null?wt.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&&wt.throwArgumentError("signature recoveryParam mismatch v","signature",n)}e.r==null||!ie(e.r)?wt.throwArgumentError("signature missing or invalid r","signature",n):e.r=me(e.r,32),e.s==null||!ie(e.s)?wt.throwArgumentError("signature missing or invalid s","signature",n):e.s=me(e.s,32);let t=j(e.s);t[0]>=128&&wt.throwArgumentError("signature s out of range","signature",n),e.recoveryParam&&(t[0]|=128);let a=K(t);e._vs&&(ie(e._vs)||wt.throwArgumentError("signature invalid _vs","signature",n),e._vs=me(e._vs,32)),e._vs==null?e._vs=a:e._vs!==a&&wt.throwArgumentError("signature _vs mismatch v and s","signature",n)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function Br(n){return n=Un(n),K(ye([n.r,n.s,n.recoveryParam?"0x1c":"0x1b"]))}var Js="bignumber/5.7.0";var Fr=ey.default.BN,ia=new E(Js),fd={},Xp=9007199254740991;function ty(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"||on(n))}var Zp=!1,F=class{constructor(e,t){e!==fd&&ia.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 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 ia.throwError("this platform does not support BigInt",E.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()",E.errors.UNEXPECTED_ARGUMENT,{}):ia.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(fd,Lr(e)):e.match(/^-?[0-9]+$/)?new F(fd,Lr(new Fr(e))):ia.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&un("underflow","BigNumber.from",e),(e>=Xp||e<=-Xp)&&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 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 ia.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}};function Lr(n){if(typeof n!="string")return Lr(n.toString(16));if(n[0]==="-")return n=n.substring(1),n[0]==="-"&&ia.throwArgumentError("invalid hex","value",n),n=Lr(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 Wt(n){return F.from(Lr(n))}function be(n){let e=F.from(n).toHexString();return e[0]==="-"?new Fr("-"+e.substring(3),16):new Fr(e.substring(2),16)}function un(n,e,t){let a={fault:n,operation:e};return t!=null&&(a.value=t),ia.throwError(n,E.errors.NUMERIC_FAULT,a)}function cd(n){return new Fr(n,36).toString(16)}function md(n){return new Fr(n,16).toString(36)}var jt=new E(Js),Ur={},ay=F.from(0),iy=F.from(-1);function ry(n,e,t,a){let i={fault:e,operation:t};return a!==void 0&&(i.value=a),jt.throwError(n,E.errors.NUMERIC_FAULT,i)}var Vr="0";for(;Vr.length<256;)Vr+=Vr;function hd(n){if(typeof n!="number")try{n=F.from(n).toNumber()}catch{}return typeof n=="number"&&n>=0&&n<=256&&!(n%1)?"1"+Vr.substring(0,n):jt.throwArgumentError("invalid decimal size","decimals",n)}function qi(n,e){e==null&&(e=0);let t=hd(e);n=F.from(n);let a=n.lt(ay);a&&(n=n.mul(iy));let i=n.mod(t).toString();for(;i.length2&&jt.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&&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),a=r("width","number",a),i=r("decimals","number",i)}return a%8&&jt.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",a),i>80&&jt.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new ra(Ur,t,a,i)}},ft=class{constructor(e,t,a,i){e!==Ur&&jt.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&&jt.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),a=dn(e._value,e.format.decimals);return ft.fromValue(t.add(a),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),a=dn(e._value,e.format.decimals);return ft.fromValue(t.sub(a),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),a=dn(e._value,e.format.decimals);return ft.fromValue(t.mul(a).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),a=dn(e._value,e.format.decimals);return ft.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=ft.from(e[0],this.format),a=!e[1].match(/^(0*)$/);return this.isNegative()&&a&&(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),a=!e[1].match(/^(0*)$/);return!this.isNegative()&&a&&(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 a=ft.from("1"+Vr.substring(0,e),this.format),i=U6.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&&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,a){return a==null&&t!=null&&!ty(t)&&(a=t,t=null),t==null&&(t=0),a==null&&(a="fixed"),ft.fromString(qi(e,t),ra.from(a))}static fromString(e,t){t==null&&(t="fixed");let a=ra.from(t),i=dn(e,a.decimals);!a.signed&&i.lt(ay)&&ry("unsigned value cannot be negative","overflow","value",e);let r=null;a.signed?r=i.toTwos(a.width).toHexString():(r=i.toHexString(),r=me(r,a.width/8));let s=qi(i,a.decimals);return new ft(Ur,r,s,a)}static fromBytes(e,t){t==null&&(t="fixed");let a=ra.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 ft(Ur,r,s,a)}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(a){if(a.code!==E.errors.INVALID_ARGUMENT)throw a}return jt.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}},ny=ft.from(1),U6=ft.from("0.5");var sy="properties/5.7.0";var V6=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},$s=new E(sy);function B(n,e,t){Object.defineProperty(n,e,{enumerable:!0,value:t,writable:!1})}function mt(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 Ie(n){return V6(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 Gi(n,e){(!n||typeof n!="object")&&$s.throwArgumentError("invalid object","object",n),Object.keys(n).forEach(t=>{e[t]||$s.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 j6={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function oy(n){if(n==null||j6[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;tct(e)));if(typeof n=="object"){let e={};for(let t in n){let a=n[t];a!==void 0&&B(e,t,ct(a))}return e}return $s.throwArgumentError(`Cannot deepCopy ${typeof n}`,"object",n)}function ct(n){return H6(n)}var en=class{constructor(e){for(let t in e)this[t]=ct(e[t])}};var Vn="abi/5.7.0";var Te=new E(Vn),ri={},uy={calldata:!0,memory:!0,storage:!0},q6={calldata:!0,memory:!0};function Qs(n,e){if(n==="bytes"||n==="string"){if(uy[e])return!0}else if(n==="address"){if(e==="payable")return!0}else if((n.indexOf("[")>=0||n==="tuple")&&q6[e])return!0;return(uy[e]||e==="payable")&&Te.throwArgumentError("invalid modifier","name",e),!1}function G6(n,e){let t=n;function a(o){Te.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!==ge.sighash&&(t+=this.type),t+="("+this.components.map(a=>a.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:zi(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(pt.fromObject):null})}static fromString(e,t){function a(i){return pt.fromObject({name:i.name,type:i.type,indexed:i.indexed,components:i.components})}return a(G6(e,!!t))}static isParamType(e){return!!(e!=null&&e._isParamType)}};function jr(n,e){return W6(n).map(t=>pt.fromString(t,e))}var qt=class{constructor(e,t){e!==ri&&Te.throwError("use a static from method",E.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),Ys(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(a=>JSON.parse(a.format(e)))});let t="";return e!==ge.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map(a=>a.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(ri,t)}static fromString(e){let t=e.match(qr);t||Te.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:Te.warn("unknown modifier: "+i)}}),Ht.fromObject({name:t[1].trim(),anonymous:a,inputs:jr(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}};function ly(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 py(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 yy(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 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(a=>JSON.parse(a.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(a=>a.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 a={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,a)}static fromString(e){let t={type:"constructor"};e=ly(e,t);let a=e.match(qr);return(!a||a[1].trim()!=="constructor")&&Te.throwArgumentError("invalid constructor string","value",e),t.inputs=jr(a[2].trim(),!1),py(a[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(a=>JSON.parse(a.format(e))),outputs:this.outputs.map(a=>JSON.parse(a.format(e)))});let t="";return e!==ge.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map(a=>a.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(a=>a.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),a={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 Ot(ri,a)}static fromString(e){let t={type:"function"};e=ly(e,t);let a=e.split(" returns ");a.length>2&&Te.throwArgumentError("invalid function string","value",e);let i=a[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),a.length>1){let r=a[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 Ot.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}};function dy(n){let e=n.format();return(e==="Error(string)"||e==="Panic(uint256)")&&Te.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",n),n}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(a=>JSON.parse(a.format(e)))});let t="";return e!==ge.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map(a=>a.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(ri,t))}static fromString(e){let t={type:"error"},a=e.match(qr);return a||Te.throwArgumentError("invalid error signature","value",e),t.name=a[1].trim(),t.name&&Hr(t.name),t.inputs=jr(a[2],!1),dy(tn.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}};function zi(n){return n.match(/^uint($|[^1-9])/)?n="uint256"+n.substring(4):n.match(/^int($|[^1-9])/)&&(n="int256"+n.substring(3)),n}var K6=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function Hr(n){return(!n||!n.match(K6))&&Te.throwArgumentError(`invalid identifier "${n}"`,"value",n),n}var qr=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function W6(n){n=n.trim();let e=[],t="",a=0;for(let i=0;ithis.wordSize&&xd.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)}}},oi=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 K(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):oi.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:xd.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 oi(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 cy=wn(fy());function fe(n){return"0x"+cy.default.keccak_256(j(n))}var Zs={};ji(Zs,{decode:()=>Gr,encode:()=>sa});var my="rlp/5.7.0";var jn=new E(my);function hy(n){let e=[];for(;n;)e.unshift(n&255),n>>=8;return e}function xy(n,e,t){let a=0;for(let i=0;ie+1+a&&jn.throwError("child data too short",E.errors.BUFFER_OVERRUN,{})}return{consumed:1+a,result:i}}function Ty(n,e){if(n.length===0&&jn.throwError("data too short",E.errors.BUFFER_OVERRUN,{}),n[e]>=248){let t=n[e]-247;e+1+t>n.length&&jn.throwError("data short segment too short",E.errors.BUFFER_OVERRUN,{});let a=xy(n,e+1,t);return e+1+t+a>n.length&&jn.throwError("data long segment too short",E.errors.BUFFER_OVERRUN,{}),by(n,e,e+1+t,t+a)}else if(n[e]>=192){let t=n[e]-192;return e+1+t>n.length&&jn.throwError("data array too short",E.errors.BUFFER_OVERRUN,{}),by(n,e,e+1,t)}else if(n[e]>=184){let t=n[e]-183;e+1+t>n.length&&jn.throwError("data array too short",E.errors.BUFFER_OVERRUN,{});let a=xy(n,e+1,t);e+1+t+a>n.length&&jn.throwError("data array too short",E.errors.BUFFER_OVERRUN,{});let i=K(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&&jn.throwError("data too short",E.errors.BUFFER_OVERRUN,{});let a=K(n.slice(e+1,e+1+t));return{consumed:1+t,result:a}}return{consumed:1,result:K(n[e])}}function Gr(n){let e=j(n),t=Ty(e,0);return t.consumed!==e.length&&jn.throwArgumentError("invalid rlp data","data",n),t.result}var vy="address/5.7.0";var Ea=new E(vy);function wy(n){ie(n,20)||Ea.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 J6=9007199254740991;function $6(n){return Math.log10?Math.log10(n):Math.log(n)/Math.LN10}var bd={};for(let n=0;n<10;n++)bd[String(n)]=String(n);for(let n=0;n<26;n++)bd[String.fromCharCode(65+n)]=String(10+n);var _y=Math.floor($6(J6));function ky(n){n=n.toUpperCase(),n=n.substring(4)+n.substring(0,2)+"00";let e=n.split("").map(a=>bd[a]).join("");for(;e.length>=_y;){let a=e.substring(0,_y);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 ce(n){let e=null;if(typeof n!="string"&&Ea.throwArgumentError("invalid address","address",n),n.match(/^(0x)?[0-9a-fA-F]{40}$/))n.substring(0,2)!=="0x"&&(n="0x"+n),e=wy(n),n.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==n&&Ea.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)!==ky(n)&&Ea.throwArgumentError("bad icap checksum","address",n),e=cd(n.substring(4));e.length<40;)e="0"+e;e=wy("0x"+e)}else Ea.throwArgumentError("invalid address","address",n);return e}function Ay(n){try{return ce(n),!0}catch{}return!1}function Ey(n){let e=md(ce(n).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+ky("XE00"+e)+e}function ui(n){let e=null;try{e=ce(n.from)}catch{Ea.throwArgumentError("missing from address","transaction",n)}let t=Zt(j(F.from(n.nonce).toHexString()));return ce(Ce(fe(sa([e,t])),12))}function My(n,e,t){return Nt(e)!==32&&Ea.throwArgumentError("salt must be 32 bytes","salt",e),Nt(t)!==32&&Ea.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",t),ce(Ce(fe(ye(["0xff",ce(n),e,t])),12))}var eo=class extends kt{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=ce(t)}catch(a){this._throwError(a.message,t)}return e.writeValue(t)}decode(e){return ce(me(e.readValue().toHexString(),20))}};var to=class extends kt{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 Wi=new E(Vn);function gd(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 f=p.localName;return f||Wi.throwError("cannot encode object for signature with missing names",E.errors.INVALID_ARGUMENT,{argument:"values",coder:p,value:t}),l[f]&&Wi.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 Wi.throwArgumentError("invalid tuple value","tuple",t);e.length!==a.length&&Wi.throwArgumentError("types/value length mismatch","tuple",t);let i=new si(n.wordSize),r=new si(n.wordSize),s=[];e.forEach((l,p)=>{let f=a[p];if(l.dynamic){let x=r.length;l.encode(r,f);let I=i.writeUpdatableValue();s.push(_=>{I(_+x)})}else l.encode(i,f)}),s.forEach(l=>{l(i.length)});let o=n.appendWriter(i);return o+=n.appendWriter(r),o}function Td(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 no=class extends kt{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&&Wi.throwError("insufficient data length",E.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let a=[];for(let i=0;ioo,EtherSymbol:()=>Py,HashZero:()=>$i,MaxInt256:()=>Ry,MaxUint256:()=>po,MinInt256:()=>Sy,NegativeOne:()=>uo,One:()=>lo,Two:()=>Cy,WeiPerEther:()=>Iy,Zero:()=>Ji});var oo="0x0000000000000000000000000000000000000000";var uo=F.from(-1),Ji=F.from(0),lo=F.from(1),Cy=F.from(2),Iy=F.from("1000000000000000000"),po=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),Sy=F.from("-0x8000000000000000000000000000000000000000000000000000000000000000"),Ry=F.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");var $i="0x0000000000000000000000000000000000000000000000000000000000000000";var Py="\u039E";var yo=class extends kt{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=po.mask(e.wordSize*8);if(this.signed){let r=i.mask(this.size*8-1);(a.gt(r)||a.lt(r.add(lo).mul(uo)))&&this._throwError("value out-of-bounds",t)}else(a.lt(Ji)||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 Ny="strings/5.7.0";var Dy=new E(Ny),Gt;(function(n){n.current="",n.NFC="NFC",n.NFD="NFD",n.NFKC="NFKC",n.NFKD="NFKD"})(Gt||(Gt={}));var Bt;(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"})(Bt||(Bt={}));function Q6(n,e,t,a,i){return Dy.throwArgumentError(`invalid codepoint at offset ${e}; ${n}`,"bytes",t)}function Oy(n,e,t,a,i){if(n===Bt.BAD_PREFIX||n===Bt.UNEXPECTED_CONTINUE){let r=0;for(let s=e+1;s>6===2;s++)r++;return r}return n===Bt.OVERRUN?t.length-e-1:0}function Y6(n,e,t,a,i){return n===Bt.OVERLONG?(a.push(i),0):(a.push(65533),Oy(n,e,t,a,i))}var fo=Object.freeze({error:Q6,ignore:Oy,replace:Y6});function wd(n,e){e==null&&(e=fo.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(Bt.UNEXPECTED_CONTINUE,a-1,n,t):a+=e(Bt.BAD_PREFIX,a-1,n,t);continue}if(a-1+r>=n.length){a+=e(Bt.OVERRUN,a-1,n,t);continue}let o=i&(1<<8-r-1)-1;for(let l=0;l1114111){a+=e(Bt.OUT_OF_RANGE,a-1-r,n,t,o);continue}if(o>=55296&&o<=57343){a+=e(Bt.UTF16_SURROGATE,a-1-r,n,t,o);continue}if(o<=s){a+=e(Bt.OVERLONG,a-1-r,n,t,o);continue}t.push(o)}}return t}function ve(n,e=Gt.current){e!=Gt.current&&(Dy.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 vd(n){let e="0000"+n.toString(16);return"\\u"+e.substring(e.length-4)}function _d(n,e){return'"'+wd(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?vd(t):(t-=65536,vd((t>>10&1023)+55296)+vd((t&1023)+56320))}).join("")+'"'}function co(n){return n.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function Jt(n,e){return co(wd(n,e))}function Ma(n,e=Gt.current){return wd(ve(n,e))}function kd(n){let e=ve(n);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return K(ye([e,$i]).slice(0,32))}function Ad(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 Jt(e.slice(0,t))}function X6(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 By(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 Md(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 Z6=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"),e2="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(n=>parseInt(n,16)),t2=[{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}],n2=Ed("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"),a2=Ed("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"),i2=Ed("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),r2=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 s2(n){return n.reduce((e,t)=>(t.forEach(a=>{e.push(a)}),e),[])}function o2(n){return!!Md(n,Z6)}function u2(n){let e=Md(n,t2);if(e)return[n+e.s];let t=n2[n];if(t)return t;let a=a2[n];if(a)return[n+a[0]];let i=i2[n];return i||null}function d2(n){return!!Md(n,r2)}function Cd(n){if(n.match(/^[a-z0-9-]*$/i)&&n.length<=59)return n.toLowerCase();let e=Ma(n);e=s2(e.map(a=>{if(e2.indexOf(a)>=0)return[];if(a>=65024&&a<=65039)return[];let i=u2(a);return i||[a]})),e=Ma(co(e),Gt.NFKC),e.forEach(a=>{if(d2(a))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(a=>{if(o2(a))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 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 di=class extends kt{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 gd(e,this.coders,t)}decode(e){return e.coerce(this.name,Td(e,this.coders))}};var ho=new E(Vn),l2=new RegExp(/^bytes([0-9]*)$/),p2=new RegExp(/^(u?int)([0-9]*)$/),Qi=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(a=>this._getCoder(a)),e.name);case"":return new so(e.name)}let t=e.type.match(p2);if(t){let a=parseInt(t[2]||"256");return(a===0||a>256||a%8!==0)&&ho.throwArgumentError("invalid "+t[1]+" bit length","param",e),new yo(a/8,t[1]==="int",e.name)}if(t=e.type.match(l2),t){let a=parseInt(t[1]);return(a===0||a>32)&&ho.throwArgumentError("invalid bytes length","param",e),new ro(a,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",E.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});let a=e.map(s=>this._getCoder(pt.from(s))),i=new di(a,"_"),r=this._getWriter();return i.encode(r,t),r.data}decode(e,t,a){let i=e.map(s=>this._getCoder(pt.from(s)));return new di(i,"_").decode(this._getReader(j(t),a))}},Kr=new Qi;function nn(n){return fe(ve(n))}var xo="hash/5.7.0";var Id={};ji(Id,{decode:()=>Yi,encode:()=>Xi});function Yi(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 y2(n){let e={};for(let t=0;t>--l&1}let x=31,I=Math.pow(2,x),_=I>>>1,v=_>>1,S=I-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=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 c2(n){let e=0;return()=>n[e++]}function Uy(n){return c2(f2(n))}function m2(n){return n&1?~n>>1:n>>1}function h2(n,e){let t=Array(n);for(let a=0;ae[s]):t}function Vy(n){let e=[];for(;;){let t=n();if(t==0)break;e.push(g2(t,n))}for(;;){let t=n()-1;if(t<0)break;e.push(T2(t,n))}return y2(Ly(e))}function b2(n){let e=[];for(;;){let t=n();if(t==0)break;e.push(t)}return e}function jy(n,e,t){let a=Array(n).fill(void 0).map(()=>[]);for(let i=0;ia[s].push(r));return a}function g2(n,e){let t=1+e(),a=e(),i=b2(e),r=jy(i.length,1+n,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 I=x*a;return[l+x*t,p.map(_=>_+I)]})}))}function T2(n,e){let t=1+e();return jy(t,1+n,e).map(i=>[i[0],i.slice(1)])}function Hy(n){let e=Wr(n).sort((a,i)=>a-i);return t();function t(){let a=[];for(;;){let p=Wr(n,e);if(p.length==0)break;a.push({set:new Set(p),node:t()})}a.sort((p,f)=>f.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 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 bo=qy(),v2=new Set(Wr(bo)),w2=new Set(Wr(bo)),_2=Vy(bo),k2=Hy(bo),Gy=45,zy=95;function Ky(n){return Ma(n)}function A2(n){return n.filter(e=>e!=65039)}function Wy(n){for(let e of n.split(".")){let t=Ky(e);try{for(let a=t.lastIndexOf(zy)-1;a>=0;a--)if(t[a]!==zy)throw new Error("underscore only allowed at start");if(t.length>=4&&t.every(a=>a<128)&&t[2]===Gy&&t[3]===Gy)throw new Error("invalid label extension")}catch(a){throw new Error(`Invalid label "${e}": ${a.message}`)}}return n}function Jy(n){return Wy(E2(n,A2))}function E2(n,e){let t=Ky(n).reverse(),a=[];for(;t.length;){let i=C2(t);if(i){a.push(...e(i));continue}let r=t.pop();if(v2.has(r)){a.push(r);continue}if(w2.has(r))continue;let s=_2[r];if(s){a.push(...s);continue}throw new Error(`Disallowed codepoint: 0x${r.toString(16).toUpperCase()}`)}return Wy(M2(String.fromCodePoint(...a)))}function M2(n){return n.normalize("NFC")}function C2(n,e){var t;let a=k2,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 I2=new E(xo),Qy=new Uint8Array(32);Qy.fill(0);function $y(n){if(n.length===0)throw new Error("invalid ENS name; empty component");return n}function Sd(n){let e=ve(Jy(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($y(e.slice(a))),t}function Rd(n){try{return Sd(n).length!==0}catch{}return!1}function Ca(n){typeof n!="string"&&I2.throwArgumentError("invalid ENS name; not a string","name",n);let e=Qy,t=Sd(n);for(;t.length;)e=fe(ye([e,fe(t.pop())]));return K(e)}function Jr(n){return K(ye(Sd(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 Yy=`Ethereum Signed Message: +`;function Zi(n){return typeof n=="string"&&(n=ve(n)),fe(ye([ve(Yy),ve(String(n.length)),n]))}var S2=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},xt=new E(xo),t0=new Uint8Array(32);t0.fill(0);var R2=F.from(-1),n0=F.from(0),a0=F.from(1),P2=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function N2(n){let e=j(n),t=e.length%32;return t?_t([e,t0.slice(t)]):K(e)}var D2=me(a0.toHexString(),32),O2=me(n0.toHexString(),32),Xy={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Pd=["name","version","chainId","verifyingContract","salt"];function Zy(n){return function(e){return typeof e!="string"&&xt.throwArgumentError(`invalid domain value for ${JSON.stringify(n)}`,`domain.${n}`,e),e}}var B2={name:Zy("name"),version:Zy("version"),chainId:function(n){try{return F.from(n).toString()}catch{}return xt.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",n)},verifyingContract:function(n){try{return ce(n).toLowerCase()}catch{}return xt.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 K(e)}catch{}return xt.throwArgumentError('invalid domain value "salt"',"domain.salt",n)}};function Nd(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))&&xt.throwArgumentError("invalid numeric width","type",n);let i=P2.mask(t?a-1:a),r=t?i.add(a0).mul(R2):n0;return function(s){let o=F.from(s);return(o.lt(r)||o.gt(i))&&xt.throwArgumentError(`value out-of-bounds for ${n}`,"value",s),me(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))&&xt.throwArgumentError("invalid bytes width","type",n),function(a){return j(a).length!==t&&xt.throwArgumentError(`invalid length for ${n}`,"value",a),N2(a)}}}switch(n){case"address":return function(e){return me(ce(e),32)};case"bool":return function(e){return e?D2:O2};case"bytes":return function(e){return fe(e)};case"string":return function(e){return nn(e)}}return null}function e0(n,e){return`${n}(${e.map(({name:t,type:a})=>a+" "+t).join(",")})`}var bt=class{constructor(e){B(this,"types",Object.freeze(ct(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]&&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),!Nd(f)&&(a[f]||xt.throwArgumentError(`unknown type ${JSON.stringify(f)}`,"types",e),a[f].push(o),t[o][f]=!0)})}let r=Object.keys(a).filter(o=>a[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=>{!a[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=Nd(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(_t(l))}}let a=this.types[e];if(a){let i=nn(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),_t(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,a){if(Nd(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&&xt.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),{}):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,a){return bt.from(t).hashStruct(e,a)}static hashDomain(e){let t=[];for(let a in e){let i=Xy[a];i||xt.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(a)}`,"domain",e),t.push({name:a,type:i})}return t.sort((a,i)=>Pd.indexOf(a.name)-Pd.indexOf(i.name)),bt.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,a){return _t(["0x1901",bt.hashDomain(e),bt.from(t).hash(a)])}static hash(e,t,a){return fe(bt.encode(e,t,a))}static resolveNames(e,t,a,i){return S2(this,void 0,void 0,function*(){e=we(e);let r={};e.verifyingContract&&!ie(e.verifyingContract,20)&&(r[e.verifyingContract]="0x");let s=bt.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){bt.hashDomain(e);let i={},r=[];Pd.forEach(l=>{let p=e[l];p!=null&&(i[l]=B2[l](p),r.push({name:l,type:Xy[l]}))});let s=bt.from(t),o=we(t);return o.EIP712Domain?xt.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 K(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(Vn);var er=class extends en{},tr=class extends en{},Dd=class extends en{},oa=class extends en{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 i0(n,e){let t=new Error(`deferred error during ABI decoding triggered accessing ${n}`);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(a=>qt.from(a)).filter(a=>a!=null)),B(this,"_abiCoder",mt(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){gt.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]){gt.warn("duplicate definition - "+r);return}i[r]=a}),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(a=>a.format(e));return e===ge.json?JSON.stringify(t.map(a=>JSON.parse(a))):t}static getAbiCoder(){return Kr}static getAddress(e){return ce(e)}static getSighash(e){return Ce(nn(e.format()),0,4)}static getEventTopic(e){return nn(e.format())}getFunction(e){if(ie(e)){for(let a in this.functions)if(e===this.getSighash(a))return this.functions[a];gt.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?gt.throwArgumentError("no matching function","name",a):i.length>1&>.throwArgumentError("multiple matching functions","name",a),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 a=e.toLowerCase();for(let i in this.events)if(a===this.getEventTopic(i))return this.events[i];gt.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?gt.throwArgumentError("no matching event","name",a):i.length>1&>.throwArgumentError("multiple matching events","name",a),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 a=mt(this.constructor,"getSighash");for(let i in this.errors){let r=this.errors[i];if(e===a(r))return this.errors[i]}gt.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?gt.throwArgumentError("no matching error","name",a):i.length>1&>.throwArgumentError("multiple matching errors","name",a),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 a=j(t);return K(a.slice(0,4))!==this.getSighash(e)&>.throwArgumentError(`data signature does not match error ${e.name}.`,"data",K(a)),this._decodeParams(e.inputs,a.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 a=j(t);return K(a.slice(0,4))!==this.getSighash(e)&>.throwArgumentError(`data signature does not match function ${e.name}.`,"data",K(a)),this._decodeParams(e.inputs,a.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 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=K(a.slice(0,4)),f=F2[p];if(f)s=this._abiCoder.decode(f.inputs,a.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,a.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:K(t),errorArgs:s,errorName:o,errorSignature:l,reason:i})}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&>.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"?nn(s):r.type==="bytes"?fe(K(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(K(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?a.push(null):o.baseType==="array"||o.baseType==="tuple"?gt.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&>.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(nn(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 I=this.getEventTopic(e);(!ie(a[0],32)||a[0].toLowerCase()!==I)&>.throwError("fragment/topic mismatch",E.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:I,value:a[0]}),a=a.slice(1)}let i=[],r=[],s=[];e.inputs.forEach((I,_)=>{I.indexed?I.type==="string"||I.type==="bytes"||I.baseType==="tuple"||I.baseType==="array"?(i.push(pt.fromObject({type:"bytes32",name:I.name})),s.push(!0)):(i.push(I),s.push(!1)):(r.push(I),s.push(!1))});let o=a!=null?this._abiCoder.decode(i,ye(a)):null,l=this._abiCoder.decode(r,t,!0),p=[],f=0,x=0;e.inputs.forEach((I,_)=>{if(I.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(I.name&&p[I.name]==null){let v=p[_];v instanceof Error?Object.defineProperty(p,I.name,{enumerable:!0,get:()=>{throw i0(`property ${JSON.stringify(I.name)}`,v)}}):p[I.name]=v}});for(let I=0;I{throw i0(`index ${I}`,_)}})}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=K(e),a=this.getError(t.substring(0,10).toLowerCase());return a?new Dd({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 r0="abstract-provider/5.7.0";var L2=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},U2=new E(r0),go=class extends en{static isForkEvent(e){return!!(e&&e._isForkEvent)}};var $t=class{constructor(){U2.checkAbstract(new.target,$t),B(this,"_isProvider",!0)}getFeeData(){return L2(this,void 0,void 0,function*(){let{block:e,gasPrice:t}=yield Ie({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 s0="abstract-signer/5.7.0";var _n=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},ln=new E(s0),V2=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],j2=[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 _n(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return _n(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return _n(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 _n(this,void 0,void 0,function*(){this._checkProvider("call");let a=yield Ie(this.checkTransaction(e));return yield this.provider.call(a,t)})}sendTransaction(e){return _n(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 _n(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return _n(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return _n(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return _n(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(let a in e)V2.indexOf(a)===-1&&ln.throwArgumentError("invalid transaction key: "+a,"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(a=>(a[0].toLowerCase()!==a[1].toLowerCase()&&ln.throwArgumentError("from address mismatch","transaction",e),a[0])),t}populateTransaction(e){return _n(this,void 0,void 0,function*(){let t=yield Ie(this.checkTransaction(e));t.to!=null&&(t.to=Promise.resolve(t.to).then(i=>_n(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 a=t.maxFeePerGas!=null||t.maxPriorityFeePerGas!=null;if(t.gasPrice!=null&&(t.type===2||a)?ln.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(t.type===0||t.type===1)&&a&&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?(a&&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(j2.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 Ie(t)})}_checkProvider(e){this.provider||ln.throwError("missing provider",E.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,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 ua(this.address,e)}};var pe=wn(ud()),Jn=wn(Gd());function dr(n,e,t){return t={path:e,exports:{},require:function(a,i){return lx(a,i??t.path)}},n(t,t.exports),t.exports}function lx(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var Jd=G0;function G0(n,e){if(!n)throw new Error(e||"Assertion failed")}G0.equal=function(e,t,a){if(e!=t)throw new Error(a||"Assertion failed: "+e+" != "+t)};var Mn=dr(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,I=f&255;x?l.push(x,I):l.push(I)}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(I>>1)-1?S=(I>>1)-L:S=L,_.isubn(S)):S=0,x[v]=S,_.iushrn(1)}return x}t.getNAF=a;function i(l,p){var f=[[],[]];l=l.clone(),p=p.clone();for(var x=0,I=0,_;l.cmpn(-x)>0||p.cmpn(-I)>0;){var v=l.andln(3)+x&3,S=p.andln(3)+I&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)+I&7,(_===3||_===5)&&v===2?O=-S:O=S),f[1].push(O),2*x===L+1&&(x=1-x),2*I===O+1&&(I=1-I),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,px=an.getJSF,Ao=an.assert;function Pa(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 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 a=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),I=r;I>0;I--){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,a,i,r){var s=this._wnafT1,o=this._wnafT2,l=this._wnafT3,p=0,f,x,I;for(f=0;f=1;f-=2){var v=f-1,S=f;if(s[v]!==1||s[S]!==1){l[v]=ko(a[v],s[v],this._bitLength),l[S]=ko(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=px(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;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?I=o[x][R-1>>1]:R<0&&(I=o[x][-R-1>>1].neg()),I.type==="affine"?J=J.mixedAdd(I):J=J.add(I))}}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 a=[this],i=this,r=0;r=0&&(_=p,v=f),x.negative&&(x=x.neg(),I=I.neg()),_.negative&&(_=_.neg(),v=v.neg()),[{a:x,b:I},{a:_,b:v}]};fn.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),f=s.mul(i.b),x=e.sub(o).sub(l),I=p.add(f).neg();return{k1:x,k2:I}};fn.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)};fn.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};fn.prototype._endoWnafMulAdd=function(e,t,a){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 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)};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,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)};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,a){var i=[this,t],r=[e,a];return this.curve.endo?this.curve._endoWnafMulAdd(i,r):this.curve._wnafMulAdd(1,i,r,2)};Mt.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)};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 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};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(n,e,t,a){pi.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}$d(Pt,pi.BasePoint);fn.prototype.jpoint=function(e,t,a){return new Pt(this,e,t,a)};Pt.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)};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(),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 f=l.redSqr(),x=f.redMul(l),I=i.redMul(f),_=p.redSqr().redIAdd(x).redISub(I).redISub(I),v=p.redMul(I.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(),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(),f=p.redMul(o),x=a.redMul(p),I=l.redSqr().redIAdd(f).redISub(x).redISub(x),_=l.redMul(x.redISub(I)).redISub(r.redMul(f)),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 a=this;for(t=0;t=0)return!1;if(a.redIAdd(r),this.x.cmp(a)===0)return!0}};Pt.prototype.inspect=function(){return this.isInfinity()?"":""};Pt.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var wo=dr(function(n,e){"use strict";var t=e;t.base=pi,t.short=fx,t.mont=null,t.edwards=null}),_o=dr(function(n,e){"use strict";var t=e,a=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,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: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(n){if(!(this instanceof Ra))return new Ra(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=Mn.toArray(n.entropy,n.entropyEnc||"hex"),t=Mn.toArray(n.nonce,n.nonceEnc||"hex"),a=Mn.toArray(n.pers,n.persEnc||"hex");Jd(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,t,a)}var z0=Ra;Ra.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};Ra.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=Mn.toArray(a,i||"hex"),this._update(a));for(var r=[];r.length"};var cx=an.assert;function Eo(n,e){if(n instanceof Eo)return n;this._importDER(n,e)||(cx(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 Mo=Eo;function mx(){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 q0(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)}Eo.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=q0(t),a=q0(a);!a[0]&&!(a[1]&128);)a=a.slice(1);var i=[2];Kd(i,t.length),i=i.concat(t),i.push(2),Kd(i,a.length);var r=i.concat(a),s=[48];return Kd(s,r.length),s=s.concat(r),an.encode(s,e)};var hx=function(){throw new Error("unsupported")},K0=an.assert;function pn(n){if(!(this instanceof pn))return new pn(n);typeof n=="string"&&(K0(Object.prototype.hasOwnProperty.call(_o,n),"Unknown curve "+n),n=_o[n]),n instanceof _o.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 xx=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||hx(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)}};pn.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};pn.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 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 I=this.g.mul(x);if(!I.isInfinity()){var _=I.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=(I.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 Mo({r:v,s:S,recoveryParam:L})}}}}}};pn.prototype.verify=function(e,t,a,i){e=this._truncateToN(new pe.default(e,16)),a=this.keyFromPublic(a,i),t=new Mo(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,a.getPublic(),p),f.isInfinity()?!1:f.eqXToP(r)):(f=this.g.mulAdd(l,a.getPublic(),p),f.isInfinity()?!1:f.getX().umod(this.n).cmp(r)===0)};pn.prototype.recoverPubKey=function(n,e,t,a){K0((3&t)===t,"The recovery param is more than two bits"),e=new Mo(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 f=e.r.invm(i),x=i.sub(r).mul(f).umod(i),I=o.mul(f).umod(i);return this.g.mulAdd(x,s,I)};pn.prototype.getKeyRecoveryParam=function(n,e,t,a){if(e=new Mo(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 bx=dr(function(n,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=xx,t.eddsa=null}),W0=bx.ec;var J0="signing-key/5.7.0";var Xd=new E(J0),Yd=null;function $n(){return Yd||(Yd=new W0("secp256k1")),Yd}var cn=class{constructor(e){B(this,"curve","secp256k1"),B(this,"privateKey",K(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)),a=$n().keyFromPublic(j(e));return"0x"+t.pub.add(a.pub).encodeCompressed("hex")}signDigest(e){let t=$n().keyFromPrivate(j(this.privateKey)),a=j(e);a.length!==32&&Xd.throwArgumentError("bad digest length","digest",e);let i=t.sign(a,{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)),a=$n().keyFromPublic(j(Yr(e)));return me("0x"+t.derive(a.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}};function Co(n,e){let t=Un(e),a={r:j(t.r),s:j(t.s)};return"0x"+$n().recoverPubKey(j(n),a,t.recoveryParam).encode("hex",!1)}function Yr(n,e){let t=j(n);if(t.length===32){let a=new cn(t);return e?"0x"+$n().keyFromPrivate(t).getPublic(!0,"hex"):a.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 Xd.throwArgumentError("invalid public or private key","key","[REDACTED]")}var $0="transactions/5.7.0";var Ut=new E($0),Io;(function(n){n[n.legacy=0]="legacy",n[n.eip2930=1]="eip2930",n[n.eip1559=2]="eip1559"})(Io||(Io={}));function el(n){return n==="0x"?null:ce(n)}function Lt(n){return n==="0x"?Ji:F.from(n)}var gx=[{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"}],Tx={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function mn(n){let e=Yr(n);return ce(Ce(fe(Ce(e,1)),12))}function yi(n,e){return mn(Co(j(n),e))}function rn(n,e){let t=Zt(F.from(n).toHexString());return t.length>32&&Ut.throwArgumentError("invalid length for "+e,"transaction:"+e,n),t}function Zd(n,e){return{address:ce(n),storageKeys:(e||[]).map((t,a)=>(Nt(t)!==32&&Ut.throwArgumentError("invalid access list storageKey",`accessList[${n}:${a}]`,t),t.toLowerCase()))}}function sn(n){if(Array.isArray(n))return n.map((t,a)=>Array.isArray(t)?(t.length>2&&Ut.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${a}]`,t),Zd(t[0],t[1])):Zd(t.address,t.storageKeys));let e=Object.keys(n).map(t=>{let a=n[t].reduce((i,r)=>(i[r]=!0,i),{});return Zd(t,Object.keys(a).sort())});return e.sort((t,a)=>t.address.localeCompare(a.address)),e}function Q0(n){return sn(n).map(e=>[e.address,e.storageKeys])}function Y0(n,e){if(n.gasPrice!=null){let a=F.from(n.gasPrice),i=F.from(n.maxFeePerGas||0);a.eq(i)||Ut.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:a,maxFeePerGas:i})}let t=[rn(n.chainId||0,"chainId"),rn(n.nonce||0,"nonce"),rn(n.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),rn(n.maxFeePerGas||0,"maxFeePerGas"),rn(n.gasLimit||0,"gasLimit"),n.to!=null?ce(n.to):"0x",rn(n.value||0,"value"),n.data||"0x",Q0(n.accessList||[])];if(e){let a=Un(e);t.push(rn(a.recoveryParam,"recoveryParam")),t.push(Zt(a.r)),t.push(Zt(a.s))}return _t(["0x02",sa(t)])}function X0(n,e){let t=[rn(n.chainId||0,"chainId"),rn(n.nonce||0,"nonce"),rn(n.gasPrice||0,"gasPrice"),rn(n.gasLimit||0,"gasLimit"),n.to!=null?ce(n.to):"0x",rn(n.value||0,"value"),n.data||"0x",Q0(n.accessList||[])];if(e){let a=Un(e);t.push(rn(a.recoveryParam,"recoveryParam")),t.push(Zt(a.r)),t.push(Zt(a.s))}return _t(["0x01",sa(t)])}function vx(n,e){Gi(n,Tx);let t=[];gx.forEach(function(s){let o=n[s.name]||[],l={};s.numeric&&(l.hexPad="left"),o=j(K(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(K(o))});let a=0;if(n.chainId!=null?(a=n.chainId,typeof a!="number"&&Ut.throwArgumentError("invalid transaction.chainId","transaction",n)):e&&!aa(e)&&e.v>28&&(a=Math.floor((e.v-35)/2)),a!==0&&(t.push(K(a)),t.push("0x"),t.push("0x")),!e)return sa(t);let i=Un(e),r=27+i.recoveryParam;return a!==0?(t.pop(),t.pop(),t.pop(),r+=a*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(K(r)),t.push(Zt(j(i.r))),t.push(Zt(j(i.s))),sa(t)}function Xr(n,e){if(n.type==null||n.type===0)return n.accessList!=null&&Ut.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",n),vx(n,e);switch(n.type){case 1:return X0(n,e);case 2:return Y0(n,e);default:break}return Ut.throwError(`unsupported transaction type: ${n.type}`,E.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:n.type})}function Z0(n,e,t){try{let a=Lt(e[0]).toNumber();if(a!==0&&a!==1)throw new Error("bad recid");n.v=a}catch{Ut.throwArgumentError("invalid v for transaction type: 1","v",e[0])}n.r=me(e[1],32),n.s=me(e[2],32);try{let a=fe(t(n));n.from=yi(a,{r:n.r,s:n.s,recoveryParam:n.v})}catch{}}function wx(n){let e=Gr(n.slice(1));e.length!==9&&e.length!==12&&Ut.throwArgumentError("invalid component count for transaction type: 2","payload",K(n));let t=Lt(e[2]),a=Lt(e[3]),i={type:2,chainId:Lt(e[0]).toNumber(),nonce:Lt(e[1]).toNumber(),maxPriorityFeePerGas:t,maxFeePerGas:a,gasPrice:null,gasLimit:Lt(e[4]),to:el(e[5]),value:Lt(e[6]),data:e[7],accessList:sn(e[8])};return e.length===9||(i.hash=fe(n),Z0(i,e.slice(9),Y0)),i}function _x(n){let e=Gr(n.slice(1));e.length!==8&&e.length!==11&&Ut.throwArgumentError("invalid component count for transaction type: 1","payload",K(n));let t={type:1,chainId:Lt(e[0]).toNumber(),nonce:Lt(e[1]).toNumber(),gasPrice:Lt(e[2]),gasLimit:Lt(e[3]),to:el(e[4]),value:Lt(e[5]),data:e[6],accessList:sn(e[7])};return e.length===8||(t.hash=fe(n),Z0(t,e.slice(8),X0)),t}function kx(n){let e=Gr(n);e.length!==9&&e.length!==6&&Ut.throwArgumentError("invalid raw transaction","rawTransaction",n);let t={nonce:Lt(e[0]).toNumber(),gasPrice:Lt(e[1]),gasLimit:Lt(e[2]),to:el(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 a=t.v-27,i=e.slice(0,6);t.chainId!==0&&(i.push(K(t.chainId)),i.push("0x"),i.push("0x"),a-=t.chainId*2+8);let r=fe(sa(i));try{t.from=yi(r,{r:K(t.r),s:K(t.s),recoveryParam:a})}catch{}t.hash=fe(n)}return t.type=null,t}function So(n){let e=j(n);if(e[0]>127)return kx(e);switch(e[0]){case 1:return _x(e);case 2:return wx(e);default:break}return Ut.throwError(`unsupported transaction type: ${e[0]}`,E.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}var ef="contracts/5.7.0";var Na=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Se=new E(ef),Ax={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(n,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{}n||Se.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&&Se.throwArgumentError("resolver or addr is not configured for ENS name","name",t),a})}function Zr(n,e,t){return Na(this,void 0,void 0,function*(){return Array.isArray(t)?yield Promise.all(t.map((a,i)=>Zr(n,Array.isArray(e)?e[i]:e[a.name],a))):t.type==="address"?yield Ro(n,e):t.type==="tuple"?yield Zr(n,e,t.components):t.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(a=>Zr(n,a,t.arrayChildren))):Promise.reject(Se.makeError("invalid value for array",E.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function Do(n,e,t){return Na(this,void 0,void 0,function*(){let a={};t.length===e.inputs.length+1&&typeof t[t.length-1]=="object"&&(a=we(t.pop())),Se.checkArgumentCount(t.length,e.inputs.length,"passed to contract"),n.signer?a.from?a.from=Ie({override:Ro(n.signer,a.from),signer:n.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",E.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),p.override})):a.from=n.signer.getAddress():a.from&&(a.from=Ro(n.provider,a.from));let i=yield Ie({args:Zr(n.signer||n.provider,t,e.inputs),address:n.resolvedAddress,overrides:Ie(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=sn(o.accessList)),s.gasLimit==null&&e.gas!=null){let p=21e3,f=j(r);for(let x=0;xa[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 Ex(n,e){return function(...t){return Do(n,e,t)}}function Mx(n,e){let t=n.signer||n.provider;return function(...a){return Na(this,void 0,void 0,function*(){t||Se.throwError("estimate require a provider or signer",E.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});let i=yield Do(n,e,a);return yield t.estimateGas(i)})}}function nf(n,e){let t=e.wait.bind(e);e.wait=a=>t(a).then(i=>(i.events=i.logs.map(r=>{let s=ct(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 af(n,e,t){let a=n.signer||n.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=we(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 Do(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 Cx(n,e){return function(...t){return Na(this,void 0,void 0,function*(){n.signer||Se.throwError("sending a transaction requires a signer",E.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),n.deployTransaction!=null&&(yield n._deployed());let a=yield Do(n,e,t),i=yield n.signer.sendTransaction(a);return nf(n,i),i})}}function tf(n,e,t){return e.constant?af(n,e,t):Cx(n,e)}function rf(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 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(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]}},tl=class extends fi{constructor(){super("error",null)}},Po=class extends fi{constructor(e,t,a,i){let r={address:e},s=t.getEventTopic(a);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",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=Ki(e.args);if(t.length)throw t[0].error;let a=(e.args||[]).slice();return a.push(e),a}},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=(a,i)=>this.interface.decodeEventLog(t.eventFragment,a,i),e.args=t.args}catch{}}},lr=class{constructor(e,t,a){B(this,"interface",mt(new.target,"getInterface")(t)),a==null?(B(this,"provider",null),B(this,"signer",null)):St.isSigner(a)?(B(this,"provider",a.provider||null),B(this,"signer",a)):$t.isProvider(a)?(B(this,"provider",a),B(this,"signer",null)):Se.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]]):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",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,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,Ex(this,o)),this.estimateGas[s]==null&&B(this.estimateGas,s,Mx(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 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",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=we(e||{});return["from","to"].forEach(function(a){t[a]!=null&&Se.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 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 tl);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 a=e.topics[0];if(typeof a!="string")throw new Error("invalid topic");let i=this.interface.getEvent(a);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(rf(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,a){let i=ct(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||Se.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=we(i.filter);return typeof t=="string"&&ie(t,32)?(a!=null&&Se.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 lr{},ci=class{constructor(e,t,a){let i=null;typeof t=="string"?i=t:on(t)?i=K(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),a&&!St.isSigner(a)&&Se.throwArgumentError("invalid signer","signer",a),B(this,"bytecode",i),B(this,"interface",mt(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=we(e.pop());for(let a in t)if(!Ax[a])throw new Error("unknown transaction override "+a)}return["data","from","to"].forEach(a=>{t[a]!=null&&Se.throwError("cannot override "+a,E.errors.UNSUPPORTED_OPERATION,{operation:a})}),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=K(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 a=yield Zr(this.signer,e,this.interface.deploy.inputs);a.push(t);let i=this.getDeployTransaction(...a),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",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 ui(e)}static getContract(e,t,a){return new oe(e,t,a)}};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;)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 I=j(fa(i,n,l));r||(r=I.length,f=new Uint8Array(r),s=Math.ceil(a/r),p=a-(s-1)*r),f.set(I);for(let S=1;S=256)throw new Error("Depth too large!");return pf(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(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 a=new Uint8Array(37);if(e&fr){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(fa(Qn.sha512,this.chainCode,a)),r=i.slice(0,32),s=i.slice(32),o=null,l=null;this.privateKey?o=Bo(F.from(r).add(this.privateKey).mod(Px)):l=new cn(K(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 Ct(yr,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 a=this;for(let i=0;i=fr)throw new Error("invalid path index - "+r);a=a._derive(fr+s)}else if(r.match(/^[0-9]+$/)){let s=parseInt(r);if(s>=fr)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(fa(Qn.sha512,Nx,a));return new Ct(yr,Bo(i.slice(0,32)),null,"0x00000000",Bo(i.slice(32)),0,0,t)}static fromMnemonic(e,t,a){return a=il(a),e=xi(cr(e,a),a),Ct._fromSeed(rl(e,t),{phrase:e,path:"m",locale:a.locale})}static fromSeed(e){return Ct._fromSeed(e,null)}static fromExtendedKey(e){let t=ya.decode(e);(t.length!==82||pf(t.slice(0,78))!==e)&&ns.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");let a=t[4],i=K(t.slice(5,9)),r=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(yr,null,K(o),i,s,r,a,null);case"0x0488ade4":case"0x04358394 ":if(o[0]!==0)break;return new Ct(yr,K(o.slice(1)),null,i,s,r,a,null)}return ns.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}};function rl(n,e){e||(e="");let t=ve("mnemonic"+e,Gt.NFKD);return mi(ve(n,Gt.NFKD),t,2048,64,"sha512")}function cr(n,e){e=il(e),ns.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=yf(s);if((j(Yt(a.slice(0,r/8)))[0]&o)!==(a[a.length-1]&o))throw new Error("invalid checksum");return K(a.slice(0,r/8))}function xi(n,e){if(e=il(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]&Dx(8-a)),a+=3);let i=n.length/4,r=j(Yt(n))[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(n,e){try{return cr(n,e),!0}catch{}return!1}function cf(n){return(typeof n!="number"||n<0||n>=fr||n%1)&&ns.throwArgumentError("invalid account index","index",n),`m/44'/60'/${n}'/0/0`}var mf="random/5.7.0";var sl=new E(mf);function Ox(){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=Ox(),Fo=hf.crypto||hf.msCrypto;(!Fo||!Fo.getRandomValues)&&(sl.warn("WARNING: Missing strong random number source"),Fo={getRandomValues:function(n){return sl.throwError("no secure random source avaialble",E.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function Yn(n){(n<=0||n>1024||n%1||n!=n)&&sl.throwArgumentError("invalid length","length",n);let e=new Uint8Array(n);return Fo.getRandomValues(e),j(e)}function as(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 dl=wn(ul());var Lo="json-wallets/5.7.0";function ma(n){return typeof n=="string"&&n.substring(0,2)!=="0x"&&(n="0x"+n),j(n)}function mr(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 ha.default.Counter(x),J=new ha.default.ModeOfOperation.ctr(O,M),$=j(J.encrypt(i)),de=fe(ye([U,$])),T={address:n.address.substring(2).toLowerCase(),id:bf(I),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:K(x).substring(2)},ciphertext:K($).substring(2),kdf:"scrypt",kdfparams:{salt:K(f).substring(2),n:_,dklen:32,p:S,r:v},mac:de.substring(2)}};if(s){let R=Yn(16),N=new ha.default.Counter(R),q=new ha.default.ModeOfOperation.ctr(H,N),se=j(q.encrypt(s)),C=new Date,u=C.getUTCFullYear()+"-"+mr(C.getUTCMonth()+1,2)+"-"+mr(C.getUTCDate(),2)+"T"+mr(C.getUTCHours(),2)+"-"+mr(C.getUTCMinutes(),2)+"-"+mr(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:l,version:"0.1"}}return JSON.stringify(T)})}function Mf(n,e,t){if(Uo(n)){t&&t(0);let a=pl(n,e);return t&&t(1),Promise.resolve(a)}return Vo(n)?Ef(n,e,t):Promise.reject(new Error("invalid JSON wallet"))}function Cf(n,e){if(Uo(n))return pl(n,e);if(Vo(n))return Af(n,e);throw new Error("invalid JSON wallet")}var If="wallet/5.7.0";var Sf=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},hr=new E(If);function Vx(n){return n!=null&&ie(n.privateKey,32)&&n.address!=null}function jx(n){let e=n.mnemonic;return e&&e.phrase}var Cn=class extends St{constructor(e,t){if(super(),Vx(e)){let a=new cn(e.privateKey);if(B(this,"_signingKey",()=>a),B(this,"address",mn(this.publicKey)),this.address!==ce(e.address)&&hr.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),jx(e)){let i=e.mnemonic;B(this,"_mnemonic",()=>({phrase:i.phrase,path:i.path||ca,locale:i.locale||"en"}));let r=this.mnemonic,s=Ct.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 a=new cn(e);B(this,"_signingKey",()=>a)}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 Ie(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 a=this._signingKey().signDigest(fe(Xr(t)));return Xr(t,a)})}signMessage(e){return Sf(this,void 0,void 0,function*(){return Br(this._signingKey().signDigest(Zi(e)))})}_signTypedData(e,t,a){return Sf(this,void 0,void 0,function*(){let i=yield bt.resolveNames(e,t,a,r=>(this.provider==null&&hr.throwError("cannot resolve ENS names without a provider",E.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,a){if(typeof t=="function"&&!a&&(a=t,t={}),a&&typeof a!="function")throw new Error("invalid callback");return t||(t={}),hl(this,e,t,a)}static createRandom(e){let t=Yn(16);e||(e={}),e.extraEntropy&&(t=j(Ce(fe(ye([t,e.extraEntropy])),0,16)));let a=xi(t,e.locale);return Cn.fromMnemonic(a,e.path,e.locale)}static fromEncryptedJson(e,t,a){return Mf(e,t,a).then(i=>new Cn(i))}static fromEncryptedJsonSync(e,t){return new Cn(Cf(e,t))}static fromMnemonic(e,t,a){return t||(t=ca),new Cn(Ct.fromMnemonic(e,null,a).derivePath(t))}};function Rf(n,e){return yi(Zi(n),e)}function Pf(n,e,t,a){return yi(bt.hash(n,e,t),a)}var ea={};ji(ea,{AlchemyProvider:()=>wr,AlchemyWebSocketProvider:()=>ms,AnkrProvider:()=>hs,BaseProvider:()=>Zn,CloudflareProvider:()=>xs,EtherscanProvider:()=>bs,FallbackProvider:()=>Ts,Formatter:()=>X,InfuraProvider:()=>kr,InfuraWebSocketProvider:()=>ws,IpcProvider:()=>Il,JsonRpcBatchProvider:()=>nu,JsonRpcProvider:()=>Xt,JsonRpcSigner:()=>Tr,NodesmithProvider:()=>_s,PocketProvider:()=>ks,Provider:()=>$t,Resolver:()=>gr,StaticJsonRpcProvider:()=>cs,UrlJsonRpcProvider:()=>It,Web3Provider:()=>As,WebSocketProvider:()=>ga,getDefaultProvider:()=>au,getNetwork:()=>rs,isCommunityResourcable:()=>gl,isCommunityResource:()=>us,showThrottleMessage:()=>Xn});var Nf="networks/5.7.1";var Df=new E(Nf);function Hx(n){return n&&typeof n.renetwork=="function"}function xa(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 xa(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 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:qo("https://www.ethercluster.com/mordor","classicMordor")},Ho={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:qo("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:Ff,classicTestnet:Ff,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 rs(n){if(n==null)return null;if(typeof n=="number"){for(let a in Ho){let i=Ho[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=Ho[n];return a==null?null:{name:a.name,chainId:a.chainId,ensAddress:a.ensAddress,_defaultProvider:a._defaultProvider||null}}let e=Ho[n.name];if(!e)return typeof n.chainId!="number"&&Df.throwArgumentError("invalid network chainId","network",n),n;n.chainId!==0&&n.chainId!==e.chainId&&Df.throwArgumentError("network chainId mismatch","network",n);let t=n._defaultProvider||null;return t==null&&e._defaultProvider&&(Hx(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 Lf="web/5.7.1";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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})};function Uf(n,e){return qx(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 Gx=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},In=new E(Lf);function Vf(n){return new Promise(e=>{setTimeout(e,n)})}function Da(n,e){if(n==null)return null;if(typeof n=="string")return n;if(aa(n)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return Jt(n)}catch{}return K(n)}return n}function zx(n){return ve(n.replace(/%([0-9a-f][0-9a-f])/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))}function xl(n,e,t){let a=typeof n=="object"&&n.throttleLimit!=null?n.throttleLimit:12;In.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;In.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"},f=!1,x=2*60*1e3;if(typeof n=="string")l=n;else if(typeof n=="object"){if((n==null||n.url==null)&&In.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&&(f=!0);if(p.allowGzip=!!n.allowGzip,n.user!=null&&n.password!=null){l.substring(0,6)!=="https:"&&n.allowInsecureAuthentication!==!0&&In.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 "+Xi(ve(O))}}n.skipFetchSetup!=null&&(p.skipFetchSetup=!!n.skipFetchSetup),n.fetchOptions!=null&&(p.fetchOptions=we(n.fetchOptions))}let I=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),_=l?l.match(I):null;if(_)try{let O={statusCode:200,statusMessage:"OK",headers:{"content-type":_[1]||"text/plain"},body:_[2]?Yi(_[3]):zx(_[3])},U=O.body;return t&&(U=t(O.body,O)),Promise.resolve(U)}catch(O){In.throwError("processing response error",E.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(M,J){x&&(O=setTimeout(()=>{O!=null&&(O=null,J(In.makeError("timeout",E.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 Gx(this,void 0,void 0,function*(){for(let O=0;O=300)&&(S.cancel(),In.throwError("bad response",E.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 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){In.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 n=="string"?{url:n}:we(n);r.headers?Object.keys(r.headers).filter(o=>o.toLowerCase()==="content-type").length!==0||(r.headers=we(r.headers),r.headers["content-type"]="application/json"):r.headers={"content-type":"application/json"},n=r}return xl(n,i,a)}function Rn(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,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(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()&&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(f){s()&&a(f)})}p()})}var _l=wn(Gf());var ke="providers/5.7.2";var os=new E(ke),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),f=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(f),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=we(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 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():os.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 ce(e)}callAddress(e){if(!ie(e,32))return null;let t=ce(Ce(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 a=this.hex(e,t);return Nt(a)!==32?os.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 me(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 So(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&&os.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=a,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 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 gl(n){return n&&typeof n.isCommunityResource=="function"}function us(n){return gl(n)&&n.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(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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},he=new E(ke),Zx=10;function Kf(n){return n==null?"null":(Nt(n)!==32&&he.throwArgumentError("invalid topic","topic",n),n.toLowerCase())}function Wf(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[Kf(i)]=!0});let a=Object.keys(t);return a.sort(),a.join("|")}else return Kf(e)}).join("&")}function e5(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 br(n){if(typeof n=="string"){if(n=n.toLowerCase(),Nt(n)===32)return"tx:"+n;if(n.indexOf(":")===-1)return n}else{if(Array.isArray(n))return"filter:*:"+Wf(n);if(go.isForkEvent(n))throw he.warn("not implemented"),new Error("not implemented");if(n&&typeof n=="object")return"filter:"+(n.address||"*")+":"+Wf(n.topics||[])}throw new Error("invalid event - "+n)}function ds(){return new Date().getTime()}function Jf(n){return new Promise(e=>{setTimeout(e,n)})}var t5=["block","network","pending","poll"],kl=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=e5(e[2]),i={};return a.length>0&&(i.topics=a),t&&t!=="*"&&(i.address=t),i}pollable(){return this.tag.indexOf(":")>=0||t5.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 Tl(n){return me(F.from(n).toHexString(),32)}function $f(n){return ya.encode(ye([n,Ce(Yt(Yt(n)),0,4)]))}var Xf=new RegExp("^(ipfs)://(.*)$","i"),Qf=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),Xf,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Wo(n,e){try{return Jt(ls(n,e))}catch{}return null}function ls(n,e){if(n==="0x")return null;let t=F.from(Ce(n,e,e+32)).toNumber(),a=F.from(Ce(n,t,t+32)).toNumber();return Ce(n,t+32,t+32+a)}function vl(n){return n.match(/^ipfs:\/\/ipfs\//i)?n=n.substring(12):n.match(/^ipfs:\/\//i)?n=n.substring(7):he.throwArgumentError("unsupported IPFS format","link",n),`https://gateway.ipfs.io/ipfs/${n}`}function Yf(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 a5(n){if(n.length%32===0)return n;let e=new Uint8Array(Math.ceil(n.length/32)*32);return e.set(n),e}function Zf(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:_t([e,Ca(this.name),t||"0x"])},i=!1;(yield this.supportsWildcard())&&(i=!0,a.data=_t(["0x9061b923",Zf([Jr(this.name),a.data])]));try{let r=yield this.provider.call(a);return j(r).length%32===4&&he.throwError("resolver threw error",E.errors.CALL_EXCEPTION,{transaction:a,data:r}),i&&(r=ls(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?ls(a,0):null})}_getAddress(e,t){let a=n5[String(e)];if(a==null&&he.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 $f(ye([[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 $f(ye([[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=_l.default.toWords(i.slice(2));return o.unshift(s),_l.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===$i?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",Tl(e));if(t==null||t==="0x")return null;let a=this._getAddress(e,t);return a==null&&he.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 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([Tl(64),Tl(t.length),t]),t.length%32!==0&&(t=ye([t,me("0x",32-e.length%32)]));let a=yield this._fetchBytes("0x59d1d43c",K(t));return a==null||a==="0x"?null:Jt(a)})}},wl=null,i5=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",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 Rn(()=>this._ready().then(e=>e,e=>{if(!(e.code===E.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return wl==null&&(wl=new X),wl}static getNetwork(e){return rs(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 Sn({url:p,errorPassThrough:!0},f,(_,v)=>(_.status=v.statusCode,_));if(x.data)return x.data;let I=x.message||"unknown error";if(x.status>=400&&x.status<500)return he.throwError(`response not found during CCIP fetch: ${I}`,E.errors.SERVER_ERROR,{url:l,errorMessage:I});s.push(I)}return he.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(ds()-r.respTime<=e)return r.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}let t=ds(),a=Ie({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=ds();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=i5++,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)he.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${a})`),this.emit("error",he.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 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 Jf(0),this._network;let a=he.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=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,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,f=function(){return p?!0:(p=!0,l.forEach(I=>{I()}),!1)},x=I=>{I.confirmations{this.removeListener(e,x)}),i){let I=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)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),l.push(()=>{this.removeListener("block",v)})}if(typeof a=="number"&&a>0){let I=setTimeout(()=>{f()||o(he.makeError("timeout exceeded",E.errors.TIMEOUT,{timeout:a}))},a);I.unref&&I.unref(),l.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",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 Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getBalance",a);try{return F.from(i)}catch(r){return he.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 Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getTransactionCount",a);try{return F.from(i).toNumber()}catch(r){return he.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 Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getCode",a);try{return K(i)}catch(r){return he.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 Ie({address:this._getAddress(e),blockTag:this._getBlockTag(a),position:Promise.resolve(t).then(s=>Ln(s))}),r=yield this.perform("getStorageAt",i);try{return K(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,a){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&&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&&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=>K(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?K(r):null))}),this.formatter.transactionRequest(yield Ie(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 Ie(t))})}_call(e,t,a){return ue(this,void 0,void 0,function*(){a>=Zx&&he.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"&&Nt(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(),f=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&&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 Rn(()=>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 Rn(()=>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 Ie({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&&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 a=yield this._getResolver(t,"getResolver");if(a!=null){let i=new gr(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||he.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"+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(a){if(ie(e))throw a}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",a=yield this._getResolver(t,"lookupAddress");if(a==null)return null;let i=Wo(yield this.call({to:a,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 gr(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=Wo(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 a=yield t.getAvatar();return a==null?null:a.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,a){let i=new kl(br(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=br(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=br(e);return this._events.filter(a=>a.tag===t).length}listeners(e){if(e==null)return this._events.map(a=>a.listener);let t=br(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=br(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=br(e);this._events=this._events.filter(i=>i.tag!==a?!0:(t.push(i),!1))}return t.forEach(a=>{this._stopEvent(a)}),this}};var ba=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},At=new E(ke),r5=["call","estimateGas"];function ys(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=ys(n[t],e);if(a)return a}return null}if(typeof n=="string")try{return ys(JSON.parse(n),e)}catch{}return null}function tc(n,e,t){let a=t.transaction||t.signedTransaction;if(n==="call"){let r=ys(e,!0);if(r)return r.data;At.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=ys(e.body,!1);r==null&&(r=ys(e,!1)),r&&At.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)&&At.throwError("insufficient funds for intrinsic transaction cost",E.errors.INSUFFICIENT_FUNDS,{error:e,method:n,transaction:a}),i.match(/nonce (is )?too low/i)&&At.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)&&At.throwError("replacement fee too low",E.errors.REPLACEMENT_UNDERPRICED,{error:e,method:n,transaction:a}),i.match(/only replay-protected/i)&&At.throwError("legacy pre-eip-155 transactions not supported",E.errors.UNSUPPORTED_OPERATION,{error:e,method:n,transaction:a}),r5.indexOf(n)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&At.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 ec(n){return new Promise(function(e){setTimeout(e,n)})}function s5(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 ps(n){return n&&n.toLowerCase()}var Al={},Tr=class extends St{constructor(e,t,a){if(super(),e!==Al)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)):At.throwArgumentError("invalid address or index","addressOrIndex",a)}connect(e){return At.throwError("cannot alter JSON-RPC Signer connection",E.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new El(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&&At.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(a=>(a&&(a=a.toLowerCase()),a));if(e.gasLimit==null){let a=we(e);a.from=t,e.gasLimit=this.provider.estimateGas(a)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(a=>ba(this,void 0,void 0,function*(){if(a==null)return null;let i=yield this.provider.resolveName(a);return i==null&&At.throwArgumentError("provided ENS name resolves to null","tx.to",a),i}))),Ie({tx:Ie(e),sender:t}).then(({tx:a,sender:i})=>{a.from!=null?a.from.toLowerCase()!==i&&At.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)&&At.throwError("user rejected transaction",E.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:a}),tc("sendTransaction",s,r)))})}signTransaction(e){return At.throwError("signing transactions is unsupported",E.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),a=yield this.sendUncheckedTransaction(e);try{return yield Rn(()=>ba(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 ba(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(e):e,a=yield this.getAddress();try{return yield this.provider.send("personal_sign",[K(t),a.toLowerCase()])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&At.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"signMessage",from:a,messageData:e}),i}})}_legacySignMessage(e){return ba(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(e):e,a=yield this.getAddress();try{return yield this.provider.send("eth_sign",[a.toLowerCase(),K(t)])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&At.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:a,messageData:e}),i}})}_signTypedData(e,t,a){return ba(this,void 0,void 0,function*(){let i=yield bt.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(bt.getPayload(i.domain,t,i.value))])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&At.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 ba(this,void 0,void 0,function*(){let t=this.provider,a=yield this.getAddress();return t.send("personal_unlockAccount",[a.toLowerCase(),e,null])})}},El=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:a=>this.provider.waitForTransaction(t,a)}))}},o5={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0},Xt=class extends Zn{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=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 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(a){return At.throwError("could not detect network",E.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:a})}}return At.throwError("could not detect network",E.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new Tr(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 a={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:ct(a),provider:this});let i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];let r=Sn(this.connection,JSON.stringify(a),s5).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",[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 a=mt(this.constructor,"hexlifyTransaction");return["eth_call",[a(t.transaction,{from:!0}),t.blockTag]]}case"estimateGas":{let a=mt(this.constructor,"hexlifyTransaction");return["eth_estimateGas",[a(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 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=we(t),t.transaction=we(i),delete t.transaction.type)}}let a=this.prepareRequest(e,t);a==null&&At.throwError(e+" not implemented",E.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(a[0],a[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(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 ec(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=we(o5);if(t)for(let r in t)t[r]&&(a[r]=!0);Gi(e,a);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]=K(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 E(ke);vr=function(){e.throwError("WebSockets not supported in this environment",E.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var Ml=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Jo=new E(ke),u5=1,ga=class extends Xt{constructor(e,t){t==="any"&&Jo.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 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 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){Jo.throwError("cannot reset events block on WebSocketProvider",E.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(e){Jo.throwError("cannot set polling interval on WebSocketProvider",E.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return Ml(this,void 0,void 0,function*(){return null})}set polling(e){!e||Jo.throwError("cannot set polling on WebSocketProvider",E.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(e,t){let a=u5++;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 Ml(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 Ml(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 d5=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},fs=new E(ke),cs=class extends Xt{detectNetwork(){let e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return d5(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",E.errors.UNKNOWN_ERROR,{}),this._network==null&&(B(this,"_network",t),this.emit("network",t,null))),t})}},It=class extends cs{constructor(e,t){fs.checkAbstract(new.target,It),e=mt(new.target,"getNetwork")(e),t=mt(new.target,"getApiKey")(t);let a=mt(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(){fs.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(e){return fs.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 fs.throwError("not implemented; sub-classes must override getUrl",E.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}};var nc=new E(ke),$o="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC",ms=class extends ga{constructor(e,t){let a=new wr(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===$o}},wr=class extends It{static getWebSocketProvider(e,t){return new ms(e,t)}static getApiKey(e){return e==null?$o:(e&&typeof e!="string"&&nc.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:nc.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+a+t,throttleCallback:(i,r)=>(t===$o&&Xn(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===$o}};var l5=new E(ke),Qo="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function p5(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 l5.throwArgumentError("unsupported network","name",n)}var hs=class extends It{isCommunityResource(){return this.apiKey===Qo}static getApiKey(e){return e??Qo}static getUrl(e,t){t==null&&(t=Qo);let a={allowGzip:!0,url:"https://"+p5(e.name)+t,throttleCallback:(i,r)=>(t.apiKey===Qo&&Xn(),Promise.resolve(!0))};return t.projectSecret!=null&&(a.user="",a.password=t.projectSecret),a}};var y5=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},ac=new E(ke),xs=class extends It{static getApiKey(e){return e!=null&&ac.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:ac.throwArgumentError("unsupported network","network",arguments[0])}return a}perform(e,t){let a=Object.create(null,{perform:{get:()=>super.perform}});return y5(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 Yo=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Oa=new E(ke);function ic(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=Ln(K(a)):t==="accessList"?a="["+sn(a).map(i=>`{address:"${i.address}",storageKeys:["${i.storageKeys.join('","')}"]}`).join(",")+"]":a=K(a),e[t]=a)}return e}function f5(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 rc(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 sc(n){if(n==="pending")throw new Error("pending not supported");return n==="latest"?n:parseInt(n.substring(2),16)}function Cl(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;Oa.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/)&&Oa.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/)&&Oa.throwError("nonce has already been used",E.errors.NONCE_EXPIRED,{error:e,method:n,transaction:t}),a.match(/another transaction with same nonce/)&&Oa.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/)&&Oa.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 bs=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 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 Yo(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"?rc:f5;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 Sn(o,l,s||rc);return this.emit("debug",{action:"response",request:i,response:ct(p),provider:this}),p})}detectNetwork(){return Yo(this,void 0,void 0,function*(){return this.network})}perform(e,t){let a=Object.create(null,{perform:{get:()=>super.perform}});return Yo(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=>Cl("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 Cl("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 Cl("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",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)&&Oa.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 eu=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},bi=new E(ke);function Xo(){return new Date().getTime()}function oc(n){let e=null;for(let t=0;te?null:(a+i)/2}function _r(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=>_r(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=_r(a),JSON.stringify(t)+":"+a}).join(",")+"}"}throw new Error("unknown value type: "+typeof n)}var c5=1;function dc(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 m5=[E.errors.CALL_EXCEPTION,E.errors.INSUFFICIENT_FUNDS,E.errors.NONCE_EXPIRED,E.errors.REPLACEMENT_UNDERPRICED,E.errors.UNPREDICTABLE_GAS_LIMIT],h5=["address","args","errorArgs","errorSignature","method","transaction"];function Zo(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 x5(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 b5(n,e,t){let a=_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>=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 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":a=function(i){return i==null?null:(i=we(i),i.confirmations=-1,_r(i))};break;case"getBlock":t.includeTransactions?a=function(i){return i==null?null:(i=we(i),i.transactions=i.transactions.map(r=>(r=we(r),r.confirmations=-1,r)),_r(i))}:a=function(i){return i==null?null:_r(i)};break;default:throw new Error("unknown method: "+e)}return x5(a,n.quorum)}function gs(n,e){return eu(this,void 0,void 0,function*(){let t=n.provider;return t.blockNumber!=null&&t.blockNumber>=e||e===-1?t:Rn(()=>new Promise((a,i)=>{setTimeout(function(){return t.blockNumber>=e?a(t):n.cancelled?a(null):a(void 0)},0)}),{oncePoll:t})})}function g5(n,e,t,a){return eu(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 gs(n,e)),i[t](a.address,a.blockTag||"latest");case"getStorageAt":return a.blockTag&&ie(a.blockTag)&&(i=yield gs(n,e)),i.getStorageAt(a.address,a.position,a.blockTag||"latest");case"getBlock":return a.blockTag&&ie(a.blockTag)&&(i=yield gs(n,e)),i[a.includeTransactions?"getBlockWithTransactions":"getBlock"](a.blockTag||a.blockHash);case"call":case"estimateGas":return a.blockTag&&ie(a.blockTag)&&(i=yield gs(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 gs(n,e)),i.getLogs(r)}}return bi.throwError("unknown method error",E.errors.UNKNOWN_ERROR,{method:t,params:a})})}var Ts=class extends Zn{constructor(e,t){e.length===0&&bi.throwArgumentError("missing providers","providers",e);let a=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=we(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)&&bi.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&&bi.throwArgumentError("quorum will always fail; larger than total weight","quorum",t);let r=oc(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 eu(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 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=Xo(),p=i.filter(_=>_.runner&&l-_.start<_.stallTimeout).reduce((_,v)=>_+v.weight,0);for(;p{_.staller=null}),_.runner=g5(_,r,e,t).then(S=>{_.done=!0,_.result=S,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Zo(_,Xo()),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(_,Xo()),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 _=a(x);if(_!==void 0)return i.forEach(v=>{v.staller&&v.staller.cancel(),v.cancelled=!0}),_;o||(yield dc(100).getPromise()),o=!1}let I=i.reduce((_,v)=>{if(!v.done||v.error==null)return _;let S=v.error.code;return m5.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={};h5.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",E.errors.SERVER_ERROR,{method:e,params:t,results:i.map(l=>Zo(l)),provider:this})})}};var Il=null;var tu=new E(ke),vs="84842078b09946638c03157f83405213",ws=class extends ga{constructor(e,t){let a=new kr(e,t),i=a.connection;i.password&&tu.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===vs}},kr=class extends It{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?(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 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:tu.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===vs&&Xn(),Promise.resolve(!0))};return t.projectSecret!=null&&(i.user="",i.password=t.projectSecret),i}isCommunityResource(){return this.projectId===vs}};var nu=class extends Xt{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:ct(o),provider:this}),Sn(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 I=new Error(x.error.message);I.code=x.error.code,I.data=x.error.data,p.reject(I)}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 E(ke),T5="ETHERS_JS_SHARED",_s=class extends It{static getApiKey(e){return e&&typeof e!="string"&&Sl.throwArgumentError("invalid apiKey","apiKey",e),e||T5}static getUrl(e,t){Sl.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:Sl.throwArgumentError("unsupported network","network",arguments[0])}return a+"?apiKey="+t}};var lc=new E(ke),pc="62e1ad51b37b8e00394bda3b",ks=class extends It{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 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:lc.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===pc}};var yc=new E(ke),v5=1;function fc(n,e){let t="Web3LegacyFetcher";return function(a,i){let r={method:a,params:i,id:v5++,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 w5(n){return function(e,t){t==null&&(t=[]);let a={method:e,params:t};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:ct(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 As=class extends Xt{constructor(e,t){e==null&&yc.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=w5(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),a||(a="unknown:")),super(a,t),B(this,"jsonRpcFetchFunc",i),B(this,"provider",r)}send(e,t){return this.jsonRpcFetchFunc(e,t)}};var cc=new E(ke);function au(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 Xt(n);case"ws":case"wss":return new ga(n);default:cc.throwArgumentError("unsupported URL scheme","network",n)}}let t=rs(n);return(!t||!t._defaultProvider)&&cc.throwError("unsupported getDefaultProvider network",E.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:n}),t._defaultProvider({FallbackProvider:Ts,AlchemyProvider:wr,AnkrProvider:hs,CloudflareProvider:xs,EtherscanProvider:bs,InfuraProvider:kr,JsonRpcProvider:Xt,NodesmithProvider:_s,PocketProvider:ks,Web3Provider:As,IpcProvider:null},e)}var ne={};ji(ne,{AbiCoder:()=>Qi,ConstructorFragment:()=>Dt,ErrorFragment:()=>tn,EventFragment:()=>Ht,FormatTypes:()=>ge,Fragment:()=>qt,FunctionFragment:()=>Ot,HDNode:()=>Ct,Indexed:()=>oa,Interface:()=>Ia,LogDescription:()=>er,Logger:()=>E,ParamType:()=>pt,RLP:()=>Zs,SigningKey:()=>cn,SupportedAlgorithm:()=>Qn,TransactionDescription:()=>tr,TransactionTypes:()=>Io,UnicodeNormalizationForm:()=>Gt,Utf8ErrorFuncs:()=>fo,Utf8ErrorReason:()=>Bt,_TypedDataEncoder:()=>bt,_fetchData:()=>xl,_toEscapedUtf8String:()=>wd,accessListify:()=>sn,arrayify:()=>j,base58:()=>ya,base64:()=>Cd,checkProperties:()=>Gi,checkResultErrors:()=>Ki,commify:()=>wc,computeAddress:()=>mn,computeHmac:()=>fa,computePublicKey:()=>Yr,concat:()=>ye,deepCopy:()=>ct,defaultAbiCoder:()=>Kr,defaultPath:()=>ca,defineReadOnly:()=>B,dnsEncode:()=>Jr,entropyToMnemonic:()=>xi,fetchJson:()=>Sn,formatBytes32String:()=>_d,formatEther:()=>_c,formatUnits:()=>Rl,getAccountPath:()=>cf,getAddress:()=>ce,getContractAddress:()=>ui,getCreate2Address:()=>My,getIcapAddress:()=>Ey,getJsonWalletAddress:()=>yl,getStatic:()=>mt,hashMessage:()=>Zi,hexConcat:()=>_t,hexDataLength:()=>Nt,hexDataSlice:()=>Ce,hexStripZeros:()=>pd,hexValue:()=>Ln,hexZeroPad:()=>me,hexlify:()=>K,id:()=>nn,isAddress:()=>Ay,isBytes:()=>on,isBytesLike:()=>aa,isHexString:()=>ie,isValidMnemonic:()=>ff,isValidName:()=>Sd,joinSignature:()=>Br,keccak256:()=>fe,mnemonicToEntropy:()=>cr,mnemonicToSeed:()=>rl,namehash:()=>Ca,nameprep:()=>Md,parseBytes32String:()=>kd,parseEther:()=>kc,parseTransaction:()=>So,parseUnits:()=>Pl,poll:()=>Rn,randomBytes:()=>Yn,recoverAddress:()=>yi,recoverPublicKey:()=>Co,resolveProperties:()=>Ie,ripemd160:()=>es,serializeTransaction:()=>Xr,sha256:()=>Yt,sha512:()=>tl,shallowCopy:()=>we,shuffled:()=>as,solidityKeccak256:()=>xc,solidityPack:()=>iu,soliditySha256:()=>bc,splitSignature:()=>Un,stripZeros:()=>Zt,toUtf8Bytes:()=>ve,toUtf8CodePoints:()=>Ma,toUtf8String:()=>Jt,verifyMessage:()=>Rf,verifyTypedData:()=>Pf,zeroPad:()=>ii});var mc="solidity/5.7.0";var _5=new RegExp("^bytes([0-9]+)$"),k5=new RegExp("^(u?int)([0-9]*)$"),A5=new RegExp("^(.*)\\[([0-9]*)\\]$"),E5="0000000000000000000000000000000000000000000000000000000000000000",Ar=new E(mc);function hc(n,e,t){switch(n){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 a=n.match(k5);if(a){let i=parseInt(a[2]||"256");return(a[2]&&String(i)!==a[2]||i%8!==0||i===0||i>256)&&Ar.throwArgumentError("invalid number type","type",n),t&&(i=256),e=F.from(e).toTwos(i),ii(e,i/8)}if(a=n.match(_5),a){let i=parseInt(a[1]);return(String(i)!==a[1]||i===0||i>32)&&Ar.throwArgumentError("invalid bytes type","type",n),j(e).byteLength!==i&&Ar.throwArgumentError(`invalid value for ${n}`,"value",e),t?j((e+E5).substring(0,66)):e}if(a=n.match(A5),a&&Array.isArray(e)){let i=a[1];parseInt(a[2]||String(e.length))!=e.length&&Ar.throwArgumentError(`invalid array length for ${n}`,"value",e);let s=[];return e.forEach(function(o){s.push(hc(i,o,!0))}),ye(s)}return Ar.throwArgumentError("invalid type","type",n)}function iu(n,e){n.length!=e.length&&Ar.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);let t=[];return n.forEach(function(a,i){t.push(hc(a,e[i]))}),K(ye(t))}function xc(n,e){return fe(iu(n,e))}function bc(n,e){return Yt(iu(n,e))}var gc="units/5.7.0";var Tc=new E(gc),vc=["wei","kwei","mwei","gwei","szabo","finney","ether"];function wc(n){let e=String(n).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||n==="."||n==="-.")&&Tc.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 Rl(n,e){if(typeof e=="string"){let t=vc.indexOf(e);t!==-1&&(e=3*t)}return qi(n,e??18)}function Pl(n,e){if(typeof n!="string"&&Tc.throwArgumentError("value must be a string","value",n),typeof e=="string"){let t=vc.indexOf(e);t!==-1&&(e=3*t)}return dn(n,e??18)}function _c(n){return Rl(n,18)}function kc(n){return Pl(n,18)}var ru="ethers/5.7.2";var Ac=new E(ru);try{let n=window;n._ethers==null&&(n._ethers=Nl)}catch{}var Pn;(function(n){n.Mainnet="Mainnet",n.Custom="Custom",n.Gnosis="Xdai",n.Goerli="Goerli",n.Xdai="Xdai",n.XdaiQa="XdaiQa",n.ArbitrumOne="ArbitrumOne",n.ArbitrumSepolia="ArbitrumSepolia"})(Pn||(Pn={}));var Ec;(function(n){n[n.Custom=0]="Custom",n[n.Mainnet=1]="Mainnet",n[n.Goerli=5]="Goerli",n[n.Gnosis=100]="Gnosis",n[n.Xdai=100]="Xdai",n[n.XdaiQa=100]="XdaiQa",n[n.ArbitrumSepolia=421614]="ArbitrumSepolia",n[n.ArbitrumOne=42161]="ArbitrumOne"})(Ec||(Ec={}));var su;(function(n){n.Mainnet="0x5346D0f80e2816FaD329F2c140c870ffc3c3E2Ef",n.Goerli="0x79073fc2117dD054FCEdaCad1E7018C9CbE3ec0B",n.Xdai="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.XdaiQa="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.Custom="",n.ArbitrumOne="0xcccccdcc0ccf6c708d860e19353c5f9a49accccc",n.ArbitrumSepolia="0x7777494e3d8cce0D3570E21FEf820F9Fee077777"})(su||(su={}));var Er;(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",n.ArbitrumOne="https://app.colony.io/reputation/arbitrum-one",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/reputation/arbitrum-sepolia"})(Er||(Er={}));var ou;(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="",n.ArbitrumOne="https://app.colony.io/metatransaction/arbitrum-one",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/metatransaction/arbitrum-sepolia"})(ou||(ou={}));var Es;(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="",n.ArbitrumOne="https://app.colony.io/public-rpc/",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/public-rpc/"})(Es||(Es={}));var Ms;(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",n.ArbitrumOne=".colony.joincolony.arbitrum",n.ArbitrumSepolia=".colony.joincolony.sepolia"})(Ms||(Ms={}));var Cs;(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",n.ArbitrumOne=".user.joincolony.arbitrum",n.ArbitrumSepolia=".user.joincolony.sepolia"})(Cs||(Cs={}));var Is;(function(n){let e;(function(i){i.ETH="0x0000000000000000000000000000000000000000",i.CLNY="0x3E828ac5C480069D4765654Fb4b8733b910b13b2",i.USDC="0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"})(e=n.Mainnet||(n.Mainnet={}));let t;(function(i){i.XDAI="0x0000000000000000000000000000000000000000",i.CLNY="0xc9B6218AffE8Aba68a13899Cbf7cF7f14DDd304C",i.USDC="0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83"})(t=n.Gnosis||(n.Gnosis={}));let a;(function(i){i.ETH="0x0000000000000000000000000000000000000000",i.CLNY="0xcccccdcc0ccf6c708d860e19353c5f9a49accccc",i.USDC="0xaf88d065e77c8cC2239327C5EDb3A432268e5831"})(a=n.ArbitrumOne||(n.ArbitrumOne={}))})(Is||(Is={}));var _e;(function(n){n[n.RootDomain=1]="RootDomain",n[n.RootTeam=1]="RootTeam",n[n.RootPot=1]="RootPot",n[n.SkillIgnore=0]="SkillIgnore"})(_e||(_e={}));var zt;(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"})(zt||(zt={}));var Ol="0x12345678",Dl;(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"})(Dl||(Dl={}));var vt;(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"})(vt||(vt={}));var Ae;(function(n){n.FundingQueue="FundingQueue",n.IVotingReputation="IVotingReputation",n.MultisigPermissions="MultisigPermissions",n.OneTxPayment="OneTxPayment",n.ReputationBootstrapper="ReputationBootstrapper",n.StagedExpenditure="StagedExpenditure",n.StakedExpenditure="StakedExpenditure",n.StreamingPayments="StreamingPayments",n.TokenSupplier="TokenSupplier",n.VotingReputation="VotingReputation"})(Ae||(Ae={}));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=(n,e)=>{throw new Error(`${e}: ${n}`)},Ll=n=>n!=null;var{keccak256:C5,toUtf8Bytes:I5}=ne,{MaxUint256:S5}=ht;var Ul=n=>ne.formatEther(n);var Vl=n=>{let e=n.reduce((t,a)=>t|1<{let e=F.from(n);return[...Array(vt.LAST_ROLE).keys()].map(t=>e.shr(t).mask(1).eq(1)?t:null).filter(Ll)},vi=async(n,e,t,a)=>{if(F.from(t).eq(F.from(a)))return S5;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)},Ba=n=>C5(I5(n));var Mr=async(n,e)=>(await Ti.connect(n,e).version()).toNumber(),jl=(n,e)=>n.map(t=>{try{return e.parseLog(t)}catch{return null}}).filter(Ll);var{hexDataSlice:Hl}=ne,{MaxUint256:R5}=ht,Cc=n=>{let e=Hl(n,0,3),t=F.from(Hl(n,4,35)),a=F.from(Hl(n,36,67));return{sig:e,permissionDomainId:t,childSkillIndex:a}},Ic=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),R5,r];let o=F.from(_e.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 vi(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]},P5=async(n,e,t,a,i)=>{let r=await Promise.all(a.map(s=>Ic(n,e,t,s,i)));for(let s=0;sArray.isArray(a)?a.length===1?ta(n,e,t,a[0],i):P5(n,e,t,a,i):Ic(n,e,t,a,i);var{MaxUint256:Sc}=ht,{AddressZero:N5}=ht;async function D5(n,e){let t;try{return t=await n.getCapabilityRoles(ne.hexZeroPad(e,4)),uu(t)}catch{return[]}}async function Ss(n,e,t,a,i,r,s){let o,{skillId:l}=await e.getDomain(i),{sig:p,permissionDomainId:f,childSkillIndex:x}=Cc(s),I=gi.connect(r,a.signer||a.provider),_=await D5(I,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 ${_e.RootDomain}`);o=Sc}else{let{skillId:U}=await e.getDomain(f),H=await n.getChildSkillId(U,x);if(H.eq(l))o=Sc;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,N5);return{actionCid:o,key:v,value:S,branchMask:L,siblings:O}}var{AddressZero:O5}=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,a){this.colony=t,this.network=e;let i=a?.network||Pn.ArbitrumOne;this.endpointUrl=a?.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,a){let i=await this.getBaseEndpoint(a),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,a){let i=await this.getBaseEndpoint(a),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 a=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${a}/${i}`;return na.fetchReputation(r)}async getTotalReputation(e,t){let a=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${a}/${i}/${O5}/noProof`,s=await na.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 Et=n=>Array.from(Array(n-1)).map((e,t)=>t+1);var Rc=10,yk=Et(Rc),Pc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Nc=Rc-1;var Dc=3,mk=Et(Dc),Oc={1:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],2:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]},Bc=Dc-1;var Fc=10,bk=Et(Fc),Lc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Uc=Fc-1;var Vc=7,vk=Et(Vc),jc={1:[],2:[],3:[],4:[],5:[],6:[]},Hc=Vc-1;var qc=8,kk=Et(qc),Gc={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3],6:[1,2,3],7:[1,2,3]},zc=qc-1;var Kc=5,Mk=Et(Kc),Wc={1:[1,2,3,4,5,6,7,8,9,10,11,12,13],2:[1,2,3,4,5,6,7,8,9,10,11,12,13],3:[1,2,3,4,5,6,7,8,9,10,11,12,13],4:[1,2,3,4,5,6,7,8,9,10,11,12,13]},Jc=Kc-1;var $c=7,Sk=Et($c),Qc={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3],6:[1,2,3]},Yc=$c-1;var Xc=10,Nk=Et(Xc),Zc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},em=Xc-1;var tm=14,Bk=Et(tm),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],11:[1,2,3,4,5,6],12:[1,2,3,4,5,6],13:[1,2,3,4,5,6]},Gl=tm-1;var nm=18,B5=Et(nm),Uk=nm-1;var F5=(n,e)=>{switch(n){case Ae.FundingQueue:return Pc[e];case Ae.IVotingReputation:return ql[e];case Ae.MultisigPermissions:return Oc[e];case Ae.OneTxPayment:return Lc[e];case Ae.ReputationBootstrapper:return jc[e];case Ae.StagedExpenditure:return Wc[e];case Ae.StakedExpenditure:return Gc[e];case Ae.StreamingPayments:return Qc[e];case Ae.TokenSupplier:return Zc[e];case Ae.VotingReputation:return ql[e];default:return Mc(n,"Could not find extension with name")}},wi=(n,e,t)=>{let a=F5(n,e);return!!a&&!a.includes(t)};var L5={[Ae.FundingQueue]:Nc,[Ae.IVotingReputation]:Gl,[Ae.MultisigPermissions]:Bc,[Ae.OneTxPayment]:Uc,[Ae.ReputationBootstrapper]:Hc,[Ae.StagedExpenditure]:Jc,[Ae.StakedExpenditure]:zc,[Ae.StreamingPayments]:Yc,[Ae.TokenSupplier]:em,[Ae.VotingReputation]:Gl};var k6=wn(am(),1);var yp=wn(v6(),1);var Re;(function(n){n.DEFAULT="default",n.Annotation="annotation",n.Colony="colony",n.Decision="decision",n.Domain="domain",n.Misc="misc"})(Re||(Re={}));var pp=2,lp;(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"})(lp||(lp={}));var w6=n=>`Validation error(s): +`)}static register(e,t){if(t||(t=e.locale),Sx)try{let a=window;a._ethers&&a._ethers.wordlists&&(a._ethers.wordlists[t]||B(a._ethers.wordlists,t,e))}catch{}}};var Rx="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo",ts=null;function df(n){if(ts==null&&(ts=Rx.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),hn.check(n)!=="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"))throw ts=null,new Error("BIP39 Wordlist for en (English) FAILED")}var al=class extends hn{constructor(){super("en")}getWord(e){return df(this),ts[e]}getWordIndex(e){return df(this),ts.indexOf(e)}},il=new al;hn.register(il);var hi={en:il};var lf="hdnode/5.7.0";var ns=new E(lf),Px=F.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),Nx=ve("Bitcoin seed"),fr=2147483648;function yf(n){return(1<=256)throw new Error("Depth too large!");return pf(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(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 a=new Uint8Array(37);if(e&fr){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(fa(Qn.sha512,this.chainCode,a)),r=i.slice(0,32),s=i.slice(32),o=null,l=null;this.privateKey?o=Bo(F.from(r).add(this.privateKey).mod(Px)):l=new cn(K(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 Ct(yr,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 a=this;for(let i=0;i=fr)throw new Error("invalid path index - "+r);a=a._derive(fr+s)}else if(r.match(/^[0-9]+$/)){let s=parseInt(r);if(s>=fr)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(fa(Qn.sha512,Nx,a));return new Ct(yr,Bo(i.slice(0,32)),null,"0x00000000",Bo(i.slice(32)),0,0,t)}static fromMnemonic(e,t,a){return a=rl(a),e=xi(cr(e,a),a),Ct._fromSeed(sl(e,t),{phrase:e,path:"m",locale:a.locale})}static fromSeed(e){return Ct._fromSeed(e,null)}static fromExtendedKey(e){let t=ya.decode(e);(t.length!==82||pf(t.slice(0,78))!==e)&&ns.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");let a=t[4],i=K(t.slice(5,9)),r=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(yr,null,K(o),i,s,r,a,null);case"0x0488ade4":case"0x04358394 ":if(o[0]!==0)break;return new Ct(yr,K(o.slice(1)),null,i,s,r,a,null)}return ns.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}};function sl(n,e){e||(e="");let t=ve("mnemonic"+e,Gt.NFKD);return mi(ve(n,Gt.NFKD),t,2048,64,"sha512")}function cr(n,e){e=rl(e),ns.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=yf(s);if((j(Yt(a.slice(0,r/8)))[0]&o)!==(a[a.length-1]&o))throw new Error("invalid checksum");return K(a.slice(0,r/8))}function xi(n,e){if(e=rl(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]&Dx(8-a)),a+=3);let i=n.length/4,r=j(Yt(n))[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(n,e){try{return cr(n,e),!0}catch{}return!1}function cf(n){return(typeof n!="number"||n<0||n>=fr||n%1)&&ns.throwArgumentError("invalid account index","index",n),`m/44'/60'/${n}'/0/0`}var mf="random/5.7.0";var ol=new E(mf);function Ox(){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=Ox(),Fo=hf.crypto||hf.msCrypto;(!Fo||!Fo.getRandomValues)&&(ol.warn("WARNING: Missing strong random number source"),Fo={getRandomValues:function(n){return ol.throwError("no secure random source avaialble",E.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function Yn(n){(n<=0||n>1024||n%1||n!=n)&&ol.throwArgumentError("invalid length","length",n);let e=new Uint8Array(n);return Fo.getRandomValues(e),j(e)}function as(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 ll=wn(dl());var Lo="json-wallets/5.7.0";function ma(n){return typeof n=="string"&&n.substring(0,2)!=="0x"&&(n="0x"+n),j(n)}function mr(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 ha.default.Counter(x),J=new ha.default.ModeOfOperation.ctr(O,M),$=j(J.encrypt(i)),de=fe(ye([U,$])),T={address:n.address.substring(2).toLowerCase(),id:bf(I),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:K(x).substring(2)},ciphertext:K($).substring(2),kdf:"scrypt",kdfparams:{salt:K(f).substring(2),n:_,dklen:32,p:S,r:v},mac:de.substring(2)}};if(s){let R=Yn(16),N=new ha.default.Counter(R),q=new ha.default.ModeOfOperation.ctr(H,N),se=j(q.encrypt(s)),C=new Date,u=C.getUTCFullYear()+"-"+mr(C.getUTCMonth()+1,2)+"-"+mr(C.getUTCDate(),2)+"T"+mr(C.getUTCHours(),2)+"-"+mr(C.getUTCMinutes(),2)+"-"+mr(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:l,version:"0.1"}}return JSON.stringify(T)})}function Mf(n,e,t){if(Uo(n)){t&&t(0);let a=yl(n,e);return t&&t(1),Promise.resolve(a)}return Vo(n)?Ef(n,e,t):Promise.reject(new Error("invalid JSON wallet"))}function Cf(n,e){if(Uo(n))return yl(n,e);if(Vo(n))return Af(n,e);throw new Error("invalid JSON wallet")}var If="wallet/5.7.0";var Sf=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},hr=new E(If);function Vx(n){return n!=null&&ie(n.privateKey,32)&&n.address!=null}function jx(n){let e=n.mnemonic;return e&&e.phrase}var Cn=class extends St{constructor(e,t){if(super(),Vx(e)){let a=new cn(e.privateKey);if(B(this,"_signingKey",()=>a),B(this,"address",mn(this.publicKey)),this.address!==ce(e.address)&&hr.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),jx(e)){let i=e.mnemonic;B(this,"_mnemonic",()=>({phrase:i.phrase,path:i.path||ca,locale:i.locale||"en"}));let r=this.mnemonic,s=Ct.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 a=new cn(e);B(this,"_signingKey",()=>a)}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 Ie(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 a=this._signingKey().signDigest(fe(Xr(t)));return Xr(t,a)})}signMessage(e){return Sf(this,void 0,void 0,function*(){return Br(this._signingKey().signDigest(Zi(e)))})}_signTypedData(e,t,a){return Sf(this,void 0,void 0,function*(){let i=yield bt.resolveNames(e,t,a,r=>(this.provider==null&&hr.throwError("cannot resolve ENS names without a provider",E.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,a){if(typeof t=="function"&&!a&&(a=t,t={}),a&&typeof a!="function")throw new Error("invalid callback");return t||(t={}),xl(this,e,t,a)}static createRandom(e){let t=Yn(16);e||(e={}),e.extraEntropy&&(t=j(Ce(fe(ye([t,e.extraEntropy])),0,16)));let a=xi(t,e.locale);return Cn.fromMnemonic(a,e.path,e.locale)}static fromEncryptedJson(e,t,a){return Mf(e,t,a).then(i=>new Cn(i))}static fromEncryptedJsonSync(e,t){return new Cn(Cf(e,t))}static fromMnemonic(e,t,a){return t||(t=ca),new Cn(Ct.fromMnemonic(e,null,a).derivePath(t))}};function Rf(n,e){return yi(Zi(n),e)}function Pf(n,e,t,a){return yi(bt.hash(n,e,t),a)}var ea={};ji(ea,{AlchemyProvider:()=>wr,AlchemyWebSocketProvider:()=>ms,AnkrProvider:()=>hs,BaseProvider:()=>Zn,CloudflareProvider:()=>xs,EtherscanProvider:()=>bs,FallbackProvider:()=>Ts,Formatter:()=>X,InfuraProvider:()=>kr,InfuraWebSocketProvider:()=>ws,IpcProvider:()=>Sl,JsonRpcBatchProvider:()=>nu,JsonRpcProvider:()=>Xt,JsonRpcSigner:()=>Tr,NodesmithProvider:()=>_s,PocketProvider:()=>ks,Provider:()=>$t,Resolver:()=>gr,StaticJsonRpcProvider:()=>cs,UrlJsonRpcProvider:()=>It,Web3Provider:()=>As,WebSocketProvider:()=>ga,getDefaultProvider:()=>au,getNetwork:()=>rs,isCommunityResourcable:()=>Tl,isCommunityResource:()=>us,showThrottleMessage:()=>Xn});var Nf="networks/5.7.1";var Df=new E(Nf);function Hx(n){return n&&typeof n.renetwork=="function"}function xa(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 xa(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 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:qo("https://www.ethercluster.com/mordor","classicMordor")},Ho={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:qo("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:Ff,classicTestnet:Ff,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 rs(n){if(n==null)return null;if(typeof n=="number"){for(let a in Ho){let i=Ho[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=Ho[n];return a==null?null:{name:a.name,chainId:a.chainId,ensAddress:a.ensAddress,_defaultProvider:a._defaultProvider||null}}let e=Ho[n.name];if(!e)return typeof n.chainId!="number"&&Df.throwArgumentError("invalid network chainId","network",n),n;n.chainId!==0&&n.chainId!==e.chainId&&Df.throwArgumentError("network chainId mismatch","network",n);let t=n._defaultProvider||null;return t==null&&e._defaultProvider&&(Hx(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 Lf="web/5.7.1";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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})};function Uf(n,e){return qx(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 Gx=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},In=new E(Lf);function Vf(n){return new Promise(e=>{setTimeout(e,n)})}function Da(n,e){if(n==null)return null;if(typeof n=="string")return n;if(aa(n)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return Jt(n)}catch{}return K(n)}return n}function zx(n){return ve(n.replace(/%([0-9a-f][0-9a-f])/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))}function bl(n,e,t){let a=typeof n=="object"&&n.throttleLimit!=null?n.throttleLimit:12;In.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;In.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"},f=!1,x=2*60*1e3;if(typeof n=="string")l=n;else if(typeof n=="object"){if((n==null||n.url==null)&&In.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&&(f=!0);if(p.allowGzip=!!n.allowGzip,n.user!=null&&n.password!=null){l.substring(0,6)!=="https:"&&n.allowInsecureAuthentication!==!0&&In.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 "+Xi(ve(O))}}n.skipFetchSetup!=null&&(p.skipFetchSetup=!!n.skipFetchSetup),n.fetchOptions!=null&&(p.fetchOptions=we(n.fetchOptions))}let I=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),_=l?l.match(I):null;if(_)try{let O={statusCode:200,statusMessage:"OK",headers:{"content-type":_[1]||"text/plain"},body:_[2]?Yi(_[3]):zx(_[3])},U=O.body;return t&&(U=t(O.body,O)),Promise.resolve(U)}catch(O){In.throwError("processing response error",E.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(M,J){x&&(O=setTimeout(()=>{O!=null&&(O=null,J(In.makeError("timeout",E.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 Gx(this,void 0,void 0,function*(){for(let O=0;O=300)&&(S.cancel(),In.throwError("bad response",E.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 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){In.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 n=="string"?{url:n}:we(n);r.headers?Object.keys(r.headers).filter(o=>o.toLowerCase()==="content-type").length!==0||(r.headers=we(r.headers),r.headers["content-type"]="application/json"):r.headers={"content-type":"application/json"},n=r}return bl(n,i,a)}function Rn(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,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(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()&&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(f){s()&&a(f)})}p()})}var kl=wn(Gf());var ke="providers/5.7.2";var os=new E(ke),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),f=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(f),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=we(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 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():os.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 ce(e)}callAddress(e){if(!ie(e,32))return null;let t=ce(Ce(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 a=this.hex(e,t);return Nt(a)!==32?os.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 me(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 So(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&&os.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=a,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 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 Tl(n){return n&&typeof n.isCommunityResource=="function"}function us(n){return Tl(n)&&n.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(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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},he=new E(ke),Zx=10;function Kf(n){return n==null?"null":(Nt(n)!==32&&he.throwArgumentError("invalid topic","topic",n),n.toLowerCase())}function Wf(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[Kf(i)]=!0});let a=Object.keys(t);return a.sort(),a.join("|")}else return Kf(e)}).join("&")}function e5(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 br(n){if(typeof n=="string"){if(n=n.toLowerCase(),Nt(n)===32)return"tx:"+n;if(n.indexOf(":")===-1)return n}else{if(Array.isArray(n))return"filter:*:"+Wf(n);if(go.isForkEvent(n))throw he.warn("not implemented"),new Error("not implemented");if(n&&typeof n=="object")return"filter:"+(n.address||"*")+":"+Wf(n.topics||[])}throw new Error("invalid event - "+n)}function ds(){return new Date().getTime()}function Jf(n){return new Promise(e=>{setTimeout(e,n)})}var t5=["block","network","pending","poll"],Al=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=e5(e[2]),i={};return a.length>0&&(i.topics=a),t&&t!=="*"&&(i.address=t),i}pollable(){return this.tag.indexOf(":")>=0||t5.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 vl(n){return me(F.from(n).toHexString(),32)}function $f(n){return ya.encode(ye([n,Ce(Yt(Yt(n)),0,4)]))}var Xf=new RegExp("^(ipfs)://(.*)$","i"),Qf=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),Xf,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Wo(n,e){try{return Jt(ls(n,e))}catch{}return null}function ls(n,e){if(n==="0x")return null;let t=F.from(Ce(n,e,e+32)).toNumber(),a=F.from(Ce(n,t,t+32)).toNumber();return Ce(n,t+32,t+32+a)}function wl(n){return n.match(/^ipfs:\/\/ipfs\//i)?n=n.substring(12):n.match(/^ipfs:\/\//i)?n=n.substring(7):he.throwArgumentError("unsupported IPFS format","link",n),`https://gateway.ipfs.io/ipfs/${n}`}function Yf(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 a5(n){if(n.length%32===0)return n;let e=new Uint8Array(Math.ceil(n.length/32)*32);return e.set(n),e}function Zf(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:_t([e,Ca(this.name),t||"0x"])},i=!1;(yield this.supportsWildcard())&&(i=!0,a.data=_t(["0x9061b923",Zf([Jr(this.name),a.data])]));try{let r=yield this.provider.call(a);return j(r).length%32===4&&he.throwError("resolver threw error",E.errors.CALL_EXCEPTION,{transaction:a,data:r}),i&&(r=ls(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?ls(a,0):null})}_getAddress(e,t){let a=n5[String(e)];if(a==null&&he.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 $f(ye([[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 $f(ye([[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=kl.default.toWords(i.slice(2));return o.unshift(s),kl.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===$i?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",vl(e));if(t==null||t==="0x")return null;let a=this._getAddress(e,t);return a==null&&he.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 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([vl(64),vl(t.length),t]),t.length%32!==0&&(t=ye([t,me("0x",32-e.length%32)]));let a=yield this._fetchBytes("0x59d1d43c",K(t));return a==null||a==="0x"?null:Jt(a)})}},_l=null,i5=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",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 Rn(()=>this._ready().then(e=>e,e=>{if(!(e.code===E.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return _l==null&&(_l=new X),_l}static getNetwork(e){return rs(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 Sn({url:p,errorPassThrough:!0},f,(_,v)=>(_.status=v.statusCode,_));if(x.data)return x.data;let I=x.message||"unknown error";if(x.status>=400&&x.status<500)return he.throwError(`response not found during CCIP fetch: ${I}`,E.errors.SERVER_ERROR,{url:l,errorMessage:I});s.push(I)}return he.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(ds()-r.respTime<=e)return r.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}let t=ds(),a=Ie({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=ds();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=i5++,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)he.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${a})`),this.emit("error",he.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 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 Jf(0),this._network;let a=he.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=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,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,f=function(){return p?!0:(p=!0,l.forEach(I=>{I()}),!1)},x=I=>{I.confirmations{this.removeListener(e,x)}),i){let I=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)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),l.push(()=>{this.removeListener("block",v)})}if(typeof a=="number"&&a>0){let I=setTimeout(()=>{f()||o(he.makeError("timeout exceeded",E.errors.TIMEOUT,{timeout:a}))},a);I.unref&&I.unref(),l.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",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 Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getBalance",a);try{return F.from(i)}catch(r){return he.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 Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getTransactionCount",a);try{return F.from(i).toNumber()}catch(r){return he.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 Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getCode",a);try{return K(i)}catch(r){return he.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 Ie({address:this._getAddress(e),blockTag:this._getBlockTag(a),position:Promise.resolve(t).then(s=>Ln(s))}),r=yield this.perform("getStorageAt",i);try{return K(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,a){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&&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&&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=>K(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?K(r):null))}),this.formatter.transactionRequest(yield Ie(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 Ie(t))})}_call(e,t,a){return ue(this,void 0,void 0,function*(){a>=Zx&&he.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"&&Nt(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(),f=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&&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 Rn(()=>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 Rn(()=>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 Ie({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&&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 a=yield this._getResolver(t,"getResolver");if(a!=null){let i=new gr(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||he.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"+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(a){if(ie(e))throw a}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",a=yield this._getResolver(t,"lookupAddress");if(a==null)return null;let i=Wo(yield this.call({to:a,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 gr(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=Wo(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 a=yield t.getAvatar();return a==null?null:a.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,a){let i=new Al(br(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=br(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=br(e);return this._events.filter(a=>a.tag===t).length}listeners(e){if(e==null)return this._events.map(a=>a.listener);let t=br(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=br(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=br(e);this._events=this._events.filter(i=>i.tag!==a?!0:(t.push(i),!1))}return t.forEach(a=>{this._stopEvent(a)}),this}};var ba=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},At=new E(ke),r5=["call","estimateGas"];function ys(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=ys(n[t],e);if(a)return a}return null}if(typeof n=="string")try{return ys(JSON.parse(n),e)}catch{}return null}function tc(n,e,t){let a=t.transaction||t.signedTransaction;if(n==="call"){let r=ys(e,!0);if(r)return r.data;At.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=ys(e.body,!1);r==null&&(r=ys(e,!1)),r&&At.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)&&At.throwError("insufficient funds for intrinsic transaction cost",E.errors.INSUFFICIENT_FUNDS,{error:e,method:n,transaction:a}),i.match(/nonce (is )?too low/i)&&At.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)&&At.throwError("replacement fee too low",E.errors.REPLACEMENT_UNDERPRICED,{error:e,method:n,transaction:a}),i.match(/only replay-protected/i)&&At.throwError("legacy pre-eip-155 transactions not supported",E.errors.UNSUPPORTED_OPERATION,{error:e,method:n,transaction:a}),r5.indexOf(n)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&At.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 ec(n){return new Promise(function(e){setTimeout(e,n)})}function s5(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 ps(n){return n&&n.toLowerCase()}var El={},Tr=class extends St{constructor(e,t,a){if(super(),e!==El)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)):At.throwArgumentError("invalid address or index","addressOrIndex",a)}connect(e){return At.throwError("cannot alter JSON-RPC Signer connection",E.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new Ml(El,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&&At.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(a=>(a&&(a=a.toLowerCase()),a));if(e.gasLimit==null){let a=we(e);a.from=t,e.gasLimit=this.provider.estimateGas(a)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(a=>ba(this,void 0,void 0,function*(){if(a==null)return null;let i=yield this.provider.resolveName(a);return i==null&&At.throwArgumentError("provided ENS name resolves to null","tx.to",a),i}))),Ie({tx:Ie(e),sender:t}).then(({tx:a,sender:i})=>{a.from!=null?a.from.toLowerCase()!==i&&At.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)&&At.throwError("user rejected transaction",E.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:a}),tc("sendTransaction",s,r)))})}signTransaction(e){return At.throwError("signing transactions is unsupported",E.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),a=yield this.sendUncheckedTransaction(e);try{return yield Rn(()=>ba(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 ba(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(e):e,a=yield this.getAddress();try{return yield this.provider.send("personal_sign",[K(t),a.toLowerCase()])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&At.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"signMessage",from:a,messageData:e}),i}})}_legacySignMessage(e){return ba(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(e):e,a=yield this.getAddress();try{return yield this.provider.send("eth_sign",[a.toLowerCase(),K(t)])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&At.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:a,messageData:e}),i}})}_signTypedData(e,t,a){return ba(this,void 0,void 0,function*(){let i=yield bt.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(bt.getPayload(i.domain,t,i.value))])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&At.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 ba(this,void 0,void 0,function*(){let t=this.provider,a=yield this.getAddress();return t.send("personal_unlockAccount",[a.toLowerCase(),e,null])})}},Ml=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:a=>this.provider.waitForTransaction(t,a)}))}},o5={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0},Xt=class extends Zn{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=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 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(a){return At.throwError("could not detect network",E.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:a})}}return At.throwError("could not detect network",E.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new Tr(El,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:ct(a),provider:this});let i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];let r=Sn(this.connection,JSON.stringify(a),s5).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",[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 a=mt(this.constructor,"hexlifyTransaction");return["eth_call",[a(t.transaction,{from:!0}),t.blockTag]]}case"estimateGas":{let a=mt(this.constructor,"hexlifyTransaction");return["eth_estimateGas",[a(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 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=we(t),t.transaction=we(i),delete t.transaction.type)}}let a=this.prepareRequest(e,t);a==null&&At.throwError(e+" not implemented",E.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(a[0],a[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(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 ec(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=we(o5);if(t)for(let r in t)t[r]&&(a[r]=!0);Gi(e,a);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]=K(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 E(ke);vr=function(){e.throwError("WebSockets not supported in this environment",E.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var Cl=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Jo=new E(ke),u5=1,ga=class extends Xt{constructor(e,t){t==="any"&&Jo.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 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 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){Jo.throwError("cannot reset events block on WebSocketProvider",E.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(e){Jo.throwError("cannot set polling interval on WebSocketProvider",E.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return Cl(this,void 0,void 0,function*(){return null})}set polling(e){!e||Jo.throwError("cannot set polling on WebSocketProvider",E.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(e,t){let a=u5++;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 Cl(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 Cl(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 d5=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},fs=new E(ke),cs=class extends Xt{detectNetwork(){let e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return d5(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",E.errors.UNKNOWN_ERROR,{}),this._network==null&&(B(this,"_network",t),this.emit("network",t,null))),t})}},It=class extends cs{constructor(e,t){fs.checkAbstract(new.target,It),e=mt(new.target,"getNetwork")(e),t=mt(new.target,"getApiKey")(t);let a=mt(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(){fs.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(e){return fs.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 fs.throwError("not implemented; sub-classes must override getUrl",E.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}};var nc=new E(ke),$o="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC",ms=class extends ga{constructor(e,t){let a=new wr(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===$o}},wr=class extends It{static getWebSocketProvider(e,t){return new ms(e,t)}static getApiKey(e){return e==null?$o:(e&&typeof e!="string"&&nc.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:nc.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+a+t,throttleCallback:(i,r)=>(t===$o&&Xn(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===$o}};var l5=new E(ke),Qo="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function p5(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 l5.throwArgumentError("unsupported network","name",n)}var hs=class extends It{isCommunityResource(){return this.apiKey===Qo}static getApiKey(e){return e??Qo}static getUrl(e,t){t==null&&(t=Qo);let a={allowGzip:!0,url:"https://"+p5(e.name)+t,throttleCallback:(i,r)=>(t.apiKey===Qo&&Xn(),Promise.resolve(!0))};return t.projectSecret!=null&&(a.user="",a.password=t.projectSecret),a}};var y5=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},ac=new E(ke),xs=class extends It{static getApiKey(e){return e!=null&&ac.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:ac.throwArgumentError("unsupported network","network",arguments[0])}return a}perform(e,t){let a=Object.create(null,{perform:{get:()=>super.perform}});return y5(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 Yo=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Oa=new E(ke);function ic(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=Ln(K(a)):t==="accessList"?a="["+sn(a).map(i=>`{address:"${i.address}",storageKeys:["${i.storageKeys.join('","')}"]}`).join(",")+"]":a=K(a),e[t]=a)}return e}function f5(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 rc(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 sc(n){if(n==="pending")throw new Error("pending not supported");return n==="latest"?n:parseInt(n.substring(2),16)}function Il(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;Oa.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/)&&Oa.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/)&&Oa.throwError("nonce has already been used",E.errors.NONCE_EXPIRED,{error:e,method:n,transaction:t}),a.match(/another transaction with same nonce/)&&Oa.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/)&&Oa.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 bs=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 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 Yo(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"?rc:f5;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 Sn(o,l,s||rc);return this.emit("debug",{action:"response",request:i,response:ct(p),provider:this}),p})}detectNetwork(){return Yo(this,void 0,void 0,function*(){return this.network})}perform(e,t){let a=Object.create(null,{perform:{get:()=>super.perform}});return Yo(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=ic(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=ic(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=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",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)&&Oa.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 eu=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},bi=new E(ke);function Xo(){return new Date().getTime()}function oc(n){let e=null;for(let t=0;te?null:(a+i)/2}function _r(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=>_r(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=_r(a),JSON.stringify(t)+":"+a}).join(",")+"}"}throw new Error("unknown value type: "+typeof n)}var c5=1;function dc(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 m5=[E.errors.CALL_EXCEPTION,E.errors.INSUFFICIENT_FUNDS,E.errors.NONCE_EXPIRED,E.errors.REPLACEMENT_UNDERPRICED,E.errors.UNPREDICTABLE_GAS_LIMIT],h5=["address","args","errorArgs","errorSignature","method","transaction"];function Zo(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 x5(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 b5(n,e,t){let a=_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>=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 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":a=function(i){return i==null?null:(i=we(i),i.confirmations=-1,_r(i))};break;case"getBlock":t.includeTransactions?a=function(i){return i==null?null:(i=we(i),i.transactions=i.transactions.map(r=>(r=we(r),r.confirmations=-1,r)),_r(i))}:a=function(i){return i==null?null:_r(i)};break;default:throw new Error("unknown method: "+e)}return x5(a,n.quorum)}function gs(n,e){return eu(this,void 0,void 0,function*(){let t=n.provider;return t.blockNumber!=null&&t.blockNumber>=e||e===-1?t:Rn(()=>new Promise((a,i)=>{setTimeout(function(){return t.blockNumber>=e?a(t):n.cancelled?a(null):a(void 0)},0)}),{oncePoll:t})})}function g5(n,e,t,a){return eu(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 gs(n,e)),i[t](a.address,a.blockTag||"latest");case"getStorageAt":return a.blockTag&&ie(a.blockTag)&&(i=yield gs(n,e)),i.getStorageAt(a.address,a.position,a.blockTag||"latest");case"getBlock":return a.blockTag&&ie(a.blockTag)&&(i=yield gs(n,e)),i[a.includeTransactions?"getBlockWithTransactions":"getBlock"](a.blockTag||a.blockHash);case"call":case"estimateGas":return a.blockTag&&ie(a.blockTag)&&(i=yield gs(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 gs(n,e)),i.getLogs(r)}}return bi.throwError("unknown method error",E.errors.UNKNOWN_ERROR,{method:t,params:a})})}var Ts=class extends Zn{constructor(e,t){e.length===0&&bi.throwArgumentError("missing providers","providers",e);let a=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=we(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)&&bi.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&&bi.throwArgumentError("quorum will always fail; larger than total weight","quorum",t);let r=oc(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 eu(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 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=Xo(),p=i.filter(_=>_.runner&&l-_.start<_.stallTimeout).reduce((_,v)=>_+v.weight,0);for(;p{_.staller=null}),_.runner=g5(_,r,e,t).then(S=>{_.done=!0,_.result=S,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Zo(_,Xo()),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(_,Xo()),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 _=a(x);if(_!==void 0)return i.forEach(v=>{v.staller&&v.staller.cancel(),v.cancelled=!0}),_;o||(yield dc(100).getPromise()),o=!1}let I=i.reduce((_,v)=>{if(!v.done||v.error==null)return _;let S=v.error.code;return m5.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={};h5.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",E.errors.SERVER_ERROR,{method:e,params:t,results:i.map(l=>Zo(l)),provider:this})})}};var Sl=null;var tu=new E(ke),vs="84842078b09946638c03157f83405213",ws=class extends ga{constructor(e,t){let a=new kr(e,t),i=a.connection;i.password&&tu.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===vs}},kr=class extends It{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?(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 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:tu.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===vs&&Xn(),Promise.resolve(!0))};return t.projectSecret!=null&&(i.user="",i.password=t.projectSecret),i}isCommunityResource(){return this.projectId===vs}};var nu=class extends Xt{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:ct(o),provider:this}),Sn(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 I=new Error(x.error.message);I.code=x.error.code,I.data=x.error.data,p.reject(I)}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 Rl=new E(ke),T5="ETHERS_JS_SHARED",_s=class extends It{static getApiKey(e){return e&&typeof e!="string"&&Rl.throwArgumentError("invalid apiKey","apiKey",e),e||T5}static getUrl(e,t){Rl.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:Rl.throwArgumentError("unsupported network","network",arguments[0])}return a+"?apiKey="+t}};var lc=new E(ke),pc="62e1ad51b37b8e00394bda3b",ks=class extends It{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 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:lc.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===pc}};var yc=new E(ke),v5=1;function fc(n,e){let t="Web3LegacyFetcher";return function(a,i){let r={method:a,params:i,id:v5++,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 w5(n){return function(e,t){t==null&&(t=[]);let a={method:e,params:t};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:ct(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 As=class extends Xt{constructor(e,t){e==null&&yc.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=w5(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),a||(a="unknown:")),super(a,t),B(this,"jsonRpcFetchFunc",i),B(this,"provider",r)}send(e,t){return this.jsonRpcFetchFunc(e,t)}};var cc=new E(ke);function au(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 Xt(n);case"ws":case"wss":return new ga(n);default:cc.throwArgumentError("unsupported URL scheme","network",n)}}let t=rs(n);return(!t||!t._defaultProvider)&&cc.throwError("unsupported getDefaultProvider network",E.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:n}),t._defaultProvider({FallbackProvider:Ts,AlchemyProvider:wr,AnkrProvider:hs,CloudflareProvider:xs,EtherscanProvider:bs,InfuraProvider:kr,JsonRpcProvider:Xt,NodesmithProvider:_s,PocketProvider:ks,Web3Provider:As,IpcProvider:null},e)}var ne={};ji(ne,{AbiCoder:()=>Qi,ConstructorFragment:()=>Dt,ErrorFragment:()=>tn,EventFragment:()=>Ht,FormatTypes:()=>ge,Fragment:()=>qt,FunctionFragment:()=>Ot,HDNode:()=>Ct,Indexed:()=>oa,Interface:()=>Ia,LogDescription:()=>er,Logger:()=>E,ParamType:()=>pt,RLP:()=>Zs,SigningKey:()=>cn,SupportedAlgorithm:()=>Qn,TransactionDescription:()=>tr,TransactionTypes:()=>Io,UnicodeNormalizationForm:()=>Gt,Utf8ErrorFuncs:()=>fo,Utf8ErrorReason:()=>Bt,_TypedDataEncoder:()=>bt,_fetchData:()=>bl,_toEscapedUtf8String:()=>_d,accessListify:()=>sn,arrayify:()=>j,base58:()=>ya,base64:()=>Id,checkProperties:()=>Gi,checkResultErrors:()=>Ki,commify:()=>wc,computeAddress:()=>mn,computeHmac:()=>fa,computePublicKey:()=>Yr,concat:()=>ye,deepCopy:()=>ct,defaultAbiCoder:()=>Kr,defaultPath:()=>ca,defineReadOnly:()=>B,dnsEncode:()=>Jr,entropyToMnemonic:()=>xi,fetchJson:()=>Sn,formatBytes32String:()=>kd,formatEther:()=>_c,formatUnits:()=>Pl,getAccountPath:()=>cf,getAddress:()=>ce,getContractAddress:()=>ui,getCreate2Address:()=>My,getIcapAddress:()=>Ey,getJsonWalletAddress:()=>fl,getStatic:()=>mt,hashMessage:()=>Zi,hexConcat:()=>_t,hexDataLength:()=>Nt,hexDataSlice:()=>Ce,hexStripZeros:()=>yd,hexValue:()=>Ln,hexZeroPad:()=>me,hexlify:()=>K,id:()=>nn,isAddress:()=>Ay,isBytes:()=>on,isBytesLike:()=>aa,isHexString:()=>ie,isValidMnemonic:()=>ff,isValidName:()=>Rd,joinSignature:()=>Br,keccak256:()=>fe,mnemonicToEntropy:()=>cr,mnemonicToSeed:()=>sl,namehash:()=>Ca,nameprep:()=>Cd,parseBytes32String:()=>Ad,parseEther:()=>kc,parseTransaction:()=>So,parseUnits:()=>Nl,poll:()=>Rn,randomBytes:()=>Yn,recoverAddress:()=>yi,recoverPublicKey:()=>Co,resolveProperties:()=>Ie,ripemd160:()=>es,serializeTransaction:()=>Xr,sha256:()=>Yt,sha512:()=>nl,shallowCopy:()=>we,shuffled:()=>as,solidityKeccak256:()=>xc,solidityPack:()=>iu,soliditySha256:()=>bc,splitSignature:()=>Un,stripZeros:()=>Zt,toUtf8Bytes:()=>ve,toUtf8CodePoints:()=>Ma,toUtf8String:()=>Jt,verifyMessage:()=>Rf,verifyTypedData:()=>Pf,zeroPad:()=>ii});var mc="solidity/5.7.0";var _5=new RegExp("^bytes([0-9]+)$"),k5=new RegExp("^(u?int)([0-9]*)$"),A5=new RegExp("^(.*)\\[([0-9]*)\\]$"),E5="0000000000000000000000000000000000000000000000000000000000000000",Ar=new E(mc);function hc(n,e,t){switch(n){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 a=n.match(k5);if(a){let i=parseInt(a[2]||"256");return(a[2]&&String(i)!==a[2]||i%8!==0||i===0||i>256)&&Ar.throwArgumentError("invalid number type","type",n),t&&(i=256),e=F.from(e).toTwos(i),ii(e,i/8)}if(a=n.match(_5),a){let i=parseInt(a[1]);return(String(i)!==a[1]||i===0||i>32)&&Ar.throwArgumentError("invalid bytes type","type",n),j(e).byteLength!==i&&Ar.throwArgumentError(`invalid value for ${n}`,"value",e),t?j((e+E5).substring(0,66)):e}if(a=n.match(A5),a&&Array.isArray(e)){let i=a[1];parseInt(a[2]||String(e.length))!=e.length&&Ar.throwArgumentError(`invalid array length for ${n}`,"value",e);let s=[];return e.forEach(function(o){s.push(hc(i,o,!0))}),ye(s)}return Ar.throwArgumentError("invalid type","type",n)}function iu(n,e){n.length!=e.length&&Ar.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);let t=[];return n.forEach(function(a,i){t.push(hc(a,e[i]))}),K(ye(t))}function xc(n,e){return fe(iu(n,e))}function bc(n,e){return Yt(iu(n,e))}var gc="units/5.7.0";var Tc=new E(gc),vc=["wei","kwei","mwei","gwei","szabo","finney","ether"];function wc(n){let e=String(n).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||n==="."||n==="-.")&&Tc.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 Pl(n,e){if(typeof e=="string"){let t=vc.indexOf(e);t!==-1&&(e=3*t)}return qi(n,e??18)}function Nl(n,e){if(typeof n!="string"&&Tc.throwArgumentError("value must be a string","value",n),typeof e=="string"){let t=vc.indexOf(e);t!==-1&&(e=3*t)}return dn(n,e??18)}function _c(n){return Pl(n,18)}function kc(n){return Nl(n,18)}var ru="ethers/5.7.2";var Ac=new E(ru);try{let n=window;n._ethers==null&&(n._ethers=Dl)}catch{}var Pn;(function(n){n.Mainnet="Mainnet",n.Custom="Custom",n.Gnosis="Xdai",n.Goerli="Goerli",n.Xdai="Xdai",n.XdaiQa="XdaiQa",n.ArbitrumOne="ArbitrumOne",n.ArbitrumSepolia="ArbitrumSepolia"})(Pn||(Pn={}));var Ec;(function(n){n[n.Custom=0]="Custom",n[n.Mainnet=1]="Mainnet",n[n.Goerli=5]="Goerli",n[n.Gnosis=100]="Gnosis",n[n.Xdai=100]="Xdai",n[n.XdaiQa=100]="XdaiQa",n[n.ArbitrumSepolia=421614]="ArbitrumSepolia",n[n.ArbitrumOne=42161]="ArbitrumOne"})(Ec||(Ec={}));var su;(function(n){n.Mainnet="0x5346D0f80e2816FaD329F2c140c870ffc3c3E2Ef",n.Goerli="0x79073fc2117dD054FCEdaCad1E7018C9CbE3ec0B",n.Xdai="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.XdaiQa="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.Custom="",n.ArbitrumOne="0xcccccdcc0ccf6c708d860e19353c5f9a49accccc",n.ArbitrumSepolia="0x7777494e3d8cce0D3570E21FEf820F9Fee077777"})(su||(su={}));var Er;(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",n.ArbitrumOne="https://app.colony.io/reputation/arbitrum-one",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/reputation/arbitrum-sepolia"})(Er||(Er={}));var ou;(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="",n.ArbitrumOne="https://app.colony.io/metatransaction/arbitrum-one",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/metatransaction/arbitrum-sepolia"})(ou||(ou={}));var Es;(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="",n.ArbitrumOne="https://app.colony.io/public-rpc/",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/public-rpc/"})(Es||(Es={}));var Ms;(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",n.ArbitrumOne=".colony.joincolony.arbitrum",n.ArbitrumSepolia=".colony.joincolony.sepolia"})(Ms||(Ms={}));var Cs;(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",n.ArbitrumOne=".user.joincolony.arbitrum",n.ArbitrumSepolia=".user.joincolony.sepolia"})(Cs||(Cs={}));var Is;(function(n){let e;(function(i){i.ETH="0x0000000000000000000000000000000000000000",i.CLNY="0x3E828ac5C480069D4765654Fb4b8733b910b13b2",i.USDC="0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"})(e=n.Mainnet||(n.Mainnet={}));let t;(function(i){i.XDAI="0x0000000000000000000000000000000000000000",i.CLNY="0xc9B6218AffE8Aba68a13899Cbf7cF7f14DDd304C",i.USDC="0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83"})(t=n.Gnosis||(n.Gnosis={}));let a;(function(i){i.ETH="0x0000000000000000000000000000000000000000",i.CLNY="0xcccccdcc0ccf6c708d860e19353c5f9a49accccc",i.USDC="0xaf88d065e77c8cC2239327C5EDb3A432268e5831"})(a=n.ArbitrumOne||(n.ArbitrumOne={}))})(Is||(Is={}));var _e;(function(n){n[n.RootDomain=1]="RootDomain",n[n.RootTeam=1]="RootTeam",n[n.RootPot=1]="RootPot",n[n.SkillIgnore=0]="SkillIgnore"})(_e||(_e={}));var zt;(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"})(zt||(zt={}));var Bl="0x12345678",Ol;(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"})(Ol||(Ol={}));var vt;(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"})(vt||(vt={}));var Ae;(function(n){n.FundingQueue="FundingQueue",n.IVotingReputation="IVotingReputation",n.MultisigPermissions="MultisigPermissions",n.OneTxPayment="OneTxPayment",n.ReputationBootstrapper="ReputationBootstrapper",n.StagedExpenditure="StagedExpenditure",n.StakedExpenditure="StakedExpenditure",n.StreamingPayments="StreamingPayments",n.TokenSupplier="TokenSupplier",n.VotingReputation="VotingReputation"})(Ae||(Ae={}));var Fl=[{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(Fl)}static connect(e,t){return new oe(e,Fl,t)}};xe(gi,"abi",Fl);var Ll=[{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"}],Ti=class{static createInterface(){return new ne.Interface(Ll)}static connect(e,t){return new oe(e,Ll,t)}};xe(Ti,"abi",Ll);var Mc=(n,e)=>{throw new Error(`${e}: ${n}`)},uu=n=>n!=null;var{keccak256:C5,toUtf8Bytes:I5}=ne,{MaxUint256:S5}=ht;var Ul=n=>ne.formatEther(n);var Vl=n=>{let e=n.reduce((t,a)=>t|1<{let e=F.from(n);return[...Array(vt.LAST_ROLE).keys()].map(t=>e.shr(t).mask(1).eq(1)?t:null).filter(uu)},vi=async(n,e,t,a)=>{if(F.from(t).eq(F.from(a)))return S5;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)},Ba=n=>C5(I5(n));var Mr=async(n,e)=>(await Ti.connect(n,e).version()).toNumber(),jl=(n,e)=>n.map(t=>{try{return e.parseLog(t)}catch{return null}}).filter(uu);var{hexDataSlice:Hl}=ne,{MaxUint256:R5}=ht,Cc=n=>{let e=Hl(n,0,3),t=F.from(Hl(n,4,35)),a=F.from(Hl(n,36,67));return{sig:e,permissionDomainId:t,childSkillIndex:a}},Ic=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),R5,r];let o=F.from(_e.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 vi(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]},P5=async(n,e,t,a,i)=>{let r=await Promise.all(a.map(s=>Ic(n,e,t,s,i)));for(let s=0;sArray.isArray(a)?a.length===1?ta(n,e,t,a[0],i):P5(n,e,t,a,i):Ic(n,e,t,a,i);var{MaxUint256:Sc}=ht,{AddressZero:N5}=ht;async function D5(n,e){let t;try{return t=await n.getCapabilityRoles(ne.hexZeroPad(e,4)),du(t)}catch{return[]}}async function Ss(n,e,t,a,i,r,s){let o,{skillId:l}=await e.getDomain(i),{sig:p,permissionDomainId:f,childSkillIndex:x}=Cc(s),I=gi.connect(r,a.signer||a.provider),_=await D5(I,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 ${_e.RootDomain}`);o=Sc}else{let{skillId:U}=await e.getDomain(f),H=await n.getChildSkillId(U,x);if(H.eq(l))o=Sc;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,N5);return{actionCid:o,key:v,value:S,branchMask:L,siblings:O}}var{AddressZero:O5}=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,a){this.colony=t,this.network=e;let i=a?.network||Pn.ArbitrumOne;this.endpointUrl=a?.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,a){let i=await this.getBaseEndpoint(a),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,a){let i=await this.getBaseEndpoint(a),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 a=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${a}/${i}`;return na.fetchReputation(r)}async getTotalReputation(e,t){let a=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${a}/${i}/${O5}/noProof`,s=await na.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 Et=n=>Array.from(Array(n-1)).map((e,t)=>t+1);var Rc=10,yk=Et(Rc),Pc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Nc=Rc-1;var Dc=3,mk=Et(Dc),Oc={1:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],2:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]},Bc=Dc-1;var Fc=10,bk=Et(Fc),Lc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Uc=Fc-1;var Vc=7,vk=Et(Vc),jc={1:[],2:[],3:[],4:[],5:[],6:[]},Hc=Vc-1;var qc=8,kk=Et(qc),Gc={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3],6:[1,2,3],7:[1,2,3]},zc=qc-1;var Kc=5,Mk=Et(Kc),Wc={1:[1,2,3,4,5,6,7,8,9,10,11,12,13],2:[1,2,3,4,5,6,7,8,9,10,11,12,13],3:[1,2,3,4,5,6,7,8,9,10,11,12,13],4:[1,2,3,4,5,6,7,8,9,10,11,12,13]},Jc=Kc-1;var $c=7,Sk=Et($c),Qc={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3],6:[1,2,3]},Yc=$c-1;var Xc=10,Nk=Et(Xc),Zc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},em=Xc-1;var tm=14,Bk=Et(tm),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],11:[1,2,3,4,5,6],12:[1,2,3,4,5,6],13:[1,2,3,4,5,6]},Gl=tm-1;var nm=18,B5=Et(nm),Uk=nm-1;var F5=(n,e)=>{switch(n){case Ae.FundingQueue:return Pc[e];case Ae.IVotingReputation:return ql[e];case Ae.MultisigPermissions:return Oc[e];case Ae.OneTxPayment:return Lc[e];case Ae.ReputationBootstrapper:return jc[e];case Ae.StagedExpenditure:return Wc[e];case Ae.StakedExpenditure:return Gc[e];case Ae.StreamingPayments:return Qc[e];case Ae.TokenSupplier:return Zc[e];case Ae.VotingReputation:return ql[e];default:return Mc(n,"Could not find extension with name")}},wi=(n,e,t)=>{let a=F5(n,e);return!!a&&!a.includes(t)};var L5={[Ae.FundingQueue]:Nc,[Ae.IVotingReputation]:Gl,[Ae.MultisigPermissions]:Bc,[Ae.OneTxPayment]:Uc,[Ae.ReputationBootstrapper]:Hc,[Ae.StagedExpenditure]:Jc,[Ae.StakedExpenditure]:zc,[Ae.StreamingPayments]:Yc,[Ae.TokenSupplier]:em,[Ae.VotingReputation]:Gl};var k6=wn(am(),1);var yp=wn(v6(),1);var Re;(function(n){n.DEFAULT="default",n.Annotation="annotation",n.Colony="colony",n.Decision="decision",n.Domain="domain",n.Misc="misc"})(Re||(Re={}));var pp=2,lp;(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"})(lp||(lp={}));var w6=n=>`Validation error(s): ${n.map(t=>`Error in ${t.path}. Seen: ${t.value}, expected: ${t.expected}`).join(` -`)}`,Yb=n=>({...n,isWhitelistActivated:n.isWhitelistActivated||!1,colonySafes:n.colonySafes||[],colonyTokens:n.colonyTokens||[],verifiedAddresses:n.verifiedAddresses||[]}),fp=(n,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&&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"?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=yp.default.validate.report(s);r(i)===!1&&((p,f,x=!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}))&&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"?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: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}})(n);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 a=w6(t.errors);throw new Error(a)};var _6=(n,e)=>{let t=n===Re.Colony?Yb(e):e,a=(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&&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"?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=yp.default.validate.report(s);r(i)===!1&&((p,f,x=!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}))&&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"?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: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}})({name:n,data:t,version:pp});if(!a.success){let i=w6(a.errors);throw new Error(i)}return a.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,k6.default)(fetch,{headers:{Accept:"application/json"},retryOn:[404,503],retries:3,retryDelay:5e3}),Ls={[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]:""},Pr=class{adapter;constructor(e){this.adapter=e||new mp}static eventSupportsMetadata(e){return!!Object.keys(Ls).includes(e)}async getMetadata(e,t){let a=this.adapter.getIpfsUrl(e),r=await(await hp(a)).json();return fp(r,t)}async getMetadataForEvent(e,t){let a=this.adapter.getIpfsUrl(t),r=await(await hp(a)).json(),s=Object.entries(Ls).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),a=await hp(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=_6(e,t),i=JSON.stringify(a);return this.adapter.uploadJson(i)}};var dE=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"}],Ci=class{static createInterface(){return new ne.Interface(gp)}static connect(e,t){return new oe(e,gp,t)}};xe(Ci,"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:"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:"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:[{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:"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:"returnData",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",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:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],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:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"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:[],name:"unlock",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"}],A6="0x60c060405234801561001057600080fd5b5060405161205738038061205783398101604081905261002f91610307565b60008060018161003d6101ab565b6001600160a01b031681526020810191909152604001600090812091909155556100656101ab565b600480546001600160a01b0319166001600160a01b039290921691909117905561008d6101ab565b6001600160a01b03167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a260066100ce8482610413565b5060056100db8382610413565b5060ff81166080526007805460ff1916600117905560405146907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f90610123906006906104d1565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051601f19818403018152919052805160209091012060a0525061054692505050565b60003633301480156101be575060348110155b1561024757600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e881146102365733935050505090565b5001516001600160a01b0316919050565b3391505090565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261027557600080fd5b81516001600160401b0381111561028e5761028e61024e565b604051601f8201601f19908116603f011681016001600160401b03811182821017156102bc576102bc61024e565b6040528181528382016020018510156102d457600080fd5b60005b828110156102f3576020818601810151838301820152016102d7565b506000918101602001919091529392505050565b60008060006060848603121561031c57600080fd5b83516001600160401b0381111561033257600080fd5b61033e86828701610264565b602086015190945090506001600160401b0381111561035c57600080fd5b61036886828701610264565b925050604084015160ff8116811461037f57600080fd5b809150509250925092565b600181811c9082168061039e57607f821691505b6020821081036103be57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561040e57806000526020600020601f840160051c810160208510156103eb5750805b601f840160051c820191505b8181101561040b57600081556001016103f7565b50505b505050565b81516001600160401b0381111561042c5761042c61024e565b6104408161043a845461038a565b846103c4565b6020601f821160018114610474576000831561045c5750848201515b600019600385901b1c1916600184901b17845561040b565b600084815260208120601f198516915b828110156104a45787850151825560209485019460019092019101610484565b50848210156104c25786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b60008083546104df8161038a565b6001821680156104f6576001811461050b5761053b565b60ff198316865281151582028601935061053b565b86600052602060002060005b8381101561053357815488820152600190910190602001610517565b505081860193505b509195945050505050565b60805160a051611ae5610572600039600081816102e10152610f870152600061029b0152611ae56000f3fe6080604052600436106101815760003560e01c80637a9e5e4b116100d1578063a69df4b51161008a578063bf7e214f11610064578063bf7e214f146104b1578063cf309012146104d1578063d505accf146104eb578063dd62ed3e1461050b57600080fd5b8063a69df4b51461047c578063a9059cbb14610491578063b3eac1d8146103b957600080fd5b80637a9e5e4b146103995780637ecebe00146103b95780638da5cb5b146103ef57806395d89b41146104275780639dc29fac1461043c578063a0712d681461045c57600080fd5b806330adf81f1161013e57806340c10f191161011857806340c10f191461030357806342966c68146103235780636281133d1461034357806370a082311461036357600080fd5b806330adf81f14610255578063313ce567146102895780633644e515146102cf57600080fd5b806306fdde0314610186578063095ea7b3146101b15780630c53c51c146101e157806313af4035146101f457806318160ddd1461021657806323b872dd14610235575b600080fd5b34801561019257600080fd5b5061019b610551565b6040516101a891906115b0565b60405180910390f35b3480156101bd57600080fd5b506101d16101cc3660046115d8565b6105df565b60405190151581526020016101a8565b61019b6101ef3660046116bf565b610672565b34801561020057600080fd5b5061021461020f366004611733565b610859565b005b34801561022257600080fd5b506000545b6040519081526020016101a8565b34801561024157600080fd5b506101d1610250366004611750565b6108dc565b34801561026157600080fd5b506102277f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b34801561029557600080fd5b506102bd7f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101a8565b3480156102db57600080fd5b506102277f000000000000000000000000000000000000000000000000000000000000000081565b34801561030f57600080fd5b5061021461031e3660046115d8565b610950565b34801561032f57600080fd5b5061021461033e366004611791565b610a3f565b34801561034f57600080fd5b506101d161035e3660046117aa565b610a53565b34801561036f57600080fd5b5061022761037e366004611733565b6001600160a01b031660009081526001602052604090205490565b3480156103a557600080fd5b506102146103b4366004611733565b610ba7565b3480156103c557600080fd5b506102276103d4366004611733565b6001600160a01b031660009081526008602052604090205490565b3480156103fb57600080fd5b5060045461040f906001600160a01b031681565b6040516001600160a01b0390911681526020016101a8565b34801561043357600080fd5b5061019b610c18565b34801561044857600080fd5b506102146104573660046115d8565b610c25565b34801561046857600080fd5b50610214610477366004611791565b610e1c565b34801561048857600080fd5b50610214610e54565b34801561049d57600080fd5b506101d16104ac3660046115d8565b610e87565b3480156104bd57600080fd5b5060035461040f906001600160a01b031681565b3480156104dd57600080fd5b506007546101d19060ff1681565b3480156104f757600080fd5b50610214610506366004611831565b610ea2565b34801561051757600080fd5b506102276105263660046118a0565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6006805461055e906118d9565b80601f016020809104026020016040519081016040528092919081815260200182805461058a906118d9565b80156105d75780601f106105ac576101008083540402835291602001916105d7565b820191906000526020600020905b8154815290600101906020018083116105ba57829003601f168201915b505050505081565b600081600260006105ee611191565b6001600160a01b0390811682526020808301939093526040918201600090812091881680825291909352912091909155610626611191565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161066091815260200190565b60405180910390a35060015b92915050565b60606106a186610697886001600160a01b031660009081526008602052604090205490565b4688888888610a53565b6107045760405162461bcd60e51b815260206004820152602960248201527f6d6574617472616e73616374696f6e2d7369676e65722d7369676e617475726560448201526805adad2e6dac2e8c6d60bb1b60648201526084015b60405180910390fd5b61070d86611234565b6000306001600160a01b0316867f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e88960405160200161074e93929190611913565b60408051601f19818403018152908290526107689161194c565b6000604051808303816000865af19150503d80600081146107a5576040519150601f19603f3d011682016040523d82523d6000602084013e6107aa565b606091505b50925090508061080d5760405162461bcd60e51b815260206004820152602860248201527f636f6c6f6e792d6d65746174782d66756e6374696f6e2d63616c6c2d756e737560448201526718d8d95cdcd99d5b60c21b60648201526084016106fb565b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b87610837611191565b8860405161084793929190611968565b60405180910390a15095945050505050565b610876610864611191565b6000356001600160e01b031916611260565b6108925760405162461bcd60e51b81526004016106fb9061199d565b600480546001600160a01b0319166001600160a01b0383169081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60075460009060ff161561093d576108f5610864611191565b61093d5760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b61094884848461133b565b949350505050565b61095b610864611191565b6109775760405162461bcd60e51b81526004016106fb9061199d565b6001600160a01b0382166000908152600160205260408120805483929061099f9084906119e1565b92505081905550806000808282546109b791906119e1565b90915550506040518181526001600160a01b038316907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a26040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b610a50610a4a611191565b82610c25565b50565b600080610ad088308989604051602001610a7094939291906119f4565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b6040805160008082526020820180845284905260ff87169282019290925260608101889052608081018790529192509060019060a0016020604051602081039080840390855afa158015610b28573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610b8b5760405162461bcd60e51b815260206004820152601f60248201527f636f6c6f6e792d6d65746174782d696e76616c69642d7369676e61747572650060448201526064016106fb565b6001600160a01b038a8116911614915050979650505050505050565b610bb2610864611191565b610bce5760405162461bcd60e51b81526004016106fb9061199d565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6005805461055e906118d9565b610c2d611191565b6001600160a01b0316826001600160a01b031614610d2d576001600160a01b03821660009081526002602052604081208291610c67611191565b6001600160a01b03166001600160a01b03168152602001908152602001600020541015610cd65760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03821660009081526002602052604081208291610cf8611191565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610d279190611a3a565b90915550505b6001600160a01b038216600090815260016020526040902054811115610d955760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b03821660009081526001602052604081208054839290610dbd908490611a3a565b9250508190555080600080828254610dd59190611a3a565b90915550506040518181526001600160a01b038316907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59060200160405180910390a25050565b610e27610864611191565b610e435760405162461bcd60e51b81526004016106fb9061199d565b610a50610e4e611191565b82610950565b610e5f610864611191565b610e7b5760405162461bcd60e51b81526004016106fb9061199d565b6007805460ff19169055565b6000610e9b610e94611191565b84846108dc565b9392505050565b60075460ff1615610f0057610eb8610864611191565b610f005760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b42841015610f505760405162461bcd60e51b815260206004820152601d60248201527f636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e6500000060448201526064016106fb565b6040805180820182526002815261190160f01b6020808301919091526001600160a01b038a166000908152600890915291822080547f0000000000000000000000000000000000000000000000000000000000000000917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c9188610fd983611a4d565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161103d93929190611a66565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa1580156110a8573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906110de5750886001600160a01b0316816001600160a01b0316145b61112a5760405162461bcd60e51b815260206004820152601e60248201527f636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e6174757265000060448201526064016106fb565b6001600160a01b038981166000818152600260209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b60003633301480156111a4575060348110155b1561122d57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e8811461121c5733935050505090565b5001516001600160a01b0316919050565b3391505090565b6001600160a01b038116600090815260086020526040812080549161125883611a4d565b919050555050565b6000306001600160a01b0384160361127a5750600161066c565b6004546001600160a01b03908116908416036112985750600161066c565b6003546001600160a01b03166112b05750600061066c565b60035460405163b700961360e01b81526001600160a01b0385811660048301523060248301526001600160e01b0319851660448301529091169063b700961390606401602060405180830381865afa158015611310573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113349190611a8d565b905061066c565b6000611345611191565b6001600160a01b0316846001600160a01b031614611445576001600160a01b0384166000908152600260205260408120839161137f611191565b6001600160a01b03166001600160a01b031681526020019081526020016000205410156113ee5760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03841660009081526002602052604081208391611410611191565b6001600160a01b03166001600160a01b03168152602001908152602001600020600082825461143f9190611a3a565b90915550505b6001600160a01b0384166000908152600160205260409020548211156114ad5760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b038416600090815260016020526040812080548492906114d5908490611a3a565b90915550506001600160a01b038316600090815260016020526040812080548492906115029084906119e1565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161154e91815260200190565b60405180910390a35060019392505050565b60005b8381101561157b578181015183820152602001611563565b50506000910152565b6000815180845261159c816020860160208601611560565b601f01601f19169290920160200192915050565b602081526000610e9b6020830184611584565b6001600160a01b0381168114610a5057600080fd5b600080604083850312156115eb57600080fd5b82356115f6816115c3565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261162b57600080fd5b813567ffffffffffffffff81111561164557611645611604565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561167457611674611604565b60405281815283820160200185101561168c57600080fd5b816020850160208301376000918101602001919091529392505050565b803560ff811681146116ba57600080fd5b919050565b600080600080600060a086880312156116d757600080fd5b85356116e2816115c3565b9450602086013567ffffffffffffffff8111156116fe57600080fd5b61170a8882890161161a565b9450506040860135925060608601359150611727608087016116a9565b90509295509295909350565b60006020828403121561174557600080fd5b8135610e9b816115c3565b60008060006060848603121561176557600080fd5b8335611770816115c3565b92506020840135611780816115c3565b929592945050506040919091013590565b6000602082840312156117a357600080fd5b5035919050565b600080600080600080600060e0888a0312156117c557600080fd5b87356117d0816115c3565b96506020880135955060408801359450606088013567ffffffffffffffff8111156117fa57600080fd5b6118068a828b0161161a565b9450506080880135925060a0880135915061182360c089016116a9565b905092959891949750929550565b600080600080600080600060e0888a03121561184c57600080fd5b8735611857816115c3565b96506020880135611867816115c3565b95506040880135945060608801359350611883608089016116a9565b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156118b357600080fd5b82356118be816115c3565b915060208301356118ce816115c3565b809150509250929050565b600181811c908216806118ed57607f821691505b60208210810361190d57634e487b7160e01b600052602260045260246000fd5b50919050565b60008451611925818460208901611560565b919091019283525060601b6bffffffffffffffffffffffff19166020820152603401919050565b6000825161195e818460208701611560565b9190910192915050565b6001600160a01b0384811682528316602082015260606040820181905260009061199490830184611584565b95945050505050565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561066c5761066c6119cb565b8481526bffffffffffffffffffffffff198460601b16602082015282603482015260008251611a2a816054850160208701611560565b9190910160540195945050505050565b8181038181111561066c5761066c6119cb565b600060018201611a5f57611a5f6119cb565b5060010190565b60008451611a78818460208901611560565b91909101928352506020820152604001919050565b600060208284031215611a9f57600080fd5b81518015158114610e9b57600080fdfea264697066735822122090928a66070125904780390eb49d45fe12c136aec641b1db69316e0ffefc6da764736f6c634300081b0033",t1=n=>n.length>1,Nn=class extends ci{constructor(...e){t1(e)?super(...e):super(Hu,A6,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 ne.Interface(Hu)}static connect(e,t){return new oe(e,Hu,t)}};xe(Nn,"bytecode",A6),xe(Nn,"abi",Hu);var Tp=[{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:"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:"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:[{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:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",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:"_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:"_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:"returnData",type:"bytes"}],stateMutability:"payable",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:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"",type:"address"}],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"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",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:"_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:"_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:"_token",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"incrementLockCounterTo",outputs:[],stateMutability:"nonpayable",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:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"pure",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetwork",type:"address"}],name:"setColonyNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",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:"_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:"_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:"_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:"_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"}],Ii=class{static createInterface(){return new ne.Interface(Tp)}static connect(e,t){return new oe(e,Tp,t)}};xe(Ii,"abi",Tp);var Si;(function(n){n.TokenClient="TokenClient",n.TokenLockingClient="TokenLockingClient"})(Si||(Si={}));var Dn;(function(n){n.Colony="Colony",n.ColonyLegacy="ColonyLegacy",n.Erc20="Erc20",n.Erc2612="Erc2612",n.Sai="Sai"})(Dn||(Dn={}));var{AddressZero:r1}=ht;async function s1(n){try{await n.authority();return}catch{throw new Error("Token can not be assigned a TokenAuthority")}}var o1=async(n,e)=>{let t,a=!0,i=!0;t=Nn.connect(n,e);try{await t.totalSupply()}catch(r){throw new Error(`Token is probably not a valid ERC20 token, got ${r.message}`)}try{await t.locked(),await s1(t)}catch{a=!1}try{await t.nonces(r1)}catch{i=!1}return a?t.tokenClientType=Dn.Colony:i?(t=vn.connect(n,e),t.tokenClientType=Dn.Erc2612):(t=Tn.connect(n,e),t.tokenClientType=Dn.Erc20),t.clientType=Si.TokenClient,t},vp=o1;var u1=(n,e)=>{let t=Ii.connect(n,e);return t.clientType=Si.TokenLockingClient,t},wp=u1;var{AddressZero:_p}=ht,d1=Tn.connect(_p,new ea.BaseProvider(3656691)).interface,l1=Ci.connect(_p,new ea.BaseProvider(3656691)).interface,p1=vn.connect(_p,new ea.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"},{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:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{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:"returnData",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:"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:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"}],Us=class{static createInterface(){return new ne.Interface(kp)}static connect(e,t){return new oe(e,kp,t)}};Us.abi=kp;var Ap=[{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:"returnData",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 ne.Interface(Ap)}static connect(e,t){return new oe(e,Ap,t)}};Vs.abi=Ap;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:!1,internalType:"address",name:"bridgeAddress",type:"address"}],name:"BridgeSet",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:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateSentToBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateStoredFromBridge",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:"uint256",name:"skillId",type:"uint256"}],name:"SkillAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillCreationStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillStoredFromBridge",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:[{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"address",name:"_resolver",type:"address"}],name:"addColonyVersion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_resolver",type:"address"}],name:"addExtensionToNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"addPendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPendingSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"addReputationUpdateLogFromBridge",outputs:[],stateMutability:"nonpayable",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:"_parentSkillId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"addSkillFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",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:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"chainId",type:"uint256"}],name:"bridgeCurrentRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"bridgePendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"skillId",type:"uint256"}],name:"bridgeSkillIfNotMiningChain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"burnUnneededRewards",outputs:[],stateMutability:"nonpayable",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:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"}],name:"claimMiningReward",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:"address",name:"_tokenAddress",type:"address"}],name:"createMetaColony",outputs:[],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:"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:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateExtension",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:"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:"returnData",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"getBridgedReputationUpdateCount",outputs:[{internalType:"uint256",name:"bridgedReputationCount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"}],name:"getBridgedSkillCounts",outputs:[{internalType:"uint256",name:"skillCount",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:"uint256",name:"_id",type:"uint256"}],name:"getColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyBridgeAddress",outputs:[{internalType:"address",name:"bridge",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCreationSalt",outputs:[{internalType:"bytes32",name:"salt",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"}],name:"getColonyVersionResolver",outputs:[{internalType:"address",name:"_resolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentColonyVersion",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getENSRegistrar",outputs:[{internalType:"address",name:"_address",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:[{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:[],name:"getFeeInverse",outputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMetaColony",outputs:[{internalType:"address payable",name:"_colonyAddress",type:"address"}],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:"getMiningChainId",outputs:[{internalType:"uint256",name:"reputationMiningChainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"}],name:"getMiningDelegator",outputs:[{internalType:"address",name:"_delegator",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiningResolver",outputs:[{internalType:"address",name:"miningResolverAddress",type:"address"}],stateMutability:"view",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:"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:"address",name:"_token",type:"address"}],name:"getPayoutWhitelist",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"getPendingReputationUpdate",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:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.PendingReputationUpdate",name:"update",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"getPendingSkillAddition",outputs:[{internalType:"uint256",name:"parentId",type:"uint256"}],stateMutability:"view",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:"_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:[{internalType:"bool",name:"_active",type:"bool"}],name:"getReputationMiningCycle",outputs:[{internalType:"address",name:"_repMiningCycleAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningCycleReward",outputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningSkillId",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"view",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:"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_deprecated",type:"bool"}],internalType:"struct ColonyNetworkDataTypes.Skill",name:"_skill",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSkillCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTokenLocking",outputs:[{internalType:"address",name:"_lockingAddress",type:"address"}],stateMutability:"view",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:"miningChainId",type:"uint256"},{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"}],name:"initialiseReputationMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[{internalType:"uint256",name:"_rootLocalSkillId",type:"uint256"}],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:"address",name:"_colony",type:"address"}],name:"isColony",outputs:[{internalType:"bool",name:"_addressIsColony",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],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:"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:"_stakers",type:"address[]"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"punishStakers",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:"_username",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerUserLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_bridgeAddress",type:"address"}],name:"setColonyBridgeAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],name:"setFeeInverse",outputs:[],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:"_miningResolverAddress",type:"address"}],name:"setMiningResolver",outputs:[],stateMutability:"nonpayable",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:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",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:"uint256",name:"_amount",type:"uint256"}],name:"setReputationMiningCycleReward",outputs:[],stateMutability:"nonpayable",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:[{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"},{internalType:"uint256",name:"nonce",type:"uint256"}],name:"setReputationRootHashFromBridge",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:"address",name:"_tokenLockingAddress",type:"address"}],name:"setTokenLocking",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:"uint256",name:"_amount",type:"uint256"}],name:"stakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"startNextCycle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"startTokenAuction",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:"bytes32",name:"_extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"unstakeForMining",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:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",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({contract:e,config:t,method:a,args:i,eventData:r,txConfig:s}){this.config=t,this.contract=e,this.method=a,this.args=i,this.eventData=r,this.txConfig=s}async getArgs(e){let t=[];return typeof this.args=="function"?t=await this.args():t=this.args,e&&t.push(e),t}async getTx(e){let t=await this.getArgs(e);return await this.contract.functions[this.method].apply(this.contract,t)}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.config.ipfs.getMetadataForEvent.bind(this.config.ipfs,Ls[this.txConfig.metadataType],t.metadata);return[t,e,a]}return[t,e]}return[{},e]}async broadcastMetaTx(e){let{provider:t}=this.config.getSigner();if(!t)throw new Error("No provider found");let i=await(await fetch(`${this.config.metaTxBroadcasterEndpoint}/broadcast`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();if(i.status!=="success")throw new Error(`Could not send Metatransaction. Reason given: ${i.data.reason}`);if(!i.data?.txHash)throw new Error("Could not get transaction hash from broadcaster response");return t.getTransaction(i.data.txHash)}async waitForMetaTx(e){let t=await e.wait();return t.parsedLogs=jl(t.logs,this.contract.interface),t}tx(){return{send:async e=>{let t=await this.getTx(e);return[t,this.getMined.bind(this,t)]},mined:async e=>{let t=await this.getTx(e);return this.getMined(t)},encode:async()=>{let e=await this.getArgs();return this.contract.interface.encodeFunctionData(this.method,e)}}}};var{arrayify:f1,solidityKeccak256:c1,splitSignature:m1}=ne,Ua=class extends Ta{async sendMetaTransaction(e,t){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let a=this.config.getSigner(),{provider:i}=a;if(!i)throw new Error("No provider found");let r;this.config.network===Pn.Custom?r=1:r=(await i.getNetwork()).chainId;let s=await a.getAddress(),o=await this.contract.functions.getMetatransactionNonce(s),l=c1(["uint256","address","uint256","bytes"],[o.toString(),t,r,e]),p=f1(l),f=await a.signMessage(p),{r:x,s:I,v:_}=m1(f),v={target:t,payload:e,userAddress:s,r:x,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=(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=_e.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 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"}],Pi=class{static createInterface(){return new ne.Interface(Mp)}static connect(e,t){return new oe(e,Mp,t)}};Pi.abi=Mp;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 ne.Interface(Cp)}static connect(e,t){return new oe(e,Cp,t)}};Ni.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"}],Di=class{static createInterface(){return new ne.Interface(Ip)}static connect(e,t){return new oe(e,Ip,t)}};Di.abi=Ip;var Sp=[{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 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:[{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 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{AddressZero:w1}=ht,On=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Ba(On.extensionType),e.address);if(t===w1)throw new Error(`${On.extensionType} extension is not installed for this Colony`);let a=await Mr(t,e.config.signerOrProvider);if(!wi(On.extensionType,a,e.version))throw new Error(`Version ${a} of the ${On.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=On.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${On.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new On(e,r,a)}static getLatestSupportedVersion(){return On.supportedVersions[On.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||_e.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[_]),I=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,I,x,s,_e.SkillIgnore]},async _=>({...te("OneTxPaymentMade",_)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Ba(Ae.OneTxPayment),t],async a=>({...te("ExtensionUpgraded",a)}))}},Va=On;Va.supportedVersions=[{version:3,factory:Oi},{version:4,factory:Bi},{version:5,factory:Fi}],Va.extensionType=Ae.OneTxPayment;var Bn=class{constructor(e,t){typeof t=="string"?this.tokenClient=Tn.connect(t,e.config.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=>({...te("Transfer",a)}))}transferFrom(e,t,a){return this.colonyNetwork.createTxCreator(this.tokenClient,"transferFrom",[e,t,a],async i=>({...te("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=>({...te("Approval",a)}))}};var js=class extends Bn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=Nn.connect(a,t.config.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=>({...te("LogSetAuthority",a)}))}setOwner(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setOwner",[t],async a=>({...te("LogSetOwner",a)}))}};var Hs=class extends Bn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=vn.connect(a,t.config.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=>({...te("Approval",i)}))}};var E6=async(n,e)=>{let t=await vp(e,n.config.signerOrProvider);switch(t.tokenClientType){case Dn.Colony:return new js(n,t);case Dn.Erc20:return new Bn(n,t);case Dn.Erc2612:return new Hs(n,t);default:throw new Error("Your token is not supported in Colony SDK (yet).")}};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"},{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 ne.Interface(Np)}static connect(e,t){return new oe(e,Np,t)}};Li.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"},{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 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{AddressZero:Bp}=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===Bp)throw new Error(`${Fn.extensionType} extension is not installed for this Colony`);let a=await Mr(t,e.config.signerOrProvider);if(!wi(Fn.extensionType,a,e.version))throw new Error(`Version ${a} of the ${Fn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Fn.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${Fn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new Fn(e,r,a)}static getLatestSupportedVersion(){return Fn.supportedVersions[Fn.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 ne.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=>({...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:a,value:i,branchMask:r,siblings:s}=await Ss(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),this.colony.reputation,this.votingReputationContract,e,Bp,Ol);return[e,t,Bp,Ol,a,i,r,s]},async t=>({...te("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.config.ipfs.uploadMetadata(Re.Decision,t),[e,a]},async a=>({...te("Annotation",a)}),{metadataType:Re.Decision})}approveStake(e,t=_e.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.config.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(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 I=await this.getMinStake(o,t);if(F.from(a).lt(I))throw new Error(`The staked amount is too small. Please stake at least ${Ul(I)}`);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: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=>({...te("MotionStaked",r),...te("MotionEventSet",r)}))}submitVote(e,t){let a=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.config.getSigner().getAddress(),{key:p,value:f,branchMask:x,siblings:I}=await this.colony.reputation.getReputationWithProofs(o,l,s),_=await this.createMotionSalt(e),v=ne.solidityKeccak256(["bytes","uint256"],[_,t]);return[e,v,p,f,x,I]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"submitVote",a,async i=>({...te("MotionVoteSubmitted",i)}))}revealVote(e,t){let a=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.config.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:I,value:_,branchMask:v,siblings:S}=p;return[e,f,F.from(x),I,_,v,S]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"revealVote",a,async i=>({...te("MotionVoteRevealed",i)}))}escalateMotion(e,t){let a=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.config.getSigner().getAddress(),p=await vi(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),t,r),{key:f,value:x,branchMask:I,siblings:_}=await this.colony.reputation.getReputationWithProofs(o,l,s);return[e,t,p,f,x,I,_]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"escalateMotion",a,async i=>({...te("MotionEscalated",i)}))}finalizeMotion(e){let t=async()=>{let a=await this.votingReputationContract.getMotionState(e);if(a!==zt.Finalizable)throw new Error(`Motion cannot be finalized. It's currently in "${zt[a]}" state`);return[e]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"finalizeMotion",t,async a=>({...te("MotionFinalized",a)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Ba(Ae.VotingReputation),t],async a=>({...te("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}}},ja=Fn;ja.supportedVersions=[{version:7,factory:Li},{version:8,factory:Ui},{version:9,factory:Vi}],ja.extensionType=Ae.VotingReputation;var E1={["motion"]:ja,["oneTx"]:Va},Dr=class{static async connect(e,t){let a=await Mr(t,e.config.signerOrProvider),i=Dr.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.config.signerOrProvider),s=await r.getToken(),o=await E6(e,s),l=new Dr(e,r,o,a);return await l.updateExtensions(),l}static getLatestSupportedVersion(){return Dr.supportedVersions[Dr.supportedVersions.length-1].version}constructor(e,t,a,i){this.colony=t,this.colonyNetwork=e,this.config=e.config,this.address=t.address,this.ext={},this.reputation=new na(e.getInternalNetworkContract(),t,{customEndpointUrl:e.config.reputationOracleEndpoint}),this.token=a,this.version=i}createColonyTxCreator(e,t,a,i,r){return new Nr({colony:this,config:this.colonyNetwork.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createPermissionedColonyTxCreator(e,t,a,i,r,s){return new Nr({colony:this,config:this.colonyNetwork.config,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 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.config.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.config.ipfs.uploadMetadata(Re.Domain,e),[_e.RootDomain,t]},{roles:vt.Architecture,domain:_e.RootDomain},async t=>({...te("DomainAdded",t),...te("FundingPotAdded",t),...te("DomainMetadata",t)}),{metadataType:Re.Domain}):this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256)",[_e.RootDomain],{roles:vt.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.config.ipfs.uploadMetadata(Re.Domain,e),[_e.RootDomain,t]},{roles:vt.Architecture,domain:_e.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 a=>({...te("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=>({...te("ColonyFundsClaimed",a)}))}moveFundsToTeam(e,t,a,i){let r=_e.RootDomain,s=a||_e.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(),I=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,I,_,v,S,e,o]},async l=>({...te("ColonyFundsMovedBetweenFundingPots",l)}))}async getReputation(e,t=_e.RootDomain,a=3){let{skillId:i}=await this.colony.getDomain(t);return this.reputation.getReputationFraction(i,e,void 0,a)}async getReputationPoints(e,t=_e.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=>({...te("ArbitraryTransaction(address,address,bytes,bool)",a)}))}annotateTransaction(e,t){return this.createColonyTxCreator(this.colony,"annotateTransaction",async()=>{let a;return typeof t=="string"?a=t:a=await this.config.ipfs.uploadMetadata(Re.Annotation,t),[e,a]},async a=>({...te("Annotation",a)}),{metadataType:Re.Annotation})}installExtension(e){let t=E1[e],a=t.getLatestSupportedVersion(),{extensionType:i}=t;if(!wi(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",[Ba(i),t.getLatestSupportedVersion()],async s=>({...qu("ExtensionInstalled",s,r.interface)}))}async getRoles(e,t=_e.RootDomain){let a=await this.colony.getUserRoles(e,t);return uu(a)}setRoles(e,t,a=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let i=await this.getRoles(e,a),r=Array.from(new Set([...i,...[].concat(t)])),s=Vl(r);return[e,a,s]},{roles:vt.Architecture,domain:a},async i=>({...te("ColonyRoleSet",i),...te("RecoveryRoleSet",i)}))}unsetRoles(e,t,a=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let r=(await this.getRoles(e,a)).filter(o=>![].concat(t).includes(o)),s=Vl(r);return[e,a,s]},{roles:vt.Architecture,domain:a},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 a=[],i=await t.getTokenLocking();return e?a=[...e,i]:a=[i],[this.token.address,this.address,a]},async a=>({...te("TokenAuthorityDeployed",a)}))}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 a=>({...te("ColonyUpgraded",a)}))}awardReputation(e,t,a=_e.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=>({...te("ArbitraryReputationUpdate",i)}))}smiteReputation(e,t,a=_e.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:vt.Arbitration},async i=>({...te("ArbitraryReputationUpdate",i)}))}},Or=Dr;Or.supportedVersions=[{version:11,factory:Pi},{version:12,factory:Ni},{version:13,factory:Di}];var{splitSignature:M1}=ne,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,a]){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let i=this.contract.signer,{provider:r}=i;if(!r)throw new Error("No provider found");let s;this.config.network===Pn.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:a,nonce:l.toString(),deadline:f}),{r:I,s:_,v}=M1(x),S={target:e,owner:o,spender:t,value:a.toString(),deadline:f,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 qs=class{constructor(e,t){this.address=t,this.colonyNetwork=e,this.tokenLockingContract=wp(this.address,e.config.signerOrProvider)}getInternalTokenLockingContract(){return this.tokenLockingContract}deposit(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"deposit(address,uint256,bool)",[e,t,!1],async a=>({...te("UserTokenDeposited",a)}))}withdraw(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"withdraw(address,uint256,bool)",[e,t,!1],async a=>({...te("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 Gs=class{constructor(e,t){let a=t?.network||Pn.ArbitrumOne;this.metaTxBroadcasterEndpoint=t?.metaTxBroadcasterEndpoint||ou[a],this.ipfs=new Pr(t?.ipfsAdapter),this.network=a,this.reputationOracleEndpoint=t?.reputationOracleEndpoint||Er[a],this.signerOrProvider=e}getSigner(){if(!(this.signerOrProvider instanceof St))throw new Error("Need a signer to create a transaction");return this.signerOrProvider}};var{namehash:M6}=ne,{AddressZero:Fp}=ht,zs=class{constructor(e,t){this.config=new Gs(e,t),this.contract=Ri.connect(t?.customNetworkAddress||su[this.config.network],e)}async getTokenLocking(){if(!this.locking){let e=await this.contract.getTokenLocking();this.locking=new qs(this,e)}return this.locking}getInternalNetworkContract(){return this.contract}createTxCreator(e,t,a,i,r){return new Ta({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createMetaTxCreator(e,t,a,i,r){return new Ua({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createEip2612TxCreator(e,t,a,i,r){return new zu({config:this.config,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[Fp,e.name,e.symbol,e.decimals||18,0,t,""]}return[e,"","",0,0,t,""]};return a?this.createMetaTxCreator(this.contract,"createColonyForFrontend",async()=>{let r=await i();return typeof a=="string"?r[6]=a:r[6]=await this.config.ipfs.uploadMetadata(Re.Colony,a),r},async r=>({...te("TokenDeployed",r),...te("ColonyAdded",r),...te("TokenAuthorityDeployed",r)}),{metadataType:Re.Colony}):this.createMetaTxCreator(this.contract,"createColonyForFrontend",i,async r=>({...te("TokenDeployed",r),...te("ColonyAdded",r),...te("TokenAuthorityDeployed",r)}))}async getColony(e){return Or.connect(this,e)}async getMetaColony(){let e=await this.contract.getMetaColony();return this.getColony(e)}async getColonyLabel(e){let t=await this.contract.lookupRegisteredENSDomain(e);return t?t.replace(Ms[this.config.network],""):null}async getColonyAddress(e){let t=M6(`${e}${Ms[this.config.network]}`),a=await this.contract.addr(t);return a!==Fp?a:null}async getUsername(e){let t=await this.contract.lookupRegisteredENSDomain(e);return t?t.replace(Cs[this.config.network],""):null}async getUserAddress(e){let t=M6(`${e}${Cs[this.config.network]}`),a=await this.contract.addr(t);return a!==Fp?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.contract,"registerUserLabel",t,async a=>({...te("UserLabelRegistered",a)}))}deployToken(e,t,a=18){return this.createMetaTxCreator(this.contract,"deployTokenViaNetwork",[e,t,a],async i=>({...te("TokenDeployed",i)}))}};var{formatEther:C1,isAddress:I1}=ne,S1=new ea.JsonRpcProvider(Es.ArbitrumOne),R1=async n=>{let a=await(await new zs(S1).getColony(n)).getBalance(Is.ArbitrumOne.CLNY);return C1(a)},Up=document.querySelector("#address"),I6=document.querySelector("#button"),Vp=document.querySelector("#error"),S6=document.querySelector("#result");if(!Up||!I6||!Vp||!S6)throw new Error("Could not find all required HTML elements");var C6=n=>{Vp.innerText=n},P1=()=>{Vp.innerText=""},Lp=n=>{S6.innerText=n};I6.addEventListener("click",async()=>{P1();let n=Up?.value;if(!I1(n))return C6("This is not a valid address");Lp("Thinking..."),Up.value="";let e;try{e=await R1(n),Lp(`${e} CLNY in root domain of Colony with address: ${n}`)}catch(t){C6(`Found an error: ${t.message}`),Lp("")}return null});})(); +`)}`,Yb=n=>({...n,isWhitelistActivated:n.isWhitelistActivated||!1,colonySafes:n.colonySafes||[],colonyTokens:n.colonyTokens||[],verifiedAddresses:n.verifiedAddresses||[]}),fp=(n,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&&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"?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=yp.default.validate.report(s);r(i)===!1&&((p,f,x=!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}))&&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"?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: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}})(n);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 a=w6(t.errors);throw new Error(a)};var _6=(n,e)=>{let t=n===Re.Colony?Yb(e):e,a=(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&&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"?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=yp.default.validate.report(s);r(i)===!1&&((p,f,x=!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}))&&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"?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: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}})({name:n,data:t,version:pp});if(!a.success){let i=w6(a.errors);throw new Error(i)}return a.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,k6.default)(fetch,{headers:{Accept:"application/json"},retryOn:[404,503],retries:3,retryDelay:5e3}),Ls={[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]:""},Pr=class{adapter;constructor(e){this.adapter=e||new mp}static eventSupportsMetadata(e){return!!Object.keys(Ls).includes(e)}async getMetadata(e,t){let a=this.adapter.getIpfsUrl(e),r=await(await hp(a)).json();return fp(r,t)}async getMetadataForEvent(e,t){let a=this.adapter.getIpfsUrl(t),r=await(await hp(a)).json(),s=Object.entries(Ls).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),a=await hp(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=_6(e,t),i=JSON.stringify(a);return this.adapter.uploadJson(i)}};var lE=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"}],Ci=class{static createInterface(){return new ne.Interface(gp)}static connect(e,t){return new oe(e,gp,t)}};xe(Ci,"abi",gp);var qu=[{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:"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:"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:[{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:"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:"returnData",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",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:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],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:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"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:[],name:"unlock",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"}],A6="0x60c060405234801561001057600080fd5b5060405161205738038061205783398101604081905261002f91610307565b60008060018161003d6101ab565b6001600160a01b031681526020810191909152604001600090812091909155556100656101ab565b600480546001600160a01b0319166001600160a01b039290921691909117905561008d6101ab565b6001600160a01b03167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a260066100ce8482610413565b5060056100db8382610413565b5060ff81166080526007805460ff1916600117905560405146907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f90610123906006906104d1565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051601f19818403018152919052805160209091012060a0525061054692505050565b60003633301480156101be575060348110155b1561024757600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e881146102365733935050505090565b5001516001600160a01b0316919050565b3391505090565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261027557600080fd5b81516001600160401b0381111561028e5761028e61024e565b604051601f8201601f19908116603f011681016001600160401b03811182821017156102bc576102bc61024e565b6040528181528382016020018510156102d457600080fd5b60005b828110156102f3576020818601810151838301820152016102d7565b506000918101602001919091529392505050565b60008060006060848603121561031c57600080fd5b83516001600160401b0381111561033257600080fd5b61033e86828701610264565b602086015190945090506001600160401b0381111561035c57600080fd5b61036886828701610264565b925050604084015160ff8116811461037f57600080fd5b809150509250925092565b600181811c9082168061039e57607f821691505b6020821081036103be57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561040e57806000526020600020601f840160051c810160208510156103eb5750805b601f840160051c820191505b8181101561040b57600081556001016103f7565b50505b505050565b81516001600160401b0381111561042c5761042c61024e565b6104408161043a845461038a565b846103c4565b6020601f821160018114610474576000831561045c5750848201515b600019600385901b1c1916600184901b17845561040b565b600084815260208120601f198516915b828110156104a45787850151825560209485019460019092019101610484565b50848210156104c25786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b60008083546104df8161038a565b6001821680156104f6576001811461050b5761053b565b60ff198316865281151582028601935061053b565b86600052602060002060005b8381101561053357815488820152600190910190602001610517565b505081860193505b509195945050505050565b60805160a051611ae5610572600039600081816102e10152610f870152600061029b0152611ae56000f3fe6080604052600436106101815760003560e01c80637a9e5e4b116100d1578063a69df4b51161008a578063bf7e214f11610064578063bf7e214f146104b1578063cf309012146104d1578063d505accf146104eb578063dd62ed3e1461050b57600080fd5b8063a69df4b51461047c578063a9059cbb14610491578063b3eac1d8146103b957600080fd5b80637a9e5e4b146103995780637ecebe00146103b95780638da5cb5b146103ef57806395d89b41146104275780639dc29fac1461043c578063a0712d681461045c57600080fd5b806330adf81f1161013e57806340c10f191161011857806340c10f191461030357806342966c68146103235780636281133d1461034357806370a082311461036357600080fd5b806330adf81f14610255578063313ce567146102895780633644e515146102cf57600080fd5b806306fdde0314610186578063095ea7b3146101b15780630c53c51c146101e157806313af4035146101f457806318160ddd1461021657806323b872dd14610235575b600080fd5b34801561019257600080fd5b5061019b610551565b6040516101a891906115b0565b60405180910390f35b3480156101bd57600080fd5b506101d16101cc3660046115d8565b6105df565b60405190151581526020016101a8565b61019b6101ef3660046116bf565b610672565b34801561020057600080fd5b5061021461020f366004611733565b610859565b005b34801561022257600080fd5b506000545b6040519081526020016101a8565b34801561024157600080fd5b506101d1610250366004611750565b6108dc565b34801561026157600080fd5b506102277f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b34801561029557600080fd5b506102bd7f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101a8565b3480156102db57600080fd5b506102277f000000000000000000000000000000000000000000000000000000000000000081565b34801561030f57600080fd5b5061021461031e3660046115d8565b610950565b34801561032f57600080fd5b5061021461033e366004611791565b610a3f565b34801561034f57600080fd5b506101d161035e3660046117aa565b610a53565b34801561036f57600080fd5b5061022761037e366004611733565b6001600160a01b031660009081526001602052604090205490565b3480156103a557600080fd5b506102146103b4366004611733565b610ba7565b3480156103c557600080fd5b506102276103d4366004611733565b6001600160a01b031660009081526008602052604090205490565b3480156103fb57600080fd5b5060045461040f906001600160a01b031681565b6040516001600160a01b0390911681526020016101a8565b34801561043357600080fd5b5061019b610c18565b34801561044857600080fd5b506102146104573660046115d8565b610c25565b34801561046857600080fd5b50610214610477366004611791565b610e1c565b34801561048857600080fd5b50610214610e54565b34801561049d57600080fd5b506101d16104ac3660046115d8565b610e87565b3480156104bd57600080fd5b5060035461040f906001600160a01b031681565b3480156104dd57600080fd5b506007546101d19060ff1681565b3480156104f757600080fd5b50610214610506366004611831565b610ea2565b34801561051757600080fd5b506102276105263660046118a0565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6006805461055e906118d9565b80601f016020809104026020016040519081016040528092919081815260200182805461058a906118d9565b80156105d75780601f106105ac576101008083540402835291602001916105d7565b820191906000526020600020905b8154815290600101906020018083116105ba57829003601f168201915b505050505081565b600081600260006105ee611191565b6001600160a01b0390811682526020808301939093526040918201600090812091881680825291909352912091909155610626611191565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161066091815260200190565b60405180910390a35060015b92915050565b60606106a186610697886001600160a01b031660009081526008602052604090205490565b4688888888610a53565b6107045760405162461bcd60e51b815260206004820152602960248201527f6d6574617472616e73616374696f6e2d7369676e65722d7369676e617475726560448201526805adad2e6dac2e8c6d60bb1b60648201526084015b60405180910390fd5b61070d86611234565b6000306001600160a01b0316867f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e88960405160200161074e93929190611913565b60408051601f19818403018152908290526107689161194c565b6000604051808303816000865af19150503d80600081146107a5576040519150601f19603f3d011682016040523d82523d6000602084013e6107aa565b606091505b50925090508061080d5760405162461bcd60e51b815260206004820152602860248201527f636f6c6f6e792d6d65746174782d66756e6374696f6e2d63616c6c2d756e737560448201526718d8d95cdcd99d5b60c21b60648201526084016106fb565b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b87610837611191565b8860405161084793929190611968565b60405180910390a15095945050505050565b610876610864611191565b6000356001600160e01b031916611260565b6108925760405162461bcd60e51b81526004016106fb9061199d565b600480546001600160a01b0319166001600160a01b0383169081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60075460009060ff161561093d576108f5610864611191565b61093d5760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b61094884848461133b565b949350505050565b61095b610864611191565b6109775760405162461bcd60e51b81526004016106fb9061199d565b6001600160a01b0382166000908152600160205260408120805483929061099f9084906119e1565b92505081905550806000808282546109b791906119e1565b90915550506040518181526001600160a01b038316907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a26040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b610a50610a4a611191565b82610c25565b50565b600080610ad088308989604051602001610a7094939291906119f4565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b6040805160008082526020820180845284905260ff87169282019290925260608101889052608081018790529192509060019060a0016020604051602081039080840390855afa158015610b28573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610b8b5760405162461bcd60e51b815260206004820152601f60248201527f636f6c6f6e792d6d65746174782d696e76616c69642d7369676e61747572650060448201526064016106fb565b6001600160a01b038a8116911614915050979650505050505050565b610bb2610864611191565b610bce5760405162461bcd60e51b81526004016106fb9061199d565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6005805461055e906118d9565b610c2d611191565b6001600160a01b0316826001600160a01b031614610d2d576001600160a01b03821660009081526002602052604081208291610c67611191565b6001600160a01b03166001600160a01b03168152602001908152602001600020541015610cd65760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03821660009081526002602052604081208291610cf8611191565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610d279190611a3a565b90915550505b6001600160a01b038216600090815260016020526040902054811115610d955760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b03821660009081526001602052604081208054839290610dbd908490611a3a565b9250508190555080600080828254610dd59190611a3a565b90915550506040518181526001600160a01b038316907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59060200160405180910390a25050565b610e27610864611191565b610e435760405162461bcd60e51b81526004016106fb9061199d565b610a50610e4e611191565b82610950565b610e5f610864611191565b610e7b5760405162461bcd60e51b81526004016106fb9061199d565b6007805460ff19169055565b6000610e9b610e94611191565b84846108dc565b9392505050565b60075460ff1615610f0057610eb8610864611191565b610f005760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b42841015610f505760405162461bcd60e51b815260206004820152601d60248201527f636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e6500000060448201526064016106fb565b6040805180820182526002815261190160f01b6020808301919091526001600160a01b038a166000908152600890915291822080547f0000000000000000000000000000000000000000000000000000000000000000917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c9188610fd983611a4d565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161103d93929190611a66565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa1580156110a8573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906110de5750886001600160a01b0316816001600160a01b0316145b61112a5760405162461bcd60e51b815260206004820152601e60248201527f636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e6174757265000060448201526064016106fb565b6001600160a01b038981166000818152600260209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b60003633301480156111a4575060348110155b1561122d57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e8811461121c5733935050505090565b5001516001600160a01b0316919050565b3391505090565b6001600160a01b038116600090815260086020526040812080549161125883611a4d565b919050555050565b6000306001600160a01b0384160361127a5750600161066c565b6004546001600160a01b03908116908416036112985750600161066c565b6003546001600160a01b03166112b05750600061066c565b60035460405163b700961360e01b81526001600160a01b0385811660048301523060248301526001600160e01b0319851660448301529091169063b700961390606401602060405180830381865afa158015611310573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113349190611a8d565b905061066c565b6000611345611191565b6001600160a01b0316846001600160a01b031614611445576001600160a01b0384166000908152600260205260408120839161137f611191565b6001600160a01b03166001600160a01b031681526020019081526020016000205410156113ee5760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03841660009081526002602052604081208391611410611191565b6001600160a01b03166001600160a01b03168152602001908152602001600020600082825461143f9190611a3a565b90915550505b6001600160a01b0384166000908152600160205260409020548211156114ad5760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b038416600090815260016020526040812080548492906114d5908490611a3a565b90915550506001600160a01b038316600090815260016020526040812080548492906115029084906119e1565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161154e91815260200190565b60405180910390a35060019392505050565b60005b8381101561157b578181015183820152602001611563565b50506000910152565b6000815180845261159c816020860160208601611560565b601f01601f19169290920160200192915050565b602081526000610e9b6020830184611584565b6001600160a01b0381168114610a5057600080fd5b600080604083850312156115eb57600080fd5b82356115f6816115c3565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261162b57600080fd5b813567ffffffffffffffff81111561164557611645611604565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561167457611674611604565b60405281815283820160200185101561168c57600080fd5b816020850160208301376000918101602001919091529392505050565b803560ff811681146116ba57600080fd5b919050565b600080600080600060a086880312156116d757600080fd5b85356116e2816115c3565b9450602086013567ffffffffffffffff8111156116fe57600080fd5b61170a8882890161161a565b9450506040860135925060608601359150611727608087016116a9565b90509295509295909350565b60006020828403121561174557600080fd5b8135610e9b816115c3565b60008060006060848603121561176557600080fd5b8335611770816115c3565b92506020840135611780816115c3565b929592945050506040919091013590565b6000602082840312156117a357600080fd5b5035919050565b600080600080600080600060e0888a0312156117c557600080fd5b87356117d0816115c3565b96506020880135955060408801359450606088013567ffffffffffffffff8111156117fa57600080fd5b6118068a828b0161161a565b9450506080880135925060a0880135915061182360c089016116a9565b905092959891949750929550565b600080600080600080600060e0888a03121561184c57600080fd5b8735611857816115c3565b96506020880135611867816115c3565b95506040880135945060608801359350611883608089016116a9565b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156118b357600080fd5b82356118be816115c3565b915060208301356118ce816115c3565b809150509250929050565b600181811c908216806118ed57607f821691505b60208210810361190d57634e487b7160e01b600052602260045260246000fd5b50919050565b60008451611925818460208901611560565b919091019283525060601b6bffffffffffffffffffffffff19166020820152603401919050565b6000825161195e818460208701611560565b9190910192915050565b6001600160a01b0384811682528316602082015260606040820181905260009061199490830184611584565b95945050505050565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561066c5761066c6119cb565b8481526bffffffffffffffffffffffff198460601b16602082015282603482015260008251611a2a816054850160208701611560565b9190910160540195945050505050565b8181038181111561066c5761066c6119cb565b600060018201611a5f57611a5f6119cb565b5060010190565b60008451611a78818460208901611560565b91909101928352506020820152604001919050565b600060208284031215611a9f57600080fd5b81518015158114610e9b57600080fdfea264697066735822122090928a66070125904780390eb49d45fe12c136aec641b1db69316e0ffefc6da764736f6c634300081b0033",t1=n=>n.length>1,Nn=class extends ci{constructor(...e){t1(e)?super(...e):super(qu,A6,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 ne.Interface(qu)}static connect(e,t){return new oe(e,qu,t)}};xe(Nn,"bytecode",A6),xe(Nn,"abi",qu);var Tp=[{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:"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:"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:[{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:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",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:"_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:"_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:"returnData",type:"bytes"}],stateMutability:"payable",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:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"",type:"address"}],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"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",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:"_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:"_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:"_token",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"incrementLockCounterTo",outputs:[],stateMutability:"nonpayable",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:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"pure",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetwork",type:"address"}],name:"setColonyNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",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:"_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:"_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:"_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:"_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"}],Ii=class{static createInterface(){return new ne.Interface(Tp)}static connect(e,t){return new oe(e,Tp,t)}};xe(Ii,"abi",Tp);var Si;(function(n){n.TokenClient="TokenClient",n.TokenLockingClient="TokenLockingClient"})(Si||(Si={}));var Dn;(function(n){n.Colony="Colony",n.ColonyLegacy="ColonyLegacy",n.Erc20="Erc20",n.Erc2612="Erc2612",n.Sai="Sai"})(Dn||(Dn={}));var{AddressZero:r1}=ht;async function s1(n){try{await n.authority();return}catch{throw new Error("Token can not be assigned a TokenAuthority")}}var o1=async(n,e)=>{let t,a=!0,i=!0;t=Nn.connect(n,e);try{await t.totalSupply()}catch(r){throw new Error(`Token is probably not a valid ERC20 token, got ${r.message}`)}try{await t.locked(),await s1(t)}catch{a=!1}try{await t.nonces(r1)}catch{i=!1}return a?t.tokenClientType=Dn.Colony:i?(t=vn.connect(n,e),t.tokenClientType=Dn.Erc2612):(t=Tn.connect(n,e),t.tokenClientType=Dn.Erc20),t.clientType=Si.TokenClient,t},vp=o1;var u1=(n,e)=>{let t=Ii.connect(n,e);return t.clientType=Si.TokenLockingClient,t},wp=u1;var{AddressZero:_p}=ht,d1=Tn.connect(_p,new ea.BaseProvider(3656691)).interface,l1=Ci.connect(_p,new ea.BaseProvider(3656691)).interface,p1=vn.connect(_p,new ea.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"},{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:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{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:"returnData",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:"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:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"}],Us=class{static createInterface(){return new ne.Interface(kp)}static connect(e,t){return new oe(e,kp,t)}};Us.abi=kp;var Ap=[{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:"returnData",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 ne.Interface(Ap)}static connect(e,t){return new oe(e,Ap,t)}};Vs.abi=Ap;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:!1,internalType:"address",name:"bridgeAddress",type:"address"}],name:"BridgeSet",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:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateSentToBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateStoredFromBridge",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:"uint256",name:"skillId",type:"uint256"}],name:"SkillAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillCreationStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillStoredFromBridge",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:[{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"address",name:"_resolver",type:"address"}],name:"addColonyVersion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_resolver",type:"address"}],name:"addExtensionToNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"addPendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPendingSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"addReputationUpdateLogFromBridge",outputs:[],stateMutability:"nonpayable",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:"_parentSkillId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"addSkillFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",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:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"chainId",type:"uint256"}],name:"bridgeCurrentRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"bridgePendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"skillId",type:"uint256"}],name:"bridgeSkillIfNotMiningChain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"burnUnneededRewards",outputs:[],stateMutability:"nonpayable",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:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"}],name:"claimMiningReward",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:"address",name:"_tokenAddress",type:"address"}],name:"createMetaColony",outputs:[],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:"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:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateExtension",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:"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:"returnData",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"getBridgedReputationUpdateCount",outputs:[{internalType:"uint256",name:"bridgedReputationCount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"}],name:"getBridgedSkillCounts",outputs:[{internalType:"uint256",name:"skillCount",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:"uint256",name:"_id",type:"uint256"}],name:"getColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyBridgeAddress",outputs:[{internalType:"address",name:"bridge",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCreationSalt",outputs:[{internalType:"bytes32",name:"salt",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"}],name:"getColonyVersionResolver",outputs:[{internalType:"address",name:"_resolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentColonyVersion",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getENSRegistrar",outputs:[{internalType:"address",name:"_address",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:[{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:[],name:"getFeeInverse",outputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMetaColony",outputs:[{internalType:"address payable",name:"_colonyAddress",type:"address"}],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:"getMiningChainId",outputs:[{internalType:"uint256",name:"reputationMiningChainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"}],name:"getMiningDelegator",outputs:[{internalType:"address",name:"_delegator",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiningResolver",outputs:[{internalType:"address",name:"miningResolverAddress",type:"address"}],stateMutability:"view",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:"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:"address",name:"_token",type:"address"}],name:"getPayoutWhitelist",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"getPendingReputationUpdate",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:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.PendingReputationUpdate",name:"update",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"getPendingSkillAddition",outputs:[{internalType:"uint256",name:"parentId",type:"uint256"}],stateMutability:"view",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:"_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:[{internalType:"bool",name:"_active",type:"bool"}],name:"getReputationMiningCycle",outputs:[{internalType:"address",name:"_repMiningCycleAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningCycleReward",outputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningSkillId",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"view",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:"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_deprecated",type:"bool"}],internalType:"struct ColonyNetworkDataTypes.Skill",name:"_skill",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSkillCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTokenLocking",outputs:[{internalType:"address",name:"_lockingAddress",type:"address"}],stateMutability:"view",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:"miningChainId",type:"uint256"},{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"}],name:"initialiseReputationMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[{internalType:"uint256",name:"_rootLocalSkillId",type:"uint256"}],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:"address",name:"_colony",type:"address"}],name:"isColony",outputs:[{internalType:"bool",name:"_addressIsColony",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],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:"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:"_stakers",type:"address[]"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"punishStakers",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:"_username",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerUserLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_bridgeAddress",type:"address"}],name:"setColonyBridgeAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],name:"setFeeInverse",outputs:[],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:"_miningResolverAddress",type:"address"}],name:"setMiningResolver",outputs:[],stateMutability:"nonpayable",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:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",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:"uint256",name:"_amount",type:"uint256"}],name:"setReputationMiningCycleReward",outputs:[],stateMutability:"nonpayable",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:[{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"},{internalType:"uint256",name:"nonce",type:"uint256"}],name:"setReputationRootHashFromBridge",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:"address",name:"_tokenLockingAddress",type:"address"}],name:"setTokenLocking",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:"uint256",name:"_amount",type:"uint256"}],name:"stakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"startNextCycle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"startTokenAuction",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:"bytes32",name:"_extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"unstakeForMining",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:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",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({contract:e,config:t,method:a,args:i,eventData:r,txConfig:s}){this.config=t,this.contract=e,this.method=a,this.args=i,this.eventData=r,this.txConfig=s}async getArgs(e){let t=[];return typeof this.args=="function"?t=await this.args():t=this.args,e&&t.push(e),t}async getTx(e){let t=await this.getArgs(e);return await this.contract.functions[this.method].apply(this.contract,t)}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.config.ipfs.getMetadataForEvent.bind(this.config.ipfs,Ls[this.txConfig.metadataType],t.metadata);return[t,e,a]}return[t,e]}return[{},e]}async broadcastMetaTx(e){let{provider:t}=this.config.getSigner();if(!t)throw new Error("No provider found");let i=await(await fetch(`${this.config.metaTxBroadcasterEndpoint}/broadcast`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();if(i.status!=="success")throw new Error(`Could not send Metatransaction. Reason given: ${i.data.reason}`);if(!i.data?.txHash)throw new Error("Could not get transaction hash from broadcaster response");return t.getTransaction(i.data.txHash)}async waitForMetaTx(e){let t=await e.wait();return t.parsedLogs=jl(t.logs,this.contract.interface),t}tx(){return{send:async e=>{let t=await this.getTx(e);return[t,this.getMined.bind(this,t)]},mined:async e=>{let t=await this.getTx(e);return this.getMined(t)},encode:async()=>{let e=await this.getArgs();return this.contract.interface.encodeFunctionData(this.method,e)}}}};var{arrayify:f1,solidityKeccak256:c1,splitSignature:m1}=ne,Ua=class extends Ta{async sendMetaTransaction(e,t){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let a=this.config.getSigner(),{provider:i}=a;if(!i)throw new Error("No provider found");let r;this.config.network===Pn.Custom?r=1:r=(await i.getNetwork()).chainId;let s=await a.getAddress(),o=await this.contract.functions.getMetatransactionNonce(s),l=c1(["uint256","address","uint256","bytes"],[o.toString(),t,r,e]),p=f1(l),f=await a.signMessage(p),{r:x,s:I,v:_}=m1(f),v={target:t,payload:e,userAddress:s,r:x,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=(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}},Gu=(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=_e.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 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"}],Pi=class{static createInterface(){return new ne.Interface(Mp)}static connect(e,t){return new oe(e,Mp,t)}};Pi.abi=Mp;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 ne.Interface(Cp)}static connect(e,t){return new oe(e,Cp,t)}};Ni.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"}],Di=class{static createInterface(){return new ne.Interface(Ip)}static connect(e,t){return new oe(e,Ip,t)}};Di.abi=Ip;var Sp=[{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 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:[{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 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{AddressZero:w1}=ht,On=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Ba(On.extensionType),e.address);if(t===w1)throw new Error(`${On.extensionType} extension is not installed for this Colony`);let a=await Mr(t,e.config.signerOrProvider);if(!wi(On.extensionType,a,e.version))throw new Error(`Version ${a} of the ${On.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=On.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${On.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new On(e,r,a)}static getLatestSupportedVersion(){return On.supportedVersions[On.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||_e.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[_]),I=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,I,x,s,_e.SkillIgnore]},async _=>({...te("OneTxPaymentMade",_)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Ba(Ae.OneTxPayment),t],async a=>({...te("ExtensionUpgraded",a)}))}},Va=On;Va.supportedVersions=[{version:3,factory:Oi},{version:4,factory:Bi},{version:5,factory:Fi}],Va.extensionType=Ae.OneTxPayment;var Bn=class{constructor(e,t){typeof t=="string"?this.tokenClient=Tn.connect(t,e.config.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=>({...te("Transfer",a)}))}transferFrom(e,t,a){return this.colonyNetwork.createTxCreator(this.tokenClient,"transferFrom",[e,t,a],async i=>({...te("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=>({...te("Approval",a)}))}};var js=class extends Bn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=Nn.connect(a,t.config.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=>({...te("LogSetAuthority",a)}))}setOwner(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setOwner",[t],async a=>({...te("LogSetOwner",a)}))}};var Hs=class extends Bn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=vn.connect(a,t.config.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=>({...te("Approval",i)}))}};var E6=async(n,e)=>{let t=await vp(e,n.config.signerOrProvider);switch(t.tokenClientType){case Dn.Colony:return new js(n,t);case Dn.Erc20:return new Bn(n,t);case Dn.Erc2612:return new Hs(n,t);default:throw new Error("Your token is not supported in Colony SDK (yet).")}};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"},{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 ne.Interface(Np)}static connect(e,t){return new oe(e,Np,t)}};Li.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"},{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 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{AddressZero:Bp}=ht;var zu=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===Bp)throw new Error(`${Fn.extensionType} extension is not installed for this Colony`);let a=await Mr(t,e.config.signerOrProvider);if(!wi(Fn.extensionType,a,e.version))throw new Error(`Version ${a} of the ${Fn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Fn.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${Fn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new Fn(e,r,a)}static getLatestSupportedVersion(){return Fn.supportedVersions[Fn.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 ne.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=>({...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:a,value:i,branchMask:r,siblings:s}=await Ss(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),this.colony.reputation,this.votingReputationContract,e,Bp,Bl);return[e,t,Bp,Bl,a,i,r,s]},async t=>({...te("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.config.ipfs.uploadMetadata(Re.Decision,t),[e,a]},async a=>({...te("Annotation",a)}),{metadataType:Re.Decision})}approveStake(e,t=_e.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{...Gu("UserTokenApproved",a,i.getInternalTokenLockingContract().interface)}})}stakeMotion(e,t,a){let i=async()=>{let r=await this.colony.config.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(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 I=await this.getMinStake(o,t);if(F.from(a).lt(I))throw new Error(`The staked amount is too small. Please stake at least ${Ul(I)}`);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: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=>({...te("MotionStaked",r),...te("MotionEventSet",r)}))}submitVote(e,t){let a=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.config.getSigner().getAddress(),{key:p,value:f,branchMask:x,siblings:I}=await this.colony.reputation.getReputationWithProofs(o,l,s),_=await this.createMotionSalt(e),v=ne.solidityKeccak256(["bytes","uint256"],[_,t]);return[e,v,p,f,x,I]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"submitVote",a,async i=>({...te("MotionVoteSubmitted",i)}))}revealVote(e,t){let a=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.config.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:I,value:_,branchMask:v,siblings:S}=p;return[e,f,F.from(x),I,_,v,S]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"revealVote",a,async i=>({...te("MotionVoteRevealed",i)}))}escalateMotion(e,t){let a=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.config.getSigner().getAddress(),p=await vi(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),t,r),{key:f,value:x,branchMask:I,siblings:_}=await this.colony.reputation.getReputationWithProofs(o,l,s);return[e,t,p,f,x,I,_]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"escalateMotion",a,async i=>({...te("MotionEscalated",i)}))}finalizeMotion(e){let t=async()=>{let a=await this.votingReputationContract.getMotionState(e);if(a!==zt.Finalizable)throw new Error(`Motion cannot be finalized. It's currently in "${zt[a]}" state`);return[e]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"finalizeMotion",t,async a=>({...te("MotionFinalized",a)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Ba(Ae.VotingReputation),t],async a=>({...te("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}}},ja=Fn;ja.supportedVersions=[{version:7,factory:Li},{version:8,factory:Ui},{version:9,factory:Vi}],ja.extensionType=Ae.VotingReputation;var E1={["motion"]:ja,["oneTx"]:Va},Dr=class{static async connect(e,t){let a=await Mr(t,e.config.signerOrProvider),i=Dr.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.config.signerOrProvider),s=await r.getToken(),o=await E6(e,s),l=new Dr(e,r,o,a);return await l.updateExtensions(),l}static getLatestSupportedVersion(){return Dr.supportedVersions[Dr.supportedVersions.length-1].version}constructor(e,t,a,i){this.colony=t,this.colonyNetwork=e,this.config=e.config,this.address=t.address,this.ext={},this.reputation=new na(e.getInternalNetworkContract(),t,{customEndpointUrl:e.config.reputationOracleEndpoint}),this.token=a,this.version=i}createColonyTxCreator(e,t,a,i,r){return new Nr({colony:this,config:this.colonyNetwork.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createPermissionedColonyTxCreator(e,t,a,i,r,s){return new Nr({colony:this,config:this.colonyNetwork.config,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 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.config.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.config.ipfs.uploadMetadata(Re.Domain,e),[_e.RootDomain,t]},{roles:vt.Architecture,domain:_e.RootDomain},async t=>({...te("DomainAdded",t),...te("FundingPotAdded",t),...te("DomainMetadata",t)}),{metadataType:Re.Domain}):this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256)",[_e.RootDomain],{roles:vt.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.config.ipfs.uploadMetadata(Re.Domain,e),[_e.RootDomain,t]},{roles:vt.Architecture,domain:_e.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 a=>({...te("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=>({...te("ColonyFundsClaimed",a)}))}moveFundsToTeam(e,t,a,i){let r=_e.RootDomain,s=a||_e.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(),I=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,I,_,v,S,e,o]},async l=>({...te("ColonyFundsMovedBetweenFundingPots",l)}))}async getReputation(e,t=_e.RootDomain,a=3){let{skillId:i}=await this.colony.getDomain(t);return this.reputation.getReputationFraction(i,e,void 0,a)}async getReputationPoints(e,t=_e.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=>({...te("ArbitraryTransaction(address,address,bytes,bool)",a)}))}annotateTransaction(e,t){return this.createColonyTxCreator(this.colony,"annotateTransaction",async()=>{let a;return typeof t=="string"?a=t:a=await this.config.ipfs.uploadMetadata(Re.Annotation,t),[e,a]},async a=>({...te("Annotation",a)}),{metadataType:Re.Annotation})}installExtension(e){let t=E1[e],a=t.getLatestSupportedVersion(),{extensionType:i}=t;if(!wi(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",[Ba(i),t.getLatestSupportedVersion()],async s=>({...Gu("ExtensionInstalled",s,r.interface)}))}async getRoles(e,t=_e.RootDomain){let a=await this.colony.getUserRoles(e,t);return du(a)}setRoles(e,t,a=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let i=await this.getRoles(e,a),r=Array.from(new Set([...i,...[].concat(t)])),s=Vl(r);return[e,a,s]},{roles:vt.Architecture,domain:a},async i=>({...te("ColonyRoleSet",i),...te("RecoveryRoleSet",i)}))}unsetRoles(e,t,a=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let r=(await this.getRoles(e,a)).filter(o=>![].concat(t).includes(o)),s=Vl(r);return[e,a,s]},{roles:vt.Architecture,domain:a},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 a=[],i=await t.getTokenLocking();return e?a=[...e,i]:a=[i],[this.token.address,this.address,a]},async a=>({...te("TokenAuthorityDeployed",a)}))}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 a=>({...te("ColonyUpgraded",a)}))}awardReputation(e,t,a=_e.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=>({...te("ArbitraryReputationUpdate",i)}))}smiteReputation(e,t,a=_e.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:vt.Arbitration},async i=>({...te("ArbitraryReputationUpdate",i)}))}},Or=Dr;Or.supportedVersions=[{version:11,factory:Pi},{version:12,factory:Ni},{version:13,factory:Di}];var{splitSignature:M1}=ne,Ku=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,a]){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let i=this.contract.signer,{provider:r}=i;if(!r)throw new Error("No provider found");let s;this.config.network===Pn.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:a,nonce:l.toString(),deadline:f}),{r:I,s:_,v}=M1(x),S={target:e,owner:o,spender:t,value:a.toString(),deadline:f,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 qs=class{constructor(e,t){this.address=t,this.colonyNetwork=e,this.tokenLockingContract=wp(this.address,e.config.signerOrProvider)}getInternalTokenLockingContract(){return this.tokenLockingContract}deposit(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"deposit(address,uint256,bool)",[e,t,!1],async a=>({...te("UserTokenDeposited",a)}))}withdraw(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"withdraw(address,uint256,bool)",[e,t,!1],async a=>({...te("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 Gs=class{constructor(e,t){let a=t?.network||Pn.ArbitrumOne;this.metaTxBroadcasterEndpoint=t?.metaTxBroadcasterEndpoint||ou[a],this.ipfs=new Pr(t?.ipfsAdapter),this.network=a,this.reputationOracleEndpoint=t?.reputationOracleEndpoint||Er[a],this.signerOrProvider=e}getSigner(){if(!(this.signerOrProvider instanceof St))throw new Error("Need a signer to create a transaction");return this.signerOrProvider}};var{namehash:M6}=ne,{AddressZero:Fp}=ht,zs=class{constructor(e,t){this.config=new Gs(e,t),this.contract=Ri.connect(t?.customNetworkAddress||su[this.config.network],e)}async getTokenLocking(){if(!this.locking){let e=await this.contract.getTokenLocking();this.locking=new qs(this,e)}return this.locking}getInternalNetworkContract(){return this.contract}createTxCreator(e,t,a,i,r){return new Ta({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createMetaTxCreator(e,t,a,i,r){return new Ua({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createEip2612TxCreator(e,t,a,i,r){return new Ku({config:this.config,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[Fp,e.name,e.symbol,e.decimals||18,0,t,""]}return[e,"","",0,0,t,""]};return a?this.createMetaTxCreator(this.contract,"createColonyForFrontend",async()=>{let r=await i();return typeof a=="string"?r[6]=a:r[6]=await this.config.ipfs.uploadMetadata(Re.Colony,a),r},async r=>({...te("TokenDeployed",r),...te("ColonyAdded",r),...te("TokenAuthorityDeployed",r)}),{metadataType:Re.Colony}):this.createMetaTxCreator(this.contract,"createColonyForFrontend",i,async r=>({...te("TokenDeployed",r),...te("ColonyAdded",r),...te("TokenAuthorityDeployed",r)}))}async getColony(e){return Or.connect(this,e)}async getMetaColony(){let e=await this.contract.getMetaColony();return this.getColony(e)}async getColonyLabel(e){let t=await this.contract.lookupRegisteredENSDomain(e);return t?t.replace(Ms[this.config.network],""):null}async getColonyAddress(e){let t=M6(`${e}${Ms[this.config.network]}`),a=await this.contract.addr(t);return a!==Fp?a:null}async getUsername(e){let t=await this.contract.lookupRegisteredENSDomain(e);return t?t.replace(Cs[this.config.network],""):null}async getUserAddress(e){let t=M6(`${e}${Cs[this.config.network]}`),a=await this.contract.addr(t);return a!==Fp?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.contract,"registerUserLabel",t,async a=>({...te("UserLabelRegistered",a)}))}deployToken(e,t,a=18){return this.createMetaTxCreator(this.contract,"deployTokenViaNetwork",[e,t,a],async i=>({...te("TokenDeployed",i)}))}};var{formatEther:C1,isAddress:I1}=ne,S1=new ea.JsonRpcProvider(Es.ArbitrumOne),R1=async n=>{let a=await(await new zs(S1).getColony(n)).getBalance(Is.ArbitrumOne.CLNY);return C1(a)},Up=document.querySelector("#address"),I6=document.querySelector("#button"),Vp=document.querySelector("#error"),S6=document.querySelector("#result");if(!Up||!I6||!Vp||!S6)throw new Error("Could not find all required HTML elements");var C6=n=>{Vp.innerText=n},P1=()=>{Vp.innerText=""},Lp=n=>{S6.innerText=n};I6.addEventListener("click",async()=>{P1();let n=Up?.value;if(!I1(n))return C6("This is not a valid address");Lp("Thinking..."),Up.value="";let e;try{e=await R1(n),Lp(`${e} CLNY in root domain of Colony with address: ${n}`)}catch(t){C6(`Found an error: ${t.message}`),Lp("")}return null});})(); /** * [js-sha3]{@link https://github.com/emn178/js-sha3} * diff --git a/events.js b/events.js index 47a8afd6f..e5b0f548e 100644 --- a/events.js +++ b/events.js @@ -1,9 +1,9 @@ -"use strict";(()=>{var C6=Object.create;var Hs=Object.defineProperty;var I6=Object.getOwnPropertyDescriptor;var S6=Object.getOwnPropertyNames;var R6=Object.getPrototypeOf,P6=Object.prototype.hasOwnProperty;var N6=(n,e,t)=>e in n?Hs(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var ne=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),Vi=(n,e)=>{for(var t in e)Hs(n,t,{get:e[t],enumerable:!0})},D6=(n,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of S6(e))!P6.call(n,i)&&i!==t&&Hs(n,i,{get:()=>e[i],enumerable:!(a=I6(e,i))||a.enumerable});return n};var wn=(n,e,t)=>(t=n!=null?C6(R6(n)):{},D6(e||!n||!n.__esModule?Hs(t,"default",{value:n,enumerable:!0}):t,n));var xe=(n,e,t)=>(N6(n,typeof e!="symbol"?e+"":e,t),t);var Up=ne(()=>{});var ed=ne((Vp,Zu)=>{(function(n,e){"use strict";function t(C,u){if(!C)throw new Error(u||"Assertion failed")}function a(C,u){C.super_=u;var y=function(){};y.prototype=u.prototype,C.prototype=new y,C.prototype.constructor=C}function i(C,u,y){if(i.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=i:e.BN=i,i.BN=i,i.wordSize=26;var r;try{typeof window<"u"&&typeof window.Buffer<"u"?r=window.Buffer:r=Up().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(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 b=s(C,y);return y-1>=u&&(b|=s(C,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(C,u,y,b){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()},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"],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];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=I[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(C){for(var u=new Array(C.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-C.length+1);P<=c;P++){var D=d-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[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,W=D>>>13,ee=w[2]|0,X=ee&8191,Q=ee>>>13,ft=w[3]|0,Z=ft&8191,le=ft>>>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,Ka=w[8]|0,je=Ka&8191,He=Ka>>>13,Wa=w[9]|0,qe=Wa&8191,Ge=Wa>>>13,Ja=A[0]|0,ze=Ja&8191,Ke=Ja>>>13,$a=A[1]|0,We=$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,Ke),d=d+Math.imul(P,ze)|0,m=Math.imul(P,Ke);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,Ke),d=d+Math.imul(W,ze)|0,m=Math.imul(W,Ke),g=g+Math.imul(c,We)|0,d=d+Math.imul(c,Je)|0,d=d+Math.imul(P,We)|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,Ke),d=d+Math.imul(Q,ze)|0,m=Math.imul(Q,Ke),g=g+Math.imul(V,We)|0,d=d+Math.imul(V,Je)|0,d=d+Math.imul(W,We)|0,m=m+Math.imul(W,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,Ke),d=d+Math.imul(le,ze)|0,m=Math.imul(le,Ke),g=g+Math.imul(X,We)|0,d=d+Math.imul(X,Je)|0,d=d+Math.imul(Q,We)|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(W,$e)|0,m=m+Math.imul(W,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,Ke),d=d+Math.imul(De,ze)|0,m=Math.imul(De,Ke),g=g+Math.imul(Z,We)|0,d=d+Math.imul(Z,Je)|0,d=d+Math.imul(le,We)|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(W,Xe)|0,m=m+Math.imul(W,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,Ke),d=d+Math.imul(Be,ze)|0,m=Math.imul(Be,Ke),g=g+Math.imul(Ne,We)|0,d=d+Math.imul(Ne,Je)|0,d=d+Math.imul(De,We)|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(W,Ze)|0,m=m+Math.imul(W,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 Uu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Uu>>>26)|0,Uu&=67108863,g=Math.imul(Fe,ze),d=Math.imul(Fe,Ke),d=d+Math.imul(Le,ze)|0,m=Math.imul(Le,Ke),g=g+Math.imul(Oe,We)|0,d=d+Math.imul(Oe,Je)|0,d=d+Math.imul(Be,We)|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(W,tt)|0,m=m+Math.imul(W,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 Vu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Vu>>>26)|0,Vu&=67108863,g=Math.imul(Ue,ze),d=Math.imul(Ue,Ke),d=d+Math.imul(Ve,ze)|0,m=Math.imul(Ve,Ke),g=g+Math.imul(Fe,We)|0,d=d+Math.imul(Fe,Je)|0,d=d+Math.imul(Le,We)|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(W,at)|0,m=m+Math.imul(W,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,Ke),d=d+Math.imul(He,ze)|0,m=Math.imul(He,Ke),g=g+Math.imul(Ue,We)|0,d=d+Math.imul(Ue,Je)|0,d=d+Math.imul(Ve,We)|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(W,rt)|0,m=m+Math.imul(W,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 Hu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Hu>>>26)|0,Hu&=67108863,g=Math.imul(qe,ze),d=Math.imul(qe,Ke),d=d+Math.imul(Ge,ze)|0,m=Math.imul(Ge,Ke),g=g+Math.imul(je,We)|0,d=d+Math.imul(je,Je)|0,d=d+Math.imul(He,We)|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(W,ot)|0,m=m+Math.imul(W,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,We),d=Math.imul(qe,Je),d=d+Math.imul(Ge,We)|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(W,dt)|0,m=m+Math.imul(W,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,$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 zu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(zu>>>26)|0,zu&=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 Wu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Wu>>>26)|0,Wu&=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 Ju=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Ju>>>26)|0,Ju&=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 $u=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+($u>>>26)|0,$u&=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 Qu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Qu>>>26)|0,Qu&=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 Xu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Xu>>>26)|0,Xu&=67108863,g=Math.imul(qe,dt),d=Math.imul(qe,lt),d=d+Math.imul(Ge,dt)|0,m=Math.imul(Ge,lt);var Yu=(k+g|0)+((d&8191)<<13)|0;return k=(m+(d>>>13)|0)+(Yu>>>26)|0,Yu&=67108863,h[0]=Ta,h[1]=va,h[2]=wa,h[3]=_a,h[4]=ka,h[5]=Uu,h[6]=Vu,h[7]=ju,h[8]=Hu,h[9]=qu,h[10]=Gu,h[11]=zu,h[12]=Ku,h[13]=Wu,h[14]=Ju,h[15]=$u,h[16]=Qu,h[17]=Xu,h[18]=Yu,k!==0&&(h[19]=k,b.length++),b};Math.imul||(O=L);function U(C,u,y){y.negative=u.negative^C.negative,y.length=C.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(C,u,y){return U(C,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(C,u){this.x=C,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 $(C,u){this.name=C,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(C){if(typeof C=="string"){var u=i._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 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(C){q.call(this,C),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 Zu>"u"||Zu,Vp)});var py=ne((hg,Js)=>{(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 Js=="object"&&Js.exports,o=typeof define=="function"&&define.amd,l=!a.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",p="0123456789abcdef".split(""),f=[31,7936,2031616,520093696],x=[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};(a.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(c){return Object.prototype.toString.call(c)==="[object Array]"}),l&&(a.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,W){return new d(c,P,W).update(V)[D]()}},$=function(c,P,D){return function(V,W,ee,X){return u["cshake"+c].update(V,W,ee,X)[D]()}},de=function(c,P,D){return function(V,W,ee,X){return u["kmac"+c].update(V,W,ee,X)[D]()}},T=function(c,P,D,V){for(var W=0;W>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(n);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(n)}else throw new Error(n);P=!0}for(var V=this.blocks,W=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)<=W){for(this.start=Z-W,this.block=V[X],Z=0;Z>8,D=c&255;D>0;)W.unshift(D),c=c>>8,D=c&255,++V;return P?W.push(V):W.unshift(V),this.update(W),W.length},d.prototype.encodeString=function(c){var P,D=typeof c;if(D!=="string"){if(D==="object"){if(c===null)throw new Error(n);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(n)}else throw new Error(n);P=!0}var V=0,W=c.length;if(P)V=W;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),W=0)}return V&&(Q=P[W],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,W=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[W],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,W,ee,X,Q,ft,Z,le,Ha,Ne,De,qa,Oe,Be,Ga,Fe,Le,za,Ue,Ve,Ka,je,He,Wa,qe,Ge,Ja,ze,Ke,$a,We,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,Ta,va,wa,_a,ka;for(V=0;V<48;V+=2)W=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],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=W^(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|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=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^(W<<1|ee>>>31),D=Ha^(ee<<1|W>>>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,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,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,Ke=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,ti=c[34]<<15|c[35]>>>17,rt=c[35]<<15|c[34]>>>17,$a=c[45]<<29|c[44]>>>3,We=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,Wa=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,Ya=c[39]<<8|c[38]>>>24,Ve=c[48]<<14|c[49]>>>18,Ka=c[49]<<14|c[48]>>>18,c[0]=qa^~Be&Fe,c[1]=Oe^~Ga&Le,c[10]=je^~Wa&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&Ta,c[2]=Be^~Fe&za,c[3]=Ga^~Le&Ue,c[12]=Wa^~Ge&ze,c[13]=qe^~Ja&Ke,c[22]=$e^~Xa&Ye,c[23]=Qe^~Xe&Ya,c[32]=nt^~at&ti,c[33]=ei^~it&rt,c[42]=ai^~lt&va,c[43]=dt^~Ta&wa,c[4]=Fe^~za&Ve,c[5]=Le^~Ue&Ka,c[14]=Ge^~ze&$a,c[15]=Ja^~Ke&We,c[24]=Xa^~Ye&Ze,c[25]=Xe^~Ya&et,c[34]=at^~ti&st,c[35]=it^~rt&ni,c[44]=lt^~va&_a,c[45]=Ta^~wa&ka,c[6]=za^~Ve&qa,c[7]=Ue^~Ka&Oe,c[16]=ze^~$a&je,c[17]=Ke^~We&He,c[26]=Ye^~Ze&Je,c[27]=Ya^~et&Qa,c[36]=ti^~st&Za,c[37]=rt^~ni&tt,c[46]=va^~_a&ot,c[47]=wa^~ka&ut,c[8]=Ve^~qa&Be,c[9]=Ka^~Oe&Ga,c[18]=$a^~je&Wa,c[19]=We^~He&qe,c[28]=Ze^~Je&$e,c[29]=et^~Qa&Qe,c[38]=st^~Za&nt,c[39]=ni^~tt&ei,c[48]=_a^~ot&ai,c[49]=ka^~ut&dt,c[0]^=S[V],c[1]^=S[V+1]};if(s)Js.exports=u;else{for(b=0;b{s0.exports=r0;function r0(n,e){if(!n)throw new Error(e||"Assertion failed")}r0.equal=function(e,t,a){if(e!=t)throw new Error(a||"Assertion failed: "+e+" != "+t)}});var o0=ne((u3,Md)=>{typeof Object.create=="function"?Md.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Md.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 kn=ne(Pe=>{"use strict";var U2=tr(),V2=o0();Pe.inherits=V2;function j2(n,e){return(n.charCodeAt(e)&64512)!==55296||e<0||e+1>=n.length?!1:(n.charCodeAt(e+1)&64512)===56320}function H2(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):j2(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}Pe.htonl=u0;function G2(n,e){for(var t="",a=0;a>>0}return r}Pe.join32=z2;function K2(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}Pe.split32=K2;function W2(n,e){return n>>>e|n<<32-e}Pe.rotr32=W2;function J2(n,e){return n<>>32-e}Pe.rotl32=J2;function $2(n,e){return n+e>>>0}Pe.sum32=$2;function Q2(n,e,t){return n+e+t>>>0}Pe.sum32_3=Q2;function X2(n,e,t,a){return n+e+t+a>>>0}Pe.sum32_4=X2;function Y2(n,e,t,a,i){return n+e+t+a+i>>>0}Pe.sum32_5=Y2;function Z2(n,e,t,a){var i=n[e],r=n[e+1],s=a+r>>>0,o=(s>>0,n[e+1]=s}Pe.sum64=Z2;function eh(n,e,t,a){var i=e+a>>>0,r=(i>>0}Pe.sum64_hi=eh;function th(n,e,t,a){var i=e+a;return i>>>0}Pe.sum64_lo=th;function nh(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}Pe.sum64_4_hi=nh;function ah(n,e,t,a,i,r,s,o){var l=e+a+r+o;return l>>>0}Pe.sum64_4_lo=ah;function ih(n,e,t,a,i,r,s,o,l,p){var f=0,x=e;x=x+a>>>0,f+=x>>0,f+=x>>0,f+=x>>0,f+=x>>0}Pe.sum64_5_hi=ih;function rh(n,e,t,a,i,r,s,o,l,p){var f=e+a+r+o+p;return f>>>0}Pe.sum64_5_lo=rh;function sh(n,e,t){var a=e<<32-t|n>>>t;return a>>>0}Pe.rotr64_hi=sh;function oh(n,e,t){var a=n<<32-t|e>>>t;return a>>>0}Pe.rotr64_lo=oh;function uh(n,e,t){return n>>>t}Pe.shr64_hi=uh;function dh(n,e,t){var a=n<<32-t|e>>>t;return a>>>0}Pe.shr64_lo=dh});var nr=ne(y0=>{"use strict";var p0=kn(),lh=tr();function ho(){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=ho;ho.prototype.update=function(e,t){if(e=p0.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=p0.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 ph=kn(),jn=ph.rotr32;function yh(n,e,t,a){if(n===0)return f0(e,t,a);if(n===1||n===3)return m0(e,t,a);if(n===2)return c0(e,t,a)}ua.ft_1=yh;function f0(n,e,t){return n&e^~n&t}ua.ch32=f0;function c0(n,e,t){return n&e^n&t^e&t}ua.maj32=c0;function m0(n,e,t){return n^e^t}ua.p32=m0;function fh(n){return jn(n,2)^jn(n,13)^jn(n,22)}ua.s0_256=fh;function ch(n){return jn(n,6)^jn(n,11)^jn(n,25)}ua.s1_256=ch;function mh(n){return jn(n,7)^jn(n,18)^n>>>3}ua.g0_256=mh;function hh(n){return jn(n,17)^jn(n,19)^n>>>10}ua.g1_256=hh});var b0=ne((y3,x0)=>{"use strict";var ar=kn(),xh=nr(),bh=Cd(),Id=ar.rotl32,Jr=ar.sum32,gh=ar.sum32_5,Th=bh.ft_1,h0=xh.BlockHash,vh=[1518500249,1859775393,2400959708,3395469782];function Hn(){if(!(this instanceof Hn))return new Hn;h0.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}ar.inherits(Hn,h0);x0.exports=Hn;Hn.blockSize=512;Hn.outSize=160;Hn.hmacStrength=80;Hn.padLength=64;Hn.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 ir=kn(),wh=nr(),rr=Cd(),_h=tr(),An=ir.sum32,kh=ir.sum32_4,Ah=ir.sum32_5,Eh=rr.ch32,Mh=rr.maj32,Ch=rr.s0_256,Ih=rr.s1_256,Sh=rr.g0_256,Rh=rr.g1_256,g0=wh.BlockHash,Ph=[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;g0.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=Ph,this.W=new Array(64)}ir.inherits(qn,g0);T0.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 Rd=kn(),v0=Sd();function da(){if(!(this instanceof da))return new da;v0.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}Rd.inherits(da,v0);w0.exports=da;da.blockSize=512;da.outSize=224;da.hmacStrength=192;da.padLength=64;da.prototype._digest=function(e){return e==="hex"?Rd.toHex32(this.h.slice(0,7),"big"):Rd.split32(this.h.slice(0,7),"big")}});var Dd=ne((m3,M0)=>{"use strict";var Qt=kn(),Nh=nr(),Dh=tr(),Gn=Qt.rotr64_hi,zn=Qt.rotr64_lo,k0=Qt.shr64_hi,A0=Qt.shr64_lo,Ia=Qt.sum64,Pd=Qt.sum64_hi,Nd=Qt.sum64_lo,Oh=Qt.sum64_4_hi,Bh=Qt.sum64_4_lo,Fh=Qt.sum64_5_hi,Lh=Qt.sum64_5_lo,E0=Nh.BlockHash,Uh=[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;E0.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=Uh,this.W=new Array(160)}Qt.inherits(En,E0);M0.exports=En;En.blockSize=1024;En.outSize=512;En.hmacStrength=192;En.padLength=128;En.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 Od=kn(),C0=Dd();function la(){if(!(this instanceof la))return new la;C0.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}Od.inherits(la,C0);I0.exports=la;la.blockSize=1024;la.outSize=384;la.hmacStrength=192;la.padLength=128;la.prototype._digest=function(e){return e==="hex"?Od.toHex32(this.h.slice(0,12),"big"):Od.split32(this.h.slice(0,12),"big")}});var R0=ne(sr=>{"use strict";sr.sha1=b0();sr.sha224=_0();sr.sha256=Sd();sr.sha384=S0();sr.sha512=Dd()});var F0=ne(B0=>{"use strict";var li=kn(),Yh=nr(),xo=li.rotl32,P0=li.sum32,$r=li.sum32_3,N0=li.sum32_4,O0=Yh.BlockHash;function Kn(){if(!(this instanceof Kn))return new Kn;O0.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}li.inherits(Kn,O0);B0.ripemd160=Kn;Kn.blockSize=512;Kn.outSize=160;Kn.hmacStrength=192;Kn.padLength=64;Kn.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,f=r,x=s,I=o,_=0;_<80;_++){var v=P0(xo(N0(a,D0(_,i,r,s),e[tx[_]+t],Zh(_)),ax[_]),o);a=o,o=s,s=xo(r,10),r=i,i=v,v=P0(xo(N0(l,D0(79-_,p,f,x),e[nx[_]+t],ex(_)),ix[_]),I),l=I,I=x,x=xo(f,10),f=p,p=v}v=$r(this.h[1],r,x),this.h[1]=$r(this.h[2],s,I),this.h[2]=$r(this.h[3],o,l),this.h[3]=$r(this.h[4],a,p),this.h[4]=$r(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 D0(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 Zh(n){return n<=15?0:n<=31?1518500249:n<=47?1859775393:n<=63?2400959708:2840853838}function ex(n){return n<=15?1352829926:n<=31?1548603684:n<=47?1836072691:n<=63?2053994217:0}var tx=[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],nx=[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],ax=[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],ix=[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 U0=ne((g3,L0)=>{"use strict";var rx=kn(),sx=tr();function or(n,e,t){if(!(this instanceof or))return new or(n,e,t);this.Hash=n,this.blockSize=n.blockSize/8,this.outSize=n.outSize/8,this.inner=null,this.outer=null,this._init(rx.toArray(e,t))}L0.exports=or;or.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),sx(e.length<=this.blockSize);for(var t=e.length;t{var St=V0;St.utils=kn();St.common=nr();St.sha=R0();St.ripemd=F0();St.hmac=U0();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 tl=ne((el,mf)=>{"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&&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],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],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,W=P%4,this._Ke[V][W]=m[k],this._Kd[h-V][W]=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=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,G=J,c=$,P,D,V,W,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],W=(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]=(W+de[D-7]|0)+(ee+de[D-16]|0)|0;for(D=0;D<64;D++)W=(((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+W|0,g=k,k=h,h=A,A=W+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,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,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 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=a(_,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=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 I={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 sl<"u"?xf.exports=I:typeof define=="function"&&define.amd?define(I):n&&(n.scrypt&&(n._scrypt=n.scrypt),n.scrypt=I)})(sl)});var Hf=ne((u4,jf)=>{"use strict";var jo="qpzry9x8gf2tvdw0s3jn54khce6mua7l",pl={};for(rs=0;rs>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 Uf(n){for(var e=1,t=0;t126)return"Invalid prefix ("+n+")";e=hr(e)^a>>5}for(e=hr(e),t=0;tt)throw new TypeError("Exceeds length limit");n=n.toLowerCase();var a=Uf(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=hr(a)^s,i+=jo.charAt(s)}for(r=0;r<6;++r)a=hr(a);for(a^=1,r=0;r<6;++r){var o=a>>(5-r)*5&31;i+=jo.charAt(o)}return i}function Vf(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=Uf(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 Gx(){var n=Vf.apply(null,arguments);if(typeof n=="object")return n}function zx(n){var e=Vf.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function Ho(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 Gl=="object"&&typeof zl<"u"?zl.exports=e():typeof define=="function"&&define.amd?define(e):(n=typeof globalThis<"u"?globalThis:n||self,n.fetchRetry=e())})(Gl,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,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(I,_){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)I(U);else if(typeof x=="function")try{return Promise.resolve(x(L,null,U)).then(function(H){H?S(L,null,U):I(U)}).catch(_)}catch(H){_(H)}else L=0}function t(a){this.name="ArgumentError",this.message=a}return n})});var Kl=ne(au=>{"use strict";Object.defineProperty(au,"__esModule",{value:!0});au.$dictionary=void 0;au.$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 Cs=ne((mA,nm)=>{nm.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}});var Jl=ne(Ba=>{var Ee=Cs(),Wl=()=>[{type:Ee.RANGE,from:48,to:57}],am=()=>[{type:Ee.CHAR,value:95},{type:Ee.RANGE,from:97,to:122},{type:Ee.RANGE,from:65,to:90}].concat(Wl()),im=()=>[{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}],B5=()=>[{type:Ee.CHAR,value:10},{type:Ee.CHAR,value:13},{type:Ee.CHAR,value:8232},{type:Ee.CHAR,value:8233}];Ba.words=()=>({type:Ee.SET,set:am(),not:!1});Ba.notWords=()=>({type:Ee.SET,set:am(),not:!0});Ba.ints=()=>({type:Ee.SET,set:Wl(),not:!1});Ba.notInts=()=>({type:Ee.SET,set:Wl(),not:!0});Ba.whitespace=()=>({type:Ee.SET,set:im(),not:!1});Ba.notWhitespace=()=>({type:Ee.SET,set:im(),not:!0});Ba.anyChar=()=>({type:Ee.SET,set:B5(),not:!0})});var sm=ne(Is=>{var rm=Cs(),Er=Jl(),F5="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?",L5={0:0,t:9,n:10,v:11,f:12,r:13};Is.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 f=a?8:r?parseInt(r,16):s?parseInt(s,16):o?parseInt(o,8):l?F5.indexOf(l):L5[p],x=String.fromCharCode(f);return/[[\]{}^$.|?*+()]/.test(x)&&(x="\\"+x),x}),n};Is.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(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:rm.RANGE,from:(i[8]||i[9]).charCodeAt(0),to:i[10].charCodeAt(0)});else if(r=i[12])t.push({type:rm.CHAR,value:r.charCodeAt(0)});else return[t,a.lastIndex];Is.error(e,"Unterminated character class")};Is.error=(n,e)=>{throw new SyntaxError("Invalid regular expression: /"+n+"/: "+e)}});var om=ne(Ss=>{var iu=Cs();Ss.wordBoundary=()=>({type:iu.POSITION,value:"b"});Ss.nonWordBoundary=()=>({type:iu.POSITION,value:"B"});Ss.begin=()=>({type:iu.POSITION,value:"^"});Ss.end=()=>({type:iu.POSITION,value:"$"})});var um=ne((gA,$l)=>{var Mr=sm(),xn=Cs(),_i=Jl(),ru=om();$l.exports=n=>{var e=0,t,a,i={type:xn.ROOT,stack:[]},r=i,s=i.stack,o=[],l=O=>{Mr.error(n,`Nothing to repeat at column ${O-1}`)},p=Mr.strToChars(n);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 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}))}};dm.exports=Fa});var ym=ne((vA,pm)=>{var su=um(),Rs=lm(),ki=su.types;pm.exports=class Ps{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=su(e)}_setDefaults(e){this.max=e.max!=null?e.max:Ps.prototype.max!=null?Ps.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 ki.ROOT:case ki.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 U5=Ai&&Ai.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ai,"__esModule",{value:!0});Ai.RandomGenerator=void 0;var V5=U5(ym()),j5;(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 V5.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()}})(j5=Ai.RandomGenerator||(Ai.RandomGenerator={}))});var Ns=ne(Cr=>{"use strict";var H5=Cr&&Cr.__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(Cr,"__esModule",{value:!0});Cr.TypeGuardError=void 0;var q5=function(n){H5(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);Cr.TypeGuardError=q5});var cm=ne(ou=>{"use strict";Object.defineProperty(ou,"__esModule",{value:!0});ou.$any=void 0;var G5=function(n){return n!==void 0?JSON.parse(JSON.stringify(n)):void 0};ou.$any=G5});var mm=ne(uu=>{"use strict";Object.defineProperty(uu,"__esModule",{value:!0});uu.$every=void 0;var z5=function(n,e){for(var t=null,a=0;a{"use strict";Object.defineProperty(du,"__esModule",{value:!0});du.$guard=void 0;var K5=Ns(),W5=function(n){return function(e,t){if(e===!0)throw new K5.TypeGuardError({method:n,path:t.path,expected:t.expected,value:t.value});return!1}};du.$guard=W5});var xm=ne(lu=>{"use strict";Object.defineProperty(lu,"__esModule",{value:!0});lu.$is_between=void 0;var J5=function(n,e,t){return e<=n&&n<=t};lu.$is_between=J5});var bm=ne(pu=>{"use strict";Object.defineProperty(pu,"__esModule",{value:!0});pu.$is_custom=void 0;var $5=Kl(),Q5=function(n,e,t,a){var i,r=(i=$5.$dictionary.get(n))===null||i===void 0?void 0:i.get(e);return r===void 0?!0:r(t)(a)};pu.$is_custom=Q5});var gm=ne(yu=>{"use strict";Object.defineProperty(yu,"__esModule",{value:!0});yu.$is_date=void 0;var X5=function(n){return Y5.test(n)};yu.$is_date=X5;var Y5=/^(\d{4})-(\d{2})-(\d{2})$/});var Tm=ne(fu=>{"use strict";Object.defineProperty(fu,"__esModule",{value:!0});fu.$is_datetime=void 0;var Z5=function(n){return!isNaN(new Date(n).getTime())};fu.$is_datetime=Z5});var vm=ne(cu=>{"use strict";Object.defineProperty(cu,"__esModule",{value:!0});cu.$is_email=void 0;var eb=function(n){return tb.test(n)};cu.$is_email=eb;var tb=/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i});var wm=ne(mu=>{"use strict";Object.defineProperty(mu,"__esModule",{value:!0});mu.$is_ipv4=void 0;var nb=function(n){return ab.test(n)};mu.$is_ipv4=nb;var ab=/^(?: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 _m=ne(hu=>{"use strict";Object.defineProperty(hu,"__esModule",{value:!0});hu.$is_ipv6=void 0;var ib=function(n){return rb.test(n)};hu.$is_ipv6=ib;var rb=/^(([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 km=ne(xu=>{"use strict";Object.defineProperty(xu,"__esModule",{value:!0});xu.$is_url=void 0;var sb=function(n){return ob.test(n)};xu.$is_url=sb;var ob=/^[a-zA-Z0-9]+:\/\/(?:www.)?[-a-zA-Z0-9@:%._+~#=]{1,256}.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/});var Am=ne(bu=>{"use strict";Object.defineProperty(bu,"__esModule",{value:!0});bu.$is_uuid=void 0;var ub=function(n){return db.test(n)};bu.$is_uuid=ub;var db=/^(?:[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 Em=ne(gu=>{"use strict";Object.defineProperty(gu,"__esModule",{value:!0});gu.$join=void 0;var lb=function(n){return pb(n)?".".concat(n):"[".concat(JSON.stringify(n),"]")};gu.$join=lb;var pb=function(n){return yb(n)===!1&&/^[a-zA-Z_$][a-zA-Z_$0-9]*$/g.test(n)},yb=function(n){return fb.has(n)},fb=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 Mm=ne(Tu=>{"use strict";Object.defineProperty(Tu,"__esModule",{value:!0});Tu.$number=void 0;var cb=Ns(),mb=function(n){if(isFinite(n)===!1)throw new cb.TypeGuardError({method:"typia.stringify",expected:"number",value:n,message:"Error on typia.stringify(): infinite or not a number."});return n};Tu.$number=mb});var Cm=ne(vu=>{"use strict";Object.defineProperty(vu,"__esModule",{value:!0});vu.$report=void 0;var hb=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}};vu.$report=hb});var Im=ne(wu=>{"use strict";Object.defineProperty(wu,"__esModule",{value:!0});wu.$rest=void 0;var xb=function(n){return n.length===2?"":","+n.substring(1,n.length-1)};wu.$rest=xb});var Sm=ne(_u=>{"use strict";Object.defineProperty(_u,"__esModule",{value:!0});_u.$string=void 0;var bb=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,'"')};_u.$string=bb});var Rm=ne(ku=>{"use strict";Object.defineProperty(ku,"__esModule",{value:!0});ku.$tail=void 0;var gb=function(n){return n[n.length-1]===","?n.substring(0,n.length-1):n};ku.$tail=gb});var Om=ne(Ei=>{"use strict";var Ut=Ei&&Ei.__assign||function(){return Ut=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 Ut(Ut({},n.is()),{number:Pb.$number,string:Ob.$string,tail:Bb.$tail,rest:Db.$rest,throws:e(t)})},n.clone=function(t){return Ut(Ut({},n.is()),{throws:e(t),any:Tb.$any})},n.prune=function(t){return Ut(Ut({},n.is()),{throws:e(t)})},n.random=function(){return{generator:Pm.RandomGenerator,pick:Pm.RandomGenerator.pick}};var e=function(t){return function(a){throw new Nm.TypeGuardError(Ut(Ut({},a),{method:"typia.".concat(t)}))}}})(Fb=Ei.Namespace||(Ei.Namespace={}))});var Bm=ne(Ds=>{"use strict";Object.defineProperty(Ds,"__esModule",{value:!0});Ds.MapUtil=void 0;var Lb;(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}}})(Lb=Ds.MapUtil||(Ds.MapUtil={}))});var Lm=ne(Fm=>{"use strict";Object.defineProperty(Fm,"__esModule",{value:!0})});var Vm=ne(Um=>{"use strict";Object.defineProperty(Um,"__esModule",{value:!0})});var Hm=ne(jm=>{"use strict";Object.defineProperty(jm,"__esModule",{value:!0})});var Gm=ne(qm=>{"use strict";Object.defineProperty(qm,"__esModule",{value:!0})});var Km=ne(zm=>{"use strict";Object.defineProperty(zm,"__esModule",{value:!0})});var Jm=ne(Wm=>{"use strict";Object.defineProperty(Wm,"__esModule",{value:!0})});var up=ne(z=>{"use strict";var Ub=z&&z.__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]}),Mi=z&&z.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Ub(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 Ir=Kl(),Me=Om(),Vb=Bm();Mi(Lm(),z);Mi(Vm(),z);Mi(Hm(),z);Mi(Gm(),z);Mi(Km(),z);Mi(Jm(),z);Mi(Ns(),z);function Ql(){re("assert")}z.assert=Ql;Object.assign(Ql,Me.Namespace.assert("assert"));function Xl(){re("assertType")}z.assertType=Xl;Object.assign(Xl,Me.Namespace.assert("assertType"));function Au(){re("is")}z.is=Au;Object.assign(Au,Me.Namespace.assert("is"));function Eu(){re("validate")}z.validate=Eu;Object.assign(Eu,Me.Namespace.validate());function Yl(){re("assertEquals")}z.assertEquals=Yl;Object.assign(Yl,Me.Namespace.assert("assertEquals"));function Zl(){re("equals")}z.equals=Zl;Object.assign(Zl,Me.Namespace.is());function ep(){re("validateEquals")}z.validateEquals=ep;Object.assign(ep,Me.Namespace.validate());z.customValidators={size:function(n){var e,t;return n?(t=(e=Ir.$dictionary.get(n))===null||e===void 0?void 0:e.size)!==null&&t!==void 0?t:0:Ir.$dictionary.size},has:function(n){return function(e){var t,a;return(a=(t=Ir.$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=Ir.$dictionary.get(n))===null||t===void 0?void 0:t.get(e)}},insert:function(n){return function(e){return function(t){var a=Vb.MapUtil.take(Ir.$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=Ir.$dictionary.get(n))===null||t===void 0?void 0:t.delete(e))!==null&&a!==void 0?a:!1}}};function jb(){re("application")}z.application=jb;function tp(){re("assertParse")}z.assertParse=tp;Object.assign(tp,Me.Namespace.assert("assertParse"));function np(){re("isParse")}z.isParse=np;Object.assign(np,Au);function ap(){re("validateParse")}z.validateParse=ap;Object.assign(ap,Eu);function ip(){re("stringify")}z.stringify=ip;Object.assign(ip,Me.Namespace.stringify("stringify"));function Mu(){re("assertStringify")}z.assertStringify=Mu;Object.assign(Mu,Me.Namespace.assert("assertStringify"));Object.assign(Mu,Me.Namespace.stringify("assertStringify"));function Cu(){re("isStringify")}z.isStringify=Cu;Object.assign(Cu,Me.Namespace.is());Object.assign(Cu,Me.Namespace.stringify("isStringify"));function Iu(){re("validateStringify")}z.validateStringify=Iu;Object.assign(Iu,Me.Namespace.validate());Object.assign(Iu,Me.Namespace.stringify("validateStringify"));function Hb(){re("metadata")}z.metadata=Hb;function rp(){re("random")}z.random=rp;Object.assign(rp,Me.Namespace.random());function qb(){re("literals")}z.literals=qb;function sp(){re("clone")}z.clone=sp;Object.assign(sp,Me.Namespace.clone("clone"));function Su(){re("assertClone")}z.assertClone=Su;Object.assign(Su,Me.Namespace.assert("assertClone"));Object.assign(Su,Me.Namespace.clone("assertClone"));function Ru(){re("isClone")}z.isClone=Ru;Object.assign(Ru,Me.Namespace.is());Object.assign(Ru,Me.Namespace.clone("isClone"));function Pu(){re("validateClone")}z.validateClone=Pu;Object.assign(Pu,Me.Namespace.validate());Object.assign(Pu,Me.Namespace.clone("validateClone"));function op(){re("prune")}z.prune=op;Object.assign(op,Me.Namespace.prune("prune"));function Nu(){re("assertPrune")}z.assertPrune=Nu;Object.assign(Nu,Me.Namespace.assert("assertPrune"));Object.assign(Nu,Me.Namespace.prune("assertPrune"));function Du(){re("isPrune")}z.isPrune=Du;Object.assign(Du,Me.Namespace.is());Object.assign(Du,Me.Namespace.prune("isPrune"));function Ou(){re("validatePrune")}z.validatePrune=Ou;Object.assign(Ou,Me.Namespace.prune("validatePrune"));Object.assign(Ou,Me.Namespace.validate());function $m(){re("createAssert")}z.createAssert=$m;Object.assign($m,Ql);function Qm(){re("createAssertType")}z.createAssertType=Qm;Object.assign(Qm,Xl);function Xm(){re("createIs")}z.createIs=Xm;Object.assign(Xm,Au);function Ym(){re("createValidate")}z.createValidate=Ym;Object.assign(Ym,Eu);function Zm(){re("createAssertEquals")}z.createAssertEquals=Zm;Object.assign(Zm,Yl);function e6(){re("createEquals")}z.createEquals=e6;Object.assign(e6,Zl);function t6(){re("createValidateEquals")}z.createValidateEquals=t6;Object.assign(t6,ep);function n6(){re("createIsParse")}z.createIsParse=n6;Object.assign(n6,np);function a6(){re("createAssertParse")}z.createAssertParse=a6;Object.assign(a6,tp);function i6(){re("createValidateParse")}z.createValidateParse=i6;Object.assign(i6,ap);function r6(){re("createStringify")}z.createStringify=r6;Object.assign(r6,ip);function s6(){re("createAssertStringify")}z.createAssertStringify=s6;Object.assign(s6,Mu);function o6(){re("createIsStringify")}z.createIsStringify=o6;Object.assign(o6,Cu);function u6(){re("createValidateStringify")}z.createValidateStringify=u6;Object.assign(u6,Iu);function d6(){re("createRandom")}z.createRandom=d6;Object.assign(d6,rp);function l6(){re("createClone")}z.createClone=l6;Object.assign(l6,sp);function p6(){re("createAssertClone")}z.createAssertClone=p6;Object.assign(p6,Su);function y6(){re("createIsClone")}z.createIsClone=y6;Object.assign(y6,Ru);function f6(){re("createValidateClone")}z.createValidateClone=f6;Object.assign(f6,Pu);function c6(){re("createPrune")}z.createPrune=c6;Object.assign(c6,op);function m6(){re("createAssertPrune")}z.createAssertPrune=m6;Object.assign(m6,Nu);function h6(){re("createIsPrune")}z.createIsPrune=h6;Object.assign(h6,Du);function x6(){re("createValidatePrune")}z.createValidatePrune=x6;Object.assign(x6,Ou);function re(n){throw new Error("Error on typia.".concat(n,'(): no transform has been configured. Run "npx typia setup" command.'))}});var g6=ne(gn=>{"use strict";var b6=gn&&gn.__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]}),Gb=gn&&gn.__setModuleDefault||(Object.create?function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}:function(n,e){n.default=e}),zb=gn&&gn.__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)&&b6(e,n,t);return Gb(e,n),e},Kb=gn&&gn.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&b6(e,n,t)};Object.defineProperty(gn,"__esModule",{value:!0});var Wb=zb(up());gn.default=Wb;Kb(up(),gn)});var El={};Vi(El,{BaseContract:()=>dr,BigNumber:()=>F,Contract:()=>oe,ContractFactory:()=>ci,FixedNumber:()=>ct,Signer:()=>Gt,VoidSigner:()=>oa,Wallet:()=>Cn,Wordlist:()=>hn,constants:()=>yt,errors:()=>Kt,getDefaultProvider:()=>Zo,logger:()=>_c,providers:()=>Zn,utils:()=>te,version:()=>tu,wordlists:()=>hi});var Yp=wn(ed());var jp="logger/5.7.0";var Hp=!1,qp=!1,qs={debug:1,default:2,info:2,warning:3,error:4,off:5},Gp=qs.default,td=null;function O6(){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 zp=O6(),nd;(function(n){n.DEBUG="DEBUG",n.INFO="INFO",n.WARNING="WARNING",n.ERROR="ERROR",n.OFF="OFF"})(nd||(nd={}));var Kt;(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"})(Kt||(Kt={}));var Kp="0123456789abcdef",E=class{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){let a=e.toLowerCase();qs[a]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(Gp>qs[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(qp)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 f="";for(let x=0;x>4],f+=Kp[p[x]&15];i.push(l+"=Uint8Array(0x"+f+")")}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 Kt.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 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+" ]"),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"),zp&&this.throwError("platform missing String.prototype.normalize",E.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:zp})}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 td||(td=new E(jp)),td}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",E.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),Hp){if(!e)return;this.globalLogger().throwError("error censorship permanent",E.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}qp=!!e,Hp=!!t}static setLogLevel(e){let t=qs[e.toLowerCase()];if(t==null){E.globalLogger().warn("invalid log level - "+e);return}Gp=t}static from(e){return new E(e)}};E.errors=Kt;E.levels=nd;var Wp="bytes/5.7.0";var wt=new E(Wp);function $p(n){return!!n.toHexString}function ji(n){return n.slice||(n.slice=function(){let e=Array.prototype.slice.call(arguments);return ji(new Uint8Array(Array.prototype.slice.apply(n,e)))}),n}function na(n){return ae(n)&&!(n.length%2)||on(n)}function Jp(n){return typeof n=="number"&&n==n&&n%1===0}function on(n){if(n==null)return!1;if(n.constructor===Uint8Array)return!0;if(typeof n=="string"||!Jp(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"){wt.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),ji(new Uint8Array(t))}if(e.allowMissingPrefix&&typeof n=="string"&&n.substring(0,2)!=="0x"&&(n="0x"+n),$p(n)&&(n=n.toHexString()),ae(n)){let t=n.substring(2);t.length%2&&(e.hexPad==="left"?t="0"+t:e.hexPad==="right"?t+="0":wt.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),ji(a)}function Zt(n){let e=j(n);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(n,e-n.length),ji(t)}function ae(n,e){return!(typeof n!="string"||!n.match(/^0x[0-9A-Fa-f]*$/)||e&&n.length!==2+2*e)}var ad="0123456789abcdef";function K(n,e){if(e||(e={}),typeof n=="number"){wt.checkSafeUint53(n,"invalid hexlify value");let t="";for(;n;)t=ad[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),$p(n))return n.toHexString();if(ae(n))return n.length%2&&(e.hexPad==="left"?n="0x0"+n.substring(2):e.hexPad==="right"?n+="0":wt.throwArgumentError("hex data is odd-length","value",n)),n.toLowerCase();if(on(n)){let t="0x";for(let a=0;a>4]+ad[i&15]}return t}return wt.throwArgumentError("invalid hexlify value","value",n)}function Pt(n){if(typeof n!="string")n=K(n);else if(!ae(n)||n.length%2)return null;return(n.length-2)/2}function Ce(n,e,t){return typeof n!="string"?n=K(n):(!ae(n)||n.length%2)&&wt.throwArgumentError("invalid hexData","value",n),e=2+2*e,t!=null?"0x"+n.substring(e,2+2*t):"0x"+n.substring(e)}function _t(n){let e="0x";return n.forEach(t=>{e+=K(t).substring(2)}),e}function Fn(n){let e=id(K(n,{hexPad:"left"}));return e==="0x"?"0x0":e}function id(n){typeof n!="string"&&(n=K(n)),ae(n)||wt.throwArgumentError("invalid hex string","value",n),n=n.substring(2);let e=0;for(;e2*e+2&&wt.throwArgumentError("value out of range","value",arguments[1]);n.length<2*e+2;)n="0x0"+n.substring(2);return n}function Ln(n){let e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(na(n)){let t=j(n);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]):wt.throwArgumentError("invalid signature string","signature",n),e.v<27&&(e.v===0||e.v===1?e.v+=27:wt.throwArgumentError("signature invalid v byte","signature",n)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(t[32]|=128),e._vs=K(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=ii(j(e._vs),32);e._vs=K(i);let r=i[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=r:e.recoveryParam!==r&&wt.throwArgumentError("signature recoveryParam mismatch _vs","signature",n),i[0]&=127;let s=K(i);e.s==null?e.s=s:e.s!==s&&wt.throwArgumentError("signature v mismatch _vs","signature",n)}if(e.recoveryParam==null)e.v==null?wt.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&&wt.throwArgumentError("signature recoveryParam mismatch v","signature",n)}e.r==null||!ae(e.r)?wt.throwArgumentError("signature missing or invalid r","signature",n):e.r=me(e.r,32),e.s==null||!ae(e.s)?wt.throwArgumentError("signature missing or invalid s","signature",n):e.s=me(e.s,32);let t=j(e.s);t[0]>=128&&wt.throwArgumentError("signature s out of range","signature",n),e.recoveryParam&&(t[0]|=128);let a=K(t);e._vs&&(ae(e._vs)||wt.throwArgumentError("signature invalid _vs","signature",n),e._vs=me(e._vs,32)),e._vs==null?e._vs=a:e._vs!==a&&wt.throwArgumentError("signature _vs mismatch v and s","signature",n)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function Or(n){return n=Ln(n),K(ye([n.r,n.s,n.recoveryParam?"0x1c":"0x1b"]))}var Gs="bignumber/5.7.0";var Br=Yp.default.BN,aa=new E(Gs),rd={},Qp=9007199254740991;function Zp(n){return n!=null&&(F.isBigNumber(n)||typeof n=="number"&&n%1===0||typeof n=="string"&&!!n.match(/^-?[0-9]+$/)||ae(n)||typeof n=="bigint"||on(n))}var Xp=!1,F=class{constructor(e,t){e!==rd&&aa.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 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 aa.throwError("this platform does not support BigInt",E.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?Xp||(Xp=!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()",E.errors.UNEXPECTED_ARGUMENT,{}):aa.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(rd,Fr(e)):e.match(/^-?[0-9]+$/)?new F(rd,Fr(new Br(e))):aa.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&un("underflow","BigNumber.from",e),(e>=Qp||e<=-Qp)&&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 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"&&(ae(a)||a[0]==="-"&&ae(a.substring(1))))return F.from(a)}return aa.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}};function Fr(n){if(typeof n!="string")return Fr(n.toString(16));if(n[0]==="-")return n=n.substring(1),n[0]==="-"&&aa.throwArgumentError("invalid hex","value",n),n=Fr(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 Wt(n){return F.from(Fr(n))}function be(n){let e=F.from(n).toHexString();return e[0]==="-"?new Br("-"+e.substring(3),16):new Br(e.substring(2),16)}function un(n,e,t){let a={fault:n,operation:e};return t!=null&&(a.value=t),aa.throwError(n,E.errors.NUMERIC_FAULT,a)}function sd(n){return new Br(n,36).toString(16)}function od(n){return new Br(n,16).toString(36)}var Vt=new E(Gs),Lr={},ty=F.from(0),ny=F.from(-1);function ay(n,e,t,a){let i={fault:e,operation:t};return a!==void 0&&(i.value=a),Vt.throwError(n,E.errors.NUMERIC_FAULT,i)}var Ur="0";for(;Ur.length<256;)Ur+=Ur;function ud(n){if(typeof n!="number")try{n=F.from(n).toNumber()}catch{}return typeof n=="number"&&n>=0&&n<=256&&!(n%1)?"1"+Ur.substring(0,n):Vt.throwArgumentError("invalid decimal size","decimals",n)}function Hi(n,e){e==null&&(e=0);let t=ud(e);n=F.from(n);let a=n.lt(ty);a&&(n=n.mul(ny));let i=n.mod(t).toString();for(;i.length2&&Vt.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&&ay("fractional component exceeds decimals","underflow","parseFixed"),s===""&&(s="0");s.lengthe[s]==null?l:(typeof e[s]!==o&&Vt.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&&Vt.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",a),i>80&&Vt.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new ia(Lr,t,a,i)}},ct=class{constructor(e,t,a,i){e!==Lr&&Vt.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&&Vt.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),a=dn(e._value,e.format.decimals);return ct.fromValue(t.add(a),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),a=dn(e._value,e.format.decimals);return ct.fromValue(t.sub(a),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),a=dn(e._value,e.format.decimals);return ct.fromValue(t.mul(a).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),a=dn(e._value,e.format.decimals);return ct.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=ct.from(e[0],this.format),a=!e[1].match(/^(0*)$/);return this.isNegative()&&a&&(t=t.subUnsafe(ey.toFormat(t.format))),t}ceiling(){let e=this.toString().split(".");e.length===1&&e.push("0");let t=ct.from(e[0],this.format),a=!e[1].match(/^(0*)$/);return!this.isNegative()&&a&&(t=t.addUnsafe(ey.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 a=ct.from("1"+Ur.substring(0,e),this.format),i=B6.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&&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 ct.fromString(this._value,e)}static fromValue(e,t,a){return a==null&&t!=null&&!Zp(t)&&(a=t,t=null),t==null&&(t=0),a==null&&(a="fixed"),ct.fromString(Hi(e,t),ia.from(a))}static fromString(e,t){t==null&&(t="fixed");let a=ia.from(t),i=dn(e,a.decimals);!a.signed&&i.lt(ty)&&ay("unsigned value cannot be negative","overflow","value",e);let r=null;a.signed?r=i.toTwos(a.width).toHexString():(r=i.toHexString(),r=me(r,a.width/8));let s=Hi(i,a.decimals);return new ct(Lr,r,s,a)}static fromBytes(e,t){t==null&&(t="fixed");let a=ia.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=Hi(i,a.decimals);return new ct(Lr,r,s,a)}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(a){if(a.code!==E.errors.INVALID_ARGUMENT)throw a}return Vt.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}},ey=ct.from(1),B6=ct.from("0.5");var iy="properties/5.7.0";var F6=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},zs=new E(iy);function B(n,e,t){Object.defineProperty(n,e,{enumerable:!0,value:t,writable:!1})}function ht(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 Ie(n){return F6(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 qi(n,e){(!n||typeof n!="object")&&zs.throwArgumentError("invalid object","object",n),Object.keys(n).forEach(t=>{e[t]||zs.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 L6={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function ry(n){if(n==null||L6[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;tmt(e)));if(typeof n=="object"){let e={};for(let t in n){let a=n[t];a!==void 0&&B(e,t,mt(a))}return e}return zs.throwArgumentError(`Cannot deepCopy ${typeof n}`,"object",n)}function mt(n){return U6(n)}var en=class{constructor(e){for(let t in e)this[t]=mt(e[t])}};var Un="abi/5.7.0";var Te=new E(Un),ri={},sy={calldata:!0,memory:!0,storage:!0},V6={calldata:!0,memory:!0};function Ks(n,e){if(n==="bytes"||n==="string"){if(sy[e])return!0}else if(n==="address"){if(e==="payable")return!0}else if((n.indexOf("[")>=0||n==="tuple")&&V6[e])return!0;return(sy[e]||e==="payable")&&Te.throwArgumentError("invalid modifier","name",e),!1}function j6(n,e){let t=n;function a(o){Te.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!==ge.sighash&&(t+=this.type),t+="("+this.components.map(a=>a.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:Gi(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(pt.fromObject):null})}static fromString(e,t){function a(i){return pt.fromObject({name:i.name,type:i.type,indexed:i.indexed,components:i.components})}return a(j6(e,!!t))}static isParamType(e){return!!(e!=null&&e._isParamType)}};function Vr(n,e){return G6(n).map(t=>pt.fromString(t,e))}var Ht=class{constructor(e,t){e!==ri&&Te.throwError("use a static from method",E.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),Ws(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 Dt.fromObject(e);case"event":return jt.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"?jt.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)}},jt=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(a=>JSON.parse(a.format(e)))});let t="";return e!==ge.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map(a=>a.format(e)).join(e===ge.full?", ":",")+") ",e!==ge.sighash&&this.anonymous&&(t+="anonymous "),t.trim()}static from(e){return typeof e=="string"?jt.fromString(e):jt.fromObject(e)}static fromObject(e){if(jt.isEventFragment(e))return e;e.type!=="event"&&Te.throwArgumentError("invalid event object","value",e);let t={name:jr(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(pt.fromObject):[],type:"event"};return new jt(ri,t)}static fromString(e){let t=e.match(Hr);t||Te.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:Te.warn("unknown modifier: "+i)}}),jt.fromObject({name:t[1].trim(),anonymous:a,inputs:Vr(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}};function uy(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 dy(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 ly(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 Nt=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(a=>JSON.parse(a.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(a=>a.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=ly(e);t.constant&&Te.throwArgumentError("constructor cannot be constant","value",e);let a={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(ri,a)}static fromString(e){let t={type:"constructor"};e=uy(e,t);let a=e.match(Hr);return(!a||a[1].trim()!=="constructor")&&Te.throwArgumentError("invalid constructor string","value",e),t.inputs=Vr(a[2].trim(),!1),dy(a[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(a=>JSON.parse(a.format(e))),outputs:this.outputs.map(a=>JSON.parse(a.format(e)))});let t="";return e!==ge.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map(a=>a.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(a=>a.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=ly(e),a={type:e.type,name:jr(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(ri,a)}static fromString(e){let t={type:"function"};e=uy(e,t);let a=e.split(" returns ");a.length>2&&Te.throwArgumentError("invalid function string","value",e);let i=a[0].match(Hr);if(i||Te.throwArgumentError("invalid function signature","value",e),t.name=i[1].trim(),t.name&&jr(t.name),t.inputs=Vr(i[2],!1),dy(i[3].trim(),t),a.length>1){let r=a[1].match(Hr);(r[1].trim()!=""||r[3].trim()!="")&&Te.throwArgumentError("unexpected tokens","value",e),t.outputs=Vr(r[2],!1)}else t.outputs=[];return Dt.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}};function oy(n){let e=n.format();return(e==="Error(string)"||e==="Panic(uint256)")&&Te.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",n),n}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(a=>JSON.parse(a.format(e)))});let t="";return e!==ge.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map(a=>a.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:jr(e.name),inputs:e.inputs?e.inputs.map(pt.fromObject):[]};return oy(new tn(ri,t))}static fromString(e){let t={type:"error"},a=e.match(Hr);return a||Te.throwArgumentError("invalid error signature","value",e),t.name=a[1].trim(),t.name&&jr(t.name),t.inputs=Vr(a[2],!1),oy(tn.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}};function Gi(n){return n.match(/^uint($|[^1-9])/)?n="uint256"+n.substring(4):n.match(/^int($|[^1-9])/)&&(n="int256"+n.substring(3)),n}var q6=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function jr(n){return(!n||!n.match(q6))&&Te.throwArgumentError(`invalid identifier "${n}"`,"value",n),n}var Hr=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function G6(n){n=n.trim();let e=[],t="",a=0;for(let i=0;ithis.wordSize&&dd.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)}}},oi=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 K(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):oi.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:dd.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 oi(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 yy=wn(py());function fe(n){return"0x"+yy.default.keccak_256(j(n))}var $s={};Vi($s,{decode:()=>qr,encode:()=>ra});var fy="rlp/5.7.0";var Vn=new E(fy);function cy(n){let e=[];for(;n;)e.unshift(n&255),n>>=8;return e}function my(n,e,t){let a=0;for(let i=0;ie+1+a&&Vn.throwError("child data too short",E.errors.BUFFER_OVERRUN,{})}return{consumed:1+a,result:i}}function by(n,e){if(n.length===0&&Vn.throwError("data too short",E.errors.BUFFER_OVERRUN,{}),n[e]>=248){let t=n[e]-247;e+1+t>n.length&&Vn.throwError("data short segment too short",E.errors.BUFFER_OVERRUN,{});let a=my(n,e+1,t);return e+1+t+a>n.length&&Vn.throwError("data long segment too short",E.errors.BUFFER_OVERRUN,{}),hy(n,e,e+1+t,t+a)}else if(n[e]>=192){let t=n[e]-192;return e+1+t>n.length&&Vn.throwError("data array too short",E.errors.BUFFER_OVERRUN,{}),hy(n,e,e+1,t)}else if(n[e]>=184){let t=n[e]-183;e+1+t>n.length&&Vn.throwError("data array too short",E.errors.BUFFER_OVERRUN,{});let a=my(n,e+1,t);e+1+t+a>n.length&&Vn.throwError("data array too short",E.errors.BUFFER_OVERRUN,{});let i=K(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&&Vn.throwError("data too short",E.errors.BUFFER_OVERRUN,{});let a=K(n.slice(e+1,e+1+t));return{consumed:1+t,result:a}}return{consumed:1,result:K(n[e])}}function qr(n){let e=j(n),t=by(e,0);return t.consumed!==e.length&&Vn.throwArgumentError("invalid rlp data","data",n),t.result}var gy="address/5.7.0";var Aa=new E(gy);function Ty(n){ae(n,20)||Aa.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 z6=9007199254740991;function K6(n){return Math.log10?Math.log10(n):Math.log(n)/Math.LN10}var ld={};for(let n=0;n<10;n++)ld[String(n)]=String(n);for(let n=0;n<26;n++)ld[String.fromCharCode(65+n)]=String(10+n);var vy=Math.floor(K6(z6));function wy(n){n=n.toUpperCase(),n=n.substring(4)+n.substring(0,2)+"00";let e=n.split("").map(a=>ld[a]).join("");for(;e.length>=vy;){let a=e.substring(0,vy);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 ce(n){let e=null;if(typeof n!="string"&&Aa.throwArgumentError("invalid address","address",n),n.match(/^(0x)?[0-9a-fA-F]{40}$/))n.substring(0,2)!=="0x"&&(n="0x"+n),e=Ty(n),n.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==n&&Aa.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)!==wy(n)&&Aa.throwArgumentError("bad icap checksum","address",n),e=sd(n.substring(4));e.length<40;)e="0"+e;e=Ty("0x"+e)}else Aa.throwArgumentError("invalid address","address",n);return e}function _y(n){try{return ce(n),!0}catch{}return!1}function ky(n){let e=od(ce(n).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+wy("XE00"+e)+e}function ui(n){let e=null;try{e=ce(n.from)}catch{Aa.throwArgumentError("missing from address","transaction",n)}let t=Zt(j(F.from(n.nonce).toHexString()));return ce(Ce(fe(ra([e,t])),12))}function Ay(n,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(Ce(fe(ye(["0xff",ce(n),e,t])),12))}var Qs=class extends kt{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=ce(t)}catch(a){this._throwError(a.message,t)}return e.writeValue(t)}decode(e){return ce(me(e.readValue().toHexString(),20))}};var Xs=class extends kt{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 E(Un);function pd(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 f=p.localName;return f||Ki.throwError("cannot encode object for signature with missing names",E.errors.INVALID_ARGUMENT,{argument:"values",coder:p,value:t}),l[f]&&Ki.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 Ki.throwArgumentError("invalid tuple value","tuple",t);e.length!==a.length&&Ki.throwArgumentError("types/value length mismatch","tuple",t);let i=new si(n.wordSize),r=new si(n.wordSize),s=[];e.forEach((l,p)=>{let f=a[p];if(l.dynamic){let x=r.length;l.encode(r,f);let I=i.writeUpdatableValue();s.push(_=>{I(_+x)})}else l.encode(i,f)}),s.forEach(l=>{l(i.length)});let o=n.appendWriter(i);return o+=n.appendWriter(r),o}function yd(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 Ys=class extends kt{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&&Ki.throwError("insufficient data length",E.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let a=[];for(let i=0;iao,EtherSymbol:()=>Sy,HashZero:()=>Ji,MaxInt256:()=>Iy,MaxUint256:()=>so,MinInt256:()=>Cy,NegativeOne:()=>io,One:()=>ro,Two:()=>Ey,WeiPerEther:()=>My,Zero:()=>Wi});var ao="0x0000000000000000000000000000000000000000";var io=F.from(-1),Wi=F.from(0),ro=F.from(1),Ey=F.from(2),My=F.from("1000000000000000000"),so=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),Cy=F.from("-0x8000000000000000000000000000000000000000000000000000000000000000"),Iy=F.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");var Ji="0x0000000000000000000000000000000000000000000000000000000000000000";var Sy="\u039E";var oo=class extends kt{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=so.mask(e.wordSize*8);if(this.signed){let r=i.mask(this.size*8-1);(a.gt(r)||a.lt(r.add(ro).mul(io)))&&this._throwError("value out-of-bounds",t)}else(a.lt(Wi)||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 Ry="strings/5.7.0";var Py=new E(Ry),qt;(function(n){n.current="",n.NFC="NFC",n.NFD="NFD",n.NFKC="NFKC",n.NFKD="NFKD"})(qt||(qt={}));var Ot;(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"})(Ot||(Ot={}));function W6(n,e,t,a,i){return Py.throwArgumentError(`invalid codepoint at offset ${e}; ${n}`,"bytes",t)}function Ny(n,e,t,a,i){if(n===Ot.BAD_PREFIX||n===Ot.UNEXPECTED_CONTINUE){let r=0;for(let s=e+1;s>6===2;s++)r++;return r}return n===Ot.OVERRUN?t.length-e-1:0}function J6(n,e,t,a,i){return n===Ot.OVERLONG?(a.push(i),0):(a.push(65533),Ny(n,e,t,a,i))}var uo=Object.freeze({error:W6,ignore:Ny,replace:J6});function cd(n,e){e==null&&(e=uo.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(Ot.UNEXPECTED_CONTINUE,a-1,n,t):a+=e(Ot.BAD_PREFIX,a-1,n,t);continue}if(a-1+r>=n.length){a+=e(Ot.OVERRUN,a-1,n,t);continue}let o=i&(1<<8-r-1)-1;for(let l=0;l1114111){a+=e(Ot.OUT_OF_RANGE,a-1-r,n,t,o);continue}if(o>=55296&&o<=57343){a+=e(Ot.UTF16_SURROGATE,a-1-r,n,t,o);continue}if(o<=s){a+=e(Ot.OVERLONG,a-1-r,n,t,o);continue}t.push(o)}}return t}function ve(n,e=qt.current){e!=qt.current&&(Py.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 fd(n){let e="0000"+n.toString(16);return"\\u"+e.substring(e.length-4)}function md(n,e){return'"'+cd(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?fd(t):(t-=65536,fd((t>>10&1023)+55296)+fd((t&1023)+56320))}).join("")+'"'}function lo(n){return n.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function Jt(n,e){return lo(cd(n,e))}function Ea(n,e=qt.current){return cd(ve(n,e))}function hd(n){let e=ve(n);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return K(ye([e,Ji]).slice(0,32))}function xd(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 Jt(e.slice(0,t))}function $6(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 Dy(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 gd(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 Q6=Dy("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(n=>parseInt(n,16)),Y6=[{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}],Z6=bd("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"),e2=bd("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"),t2=bd("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",$6),n2=Dy("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 a2(n){return n.reduce((e,t)=>(t.forEach(a=>{e.push(a)}),e),[])}function i2(n){return!!gd(n,Q6)}function r2(n){let e=gd(n,Y6);if(e)return[n+e.s];let t=Z6[n];if(t)return t;let a=e2[n];if(a)return[n+a[0]];let i=t2[n];return i||null}function s2(n){return!!gd(n,n2)}function Td(n){if(n.match(/^[a-z0-9-]*$/i)&&n.length<=59)return n.toLowerCase();let e=Ea(n);e=a2(e.map(a=>{if(X6.indexOf(a)>=0)return[];if(a>=65024&&a<=65039)return[];let i=r2(a);return i||[a]})),e=Ea(lo(e),qt.NFKC),e.forEach(a=>{if(s2(a))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(a=>{if(i2(a))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});let t=lo(e);if(t.substring(0,1)==="-"||t.substring(2,4)==="--"||t.substring(t.length-1)==="-")throw new Error("invalid hyphen");return t}var po=class extends Gr{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 kt{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 pd(e,this.coders,t)}decode(e){return e.coerce(this.name,yd(e,this.coders))}};var yo=new E(Un),o2=new RegExp(/^bytes([0-9]*)$/),u2=new RegExp(/^(u?int)([0-9]*)$/),$i=class{constructor(e){B(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new Qs(e.name);case"bool":return new Zs(e.name);case"string":return new po(e.name);case"bytes":return new eo(e.name);case"array":return new Ys(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new di((e.components||[]).map(a=>this._getCoder(a)),e.name);case"":return new no(e.name)}let t=e.type.match(u2);if(t){let a=parseInt(t[2]||"256");return(a===0||a>256||a%8!==0)&&yo.throwArgumentError("invalid "+t[1]+" bit length","param",e),new oo(a/8,t[1]==="int",e.name)}if(t=e.type.match(o2),t){let a=parseInt(t[1]);return(a===0||a>32)&&yo.throwArgumentError("invalid bytes length","param",e),new to(a,e.name)}return yo.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&&yo.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(pt.from(s))),i=new di(a,"_"),r=this._getWriter();return i.encode(r,t),r.data}decode(e,t,a){let i=e.map(s=>this._getCoder(pt.from(s)));return new di(i,"_").decode(this._getReader(j(t),a))}},zr=new $i;function nn(n){return fe(ve(n))}var fo="hash/5.7.0";var vd={};Vi(vd,{decode:()=>Qi,encode:()=>Xi});function Qi(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 d2(n){let e={};for(let t=0;t>--l&1}let x=31,I=Math.pow(2,x),_=I>>>1,v=_>>1,S=I-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=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 p2(n){let e=0;return()=>n[e++]}function Fy(n){return p2(l2(n))}function y2(n){return n&1?~n>>1:n>>1}function f2(n,e){let t=Array(n);for(let a=0;ae[s]):t}function Ly(n){let e=[];for(;;){let t=n();if(t==0)break;e.push(h2(t,n))}for(;;){let t=n()-1;if(t<0)break;e.push(x2(t,n))}return d2(By(e))}function m2(n){let e=[];for(;;){let t=n();if(t==0)break;e.push(t)}return e}function Uy(n,e,t){let a=Array(n).fill(void 0).map(()=>[]);for(let i=0;ia[s].push(r));return a}function h2(n,e){let t=1+e(),a=e(),i=m2(e),r=Uy(i.length,1+n,e);return By(r.map((s,o)=>{let l=s[0],p=s.slice(1);return Array(i[o]).fill(void 0).map((f,x)=>{let I=x*a;return[l+x*t,p.map(_=>_+I)]})}))}function x2(n,e){let t=1+e();return Uy(t,1+n,e).map(i=>[i[0],i.slice(1)])}function Vy(n){let e=Kr(n).sort((a,i)=>a-i);return t();function t(){let a=[];for(;;){let p=Kr(n,e);if(p.length==0)break;a.push({set:new Set(p),node:t()})}a.sort((p,f)=>f.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 jy(){return Fy(Qi("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 co=jy(),b2=new Set(Kr(co)),g2=new Set(Kr(co)),T2=Ly(co),v2=Vy(co),Hy=45,qy=95;function Gy(n){return Ea(n)}function w2(n){return n.filter(e=>e!=65039)}function zy(n){for(let e of n.split(".")){let t=Gy(e);try{for(let a=t.lastIndexOf(qy)-1;a>=0;a--)if(t[a]!==qy)throw new Error("underscore only allowed at start");if(t.length>=4&&t.every(a=>a<128)&&t[2]===Hy&&t[3]===Hy)throw new Error("invalid label extension")}catch(a){throw new Error(`Invalid label "${e}": ${a.message}`)}}return n}function Ky(n){return zy(_2(n,w2))}function _2(n,e){let t=Gy(n).reverse(),a=[];for(;t.length;){let i=A2(t);if(i){a.push(...e(i));continue}let r=t.pop();if(b2.has(r)){a.push(r);continue}if(g2.has(r))continue;let s=T2[r];if(s){a.push(...s);continue}throw new Error(`Disallowed codepoint: 0x${r.toString(16).toUpperCase()}`)}return zy(k2(String.fromCodePoint(...a)))}function k2(n){return n.normalize("NFC")}function A2(n,e){var t;let a=v2,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 E2=new E(fo),Jy=new Uint8Array(32);Jy.fill(0);function Wy(n){if(n.length===0)throw new Error("invalid ENS name; empty component");return n}function wd(n){let e=ve(Ky(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(Wy(e.slice(a))),t}function _d(n){try{return wd(n).length!==0}catch{}return!1}function Ma(n){typeof n!="string"&&E2.throwArgumentError("invalid ENS name; not a string","name",n);let e=Jy,t=wd(n);for(;t.length;)e=fe(ye([e,fe(t.pop())]));return K(e)}function Wr(n){return K(ye(wd(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 $y=`Ethereum Signed Message: -`;function Yi(n){return typeof n=="string"&&(n=ve(n)),fe(ye([ve($y),ve(String(n.length)),n]))}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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},xt=new E(fo),Zy=new Uint8Array(32);Zy.fill(0);var C2=F.from(-1),e0=F.from(0),t0=F.from(1),I2=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function S2(n){let e=j(n),t=e.length%32;return t?_t([e,Zy.slice(t)]):K(e)}var R2=me(t0.toHexString(),32),P2=me(e0.toHexString(),32),Qy={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},kd=["name","version","chainId","verifyingContract","salt"];function Xy(n){return function(e){return typeof e!="string"&&xt.throwArgumentError(`invalid domain value for ${JSON.stringify(n)}`,`domain.${n}`,e),e}}var N2={name:Xy("name"),version:Xy("version"),chainId:function(n){try{return F.from(n).toString()}catch{}return xt.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",n)},verifyingContract:function(n){try{return ce(n).toLowerCase()}catch{}return xt.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 K(e)}catch{}return xt.throwArgumentError('invalid domain value "salt"',"domain.salt",n)}};function Ad(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))&&xt.throwArgumentError("invalid numeric width","type",n);let i=I2.mask(t?a-1:a),r=t?i.add(t0).mul(C2):e0;return function(s){let o=F.from(s);return(o.lt(r)||o.gt(i))&&xt.throwArgumentError(`value out-of-bounds for ${n}`,"value",s),me(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))&&xt.throwArgumentError("invalid bytes width","type",n),function(a){return j(a).length!==t&&xt.throwArgumentError(`invalid length for ${n}`,"value",a),S2(a)}}}switch(n){case"address":return function(e){return me(ce(e),32)};case"bool":return function(e){return e?R2:P2};case"bytes":return function(e){return fe(e)};case"string":return function(e){return nn(e)}}return null}function Yy(n,e){return`${n}(${e.map(({name:t,type:a})=>a+" "+t).join(",")})`}var bt=class{constructor(e){B(this,"types",Object.freeze(mt(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]&&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),!Ad(f)&&(a[f]||xt.throwArgumentError(`unknown type ${JSON.stringify(f)}`,"types",e),a[f].push(o),t[o][f]=!0)})}let r=Object.keys(a).filter(o=>a[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=>{!a[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]=Yy(o,e[o])+l.map(p=>Yy(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=Ad(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(_t(l))}}let a=this.types[e];if(a){let i=nn(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),_t(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,a){if(Ad(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&&xt.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),{}):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,a){return bt.from(t).hashStruct(e,a)}static hashDomain(e){let t=[];for(let a in e){let i=Qy[a];i||xt.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(a)}`,"domain",e),t.push({name:a,type:i})}return t.sort((a,i)=>kd.indexOf(a.name)-kd.indexOf(i.name)),bt.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,a){return _t(["0x1901",bt.hashDomain(e),bt.from(t).hash(a)])}static hash(e,t,a){return fe(bt.encode(e,t,a))}static resolveNames(e,t,a,i){return M2(this,void 0,void 0,function*(){e=we(e);let r={};e.verifyingContract&&!ae(e.verifyingContract,20)&&(r[e.verifyingContract]="0x");let s=bt.from(t);s.visit(a,(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]),a=s.visit(a,(o,l)=>o==="address"&&r[l]?r[l]:l),{domain:e,value:a}})}static getPayload(e,t,a){bt.hashDomain(e);let i={},r=[];kd.forEach(l=>{let p=e[l];p!=null&&(i[l]=N2[l](p),r.push({name:l,type:Qy[l]}))});let s=bt.from(t),o=we(t);return o.EIP712Domain?xt.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 K(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(Un);var Zi=class extends en{},er=class extends en{},Ed=class extends en{},sa=class extends en{static isIndexed(e){return!!(e&&e._isIndexed)}},D2={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function n0(n,e){let t=new Error(`deferred error during ABI decoding triggered accessing ${n}`);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(a=>Ht.from(a)).filter(a=>a!=null)),B(this,"_abiCoder",ht(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){gt.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]){gt.warn("duplicate definition - "+r);return}i[r]=a}),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(a=>a.format(e));return e===ge.json?JSON.stringify(t.map(a=>JSON.parse(a))):t}static getAbiCoder(){return zr}static getAddress(e){return ce(e)}static getSighash(e){return Ce(nn(e.format()),0,4)}static getEventTopic(e){return nn(e.format())}getFunction(e){if(ae(e)){for(let a in this.functions)if(e===this.getSighash(a))return this.functions[a];gt.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?gt.throwArgumentError("no matching function","name",a):i.length>1&>.throwArgumentError("multiple matching functions","name",a),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 a=e.toLowerCase();for(let i in this.events)if(a===this.getEventTopic(i))return this.events[i];gt.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?gt.throwArgumentError("no matching event","name",a):i.length>1&>.throwArgumentError("multiple matching events","name",a),this.events[i[0]]}let t=this.events[jt.fromString(e).format()];return t||gt.throwArgumentError("no matching event","signature",e),t}getError(e){if(ae(e)){let a=ht(this.constructor,"getSighash");for(let i in this.errors){let r=this.errors[i];if(e===a(r))return this.errors[i]}gt.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?gt.throwArgumentError("no matching error","name",a):i.length>1&>.throwArgumentError("multiple matching errors","name",a),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 a=j(t);return K(a.slice(0,4))!==this.getSighash(e)&>.throwArgumentError(`data signature does not match error ${e.name}.`,"data",K(a)),this._decodeParams(e.inputs,a.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 a=j(t);return K(a.slice(0,4))!==this.getSighash(e)&>.throwArgumentError(`data signature does not match function ${e.name}.`,"data",K(a)),this._decodeParams(e.inputs,a.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 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=K(a.slice(0,4)),f=D2[p];if(f)s=this._abiCoder.decode(f.inputs,a.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,a.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:K(t),errorArgs:s,errorName:o,errorSignature:l,reason:i})}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&>.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"?nn(s):r.type==="bytes"?fe(K(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(K(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?a.push(null):o.baseType==="array"||o.baseType==="tuple"?gt.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&>.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(nn(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 I=this.getEventTopic(e);(!ae(a[0],32)||a[0].toLowerCase()!==I)&>.throwError("fragment/topic mismatch",E.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:I,value:a[0]}),a=a.slice(1)}let i=[],r=[],s=[];e.inputs.forEach((I,_)=>{I.indexed?I.type==="string"||I.type==="bytes"||I.baseType==="tuple"||I.baseType==="array"?(i.push(pt.fromObject({type:"bytes32",name:I.name})),s.push(!0)):(i.push(I),s.push(!1)):(r.push(I),s.push(!1))});let o=a!=null?this._abiCoder.decode(i,ye(a)):null,l=this._abiCoder.decode(r,t,!0),p=[],f=0,x=0;e.inputs.forEach((I,_)=>{if(I.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(I.name&&p[I.name]==null){let v=p[_];v instanceof Error?Object.defineProperty(p,I.name,{enumerable:!0,get:()=>{throw n0(`property ${JSON.stringify(I.name)}`,v)}}):p[I.name]=v}});for(let I=0;I{throw n0(`index ${I}`,_)}})}return Object.freeze(p)}parseTransaction(e){let t=this.getFunction(e.data.substring(0,10).toLowerCase());return t?new er({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 Zi({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),a=this.getError(t.substring(0,10).toLowerCase());return a?new Ed({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 a0="abstract-provider/5.7.0";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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},B2=new E(a0),mo=class extends en{static isForkEvent(e){return!!(e&&e._isForkEvent)}};var $t=class{constructor(){B2.checkAbstract(new.target,$t),B(this,"_isProvider",!0)}getFeeData(){return O2(this,void 0,void 0,function*(){let{block:e,gasPrice:t}=yield Ie({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 i0="abstract-signer/5.7.0";var _n=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},ln=new E(i0),F2=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],L2=[E.errors.INSUFFICIENT_FUNDS,E.errors.NONCE_EXPIRED,E.errors.REPLACEMENT_UNDERPRICED],Gt=class{constructor(){ln.checkAbstract(new.target,Gt),B(this,"_isSigner",!0)}getBalance(e){return _n(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return _n(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return _n(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 _n(this,void 0,void 0,function*(){this._checkProvider("call");let a=yield Ie(this.checkTransaction(e));return yield this.provider.call(a,t)})}sendTransaction(e){return _n(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 _n(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return _n(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return _n(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return _n(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(let a in e)F2.indexOf(a)===-1&&ln.throwArgumentError("invalid transaction key: "+a,"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(a=>(a[0].toLowerCase()!==a[1].toLowerCase()&&ln.throwArgumentError("from address mismatch","transaction",e),a[0])),t}populateTransaction(e){return _n(this,void 0,void 0,function*(){let t=yield Ie(this.checkTransaction(e));t.to!=null&&(t.to=Promise.resolve(t.to).then(i=>_n(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 a=t.maxFeePerGas!=null||t.maxPriorityFeePerGas!=null;if(t.gasPrice!=null&&(t.type===2||a)?ln.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(t.type===0||t.type===1)&&a&&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?(a&&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(L2.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 Ie(t)})}_checkProvider(e){this.provider||ln.throwError("missing provider",E.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}},oa=class extends Gt{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,a){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new oa(this.address,e)}};var pe=wn(ed()),Wn=wn(Bd());function ur(n,e,t){return t={path:e,exports:{},require:function(a,i){return ox(a,i??t.path)}},n(t,t.exports),t.exports}function ox(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var Vd=H0;function H0(n,e){if(!n)throw new Error(e||"Assertion failed")}H0.equal=function(e,t,a){if(e!=t)throw new Error(a||"Assertion failed: "+e+" != "+t)};var Mn=ur(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,I=f&255;x?l.push(x,I):l.push(I)}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(I>>1)-1?S=(I>>1)-L:S=L,_.isubn(S)):S=0,x[v]=S,_.iushrn(1)}return x}t.getNAF=a;function i(l,p){var f=[[],[]];l=l.clone(),p=p.clone();for(var x=0,I=0,_;l.cmpn(-x)>0||p.cmpn(-I)>0;){var v=l.andln(3)+x&3,S=p.andln(3)+I&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)+I&7,(_===3||_===5)&&v===2?O=-S:O=S),f[1].push(O),2*x===L+1&&(x=1-x),2*I===O+1&&(I=1-I),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}),To=an.getNAF,ux=an.getJSF,vo=an.assert;function Ra(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 pi=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){vo(e.precomputed);var a=e._getDoubles(),i=To(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),I=r;I>0;I--){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];vo(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,a,i,r){var s=this._wnafT1,o=this._wnafT2,l=this._wnafT3,p=0,f,x,I;for(f=0;f=1;f-=2){var v=f-1,S=f;if(s[v]!==1||s[S]!==1){l[v]=To(a[v],s[v],this._bitLength),l[S]=To(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=ux(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;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?I=o[x][R-1>>1]:R<0&&(I=o[x][-R-1>>1].neg()),I.type==="affine"?J=J.mixedAdd(I):J=J.add(I))}}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 a=[this],i=this,r=0;r=0&&(_=p,v=f),x.negative&&(x=x.neg(),I=I.neg()),_.negative&&(_=_.neg(),v=v.neg()),[{a:x,b:I},{a:_,b:v}]};fn.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),f=s.mul(i.b),x=e.sub(o).sub(l),I=p.add(f).neg();return{k1:x,k2:I}};fn.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)};fn.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};fn.prototype._endoWnafMulAdd=function(e,t,a){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 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)};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,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)};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,a){var i=[this,t],r=[e,a];return this.curve.endo?this.curve._endoWnafMulAdd(i,r):this.curve._wnafMulAdd(1,i,r,2)};Mt.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)};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 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};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 Rt(n,e,t,a){pi.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}jd(Rt,pi.BasePoint);fn.prototype.jpoint=function(e,t,a){return new Rt(this,e,t,a)};Rt.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)};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(),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 f=l.redSqr(),x=f.redMul(l),I=i.redMul(f),_=p.redSqr().redIAdd(x).redISub(I).redISub(I),v=p.redMul(I.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(),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(),f=p.redMul(o),x=a.redMul(p),I=l.redSqr().redIAdd(f).redISub(x).redISub(x),_=l.redMul(x.redISub(I)).redISub(r.redMul(f)),v=this.z.redMul(o);return this.curve.jpoint(I,_,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 a=this;for(t=0;t=0)return!1;if(a.redIAdd(r),this.x.cmp(a)===0)return!0}};Rt.prototype.inspect=function(){return this.isInfinity()?"":""};Rt.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var bo=ur(function(n,e){"use strict";var t=e;t.base=pi,t.short=lx,t.mont=null,t.edwards=null}),go=ur(function(n,e){"use strict";var t=e,a=an.assert;function i(o){o.type==="short"?this.curve=new bo.short(o):o.type==="edwards"?this.curve=new bo.edwards(o):this.curve=new bo.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:Wn.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:Wn.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:Wn.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: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"]}),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: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"]}),r("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"]}),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:Wn.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:Wn.default.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",s]})});function Sa(n){if(!(this instanceof Sa))return new Sa(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=Mn.toArray(n.entropy,n.entropyEnc||"hex"),t=Mn.toArray(n.nonce,n.nonceEnc||"hex"),a=Mn.toArray(n.pers,n.persEnc||"hex");Vd(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,t,a)}var q0=Sa;Sa.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};Sa.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=Mn.toArray(a,i||"hex"),this._update(a));for(var r=[];r.length"};var px=an.assert;function wo(n,e){if(n instanceof wo)return n;this._importDER(n,e)||(px(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 _o=wo;function yx(){this.place=0}function Fd(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 j0(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)}wo.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=j0(t),a=j0(a);!a[0]&&!(a[1]&128);)a=a.slice(1);var i=[2];Ld(i,t.length),i=i.concat(t),i.push(2),Ld(i,a.length);var r=i.concat(a),s=[48];return Ld(s,r.length),s=s.concat(r),an.encode(s,e)};var fx=function(){throw new Error("unsupported")},G0=an.assert;function pn(n){if(!(this instanceof pn))return new pn(n);typeof n=="string"&&(G0(Object.prototype.hasOwnProperty.call(go,n),"Unknown curve "+n),n=go[n]),n instanceof go.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 cx=pn;pn.prototype.keyPair=function(e){return new Hd(this,e)};pn.prototype.keyFromPrivate=function(e,t){return Hd.fromPrivate(this,e,t)};pn.prototype.keyFromPublic=function(e,t){return Hd.fromPublic(this,e,t)};pn.prototype.genKeyPair=function(e){e||(e={});for(var t=new q0({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||fx(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)}};pn.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};pn.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 q0({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 I=this.g.mul(x);if(!I.isInfinity()){var _=I.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=(I.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 _o({r:v,s:S,recoveryParam:L})}}}}}};pn.prototype.verify=function(e,t,a,i){e=this._truncateToN(new pe.default(e,16)),a=this.keyFromPublic(a,i),t=new _o(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,a.getPublic(),p),f.isInfinity()?!1:f.eqXToP(r)):(f=this.g.mulAdd(l,a.getPublic(),p),f.isInfinity()?!1:f.getX().umod(this.n).cmp(r)===0)};pn.prototype.recoverPubKey=function(n,e,t,a){G0((3&t)===t,"The recovery param is more than two bits"),e=new _o(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 f=e.r.invm(i),x=i.sub(r).mul(f).umod(i),I=o.mul(f).umod(i);return this.g.mulAdd(x,s,I)};pn.prototype.getKeyRecoveryParam=function(n,e,t,a){if(e=new _o(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 mx=ur(function(n,e){"use strict";var t=e;t.version="6.5.4",t.utils=an,t.rand=function(){throw new Error("unsupported")},t.curve=bo,t.curves=go,t.ec=cx,t.eddsa=null}),z0=mx.ec;var K0="signing-key/5.7.0";var Gd=new E(K0),qd=null;function Jn(){return qd||(qd=new z0("secp256k1")),qd}var cn=class{constructor(e){B(this,"curve","secp256k1"),B(this,"privateKey",K(e)),Pt(this.privateKey)!==32&&Gd.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)),a=Jn().keyFromPublic(j(e));return"0x"+t.pub.add(a.pub).encodeCompressed("hex")}signDigest(e){let t=Jn().keyFromPrivate(j(this.privateKey)),a=j(e);a.length!==32&&Gd.throwArgumentError("bad digest length","digest",e);let i=t.sign(a,{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)),a=Jn().keyFromPublic(j(Qr(e)));return me("0x"+t.derive(a.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}};function ko(n,e){let t=Ln(e),a={r:j(t.r),s:j(t.s)};return"0x"+Jn().recoverPubKey(j(n),a,t.recoveryParam).encode("hex",!1)}function Qr(n,e){let t=j(n);if(t.length===32){let a=new cn(t);return e?"0x"+Jn().keyFromPrivate(t).getPublic(!0,"hex"):a.publicKey}else{if(t.length===33)return e?K(t):"0x"+Jn().keyFromPublic(t).getPublic(!1,"hex");if(t.length===65)return e?"0x"+Jn().keyFromPublic(t).getPublic(!0,"hex"):K(t)}return Gd.throwArgumentError("invalid public or private key","key","[REDACTED]")}var W0="transactions/5.7.0";var Lt=new E(W0),Ao;(function(n){n[n.legacy=0]="legacy",n[n.eip2930=1]="eip2930",n[n.eip1559=2]="eip1559"})(Ao||(Ao={}));function Kd(n){return n==="0x"?null:ce(n)}function Ft(n){return n==="0x"?Wi:F.from(n)}var hx=[{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"}],xx={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function mn(n){let e=Qr(n);return ce(Ce(fe(Ce(e,1)),12))}function yi(n,e){return mn(ko(j(n),e))}function rn(n,e){let t=Zt(F.from(n).toHexString());return t.length>32&&Lt.throwArgumentError("invalid length for "+e,"transaction:"+e,n),t}function zd(n,e){return{address:ce(n),storageKeys:(e||[]).map((t,a)=>(Pt(t)!==32&&Lt.throwArgumentError("invalid access list storageKey",`accessList[${n}:${a}]`,t),t.toLowerCase()))}}function sn(n){if(Array.isArray(n))return n.map((t,a)=>Array.isArray(t)?(t.length>2&&Lt.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${a}]`,t),zd(t[0],t[1])):zd(t.address,t.storageKeys));let e=Object.keys(n).map(t=>{let a=n[t].reduce((i,r)=>(i[r]=!0,i),{});return zd(t,Object.keys(a).sort())});return e.sort((t,a)=>t.address.localeCompare(a.address)),e}function J0(n){return sn(n).map(e=>[e.address,e.storageKeys])}function $0(n,e){if(n.gasPrice!=null){let a=F.from(n.gasPrice),i=F.from(n.maxFeePerGas||0);a.eq(i)||Lt.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:a,maxFeePerGas:i})}let t=[rn(n.chainId||0,"chainId"),rn(n.nonce||0,"nonce"),rn(n.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),rn(n.maxFeePerGas||0,"maxFeePerGas"),rn(n.gasLimit||0,"gasLimit"),n.to!=null?ce(n.to):"0x",rn(n.value||0,"value"),n.data||"0x",J0(n.accessList||[])];if(e){let a=Ln(e);t.push(rn(a.recoveryParam,"recoveryParam")),t.push(Zt(a.r)),t.push(Zt(a.s))}return _t(["0x02",ra(t)])}function Q0(n,e){let t=[rn(n.chainId||0,"chainId"),rn(n.nonce||0,"nonce"),rn(n.gasPrice||0,"gasPrice"),rn(n.gasLimit||0,"gasLimit"),n.to!=null?ce(n.to):"0x",rn(n.value||0,"value"),n.data||"0x",J0(n.accessList||[])];if(e){let a=Ln(e);t.push(rn(a.recoveryParam,"recoveryParam")),t.push(Zt(a.r)),t.push(Zt(a.s))}return _t(["0x01",ra(t)])}function bx(n,e){qi(n,xx);let t=[];hx.forEach(function(s){let o=n[s.name]||[],l={};s.numeric&&(l.hexPad="left"),o=j(K(o,l)),s.length&&o.length!==s.length&&o.length>0&&Lt.throwArgumentError("invalid length for "+s.name,"transaction:"+s.name,o),s.maxLength&&(o=Zt(o),o.length>s.maxLength&&Lt.throwArgumentError("invalid length for "+s.name,"transaction:"+s.name,o)),t.push(K(o))});let a=0;if(n.chainId!=null?(a=n.chainId,typeof a!="number"&&Lt.throwArgumentError("invalid transaction.chainId","transaction",n)):e&&!na(e)&&e.v>28&&(a=Math.floor((e.v-35)/2)),a!==0&&(t.push(K(a)),t.push("0x"),t.push("0x")),!e)return ra(t);let i=Ln(e),r=27+i.recoveryParam;return a!==0?(t.pop(),t.pop(),t.pop(),r+=a*2+8,i.v>28&&i.v!==r&&Lt.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):i.v!==r&&Lt.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),t.push(K(r)),t.push(Zt(j(i.r))),t.push(Zt(j(i.s))),ra(t)}function Xr(n,e){if(n.type==null||n.type===0)return n.accessList!=null&&Lt.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",n),bx(n,e);switch(n.type){case 1:return Q0(n,e);case 2:return $0(n,e);default:break}return Lt.throwError(`unsupported transaction type: ${n.type}`,E.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:n.type})}function X0(n,e,t){try{let a=Ft(e[0]).toNumber();if(a!==0&&a!==1)throw new Error("bad recid");n.v=a}catch{Lt.throwArgumentError("invalid v for transaction type: 1","v",e[0])}n.r=me(e[1],32),n.s=me(e[2],32);try{let a=fe(t(n));n.from=yi(a,{r:n.r,s:n.s,recoveryParam:n.v})}catch{}}function gx(n){let e=qr(n.slice(1));e.length!==9&&e.length!==12&&Lt.throwArgumentError("invalid component count for transaction type: 2","payload",K(n));let t=Ft(e[2]),a=Ft(e[3]),i={type:2,chainId:Ft(e[0]).toNumber(),nonce:Ft(e[1]).toNumber(),maxPriorityFeePerGas:t,maxFeePerGas:a,gasPrice:null,gasLimit:Ft(e[4]),to:Kd(e[5]),value:Ft(e[6]),data:e[7],accessList:sn(e[8])};return e.length===9||(i.hash=fe(n),X0(i,e.slice(9),$0)),i}function Tx(n){let e=qr(n.slice(1));e.length!==8&&e.length!==11&&Lt.throwArgumentError("invalid component count for transaction type: 1","payload",K(n));let t={type:1,chainId:Ft(e[0]).toNumber(),nonce:Ft(e[1]).toNumber(),gasPrice:Ft(e[2]),gasLimit:Ft(e[3]),to:Kd(e[4]),value:Ft(e[5]),data:e[6],accessList:sn(e[7])};return e.length===8||(t.hash=fe(n),X0(t,e.slice(8),Q0)),t}function vx(n){let e=qr(n);e.length!==9&&e.length!==6&&Lt.throwArgumentError("invalid raw transaction","rawTransaction",n);let t={nonce:Ft(e[0]).toNumber(),gasPrice:Ft(e[1]),gasLimit:Ft(e[2]),to:Kd(e[3]),value:Ft(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 a=t.v-27,i=e.slice(0,6);t.chainId!==0&&(i.push(K(t.chainId)),i.push("0x"),i.push("0x"),a-=t.chainId*2+8);let r=fe(ra(i));try{t.from=yi(r,{r:K(t.r),s:K(t.s),recoveryParam:a})}catch{}t.hash=fe(n)}return t.type=null,t}function Eo(n){let e=j(n);if(e[0]>127)return vx(e);switch(e[0]){case 1:return Tx(e);case 2:return gx(e);default:break}return Lt.throwError(`unsupported transaction type: ${e[0]}`,E.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}var Y0="contracts/5.7.0";var Pa=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Se=new E(Y0),wx={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 Mo(n,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{}n||Se.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&&Se.throwArgumentError("resolver or addr is not configured for ENS name","name",t),a})}function Yr(n,e,t){return Pa(this,void 0,void 0,function*(){return Array.isArray(t)?yield Promise.all(t.map((a,i)=>Yr(n,Array.isArray(e)?e[i]:e[a.name],a))):t.type==="address"?yield Mo(n,e):t.type==="tuple"?yield Yr(n,e,t.components):t.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(a=>Yr(n,a,t.arrayChildren))):Promise.reject(Se.makeError("invalid value for array",E.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function So(n,e,t){return Pa(this,void 0,void 0,function*(){let a={};t.length===e.inputs.length+1&&typeof t[t.length-1]=="object"&&(a=we(t.pop())),Se.checkArgumentCount(t.length,e.inputs.length,"passed to contract"),n.signer?a.from?a.from=Ie({override:Mo(n.signer,a.from),signer:n.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",E.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),p.override})):a.from=n.signer.getAddress():a.from&&(a.from=Mo(n.provider,a.from));let i=yield Ie({args:Yr(n.signer||n.provider,t,e.inputs),address:n.resolvedAddress,overrides:Ie(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=sn(o.accessList)),s.gasLimit==null&&e.gas!=null){let p=21e3,f=j(r);for(let x=0;xa[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 _x(n,e){return function(...t){return So(n,e,t)}}function kx(n,e){let t=n.signer||n.provider;return function(...a){return Pa(this,void 0,void 0,function*(){t||Se.throwError("estimate require a provider or signer",E.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});let i=yield So(n,e,a);return yield t.estimateGas(i)})}}function ef(n,e){let t=e.wait.bind(e);e.wait=a=>t(a).then(i=>(i.events=i.logs.map(r=>{let s=mt(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 tf(n,e,t){let a=n.signer||n.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=we(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 So(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 Ax(n,e){return function(...t){return Pa(this,void 0,void 0,function*(){n.signer||Se.throwError("sending a transaction requires a signer",E.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),n.deployTransaction!=null&&(yield n._deployed());let a=yield So(n,e,t),i=yield n.signer.sendTransaction(a);return ef(n,i),i})}}function Z0(n,e,t){return e.constant?tf(n,e,t):Ax(n,e)}function nf(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 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(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]}},Wd=class extends fi{constructor(){super("error",null)}},Co=class extends fi{constructor(e,t,a,i){let r={address:e},s=t.getEventTopic(a);i?(s!==i[0]&&Se.throwArgumentError("topic mismatch","topics",i),r.topics=i.slice()):r.topics=[s],super(nf(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}},Io=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=(a,i)=>this.interface.decodeEventLog(t.eventFragment,a,i),e.args=t.args}catch{}}},dr=class{constructor(e,t,a){B(this,"interface",ht(new.target,"getInterface")(t)),a==null?(B(this,"provider",null),B(this,"signer",null)):Gt.isSigner(a)?(B(this,"provider",a.provider||null),B(this,"signer",a)):$t.isProvider(a)?(B(this,"provider",a),B(this,"signer",null)):Se.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]]):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",Mo(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,Z0(this,o,!0)),this.functions[s]==null&&B(this.functions,s,Z0(this,o,!1)),this.callStatic[s]==null&&B(this.callStatic,s,tf(this,o,!0)),this.populateTransaction[s]==null&&B(this.populateTransaction,s,_x(this,o)),this.estimateGas[s]==null&&B(this.estimateGas,s,kx(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",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=we(e||{});return["from","to"].forEach(function(a){t[a]!=null&&Se.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 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 Wd);if(e==="event")return this._normalizeRunningEvent(new fi("event",null));if(e==="*")return this._normalizeRunningEvent(new Io(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 a=e.topics[0];if(typeof a!="string")throw new Error("invalid topic");let i=this.interface.getEvent(a);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 fi(nf(t),t))}return this._normalizeRunningEvent(new Io(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=mt(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||Se.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=we(i.filter);return typeof t=="string"&&ae(t,32)?(a!=null&&Se.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 dr{},ci=class{constructor(e,t,a){let i=null;typeof t=="string"?i=t:on(t)?i=K(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),a&&!Gt.isSigner(a)&&Se.throwArgumentError("invalid signer","signer",a),B(this,"bytecode",i),B(this,"interface",ht(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=we(e.pop());for(let a in t)if(!wx[a])throw new Error("unknown transaction override "+a)}return["data","from","to"].forEach(a=>{t[a]!=null&&Se.throwError("cannot override "+a,E.errors.UNSUPPORTED_OPERATION,{operation:a})}),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=K(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 a=yield Yr(this.signer,e,this.interface.deploy.inputs);a.push(t);let i=this.getDeployTransaction(...a),r=yield this.signer.sendTransaction(i),s=ht(this.constructor,"getContractAddress")(r),o=ht(this.constructor,"getContract")(s,this.interface,this.signer);return ef(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 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 ui(e)}static getContract(e,t,a){return new oe(e,t,a)}};var Ro=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 I=j(ya(i,n,l));r||(r=I.length,f=new Uint8Array(r),s=Math.ceil(a/r),p=a-(s-1)*r),f.set(I);for(let S=1;S{var M6=Object.create;var Hs=Object.defineProperty;var C6=Object.getOwnPropertyDescriptor;var I6=Object.getOwnPropertyNames;var S6=Object.getPrototypeOf,R6=Object.prototype.hasOwnProperty;var P6=(n,e,t)=>e in n?Hs(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var ne=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),ji=(n,e)=>{for(var t in e)Hs(n,t,{get:e[t],enumerable:!0})},N6=(n,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of I6(e))!R6.call(n,i)&&i!==t&&Hs(n,i,{get:()=>e[i],enumerable:!(a=C6(e,i))||a.enumerable});return n};var wn=(n,e,t)=>(t=n!=null?M6(S6(n)):{},N6(e||!n||!n.__esModule?Hs(t,"default",{value:n,enumerable:!0}):t,n));var xe=(n,e,t)=>(P6(n,typeof e!="symbol"?e+"":e,t),t);var Lp=ne(()=>{});var ed=ne((Up,Zu)=>{(function(n,e){"use strict";function t(C,u){if(!C)throw new Error(u||"Assertion failed")}function a(C,u){C.super_=u;var y=function(){};y.prototype=u.prototype,C.prototype=new y,C.prototype.constructor=C}function i(C,u,y){if(i.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=i:e.BN=i,i.BN=i,i.wordSize=26;var r;try{typeof window<"u"&&typeof window.Buffer<"u"?r=window.Buffer:r=Lp().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(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 b=s(C,y);return y-1>=u&&(b|=s(C,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(C,u,y,b){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()},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"],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];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=I[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(C){for(var u=new Array(C.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-C.length+1);P<=c;P++){var D=d-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[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,W=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,Ka=w[7]|0,Ue=Ka&8191,Ve=Ka>>>13,Wa=w[8]|0,je=Wa&8191,He=Wa>>>13,Ja=w[9]|0,qe=Ja&8191,Ge=Ja>>>13,$a=A[0]|0,ze=$a&8191,Ke=$a>>>13,Qa=A[1]|0,We=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,Ke),d=d+Math.imul(P,ze)|0,m=Math.imul(P,Ke);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,Ke),d=d+Math.imul(W,ze)|0,m=Math.imul(W,Ke),g=g+Math.imul(c,We)|0,d=d+Math.imul(c,Je)|0,d=d+Math.imul(P,We)|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,Ke),d=d+Math.imul(Q,ze)|0,m=Math.imul(Q,Ke),g=g+Math.imul(V,We)|0,d=d+Math.imul(V,Je)|0,d=d+Math.imul(W,We)|0,m=m+Math.imul(W,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,Ke),d=d+Math.imul(le,ze)|0,m=Math.imul(le,Ke),g=g+Math.imul(X,We)|0,d=d+Math.imul(X,Je)|0,d=d+Math.imul(Q,We)|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(W,$e)|0,m=m+Math.imul(W,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,Ke),d=d+Math.imul(De,ze)|0,m=Math.imul(De,Ke),g=g+Math.imul(Z,We)|0,d=d+Math.imul(Z,Je)|0,d=d+Math.imul(le,We)|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(W,Xe)|0,m=m+Math.imul(W,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,Ke),d=d+Math.imul(Be,ze)|0,m=Math.imul(Be,Ke),g=g+Math.imul(Ne,We)|0,d=d+Math.imul(Ne,Je)|0,d=d+Math.imul(De,We)|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(W,Ze)|0,m=m+Math.imul(W,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 Uu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Uu>>>26)|0,Uu&=67108863,g=Math.imul(Fe,ze),d=Math.imul(Fe,Ke),d=d+Math.imul(Le,ze)|0,m=Math.imul(Le,Ke),g=g+Math.imul(Oe,We)|0,d=d+Math.imul(Oe,Je)|0,d=d+Math.imul(Be,We)|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(W,tt)|0,m=m+Math.imul(W,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 Vu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Vu>>>26)|0,Vu&=67108863,g=Math.imul(Ue,ze),d=Math.imul(Ue,Ke),d=d+Math.imul(Ve,ze)|0,m=Math.imul(Ve,Ke),g=g+Math.imul(Fe,We)|0,d=d+Math.imul(Fe,Je)|0,d=d+Math.imul(Le,We)|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(W,at)|0,m=m+Math.imul(W,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,Ke),d=d+Math.imul(He,ze)|0,m=Math.imul(He,Ke),g=g+Math.imul(Ue,We)|0,d=d+Math.imul(Ue,Je)|0,d=d+Math.imul(Ve,We)|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(W,rt)|0,m=m+Math.imul(W,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 Hu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Hu>>>26)|0,Hu&=67108863,g=Math.imul(qe,ze),d=Math.imul(qe,Ke),d=d+Math.imul(Ge,ze)|0,m=Math.imul(Ge,Ke),g=g+Math.imul(je,We)|0,d=d+Math.imul(je,Je)|0,d=d+Math.imul(He,We)|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(W,ot)|0,m=m+Math.imul(W,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,We),d=Math.imul(qe,Je),d=d+Math.imul(Ge,We)|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(W,dt)|0,m=m+Math.imul(W,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,$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 zu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(zu>>>26)|0,zu&=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 Wu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Wu>>>26)|0,Wu&=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 Ju=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Ju>>>26)|0,Ju&=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 $u=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+($u>>>26)|0,$u&=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 Qu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Qu>>>26)|0,Qu&=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 Xu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Xu>>>26)|0,Xu&=67108863,g=Math.imul(qe,dt),d=Math.imul(qe,lt),d=d+Math.imul(Ge,dt)|0,m=Math.imul(Ge,lt);var Yu=(k+g|0)+((d&8191)<<13)|0;return k=(m+(d>>>13)|0)+(Yu>>>26)|0,Yu&=67108863,h[0]=Ta,h[1]=va,h[2]=wa,h[3]=_a,h[4]=ka,h[5]=Uu,h[6]=Vu,h[7]=ju,h[8]=Hu,h[9]=qu,h[10]=Gu,h[11]=zu,h[12]=Ku,h[13]=Wu,h[14]=Ju,h[15]=$u,h[16]=Qu,h[17]=Xu,h[18]=Yu,k!==0&&(h[19]=k,b.length++),b};Math.imul||(O=L);function U(C,u,y){y.negative=u.negative^C.negative,y.length=C.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(C,u,y){return U(C,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(C,u){this.x=C,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 $(C,u){this.name=C,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(C){if(typeof C=="string"){var u=i._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 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(C){q.call(this,C),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 Zu>"u"||Zu,Up)});var ly=ne((mg,Js)=>{(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 Js=="object"&&Js.exports,o=typeof define=="function"&&define.amd,l=!a.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",p="0123456789abcdef".split(""),f=[31,7936,2031616,520093696],x=[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};(a.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(c){return Object.prototype.toString.call(c)==="[object Array]"}),l&&(a.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,W){return new d(c,P,W).update(V)[D]()}},$=function(c,P,D){return function(V,W,ee,X){return u["cshake"+c].update(V,W,ee,X)[D]()}},de=function(c,P,D){return function(V,W,ee,X){return u["kmac"+c].update(V,W,ee,X)[D]()}},T=function(c,P,D,V){for(var W=0;W>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(n);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(n)}else throw new Error(n);P=!0}for(var V=this.blocks,W=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)<=W){for(this.start=Z-W,this.block=V[X],Z=0;Z>8,D=c&255;D>0;)W.unshift(D),c=c>>8,D=c&255,++V;return P?W.push(V):W.unshift(V),this.update(W),W.length},d.prototype.encodeString=function(c){var P,D=typeof c;if(D!=="string"){if(D==="object"){if(c===null)throw new Error(n);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(n)}else throw new Error(n);P=!0}var V=0,W=c.length;if(P)V=W;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),W=0)}return V&&(Q=P[W],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,W=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[W],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,W,ee,X,Q,ft,Z,le,qa,Ne,De,Ga,Oe,Be,za,Fe,Le,Ka,Ue,Ve,Wa,je,He,Ja,qe,Ge,$a,ze,Ke,Qa,We,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)W=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=W^(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^(W<<1|ee>>>31),D=qa^(ee<<1|W>>>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,Ke=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,We=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,Ka=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,Wa=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&Ka,c[3]=za^~Le&Ue,c[12]=Ja^~Ge&ze,c[13]=qe^~$a&Ke,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^~Ka&Ve,c[5]=Le^~Ue&Wa,c[14]=Ge^~ze&Qa,c[15]=$a^~Ke&We,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]=Ka^~Ve&Ga,c[7]=Ue^~Wa&Oe,c[16]=ze^~Qa&je,c[17]=Ke^~We&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]=Wa^~Oe&za,c[18]=Qa^~je&Ja,c[19]=We^~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)Js.exports=u;else{for(b=0;b{r0.exports=i0;function i0(n,e){if(!n)throw new Error(e||"Assertion failed")}i0.equal=function(e,t,a){if(e!=t)throw new Error(a||"Assertion failed: "+e+" != "+t)}});var s0=ne((o3,Md)=>{typeof Object.create=="function"?Md.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Md.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 kn=ne(Pe=>{"use strict";var L2=nr(),U2=s0();Pe.inherits=U2;function V2(n,e){return(n.charCodeAt(e)&64512)!==55296||e<0||e+1>=n.length?!1:(n.charCodeAt(e+1)&64512)===56320}function j2(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}Pe.htonl=o0;function q2(n,e){for(var t="",a=0;a>>0}return r}Pe.join32=G2;function z2(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}Pe.split32=z2;function K2(n,e){return n>>>e|n<<32-e}Pe.rotr32=K2;function W2(n,e){return n<>>32-e}Pe.rotl32=W2;function J2(n,e){return n+e>>>0}Pe.sum32=J2;function $2(n,e,t){return n+e+t>>>0}Pe.sum32_3=$2;function Q2(n,e,t,a){return n+e+t+a>>>0}Pe.sum32_4=Q2;function X2(n,e,t,a,i){return n+e+t+a+i>>>0}Pe.sum32_5=X2;function Y2(n,e,t,a){var i=n[e],r=n[e+1],s=a+r>>>0,o=(s>>0,n[e+1]=s}Pe.sum64=Y2;function Z2(n,e,t,a){var i=e+a>>>0,r=(i>>0}Pe.sum64_hi=Z2;function eh(n,e,t,a){var i=e+a;return i>>>0}Pe.sum64_lo=eh;function th(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}Pe.sum64_4_hi=th;function nh(n,e,t,a,i,r,s,o){var l=e+a+r+o;return l>>>0}Pe.sum64_4_lo=nh;function ah(n,e,t,a,i,r,s,o,l,p){var f=0,x=e;x=x+a>>>0,f+=x>>0,f+=x>>0,f+=x>>0,f+=x>>0}Pe.sum64_5_hi=ah;function ih(n,e,t,a,i,r,s,o,l,p){var f=e+a+r+o+p;return f>>>0}Pe.sum64_5_lo=ih;function rh(n,e,t){var a=e<<32-t|n>>>t;return a>>>0}Pe.rotr64_hi=rh;function sh(n,e,t){var a=n<<32-t|e>>>t;return a>>>0}Pe.rotr64_lo=sh;function oh(n,e,t){return n>>>t}Pe.shr64_hi=oh;function uh(n,e,t){var a=n<<32-t|e>>>t;return a>>>0}Pe.shr64_lo=uh});var ar=ne(p0=>{"use strict";var l0=kn(),dh=nr();function ho(){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}p0.BlockHash=ho;ho.prototype.update=function(e,t){if(e=l0.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=l0.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 lh=kn(),jn=lh.rotr32;function ph(n,e,t,a){if(n===0)return y0(e,t,a);if(n===1||n===3)return c0(e,t,a);if(n===2)return f0(e,t,a)}ua.ft_1=ph;function y0(n,e,t){return n&e^~n&t}ua.ch32=y0;function f0(n,e,t){return n&e^n&t^e&t}ua.maj32=f0;function c0(n,e,t){return n^e^t}ua.p32=c0;function yh(n){return jn(n,2)^jn(n,13)^jn(n,22)}ua.s0_256=yh;function fh(n){return jn(n,6)^jn(n,11)^jn(n,25)}ua.s1_256=fh;function ch(n){return jn(n,7)^jn(n,18)^n>>>3}ua.g0_256=ch;function mh(n){return jn(n,17)^jn(n,19)^n>>>10}ua.g1_256=mh});var x0=ne((p3,h0)=>{"use strict";var ir=kn(),hh=ar(),xh=Cd(),Id=ir.rotl32,$r=ir.sum32,bh=ir.sum32_5,gh=xh.ft_1,m0=hh.BlockHash,Th=[1518500249,1859775393,2400959708,3395469782];function Hn(){if(!(this instanceof Hn))return new Hn;m0.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}ir.inherits(Hn,m0);h0.exports=Hn;Hn.blockSize=512;Hn.outSize=160;Hn.hmacStrength=80;Hn.padLength=64;Hn.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 rr=kn(),vh=ar(),sr=Cd(),wh=nr(),An=rr.sum32,_h=rr.sum32_4,kh=rr.sum32_5,Ah=sr.ch32,Eh=sr.maj32,Mh=sr.s0_256,Ch=sr.s1_256,Ih=sr.g0_256,Sh=sr.g1_256,b0=vh.BlockHash,Rh=[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;b0.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=Rh,this.W=new Array(64)}rr.inherits(qn,b0);g0.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 Rd=kn(),T0=Sd();function da(){if(!(this instanceof da))return new da;T0.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}Rd.inherits(da,T0);v0.exports=da;da.blockSize=512;da.outSize=224;da.hmacStrength=192;da.padLength=64;da.prototype._digest=function(e){return e==="hex"?Rd.toHex32(this.h.slice(0,7),"big"):Rd.split32(this.h.slice(0,7),"big")}});var Dd=ne((c3,E0)=>{"use strict";var Qt=kn(),Ph=ar(),Nh=nr(),Gn=Qt.rotr64_hi,zn=Qt.rotr64_lo,_0=Qt.shr64_hi,k0=Qt.shr64_lo,Ia=Qt.sum64,Pd=Qt.sum64_hi,Nd=Qt.sum64_lo,Dh=Qt.sum64_4_hi,Oh=Qt.sum64_4_lo,Bh=Qt.sum64_5_hi,Fh=Qt.sum64_5_lo,A0=Ph.BlockHash,Lh=[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;A0.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=Lh,this.W=new Array(160)}Qt.inherits(En,A0);E0.exports=En;En.blockSize=1024;En.outSize=512;En.hmacStrength=192;En.padLength=128;En.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 Od=kn(),M0=Dd();function la(){if(!(this instanceof la))return new la;M0.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}Od.inherits(la,M0);C0.exports=la;la.blockSize=1024;la.outSize=384;la.hmacStrength=192;la.padLength=128;la.prototype._digest=function(e){return e==="hex"?Od.toHex32(this.h.slice(0,12),"big"):Od.split32(this.h.slice(0,12),"big")}});var S0=ne(or=>{"use strict";or.sha1=x0();or.sha224=w0();or.sha256=Sd();or.sha384=I0();or.sha512=Dd()});var B0=ne(O0=>{"use strict";var pi=kn(),Xh=ar(),xo=pi.rotl32,R0=pi.sum32,Qr=pi.sum32_3,P0=pi.sum32_4,D0=Xh.BlockHash;function Kn(){if(!(this instanceof Kn))return new Kn;D0.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}pi.inherits(Kn,D0);O0.ripemd160=Kn;Kn.blockSize=512;Kn.outSize=160;Kn.hmacStrength=192;Kn.padLength=64;Kn.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,f=r,x=s,I=o,_=0;_<80;_++){var v=R0(xo(P0(a,N0(_,i,r,s),e[ex[_]+t],Yh(_)),nx[_]),o);a=o,o=s,s=xo(r,10),r=i,i=v,v=R0(xo(P0(l,N0(79-_,p,f,x),e[tx[_]+t],Zh(_)),ax[_]),I),l=I,I=x,x=xo(f,10),f=p,p=v}v=Qr(this.h[1],r,x),this.h[1]=Qr(this.h[2],s,I),this.h[2]=Qr(this.h[3],o,l),this.h[3]=Qr(this.h[4],a,p),this.h[4]=Qr(this.h[0],i,f),this.h[0]=v};Kn.prototype._digest=function(e){return e==="hex"?pi.toHex32(this.h,"little"):pi.split32(this.h,"little")};function N0(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 Yh(n){return n<=15?0:n<=31?1518500249:n<=47?1859775393:n<=63?2400959708:2840853838}function Zh(n){return n<=15?1352829926:n<=31?1548603684:n<=47?1836072691:n<=63?2053994217:0}var ex=[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],tx=[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],nx=[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],ax=[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 L0=ne((b3,F0)=>{"use strict";var ix=kn(),rx=nr();function ur(n,e,t){if(!(this instanceof ur))return new ur(n,e,t);this.Hash=n,this.blockSize=n.blockSize/8,this.outSize=n.outSize/8,this.inner=null,this.outer=null,this._init(ix.toArray(e,t))}F0.exports=ur;ur.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),rx(e.length<=this.blockSize);for(var t=e.length;t{var St=U0;St.utils=kn();St.common=ar();St.sha=S0();St.ripemd=B0();St.hmac=L0();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 tl=ne((el,cf)=>{"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&&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],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],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,W=P%4,this._Ke[V][W]=m[k],this._Kd[h-V][W]=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=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,G=J,c=$,P,D,V,W,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],W=(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]=(W+de[D-7]|0)+(ee+de[D-16]|0)|0;for(D=0;D<64;D++)W=(((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+W|0,g=k,k=h,h=A,A=W+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,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,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 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=a(_,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=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 I={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 sl<"u"?hf.exports=I:typeof define=="function"&&define.amd?define(I):n&&(n.scrypt&&(n._scrypt=n.scrypt),n.scrypt=I)})(sl)});var jf=ne((o4,Vf)=>{"use strict";var jo="qpzry9x8gf2tvdw0s3jn54khce6mua7l",pl={};for(ss=0;ss>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 Lf(n){for(var e=1,t=0;t126)return"Invalid prefix ("+n+")";e=xr(e)^a>>5}for(e=xr(e),t=0;tt)throw new TypeError("Exceeds length limit");n=n.toLowerCase();var a=Lf(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=xr(a)^s,i+=jo.charAt(s)}for(r=0;r<6;++r)a=xr(a);for(a^=1,r=0;r<6;++r){var o=a>>(5-r)*5&31;i+=jo.charAt(o)}return i}function Uf(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=Lf(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 qx(){var n=Uf.apply(null,arguments);if(typeof n=="object")return n}function Gx(n){var e=Uf.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function Ho(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 ql=="object"&&typeof Gl<"u"?Gl.exports=e():typeof define=="function"&&define.amd?define(e):(n=typeof globalThis<"u"?globalThis:n||self,n.fetchRetry=e())})(ql,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,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(I,_){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)I(U);else if(typeof x=="function")try{return Promise.resolve(x(L,null,U)).then(function(H){H?S(L,null,U):I(U)}).catch(_)}catch(H){_(H)}else L=0}function t(a){this.name="ArgumentError",this.message=a}return n})});var zl=ne(au=>{"use strict";Object.defineProperty(au,"__esModule",{value:!0});au.$dictionary=void 0;au.$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 Is=ne((mA,tm)=>{tm.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}});var Wl=ne(Fa=>{var Ee=Is(),Kl=()=>[{type:Ee.RANGE,from:48,to:57}],nm=()=>[{type:Ee.CHAR,value:95},{type:Ee.RANGE,from:97,to:122},{type:Ee.RANGE,from:65,to:90}].concat(Kl()),am=()=>[{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}],O5=()=>[{type:Ee.CHAR,value:10},{type:Ee.CHAR,value:13},{type:Ee.CHAR,value:8232},{type:Ee.CHAR,value:8233}];Fa.words=()=>({type:Ee.SET,set:nm(),not:!1});Fa.notWords=()=>({type:Ee.SET,set:nm(),not:!0});Fa.ints=()=>({type:Ee.SET,set:Kl(),not:!1});Fa.notInts=()=>({type:Ee.SET,set:Kl(),not:!0});Fa.whitespace=()=>({type:Ee.SET,set:am(),not:!1});Fa.notWhitespace=()=>({type:Ee.SET,set:am(),not:!0});Fa.anyChar=()=>({type:Ee.SET,set:O5(),not:!0})});var rm=ne(Ss=>{var im=Is(),Mr=Wl(),B5="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?",F5={0:0,t:9,n:10,v:11,f:12,r:13};Ss.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 f=a?8:r?parseInt(r,16):s?parseInt(s,16):o?parseInt(o,8):l?B5.indexOf(l):F5[p],x=String.fromCharCode(f);return/[[\]{}^$.|?*+()]/.test(x)&&(x="\\"+x),x}),n};Ss.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(Mr.words());else if(i[2])t.push(Mr.ints());else if(i[3])t.push(Mr.whitespace());else if(i[4])t.push(Mr.notWords());else if(i[5])t.push(Mr.notInts());else if(i[6])t.push(Mr.notWhitespace());else if(i[7])t.push({type:im.RANGE,from:(i[8]||i[9]).charCodeAt(0),to:i[10].charCodeAt(0)});else if(r=i[12])t.push({type:im.CHAR,value:r.charCodeAt(0)});else return[t,a.lastIndex];Ss.error(e,"Unterminated character class")};Ss.error=(n,e)=>{throw new SyntaxError("Invalid regular expression: /"+n+"/: "+e)}});var sm=ne(Rs=>{var iu=Is();Rs.wordBoundary=()=>({type:iu.POSITION,value:"b"});Rs.nonWordBoundary=()=>({type:iu.POSITION,value:"B"});Rs.begin=()=>({type:iu.POSITION,value:"^"});Rs.end=()=>({type:iu.POSITION,value:"$"})});var om=ne((gA,Jl)=>{var Cr=rm(),xn=Is(),ki=Wl(),ru=sm();Jl.exports=n=>{var e=0,t,a,i={type:xn.ROOT,stack:[]},r=i,s=i.stack,o=[],l=O=>{Cr.error(n,`Nothing to repeat at column ${O-1}`)},p=Cr.strToChars(n);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 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}))}};um.exports=La});var pm=ne((vA,lm)=>{var su=om(),Ps=dm(),Ai=su.types;lm.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=su(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 a,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),a=e.options?this._randSelect(e.options):e.stack,i="",s=0,o=a.length;s{"use strict";var L5=Ei&&Ei.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ei,"__esModule",{value:!0});Ei.RandomGenerator=void 0;var U5=L5(pm()),V5;(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 U5.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()}})(V5=Ei.RandomGenerator||(Ei.RandomGenerator={}))});var Ds=ne(Ir=>{"use strict";var j5=Ir&&Ir.__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(Ir,"__esModule",{value:!0});Ir.TypeGuardError=void 0;var H5=function(n){j5(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);Ir.TypeGuardError=H5});var fm=ne(ou=>{"use strict";Object.defineProperty(ou,"__esModule",{value:!0});ou.$any=void 0;var q5=function(n){return n!==void 0?JSON.parse(JSON.stringify(n)):void 0};ou.$any=q5});var cm=ne(uu=>{"use strict";Object.defineProperty(uu,"__esModule",{value:!0});uu.$every=void 0;var G5=function(n,e){for(var t=null,a=0;a{"use strict";Object.defineProperty(du,"__esModule",{value:!0});du.$guard=void 0;var z5=Ds(),K5=function(n){return function(e,t){if(e===!0)throw new z5.TypeGuardError({method:n,path:t.path,expected:t.expected,value:t.value});return!1}};du.$guard=K5});var hm=ne(lu=>{"use strict";Object.defineProperty(lu,"__esModule",{value:!0});lu.$is_between=void 0;var W5=function(n,e,t){return e<=n&&n<=t};lu.$is_between=W5});var xm=ne(pu=>{"use strict";Object.defineProperty(pu,"__esModule",{value:!0});pu.$is_custom=void 0;var J5=zl(),$5=function(n,e,t,a){var i,r=(i=J5.$dictionary.get(n))===null||i===void 0?void 0:i.get(e);return r===void 0?!0:r(t)(a)};pu.$is_custom=$5});var bm=ne(yu=>{"use strict";Object.defineProperty(yu,"__esModule",{value:!0});yu.$is_date=void 0;var Q5=function(n){return X5.test(n)};yu.$is_date=Q5;var X5=/^(\d{4})-(\d{2})-(\d{2})$/});var gm=ne(fu=>{"use strict";Object.defineProperty(fu,"__esModule",{value:!0});fu.$is_datetime=void 0;var Y5=function(n){return!isNaN(new Date(n).getTime())};fu.$is_datetime=Y5});var Tm=ne(cu=>{"use strict";Object.defineProperty(cu,"__esModule",{value:!0});cu.$is_email=void 0;var Z5=function(n){return eb.test(n)};cu.$is_email=Z5;var eb=/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i});var vm=ne(mu=>{"use strict";Object.defineProperty(mu,"__esModule",{value:!0});mu.$is_ipv4=void 0;var tb=function(n){return nb.test(n)};mu.$is_ipv4=tb;var nb=/^(?: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 wm=ne(hu=>{"use strict";Object.defineProperty(hu,"__esModule",{value:!0});hu.$is_ipv6=void 0;var ab=function(n){return ib.test(n)};hu.$is_ipv6=ab;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 _m=ne(xu=>{"use strict";Object.defineProperty(xu,"__esModule",{value:!0});xu.$is_url=void 0;var rb=function(n){return sb.test(n)};xu.$is_url=rb;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 km=ne(bu=>{"use strict";Object.defineProperty(bu,"__esModule",{value:!0});bu.$is_uuid=void 0;var ob=function(n){return ub.test(n)};bu.$is_uuid=ob;var ub=/^(?:[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 Am=ne(gu=>{"use strict";Object.defineProperty(gu,"__esModule",{value:!0});gu.$join=void 0;var db=function(n){return lb(n)?".".concat(n):"[".concat(JSON.stringify(n),"]")};gu.$join=db;var lb=function(n){return pb(n)===!1&&/^[a-zA-Z_$][a-zA-Z_$0-9]*$/g.test(n)},pb=function(n){return yb.has(n)},yb=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 Em=ne(Tu=>{"use strict";Object.defineProperty(Tu,"__esModule",{value:!0});Tu.$number=void 0;var fb=Ds(),cb=function(n){if(isFinite(n)===!1)throw new fb.TypeGuardError({method:"typia.stringify",expected:"number",value:n,message:"Error on typia.stringify(): infinite or not a number."});return n};Tu.$number=cb});var Mm=ne(vu=>{"use strict";Object.defineProperty(vu,"__esModule",{value:!0});vu.$report=void 0;var mb=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}};vu.$report=mb});var Cm=ne(wu=>{"use strict";Object.defineProperty(wu,"__esModule",{value:!0});wu.$rest=void 0;var hb=function(n){return n.length===2?"":","+n.substring(1,n.length-1)};wu.$rest=hb});var Im=ne(_u=>{"use strict";Object.defineProperty(_u,"__esModule",{value:!0});_u.$string=void 0;var xb=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,'"')};_u.$string=xb});var Sm=ne(ku=>{"use strict";Object.defineProperty(ku,"__esModule",{value:!0});ku.$tail=void 0;var bb=function(n){return n[n.length-1]===","?n.substring(0,n.length-1):n};ku.$tail=bb});var Dm=ne(Mi=>{"use strict";var Ut=Mi&&Mi.__assign||function(){return Ut=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 Ut(Ut({},n.is()),{number:Rb.$number,string:Db.$string,tail:Ob.$tail,rest:Nb.$rest,throws:e(t)})},n.clone=function(t){return Ut(Ut({},n.is()),{throws:e(t),any:gb.$any})},n.prune=function(t){return Ut(Ut({},n.is()),{throws:e(t)})},n.random=function(){return{generator:Rm.RandomGenerator,pick:Rm.RandomGenerator.pick}};var e=function(t){return function(a){throw new Pm.TypeGuardError(Ut(Ut({},a),{method:"typia.".concat(t)}))}}})(Bb=Mi.Namespace||(Mi.Namespace={}))});var Om=ne(Os=>{"use strict";Object.defineProperty(Os,"__esModule",{value:!0});Os.MapUtil=void 0;var Fb;(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}}})(Fb=Os.MapUtil||(Os.MapUtil={}))});var Fm=ne(Bm=>{"use strict";Object.defineProperty(Bm,"__esModule",{value:!0})});var Um=ne(Lm=>{"use strict";Object.defineProperty(Lm,"__esModule",{value:!0})});var jm=ne(Vm=>{"use strict";Object.defineProperty(Vm,"__esModule",{value:!0})});var qm=ne(Hm=>{"use strict";Object.defineProperty(Hm,"__esModule",{value:!0})});var zm=ne(Gm=>{"use strict";Object.defineProperty(Gm,"__esModule",{value:!0})});var Wm=ne(Km=>{"use strict";Object.defineProperty(Km,"__esModule",{value:!0})});var op=ne(z=>{"use strict";var Lb=z&&z.__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]}),Ci=z&&z.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Lb(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 Sr=zl(),Me=Dm(),Ub=Om();Ci(Fm(),z);Ci(Um(),z);Ci(jm(),z);Ci(qm(),z);Ci(zm(),z);Ci(Wm(),z);Ci(Ds(),z);function $l(){re("assert")}z.assert=$l;Object.assign($l,Me.Namespace.assert("assert"));function Ql(){re("assertType")}z.assertType=Ql;Object.assign(Ql,Me.Namespace.assert("assertType"));function Au(){re("is")}z.is=Au;Object.assign(Au,Me.Namespace.assert("is"));function Eu(){re("validate")}z.validate=Eu;Object.assign(Eu,Me.Namespace.validate());function Xl(){re("assertEquals")}z.assertEquals=Xl;Object.assign(Xl,Me.Namespace.assert("assertEquals"));function Yl(){re("equals")}z.equals=Yl;Object.assign(Yl,Me.Namespace.is());function Zl(){re("validateEquals")}z.validateEquals=Zl;Object.assign(Zl,Me.Namespace.validate());z.customValidators={size:function(n){var e,t;return n?(t=(e=Sr.$dictionary.get(n))===null||e===void 0?void 0:e.size)!==null&&t!==void 0?t:0:Sr.$dictionary.size},has:function(n){return function(e){var t,a;return(a=(t=Sr.$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=Sr.$dictionary.get(n))===null||t===void 0?void 0:t.get(e)}},insert:function(n){return function(e){return function(t){var a=Ub.MapUtil.take(Sr.$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=Sr.$dictionary.get(n))===null||t===void 0?void 0:t.delete(e))!==null&&a!==void 0?a:!1}}};function Vb(){re("application")}z.application=Vb;function ep(){re("assertParse")}z.assertParse=ep;Object.assign(ep,Me.Namespace.assert("assertParse"));function tp(){re("isParse")}z.isParse=tp;Object.assign(tp,Au);function np(){re("validateParse")}z.validateParse=np;Object.assign(np,Eu);function ap(){re("stringify")}z.stringify=ap;Object.assign(ap,Me.Namespace.stringify("stringify"));function Mu(){re("assertStringify")}z.assertStringify=Mu;Object.assign(Mu,Me.Namespace.assert("assertStringify"));Object.assign(Mu,Me.Namespace.stringify("assertStringify"));function Cu(){re("isStringify")}z.isStringify=Cu;Object.assign(Cu,Me.Namespace.is());Object.assign(Cu,Me.Namespace.stringify("isStringify"));function Iu(){re("validateStringify")}z.validateStringify=Iu;Object.assign(Iu,Me.Namespace.validate());Object.assign(Iu,Me.Namespace.stringify("validateStringify"));function jb(){re("metadata")}z.metadata=jb;function ip(){re("random")}z.random=ip;Object.assign(ip,Me.Namespace.random());function Hb(){re("literals")}z.literals=Hb;function rp(){re("clone")}z.clone=rp;Object.assign(rp,Me.Namespace.clone("clone"));function Su(){re("assertClone")}z.assertClone=Su;Object.assign(Su,Me.Namespace.assert("assertClone"));Object.assign(Su,Me.Namespace.clone("assertClone"));function Ru(){re("isClone")}z.isClone=Ru;Object.assign(Ru,Me.Namespace.is());Object.assign(Ru,Me.Namespace.clone("isClone"));function Pu(){re("validateClone")}z.validateClone=Pu;Object.assign(Pu,Me.Namespace.validate());Object.assign(Pu,Me.Namespace.clone("validateClone"));function sp(){re("prune")}z.prune=sp;Object.assign(sp,Me.Namespace.prune("prune"));function Nu(){re("assertPrune")}z.assertPrune=Nu;Object.assign(Nu,Me.Namespace.assert("assertPrune"));Object.assign(Nu,Me.Namespace.prune("assertPrune"));function Du(){re("isPrune")}z.isPrune=Du;Object.assign(Du,Me.Namespace.is());Object.assign(Du,Me.Namespace.prune("isPrune"));function Ou(){re("validatePrune")}z.validatePrune=Ou;Object.assign(Ou,Me.Namespace.prune("validatePrune"));Object.assign(Ou,Me.Namespace.validate());function Jm(){re("createAssert")}z.createAssert=Jm;Object.assign(Jm,$l);function $m(){re("createAssertType")}z.createAssertType=$m;Object.assign($m,Ql);function Qm(){re("createIs")}z.createIs=Qm;Object.assign(Qm,Au);function Xm(){re("createValidate")}z.createValidate=Xm;Object.assign(Xm,Eu);function Ym(){re("createAssertEquals")}z.createAssertEquals=Ym;Object.assign(Ym,Xl);function Zm(){re("createEquals")}z.createEquals=Zm;Object.assign(Zm,Yl);function e6(){re("createValidateEquals")}z.createValidateEquals=e6;Object.assign(e6,Zl);function t6(){re("createIsParse")}z.createIsParse=t6;Object.assign(t6,tp);function n6(){re("createAssertParse")}z.createAssertParse=n6;Object.assign(n6,ep);function a6(){re("createValidateParse")}z.createValidateParse=a6;Object.assign(a6,np);function i6(){re("createStringify")}z.createStringify=i6;Object.assign(i6,ap);function r6(){re("createAssertStringify")}z.createAssertStringify=r6;Object.assign(r6,Mu);function s6(){re("createIsStringify")}z.createIsStringify=s6;Object.assign(s6,Cu);function o6(){re("createValidateStringify")}z.createValidateStringify=o6;Object.assign(o6,Iu);function u6(){re("createRandom")}z.createRandom=u6;Object.assign(u6,ip);function d6(){re("createClone")}z.createClone=d6;Object.assign(d6,rp);function l6(){re("createAssertClone")}z.createAssertClone=l6;Object.assign(l6,Su);function p6(){re("createIsClone")}z.createIsClone=p6;Object.assign(p6,Ru);function y6(){re("createValidateClone")}z.createValidateClone=y6;Object.assign(y6,Pu);function f6(){re("createPrune")}z.createPrune=f6;Object.assign(f6,sp);function c6(){re("createAssertPrune")}z.createAssertPrune=c6;Object.assign(c6,Nu);function m6(){re("createIsPrune")}z.createIsPrune=m6;Object.assign(m6,Du);function h6(){re("createValidatePrune")}z.createValidatePrune=h6;Object.assign(h6,Ou);function re(n){throw new Error("Error on typia.".concat(n,'(): no transform has been configured. Run "npx typia setup" command.'))}});var b6=ne(gn=>{"use strict";var x6=gn&&gn.__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]}),qb=gn&&gn.__setModuleDefault||(Object.create?function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}:function(n,e){n.default=e}),Gb=gn&&gn.__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)&&x6(e,n,t);return qb(e,n),e},zb=gn&&gn.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&x6(e,n,t)};Object.defineProperty(gn,"__esModule",{value:!0});var Kb=Gb(op());gn.default=Kb;zb(op(),gn)});var El={};ji(El,{BaseContract:()=>lr,BigNumber:()=>F,Contract:()=>oe,ContractFactory:()=>mi,FixedNumber:()=>ct,Signer:()=>Gt,VoidSigner:()=>oa,Wallet:()=>Cn,Wordlist:()=>hn,constants:()=>yt,errors:()=>Kt,getDefaultProvider:()=>Zo,logger:()=>wc,providers:()=>Zn,utils:()=>te,version:()=>tu,wordlists:()=>xi});var Xp=wn(ed());var Vp="logger/5.7.0";var jp=!1,Hp=!1,qs={debug:1,default:2,info:2,warning:3,error:4,off:5},qp=qs.default,td=null;function D6(){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 Gp=D6(),nd;(function(n){n.DEBUG="DEBUG",n.INFO="INFO",n.WARNING="WARNING",n.ERROR="ERROR",n.OFF="OFF"})(nd||(nd={}));var Kt;(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"})(Kt||(Kt={}));var zp="0123456789abcdef",E=class{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){let a=e.toLowerCase();qs[a]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(qp>qs[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(Hp)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 f="";for(let x=0;x>4],f+=zp[p[x]&15];i.push(l+"=Uint8Array(0x"+f+")")}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 Kt.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 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+" ]"),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"),Gp&&this.throwError("platform missing String.prototype.normalize",E.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:Gp})}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 td||(td=new E(Vp)),td}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",E.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),jp){if(!e)return;this.globalLogger().throwError("error censorship permanent",E.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}Hp=!!e,jp=!!t}static setLogLevel(e){let t=qs[e.toLowerCase()];if(t==null){E.globalLogger().warn("invalid log level - "+e);return}qp=t}static from(e){return new E(e)}};E.errors=Kt;E.levels=nd;var Kp="bytes/5.7.0";var wt=new E(Kp);function Jp(n){return!!n.toHexString}function Hi(n){return n.slice||(n.slice=function(){let e=Array.prototype.slice.call(arguments);return Hi(new Uint8Array(Array.prototype.slice.apply(n,e)))}),n}function na(n){return ae(n)&&!(n.length%2)||on(n)}function Wp(n){return typeof n=="number"&&n==n&&n%1===0}function on(n){if(n==null)return!1;if(n.constructor===Uint8Array)return!0;if(typeof n=="string"||!Wp(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"){wt.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),Hi(new Uint8Array(t))}if(e.allowMissingPrefix&&typeof n=="string"&&n.substring(0,2)!=="0x"&&(n="0x"+n),Jp(n)&&(n=n.toHexString()),ae(n)){let t=n.substring(2);t.length%2&&(e.hexPad==="left"?t="0"+t:e.hexPad==="right"?t+="0":wt.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),Hi(a)}function Zt(n){let e=j(n);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(n,e-n.length),Hi(t)}function ae(n,e){return!(typeof n!="string"||!n.match(/^0x[0-9A-Fa-f]*$/)||e&&n.length!==2+2*e)}var ad="0123456789abcdef";function K(n,e){if(e||(e={}),typeof n=="number"){wt.checkSafeUint53(n,"invalid hexlify value");let t="";for(;n;)t=ad[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),Jp(n))return n.toHexString();if(ae(n))return n.length%2&&(e.hexPad==="left"?n="0x0"+n.substring(2):e.hexPad==="right"?n+="0":wt.throwArgumentError("hex data is odd-length","value",n)),n.toLowerCase();if(on(n)){let t="0x";for(let a=0;a>4]+ad[i&15]}return t}return wt.throwArgumentError("invalid hexlify value","value",n)}function Pt(n){if(typeof n!="string")n=K(n);else if(!ae(n)||n.length%2)return null;return(n.length-2)/2}function Ce(n,e,t){return typeof n!="string"?n=K(n):(!ae(n)||n.length%2)&&wt.throwArgumentError("invalid hexData","value",n),e=2+2*e,t!=null?"0x"+n.substring(e,2+2*t):"0x"+n.substring(e)}function _t(n){let e="0x";return n.forEach(t=>{e+=K(t).substring(2)}),e}function Fn(n){let e=id(K(n,{hexPad:"left"}));return e==="0x"?"0x0":e}function id(n){typeof n!="string"&&(n=K(n)),ae(n)||wt.throwArgumentError("invalid hex string","value",n),n=n.substring(2);let e=0;for(;e2*e+2&&wt.throwArgumentError("value out of range","value",arguments[1]);n.length<2*e+2;)n="0x0"+n.substring(2);return n}function Ln(n){let e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(na(n)){let t=j(n);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]):wt.throwArgumentError("invalid signature string","signature",n),e.v<27&&(e.v===0||e.v===1?e.v+=27:wt.throwArgumentError("signature invalid v byte","signature",n)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(t[32]|=128),e._vs=K(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=ri(j(e._vs),32);e._vs=K(i);let r=i[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=r:e.recoveryParam!==r&&wt.throwArgumentError("signature recoveryParam mismatch _vs","signature",n),i[0]&=127;let s=K(i);e.s==null?e.s=s:e.s!==s&&wt.throwArgumentError("signature v mismatch _vs","signature",n)}if(e.recoveryParam==null)e.v==null?wt.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&&wt.throwArgumentError("signature recoveryParam mismatch v","signature",n)}e.r==null||!ae(e.r)?wt.throwArgumentError("signature missing or invalid r","signature",n):e.r=me(e.r,32),e.s==null||!ae(e.s)?wt.throwArgumentError("signature missing or invalid s","signature",n):e.s=me(e.s,32);let t=j(e.s);t[0]>=128&&wt.throwArgumentError("signature s out of range","signature",n),e.recoveryParam&&(t[0]|=128);let a=K(t);e._vs&&(ae(e._vs)||wt.throwArgumentError("signature invalid _vs","signature",n),e._vs=me(e._vs,32)),e._vs==null?e._vs=a:e._vs!==a&&wt.throwArgumentError("signature _vs mismatch v and s","signature",n)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function Br(n){return n=Ln(n),K(ye([n.r,n.s,n.recoveryParam?"0x1c":"0x1b"]))}var Gs="bignumber/5.7.0";var Fr=Xp.default.BN,aa=new E(Gs),rd={},$p=9007199254740991;function Yp(n){return n!=null&&(F.isBigNumber(n)||typeof n=="number"&&n%1===0||typeof n=="string"&&!!n.match(/^-?[0-9]+$/)||ae(n)||typeof n=="bigint"||on(n))}var Qp=!1,F=class{constructor(e,t){e!==rd&&aa.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 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 aa.throwError("this platform does not support BigInt",E.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?Qp||(Qp=!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()",E.errors.UNEXPECTED_ARGUMENT,{}):aa.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(rd,Lr(e)):e.match(/^-?[0-9]+$/)?new F(rd,Lr(new Fr(e))):aa.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&un("underflow","BigNumber.from",e),(e>=$p||e<=-$p)&&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 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"&&(ae(a)||a[0]==="-"&&ae(a.substring(1))))return F.from(a)}return aa.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}};function Lr(n){if(typeof n!="string")return Lr(n.toString(16));if(n[0]==="-")return n=n.substring(1),n[0]==="-"&&aa.throwArgumentError("invalid hex","value",n),n=Lr(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 Wt(n){return F.from(Lr(n))}function be(n){let e=F.from(n).toHexString();return e[0]==="-"?new Fr("-"+e.substring(3),16):new Fr(e.substring(2),16)}function un(n,e,t){let a={fault:n,operation:e};return t!=null&&(a.value=t),aa.throwError(n,E.errors.NUMERIC_FAULT,a)}function sd(n){return new Fr(n,36).toString(16)}function od(n){return new Fr(n,16).toString(36)}var Vt=new E(Gs),Ur={},ey=F.from(0),ty=F.from(-1);function ny(n,e,t,a){let i={fault:e,operation:t};return a!==void 0&&(i.value=a),Vt.throwError(n,E.errors.NUMERIC_FAULT,i)}var Vr="0";for(;Vr.length<256;)Vr+=Vr;function ud(n){if(typeof n!="number")try{n=F.from(n).toNumber()}catch{}return typeof n=="number"&&n>=0&&n<=256&&!(n%1)?"1"+Vr.substring(0,n):Vt.throwArgumentError("invalid decimal size","decimals",n)}function qi(n,e){e==null&&(e=0);let t=ud(e);n=F.from(n);let a=n.lt(ey);a&&(n=n.mul(ty));let i=n.mod(t).toString();for(;i.length2&&Vt.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&&ny("fractional component exceeds decimals","underflow","parseFixed"),s===""&&(s="0");s.lengthe[s]==null?l:(typeof e[s]!==o&&Vt.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&&Vt.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",a),i>80&&Vt.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new ia(Ur,t,a,i)}},ct=class{constructor(e,t,a,i){e!==Ur&&Vt.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&&Vt.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),a=dn(e._value,e.format.decimals);return ct.fromValue(t.add(a),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),a=dn(e._value,e.format.decimals);return ct.fromValue(t.sub(a),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),a=dn(e._value,e.format.decimals);return ct.fromValue(t.mul(a).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),a=dn(e._value,e.format.decimals);return ct.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=ct.from(e[0],this.format),a=!e[1].match(/^(0*)$/);return this.isNegative()&&a&&(t=t.subUnsafe(Zp.toFormat(t.format))),t}ceiling(){let e=this.toString().split(".");e.length===1&&e.push("0");let t=ct.from(e[0],this.format),a=!e[1].match(/^(0*)$/);return!this.isNegative()&&a&&(t=t.addUnsafe(Zp.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 a=ct.from("1"+Vr.substring(0,e),this.format),i=O6.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&&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 ct.fromString(this._value,e)}static fromValue(e,t,a){return a==null&&t!=null&&!Yp(t)&&(a=t,t=null),t==null&&(t=0),a==null&&(a="fixed"),ct.fromString(qi(e,t),ia.from(a))}static fromString(e,t){t==null&&(t="fixed");let a=ia.from(t),i=dn(e,a.decimals);!a.signed&&i.lt(ey)&&ny("unsigned value cannot be negative","overflow","value",e);let r=null;a.signed?r=i.toTwos(a.width).toHexString():(r=i.toHexString(),r=me(r,a.width/8));let s=qi(i,a.decimals);return new ct(Ur,r,s,a)}static fromBytes(e,t){t==null&&(t="fixed");let a=ia.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 ct(Ur,r,s,a)}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(a){if(a.code!==E.errors.INVALID_ARGUMENT)throw a}return Vt.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}},Zp=ct.from(1),O6=ct.from("0.5");var ay="properties/5.7.0";var B6=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},zs=new E(ay);function B(n,e,t){Object.defineProperty(n,e,{enumerable:!0,value:t,writable:!1})}function ht(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 Ie(n){return B6(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 Gi(n,e){(!n||typeof n!="object")&&zs.throwArgumentError("invalid object","object",n),Object.keys(n).forEach(t=>{e[t]||zs.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 F6={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function iy(n){if(n==null||F6[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;tmt(e)));if(typeof n=="object"){let e={};for(let t in n){let a=n[t];a!==void 0&&B(e,t,mt(a))}return e}return zs.throwArgumentError(`Cannot deepCopy ${typeof n}`,"object",n)}function mt(n){return L6(n)}var en=class{constructor(e){for(let t in e)this[t]=mt(e[t])}};var Un="abi/5.7.0";var Te=new E(Un),si={},ry={calldata:!0,memory:!0,storage:!0},U6={calldata:!0,memory:!0};function Ks(n,e){if(n==="bytes"||n==="string"){if(ry[e])return!0}else if(n==="address"){if(e==="payable")return!0}else if((n.indexOf("[")>=0||n==="tuple")&&U6[e])return!0;return(ry[e]||e==="payable")&&Te.throwArgumentError("invalid modifier","name",e),!1}function V6(n,e){let t=n;function a(o){Te.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!==ge.sighash&&(t+=this.type),t+="("+this.components.map(a=>a.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 a(i){return pt.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 jr(n,e){return q6(n).map(t=>pt.fromString(t,e))}var Ht=class{constructor(e,t){e!==si&&Te.throwError("use a static from method",E.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),Ws(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 Dt.fromObject(e);case"event":return jt.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"?jt.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)}},jt=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(a=>JSON.parse(a.format(e)))});let t="";return e!==ge.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map(a=>a.format(e)).join(e===ge.full?", ":",")+") ",e!==ge.sighash&&this.anonymous&&(t+="anonymous "),t.trim()}static from(e){return typeof e=="string"?jt.fromString(e):jt.fromObject(e)}static fromObject(e){if(jt.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 jt(si,t)}static fromString(e){let t=e.match(qr);t||Te.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:Te.warn("unknown modifier: "+i)}}),jt.fromObject({name:t[1].trim(),anonymous:a,inputs:jr(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}};function oy(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 uy(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 dy(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 Nt=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(a=>JSON.parse(a.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(a=>a.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=dy(e);t.constant&&Te.throwArgumentError("constructor cannot be constant","value",e);let a={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,a)}static fromString(e){let t={type:"constructor"};e=oy(e,t);let a=e.match(qr);return(!a||a[1].trim()!=="constructor")&&Te.throwArgumentError("invalid constructor string","value",e),t.inputs=jr(a[2].trim(),!1),uy(a[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(a=>JSON.parse(a.format(e))),outputs:this.outputs.map(a=>JSON.parse(a.format(e)))});let t="";return e!==ge.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map(a=>a.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(a=>a.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=dy(e),a={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,a)}static fromString(e){let t={type:"function"};e=oy(e,t);let a=e.split(" returns ");a.length>2&&Te.throwArgumentError("invalid function string","value",e);let i=a[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),uy(i[3].trim(),t),a.length>1){let r=a[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 sy(n){let e=n.format();return(e==="Error(string)"||e==="Panic(uint256)")&&Te.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",n),n}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(a=>JSON.parse(a.format(e)))});let t="";return e!==ge.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map(a=>a.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 sy(new tn(si,t))}static fromString(e){let t={type:"error"},a=e.match(qr);return a||Te.throwArgumentError("invalid error signature","value",e),t.name=a[1].trim(),t.name&&Hr(t.name),t.inputs=jr(a[2],!1),sy(tn.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}};function zi(n){return n.match(/^uint($|[^1-9])/)?n="uint256"+n.substring(4):n.match(/^int($|[^1-9])/)&&(n="int256"+n.substring(3)),n}var H6=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function Hr(n){return(!n||!n.match(H6))&&Te.throwArgumentError(`invalid identifier "${n}"`,"value",n),n}var qr=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function q6(n){n=n.trim();let e=[],t="",a=0;for(let i=0;ithis.wordSize&&dd.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,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 K(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):ui.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:dd.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 a=this._peekBytes(0,e,!!t);return this._offset+=a.length,a.slice(0,e)}readValue(){return F.from(this.readBytes(this.wordSize))}};var py=wn(ly());function fe(n){return"0x"+py.default.keccak_256(j(n))}var $s={};ji($s,{decode:()=>Gr,encode:()=>ra});var yy="rlp/5.7.0";var Vn=new E(yy);function fy(n){let e=[];for(;n;)e.unshift(n&255),n>>=8;return e}function cy(n,e,t){let a=0;for(let i=0;ie+1+a&&Vn.throwError("child data too short",E.errors.BUFFER_OVERRUN,{})}return{consumed:1+a,result:i}}function xy(n,e){if(n.length===0&&Vn.throwError("data too short",E.errors.BUFFER_OVERRUN,{}),n[e]>=248){let t=n[e]-247;e+1+t>n.length&&Vn.throwError("data short segment too short",E.errors.BUFFER_OVERRUN,{});let a=cy(n,e+1,t);return e+1+t+a>n.length&&Vn.throwError("data long segment too short",E.errors.BUFFER_OVERRUN,{}),my(n,e,e+1+t,t+a)}else if(n[e]>=192){let t=n[e]-192;return e+1+t>n.length&&Vn.throwError("data array too short",E.errors.BUFFER_OVERRUN,{}),my(n,e,e+1,t)}else if(n[e]>=184){let t=n[e]-183;e+1+t>n.length&&Vn.throwError("data array too short",E.errors.BUFFER_OVERRUN,{});let a=cy(n,e+1,t);e+1+t+a>n.length&&Vn.throwError("data array too short",E.errors.BUFFER_OVERRUN,{});let i=K(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&&Vn.throwError("data too short",E.errors.BUFFER_OVERRUN,{});let a=K(n.slice(e+1,e+1+t));return{consumed:1+t,result:a}}return{consumed:1,result:K(n[e])}}function Gr(n){let e=j(n),t=xy(e,0);return t.consumed!==e.length&&Vn.throwArgumentError("invalid rlp data","data",n),t.result}var by="address/5.7.0";var Aa=new E(by);function gy(n){ae(n,20)||Aa.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 G6=9007199254740991;function z6(n){return Math.log10?Math.log10(n):Math.log(n)/Math.LN10}var ld={};for(let n=0;n<10;n++)ld[String(n)]=String(n);for(let n=0;n<26;n++)ld[String.fromCharCode(65+n)]=String(10+n);var Ty=Math.floor(z6(G6));function vy(n){n=n.toUpperCase(),n=n.substring(4)+n.substring(0,2)+"00";let e=n.split("").map(a=>ld[a]).join("");for(;e.length>=Ty;){let a=e.substring(0,Ty);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 ce(n){let e=null;if(typeof n!="string"&&Aa.throwArgumentError("invalid address","address",n),n.match(/^(0x)?[0-9a-fA-F]{40}$/))n.substring(0,2)!=="0x"&&(n="0x"+n),e=gy(n),n.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==n&&Aa.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)!==vy(n)&&Aa.throwArgumentError("bad icap checksum","address",n),e=sd(n.substring(4));e.length<40;)e="0"+e;e=gy("0x"+e)}else Aa.throwArgumentError("invalid address","address",n);return e}function wy(n){try{return ce(n),!0}catch{}return!1}function _y(n){let e=od(ce(n).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+vy("XE00"+e)+e}function di(n){let e=null;try{e=ce(n.from)}catch{Aa.throwArgumentError("missing from address","transaction",n)}let t=Zt(j(F.from(n.nonce).toHexString()));return ce(Ce(fe(ra([e,t])),12))}function ky(n,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(Ce(fe(ye(["0xff",ce(n),e,t])),12))}var Qs=class extends kt{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=ce(t)}catch(a){this._throwError(a.message,t)}return e.writeValue(t)}decode(e){return ce(me(e.readValue().toHexString(),20))}};var Xs=class extends kt{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 Wi=new E(Un);function pd(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 f=p.localName;return f||Wi.throwError("cannot encode object for signature with missing names",E.errors.INVALID_ARGUMENT,{argument:"values",coder:p,value:t}),l[f]&&Wi.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 Wi.throwArgumentError("invalid tuple value","tuple",t);e.length!==a.length&&Wi.throwArgumentError("types/value length mismatch","tuple",t);let i=new oi(n.wordSize),r=new oi(n.wordSize),s=[];e.forEach((l,p)=>{let f=a[p];if(l.dynamic){let x=r.length;l.encode(r,f);let I=i.writeUpdatableValue();s.push(_=>{I(_+x)})}else l.encode(i,f)}),s.forEach(l=>{l(i.length)});let o=n.appendWriter(i);return o+=n.appendWriter(r),o}function yd(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 Ys=class extends kt{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&&Wi.throwError("insufficient data length",E.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let a=[];for(let i=0;iao,EtherSymbol:()=>Iy,HashZero:()=>$i,MaxInt256:()=>Cy,MaxUint256:()=>so,MinInt256:()=>My,NegativeOne:()=>io,One:()=>ro,Two:()=>Ay,WeiPerEther:()=>Ey,Zero:()=>Ji});var ao="0x0000000000000000000000000000000000000000";var io=F.from(-1),Ji=F.from(0),ro=F.from(1),Ay=F.from(2),Ey=F.from("1000000000000000000"),so=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),My=F.from("-0x8000000000000000000000000000000000000000000000000000000000000000"),Cy=F.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");var $i="0x0000000000000000000000000000000000000000000000000000000000000000";var Iy="\u039E";var oo=class extends kt{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=so.mask(e.wordSize*8);if(this.signed){let r=i.mask(this.size*8-1);(a.gt(r)||a.lt(r.add(ro).mul(io)))&&this._throwError("value out-of-bounds",t)}else(a.lt(Ji)||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 Sy="strings/5.7.0";var Ry=new E(Sy),qt;(function(n){n.current="",n.NFC="NFC",n.NFD="NFD",n.NFKC="NFKC",n.NFKD="NFKD"})(qt||(qt={}));var Ot;(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"})(Ot||(Ot={}));function K6(n,e,t,a,i){return Ry.throwArgumentError(`invalid codepoint at offset ${e}; ${n}`,"bytes",t)}function Py(n,e,t,a,i){if(n===Ot.BAD_PREFIX||n===Ot.UNEXPECTED_CONTINUE){let r=0;for(let s=e+1;s>6===2;s++)r++;return r}return n===Ot.OVERRUN?t.length-e-1:0}function W6(n,e,t,a,i){return n===Ot.OVERLONG?(a.push(i),0):(a.push(65533),Py(n,e,t,a,i))}var uo=Object.freeze({error:K6,ignore:Py,replace:W6});function cd(n,e){e==null&&(e=uo.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(Ot.UNEXPECTED_CONTINUE,a-1,n,t):a+=e(Ot.BAD_PREFIX,a-1,n,t);continue}if(a-1+r>=n.length){a+=e(Ot.OVERRUN,a-1,n,t);continue}let o=i&(1<<8-r-1)-1;for(let l=0;l1114111){a+=e(Ot.OUT_OF_RANGE,a-1-r,n,t,o);continue}if(o>=55296&&o<=57343){a+=e(Ot.UTF16_SURROGATE,a-1-r,n,t,o);continue}if(o<=s){a+=e(Ot.OVERLONG,a-1-r,n,t,o);continue}t.push(o)}}return t}function ve(n,e=qt.current){e!=qt.current&&(Ry.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 fd(n){let e="0000"+n.toString(16);return"\\u"+e.substring(e.length-4)}function md(n,e){return'"'+cd(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?fd(t):(t-=65536,fd((t>>10&1023)+55296)+fd((t&1023)+56320))}).join("")+'"'}function lo(n){return n.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function Jt(n,e){return lo(cd(n,e))}function Ea(n,e=qt.current){return cd(ve(n,e))}function hd(n){let e=ve(n);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return K(ye([e,$i]).slice(0,32))}function xd(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 Jt(e.slice(0,t))}function J6(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 Ny(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 gd(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 $6=Ny("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"),Q6="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(n=>parseInt(n,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}],Y6=bd("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"),Z6=bd("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"),e2=bd("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",J6),t2=Ny("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 n2(n){return n.reduce((e,t)=>(t.forEach(a=>{e.push(a)}),e),[])}function a2(n){return!!gd(n,$6)}function i2(n){let e=gd(n,X6);if(e)return[n+e.s];let t=Y6[n];if(t)return t;let a=Z6[n];if(a)return[n+a[0]];let i=e2[n];return i||null}function r2(n){return!!gd(n,t2)}function Td(n){if(n.match(/^[a-z0-9-]*$/i)&&n.length<=59)return n.toLowerCase();let e=Ea(n);e=n2(e.map(a=>{if(Q6.indexOf(a)>=0)return[];if(a>=65024&&a<=65039)return[];let i=i2(a);return i||[a]})),e=Ea(lo(e),qt.NFKC),e.forEach(a=>{if(r2(a))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(a=>{if(a2(a))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});let t=lo(e);if(t.substring(0,1)==="-"||t.substring(2,4)==="--"||t.substring(t.length-1)==="-")throw new Error("invalid hyphen");return t}var po=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 kt{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 pd(e,this.coders,t)}decode(e){return e.coerce(this.name,yd(e,this.coders))}};var yo=new E(Un),s2=new RegExp(/^bytes([0-9]*)$/),o2=new RegExp(/^(u?int)([0-9]*)$/),Qi=class{constructor(e){B(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new Qs(e.name);case"bool":return new Zs(e.name);case"string":return new po(e.name);case"bytes":return new eo(e.name);case"array":return new Ys(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new li((e.components||[]).map(a=>this._getCoder(a)),e.name);case"":return new no(e.name)}let t=e.type.match(o2);if(t){let a=parseInt(t[2]||"256");return(a===0||a>256||a%8!==0)&&yo.throwArgumentError("invalid "+t[1]+" bit length","param",e),new oo(a/8,t[1]==="int",e.name)}if(t=e.type.match(s2),t){let a=parseInt(t[1]);return(a===0||a>32)&&yo.throwArgumentError("invalid bytes length","param",e),new to(a,e.name)}return yo.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&&yo.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(pt.from(s))),i=new li(a,"_"),r=this._getWriter();return i.encode(r,t),r.data}decode(e,t,a){let i=e.map(s=>this._getCoder(pt.from(s)));return new li(i,"_").decode(this._getReader(j(t),a))}},Kr=new Qi;function nn(n){return fe(ve(n))}var fo="hash/5.7.0";var vd={};ji(vd,{decode:()=>Xi,encode:()=>Yi});function Xi(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 u2(n){let e={};for(let t=0;t>--l&1}let x=31,I=Math.pow(2,x),_=I>>>1,v=_>>1,S=I-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=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 l2(n){let e=0;return()=>n[e++]}function By(n){return l2(d2(n))}function p2(n){return n&1?~n>>1:n>>1}function y2(n,e){let t=Array(n);for(let a=0;ae[s]):t}function Fy(n){let e=[];for(;;){let t=n();if(t==0)break;e.push(m2(t,n))}for(;;){let t=n()-1;if(t<0)break;e.push(h2(t,n))}return u2(Oy(e))}function c2(n){let e=[];for(;;){let t=n();if(t==0)break;e.push(t)}return e}function Ly(n,e,t){let a=Array(n).fill(void 0).map(()=>[]);for(let i=0;ia[s].push(r));return a}function m2(n,e){let t=1+e(),a=e(),i=c2(e),r=Ly(i.length,1+n,e);return Oy(r.map((s,o)=>{let l=s[0],p=s.slice(1);return Array(i[o]).fill(void 0).map((f,x)=>{let I=x*a;return[l+x*t,p.map(_=>_+I)]})}))}function h2(n,e){let t=1+e();return Ly(t,1+n,e).map(i=>[i[0],i.slice(1)])}function Uy(n){let e=Wr(n).sort((a,i)=>a-i);return t();function t(){let a=[];for(;;){let p=Wr(n,e);if(p.length==0)break;a.push({set:new Set(p),node:t()})}a.sort((p,f)=>f.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 Vy(){return By(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 co=Vy(),x2=new Set(Wr(co)),b2=new Set(Wr(co)),g2=Fy(co),T2=Uy(co),jy=45,Hy=95;function qy(n){return Ea(n)}function v2(n){return n.filter(e=>e!=65039)}function Gy(n){for(let e of n.split(".")){let t=qy(e);try{for(let a=t.lastIndexOf(Hy)-1;a>=0;a--)if(t[a]!==Hy)throw new Error("underscore only allowed at start");if(t.length>=4&&t.every(a=>a<128)&&t[2]===jy&&t[3]===jy)throw new Error("invalid label extension")}catch(a){throw new Error(`Invalid label "${e}": ${a.message}`)}}return n}function zy(n){return Gy(w2(n,v2))}function w2(n,e){let t=qy(n).reverse(),a=[];for(;t.length;){let i=k2(t);if(i){a.push(...e(i));continue}let r=t.pop();if(x2.has(r)){a.push(r);continue}if(b2.has(r))continue;let s=g2[r];if(s){a.push(...s);continue}throw new Error(`Disallowed codepoint: 0x${r.toString(16).toUpperCase()}`)}return Gy(_2(String.fromCodePoint(...a)))}function _2(n){return n.normalize("NFC")}function k2(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 A2=new E(fo),Wy=new Uint8Array(32);Wy.fill(0);function Ky(n){if(n.length===0)throw new Error("invalid ENS name; empty component");return n}function wd(n){let e=ve(zy(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(Ky(e.slice(a))),t}function _d(n){try{return wd(n).length!==0}catch{}return!1}function Ma(n){typeof n!="string"&&A2.throwArgumentError("invalid ENS name; not a string","name",n);let e=Wy,t=wd(n);for(;t.length;)e=fe(ye([e,fe(t.pop())]));return K(e)}function Jr(n){return K(ye(wd(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 Jy=`Ethereum Signed Message: +`;function Zi(n){return typeof n=="string"&&(n=ve(n)),fe(ye([ve(Jy),ve(String(n.length)),n]))}var E2=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},xt=new E(fo),Yy=new Uint8Array(32);Yy.fill(0);var M2=F.from(-1),Zy=F.from(0),e0=F.from(1),C2=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function I2(n){let e=j(n),t=e.length%32;return t?_t([e,Yy.slice(t)]):K(e)}var S2=me(e0.toHexString(),32),R2=me(Zy.toHexString(),32),$y={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},kd=["name","version","chainId","verifyingContract","salt"];function Qy(n){return function(e){return typeof e!="string"&&xt.throwArgumentError(`invalid domain value for ${JSON.stringify(n)}`,`domain.${n}`,e),e}}var P2={name:Qy("name"),version:Qy("version"),chainId:function(n){try{return F.from(n).toString()}catch{}return xt.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",n)},verifyingContract:function(n){try{return ce(n).toLowerCase()}catch{}return xt.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 K(e)}catch{}return xt.throwArgumentError('invalid domain value "salt"',"domain.salt",n)}};function Ad(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))&&xt.throwArgumentError("invalid numeric width","type",n);let i=C2.mask(t?a-1:a),r=t?i.add(e0).mul(M2):Zy;return function(s){let o=F.from(s);return(o.lt(r)||o.gt(i))&&xt.throwArgumentError(`value out-of-bounds for ${n}`,"value",s),me(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))&&xt.throwArgumentError("invalid bytes width","type",n),function(a){return j(a).length!==t&&xt.throwArgumentError(`invalid length for ${n}`,"value",a),I2(a)}}}switch(n){case"address":return function(e){return me(ce(e),32)};case"bool":return function(e){return e?S2:R2};case"bytes":return function(e){return fe(e)};case"string":return function(e){return nn(e)}}return null}function Xy(n,e){return`${n}(${e.map(({name:t,type:a})=>a+" "+t).join(",")})`}var bt=class{constructor(e){B(this,"types",Object.freeze(mt(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]&&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),!Ad(f)&&(a[f]||xt.throwArgumentError(`unknown type ${JSON.stringify(f)}`,"types",e),a[f].push(o),t[o][f]=!0)})}let r=Object.keys(a).filter(o=>a[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=>{!a[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]=Xy(o,e[o])+l.map(p=>Xy(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=Ad(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(_t(l))}}let a=this.types[e];if(a){let i=nn(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),_t(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,a){if(Ad(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&&xt.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),{}):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,a){return bt.from(t).hashStruct(e,a)}static hashDomain(e){let t=[];for(let a in e){let i=$y[a];i||xt.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(a)}`,"domain",e),t.push({name:a,type:i})}return t.sort((a,i)=>kd.indexOf(a.name)-kd.indexOf(i.name)),bt.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,a){return _t(["0x1901",bt.hashDomain(e),bt.from(t).hash(a)])}static hash(e,t,a){return fe(bt.encode(e,t,a))}static resolveNames(e,t,a,i){return E2(this,void 0,void 0,function*(){e=we(e);let r={};e.verifyingContract&&!ae(e.verifyingContract,20)&&(r[e.verifyingContract]="0x");let s=bt.from(t);s.visit(a,(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]),a=s.visit(a,(o,l)=>o==="address"&&r[l]?r[l]:l),{domain:e,value:a}})}static getPayload(e,t,a){bt.hashDomain(e);let i={},r=[];kd.forEach(l=>{let p=e[l];p!=null&&(i[l]=P2[l](p),r.push({name:l,type:$y[l]}))});let s=bt.from(t),o=we(t);return o.EIP712Domain?xt.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 K(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(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)}},N2={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function t0(n,e){let t=new Error(`deferred error during ABI decoding triggered accessing ${n}`);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(a=>Ht.from(a)).filter(a=>a!=null)),B(this,"_abiCoder",ht(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){gt.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]){gt.warn("duplicate definition - "+r);return}i[r]=a}),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(a=>a.format(e));return e===ge.json?JSON.stringify(t.map(a=>JSON.parse(a))):t}static getAbiCoder(){return Kr}static getAddress(e){return ce(e)}static getSighash(e){return Ce(nn(e.format()),0,4)}static getEventTopic(e){return nn(e.format())}getFunction(e){if(ae(e)){for(let a in this.functions)if(e===this.getSighash(a))return this.functions[a];gt.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?gt.throwArgumentError("no matching function","name",a):i.length>1&>.throwArgumentError("multiple matching functions","name",a),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 a=e.toLowerCase();for(let i in this.events)if(a===this.getEventTopic(i))return this.events[i];gt.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?gt.throwArgumentError("no matching event","name",a):i.length>1&>.throwArgumentError("multiple matching events","name",a),this.events[i[0]]}let t=this.events[jt.fromString(e).format()];return t||gt.throwArgumentError("no matching event","signature",e),t}getError(e){if(ae(e)){let a=ht(this.constructor,"getSighash");for(let i in this.errors){let r=this.errors[i];if(e===a(r))return this.errors[i]}gt.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?gt.throwArgumentError("no matching error","name",a):i.length>1&>.throwArgumentError("multiple matching errors","name",a),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 a=j(t);return K(a.slice(0,4))!==this.getSighash(e)&>.throwArgumentError(`data signature does not match error ${e.name}.`,"data",K(a)),this._decodeParams(e.inputs,a.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 a=j(t);return K(a.slice(0,4))!==this.getSighash(e)&>.throwArgumentError(`data signature does not match function ${e.name}.`,"data",K(a)),this._decodeParams(e.inputs,a.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 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=K(a.slice(0,4)),f=N2[p];if(f)s=this._abiCoder.decode(f.inputs,a.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,a.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:K(t),errorArgs:s,errorName:o,errorSignature:l,reason:i})}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&>.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"?nn(s):r.type==="bytes"?fe(K(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(K(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?a.push(null):o.baseType==="array"||o.baseType==="tuple"?gt.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&>.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(nn(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 I=this.getEventTopic(e);(!ae(a[0],32)||a[0].toLowerCase()!==I)&>.throwError("fragment/topic mismatch",E.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:I,value:a[0]}),a=a.slice(1)}let i=[],r=[],s=[];e.inputs.forEach((I,_)=>{I.indexed?I.type==="string"||I.type==="bytes"||I.baseType==="tuple"||I.baseType==="array"?(i.push(pt.fromObject({type:"bytes32",name:I.name})),s.push(!0)):(i.push(I),s.push(!1)):(r.push(I),s.push(!1))});let o=a!=null?this._abiCoder.decode(i,ye(a)):null,l=this._abiCoder.decode(r,t,!0),p=[],f=0,x=0;e.inputs.forEach((I,_)=>{if(I.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(I.name&&p[I.name]==null){let v=p[_];v instanceof Error?Object.defineProperty(p,I.name,{enumerable:!0,get:()=>{throw t0(`property ${JSON.stringify(I.name)}`,v)}}):p[I.name]=v}});for(let I=0;I{throw t0(`index ${I}`,_)}})}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=K(e),a=this.getError(t.substring(0,10).toLowerCase());return a?new Ed({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 n0="abstract-provider/5.7.0";var D2=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},O2=new E(n0),mo=class extends en{static isForkEvent(e){return!!(e&&e._isForkEvent)}};var $t=class{constructor(){O2.checkAbstract(new.target,$t),B(this,"_isProvider",!0)}getFeeData(){return D2(this,void 0,void 0,function*(){let{block:e,gasPrice:t}=yield Ie({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 a0="abstract-signer/5.7.0";var _n=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},ln=new E(a0),B2=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],F2=[E.errors.INSUFFICIENT_FUNDS,E.errors.NONCE_EXPIRED,E.errors.REPLACEMENT_UNDERPRICED],Gt=class{constructor(){ln.checkAbstract(new.target,Gt),B(this,"_isSigner",!0)}getBalance(e){return _n(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return _n(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return _n(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 _n(this,void 0,void 0,function*(){this._checkProvider("call");let a=yield Ie(this.checkTransaction(e));return yield this.provider.call(a,t)})}sendTransaction(e){return _n(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 _n(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return _n(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return _n(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return _n(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(let a in e)B2.indexOf(a)===-1&&ln.throwArgumentError("invalid transaction key: "+a,"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(a=>(a[0].toLowerCase()!==a[1].toLowerCase()&&ln.throwArgumentError("from address mismatch","transaction",e),a[0])),t}populateTransaction(e){return _n(this,void 0,void 0,function*(){let t=yield Ie(this.checkTransaction(e));t.to!=null&&(t.to=Promise.resolve(t.to).then(i=>_n(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 a=t.maxFeePerGas!=null||t.maxPriorityFeePerGas!=null;if(t.gasPrice!=null&&(t.type===2||a)?ln.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(t.type===0||t.type===1)&&a&&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?(a&&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(F2.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 Ie(t)})}_checkProvider(e){this.provider||ln.throwError("missing provider",E.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}},oa=class extends Gt{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,a){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new oa(this.address,e)}};var pe=wn(ed()),Wn=wn(Bd());function dr(n,e,t){return t={path:e,exports:{},require:function(a,i){return sx(a,i??t.path)}},n(t,t.exports),t.exports}function sx(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var Vd=j0;function j0(n,e){if(!n)throw new Error(e||"Assertion failed")}j0.equal=function(e,t,a){if(e!=t)throw new Error(a||"Assertion failed: "+e+" != "+t)};var Mn=dr(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,I=f&255;x?l.push(x,I):l.push(I)}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(I>>1)-1?S=(I>>1)-L:S=L,_.isubn(S)):S=0,x[v]=S,_.iushrn(1)}return x}t.getNAF=a;function i(l,p){var f=[[],[]];l=l.clone(),p=p.clone();for(var x=0,I=0,_;l.cmpn(-x)>0||p.cmpn(-I)>0;){var v=l.andln(3)+x&3,S=p.andln(3)+I&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)+I&7,(_===3||_===5)&&v===2?O=-S:O=S),f[1].push(O),2*x===L+1&&(x=1-x),2*I===O+1&&(I=1-I),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}),To=an.getNAF,ox=an.getJSF,vo=an.assert;function Ra(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 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){vo(e.precomputed);var a=e._getDoubles(),i=To(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),I=r;I>0;I--){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];vo(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,a,i,r){var s=this._wnafT1,o=this._wnafT2,l=this._wnafT3,p=0,f,x,I;for(f=0;f=1;f-=2){var v=f-1,S=f;if(s[v]!==1||s[S]!==1){l[v]=To(a[v],s[v],this._bitLength),l[S]=To(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=ox(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;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?I=o[x][R-1>>1]:R<0&&(I=o[x][-R-1>>1].neg()),I.type==="affine"?J=J.mixedAdd(I):J=J.add(I))}}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 a=[this],i=this,r=0;r=0&&(_=p,v=f),x.negative&&(x=x.neg(),I=I.neg()),_.negative&&(_=_.neg(),v=v.neg()),[{a:x,b:I},{a:_,b:v}]};fn.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),f=s.mul(i.b),x=e.sub(o).sub(l),I=p.add(f).neg();return{k1:x,k2:I}};fn.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)};fn.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};fn.prototype._endoWnafMulAdd=function(e,t,a){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 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)};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,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)};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,a){var i=[this,t],r=[e,a];return this.curve.endo?this.curve._endoWnafMulAdd(i,r):this.curve._wnafMulAdd(1,i,r,2)};Mt.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)};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 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};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 Rt(n,e,t,a){yi.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}jd(Rt,yi.BasePoint);fn.prototype.jpoint=function(e,t,a){return new Rt(this,e,t,a)};Rt.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)};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(),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 f=l.redSqr(),x=f.redMul(l),I=i.redMul(f),_=p.redSqr().redIAdd(x).redISub(I).redISub(I),v=p.redMul(I.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(),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(),f=p.redMul(o),x=a.redMul(p),I=l.redSqr().redIAdd(f).redISub(x).redISub(x),_=l.redMul(x.redISub(I)).redISub(r.redMul(f)),v=this.z.redMul(o);return this.curve.jpoint(I,_,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 a=this;for(t=0;t=0)return!1;if(a.redIAdd(r),this.x.cmp(a)===0)return!0}};Rt.prototype.inspect=function(){return this.isInfinity()?"":""};Rt.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var bo=dr(function(n,e){"use strict";var t=e;t.base=yi,t.short=dx,t.mont=null,t.edwards=null}),go=dr(function(n,e){"use strict";var t=e,a=an.assert;function i(o){o.type==="short"?this.curve=new bo.short(o):o.type==="edwards"?this.curve=new bo.edwards(o):this.curve=new bo.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:Wn.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:Wn.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:Wn.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: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"]}),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: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"]}),r("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"]}),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:Wn.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:Wn.default.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",s]})});function Sa(n){if(!(this instanceof Sa))return new Sa(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=Mn.toArray(n.entropy,n.entropyEnc||"hex"),t=Mn.toArray(n.nonce,n.nonceEnc||"hex"),a=Mn.toArray(n.pers,n.persEnc||"hex");Vd(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,t,a)}var H0=Sa;Sa.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};Sa.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=Mn.toArray(a,i||"hex"),this._update(a));for(var r=[];r.length"};var lx=an.assert;function wo(n,e){if(n instanceof wo)return n;this._importDER(n,e)||(lx(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 _o=wo;function px(){this.place=0}function Fd(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 V0(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)}wo.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=V0(t),a=V0(a);!a[0]&&!(a[1]&128);)a=a.slice(1);var i=[2];Ld(i,t.length),i=i.concat(t),i.push(2),Ld(i,a.length);var r=i.concat(a),s=[48];return Ld(s,r.length),s=s.concat(r),an.encode(s,e)};var yx=function(){throw new Error("unsupported")},q0=an.assert;function pn(n){if(!(this instanceof pn))return new pn(n);typeof n=="string"&&(q0(Object.prototype.hasOwnProperty.call(go,n),"Unknown curve "+n),n=go[n]),n instanceof go.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 fx=pn;pn.prototype.keyPair=function(e){return new Hd(this,e)};pn.prototype.keyFromPrivate=function(e,t){return Hd.fromPrivate(this,e,t)};pn.prototype.keyFromPublic=function(e,t){return Hd.fromPublic(this,e,t)};pn.prototype.genKeyPair=function(e){e||(e={});for(var t=new H0({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||yx(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)}};pn.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};pn.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 H0({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 I=this.g.mul(x);if(!I.isInfinity()){var _=I.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=(I.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 _o({r:v,s:S,recoveryParam:L})}}}}}};pn.prototype.verify=function(e,t,a,i){e=this._truncateToN(new pe.default(e,16)),a=this.keyFromPublic(a,i),t=new _o(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,a.getPublic(),p),f.isInfinity()?!1:f.eqXToP(r)):(f=this.g.mulAdd(l,a.getPublic(),p),f.isInfinity()?!1:f.getX().umod(this.n).cmp(r)===0)};pn.prototype.recoverPubKey=function(n,e,t,a){q0((3&t)===t,"The recovery param is more than two bits"),e=new _o(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 f=e.r.invm(i),x=i.sub(r).mul(f).umod(i),I=o.mul(f).umod(i);return this.g.mulAdd(x,s,I)};pn.prototype.getKeyRecoveryParam=function(n,e,t,a){if(e=new _o(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 cx=dr(function(n,e){"use strict";var t=e;t.version="6.5.4",t.utils=an,t.rand=function(){throw new Error("unsupported")},t.curve=bo,t.curves=go,t.ec=fx,t.eddsa=null}),G0=cx.ec;var z0="signing-key/5.7.0";var Gd=new E(z0),qd=null;function Jn(){return qd||(qd=new G0("secp256k1")),qd}var cn=class{constructor(e){B(this,"curve","secp256k1"),B(this,"privateKey",K(e)),Pt(this.privateKey)!==32&&Gd.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)),a=Jn().keyFromPublic(j(e));return"0x"+t.pub.add(a.pub).encodeCompressed("hex")}signDigest(e){let t=Jn().keyFromPrivate(j(this.privateKey)),a=j(e);a.length!==32&&Gd.throwArgumentError("bad digest length","digest",e);let i=t.sign(a,{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)),a=Jn().keyFromPublic(j(Xr(e)));return me("0x"+t.derive(a.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}};function ko(n,e){let t=Ln(e),a={r:j(t.r),s:j(t.s)};return"0x"+Jn().recoverPubKey(j(n),a,t.recoveryParam).encode("hex",!1)}function Xr(n,e){let t=j(n);if(t.length===32){let a=new cn(t);return e?"0x"+Jn().keyFromPrivate(t).getPublic(!0,"hex"):a.publicKey}else{if(t.length===33)return e?K(t):"0x"+Jn().keyFromPublic(t).getPublic(!1,"hex");if(t.length===65)return e?"0x"+Jn().keyFromPublic(t).getPublic(!0,"hex"):K(t)}return Gd.throwArgumentError("invalid public or private key","key","[REDACTED]")}var K0="transactions/5.7.0";var Lt=new E(K0),Ao;(function(n){n[n.legacy=0]="legacy",n[n.eip2930=1]="eip2930",n[n.eip1559=2]="eip1559"})(Ao||(Ao={}));function Kd(n){return n==="0x"?null:ce(n)}function Ft(n){return n==="0x"?Ji:F.from(n)}var mx=[{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"}],hx={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function mn(n){let e=Xr(n);return ce(Ce(fe(Ce(e,1)),12))}function fi(n,e){return mn(ko(j(n),e))}function rn(n,e){let t=Zt(F.from(n).toHexString());return t.length>32&&Lt.throwArgumentError("invalid length for "+e,"transaction:"+e,n),t}function zd(n,e){return{address:ce(n),storageKeys:(e||[]).map((t,a)=>(Pt(t)!==32&&Lt.throwArgumentError("invalid access list storageKey",`accessList[${n}:${a}]`,t),t.toLowerCase()))}}function sn(n){if(Array.isArray(n))return n.map((t,a)=>Array.isArray(t)?(t.length>2&&Lt.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${a}]`,t),zd(t[0],t[1])):zd(t.address,t.storageKeys));let e=Object.keys(n).map(t=>{let a=n[t].reduce((i,r)=>(i[r]=!0,i),{});return zd(t,Object.keys(a).sort())});return e.sort((t,a)=>t.address.localeCompare(a.address)),e}function W0(n){return sn(n).map(e=>[e.address,e.storageKeys])}function J0(n,e){if(n.gasPrice!=null){let a=F.from(n.gasPrice),i=F.from(n.maxFeePerGas||0);a.eq(i)||Lt.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:a,maxFeePerGas:i})}let t=[rn(n.chainId||0,"chainId"),rn(n.nonce||0,"nonce"),rn(n.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),rn(n.maxFeePerGas||0,"maxFeePerGas"),rn(n.gasLimit||0,"gasLimit"),n.to!=null?ce(n.to):"0x",rn(n.value||0,"value"),n.data||"0x",W0(n.accessList||[])];if(e){let a=Ln(e);t.push(rn(a.recoveryParam,"recoveryParam")),t.push(Zt(a.r)),t.push(Zt(a.s))}return _t(["0x02",ra(t)])}function $0(n,e){let t=[rn(n.chainId||0,"chainId"),rn(n.nonce||0,"nonce"),rn(n.gasPrice||0,"gasPrice"),rn(n.gasLimit||0,"gasLimit"),n.to!=null?ce(n.to):"0x",rn(n.value||0,"value"),n.data||"0x",W0(n.accessList||[])];if(e){let a=Ln(e);t.push(rn(a.recoveryParam,"recoveryParam")),t.push(Zt(a.r)),t.push(Zt(a.s))}return _t(["0x01",ra(t)])}function xx(n,e){Gi(n,hx);let t=[];mx.forEach(function(s){let o=n[s.name]||[],l={};s.numeric&&(l.hexPad="left"),o=j(K(o,l)),s.length&&o.length!==s.length&&o.length>0&&Lt.throwArgumentError("invalid length for "+s.name,"transaction:"+s.name,o),s.maxLength&&(o=Zt(o),o.length>s.maxLength&&Lt.throwArgumentError("invalid length for "+s.name,"transaction:"+s.name,o)),t.push(K(o))});let a=0;if(n.chainId!=null?(a=n.chainId,typeof a!="number"&&Lt.throwArgumentError("invalid transaction.chainId","transaction",n)):e&&!na(e)&&e.v>28&&(a=Math.floor((e.v-35)/2)),a!==0&&(t.push(K(a)),t.push("0x"),t.push("0x")),!e)return ra(t);let i=Ln(e),r=27+i.recoveryParam;return a!==0?(t.pop(),t.pop(),t.pop(),r+=a*2+8,i.v>28&&i.v!==r&&Lt.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):i.v!==r&&Lt.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),t.push(K(r)),t.push(Zt(j(i.r))),t.push(Zt(j(i.s))),ra(t)}function Yr(n,e){if(n.type==null||n.type===0)return n.accessList!=null&&Lt.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",n),xx(n,e);switch(n.type){case 1:return $0(n,e);case 2:return J0(n,e);default:break}return Lt.throwError(`unsupported transaction type: ${n.type}`,E.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:n.type})}function Q0(n,e,t){try{let a=Ft(e[0]).toNumber();if(a!==0&&a!==1)throw new Error("bad recid");n.v=a}catch{Lt.throwArgumentError("invalid v for transaction type: 1","v",e[0])}n.r=me(e[1],32),n.s=me(e[2],32);try{let a=fe(t(n));n.from=fi(a,{r:n.r,s:n.s,recoveryParam:n.v})}catch{}}function bx(n){let e=Gr(n.slice(1));e.length!==9&&e.length!==12&&Lt.throwArgumentError("invalid component count for transaction type: 2","payload",K(n));let t=Ft(e[2]),a=Ft(e[3]),i={type:2,chainId:Ft(e[0]).toNumber(),nonce:Ft(e[1]).toNumber(),maxPriorityFeePerGas:t,maxFeePerGas:a,gasPrice:null,gasLimit:Ft(e[4]),to:Kd(e[5]),value:Ft(e[6]),data:e[7],accessList:sn(e[8])};return e.length===9||(i.hash=fe(n),Q0(i,e.slice(9),J0)),i}function gx(n){let e=Gr(n.slice(1));e.length!==8&&e.length!==11&&Lt.throwArgumentError("invalid component count for transaction type: 1","payload",K(n));let t={type:1,chainId:Ft(e[0]).toNumber(),nonce:Ft(e[1]).toNumber(),gasPrice:Ft(e[2]),gasLimit:Ft(e[3]),to:Kd(e[4]),value:Ft(e[5]),data:e[6],accessList:sn(e[7])};return e.length===8||(t.hash=fe(n),Q0(t,e.slice(8),$0)),t}function Tx(n){let e=Gr(n);e.length!==9&&e.length!==6&&Lt.throwArgumentError("invalid raw transaction","rawTransaction",n);let t={nonce:Ft(e[0]).toNumber(),gasPrice:Ft(e[1]),gasLimit:Ft(e[2]),to:Kd(e[3]),value:Ft(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 a=t.v-27,i=e.slice(0,6);t.chainId!==0&&(i.push(K(t.chainId)),i.push("0x"),i.push("0x"),a-=t.chainId*2+8);let r=fe(ra(i));try{t.from=fi(r,{r:K(t.r),s:K(t.s),recoveryParam:a})}catch{}t.hash=fe(n)}return t.type=null,t}function Eo(n){let e=j(n);if(e[0]>127)return Tx(e);switch(e[0]){case 1:return gx(e);case 2:return bx(e);default:break}return Lt.throwError(`unsupported transaction type: ${e[0]}`,E.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}var X0="contracts/5.7.0";var Pa=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Se=new E(X0),vx={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 Mo(n,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{}n||Se.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&&Se.throwArgumentError("resolver or addr is not configured for ENS name","name",t),a})}function Zr(n,e,t){return Pa(this,void 0,void 0,function*(){return Array.isArray(t)?yield Promise.all(t.map((a,i)=>Zr(n,Array.isArray(e)?e[i]:e[a.name],a))):t.type==="address"?yield Mo(n,e):t.type==="tuple"?yield Zr(n,e,t.components):t.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(a=>Zr(n,a,t.arrayChildren))):Promise.reject(Se.makeError("invalid value for array",E.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function So(n,e,t){return Pa(this,void 0,void 0,function*(){let a={};t.length===e.inputs.length+1&&typeof t[t.length-1]=="object"&&(a=we(t.pop())),Se.checkArgumentCount(t.length,e.inputs.length,"passed to contract"),n.signer?a.from?a.from=Ie({override:Mo(n.signer,a.from),signer:n.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",E.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),p.override})):a.from=n.signer.getAddress():a.from&&(a.from=Mo(n.provider,a.from));let i=yield Ie({args:Zr(n.signer||n.provider,t,e.inputs),address:n.resolvedAddress,overrides:Ie(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=sn(o.accessList)),s.gasLimit==null&&e.gas!=null){let p=21e3,f=j(r);for(let x=0;xa[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 wx(n,e){return function(...t){return So(n,e,t)}}function _x(n,e){let t=n.signer||n.provider;return function(...a){return Pa(this,void 0,void 0,function*(){t||Se.throwError("estimate require a provider or signer",E.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});let i=yield So(n,e,a);return yield t.estimateGas(i)})}}function Z0(n,e){let t=e.wait.bind(e);e.wait=a=>t(a).then(i=>(i.events=i.logs.map(r=>{let s=mt(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 ef(n,e,t){let a=n.signer||n.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=we(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 So(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 kx(n,e){return function(...t){return Pa(this,void 0,void 0,function*(){n.signer||Se.throwError("sending a transaction requires a signer",E.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),n.deployTransaction!=null&&(yield n._deployed());let a=yield So(n,e,t),i=yield n.signer.sendTransaction(a);return Z0(n,i),i})}}function Y0(n,e,t){return e.constant?ef(n,e,t):kx(n,e)}function tf(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 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(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]}},Wd=class extends ci{constructor(){super("error",null)}},Co=class extends ci{constructor(e,t,a,i){let r={address:e},s=t.getEventTopic(a);i?(s!==i[0]&&Se.throwArgumentError("topic mismatch","topics",i),r.topics=i.slice()):r.topics=[s],super(tf(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=Ki(e.args);if(t.length)throw t[0].error;let a=(e.args||[]).slice();return a.push(e),a}},Io=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=(a,i)=>this.interface.decodeEventLog(t.eventFragment,a,i),e.args=t.args}catch{}}},lr=class{constructor(e,t,a){B(this,"interface",ht(new.target,"getInterface")(t)),a==null?(B(this,"provider",null),B(this,"signer",null)):Gt.isSigner(a)?(B(this,"provider",a.provider||null),B(this,"signer",a)):$t.isProvider(a)?(B(this,"provider",a),B(this,"signer",null)):Se.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]]):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",Mo(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,Y0(this,o,!0)),this.functions[s]==null&&B(this.functions,s,Y0(this,o,!1)),this.callStatic[s]==null&&B(this.callStatic,s,ef(this,o,!0)),this.populateTransaction[s]==null&&B(this.populateTransaction,s,wx(this,o)),this.estimateGas[s]==null&&B(this.estimateGas,s,_x(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 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",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=we(e||{});return["from","to"].forEach(function(a){t[a]!=null&&Se.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 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 Wd);if(e==="event")return this._normalizeRunningEvent(new ci("event",null));if(e==="*")return this._normalizeRunningEvent(new Io(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 a=e.topics[0];if(typeof a!="string")throw new Error("invalid topic");let i=this.interface.getEvent(a);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(tf(t),t))}return this._normalizeRunningEvent(new Io(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=mt(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||Se.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=we(i.filter);return typeof t=="string"&&ae(t,32)?(a!=null&&Se.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 lr{},mi=class{constructor(e,t,a){let i=null;typeof t=="string"?i=t:on(t)?i=K(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),a&&!Gt.isSigner(a)&&Se.throwArgumentError("invalid signer","signer",a),B(this,"bytecode",i),B(this,"interface",ht(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=we(e.pop());for(let a in t)if(!vx[a])throw new Error("unknown transaction override "+a)}return["data","from","to"].forEach(a=>{t[a]!=null&&Se.throwError("cannot override "+a,E.errors.UNSUPPORTED_OPERATION,{operation:a})}),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=K(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 a=yield Zr(this.signer,e,this.interface.deploy.inputs);a.push(t);let i=this.getDeployTransaction(...a),r=yield this.signer.sendTransaction(i),s=ht(this.constructor,"getContractAddress")(r),o=ht(this.constructor,"getContract")(s,this.interface,this.signer);return Z0(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 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 di(e)}static getContract(e,t,a){return new oe(e,t,a)}};var Ro=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 I=j(ya(i,n,l));r||(r=I.length,f=new Uint8Array(r),s=Math.ceil(a/r),p=a-(s-1)*r),f.set(I);for(let S=1;S=256)throw new Error("Depth too large!");return df(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(pr,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&~yr));let a=new Uint8Array(37);if(e&yr){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(ya($n.sha512,this.chainCode,a)),r=i.slice(0,32),s=i.slice(32),o=null,l=null;this.privateKey?o=Po(F.from(r).add(this.privateKey).mod(Ix)):l=new cn(K(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 Ct(pr,o,l,this.fingerprint,Po(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=yr)throw new Error("invalid path index - "+r);a=a._derive(yr+s)}else if(r.match(/^[0-9]+$/)){let s=parseInt(r);if(s>=yr)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(ya($n.sha512,Sx,a));return new Ct(pr,Po(i.slice(0,32)),null,"0x00000000",Po(i.slice(32)),0,0,t)}static fromMnemonic(e,t,a){return a=Xd(a),e=xi(fr(e,a),a),Ct._fromSeed(Yd(e,t),{phrase:e,path:"m",locale:a.locale})}static fromSeed(e){return Ct._fromSeed(e,null)}static fromExtendedKey(e){let t=pa.decode(e);(t.length!==82||df(t.slice(0,78))!==e)&&ts.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");let a=t[4],i=K(t.slice(5,9)),r=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(pr,null,K(o),i,s,r,a,null);case"0x0488ade4":case"0x04358394 ":if(o[0]!==0)break;return new Ct(pr,K(o.slice(1)),null,i,s,r,a,null)}return ts.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}};function Yd(n,e){e||(e="");let t=ve("mnemonic"+e,qt.NFKD);return mi(ve(n,qt.NFKD),t,2048,64,"sha512")}function fr(n,e){e=Xd(e),ts.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=lf(s);if((j(Xt(a.slice(0,r/8)))[0]&o)!==(a[a.length-1]&o))throw new Error("invalid checksum");return K(a.slice(0,r/8))}function xi(n,e){if(e=Xd(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]&Rx(8-a)),a+=3);let i=n.length/4,r=j(Xt(n))[0]&lf(i);return t[t.length-1]<<=i,t[t.length-1]|=r>>8-i,e.join(t.map(s=>e.getWord(s)))}function pf(n,e){try{return fr(n,e),!0}catch{}return!1}function yf(n){return(typeof n!="number"||n<0||n>=yr||n%1)&&ts.throwArgumentError("invalid account index","index",n),`m/44'/60'/${n}'/0/0`}var ff="random/5.7.0";var Zd=new E(ff);function Px(){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 cf=Px(),No=cf.crypto||cf.msCrypto;(!No||!No.getRandomValues)&&(Zd.warn("WARNING: Missing strong random number source"),No={getRandomValues:function(n){return Zd.throwError("no secure random source avaialble",E.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function Qn(n){(n<=0||n>1024||n%1||n!=n)&&Zd.throwArgumentError("invalid length","length",n);let e=new Uint8Array(n);return No.getRandomValues(e),j(e)}function ns(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 nl=wn(tl());var Do="json-wallets/5.7.0";function ca(n){return typeof n=="string"&&n.substring(0,2)!=="0x"&&(n="0x"+n),j(n)}function cr(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 ma.default.Counter(x),J=new ma.default.ModeOfOperation.ctr(O,M),$=j(J.encrypt(i)),de=fe(ye([U,$])),T={address:n.address.substring(2).toLowerCase(),id:hf(I),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:K(x).substring(2)},ciphertext:K($).substring(2),kdf:"scrypt",kdfparams:{salt:K(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)),C=new Date,u=C.getUTCFullYear()+"-"+cr(C.getUTCMonth()+1,2)+"-"+cr(C.getUTCDate(),2)+"T"+cr(C.getUTCHours(),2)+"-"+cr(C.getUTCMinutes(),2)+"-"+cr(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:l,version:"0.1"}}return JSON.stringify(T)})}function Af(n,e,t){if(Oo(n)){t&&t(0);let a=il(n,e);return t&&t(1),Promise.resolve(a)}return Bo(n)?kf(n,e,t):Promise.reject(new Error("invalid JSON wallet"))}function Ef(n,e){if(Oo(n))return il(n,e);if(Bo(n))return _f(n,e);throw new Error("invalid JSON wallet")}var Mf="wallet/5.7.0";var Cf=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},mr=new E(Mf);function Fx(n){return n!=null&&ae(n.privateKey,32)&&n.address!=null}function Lx(n){let e=n.mnemonic;return e&&e.phrase}var Cn=class extends Gt{constructor(e,t){if(super(),Fx(e)){let a=new cn(e.privateKey);if(B(this,"_signingKey",()=>a),B(this,"address",mn(this.publicKey)),this.address!==ce(e.address)&&mr.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),Lx(e)){let i=e.mnemonic;B(this,"_mnemonic",()=>({phrase:i.phrase,path:i.path||fa,locale:i.locale||"en"}));let r=this.mnemonic,s=Ct.fromMnemonic(r.phrase,null,r.locale).derivePath(r.path);mn(s.privateKey)!==this.address&&mr.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else B(this,"_mnemonic",()=>null)}else{if(cn.isSigningKey(e))e.curve!=="secp256k1"&&mr.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 cn(e);B(this,"_signingKey",()=>a)}B(this,"_mnemonic",()=>null),B(this,"address",mn(this.publicKey))}t&&!$t.isProvider(t)&&mr.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 Ie(e).then(t=>{t.from!=null&&(ce(t.from)!==this.address&&mr.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete t.from);let a=this._signingKey().signDigest(fe(Xr(t)));return Xr(t,a)})}signMessage(e){return Cf(this,void 0,void 0,function*(){return Or(this._signingKey().signDigest(Yi(e)))})}_signTypedData(e,t,a){return Cf(this,void 0,void 0,function*(){let i=yield bt.resolveNames(e,t,a,r=>(this.provider==null&&mr.throwError("cannot resolve ENS names without a provider",E.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:r}),this.provider.resolveName(r)));return Or(this._signingKey().signDigest(bt.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={}),dl(this,e,t,a)}static createRandom(e){let t=Qn(16);e||(e={}),e.extraEntropy&&(t=j(Ce(fe(ye([t,e.extraEntropy])),0,16)));let a=xi(t,e.locale);return Cn.fromMnemonic(a,e.path,e.locale)}static fromEncryptedJson(e,t,a){return Af(e,t,a).then(i=>new Cn(i))}static fromEncryptedJsonSync(e,t){return new Cn(Ef(e,t))}static fromMnemonic(e,t,a){return t||(t=fa),new Cn(Ct.fromMnemonic(e,null,a).derivePath(t))}};function If(n,e){return yi(Yi(n),e)}function Sf(n,e,t,a){return yi(bt.hash(n,e,t),a)}var Zn={};Vi(Zn,{AlchemyProvider:()=>vr,AlchemyWebSocketProvider:()=>cs,AnkrProvider:()=>ms,BaseProvider:()=>Yn,CloudflareProvider:()=>hs,EtherscanProvider:()=>xs,FallbackProvider:()=>gs,Formatter:()=>Y,InfuraProvider:()=>_r,InfuraWebSocketProvider:()=>vs,IpcProvider:()=>wl,JsonRpcBatchProvider:()=>Yo,JsonRpcProvider:()=>Yt,JsonRpcSigner:()=>gr,NodesmithProvider:()=>ws,PocketProvider:()=>_s,Provider:()=>$t,Resolver:()=>br,StaticJsonRpcProvider:()=>fs,UrlJsonRpcProvider:()=>It,Web3Provider:()=>ks,WebSocketProvider:()=>ba,getDefaultProvider:()=>Zo,getNetwork:()=>is,isCommunityResourcable:()=>yl,isCommunityResource:()=>os,showThrottleMessage:()=>Xn});var Rf="networks/5.7.1";var Pf=new E(Rf);function Ux(n){return n&&typeof n.renetwork=="function"}function ha(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 ha(t)},e}function Uo(n,e){let t=function(a,i){return a.JsonRpcProvider?new a.JsonRpcProvider(n,e):null};return t.renetwork=function(a){return Uo(n,a)},t}var Nf={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:ha("homestead")},Df={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:ha("ropsten")},Of={chainId:63,name:"classicMordor",_defaultProvider:Uo("https://www.ethercluster.com/mordor","classicMordor")},Lo={unspecified:{chainId:0,name:"unspecified"},homestead:Nf,mainnet:Nf,morden:{chainId:2,name:"morden"},ropsten:Df,testnet:Df,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:Uo("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:Of,classicTestnet:Of,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:Uo("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 is(n){if(n==null)return null;if(typeof n=="number"){for(let a in Lo){let i=Lo[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=Lo[n];return a==null?null:{name:a.name,chainId:a.chainId,ensAddress:a.ensAddress,_defaultProvider:a._defaultProvider||null}}let e=Lo[n.name];if(!e)return typeof n.chainId!="number"&&Pf.throwArgumentError("invalid network chainId","network",n),n;n.chainId!==0&&n.chainId!==e.chainId&&Pf.throwArgumentError("network chainId mismatch","network",n);let t=n._defaultProvider||null;return t==null&&e._defaultProvider&&(Ux(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 Bf="web/5.7.1";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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})};function Ff(n,e){return Vx(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 jx=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},In=new E(Bf);function Lf(n){return new Promise(e=>{setTimeout(e,n)})}function Na(n,e){if(n==null)return null;if(typeof n=="string")return n;if(na(n)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return Jt(n)}catch{}return K(n)}return n}function Hx(n){return ve(n.replace(/%([0-9a-f][0-9a-f])/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))}function ll(n,e,t){let a=typeof n=="object"&&n.throttleLimit!=null?n.throttleLimit:12;In.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;In.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"},f=!1,x=2*60*1e3;if(typeof n=="string")l=n;else if(typeof n=="object"){if((n==null||n.url==null)&&In.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&&(f=!0);if(p.allowGzip=!!n.allowGzip,n.user!=null&&n.password!=null){l.substring(0,6)!=="https:"&&n.allowInsecureAuthentication!==!0&&In.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 "+Xi(ve(O))}}n.skipFetchSetup!=null&&(p.skipFetchSetup=!!n.skipFetchSetup),n.fetchOptions!=null&&(p.fetchOptions=we(n.fetchOptions))}let I=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),_=l?l.match(I):null;if(_)try{let O={statusCode:200,statusMessage:"OK",headers:{"content-type":_[1]||"text/plain"},body:_[2]?Qi(_[3]):Hx(_[3])},U=O.body;return t&&(U=t(O.body,O)),Promise.resolve(U)}catch(O){In.throwError("processing response error",E.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(M,J){x&&(O=setTimeout(()=>{O!=null&&(O=null,J(In.makeError("timeout",E.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 jx(this,void 0,void 0,function*(){for(let O=0;O=300)&&(S.cancel(),In.throwError("bad response",E.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 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){In.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 n=="string"?{url:n}:we(n);r.headers?Object.keys(r.headers).filter(o=>o.toLowerCase()==="content-type").length!==0||(r.headers=we(r.headers),r.headers["content-type"]="application/json"):r.headers={"content-type":"application/json"},n=r}return ll(n,i,a)}function Rn(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,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(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()&&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(f){s()&&a(f)})}p()})}var hl=wn(Hf());var ke="providers/5.7.2";var ss=new E(ke),Y=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),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(a),maxPriorityFeePerGas:Y.allowNull(a),maxFeePerGas:Y.allowNull(a),gasLimit:a,to:Y.allowNull(t,null),value:a,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(a),gasPrice:Y.allowNull(a),maxPriorityFeePerGas:Y.allowNull(a),maxFeePerGas:Y.allowNull(a),to:Y.allowNull(t),value:Y.allowNull(a),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:a,logsBloom:Y.allowNull(r),blockHash:s,transactionHash:s,logs:Y.arrayOf(this.receiptLog.bind(this)),blockNumber:l,confirmations:Y.allowNull(l,null),cumulativeGasUsed:a,effectiveGasPrice:Y.allowNull(a),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:a,gasUsed:a,miner:Y.allowNull(t),extraData:r,transactions:Y.allowNull(Y.arrayOf(s)),baseFeePerGas:Y.allowNull(a)},e.blockWithTransactions=we(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():ss.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 ce(e)}callAddress(e){if(!ae(e,32))return null;let t=ce(Ce(e,12));return t===ao?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"||ae(e))return Fn(e);throw new Error("invalid blockTag")}hash(e,t){let a=this.hex(e,t);return Pt(a)!==32?ss.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(!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 a=e._difficulty!=null?e._difficulty:e.difficulty,i=Y.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 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 a=e.chainId;ae(a)&&(a=F.from(a).toNumber()),t.chainId=a}else{let a=e.networkId;a==null&&t.v==null&&(a=e.chainId),ae(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 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 a=F.from(t.root).toNumber();a===0||a===1?(t.status!=null&&t.status!==a&&ss.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=a,delete t.root):ss.throwArgumentError("invalid alt-root-status","value.root",t.root)}else t.root.length!==66&&ss.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 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 yl(n){return n&&typeof n.isCommunityResource=="function"}function os(n){return yl(n)&&n.isCommunityResource()}var qf=!1;function Xn(){qf||(qf=!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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},he=new E(ke),Qx=10;function Gf(n){return n==null?"null":(Pt(n)!==32&&he.throwArgumentError("invalid topic","topic",n),n.toLowerCase())}function zf(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[Gf(i)]=!0});let a=Object.keys(t);return a.sort(),a.join("|")}else return Gf(e)}).join("&")}function Xx(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 xr(n){if(typeof n=="string"){if(n=n.toLowerCase(),Pt(n)===32)return"tx:"+n;if(n.indexOf(":")===-1)return n}else{if(Array.isArray(n))return"filter:*:"+zf(n);if(mo.isForkEvent(n))throw he.warn("not implemented"),new Error("not implemented");if(n&&typeof n=="object")return"filter:"+(n.address||"*")+":"+zf(n.topics||[])}throw new Error("invalid event - "+n)}function us(){return new Date().getTime()}function Kf(n){return new Promise(e=>{setTimeout(e,n)})}var Yx=["block","network","pending","poll"],xl=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=Xx(e[2]),i={};return a.length>0&&(i.topics=a),t&&t!=="*"&&(i.address=t),i}pollable(){return this.tag.indexOf(":")>=0||Yx.indexOf(this.tag)>=0}},Zx={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 fl(n){return me(F.from(n).toHexString(),32)}function Wf(n){return pa.encode(ye([n,Ce(Xt(Xt(n)),0,4)]))}var Qf=new RegExp("^(ipfs)://(.*)$","i"),Jf=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),Qf,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function qo(n,e){try{return Jt(ds(n,e))}catch{}return null}function ds(n,e){if(n==="0x")return null;let t=F.from(Ce(n,e,e+32)).toNumber(),a=F.from(Ce(n,t,t+32)).toNumber();return Ce(n,t+32,t+32+a)}function cl(n){return n.match(/^ipfs:\/\/ipfs\//i)?n=n.substring(12):n.match(/^ipfs:\/\//i)?n=n.substring(7):he.throwArgumentError("unsupported IPFS format","link",n),`https://gateway.ipfs.io/ipfs/${n}`}function $f(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 e5(n){if(n.length%32===0)return n;let e=new Uint8Array(Math.ceil(n.length/32)*32);return e.set(n),e}function Xf(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:_t([e,Ma(this.name),t||"0x"])},i=!1;(yield this.supportsWildcard())&&(i=!0,a.data=_t(["0x9061b923",Xf([Wr(this.name),a.data])]));try{let r=yield this.provider.call(a);return j(r).length%32===4&&he.throwError("resolver threw error",E.errors.CALL_EXCEPTION,{transaction:a,data:r}),i&&(r=ds(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?ds(a,0):null})}_getAddress(e,t){let a=Zx[String(e)];if(a==null&&he.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 Wf(ye([[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 Wf(ye([[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=hl.default.toWords(i.slice(2));return o.unshift(s),hl.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===Ji?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",fl(e));if(t==null||t==="0x")return null;let a=this._getAddress(e,t);return a==null&&he.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 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([fl(64),fl(t.length),t]),t.length%32!==0&&(t=ye([t,me("0x",32-e.length%32)]));let a=yield this._fetchBytes("0x59d1d43c",K(t));return a==null||a==="0x"?null:Jt(a)})}},ml=null,t5=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",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 Rn(()=>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 is(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 Sn({url:p,errorPassThrough:!0},f,(_,v)=>(_.status=v.statusCode,_));if(x.data)return x.data;let I=x.message||"unknown error";if(x.status>=400&&x.status<500)return he.throwError(`response not found during CCIP fetch: ${I}`,E.errors.SERVER_ERROR,{url:l,errorMessage:I});s.push(I)}return he.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(us()-r.respTime<=e)return r.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}let t=us(),a=Ie({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=us();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=t5++,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)he.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${a})`),this.emit("error",he.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 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 Kf(0),this._network;let a=he.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=us();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,f=function(){return p?!0:(p=!0,l.forEach(I=>{I()}),!1)},x=I=>{I.confirmations{this.removeListener(e,x)}),i){let I=i.startBlock,_=null,v=S=>ue(this,void 0,void 0,function*(){p||(yield Kf(1e3),this.getTransactionCount(i.from).then(L=>ue(this,void 0,void 0,function*(){if(!p){if(L<=i.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),l.push(()=>{this.removeListener("block",v)})}if(typeof a=="number"&&a>0){let I=setTimeout(()=>{f()||o(he.makeError("timeout exceeded",E.errors.TIMEOUT,{timeout:a}))},a);I.unref&&I.unref(),l.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",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 Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getBalance",a);try{return F.from(i)}catch(r){return he.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 Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getTransactionCount",a);try{return F.from(i).toNumber()}catch(r){return he.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 Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getCode",a);try{return K(i)}catch(r){return he.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 Ie({address:this._getAddress(e),blockTag:this._getBlockTag(a),position:Promise.resolve(t).then(s=>Fn(s))}),r=yield this.perform("getStorageAt",i);try{return K(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,a){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.",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&&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=>K(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?K(r):null))}),this.formatter.transactionRequest(yield Ie(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 Ie(t))})}_call(e,t,a){return ue(this,void 0,void 0,function*(){a>=Qx&&he.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"&&Pt(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(),f=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&&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 Rn(()=>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 Rn(()=>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 Ie({filter:this._getFilter(e)}),a=yield this.perform("getLogs",t);return a.forEach(i=>{i.removed==null&&(i.removed=!1)}),Y.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&&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 a=yield this._getResolver(t,"getResolver");if(a!=null){let i=new br(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||he.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"+Ma(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(ae(e))throw a}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",a=yield this._getResolver(t,"lookupAddress");if(a==null)return null;let i=qo(yield this.call({to:a,data:"0x691f3431"+Ma(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 br(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"+Ma(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 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,a){let i=new xl(xr(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=xr(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=xr(e);return this._events.filter(a=>a.tag===t).length}listeners(e){if(e==null)return this._events.map(a=>a.listener);let t=xr(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=xr(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=xr(e);this._events=this._events.filter(i=>i.tag!==a?!0:(t.push(i),!1))}return t.forEach(a=>{this._stopEvent(a)}),this}};var xa=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},At=new E(ke),n5=["call","estimateGas"];function ps(n,e){if(n==null)return null;if(typeof n.message=="string"&&n.message.match("reverted")){let t=ae(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=ps(n[t],e);if(a)return a}return null}if(typeof n=="string")try{return ps(JSON.parse(n),e)}catch{}return null}function Zf(n,e,t){let a=t.transaction||t.signedTransaction;if(n==="call"){let r=ps(e,!0);if(r)return r.data;At.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=ps(e.body,!1);r==null&&(r=ps(e,!1)),r&&At.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)&&At.throwError("insufficient funds for intrinsic transaction cost",E.errors.INSUFFICIENT_FUNDS,{error:e,method:n,transaction:a}),i.match(/nonce (is )?too low/i)&&At.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)&&At.throwError("replacement fee too low",E.errors.REPLACEMENT_UNDERPRICED,{error:e,method:n,transaction:a}),i.match(/only replay-protected/i)&&At.throwError("legacy pre-eip-155 transactions not supported",E.errors.UNSUPPORTED_OPERATION,{error:e,method:n,transaction:a}),n5.indexOf(n)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&At.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 Yf(n){return new Promise(function(e){setTimeout(e,n)})}function a5(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 ls(n){return n&&n.toLowerCase()}var bl={},gr=class extends Gt{constructor(e,t,a){if(super(),e!==bl)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)):At.throwArgumentError("invalid address or index","addressOrIndex",a)}connect(e){return At.throwError("cannot alter JSON-RPC Signer connection",E.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new gl(bl,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&&At.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(a=>(a&&(a=a.toLowerCase()),a));if(e.gasLimit==null){let a=we(e);a.from=t,e.gasLimit=this.provider.estimateGas(a)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(a=>xa(this,void 0,void 0,function*(){if(a==null)return null;let i=yield this.provider.resolveName(a);return i==null&&At.throwArgumentError("provided ENS name resolves to null","tx.to",a),i}))),Ie({tx:Ie(e),sender:t}).then(({tx:a,sender:i})=>{a.from!=null?a.from.toLowerCase()!==i&&At.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)&&At.throwError("user rejected transaction",E.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:a}),Zf("sendTransaction",s,r)))})}signTransaction(e){return At.throwError("signing transactions is unsupported",E.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),a=yield this.sendUncheckedTransaction(e);try{return yield Rn(()=>xa(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 xa(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(e):e,a=yield this.getAddress();try{return yield this.provider.send("personal_sign",[K(t),a.toLowerCase()])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&At.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"signMessage",from:a,messageData:e}),i}})}_legacySignMessage(e){return xa(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(e):e,a=yield this.getAddress();try{return yield this.provider.send("eth_sign",[a.toLowerCase(),K(t)])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&At.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:a,messageData:e}),i}})}_signTypedData(e,t,a){return xa(this,void 0,void 0,function*(){let i=yield bt.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(bt.getPayload(i.domain,t,i.value))])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&At.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 xa(this,void 0,void 0,function*(){let t=this.provider,a=yield this.getAddress();return t.send("personal_unlockAccount",[a.toLowerCase(),e,null])})}},gl=class extends gr{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)}))}},i5={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 a=t;a==null&&(a=new Promise((i,r)=>{setTimeout(()=>{this.detectNetwork().then(s=>{i(s)},s=>{r(s)})},0)})),super(a),e||(e=ht(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 xa(this,void 0,void 0,function*(){yield Yf(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(a){return At.throwError("could not detect network",E.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:a})}}return At.throwError("could not detect network",E.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new gr(bl,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:mt(a),provider:this});let i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];let r=Sn(this.connection,JSON.stringify(a),a5).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",[ls(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[ls(t.address),t.blockTag]];case"getCode":return["eth_getCode",[ls(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[ls(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 a=ht(this.constructor,"hexlifyTransaction");return["eth_call",[a(t.transaction,{from:!0}),t.blockTag]]}case"estimateGas":{let a=ht(this.constructor,"hexlifyTransaction");return["eth_estimateGas",[a(t.transaction,{from:!0})]]}case"getLogs":return t.filter&&t.filter.address!=null&&(t.filter.address=ls(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=we(t),t.transaction=we(i),delete t.transaction.type)}}let a=this.prepareRequest(e,t);a==null&&At.throwError(e+" not implemented",E.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(a[0],a[1])}catch(i){return Zf(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 Yf(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=we(i5);if(t)for(let r in t)t[r]&&(a[r]=!0);qi(e,a);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]=K(e[r]))}),e.accessList&&(i.accessList=sn(e.accessList)),i}};var Tr=null;try{if(Tr=WebSocket,Tr==null)throw new Error("inject please")}catch{let e=new E(ke);Tr=function(){e.throwError("WebSockets not supported in this environment",E.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var Tl=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Go=new E(ke),r5=1,ba=class extends Yt{constructor(e,t){t==="any"&&Go.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 Tr(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){Go.throwError("cannot reset events block on WebSocketProvider",E.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(e){Go.throwError("cannot set polling interval on WebSocketProvider",E.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return Tl(this,void 0,void 0,function*(){return null})}set polling(e){!e||Go.throwError("cannot set polling on WebSocketProvider",E.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(e,t){let a=r5++;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 Tl(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 Tl(this,void 0,void 0,function*(){this.websocket.readyState===Tr.CONNECTING&&(yield new Promise(e=>{this.websocket.onopen=function(){e(!0)},this.websocket.onerror=function(){e(!1)}})),this.websocket.close(1e3)})}};var s5=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},ys=new E(ke),fs=class extends Yt{detectNetwork(){let e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return s5(this,void 0,void 0,function*(){let t=this.network;return t==null&&(t=yield e.detectNetwork.call(this),t||ys.throwError("no network detected",E.errors.UNKNOWN_ERROR,{}),this._network==null&&(B(this,"_network",t),this.emit("network",t,null))),t})}},It=class extends fs{constructor(e,t){ys.checkAbstract(new.target,It),e=ht(new.target,"getNetwork")(e),t=ht(new.target,"getApiKey")(t);let a=ht(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(){ys.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(e){return ys.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 ys.throwError("not implemented; sub-classes must override getUrl",E.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}};var ec=new E(ke),zo="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC",cs=class extends ba{constructor(e,t){let a=new vr(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===zo}},vr=class extends It{static getWebSocketProvider(e,t){return new cs(e,t)}static getApiKey(e){return e==null?zo:(e&&typeof e!="string"&&ec.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:ec.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+a+t,throttleCallback:(i,r)=>(t===zo&&Xn(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===zo}};var o5=new E(ke),Ko="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function u5(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 o5.throwArgumentError("unsupported network","name",n)}var ms=class extends It{isCommunityResource(){return this.apiKey===Ko}static getApiKey(e){return e??Ko}static getUrl(e,t){t==null&&(t=Ko);let a={allowGzip:!0,url:"https://"+u5(e.name)+t,throttleCallback:(i,r)=>(t.apiKey===Ko&&Xn(),Promise.resolve(!0))};return t.projectSecret!=null&&(a.user="",a.password=t.projectSecret),a}};var d5=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},tc=new E(ke),hs=class extends It{static getApiKey(e){return e!=null&&tc.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:tc.throwArgumentError("unsupported network","network",arguments[0])}return a}perform(e,t){let a=Object.create(null,{perform:{get:()=>super.perform}});return d5(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 Wo=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Da=new E(ke);function nc(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=Fn(K(a)):t==="accessList"?a="["+sn(a).map(i=>`{address:"${i.address}",storageKeys:["${i.storageKeys.join('","')}"]}`).join(",")+"]":a=K(a),e[t]=a)}return e}function l5(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 ac(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 ic(n){if(n==="pending")throw new Error("pending not supported");return n==="latest"?n:parseInt(n.substring(2),16)}function vl(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,"")),ae(r))return r;Da.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/)&&Da.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/)&&Da.throwError("nonce has already been used",E.errors.NONCE_EXPIRED,{error:e,method:n,transaction:t}),a.match(/another transaction with same nonce/)&&Da.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/)&&Da.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 xs=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 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 Wo(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"?ac:l5;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 Sn(o,l,s||ac);return this.emit("debug",{action:"response",request:i,response:mt(p),provider:this}),p})}detectNetwork(){return Wo(this,void 0,void 0,function*(){return this.network})}perform(e,t){let a=Object.create(null,{perform:{get:()=>super.perform}});return Wo(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=>vl("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=nc(t.transaction);i.module="proxy",i.action="eth_call";try{return yield this.fetch("proxy",i,!0)}catch(r){return vl("call",r,t.transaction)}}case"estimateGas":{let i=nc(t.transaction);i.module="proxy",i.action="eth_estimateGas";try{return yield this.fetch("proxy",i,!0)}catch(r){return vl("estimateGas",r,t.transaction)}}case"getLogs":{let i={action:"getLogs"};if(t.filter.fromBlock&&(i.fromBlock=ic(t.filter.fromBlock)),t.filter.toBlock&&(i.toBlock=ic(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",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)&&Da.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 Qo=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},bi=new E(ke);function Jo(){return new Date().getTime()}function rc(n){let e=null;for(let t=0;te?null:(a+i)/2}function wr(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=>wr(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=wr(a),JSON.stringify(t)+":"+a}).join(",")+"}"}throw new Error("unknown value type: "+typeof n)}var p5=1;function oc(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 y5=[E.errors.CALL_EXCEPTION,E.errors.INSUFFICIENT_FUNDS,E.errors.NONCE_EXPIRED,E.errors.REPLACEMENT_UNDERPRICED,E.errors.UNPREDICTABLE_GAS_LIMIT],f5=["address","args","errorArgs","errorSignature","method","transaction"];function $o(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 c5(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 m5(n,e,t){let a=wr;switch(e){case"getBlockNumber":return function(i){let r=i.map(o=>o.result),s=sc(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 sc(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=we(i),i.confirmations=-1,wr(i))};break;case"getBlock":t.includeTransactions?a=function(i){return i==null?null:(i=we(i),i.transactions=i.transactions.map(r=>(r=we(r),r.confirmations=-1,r)),wr(i))}:a=function(i){return i==null?null:wr(i)};break;default:throw new Error("unknown method: "+e)}return c5(a,n.quorum)}function bs(n,e){return Qo(this,void 0,void 0,function*(){let t=n.provider;return t.blockNumber!=null&&t.blockNumber>=e||e===-1?t:Rn(()=>new Promise((a,i)=>{setTimeout(function(){return t.blockNumber>=e?a(t):n.cancelled?a(null):a(void 0)},0)}),{oncePoll:t})})}function h5(n,e,t,a){return Qo(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&&ae(a.blockTag)&&(i=yield bs(n,e)),i[t](a.address,a.blockTag||"latest");case"getStorageAt":return a.blockTag&&ae(a.blockTag)&&(i=yield bs(n,e)),i.getStorageAt(a.address,a.position,a.blockTag||"latest");case"getBlock":return a.blockTag&&ae(a.blockTag)&&(i=yield bs(n,e)),i[a.includeTransactions?"getBlockWithTransactions":"getBlock"](a.blockTag||a.blockHash);case"call":case"estimateGas":return a.blockTag&&ae(a.blockTag)&&(i=yield bs(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&&ae(r.fromBlock)||r.toBlock&&ae(r.toBlock))&&(i=yield bs(n,e)),i.getLogs(r)}}return bi.throwError("unknown method error",E.errors.UNKNOWN_ERROR,{method:t,params:a})})}var gs=class extends Yn{constructor(e,t){e.length===0&&bi.throwArgumentError("missing providers","providers",e);let a=e.map((s,o)=>{if($t.isProvider(s)){let f=os(s)?2e3:750;return Object.freeze({provider:s,weight:1,stallTimeout:f,priority:1})}let l=we(s);l.priority==null&&(l.priority=1),l.stallTimeout==null&&(l.stallTimeout=os(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=a.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=rc(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 Qo(this,void 0,void 0,function*(){let e=yield Promise.all(this.providerConfigs.map(t=>t.provider.getNetwork()));return rc(e)})}perform(e,t){return Qo(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=Jo(),p=i.filter(_=>_.runner&&l-_.start<_.stallTimeout).reduce((_,v)=>_+v.weight,0);for(;p{_.staller=null}),_.runner=h5(_,r,e,t).then(S=>{_.done=!0,_.result=S,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:$o(_,Jo()),request:{method:e,params:mt(t)},provider:this})},S=>{_.done=!0,_.error=S,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:$o(_,Jo()),request:{method:e,params:mt(t)},provider:this})}),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:$o(_,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 _=a(x);if(_!==void 0)return i.forEach(v=>{v.staller&&v.staller.cancel(),v.cancelled=!0}),_;o||(yield oc(100).getPromise()),o=!1}let I=i.reduce((_,v)=>{if(!v.done||v.error==null)return _;let S=v.error.code;return y5.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={};f5.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",E.errors.SERVER_ERROR,{method:e,params:t,results:i.map(l=>$o(l)),provider:this})})}};var wl=null;var Xo=new E(ke),Ts="84842078b09946638c03157f83405213",vs=class extends ba{constructor(e,t){let a=new _r(e,t),i=a.connection;i.password&&Xo.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===Ts}},_r=class extends It{static getWebSocketProvider(e,t){return new vs(e,t)}static getApiKey(e){let t={apiKey:Ts,projectId:Ts,projectSecret:null};return e==null||(typeof e=="string"?t.projectId=e:e.projectSecret!=null?(Xo.assertArgument(typeof e.projectId=="string","projectSecret requires a projectId","projectId",e.projectId),Xo.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:Xo.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===Ts&&Xn(),Promise.resolve(!0))};return t.projectSecret!=null&&(i.user="",i.password=t.projectSecret),i}isCommunityResource(){return this.projectId===Ts}};var Yo=class extends Yt{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:mt(o),provider:this}),Sn(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 I=new Error(x.error.message);I.code=x.error.code,I.data=x.error.data,p.reject(I)}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 _l=new E(ke),x5="ETHERS_JS_SHARED",ws=class extends It{static getApiKey(e){return e&&typeof e!="string"&&_l.throwArgumentError("invalid apiKey","apiKey",e),e||x5}static getUrl(e,t){_l.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:_l.throwArgumentError("unsupported network","network",arguments[0])}return a+"?apiKey="+t}};var uc=new E(ke),dc="62e1ad51b37b8e00394bda3b",_s=class extends It{static getApiKey(e){let t={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return e==null?t.applicationId=dc:typeof e=="string"?t.applicationId=e:e.applicationSecretKey!=null?(t.applicationId=e.applicationId,t.applicationSecretKey=e.applicationSecretKey):e.applicationId?t.applicationId=e.applicationId:uc.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:uc.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===dc}};var lc=new E(ke),b5=1;function pc(n,e){let t="Web3LegacyFetcher";return function(a,i){let r={method:a,params:i,id:b5++,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 g5(n){return function(e,t){t==null&&(t=[]);let a={method:e,params:t};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:mt(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 ks=class extends Yt{constructor(e,t){e==null&&lc.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=g5(e)):e.sendAsync?i=pc(e,e.sendAsync.bind(e)):e.send?i=pc(e,e.send.bind(e)):lc.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 yc=new E(ke);function Zo(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 Yt(n);case"ws":case"wss":return new ba(n);default:yc.throwArgumentError("unsupported URL scheme","network",n)}}let t=is(n);return(!t||!t._defaultProvider)&&yc.throwError("unsupported getDefaultProvider network",E.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:n}),t._defaultProvider({FallbackProvider:gs,AlchemyProvider:vr,AnkrProvider:ms,CloudflareProvider:hs,EtherscanProvider:xs,InfuraProvider:_r,JsonRpcProvider:Yt,NodesmithProvider:ws,PocketProvider:_s,Web3Provider:ks,IpcProvider:null},e)}var te={};Vi(te,{AbiCoder:()=>$i,ConstructorFragment:()=>Nt,ErrorFragment:()=>tn,EventFragment:()=>jt,FormatTypes:()=>ge,Fragment:()=>Ht,FunctionFragment:()=>Dt,HDNode:()=>Ct,Indexed:()=>sa,Interface:()=>Ca,LogDescription:()=>Zi,Logger:()=>E,ParamType:()=>pt,RLP:()=>$s,SigningKey:()=>cn,SupportedAlgorithm:()=>$n,TransactionDescription:()=>er,TransactionTypes:()=>Ao,UnicodeNormalizationForm:()=>qt,Utf8ErrorFuncs:()=>uo,Utf8ErrorReason:()=>Ot,_TypedDataEncoder:()=>bt,_fetchData:()=>ll,_toEscapedUtf8String:()=>md,accessListify:()=>sn,arrayify:()=>j,base58:()=>pa,base64:()=>vd,checkProperties:()=>qi,checkResultErrors:()=>zi,commify:()=>Tc,computeAddress:()=>mn,computeHmac:()=>ya,computePublicKey:()=>Qr,concat:()=>ye,deepCopy:()=>mt,defaultAbiCoder:()=>zr,defaultPath:()=>fa,defineReadOnly:()=>B,dnsEncode:()=>Wr,entropyToMnemonic:()=>xi,fetchJson:()=>Sn,formatBytes32String:()=>hd,formatEther:()=>vc,formatUnits:()=>kl,getAccountPath:()=>yf,getAddress:()=>ce,getContractAddress:()=>ui,getCreate2Address:()=>Ay,getIcapAddress:()=>ky,getJsonWalletAddress:()=>rl,getStatic:()=>ht,hashMessage:()=>Yi,hexConcat:()=>_t,hexDataLength:()=>Pt,hexDataSlice:()=>Ce,hexStripZeros:()=>id,hexValue:()=>Fn,hexZeroPad:()=>me,hexlify:()=>K,id:()=>nn,isAddress:()=>_y,isBytes:()=>on,isBytesLike:()=>na,isHexString:()=>ae,isValidMnemonic:()=>pf,isValidName:()=>_d,joinSignature:()=>Or,keccak256:()=>fe,mnemonicToEntropy:()=>fr,mnemonicToSeed:()=>Yd,namehash:()=>Ma,nameprep:()=>Td,parseBytes32String:()=>xd,parseEther:()=>wc,parseTransaction:()=>Eo,parseUnits:()=>Al,poll:()=>Rn,randomBytes:()=>Qn,recoverAddress:()=>yi,recoverPublicKey:()=>ko,resolveProperties:()=>Ie,ripemd160:()=>Zr,serializeTransaction:()=>Xr,sha256:()=>Xt,sha512:()=>Jd,shallowCopy:()=>we,shuffled:()=>ns,solidityKeccak256:()=>mc,solidityPack:()=>eu,soliditySha256:()=>hc,splitSignature:()=>Ln,stripZeros:()=>Zt,toUtf8Bytes:()=>ve,toUtf8CodePoints:()=>Ea,toUtf8String:()=>Jt,verifyMessage:()=>If,verifyTypedData:()=>Sf,zeroPad:()=>ii});var fc="solidity/5.7.0";var T5=new RegExp("^bytes([0-9]+)$"),v5=new RegExp("^(u?int)([0-9]*)$"),w5=new RegExp("^(.*)\\[([0-9]*)\\]$"),_5="0000000000000000000000000000000000000000000000000000000000000000",kr=new E(fc);function cc(n,e,t){switch(n){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 a=n.match(v5);if(a){let i=parseInt(a[2]||"256");return(a[2]&&String(i)!==a[2]||i%8!==0||i===0||i>256)&&kr.throwArgumentError("invalid number type","type",n),t&&(i=256),e=F.from(e).toTwos(i),ii(e,i/8)}if(a=n.match(T5),a){let i=parseInt(a[1]);return(String(i)!==a[1]||i===0||i>32)&&kr.throwArgumentError("invalid bytes type","type",n),j(e).byteLength!==i&&kr.throwArgumentError(`invalid value for ${n}`,"value",e),t?j((e+_5).substring(0,66)):e}if(a=n.match(w5),a&&Array.isArray(e)){let i=a[1];parseInt(a[2]||String(e.length))!=e.length&&kr.throwArgumentError(`invalid array length for ${n}`,"value",e);let s=[];return e.forEach(function(o){s.push(cc(i,o,!0))}),ye(s)}return kr.throwArgumentError("invalid type","type",n)}function eu(n,e){n.length!=e.length&&kr.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);let t=[];return n.forEach(function(a,i){t.push(cc(a,e[i]))}),K(ye(t))}function mc(n,e){return fe(eu(n,e))}function hc(n,e){return Xt(eu(n,e))}var xc="units/5.7.0";var bc=new E(xc),gc=["wei","kwei","mwei","gwei","szabo","finney","ether"];function Tc(n){let e=String(n).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||n==="."||n==="-.")&&bc.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 kl(n,e){if(typeof e=="string"){let t=gc.indexOf(e);t!==-1&&(e=3*t)}return Hi(n,e??18)}function Al(n,e){if(typeof n!="string"&&bc.throwArgumentError("value must be a string","value",n),typeof e=="string"){let t=gc.indexOf(e);t!==-1&&(e=3*t)}return dn(n,e??18)}function vc(n){return kl(n,18)}function wc(n){return Al(n,18)}var tu="ethers/5.7.2";var _c=new E(tu);try{let n=window;n._ethers==null&&(n._ethers=El)}catch{}var ga;(function(n){n.Mainnet="Mainnet",n.Custom="Custom",n.Gnosis="Xdai",n.Goerli="Goerli",n.Xdai="Xdai",n.XdaiQa="XdaiQa",n.ArbitrumOne="ArbitrumOne",n.ArbitrumSepolia="ArbitrumSepolia"})(ga||(ga={}));var kc;(function(n){n[n.Custom=0]="Custom",n[n.Mainnet=1]="Mainnet",n[n.Goerli=5]="Goerli",n[n.Gnosis=100]="Gnosis",n[n.Xdai=100]="Xdai",n[n.XdaiQa=100]="XdaiQa",n[n.ArbitrumSepolia=421614]="ArbitrumSepolia",n[n.ArbitrumOne=42161]="ArbitrumOne"})(kc||(kc={}));var Ml;(function(n){n.Mainnet="0x5346D0f80e2816FaD329F2c140c870ffc3c3E2Ef",n.Goerli="0x79073fc2117dD054FCEdaCad1E7018C9CbE3ec0B",n.Xdai="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.XdaiQa="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.Custom="",n.ArbitrumOne="0xcccccdcc0ccf6c708d860e19353c5f9a49accccc",n.ArbitrumSepolia="0x7777494e3d8cce0D3570E21FEf820F9Fee077777"})(Ml||(Ml={}));var As;(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",n.ArbitrumOne="https://app.colony.io/reputation/arbitrum-one",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/reputation/arbitrum-sepolia"})(As||(As={}));var Cl;(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="",n.ArbitrumOne="https://app.colony.io/metatransaction/arbitrum-one",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/metatransaction/arbitrum-sepolia"})(Cl||(Cl={}));var Es;(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="",n.ArbitrumOne="https://app.colony.io/public-rpc/",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/public-rpc/"})(Es||(Es={}));var Il;(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",n.ArbitrumOne=".colony.joincolony.arbitrum",n.ArbitrumSepolia=".colony.joincolony.sepolia"})(Il||(Il={}));var Sl;(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",n.ArbitrumOne=".user.joincolony.arbitrum",n.ArbitrumSepolia=".user.joincolony.sepolia"})(Sl||(Sl={}));var Rl;(function(n){let e;(function(i){i.ETH="0x0000000000000000000000000000000000000000",i.CLNY="0x3E828ac5C480069D4765654Fb4b8733b910b13b2",i.USDC="0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"})(e=n.Mainnet||(n.Mainnet={}));let t;(function(i){i.XDAI="0x0000000000000000000000000000000000000000",i.CLNY="0xc9B6218AffE8Aba68a13899Cbf7cF7f14DDd304C",i.USDC="0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83"})(t=n.Gnosis||(n.Gnosis={}));let a;(function(i){i.ETH="0x0000000000000000000000000000000000000000",i.CLNY="0xcccccdcc0ccf6c708d860e19353c5f9a49accccc",i.USDC="0xaf88d065e77c8cC2239327C5EDb3A432268e5831"})(a=n.ArbitrumOne||(n.ArbitrumOne={}))})(Rl||(Rl={}));var _e;(function(n){n[n.RootDomain=1]="RootDomain",n[n.RootTeam=1]="RootTeam",n[n.RootPot=1]="RootPot",n[n.SkillIgnore=0]="SkillIgnore"})(_e||(_e={}));var zt;(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"})(zt||(zt={}));var Nl="0x12345678",Pl;(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"})(Pl||(Pl={}));var vt;(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"})(vt||(vt={}));var Ae;(function(n){n.FundingQueue="FundingQueue",n.IVotingReputation="IVotingReputation",n.MultisigPermissions="MultisigPermissions",n.OneTxPayment="OneTxPayment",n.ReputationBootstrapper="ReputationBootstrapper",n.StagedExpenditure="StagedExpenditure",n.StakedExpenditure="StakedExpenditure",n.StreamingPayments="StreamingPayments",n.TokenSupplier="TokenSupplier",n.VotingReputation="VotingReputation"})(Ae||(Ae={}));var Dl=[{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(Dl)}static connect(e,t){return new oe(e,Dl,t)}};xe(gi,"abi",Dl);var Ol=[{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",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 Ac=(n,e)=>{throw new Error(`${e}: ${n}`)},Bl=n=>n!=null;var{keccak256:A5,toUtf8Bytes:E5}=te,{MaxUint256:M5}=yt,Fl=(n,e)=>n.toLowerCase()===e.toLowerCase(),Ll=n=>te.formatEther(n);var Ul=n=>{let e=n.reduce((t,a)=>t|1<{let e=F.from(n);return[...Array(vt.LAST_ROLE).keys()].map(t=>e.shr(t).mask(1).eq(1)?t:null).filter(Bl)},vi=async(n,e,t,a)=>{if(F.from(t).eq(F.from(a)))return M5;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)},Oa=n=>A5(E5(n));var Ar=async(n,e)=>(await Ti.connect(n,e).version()).toNumber(),Vl=(n,e)=>n.map(t=>{try{return e.parseLog(t)}catch{return null}}).filter(Bl);var{hexDataSlice:jl}=te,{MaxUint256:C5}=yt,Ec=n=>{let e=jl(n,0,3),t=F.from(jl(n,4,35)),a=F.from(jl(n,36,67));return{sig:e,permissionDomainId:t,childSkillIndex:a}},Mc=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),C5,r];let o=F.from(_e.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 vi(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]},I5=async(n,e,t,a,i)=>{let r=await Promise.all(a.map(s=>Mc(n,e,t,s,i)));for(let s=0;sArray.isArray(a)?a.length===1?ea(n,e,t,a[0],i):I5(n,e,t,a,i):Mc(n,e,t,a,i);var{MaxUint256:Cc}=yt,{AddressZero:S5}=yt;async function R5(n,e){let t;try{return t=await n.getCapabilityRoles(te.hexZeroPad(e,4)),nu(t)}catch{return[]}}async function Ms(n,e,t,a,i,r,s){let o,{skillId:l}=await e.getDomain(i),{sig:p,permissionDomainId:f,childSkillIndex:x}=Ec(s),I=gi.connect(r,a.signer||a.provider),_=await R5(I,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 ${_e.RootDomain}`);o=Cc}else{let{skillId:U}=await e.getDomain(f),H=await n.getChildSkillId(U,x);if(H.eq(l))o=Cc;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,S5);return{actionCid:o,key:v,value:S,branchMask:L,siblings:O}}var{AddressZero:P5}=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,a){this.colony=t,this.network=e;let i=a?.network||ga.ArbitrumOne;this.endpointUrl=a?.customEndpointUrl||As[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 ta.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 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 a=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${a}/${i}`;return ta.fetchReputation(r)}async getTotalReputation(e,t){let a=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${a}/${i}/${P5}/noProof`,s=await ta.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 Et=n=>Array.from(Array(n-1)).map((e,t)=>t+1);var Ic=10,dk=Et(Ic),Sc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Rc=Ic-1;var Pc=3,yk=Et(Pc),Nc={1:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],2:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]},Dc=Pc-1;var Oc=10,mk=Et(Oc),Bc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Fc=Oc-1;var Lc=7,bk=Et(Lc),Uc={1:[],2:[],3:[],4:[],5:[],6:[]},Vc=Lc-1;var jc=8,vk=Et(jc),Hc={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3],6:[1,2,3],7:[1,2,3]},qc=jc-1;var Gc=5,kk=Et(Gc),zc={1:[1,2,3,4,5,6,7,8,9,10,11,12,13],2:[1,2,3,4,5,6,7,8,9,10,11,12,13],3:[1,2,3,4,5,6,7,8,9,10,11,12,13],4:[1,2,3,4,5,6,7,8,9,10,11,12,13]},Kc=Gc-1;var Wc=7,Mk=Et(Wc),Jc={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3],6:[1,2,3]},$c=Wc-1;var Qc=10,Sk=Et(Qc),Xc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Yc=Qc-1;var Zc=14,Nk=Et(Zc),Hl={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],11:[1,2,3,4,5,6],12:[1,2,3,4,5,6],13:[1,2,3,4,5,6]},ql=Zc-1;var em=18,N5=Et(em),Bk=em-1;var D5=(n,e)=>{switch(n){case Ae.FundingQueue:return Sc[e];case Ae.IVotingReputation:return Hl[e];case Ae.MultisigPermissions:return Nc[e];case Ae.OneTxPayment:return Bc[e];case Ae.ReputationBootstrapper:return Uc[e];case Ae.StagedExpenditure:return zc[e];case Ae.StakedExpenditure:return Hc[e];case Ae.StreamingPayments:return Jc[e];case Ae.TokenSupplier:return Xc[e];case Ae.VotingReputation:return Hl[e];default:return Ac(n,"Could not find extension with name")}},wi=(n,e,t)=>{let a=D5(n,e);return!!a&&!a.includes(t)};var O5={[Ae.FundingQueue]:Rc,[Ae.IVotingReputation]:ql,[Ae.MultisigPermissions]:Dc,[Ae.OneTxPayment]:Fc,[Ae.ReputationBootstrapper]:Vc,[Ae.StagedExpenditure]:Kc,[Ae.StakedExpenditure]:qc,[Ae.StreamingPayments]:$c,[Ae.TokenSupplier]:Yc,[Ae.VotingReputation]:ql};var w6=wn(tm(),1);var pp=wn(g6(),1);var Re;(function(n){n.DEFAULT="default",n.Annotation="annotation",n.Colony="colony",n.Decision="decision",n.Domain="domain",n.Misc="misc"})(Re||(Re={}));var lp=2,dp;(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"})(dp||(dp={}));var T6=n=>`Validation error(s): +`)}static register(e,t){if(t||(t=e.locale),Ex)try{let a=window;a._ethers&&a._ethers.wordlists&&(a._ethers.wordlists[t]||B(a._ethers.wordlists,t,e))}catch{}}};var Mx="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo",ts=null;function sf(n){if(ts==null&&(ts=Mx.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),hn.check(n)!=="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"))throw ts=null,new Error("BIP39 Wordlist for en (English) FAILED")}var $d=class extends hn{constructor(){super("en")}getWord(e){return sf(this),ts[e]}getWordIndex(e){return sf(this),ts.indexOf(e)}},Qd=new $d;hn.register(Qd);var xi={en:Qd};var of="hdnode/5.7.0";var ns=new E(of),Cx=F.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),Ix=ve("Bitcoin seed"),fr=2147483648;function df(n){return(1<=256)throw new Error("Depth too large!");return uf(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(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 a=new Uint8Array(37);if(e&fr){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(ya($n.sha512,this.chainCode,a)),r=i.slice(0,32),s=i.slice(32),o=null,l=null;this.privateKey?o=Po(F.from(r).add(this.privateKey).mod(Cx)):l=new cn(K(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 Ct(yr,o,l,this.fingerprint,Po(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=fr)throw new Error("invalid path index - "+r);a=a._derive(fr+s)}else if(r.match(/^[0-9]+$/)){let s=parseInt(r);if(s>=fr)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(ya($n.sha512,Ix,a));return new Ct(yr,Po(i.slice(0,32)),null,"0x00000000",Po(i.slice(32)),0,0,t)}static fromMnemonic(e,t,a){return a=Xd(a),e=bi(cr(e,a),a),Ct._fromSeed(Yd(e,t),{phrase:e,path:"m",locale:a.locale})}static fromSeed(e){return Ct._fromSeed(e,null)}static fromExtendedKey(e){let t=pa.decode(e);(t.length!==82||uf(t.slice(0,78))!==e)&&ns.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");let a=t[4],i=K(t.slice(5,9)),r=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(yr,null,K(o),i,s,r,a,null);case"0x0488ade4":case"0x04358394 ":if(o[0]!==0)break;return new Ct(yr,K(o.slice(1)),null,i,s,r,a,null)}return ns.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}};function Yd(n,e){e||(e="");let t=ve("mnemonic"+e,qt.NFKD);return hi(ve(n,qt.NFKD),t,2048,64,"sha512")}function cr(n,e){e=Xd(e),ns.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=df(s);if((j(Xt(a.slice(0,r/8)))[0]&o)!==(a[a.length-1]&o))throw new Error("invalid checksum");return K(a.slice(0,r/8))}function bi(n,e){if(e=Xd(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]&Sx(8-a)),a+=3);let i=n.length/4,r=j(Xt(n))[0]&df(i);return t[t.length-1]<<=i,t[t.length-1]|=r>>8-i,e.join(t.map(s=>e.getWord(s)))}function lf(n,e){try{return cr(n,e),!0}catch{}return!1}function pf(n){return(typeof n!="number"||n<0||n>=fr||n%1)&&ns.throwArgumentError("invalid account index","index",n),`m/44'/60'/${n}'/0/0`}var yf="random/5.7.0";var Zd=new E(yf);function Rx(){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 ff=Rx(),No=ff.crypto||ff.msCrypto;(!No||!No.getRandomValues)&&(Zd.warn("WARNING: Missing strong random number source"),No={getRandomValues:function(n){return Zd.throwError("no secure random source avaialble",E.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function Qn(n){(n<=0||n>1024||n%1||n!=n)&&Zd.throwArgumentError("invalid length","length",n);let e=new Uint8Array(n);return No.getRandomValues(e),j(e)}function as(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 nl=wn(tl());var Do="json-wallets/5.7.0";function ca(n){return typeof n=="string"&&n.substring(0,2)!=="0x"&&(n="0x"+n),j(n)}function mr(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 ma.default.Counter(x),J=new ma.default.ModeOfOperation.ctr(O,M),$=j(J.encrypt(i)),de=fe(ye([U,$])),T={address:n.address.substring(2).toLowerCase(),id:mf(I),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:K(x).substring(2)},ciphertext:K($).substring(2),kdf:"scrypt",kdfparams:{salt:K(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)),C=new Date,u=C.getUTCFullYear()+"-"+mr(C.getUTCMonth()+1,2)+"-"+mr(C.getUTCDate(),2)+"T"+mr(C.getUTCHours(),2)+"-"+mr(C.getUTCMinutes(),2)+"-"+mr(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:l,version:"0.1"}}return JSON.stringify(T)})}function kf(n,e,t){if(Oo(n)){t&&t(0);let a=il(n,e);return t&&t(1),Promise.resolve(a)}return Bo(n)?_f(n,e,t):Promise.reject(new Error("invalid JSON wallet"))}function Af(n,e){if(Oo(n))return il(n,e);if(Bo(n))return wf(n,e);throw new Error("invalid JSON wallet")}var Ef="wallet/5.7.0";var Mf=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},hr=new E(Ef);function Bx(n){return n!=null&&ae(n.privateKey,32)&&n.address!=null}function Fx(n){let e=n.mnemonic;return e&&e.phrase}var Cn=class extends Gt{constructor(e,t){if(super(),Bx(e)){let a=new cn(e.privateKey);if(B(this,"_signingKey",()=>a),B(this,"address",mn(this.publicKey)),this.address!==ce(e.address)&&hr.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),Fx(e)){let i=e.mnemonic;B(this,"_mnemonic",()=>({phrase:i.phrase,path:i.path||fa,locale:i.locale||"en"}));let r=this.mnemonic,s=Ct.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 a=new cn(e);B(this,"_signingKey",()=>a)}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 Ie(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 a=this._signingKey().signDigest(fe(Yr(t)));return Yr(t,a)})}signMessage(e){return Mf(this,void 0,void 0,function*(){return Br(this._signingKey().signDigest(Zi(e)))})}_signTypedData(e,t,a){return Mf(this,void 0,void 0,function*(){let i=yield bt.resolveNames(e,t,a,r=>(this.provider==null&&hr.throwError("cannot resolve ENS names without a provider",E.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,a){if(typeof t=="function"&&!a&&(a=t,t={}),a&&typeof a!="function")throw new Error("invalid callback");return t||(t={}),dl(this,e,t,a)}static createRandom(e){let t=Qn(16);e||(e={}),e.extraEntropy&&(t=j(Ce(fe(ye([t,e.extraEntropy])),0,16)));let a=bi(t,e.locale);return Cn.fromMnemonic(a,e.path,e.locale)}static fromEncryptedJson(e,t,a){return kf(e,t,a).then(i=>new Cn(i))}static fromEncryptedJsonSync(e,t){return new Cn(Af(e,t))}static fromMnemonic(e,t,a){return t||(t=fa),new Cn(Ct.fromMnemonic(e,null,a).derivePath(t))}};function Cf(n,e){return fi(Zi(n),e)}function If(n,e,t,a){return fi(bt.hash(n,e,t),a)}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:()=>wl,JsonRpcBatchProvider:()=>Yo,JsonRpcProvider:()=>Yt,JsonRpcSigner:()=>Tr,NodesmithProvider:()=>_s,PocketProvider:()=>ks,Provider:()=>$t,Resolver:()=>gr,StaticJsonRpcProvider:()=>cs,UrlJsonRpcProvider:()=>It,Web3Provider:()=>As,WebSocketProvider:()=>ba,getDefaultProvider:()=>Zo,getNetwork:()=>rs,isCommunityResourcable:()=>yl,isCommunityResource:()=>us,showThrottleMessage:()=>Xn});var Sf="networks/5.7.1";var Rf=new E(Sf);function Lx(n){return n&&typeof n.renetwork=="function"}function ha(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 ha(t)},e}function Uo(n,e){let t=function(a,i){return a.JsonRpcProvider?new a.JsonRpcProvider(n,e):null};return t.renetwork=function(a){return Uo(n,a)},t}var Pf={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:ha("homestead")},Nf={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:ha("ropsten")},Df={chainId:63,name:"classicMordor",_defaultProvider:Uo("https://www.ethercluster.com/mordor","classicMordor")},Lo={unspecified:{chainId:0,name:"unspecified"},homestead:Pf,mainnet:Pf,morden:{chainId:2,name:"morden"},ropsten:Nf,testnet:Nf,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:Uo("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:Df,classicTestnet:Df,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:Uo("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(n){if(n==null)return null;if(typeof n=="number"){for(let a in Lo){let i=Lo[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=Lo[n];return a==null?null:{name:a.name,chainId:a.chainId,ensAddress:a.ensAddress,_defaultProvider:a._defaultProvider||null}}let e=Lo[n.name];if(!e)return typeof n.chainId!="number"&&Rf.throwArgumentError("invalid network chainId","network",n),n;n.chainId!==0&&n.chainId!==e.chainId&&Rf.throwArgumentError("network chainId mismatch","network",n);let t=n._defaultProvider||null;return t==null&&e._defaultProvider&&(Lx(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 Of="web/5.7.1";var Ux=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})};function Bf(n,e){return Ux(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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},In=new E(Of);function Ff(n){return new Promise(e=>{setTimeout(e,n)})}function Na(n,e){if(n==null)return null;if(typeof n=="string")return n;if(na(n)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return Jt(n)}catch{}return K(n)}return n}function jx(n){return ve(n.replace(/%([0-9a-f][0-9a-f])/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))}function ll(n,e,t){let a=typeof n=="object"&&n.throttleLimit!=null?n.throttleLimit:12;In.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;In.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"},f=!1,x=2*60*1e3;if(typeof n=="string")l=n;else if(typeof n=="object"){if((n==null||n.url==null)&&In.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&&(f=!0);if(p.allowGzip=!!n.allowGzip,n.user!=null&&n.password!=null){l.substring(0,6)!=="https:"&&n.allowInsecureAuthentication!==!0&&In.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 "+Yi(ve(O))}}n.skipFetchSetup!=null&&(p.skipFetchSetup=!!n.skipFetchSetup),n.fetchOptions!=null&&(p.fetchOptions=we(n.fetchOptions))}let I=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),_=l?l.match(I):null;if(_)try{let O={statusCode:200,statusMessage:"OK",headers:{"content-type":_[1]||"text/plain"},body:_[2]?Xi(_[3]):jx(_[3])},U=O.body;return t&&(U=t(O.body,O)),Promise.resolve(U)}catch(O){In.throwError("processing response error",E.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(M,J){x&&(O=setTimeout(()=>{O!=null&&(O=null,J(In.makeError("timeout",E.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 Vx(this,void 0,void 0,function*(){for(let O=0;O=300)&&(S.cancel(),In.throwError("bad response",E.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 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){In.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 n=="string"?{url:n}:we(n);r.headers?Object.keys(r.headers).filter(o=>o.toLowerCase()==="content-type").length!==0||(r.headers=we(r.headers),r.headers["content-type"]="application/json"):r.headers={"content-type":"application/json"},n=r}return ll(n,i,a)}function Rn(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,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(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()&&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(f){s()&&a(f)})}p()})}var hl=wn(jf());var ke="providers/5.7.2";var os=new E(ke),Y=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),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(a),maxPriorityFeePerGas:Y.allowNull(a),maxFeePerGas:Y.allowNull(a),gasLimit:a,to:Y.allowNull(t,null),value:a,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(a),gasPrice:Y.allowNull(a),maxPriorityFeePerGas:Y.allowNull(a),maxFeePerGas:Y.allowNull(a),to:Y.allowNull(t),value:Y.allowNull(a),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:a,logsBloom:Y.allowNull(r),blockHash:s,transactionHash:s,logs:Y.arrayOf(this.receiptLog.bind(this)),blockNumber:l,confirmations:Y.allowNull(l,null),cumulativeGasUsed:a,effectiveGasPrice:Y.allowNull(a),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:a,gasUsed:a,miner:Y.allowNull(t),extraData:r,transactions:Y.allowNull(Y.arrayOf(s)),baseFeePerGas:Y.allowNull(a)},e.blockWithTransactions=we(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 a=this.hex(e,t);if(a.length%2!==0)throw new Error("invalid data; odd-length - "+e);return a}address(e){return ce(e)}callAddress(e){if(!ae(e,32))return null;let t=ce(Ce(e,12));return t===ao?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 a=this.hex(e,t);return Pt(a)!==32?os.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(!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 a=e._difficulty!=null?e._difficulty:e.difficulty,i=Y.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 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 a=e.chainId;ae(a)&&(a=F.from(a).toNumber()),t.chainId=a}else{let a=e.networkId;a==null&&t.v==null&&(a=e.chainId),ae(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 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 a=F.from(t.root).toNumber();a===0||a===1?(t.status!=null&&t.status!==a&&os.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=a,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 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 yl(n){return n&&typeof n.isCommunityResource=="function"}function us(n){return yl(n)&&n.isCommunityResource()}var Hf=!1;function Xn(){Hf||(Hf=!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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},he=new E(ke),$x=10;function qf(n){return n==null?"null":(Pt(n)!==32&&he.throwArgumentError("invalid topic","topic",n),n.toLowerCase())}function Gf(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[qf(i)]=!0});let a=Object.keys(t);return a.sort(),a.join("|")}else return qf(e)}).join("&")}function Qx(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 br(n){if(typeof n=="string"){if(n=n.toLowerCase(),Pt(n)===32)return"tx:"+n;if(n.indexOf(":")===-1)return n}else{if(Array.isArray(n))return"filter:*:"+Gf(n);if(mo.isForkEvent(n))throw he.warn("not implemented"),new Error("not implemented");if(n&&typeof n=="object")return"filter:"+(n.address||"*")+":"+Gf(n.topics||[])}throw new Error("invalid event - "+n)}function ds(){return new Date().getTime()}function zf(n){return new Promise(e=>{setTimeout(e,n)})}var Xx=["block","network","pending","poll"],xl=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=Qx(e[2]),i={};return a.length>0&&(i.topics=a),t&&t!=="*"&&(i.address=t),i}pollable(){return this.tag.indexOf(":")>=0||Xx.indexOf(this.tag)>=0}},Yx={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 fl(n){return me(F.from(n).toHexString(),32)}function Kf(n){return pa.encode(ye([n,Ce(Xt(Xt(n)),0,4)]))}var $f=new RegExp("^(ipfs)://(.*)$","i"),Wf=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),$f,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function qo(n,e){try{return Jt(ls(n,e))}catch{}return null}function ls(n,e){if(n==="0x")return null;let t=F.from(Ce(n,e,e+32)).toNumber(),a=F.from(Ce(n,t,t+32)).toNumber();return Ce(n,t+32,t+32+a)}function cl(n){return n.match(/^ipfs:\/\/ipfs\//i)?n=n.substring(12):n.match(/^ipfs:\/\//i)?n=n.substring(7):he.throwArgumentError("unsupported IPFS format","link",n),`https://gateway.ipfs.io/ipfs/${n}`}function Jf(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 Zx(n){if(n.length%32===0)return n;let e=new Uint8Array(Math.ceil(n.length/32)*32);return e.set(n),e}function Qf(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:_t([e,Ma(this.name),t||"0x"])},i=!1;(yield this.supportsWildcard())&&(i=!0,a.data=_t(["0x9061b923",Qf([Jr(this.name),a.data])]));try{let r=yield this.provider.call(a);return j(r).length%32===4&&he.throwError("resolver threw error",E.errors.CALL_EXCEPTION,{transaction:a,data:r}),i&&(r=ls(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?ls(a,0):null})}_getAddress(e,t){let a=Yx[String(e)];if(a==null&&he.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 Kf(ye([[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 Kf(ye([[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=hl.default.toWords(i.slice(2));return o.unshift(s),hl.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===$i?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",fl(e));if(t==null||t==="0x")return null;let a=this._getAddress(e,t);return a==null&&he.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 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([fl(64),fl(t.length),t]),t.length%32!==0&&(t=ye([t,me("0x",32-e.length%32)]));let a=yield this._fetchBytes("0x59d1d43c",K(t));return a==null||a==="0x"?null:Jt(a)})}},ml=null,e5=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",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 Rn(()=>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 rs(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 Sn({url:p,errorPassThrough:!0},f,(_,v)=>(_.status=v.statusCode,_));if(x.data)return x.data;let I=x.message||"unknown error";if(x.status>=400&&x.status<500)return he.throwError(`response not found during CCIP fetch: ${I}`,E.errors.SERVER_ERROR,{url:l,errorMessage:I});s.push(I)}return he.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(ds()-r.respTime<=e)return r.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}let t=ds(),a=Ie({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=ds();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=e5++,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)he.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${a})`),this.emit("error",he.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 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 zf(0),this._network;let a=he.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=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,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,f=function(){return p?!0:(p=!0,l.forEach(I=>{I()}),!1)},x=I=>{I.confirmations{this.removeListener(e,x)}),i){let I=i.startBlock,_=null,v=S=>ue(this,void 0,void 0,function*(){p||(yield zf(1e3),this.getTransactionCount(i.from).then(L=>ue(this,void 0,void 0,function*(){if(!p){if(L<=i.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),l.push(()=>{this.removeListener("block",v)})}if(typeof a=="number"&&a>0){let I=setTimeout(()=>{f()||o(he.makeError("timeout exceeded",E.errors.TIMEOUT,{timeout:a}))},a);I.unref&&I.unref(),l.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",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 Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getBalance",a);try{return F.from(i)}catch(r){return he.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 Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getTransactionCount",a);try{return F.from(i).toNumber()}catch(r){return he.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 Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getCode",a);try{return K(i)}catch(r){return he.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 Ie({address:this._getAddress(e),blockTag:this._getBlockTag(a),position:Promise.resolve(t).then(s=>Fn(s))}),r=yield this.perform("getStorageAt",i);try{return K(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,a){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.",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&&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=>K(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?K(r):null))}),this.formatter.transactionRequest(yield Ie(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 Ie(t))})}_call(e,t,a){return ue(this,void 0,void 0,function*(){a>=$x&&he.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"&&Pt(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(),f=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&&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 Rn(()=>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 Rn(()=>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 Ie({filter:this._getFilter(e)}),a=yield this.perform("getLogs",t);return a.forEach(i=>{i.removed==null&&(i.removed=!1)}),Y.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&&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 a=yield this._getResolver(t,"getResolver");if(a!=null){let i=new gr(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||he.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"+Ma(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(ae(e))throw a}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",a=yield this._getResolver(t,"lookupAddress");if(a==null)return null;let i=qo(yield this.call({to:a,data:"0x691f3431"+Ma(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!==E.errors.CALL_EXCEPTION)throw o}try{let o=qo(yield this.call({to:s,data:"0x691f3431"+Ma(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 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,a){let i=new xl(br(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=br(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=br(e);return this._events.filter(a=>a.tag===t).length}listeners(e){if(e==null)return this._events.map(a=>a.listener);let t=br(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=br(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=br(e);this._events=this._events.filter(i=>i.tag!==a?!0:(t.push(i),!1))}return t.forEach(a=>{this._stopEvent(a)}),this}};var xa=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},At=new E(ke),t5=["call","estimateGas"];function ys(n,e){if(n==null)return null;if(typeof n.message=="string"&&n.message.match("reverted")){let t=ae(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=ys(n[t],e);if(a)return a}return null}if(typeof n=="string")try{return ys(JSON.parse(n),e)}catch{}return null}function Yf(n,e,t){let a=t.transaction||t.signedTransaction;if(n==="call"){let r=ys(e,!0);if(r)return r.data;At.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=ys(e.body,!1);r==null&&(r=ys(e,!1)),r&&At.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)&&At.throwError("insufficient funds for intrinsic transaction cost",E.errors.INSUFFICIENT_FUNDS,{error:e,method:n,transaction:a}),i.match(/nonce (is )?too low/i)&&At.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)&&At.throwError("replacement fee too low",E.errors.REPLACEMENT_UNDERPRICED,{error:e,method:n,transaction:a}),i.match(/only replay-protected/i)&&At.throwError("legacy pre-eip-155 transactions not supported",E.errors.UNSUPPORTED_OPERATION,{error:e,method:n,transaction:a}),t5.indexOf(n)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&At.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 Xf(n){return new Promise(function(e){setTimeout(e,n)})}function n5(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 ps(n){return n&&n.toLowerCase()}var bl={},Tr=class extends Gt{constructor(e,t,a){if(super(),e!==bl)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)):At.throwArgumentError("invalid address or index","addressOrIndex",a)}connect(e){return At.throwError("cannot alter JSON-RPC Signer connection",E.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new gl(bl,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&&At.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(a=>(a&&(a=a.toLowerCase()),a));if(e.gasLimit==null){let a=we(e);a.from=t,e.gasLimit=this.provider.estimateGas(a)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(a=>xa(this,void 0,void 0,function*(){if(a==null)return null;let i=yield this.provider.resolveName(a);return i==null&&At.throwArgumentError("provided ENS name resolves to null","tx.to",a),i}))),Ie({tx:Ie(e),sender:t}).then(({tx:a,sender:i})=>{a.from!=null?a.from.toLowerCase()!==i&&At.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)&&At.throwError("user rejected transaction",E.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:a}),Yf("sendTransaction",s,r)))})}signTransaction(e){return At.throwError("signing transactions is unsupported",E.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),a=yield this.sendUncheckedTransaction(e);try{return yield Rn(()=>xa(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 xa(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(e):e,a=yield this.getAddress();try{return yield this.provider.send("personal_sign",[K(t),a.toLowerCase()])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&At.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"signMessage",from:a,messageData:e}),i}})}_legacySignMessage(e){return xa(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(e):e,a=yield this.getAddress();try{return yield this.provider.send("eth_sign",[a.toLowerCase(),K(t)])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&At.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:a,messageData:e}),i}})}_signTypedData(e,t,a){return xa(this,void 0,void 0,function*(){let i=yield bt.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(bt.getPayload(i.domain,t,i.value))])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&At.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 xa(this,void 0,void 0,function*(){let t=this.provider,a=yield this.getAddress();return t.send("personal_unlockAccount",[a.toLowerCase(),e,null])})}},gl=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:a=>this.provider.waitForTransaction(t,a)}))}},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 Yn{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=ht(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 xa(this,void 0,void 0,function*(){yield Xf(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(a){return At.throwError("could not detect network",E.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:a})}}return At.throwError("could not detect network",E.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new Tr(bl,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:mt(a),provider:this});let i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];let r=Sn(this.connection,JSON.stringify(a),n5).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",[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 a=ht(this.constructor,"hexlifyTransaction");return["eth_call",[a(t.transaction,{from:!0}),t.blockTag]]}case"estimateGas":{let a=ht(this.constructor,"hexlifyTransaction");return["eth_estimateGas",[a(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=we(t),t.transaction=we(i),delete t.transaction.type)}}let a=this.prepareRequest(e,t);a==null&&At.throwError(e+" not implemented",E.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(a[0],a[1])}catch(i){return Yf(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 Xf(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=we(a5);if(t)for(let r in t)t[r]&&(a[r]=!0);Gi(e,a);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]=K(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 E(ke);vr=function(){e.throwError("WebSockets not supported in this environment",E.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var Tl=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Go=new E(ke),i5=1,ba=class extends Yt{constructor(e,t){t==="any"&&Go.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 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 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){Go.throwError("cannot reset events block on WebSocketProvider",E.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(e){Go.throwError("cannot set polling interval on WebSocketProvider",E.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return Tl(this,void 0,void 0,function*(){return null})}set polling(e){!e||Go.throwError("cannot set polling on WebSocketProvider",E.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(e,t){let a=i5++;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 Tl(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 Tl(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 r5=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},fs=new E(ke),cs=class extends Yt{detectNetwork(){let e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return r5(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",E.errors.UNKNOWN_ERROR,{}),this._network==null&&(B(this,"_network",t),this.emit("network",t,null))),t})}},It=class extends cs{constructor(e,t){fs.checkAbstract(new.target,It),e=ht(new.target,"getNetwork")(e),t=ht(new.target,"getApiKey")(t);let a=ht(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(){fs.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(e){return fs.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 fs.throwError("not implemented; sub-classes must override getUrl",E.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}};var Zf=new E(ke),zo="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC",ms=class extends ba{constructor(e,t){let a=new wr(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===zo}},wr=class extends It{static getWebSocketProvider(e,t){return new ms(e,t)}static getApiKey(e){return e==null?zo:(e&&typeof e!="string"&&Zf.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:Zf.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+a+t,throttleCallback:(i,r)=>(t===zo&&Xn(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===zo}};var s5=new E(ke),Ko="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function o5(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 s5.throwArgumentError("unsupported network","name",n)}var hs=class extends It{isCommunityResource(){return this.apiKey===Ko}static getApiKey(e){return e??Ko}static getUrl(e,t){t==null&&(t=Ko);let a={allowGzip:!0,url:"https://"+o5(e.name)+t,throttleCallback:(i,r)=>(t.apiKey===Ko&&Xn(),Promise.resolve(!0))};return t.projectSecret!=null&&(a.user="",a.password=t.projectSecret),a}};var u5=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},ec=new E(ke),xs=class extends It{static getApiKey(e){return e!=null&&ec.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:ec.throwArgumentError("unsupported network","network",arguments[0])}return a}perform(e,t){let a=Object.create(null,{perform:{get:()=>super.perform}});return u5(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 Wo=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Da=new E(ke);function tc(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=Fn(K(a)):t==="accessList"?a="["+sn(a).map(i=>`{address:"${i.address}",storageKeys:["${i.storageKeys.join('","')}"]}`).join(",")+"]":a=K(a),e[t]=a)}return e}function d5(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 nc(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 ac(n){if(n==="pending")throw new Error("pending not supported");return n==="latest"?n:parseInt(n.substring(2),16)}function vl(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,"")),ae(r))return r;Da.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/)&&Da.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/)&&Da.throwError("nonce has already been used",E.errors.NONCE_EXPIRED,{error:e,method:n,transaction:t}),a.match(/another transaction with same nonce/)&&Da.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/)&&Da.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 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 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 Wo(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"?nc:d5;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 Sn(o,l,s||nc);return this.emit("debug",{action:"response",request:i,response:mt(p),provider:this}),p})}detectNetwork(){return Wo(this,void 0,void 0,function*(){return this.network})}perform(e,t){let a=Object.create(null,{perform:{get:()=>super.perform}});return Wo(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=>vl("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=tc(t.transaction);i.module="proxy",i.action="eth_call";try{return yield this.fetch("proxy",i,!0)}catch(r){return vl("call",r,t.transaction)}}case"estimateGas":{let i=tc(t.transaction);i.module="proxy",i.action="eth_estimateGas";try{return yield this.fetch("proxy",i,!0)}catch(r){return vl("estimateGas",r,t.transaction)}}case"getLogs":{let i={action:"getLogs"};if(t.filter.fromBlock&&(i.fromBlock=ac(t.filter.fromBlock)),t.filter.toBlock&&(i.toBlock=ac(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",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)&&Da.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 Qo=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},gi=new E(ke);function Jo(){return new Date().getTime()}function ic(n){let e=null;for(let t=0;te?null:(a+i)/2}function _r(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=>_r(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=_r(a),JSON.stringify(t)+":"+a}).join(",")+"}"}throw new Error("unknown value type: "+typeof n)}var l5=1;function sc(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 p5=[E.errors.CALL_EXCEPTION,E.errors.INSUFFICIENT_FUNDS,E.errors.NONCE_EXPIRED,E.errors.REPLACEMENT_UNDERPRICED,E.errors.UNPREDICTABLE_GAS_LIMIT],y5=["address","args","errorArgs","errorSignature","method","transaction"];function $o(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 f5(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 c5(n,e,t){let a=_r;switch(e){case"getBlockNumber":return function(i){let r=i.map(o=>o.result),s=rc(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 rc(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=we(i),i.confirmations=-1,_r(i))};break;case"getBlock":t.includeTransactions?a=function(i){return i==null?null:(i=we(i),i.transactions=i.transactions.map(r=>(r=we(r),r.confirmations=-1,r)),_r(i))}:a=function(i){return i==null?null:_r(i)};break;default:throw new Error("unknown method: "+e)}return f5(a,n.quorum)}function gs(n,e){return Qo(this,void 0,void 0,function*(){let t=n.provider;return t.blockNumber!=null&&t.blockNumber>=e||e===-1?t:Rn(()=>new Promise((a,i)=>{setTimeout(function(){return t.blockNumber>=e?a(t):n.cancelled?a(null):a(void 0)},0)}),{oncePoll:t})})}function m5(n,e,t,a){return Qo(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&&ae(a.blockTag)&&(i=yield gs(n,e)),i[t](a.address,a.blockTag||"latest");case"getStorageAt":return a.blockTag&&ae(a.blockTag)&&(i=yield gs(n,e)),i.getStorageAt(a.address,a.position,a.blockTag||"latest");case"getBlock":return a.blockTag&&ae(a.blockTag)&&(i=yield gs(n,e)),i[a.includeTransactions?"getBlockWithTransactions":"getBlock"](a.blockTag||a.blockHash);case"call":case"estimateGas":return a.blockTag&&ae(a.blockTag)&&(i=yield gs(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&&ae(r.fromBlock)||r.toBlock&&ae(r.toBlock))&&(i=yield gs(n,e)),i.getLogs(r)}}return gi.throwError("unknown method error",E.errors.UNKNOWN_ERROR,{method:t,params:a})})}var Ts=class extends Yn{constructor(e,t){e.length===0&&gi.throwArgumentError("missing providers","providers",e);let a=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=we(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=a.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=ic(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 Qo(this,void 0,void 0,function*(){let e=yield Promise.all(this.providerConfigs.map(t=>t.provider.getNetwork()));return ic(e)})}perform(e,t){return Qo(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=Jo(),p=i.filter(_=>_.runner&&l-_.start<_.stallTimeout).reduce((_,v)=>_+v.weight,0);for(;p{_.staller=null}),_.runner=m5(_,r,e,t).then(S=>{_.done=!0,_.result=S,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:$o(_,Jo()),request:{method:e,params:mt(t)},provider:this})},S=>{_.done=!0,_.error=S,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:$o(_,Jo()),request:{method:e,params:mt(t)},provider:this})}),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:$o(_,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 _=a(x);if(_!==void 0)return i.forEach(v=>{v.staller&&v.staller.cancel(),v.cancelled=!0}),_;o||(yield sc(100).getPromise()),o=!1}let I=i.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={};y5.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=>$o(l)),provider:this})})}};var wl=null;var Xo=new E(ke),vs="84842078b09946638c03157f83405213",ws=class extends ba{constructor(e,t){let a=new kr(e,t),i=a.connection;i.password&&Xo.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===vs}},kr=class extends It{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?(Xo.assertArgument(typeof e.projectId=="string","projectSecret requires a projectId","projectId",e.projectId),Xo.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:Xo.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===vs&&Xn(),Promise.resolve(!0))};return t.projectSecret!=null&&(i.user="",i.password=t.projectSecret),i}isCommunityResource(){return this.projectId===vs}};var Yo=class extends Yt{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:mt(o),provider:this}),Sn(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 I=new Error(x.error.message);I.code=x.error.code,I.data=x.error.data,p.reject(I)}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 _l=new E(ke),h5="ETHERS_JS_SHARED",_s=class extends It{static getApiKey(e){return e&&typeof e!="string"&&_l.throwArgumentError("invalid apiKey","apiKey",e),e||h5}static getUrl(e,t){_l.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:_l.throwArgumentError("unsupported network","network",arguments[0])}return a+"?apiKey="+t}};var oc=new E(ke),uc="62e1ad51b37b8e00394bda3b",ks=class extends It{static getApiKey(e){let t={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return e==null?t.applicationId=uc:typeof e=="string"?t.applicationId=e:e.applicationSecretKey!=null?(t.applicationId=e.applicationId,t.applicationSecretKey=e.applicationSecretKey):e.applicationId?t.applicationId=e.applicationId:oc.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:oc.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===uc}};var dc=new E(ke),x5=1;function lc(n,e){let t="Web3LegacyFetcher";return function(a,i){let r={method:a,params:i,id:x5++,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 b5(n){return function(e,t){t==null&&(t=[]);let a={method:e,params:t};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:mt(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 As=class extends Yt{constructor(e,t){e==null&&dc.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=b5(e)):e.sendAsync?i=lc(e,e.sendAsync.bind(e)):e.send?i=lc(e,e.send.bind(e)):dc.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 pc=new E(ke);function Zo(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 Yt(n);case"ws":case"wss":return new ba(n);default:pc.throwArgumentError("unsupported URL scheme","network",n)}}let t=rs(n);return(!t||!t._defaultProvider)&&pc.throwError("unsupported getDefaultProvider network",E.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:n}),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:()=>jt,FormatTypes:()=>ge,Fragment:()=>Ht,FunctionFragment:()=>Dt,HDNode:()=>Ct,Indexed:()=>sa,Interface:()=>Ca,LogDescription:()=>er,Logger:()=>E,ParamType:()=>pt,RLP:()=>$s,SigningKey:()=>cn,SupportedAlgorithm:()=>$n,TransactionDescription:()=>tr,TransactionTypes:()=>Ao,UnicodeNormalizationForm:()=>qt,Utf8ErrorFuncs:()=>uo,Utf8ErrorReason:()=>Ot,_TypedDataEncoder:()=>bt,_fetchData:()=>ll,_toEscapedUtf8String:()=>md,accessListify:()=>sn,arrayify:()=>j,base58:()=>pa,base64:()=>vd,checkProperties:()=>Gi,checkResultErrors:()=>Ki,commify:()=>gc,computeAddress:()=>mn,computeHmac:()=>ya,computePublicKey:()=>Xr,concat:()=>ye,deepCopy:()=>mt,defaultAbiCoder:()=>Kr,defaultPath:()=>fa,defineReadOnly:()=>B,dnsEncode:()=>Jr,entropyToMnemonic:()=>bi,fetchJson:()=>Sn,formatBytes32String:()=>hd,formatEther:()=>Tc,formatUnits:()=>kl,getAccountPath:()=>pf,getAddress:()=>ce,getContractAddress:()=>di,getCreate2Address:()=>ky,getIcapAddress:()=>_y,getJsonWalletAddress:()=>rl,getStatic:()=>ht,hashMessage:()=>Zi,hexConcat:()=>_t,hexDataLength:()=>Pt,hexDataSlice:()=>Ce,hexStripZeros:()=>id,hexValue:()=>Fn,hexZeroPad:()=>me,hexlify:()=>K,id:()=>nn,isAddress:()=>wy,isBytes:()=>on,isBytesLike:()=>na,isHexString:()=>ae,isValidMnemonic:()=>lf,isValidName:()=>_d,joinSignature:()=>Br,keccak256:()=>fe,mnemonicToEntropy:()=>cr,mnemonicToSeed:()=>Yd,namehash:()=>Ma,nameprep:()=>Td,parseBytes32String:()=>xd,parseEther:()=>vc,parseTransaction:()=>Eo,parseUnits:()=>Al,poll:()=>Rn,randomBytes:()=>Qn,recoverAddress:()=>fi,recoverPublicKey:()=>ko,resolveProperties:()=>Ie,ripemd160:()=>es,serializeTransaction:()=>Yr,sha256:()=>Xt,sha512:()=>Jd,shallowCopy:()=>we,shuffled:()=>as,solidityKeccak256:()=>cc,solidityPack:()=>eu,soliditySha256:()=>mc,splitSignature:()=>Ln,stripZeros:()=>Zt,toUtf8Bytes:()=>ve,toUtf8CodePoints:()=>Ea,toUtf8String:()=>Jt,verifyMessage:()=>Cf,verifyTypedData:()=>If,zeroPad:()=>ri});var yc="solidity/5.7.0";var g5=new RegExp("^bytes([0-9]+)$"),T5=new RegExp("^(u?int)([0-9]*)$"),v5=new RegExp("^(.*)\\[([0-9]*)\\]$"),w5="0000000000000000000000000000000000000000000000000000000000000000",Ar=new E(yc);function fc(n,e,t){switch(n){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 a=n.match(T5);if(a){let i=parseInt(a[2]||"256");return(a[2]&&String(i)!==a[2]||i%8!==0||i===0||i>256)&&Ar.throwArgumentError("invalid number type","type",n),t&&(i=256),e=F.from(e).toTwos(i),ri(e,i/8)}if(a=n.match(g5),a){let i=parseInt(a[1]);return(String(i)!==a[1]||i===0||i>32)&&Ar.throwArgumentError("invalid bytes type","type",n),j(e).byteLength!==i&&Ar.throwArgumentError(`invalid value for ${n}`,"value",e),t?j((e+w5).substring(0,66)):e}if(a=n.match(v5),a&&Array.isArray(e)){let i=a[1];parseInt(a[2]||String(e.length))!=e.length&&Ar.throwArgumentError(`invalid array length for ${n}`,"value",e);let s=[];return e.forEach(function(o){s.push(fc(i,o,!0))}),ye(s)}return Ar.throwArgumentError("invalid type","type",n)}function eu(n,e){n.length!=e.length&&Ar.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);let t=[];return n.forEach(function(a,i){t.push(fc(a,e[i]))}),K(ye(t))}function cc(n,e){return fe(eu(n,e))}function mc(n,e){return Xt(eu(n,e))}var hc="units/5.7.0";var xc=new E(hc),bc=["wei","kwei","mwei","gwei","szabo","finney","ether"];function gc(n){let e=String(n).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||n==="."||n==="-.")&&xc.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 kl(n,e){if(typeof e=="string"){let t=bc.indexOf(e);t!==-1&&(e=3*t)}return qi(n,e??18)}function Al(n,e){if(typeof n!="string"&&xc.throwArgumentError("value must be a string","value",n),typeof e=="string"){let t=bc.indexOf(e);t!==-1&&(e=3*t)}return dn(n,e??18)}function Tc(n){return kl(n,18)}function vc(n){return Al(n,18)}var tu="ethers/5.7.2";var wc=new E(tu);try{let n=window;n._ethers==null&&(n._ethers=El)}catch{}var ga;(function(n){n.Mainnet="Mainnet",n.Custom="Custom",n.Gnosis="Xdai",n.Goerli="Goerli",n.Xdai="Xdai",n.XdaiQa="XdaiQa",n.ArbitrumOne="ArbitrumOne",n.ArbitrumSepolia="ArbitrumSepolia"})(ga||(ga={}));var _c;(function(n){n[n.Custom=0]="Custom",n[n.Mainnet=1]="Mainnet",n[n.Goerli=5]="Goerli",n[n.Gnosis=100]="Gnosis",n[n.Xdai=100]="Xdai",n[n.XdaiQa=100]="XdaiQa",n[n.ArbitrumSepolia=421614]="ArbitrumSepolia",n[n.ArbitrumOne=42161]="ArbitrumOne"})(_c||(_c={}));var Ml;(function(n){n.Mainnet="0x5346D0f80e2816FaD329F2c140c870ffc3c3E2Ef",n.Goerli="0x79073fc2117dD054FCEdaCad1E7018C9CbE3ec0B",n.Xdai="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.XdaiQa="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.Custom="",n.ArbitrumOne="0xcccccdcc0ccf6c708d860e19353c5f9a49accccc",n.ArbitrumSepolia="0x7777494e3d8cce0D3570E21FEf820F9Fee077777"})(Ml||(Ml={}));var Es;(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",n.ArbitrumOne="https://app.colony.io/reputation/arbitrum-one",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/reputation/arbitrum-sepolia"})(Es||(Es={}));var Cl;(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="",n.ArbitrumOne="https://app.colony.io/metatransaction/arbitrum-one",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/metatransaction/arbitrum-sepolia"})(Cl||(Cl={}));var Ms;(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="",n.ArbitrumOne="https://app.colony.io/public-rpc/",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/public-rpc/"})(Ms||(Ms={}));var Il;(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",n.ArbitrumOne=".colony.joincolony.arbitrum",n.ArbitrumSepolia=".colony.joincolony.sepolia"})(Il||(Il={}));var Sl;(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",n.ArbitrumOne=".user.joincolony.arbitrum",n.ArbitrumSepolia=".user.joincolony.sepolia"})(Sl||(Sl={}));var Rl;(function(n){let e;(function(i){i.ETH="0x0000000000000000000000000000000000000000",i.CLNY="0x3E828ac5C480069D4765654Fb4b8733b910b13b2",i.USDC="0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"})(e=n.Mainnet||(n.Mainnet={}));let t;(function(i){i.XDAI="0x0000000000000000000000000000000000000000",i.CLNY="0xc9B6218AffE8Aba68a13899Cbf7cF7f14DDd304C",i.USDC="0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83"})(t=n.Gnosis||(n.Gnosis={}));let a;(function(i){i.ETH="0x0000000000000000000000000000000000000000",i.CLNY="0xcccccdcc0ccf6c708d860e19353c5f9a49accccc",i.USDC="0xaf88d065e77c8cC2239327C5EDb3A432268e5831"})(a=n.ArbitrumOne||(n.ArbitrumOne={}))})(Rl||(Rl={}));var _e;(function(n){n[n.RootDomain=1]="RootDomain",n[n.RootTeam=1]="RootTeam",n[n.RootPot=1]="RootPot",n[n.SkillIgnore=0]="SkillIgnore"})(_e||(_e={}));var zt;(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"})(zt||(zt={}));var Nl="0x12345678",Pl;(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"})(Pl||(Pl={}));var vt;(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"})(vt||(vt={}));var Ae;(function(n){n.FundingQueue="FundingQueue",n.IVotingReputation="IVotingReputation",n.MultisigPermissions="MultisigPermissions",n.OneTxPayment="OneTxPayment",n.ReputationBootstrapper="ReputationBootstrapper",n.StagedExpenditure="StagedExpenditure",n.StakedExpenditure="StakedExpenditure",n.StreamingPayments="StreamingPayments",n.TokenSupplier="TokenSupplier",n.VotingReputation="VotingReputation"})(Ae||(Ae={}));var Dl=[{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(Dl)}static connect(e,t){return new oe(e,Dl,t)}};xe(Ti,"abi",Dl);var Ol=[{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"}],vi=class{static createInterface(){return new te.Interface(Ol)}static connect(e,t){return new oe(e,Ol,t)}};xe(vi,"abi",Ol);var kc=(n,e)=>{throw new Error(`${e}: ${n}`)},Oa=n=>n!=null;var{keccak256:k5,toUtf8Bytes:A5}=te,{MaxUint256:E5}=yt,Bl=(n,e)=>n.toLowerCase()===e.toLowerCase(),Fl=n=>te.formatEther(n);var Ll=n=>{let e=n.reduce((t,a)=>t|1<{let e=F.from(n);return[...Array(vt.LAST_ROLE).keys()].map(t=>e.shr(t).mask(1).eq(1)?t:null).filter(Oa)},wi=async(n,e,t,a)=>{if(F.from(t).eq(F.from(a)))return E5;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)},Ba=n=>k5(A5(n));var Er=async(n,e)=>(await vi.connect(n,e).version()).toNumber(),Ul=(n,e)=>n.map(t=>{try{return e.parseLog(t)}catch{return null}}).filter(Oa);var{hexDataSlice:Vl}=te,{MaxUint256:M5}=yt,Ac=n=>{let e=Vl(n,0,3),t=F.from(Vl(n,4,35)),a=F.from(Vl(n,36,67));return{sig:e,permissionDomainId:t,childSkillIndex:a}},Ec=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),M5,r];let o=F.from(_e.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 wi(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]},C5=async(n,e,t,a,i)=>{let r=await Promise.all(a.map(s=>Ec(n,e,t,s,i)));for(let s=0;sArray.isArray(a)?a.length===1?ea(n,e,t,a[0],i):C5(n,e,t,a,i):Ec(n,e,t,a,i);var{MaxUint256:Mc}=yt,{AddressZero:I5}=yt;async function S5(n,e){let t;try{return t=await n.getCapabilityRoles(te.hexZeroPad(e,4)),nu(t)}catch{return[]}}async function Cs(n,e,t,a,i,r,s){let o,{skillId:l}=await e.getDomain(i),{sig:p,permissionDomainId:f,childSkillIndex:x}=Ac(s),I=Ti.connect(r,a.signer||a.provider),_=await S5(I,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 ${_e.RootDomain}`);o=Mc}else{let{skillId:U}=await e.getDomain(f),H=await n.getChildSkillId(U,x);if(H.eq(l))o=Mc;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,I5);return{actionCid:o,key:v,value:S,branchMask:L,siblings:O}}var{AddressZero:R5}=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,a){this.colony=t,this.network=e;let i=a?.network||ga.ArbitrumOne;this.endpointUrl=a?.customEndpointUrl||Es[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 ta.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 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 a=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${a}/${i}`;return ta.fetchReputation(r)}async getTotalReputation(e,t){let a=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${a}/${i}/${R5}/noProof`,s=await ta.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 Et=n=>Array.from(Array(n-1)).map((e,t)=>t+1);var Cc=10,uk=Et(Cc),Ic={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Sc=Cc-1;var Rc=3,pk=Et(Rc),Pc={1:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],2:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]},Nc=Rc-1;var Dc=10,ck=Et(Dc),Oc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Bc=Dc-1;var Fc=7,xk=Et(Fc),Lc={1:[],2:[],3:[],4:[],5:[],6:[]},Uc=Fc-1;var Vc=8,Tk=Et(Vc),jc={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3],6:[1,2,3],7:[1,2,3]},Hc=Vc-1;var qc=5,_k=Et(qc),Gc={1:[1,2,3,4,5,6,7,8,9,10,11,12,13],2:[1,2,3,4,5,6,7,8,9,10,11,12,13],3:[1,2,3,4,5,6,7,8,9,10,11,12,13],4:[1,2,3,4,5,6,7,8,9,10,11,12,13]},zc=qc-1;var Kc=7,Ek=Et(Kc),Wc={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3],6:[1,2,3]},Jc=Kc-1;var $c=10,Ik=Et($c),Qc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Xc=$c-1;var Yc=14,Pk=Et(Yc),jl={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],11:[1,2,3,4,5,6],12:[1,2,3,4,5,6],13:[1,2,3,4,5,6]},Hl=Yc-1;var Zc=18,P5=Et(Zc),Ok=Zc-1;var N5=(n,e)=>{switch(n){case Ae.FundingQueue:return Ic[e];case Ae.IVotingReputation:return jl[e];case Ae.MultisigPermissions:return Pc[e];case Ae.OneTxPayment:return Oc[e];case Ae.ReputationBootstrapper:return Lc[e];case Ae.StagedExpenditure:return Gc[e];case Ae.StakedExpenditure:return jc[e];case Ae.StreamingPayments:return Wc[e];case Ae.TokenSupplier:return Qc[e];case Ae.VotingReputation:return jl[e];default:return kc(n,"Could not find extension with name")}},_i=(n,e,t)=>{let a=N5(n,e);return!!a&&!a.includes(t)};var D5={[Ae.FundingQueue]:Sc,[Ae.IVotingReputation]:Hl,[Ae.MultisigPermissions]:Nc,[Ae.OneTxPayment]:Bc,[Ae.ReputationBootstrapper]:Uc,[Ae.StagedExpenditure]:zc,[Ae.StakedExpenditure]:Hc,[Ae.StreamingPayments]:Jc,[Ae.TokenSupplier]:Xc,[Ae.VotingReputation]:Hl};var v6=wn(em(),1);var lp=wn(b6(),1);var Re;(function(n){n.DEFAULT="default",n.Annotation="annotation",n.Colony="colony",n.Decision="decision",n.Domain="domain",n.Misc="misc"})(Re||(Re={}));var dp=2,up;(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"})(up||(up={}));var g6=n=>`Validation error(s): ${n.map(t=>`Error in ${t.path}. Seen: ${t.value}, expected: ${t.expected}`).join(` -`)}`,Jb=n=>({...n,isWhitelistActivated:n.isWhitelistActivated||!1,colonySafes:n.colonySafes||[],colonyTokens:n.colonyTokens||[],verifiedAddresses:n.verifiedAddresses||[]}),yp=(n,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&&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"?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=pp.default.validate.report(s);r(i)===!1&&((p,f,x=!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}))&&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"?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: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}})(n);if(t.success){if(t.data.version!==lp)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 a=T6(t.errors);throw new Error(a)};var v6=(n,e)=>{let t=n===Re.Colony?Jb(e):e,a=(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&&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"?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=pp.default.validate.report(s);r(i)===!1&&((p,f,x=!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}))&&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"?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: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}})({name:n,data:t,version:lp});if(!a.success){let i=T6(a.errors);throw new Error(i)}return a.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.")}},cp=fp;var mp=(0,w6.default)(fetch,{headers:{Accept:"application/json"},retryOn:[404,503],retries:3,retryDelay:5e3}),Os={[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]:""},La=class{adapter;constructor(e){this.adapter=e||new cp}static eventSupportsMetadata(e){return!!Object.keys(Os).includes(e)}async getMetadata(e,t){let a=this.adapter.getIpfsUrl(e),r=await(await mp(a)).json();return yp(r,t)}async getMetadataForEvent(e,t){let a=this.adapter.getIpfsUrl(t),r=await(await mp(a)).json(),s=Object.entries(Os).find(([,l])=>l===e);if(!s)throw new Error(`Not a valid MetadataEvent: ${e}`);let o=s[0];return yp(r,o)}async getRawMetadata(e){let t=this.adapter.getIpfsUrl(e),a=await mp(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=v6(e,t),i=JSON.stringify(a);return this.adapter.uploadJson(i)}};var sE=typeof global<"u"&&global.process?global.process.env.COLONY_IPFS_PINATA_TOKEN:void 0;var hp=async(n,e)=>{let t=await n;return e.send("eth_getLogs",[t])},Bs=n=>n!=null;var Ua=class{ipfs;provider;constructor(e,t){this.ipfs=new La(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 hp(e,this.provider)).map(a=>{let{eventSource:i,eventName:r}=e,s=i.interface.decodeEventLog(r,a.data,a.topics);return La.eventSupportsMetadata(r)?{...e,data:s,transactionHash:a.transactionHash,getMetadata:async()=>await this.ipfs.getMetadataForEvent(r,s.metadata)}:{...e,transactionHash:a.transactionHash,data:s}}).filter(Bs)}async getMultiEvents(e,t={}){let a=[].concat(e),i=Array.from(new Set(a.flatMap(({address:o})=>o))).filter(Bs),r=Array.from(new Set(a.flatMap(({colonyTopics:o})=>o.map(({topic:l})=>l))));return(await hp({address:i.length?i:void 0,fromBlock:t.fromBlock,toBlock:t.toBlock,topics:[r]},this.provider)).map(o=>{let l=Ua.extractSingleTopic(o),p=a.find(({address:S,colonyTopics:L})=>S&&!Fl(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:I}=f,_=x.interface.decodeEventLog(I,o.data,o.topics),v={address:o.address,eventSource:x,topics:o.topics,eventName:I,data:_,transactionHash:o.transactionHash};return La.eventSupportsMetadata(I)?{...v,getMetadata:async()=>await this.ipfs.getMetadataForEvent(I,_.metadata)}:v}).filter(Bs)}createFilter(e,t,a,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:a,fromBlock:r.fromBlock,toBlock:r.toBlock}}createMultiFilter(e,t,a){let i=t.map(r=>{let s=this.createFilter(e,r,a),o=Ua.extractSingleTopic(s);return o?{topic:o,eventName:r,eventSource:s.eventSource}:null}).filter(Bs);return{address:a,colonyTopics:i}}};var xp=[{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"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{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"}],Sr=class{static createInterface(){return new te.Interface(xp)}static connect(e,t){return new oe(e,xp,t)}};xe(Sr,"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"}],Tn=class{static createInterface(){return new te.Interface(bp)}static connect(e,t){return new oe(e,bp,t)}};xe(Tn,"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"},{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(gp)}static connect(e,t){return new oe(e,gp,t)}};xe(vn,"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:"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(Tp)}static connect(e,t){return new oe(e,Tp,t)}};xe(Ci,"abi",Tp);var Bu=[{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:"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:"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:[{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:"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:"returnData",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",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:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],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:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"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:[],name:"unlock",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"}],_6="0x60c060405234801561001057600080fd5b5060405161205738038061205783398101604081905261002f91610307565b60008060018161003d6101ab565b6001600160a01b031681526020810191909152604001600090812091909155556100656101ab565b600480546001600160a01b0319166001600160a01b039290921691909117905561008d6101ab565b6001600160a01b03167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a260066100ce8482610413565b5060056100db8382610413565b5060ff81166080526007805460ff1916600117905560405146907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f90610123906006906104d1565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051601f19818403018152919052805160209091012060a0525061054692505050565b60003633301480156101be575060348110155b1561024757600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e881146102365733935050505090565b5001516001600160a01b0316919050565b3391505090565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261027557600080fd5b81516001600160401b0381111561028e5761028e61024e565b604051601f8201601f19908116603f011681016001600160401b03811182821017156102bc576102bc61024e565b6040528181528382016020018510156102d457600080fd5b60005b828110156102f3576020818601810151838301820152016102d7565b506000918101602001919091529392505050565b60008060006060848603121561031c57600080fd5b83516001600160401b0381111561033257600080fd5b61033e86828701610264565b602086015190945090506001600160401b0381111561035c57600080fd5b61036886828701610264565b925050604084015160ff8116811461037f57600080fd5b809150509250925092565b600181811c9082168061039e57607f821691505b6020821081036103be57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561040e57806000526020600020601f840160051c810160208510156103eb5750805b601f840160051c820191505b8181101561040b57600081556001016103f7565b50505b505050565b81516001600160401b0381111561042c5761042c61024e565b6104408161043a845461038a565b846103c4565b6020601f821160018114610474576000831561045c5750848201515b600019600385901b1c1916600184901b17845561040b565b600084815260208120601f198516915b828110156104a45787850151825560209485019460019092019101610484565b50848210156104c25786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b60008083546104df8161038a565b6001821680156104f6576001811461050b5761053b565b60ff198316865281151582028601935061053b565b86600052602060002060005b8381101561053357815488820152600190910190602001610517565b505081860193505b509195945050505050565b60805160a051611ae5610572600039600081816102e10152610f870152600061029b0152611ae56000f3fe6080604052600436106101815760003560e01c80637a9e5e4b116100d1578063a69df4b51161008a578063bf7e214f11610064578063bf7e214f146104b1578063cf309012146104d1578063d505accf146104eb578063dd62ed3e1461050b57600080fd5b8063a69df4b51461047c578063a9059cbb14610491578063b3eac1d8146103b957600080fd5b80637a9e5e4b146103995780637ecebe00146103b95780638da5cb5b146103ef57806395d89b41146104275780639dc29fac1461043c578063a0712d681461045c57600080fd5b806330adf81f1161013e57806340c10f191161011857806340c10f191461030357806342966c68146103235780636281133d1461034357806370a082311461036357600080fd5b806330adf81f14610255578063313ce567146102895780633644e515146102cf57600080fd5b806306fdde0314610186578063095ea7b3146101b15780630c53c51c146101e157806313af4035146101f457806318160ddd1461021657806323b872dd14610235575b600080fd5b34801561019257600080fd5b5061019b610551565b6040516101a891906115b0565b60405180910390f35b3480156101bd57600080fd5b506101d16101cc3660046115d8565b6105df565b60405190151581526020016101a8565b61019b6101ef3660046116bf565b610672565b34801561020057600080fd5b5061021461020f366004611733565b610859565b005b34801561022257600080fd5b506000545b6040519081526020016101a8565b34801561024157600080fd5b506101d1610250366004611750565b6108dc565b34801561026157600080fd5b506102277f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b34801561029557600080fd5b506102bd7f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101a8565b3480156102db57600080fd5b506102277f000000000000000000000000000000000000000000000000000000000000000081565b34801561030f57600080fd5b5061021461031e3660046115d8565b610950565b34801561032f57600080fd5b5061021461033e366004611791565b610a3f565b34801561034f57600080fd5b506101d161035e3660046117aa565b610a53565b34801561036f57600080fd5b5061022761037e366004611733565b6001600160a01b031660009081526001602052604090205490565b3480156103a557600080fd5b506102146103b4366004611733565b610ba7565b3480156103c557600080fd5b506102276103d4366004611733565b6001600160a01b031660009081526008602052604090205490565b3480156103fb57600080fd5b5060045461040f906001600160a01b031681565b6040516001600160a01b0390911681526020016101a8565b34801561043357600080fd5b5061019b610c18565b34801561044857600080fd5b506102146104573660046115d8565b610c25565b34801561046857600080fd5b50610214610477366004611791565b610e1c565b34801561048857600080fd5b50610214610e54565b34801561049d57600080fd5b506101d16104ac3660046115d8565b610e87565b3480156104bd57600080fd5b5060035461040f906001600160a01b031681565b3480156104dd57600080fd5b506007546101d19060ff1681565b3480156104f757600080fd5b50610214610506366004611831565b610ea2565b34801561051757600080fd5b506102276105263660046118a0565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6006805461055e906118d9565b80601f016020809104026020016040519081016040528092919081815260200182805461058a906118d9565b80156105d75780601f106105ac576101008083540402835291602001916105d7565b820191906000526020600020905b8154815290600101906020018083116105ba57829003601f168201915b505050505081565b600081600260006105ee611191565b6001600160a01b0390811682526020808301939093526040918201600090812091881680825291909352912091909155610626611191565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161066091815260200190565b60405180910390a35060015b92915050565b60606106a186610697886001600160a01b031660009081526008602052604090205490565b4688888888610a53565b6107045760405162461bcd60e51b815260206004820152602960248201527f6d6574617472616e73616374696f6e2d7369676e65722d7369676e617475726560448201526805adad2e6dac2e8c6d60bb1b60648201526084015b60405180910390fd5b61070d86611234565b6000306001600160a01b0316867f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e88960405160200161074e93929190611913565b60408051601f19818403018152908290526107689161194c565b6000604051808303816000865af19150503d80600081146107a5576040519150601f19603f3d011682016040523d82523d6000602084013e6107aa565b606091505b50925090508061080d5760405162461bcd60e51b815260206004820152602860248201527f636f6c6f6e792d6d65746174782d66756e6374696f6e2d63616c6c2d756e737560448201526718d8d95cdcd99d5b60c21b60648201526084016106fb565b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b87610837611191565b8860405161084793929190611968565b60405180910390a15095945050505050565b610876610864611191565b6000356001600160e01b031916611260565b6108925760405162461bcd60e51b81526004016106fb9061199d565b600480546001600160a01b0319166001600160a01b0383169081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60075460009060ff161561093d576108f5610864611191565b61093d5760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b61094884848461133b565b949350505050565b61095b610864611191565b6109775760405162461bcd60e51b81526004016106fb9061199d565b6001600160a01b0382166000908152600160205260408120805483929061099f9084906119e1565b92505081905550806000808282546109b791906119e1565b90915550506040518181526001600160a01b038316907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a26040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b610a50610a4a611191565b82610c25565b50565b600080610ad088308989604051602001610a7094939291906119f4565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b6040805160008082526020820180845284905260ff87169282019290925260608101889052608081018790529192509060019060a0016020604051602081039080840390855afa158015610b28573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610b8b5760405162461bcd60e51b815260206004820152601f60248201527f636f6c6f6e792d6d65746174782d696e76616c69642d7369676e61747572650060448201526064016106fb565b6001600160a01b038a8116911614915050979650505050505050565b610bb2610864611191565b610bce5760405162461bcd60e51b81526004016106fb9061199d565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6005805461055e906118d9565b610c2d611191565b6001600160a01b0316826001600160a01b031614610d2d576001600160a01b03821660009081526002602052604081208291610c67611191565b6001600160a01b03166001600160a01b03168152602001908152602001600020541015610cd65760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03821660009081526002602052604081208291610cf8611191565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610d279190611a3a565b90915550505b6001600160a01b038216600090815260016020526040902054811115610d955760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b03821660009081526001602052604081208054839290610dbd908490611a3a565b9250508190555080600080828254610dd59190611a3a565b90915550506040518181526001600160a01b038316907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59060200160405180910390a25050565b610e27610864611191565b610e435760405162461bcd60e51b81526004016106fb9061199d565b610a50610e4e611191565b82610950565b610e5f610864611191565b610e7b5760405162461bcd60e51b81526004016106fb9061199d565b6007805460ff19169055565b6000610e9b610e94611191565b84846108dc565b9392505050565b60075460ff1615610f0057610eb8610864611191565b610f005760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b42841015610f505760405162461bcd60e51b815260206004820152601d60248201527f636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e6500000060448201526064016106fb565b6040805180820182526002815261190160f01b6020808301919091526001600160a01b038a166000908152600890915291822080547f0000000000000000000000000000000000000000000000000000000000000000917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c9188610fd983611a4d565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161103d93929190611a66565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa1580156110a8573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906110de5750886001600160a01b0316816001600160a01b0316145b61112a5760405162461bcd60e51b815260206004820152601e60248201527f636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e6174757265000060448201526064016106fb565b6001600160a01b038981166000818152600260209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b60003633301480156111a4575060348110155b1561122d57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e8811461121c5733935050505090565b5001516001600160a01b0316919050565b3391505090565b6001600160a01b038116600090815260086020526040812080549161125883611a4d565b919050555050565b6000306001600160a01b0384160361127a5750600161066c565b6004546001600160a01b03908116908416036112985750600161066c565b6003546001600160a01b03166112b05750600061066c565b60035460405163b700961360e01b81526001600160a01b0385811660048301523060248301526001600160e01b0319851660448301529091169063b700961390606401602060405180830381865afa158015611310573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113349190611a8d565b905061066c565b6000611345611191565b6001600160a01b0316846001600160a01b031614611445576001600160a01b0384166000908152600260205260408120839161137f611191565b6001600160a01b03166001600160a01b031681526020019081526020016000205410156113ee5760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03841660009081526002602052604081208391611410611191565b6001600160a01b03166001600160a01b03168152602001908152602001600020600082825461143f9190611a3a565b90915550505b6001600160a01b0384166000908152600160205260409020548211156114ad5760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b038416600090815260016020526040812080548492906114d5908490611a3a565b90915550506001600160a01b038316600090815260016020526040812080548492906115029084906119e1565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161154e91815260200190565b60405180910390a35060019392505050565b60005b8381101561157b578181015183820152602001611563565b50506000910152565b6000815180845261159c816020860160208601611560565b601f01601f19169290920160200192915050565b602081526000610e9b6020830184611584565b6001600160a01b0381168114610a5057600080fd5b600080604083850312156115eb57600080fd5b82356115f6816115c3565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261162b57600080fd5b813567ffffffffffffffff81111561164557611645611604565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561167457611674611604565b60405281815283820160200185101561168c57600080fd5b816020850160208301376000918101602001919091529392505050565b803560ff811681146116ba57600080fd5b919050565b600080600080600060a086880312156116d757600080fd5b85356116e2816115c3565b9450602086013567ffffffffffffffff8111156116fe57600080fd5b61170a8882890161161a565b9450506040860135925060608601359150611727608087016116a9565b90509295509295909350565b60006020828403121561174557600080fd5b8135610e9b816115c3565b60008060006060848603121561176557600080fd5b8335611770816115c3565b92506020840135611780816115c3565b929592945050506040919091013590565b6000602082840312156117a357600080fd5b5035919050565b600080600080600080600060e0888a0312156117c557600080fd5b87356117d0816115c3565b96506020880135955060408801359450606088013567ffffffffffffffff8111156117fa57600080fd5b6118068a828b0161161a565b9450506080880135925060a0880135915061182360c089016116a9565b905092959891949750929550565b600080600080600080600060e0888a03121561184c57600080fd5b8735611857816115c3565b96506020880135611867816115c3565b95506040880135945060608801359350611883608089016116a9565b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156118b357600080fd5b82356118be816115c3565b915060208301356118ce816115c3565b809150509250929050565b600181811c908216806118ed57607f821691505b60208210810361190d57634e487b7160e01b600052602260045260246000fd5b50919050565b60008451611925818460208901611560565b919091019283525060601b6bffffffffffffffffffffffff19166020820152603401919050565b6000825161195e818460208701611560565b9190910192915050565b6001600160a01b0384811682528316602082015260606040820181905260009061199490830184611584565b95945050505050565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561066c5761066c6119cb565b8481526bffffffffffffffffffffffff198460601b16602082015282603482015260008251611a2a816054850160208701611560565b9190910160540195945050505050565b8181038181111561066c5761066c6119cb565b600060018201611a5f57611a5f6119cb565b5060010190565b60008451611a78818460208901611560565b91909101928352506020820152604001919050565b600060208284031215611a9f57600080fd5b81518015158114610e9b57600080fdfea264697066735822122090928a66070125904780390eb49d45fe12c136aec641b1db69316e0ffefc6da764736f6c634300081b0033",Xb=n=>n.length>1,Pn=class extends ci{constructor(...e){Xb(e)?super(...e):super(Bu,_6,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(Bu)}static connect(e,t){return new oe(e,Bu,t)}};xe(Pn,"bytecode",_6),xe(Pn,"abi",Bu);var Rr;(function(n){n.TokenClient="TokenClient",n.TokenLockingClient="TokenLockingClient"})(Rr||(Rr={}));var Nn;(function(n){n.Colony="Colony",n.ColonyLegacy="ColonyLegacy",n.Erc20="Erc20",n.Erc2612="Erc2612",n.Sai="Sai"})(Nn||(Nn={}));var{AddressZero:t1}=yt;async function n1(n){try{await n.authority();return}catch{throw new Error("Token can not be assigned a TokenAuthority")}}var a1=async(n,e)=>{let t,a=!0,i=!0;t=Pn.connect(n,e);try{await t.totalSupply()}catch(r){throw new Error(`Token is probably not a valid ERC20 token, got ${r.message}`)}try{await t.locked(),await n1(t)}catch{a=!1}try{await t.nonces(t1)}catch{i=!1}return a?t.tokenClientType=Nn.Colony:i?(t=vn.connect(n,e),t.tokenClientType=Nn.Erc2612):(t=Tn.connect(n,e),t.tokenClientType=Nn.Erc20),t.clientType=Rr.TokenClient,t},vp=a1;var{AddressZero:wp}=yt,r1=Tn.connect(wp,new Zn.BaseProvider(3656691)).interface,s1=Ci.connect(wp,new Zn.BaseProvider(3656691)).interface,o1=vn.connect(wp,new Zn.BaseProvider(3656691)).interface;var _p=[{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:"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:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{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:"returnData",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:"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:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"}],Fs=class{static createInterface(){return new te.Interface(_p)}static connect(e,t){return new oe(e,_p,t)}};Fs.abi=_p;var kp=[{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:"returnData",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"}],Ls=class{static createInterface(){return new te.Interface(kp)}static connect(e,t){return new oe(e,kp,t)}};Ls.abi=kp;var Ap=[{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:!1,internalType:"address",name:"bridgeAddress",type:"address"}],name:"BridgeSet",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:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateSentToBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateStoredFromBridge",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:"uint256",name:"skillId",type:"uint256"}],name:"SkillAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillCreationStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillStoredFromBridge",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:[{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"address",name:"_resolver",type:"address"}],name:"addColonyVersion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_resolver",type:"address"}],name:"addExtensionToNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"addPendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPendingSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"addReputationUpdateLogFromBridge",outputs:[],stateMutability:"nonpayable",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:"_parentSkillId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"addSkillFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",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:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"chainId",type:"uint256"}],name:"bridgeCurrentRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"bridgePendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"skillId",type:"uint256"}],name:"bridgeSkillIfNotMiningChain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"burnUnneededRewards",outputs:[],stateMutability:"nonpayable",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:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"}],name:"claimMiningReward",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:"address",name:"_tokenAddress",type:"address"}],name:"createMetaColony",outputs:[],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:"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:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateExtension",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:"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:"returnData",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"getBridgedReputationUpdateCount",outputs:[{internalType:"uint256",name:"bridgedReputationCount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"}],name:"getBridgedSkillCounts",outputs:[{internalType:"uint256",name:"skillCount",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:"uint256",name:"_id",type:"uint256"}],name:"getColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyBridgeAddress",outputs:[{internalType:"address",name:"bridge",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCreationSalt",outputs:[{internalType:"bytes32",name:"salt",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"}],name:"getColonyVersionResolver",outputs:[{internalType:"address",name:"_resolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentColonyVersion",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getENSRegistrar",outputs:[{internalType:"address",name:"_address",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:[{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:[],name:"getFeeInverse",outputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMetaColony",outputs:[{internalType:"address payable",name:"_colonyAddress",type:"address"}],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:"getMiningChainId",outputs:[{internalType:"uint256",name:"reputationMiningChainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"}],name:"getMiningDelegator",outputs:[{internalType:"address",name:"_delegator",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiningResolver",outputs:[{internalType:"address",name:"miningResolverAddress",type:"address"}],stateMutability:"view",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:"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:"address",name:"_token",type:"address"}],name:"getPayoutWhitelist",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"getPendingReputationUpdate",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:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.PendingReputationUpdate",name:"update",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"getPendingSkillAddition",outputs:[{internalType:"uint256",name:"parentId",type:"uint256"}],stateMutability:"view",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:"_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:[{internalType:"bool",name:"_active",type:"bool"}],name:"getReputationMiningCycle",outputs:[{internalType:"address",name:"_repMiningCycleAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningCycleReward",outputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningSkillId",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"view",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:"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_deprecated",type:"bool"}],internalType:"struct ColonyNetworkDataTypes.Skill",name:"_skill",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSkillCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTokenLocking",outputs:[{internalType:"address",name:"_lockingAddress",type:"address"}],stateMutability:"view",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:"miningChainId",type:"uint256"},{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"}],name:"initialiseReputationMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[{internalType:"uint256",name:"_rootLocalSkillId",type:"uint256"}],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:"address",name:"_colony",type:"address"}],name:"isColony",outputs:[{internalType:"bool",name:"_addressIsColony",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],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:"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:"_stakers",type:"address[]"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"punishStakers",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:"_username",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerUserLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_bridgeAddress",type:"address"}],name:"setColonyBridgeAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],name:"setFeeInverse",outputs:[],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:"_miningResolverAddress",type:"address"}],name:"setMiningResolver",outputs:[],stateMutability:"nonpayable",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:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",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:"uint256",name:"_amount",type:"uint256"}],name:"setReputationMiningCycleReward",outputs:[],stateMutability:"nonpayable",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:[{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"},{internalType:"uint256",name:"nonce",type:"uint256"}],name:"setReputationRootHashFromBridge",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:"address",name:"_tokenLockingAddress",type:"address"}],name:"setTokenLocking",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:"uint256",name:"_amount",type:"uint256"}],name:"stakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"startNextCycle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"startTokenAuction",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:"bytes32",name:"_extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"unstakeForMining",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:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"}],Pr=class{static createInterface(){return new te.Interface(Ap)}static connect(e,t){return new oe(e,Ap,t)}};Pr.abi=Ap;var Ii=class{constructor({contract:e,config:t,method:a,args:i,eventData:r,txConfig:s}){this.config=t,this.contract=e,this.method=a,this.args=i,this.eventData=r,this.txConfig=s}async getArgs(e){let t=[];return typeof this.args=="function"?t=await this.args():t=this.args,e&&t.push(e),t}async getTx(e){let t=await this.getArgs(e);return await this.contract.functions[this.method].apply(this.contract,t)}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.config.ipfs.getMetadataForEvent.bind(this.config.ipfs,Os[this.txConfig.metadataType],t.metadata);return[t,e,a]}return[t,e]}return[{},e]}async broadcastMetaTx(e){let{provider:t}=this.config.getSigner();if(!t)throw new Error("No provider found");let i=await(await fetch(`${this.config.metaTxBroadcasterEndpoint}/broadcast`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();if(i.status!=="success")throw new Error(`Could not send Metatransaction. Reason given: ${i.data.reason}`);if(!i.data?.txHash)throw new Error("Could not get transaction hash from broadcaster response");return t.getTransaction(i.data.txHash)}async waitForMetaTx(e){let t=await e.wait();return t.parsedLogs=Vl(t.logs,this.contract.interface),t}tx(){return{send:async e=>{let t=await this.getTx(e);return[t,this.getMined.bind(this,t)]},mined:async e=>{let t=await this.getTx(e);return this.getMined(t)},encode:async()=>{let e=await this.getArgs();return this.contract.interface.encodeFunctionData(this.method,e)}}}};var{arrayify:d1,solidityKeccak256:l1,splitSignature:p1}=te,Si=class extends Ii{async sendMetaTransaction(e,t){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let a=this.config.getSigner(),{provider:i}=a;if(!i)throw new Error("No provider found");let r;this.config.network===ga.Custom?r=1:r=(await i.getNetwork()).chainId;let s=await a.getAddress(),o=await this.contract.functions.getMetatransactionNonce(s),l=l1(["uint256","address","uint256","bytes"],[o.toString(),t,r,e]),p=d1(l),f=await a.signMessage(p),{r:x,s:I,v:_}=p1(f),v={target:t,payload:e,userAddress:s,r:x,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 ie=(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}},Fu=(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=_e.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 Ep=[{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 te.Interface(Ep)}static connect(e,t){return new oe(e,Ep,t)}};Ri.abi=Ep;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"}],Pi=class{static createInterface(){return new te.Interface(Mp)}static connect(e,t){return new oe(e,Mp,t)}};Pi.abi=Mp;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 Ip=[{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"}],Di=class{static createInterface(){return new te.Interface(Ip)}static connect(e,t){return new oe(e,Ip,t)}};Di.abi=Ip;var Sp=[{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"}],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:[{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(Rp)}static connect(e,t){return new oe(e,Rp,t)}};Bi.abi=Rp;var{AddressZero:b1}=yt,Dn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Oa(Dn.extensionType),e.address);if(t===b1)throw new Error(`${Dn.extensionType} extension is not installed for this Colony`);let a=await Ar(t,e.config.signerOrProvider);if(!wi(Dn.extensionType,a,e.version))throw new Error(`Version ${a} of the ${Dn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Dn.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${Dn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new Dn(e,r,a)}static getLatestSupportedVersion(){return Dn.supportedVersions[Dn.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||_e.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[_]),I=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,I,x,s,_e.SkillIgnore]},async _=>({...ie("OneTxPaymentMade",_)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Oa(Ae.OneTxPayment),t],async a=>({...ie("ExtensionUpgraded",a)}))}},Va=Dn;Va.supportedVersions=[{version:3,factory:Di},{version:4,factory:Oi},{version:5,factory:Bi}],Va.extensionType=Ae.OneTxPayment;var On=class{constructor(e,t){typeof t=="string"?this.tokenClient=Tn.connect(t,e.config.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=>({...ie("Transfer",a)}))}transferFrom(e,t,a){return this.colonyNetwork.createTxCreator(this.tokenClient,"transferFrom",[e,t,a],async i=>({...ie("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=>({...ie("Approval",a)}))}};var Us=class extends On{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=Pn.connect(a,t.config.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=>({...ie("LogSetAuthority",a)}))}setOwner(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setOwner",[t],async a=>({...ie("LogSetOwner",a)}))}};var Vs=class extends On{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=vn.connect(a,t.config.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=>({...ie("Approval",i)}))}};var A6=async(n,e)=>{let t=await vp(e,n.config.signerOrProvider);switch(t.tokenClientType){case Nn.Colony:return new Us(n,t);case Nn.Erc20:return new On(n,t);case Nn.Erc2612:return new Vs(n,t);default:throw new Error("Your token is not supported in Colony SDK (yet).")}};var Pp=[{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"}],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:[{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"}],Li=class{static createInterface(){return new te.Interface(Np)}static connect(e,t){return new oe(e,Np,t)}};Li.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"},{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(Dp)}static connect(e,t){return new oe(e,Dp,t)}};Ui.abi=Dp;var{AddressZero:Op}=yt;var Lu=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===Op)throw new Error(`${Bn.extensionType} extension is not installed for this Colony`);let a=await Ar(t,e.config.signerOrProvider);if(!wi(Bn.extensionType,a,e.version))throw new Error(`Version ${a} of the ${Bn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Bn.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${Bn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new Bn(e,r,a)}static getLatestSupportedVersion(){return Bn.supportedVersions[Bn.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=>({...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:a,value:i,branchMask:r,siblings:s}=await Ms(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),this.colony.reputation,this.votingReputationContract,e,Op,Nl);return[e,t,Op,Nl,a,i,r,s]},async t=>({...ie("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.config.ipfs.uploadMetadata(Re.Decision,t),[e,a]},async a=>({...ie("Annotation",a)}),{metadataType:Re.Decision})}approveStake(e,t=_e.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{...Fu("UserTokenApproved",a,i.getInternalTokenLockingContract().interface)}})}stakeMotion(e,t,a){let i=async()=>{let r=await this.colony.config.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(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 I=await this.getMinStake(o,t);if(F.from(a).lt(I))throw new Error(`The staked amount is too small. Please stake at least ${Ll(I)}`);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: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=>({...ie("MotionStaked",r),...ie("MotionEventSet",r)}))}submitVote(e,t){let a=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.config.getSigner().getAddress(),{key:p,value:f,branchMask:x,siblings:I}=await this.colony.reputation.getReputationWithProofs(o,l,s),_=await this.createMotionSalt(e),v=te.solidityKeccak256(["bytes","uint256"],[_,t]);return[e,v,p,f,x,I]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"submitVote",a,async i=>({...ie("MotionVoteSubmitted",i)}))}revealVote(e,t){let a=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.config.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:I,value:_,branchMask:v,siblings:S}=p;return[e,f,F.from(x),I,_,v,S]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"revealVote",a,async i=>({...ie("MotionVoteRevealed",i)}))}escalateMotion(e,t){let a=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.config.getSigner().getAddress(),p=await vi(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),t,r),{key:f,value:x,branchMask:I,siblings:_}=await this.colony.reputation.getReputationWithProofs(o,l,s);return[e,t,p,f,x,I,_]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"escalateMotion",a,async i=>({...ie("MotionEscalated",i)}))}finalizeMotion(e){let t=async()=>{let a=await this.votingReputationContract.getMotionState(e);if(a!==zt.Finalizable)throw new Error(`Motion cannot be finalized. It's currently in "${zt[a]}" state`);return[e]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"finalizeMotion",t,async a=>({...ie("MotionFinalized",a)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Oa(Ae.VotingReputation),t],async a=>({...ie("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}}},ja=Bn;ja.supportedVersions=[{version:7,factory:Fi},{version:8,factory:Li},{version:9,factory:Ui}],ja.extensionType=Ae.VotingReputation;var w1={["motion"]:ja,["oneTx"]:Va},Dr=class{static async connect(e,t){let a=await Ar(t,e.config.signerOrProvider),i=Dr.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.config.signerOrProvider),s=await r.getToken(),o=await A6(e,s),l=new Dr(e,r,o,a);return await l.updateExtensions(),l}static getLatestSupportedVersion(){return Dr.supportedVersions[Dr.supportedVersions.length-1].version}constructor(e,t,a,i){this.colony=t,this.colonyNetwork=e,this.config=e.config,this.address=t.address,this.ext={},this.reputation=new ta(e.getInternalNetworkContract(),t,{customEndpointUrl:e.config.reputationOracleEndpoint}),this.token=a,this.version=i}createColonyTxCreator(e,t,a,i,r){return new Nr({colony:this,config:this.colonyNetwork.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createPermissionedColonyTxCreator(e,t,a,i,r,s){return new Nr({colony:this,config:this.colonyNetwork.config,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 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 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.config.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.config.ipfs.uploadMetadata(Re.Domain,e),[_e.RootDomain,t]},{roles:vt.Architecture,domain:_e.RootDomain},async t=>({...ie("DomainAdded",t),...ie("FundingPotAdded",t),...ie("DomainMetadata",t)}),{metadataType:Re.Domain}):this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256)",[_e.RootDomain],{roles:vt.Architecture,domain:_e.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.config.ipfs.uploadMetadata(Re.Domain,e),[_e.RootDomain,t]},{roles:vt.Architecture,domain:_e.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 a=>({...ie("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=>({...ie("ColonyFundsClaimed",a)}))}moveFundsToTeam(e,t,a,i){let r=_e.RootDomain,s=a||_e.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(),I=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,I,_,v,S,e,o]},async l=>({...ie("ColonyFundsMovedBetweenFundingPots",l)}))}async getReputation(e,t=_e.RootDomain,a=3){let{skillId:i}=await this.colony.getDomain(t);return this.reputation.getReputationFraction(i,e,void 0,a)}async getReputationPoints(e,t=_e.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=>({...ie("ArbitraryTransaction(address,address,bytes,bool)",a)}))}annotateTransaction(e,t){return this.createColonyTxCreator(this.colony,"annotateTransaction",async()=>{let a;return typeof t=="string"?a=t:a=await this.config.ipfs.uploadMetadata(Re.Annotation,t),[e,a]},async a=>({...ie("Annotation",a)}),{metadataType:Re.Annotation})}installExtension(e){let t=w1[e],a=t.getLatestSupportedVersion(),{extensionType:i}=t;if(!wi(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",[Oa(i),t.getLatestSupportedVersion()],async s=>({...Fu("ExtensionInstalled",s,r.interface)}))}async getRoles(e,t=_e.RootDomain){let a=await this.colony.getUserRoles(e,t);return nu(a)}setRoles(e,t,a=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let i=await this.getRoles(e,a),r=Array.from(new Set([...i,...[].concat(t)])),s=Ul(r);return[e,a,s]},{roles:vt.Architecture,domain:a},async i=>({...ie("ColonyRoleSet",i),...ie("RecoveryRoleSet",i)}))}unsetRoles(e,t,a=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let r=(await this.getRoles(e,a)).filter(o=>![].concat(t).includes(o)),s=Ul(r);return[e,a,s]},{roles:vt.Architecture,domain:a},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 a=[],i=await t.getTokenLocking();return e?a=[...e,i]:a=[i],[this.token.address,this.address,a]},async a=>({...ie("TokenAuthorityDeployed",a)}))}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 a=>({...ie("ColonyUpgraded",a)}))}awardReputation(e,t,a=_e.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=>({...ie("ArbitraryReputationUpdate",i)}))}smiteReputation(e,t,a=_e.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:vt.Arbitration},async i=>({...ie("ArbitraryReputationUpdate",i)}))}},js=Dr;js.supportedVersions=[{version:11,factory:Ri},{version:12,factory:Pi},{version:13,factory:Ni}];var{splitSignature:gR}=te;var{namehash:LR}=te,{AddressZero:UR}=yt;var A1=new Zn.JsonRpcProvider(Es.ArbitrumOne),{isAddress:E1}=te,M1=(n,e)=>{let t=new Ua(A1),a=t.createEventSource(Sr),i=t.createMultiFilter(a,["DomainAdded(address,uint256)","DomainMetadata(address,uint256,string)"],n),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}})},Fp=document.querySelector("#address"),E6=document.querySelector("#button"),Lp=document.querySelector("#error"),M6=document.querySelector("#result");if(!Fp||!E6||!Lp||!M6)throw new Error("Could not find all required HTML elements");var C1=n=>{Lp.innerText=n},I1=()=>{Lp.innerText=""},Bp=n=>{M6.innerText=n};E6.addEventListener("click",async()=>{I1();let n=Fp.value;return E1(n)?(Fp.value="",M1(n,e=>{Bp(`A domain with id ${e[0].data.domainId} was created on Colony ${e[0].address}.`),e.forEach(async t=>{if(t.getMetadata){let a=await t.getMetadata();if(a.name===Re.Domain){let{domainName:i,domainColor:r,domainPurpose:s}=a.data;Bp(`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}`)}}})}),Bp(`Set up event listener for Colony ${n}`),null):C1("This is not a valid address")});})(); +`)}`,Wb=n=>({...n,isWhitelistActivated:n.isWhitelistActivated||!1,colonySafes:n.colonySafes||[],colonyTokens:n.colonyTokens||[],verifiedAddresses:n.verifiedAddresses||[]}),pp=(n,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&&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"?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=lp.default.validate.report(s);r(i)===!1&&((p,f,x=!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}))&&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"?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: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}})(n);if(t.success){if(t.data.version!==dp)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 a=g6(t.errors);throw new Error(a)};var T6=(n,e)=>{let t=n===Re.Colony?Wb(e):e,a=(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&&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"?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=lp.default.validate.report(s);r(i)===!1&&((p,f,x=!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}))&&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"?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: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}})({name:n,data:t,version:dp});if(!a.success){let i=g6(a.errors);throw new Error(i)}return a.data};var yp=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.")}},fp=yp;var cp=(0,v6.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 fp}static eventSupportsMetadata(e){return!!Object.keys(Bs).includes(e)}async getMetadata(e,t){let a=this.adapter.getIpfsUrl(e),r=await(await cp(a)).json();return pp(r,t)}async getMetadataForEvent(e,t){let a=this.adapter.getIpfsUrl(t),r=await(await cp(a)).json(),s=Object.entries(Bs).find(([,l])=>l===e);if(!s)throw new Error(`Not a valid MetadataEvent: ${e}`);let o=s[0];return pp(r,o)}async getRawMetadata(e){let t=this.adapter.getIpfsUrl(e),a=await cp(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=T6(e,t),i=JSON.stringify(a);return this.adapter.uploadJson(i)}};var sE=typeof global<"u"&&global.process?global.process.env.COLONY_IPFS_PINATA_TOKEN:void 0;var mp=async(n,e)=>{let t=await n;return e.send("eth_getLogs",[t])};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 mp(e,this.provider)).map(a=>{let{eventSource:i,eventName:r}=e,s=i.interface.decodeEventLog(r,a.data,a.topics);return Ua.eventSupportsMetadata(r)?{...e,data:s,transactionHash:a.transactionHash,getMetadata:async()=>await this.ipfs.getMetadataForEvent(r,s.metadata)}:{...e,transactionHash:a.transactionHash,data:s}}).filter(Oa)}async getMultiEvents(e,t={}){let a=[].concat(e),i=Array.from(new Set(a.flatMap(({address:o})=>o))).filter(Oa),r=Array.from(new Set(a.flatMap(({colonyTopics:o})=>o.map(({topic:l})=>l))));return(await mp({address:i.length?i:void 0,fromBlock:t.fromBlock,toBlock:t.toBlock,topics:[r]},this.provider)).map(o=>{let l=Va.extractSingleTopic(o),p=a.find(({address:S,colonyTopics:L})=>S&&!Bl(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:I}=f,_=x.interface.decodeEventLog(I,o.data,o.topics),v={address:o.address,eventSource:x,topics:o.topics,eventName:I,data:_,transactionHash:o.transactionHash};return Ua.eventSupportsMetadata(I)?{...v,getMetadata:async()=>await this.ipfs.getMetadataForEvent(I,_.metadata)}:v}).filter(Oa)}createFilter(e,t,a,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:a,fromBlock:r.fromBlock,toBlock:r.toBlock}}createMultiFilter(e,t,a){let i=t.map(r=>{let s=this.createFilter(e,r,a),o=Va.extractSingleTopic(s);return o?{topic:o,eventName:r,eventSource:s.eventSource}:null}).filter(Oa);return{address:a,colonyTopics:i}}};var hp=[{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"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"agent",type:"address"},{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"}],Rr=class{static createInterface(){return new te.Interface(hp)}static connect(e,t){return new oe(e,hp,t)}};xe(Rr,"abi",hp);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"}],Ii=class{static createInterface(){return new te.Interface(gp)}static connect(e,t){return new oe(e,gp,t)}};xe(Ii,"abi",gp);var Bu=[{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:"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:"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:[{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:"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:"returnData",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",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:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],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:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"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:[],name:"unlock",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"}],w6="0x60c060405234801561001057600080fd5b5060405161205738038061205783398101604081905261002f91610307565b60008060018161003d6101ab565b6001600160a01b031681526020810191909152604001600090812091909155556100656101ab565b600480546001600160a01b0319166001600160a01b039290921691909117905561008d6101ab565b6001600160a01b03167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a260066100ce8482610413565b5060056100db8382610413565b5060ff81166080526007805460ff1916600117905560405146907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f90610123906006906104d1565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051601f19818403018152919052805160209091012060a0525061054692505050565b60003633301480156101be575060348110155b1561024757600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e881146102365733935050505090565b5001516001600160a01b0316919050565b3391505090565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261027557600080fd5b81516001600160401b0381111561028e5761028e61024e565b604051601f8201601f19908116603f011681016001600160401b03811182821017156102bc576102bc61024e565b6040528181528382016020018510156102d457600080fd5b60005b828110156102f3576020818601810151838301820152016102d7565b506000918101602001919091529392505050565b60008060006060848603121561031c57600080fd5b83516001600160401b0381111561033257600080fd5b61033e86828701610264565b602086015190945090506001600160401b0381111561035c57600080fd5b61036886828701610264565b925050604084015160ff8116811461037f57600080fd5b809150509250925092565b600181811c9082168061039e57607f821691505b6020821081036103be57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561040e57806000526020600020601f840160051c810160208510156103eb5750805b601f840160051c820191505b8181101561040b57600081556001016103f7565b50505b505050565b81516001600160401b0381111561042c5761042c61024e565b6104408161043a845461038a565b846103c4565b6020601f821160018114610474576000831561045c5750848201515b600019600385901b1c1916600184901b17845561040b565b600084815260208120601f198516915b828110156104a45787850151825560209485019460019092019101610484565b50848210156104c25786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b60008083546104df8161038a565b6001821680156104f6576001811461050b5761053b565b60ff198316865281151582028601935061053b565b86600052602060002060005b8381101561053357815488820152600190910190602001610517565b505081860193505b509195945050505050565b60805160a051611ae5610572600039600081816102e10152610f870152600061029b0152611ae56000f3fe6080604052600436106101815760003560e01c80637a9e5e4b116100d1578063a69df4b51161008a578063bf7e214f11610064578063bf7e214f146104b1578063cf309012146104d1578063d505accf146104eb578063dd62ed3e1461050b57600080fd5b8063a69df4b51461047c578063a9059cbb14610491578063b3eac1d8146103b957600080fd5b80637a9e5e4b146103995780637ecebe00146103b95780638da5cb5b146103ef57806395d89b41146104275780639dc29fac1461043c578063a0712d681461045c57600080fd5b806330adf81f1161013e57806340c10f191161011857806340c10f191461030357806342966c68146103235780636281133d1461034357806370a082311461036357600080fd5b806330adf81f14610255578063313ce567146102895780633644e515146102cf57600080fd5b806306fdde0314610186578063095ea7b3146101b15780630c53c51c146101e157806313af4035146101f457806318160ddd1461021657806323b872dd14610235575b600080fd5b34801561019257600080fd5b5061019b610551565b6040516101a891906115b0565b60405180910390f35b3480156101bd57600080fd5b506101d16101cc3660046115d8565b6105df565b60405190151581526020016101a8565b61019b6101ef3660046116bf565b610672565b34801561020057600080fd5b5061021461020f366004611733565b610859565b005b34801561022257600080fd5b506000545b6040519081526020016101a8565b34801561024157600080fd5b506101d1610250366004611750565b6108dc565b34801561026157600080fd5b506102277f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b34801561029557600080fd5b506102bd7f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101a8565b3480156102db57600080fd5b506102277f000000000000000000000000000000000000000000000000000000000000000081565b34801561030f57600080fd5b5061021461031e3660046115d8565b610950565b34801561032f57600080fd5b5061021461033e366004611791565b610a3f565b34801561034f57600080fd5b506101d161035e3660046117aa565b610a53565b34801561036f57600080fd5b5061022761037e366004611733565b6001600160a01b031660009081526001602052604090205490565b3480156103a557600080fd5b506102146103b4366004611733565b610ba7565b3480156103c557600080fd5b506102276103d4366004611733565b6001600160a01b031660009081526008602052604090205490565b3480156103fb57600080fd5b5060045461040f906001600160a01b031681565b6040516001600160a01b0390911681526020016101a8565b34801561043357600080fd5b5061019b610c18565b34801561044857600080fd5b506102146104573660046115d8565b610c25565b34801561046857600080fd5b50610214610477366004611791565b610e1c565b34801561048857600080fd5b50610214610e54565b34801561049d57600080fd5b506101d16104ac3660046115d8565b610e87565b3480156104bd57600080fd5b5060035461040f906001600160a01b031681565b3480156104dd57600080fd5b506007546101d19060ff1681565b3480156104f757600080fd5b50610214610506366004611831565b610ea2565b34801561051757600080fd5b506102276105263660046118a0565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6006805461055e906118d9565b80601f016020809104026020016040519081016040528092919081815260200182805461058a906118d9565b80156105d75780601f106105ac576101008083540402835291602001916105d7565b820191906000526020600020905b8154815290600101906020018083116105ba57829003601f168201915b505050505081565b600081600260006105ee611191565b6001600160a01b0390811682526020808301939093526040918201600090812091881680825291909352912091909155610626611191565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161066091815260200190565b60405180910390a35060015b92915050565b60606106a186610697886001600160a01b031660009081526008602052604090205490565b4688888888610a53565b6107045760405162461bcd60e51b815260206004820152602960248201527f6d6574617472616e73616374696f6e2d7369676e65722d7369676e617475726560448201526805adad2e6dac2e8c6d60bb1b60648201526084015b60405180910390fd5b61070d86611234565b6000306001600160a01b0316867f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e88960405160200161074e93929190611913565b60408051601f19818403018152908290526107689161194c565b6000604051808303816000865af19150503d80600081146107a5576040519150601f19603f3d011682016040523d82523d6000602084013e6107aa565b606091505b50925090508061080d5760405162461bcd60e51b815260206004820152602860248201527f636f6c6f6e792d6d65746174782d66756e6374696f6e2d63616c6c2d756e737560448201526718d8d95cdcd99d5b60c21b60648201526084016106fb565b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b87610837611191565b8860405161084793929190611968565b60405180910390a15095945050505050565b610876610864611191565b6000356001600160e01b031916611260565b6108925760405162461bcd60e51b81526004016106fb9061199d565b600480546001600160a01b0319166001600160a01b0383169081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60075460009060ff161561093d576108f5610864611191565b61093d5760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b61094884848461133b565b949350505050565b61095b610864611191565b6109775760405162461bcd60e51b81526004016106fb9061199d565b6001600160a01b0382166000908152600160205260408120805483929061099f9084906119e1565b92505081905550806000808282546109b791906119e1565b90915550506040518181526001600160a01b038316907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a26040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b610a50610a4a611191565b82610c25565b50565b600080610ad088308989604051602001610a7094939291906119f4565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b6040805160008082526020820180845284905260ff87169282019290925260608101889052608081018790529192509060019060a0016020604051602081039080840390855afa158015610b28573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610b8b5760405162461bcd60e51b815260206004820152601f60248201527f636f6c6f6e792d6d65746174782d696e76616c69642d7369676e61747572650060448201526064016106fb565b6001600160a01b038a8116911614915050979650505050505050565b610bb2610864611191565b610bce5760405162461bcd60e51b81526004016106fb9061199d565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6005805461055e906118d9565b610c2d611191565b6001600160a01b0316826001600160a01b031614610d2d576001600160a01b03821660009081526002602052604081208291610c67611191565b6001600160a01b03166001600160a01b03168152602001908152602001600020541015610cd65760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03821660009081526002602052604081208291610cf8611191565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610d279190611a3a565b90915550505b6001600160a01b038216600090815260016020526040902054811115610d955760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b03821660009081526001602052604081208054839290610dbd908490611a3a565b9250508190555080600080828254610dd59190611a3a565b90915550506040518181526001600160a01b038316907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59060200160405180910390a25050565b610e27610864611191565b610e435760405162461bcd60e51b81526004016106fb9061199d565b610a50610e4e611191565b82610950565b610e5f610864611191565b610e7b5760405162461bcd60e51b81526004016106fb9061199d565b6007805460ff19169055565b6000610e9b610e94611191565b84846108dc565b9392505050565b60075460ff1615610f0057610eb8610864611191565b610f005760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b42841015610f505760405162461bcd60e51b815260206004820152601d60248201527f636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e6500000060448201526064016106fb565b6040805180820182526002815261190160f01b6020808301919091526001600160a01b038a166000908152600890915291822080547f0000000000000000000000000000000000000000000000000000000000000000917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c9188610fd983611a4d565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161103d93929190611a66565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa1580156110a8573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906110de5750886001600160a01b0316816001600160a01b0316145b61112a5760405162461bcd60e51b815260206004820152601e60248201527f636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e6174757265000060448201526064016106fb565b6001600160a01b038981166000818152600260209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b60003633301480156111a4575060348110155b1561122d57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e8811461121c5733935050505090565b5001516001600160a01b0316919050565b3391505090565b6001600160a01b038116600090815260086020526040812080549161125883611a4d565b919050555050565b6000306001600160a01b0384160361127a5750600161066c565b6004546001600160a01b03908116908416036112985750600161066c565b6003546001600160a01b03166112b05750600061066c565b60035460405163b700961360e01b81526001600160a01b0385811660048301523060248301526001600160e01b0319851660448301529091169063b700961390606401602060405180830381865afa158015611310573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113349190611a8d565b905061066c565b6000611345611191565b6001600160a01b0316846001600160a01b031614611445576001600160a01b0384166000908152600260205260408120839161137f611191565b6001600160a01b03166001600160a01b031681526020019081526020016000205410156113ee5760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03841660009081526002602052604081208391611410611191565b6001600160a01b03166001600160a01b03168152602001908152602001600020600082825461143f9190611a3a565b90915550505b6001600160a01b0384166000908152600160205260409020548211156114ad5760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b038416600090815260016020526040812080548492906114d5908490611a3a565b90915550506001600160a01b038316600090815260016020526040812080548492906115029084906119e1565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161154e91815260200190565b60405180910390a35060019392505050565b60005b8381101561157b578181015183820152602001611563565b50506000910152565b6000815180845261159c816020860160208601611560565b601f01601f19169290920160200192915050565b602081526000610e9b6020830184611584565b6001600160a01b0381168114610a5057600080fd5b600080604083850312156115eb57600080fd5b82356115f6816115c3565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261162b57600080fd5b813567ffffffffffffffff81111561164557611645611604565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561167457611674611604565b60405281815283820160200185101561168c57600080fd5b816020850160208301376000918101602001919091529392505050565b803560ff811681146116ba57600080fd5b919050565b600080600080600060a086880312156116d757600080fd5b85356116e2816115c3565b9450602086013567ffffffffffffffff8111156116fe57600080fd5b61170a8882890161161a565b9450506040860135925060608601359150611727608087016116a9565b90509295509295909350565b60006020828403121561174557600080fd5b8135610e9b816115c3565b60008060006060848603121561176557600080fd5b8335611770816115c3565b92506020840135611780816115c3565b929592945050506040919091013590565b6000602082840312156117a357600080fd5b5035919050565b600080600080600080600060e0888a0312156117c557600080fd5b87356117d0816115c3565b96506020880135955060408801359450606088013567ffffffffffffffff8111156117fa57600080fd5b6118068a828b0161161a565b9450506080880135925060a0880135915061182360c089016116a9565b905092959891949750929550565b600080600080600080600060e0888a03121561184c57600080fd5b8735611857816115c3565b96506020880135611867816115c3565b95506040880135945060608801359350611883608089016116a9565b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156118b357600080fd5b82356118be816115c3565b915060208301356118ce816115c3565b809150509250929050565b600181811c908216806118ed57607f821691505b60208210810361190d57634e487b7160e01b600052602260045260246000fd5b50919050565b60008451611925818460208901611560565b919091019283525060601b6bffffffffffffffffffffffff19166020820152603401919050565b6000825161195e818460208701611560565b9190910192915050565b6001600160a01b0384811682528316602082015260606040820181905260009061199490830184611584565b95945050505050565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561066c5761066c6119cb565b8481526bffffffffffffffffffffffff198460601b16602082015282603482015260008251611a2a816054850160208701611560565b9190910160540195945050505050565b8181038181111561066c5761066c6119cb565b600060018201611a5f57611a5f6119cb565b5060010190565b60008451611a78818460208901611560565b91909101928352506020820152604001919050565b600060208284031215611a9f57600080fd5b81518015158114610e9b57600080fdfea264697066735822122090928a66070125904780390eb49d45fe12c136aec641b1db69316e0ffefc6da764736f6c634300081b0033",Qb=n=>n.length>1,Pn=class extends mi{constructor(...e){Qb(e)?super(...e):super(Bu,w6,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(Bu)}static connect(e,t){return new oe(e,Bu,t)}};xe(Pn,"bytecode",w6),xe(Pn,"abi",Bu);var Pr;(function(n){n.TokenClient="TokenClient",n.TokenLockingClient="TokenLockingClient"})(Pr||(Pr={}));var Nn;(function(n){n.Colony="Colony",n.ColonyLegacy="ColonyLegacy",n.Erc20="Erc20",n.Erc2612="Erc2612",n.Sai="Sai"})(Nn||(Nn={}));var{AddressZero:e1}=yt;async function t1(n){try{await n.authority();return}catch{throw new Error("Token can not be assigned a TokenAuthority")}}var n1=async(n,e)=>{let t,a=!0,i=!0;t=Pn.connect(n,e);try{await t.totalSupply()}catch(r){throw new Error(`Token is probably not a valid ERC20 token, got ${r.message}`)}try{await t.locked(),await t1(t)}catch{a=!1}try{await t.nonces(e1)}catch{i=!1}return a?t.tokenClientType=Nn.Colony:i?(t=vn.connect(n,e),t.tokenClientType=Nn.Erc2612):(t=Tn.connect(n,e),t.tokenClientType=Nn.Erc20),t.clientType=Pr.TokenClient,t},Tp=n1;var{AddressZero:vp}=yt,i1=Tn.connect(vp,new Zn.BaseProvider(3656691)).interface,r1=Ii.connect(vp,new Zn.BaseProvider(3656691)).interface,s1=vn.connect(vp,new Zn.BaseProvider(3656691)).interface;var wp=[{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:"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:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{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:"returnData",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:"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:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"}],Fs=class{static createInterface(){return new te.Interface(wp)}static connect(e,t){return new oe(e,wp,t)}};Fs.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"},{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:"returnData",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"}],Ls=class{static createInterface(){return new te.Interface(_p)}static connect(e,t){return new oe(e,_p,t)}};Ls.abi=_p;var kp=[{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:!1,internalType:"address",name:"bridgeAddress",type:"address"}],name:"BridgeSet",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:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateSentToBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateStoredFromBridge",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:"uint256",name:"skillId",type:"uint256"}],name:"SkillAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillCreationStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillStoredFromBridge",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:[{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"address",name:"_resolver",type:"address"}],name:"addColonyVersion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_resolver",type:"address"}],name:"addExtensionToNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"addPendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPendingSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"addReputationUpdateLogFromBridge",outputs:[],stateMutability:"nonpayable",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:"_parentSkillId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"addSkillFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",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:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"chainId",type:"uint256"}],name:"bridgeCurrentRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"bridgePendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"skillId",type:"uint256"}],name:"bridgeSkillIfNotMiningChain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"burnUnneededRewards",outputs:[],stateMutability:"nonpayable",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:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"}],name:"claimMiningReward",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:"address",name:"_tokenAddress",type:"address"}],name:"createMetaColony",outputs:[],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:"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:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateExtension",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:"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:"returnData",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"getBridgedReputationUpdateCount",outputs:[{internalType:"uint256",name:"bridgedReputationCount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"}],name:"getBridgedSkillCounts",outputs:[{internalType:"uint256",name:"skillCount",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:"uint256",name:"_id",type:"uint256"}],name:"getColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyBridgeAddress",outputs:[{internalType:"address",name:"bridge",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCreationSalt",outputs:[{internalType:"bytes32",name:"salt",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"}],name:"getColonyVersionResolver",outputs:[{internalType:"address",name:"_resolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentColonyVersion",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getENSRegistrar",outputs:[{internalType:"address",name:"_address",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:[{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:[],name:"getFeeInverse",outputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMetaColony",outputs:[{internalType:"address payable",name:"_colonyAddress",type:"address"}],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:"getMiningChainId",outputs:[{internalType:"uint256",name:"reputationMiningChainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"}],name:"getMiningDelegator",outputs:[{internalType:"address",name:"_delegator",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiningResolver",outputs:[{internalType:"address",name:"miningResolverAddress",type:"address"}],stateMutability:"view",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:"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:"address",name:"_token",type:"address"}],name:"getPayoutWhitelist",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"getPendingReputationUpdate",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:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.PendingReputationUpdate",name:"update",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"getPendingSkillAddition",outputs:[{internalType:"uint256",name:"parentId",type:"uint256"}],stateMutability:"view",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:"_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:[{internalType:"bool",name:"_active",type:"bool"}],name:"getReputationMiningCycle",outputs:[{internalType:"address",name:"_repMiningCycleAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningCycleReward",outputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningSkillId",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"view",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:"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_deprecated",type:"bool"}],internalType:"struct ColonyNetworkDataTypes.Skill",name:"_skill",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSkillCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTokenLocking",outputs:[{internalType:"address",name:"_lockingAddress",type:"address"}],stateMutability:"view",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:"miningChainId",type:"uint256"},{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"}],name:"initialiseReputationMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[{internalType:"uint256",name:"_rootLocalSkillId",type:"uint256"}],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:"address",name:"_colony",type:"address"}],name:"isColony",outputs:[{internalType:"bool",name:"_addressIsColony",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],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:"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:"_stakers",type:"address[]"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"punishStakers",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:"_username",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerUserLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_bridgeAddress",type:"address"}],name:"setColonyBridgeAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],name:"setFeeInverse",outputs:[],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:"_miningResolverAddress",type:"address"}],name:"setMiningResolver",outputs:[],stateMutability:"nonpayable",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:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",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:"uint256",name:"_amount",type:"uint256"}],name:"setReputationMiningCycleReward",outputs:[],stateMutability:"nonpayable",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:[{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"},{internalType:"uint256",name:"nonce",type:"uint256"}],name:"setReputationRootHashFromBridge",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:"address",name:"_tokenLockingAddress",type:"address"}],name:"setTokenLocking",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:"uint256",name:"_amount",type:"uint256"}],name:"stakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"startNextCycle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"startTokenAuction",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:"bytes32",name:"_extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"unstakeForMining",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:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"}],Nr=class{static createInterface(){return new te.Interface(kp)}static connect(e,t){return new oe(e,kp,t)}};Nr.abi=kp;var Si=class{constructor({contract:e,config:t,method:a,args:i,eventData:r,txConfig:s}){this.config=t,this.contract=e,this.method=a,this.args=i,this.eventData=r,this.txConfig=s}async getArgs(e){let t=[];return typeof this.args=="function"?t=await this.args():t=this.args,e&&t.push(e),t}async getTx(e){let t=await this.getArgs(e);return await this.contract.functions[this.method].apply(this.contract,t)}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.config.ipfs.getMetadataForEvent.bind(this.config.ipfs,Bs[this.txConfig.metadataType],t.metadata);return[t,e,a]}return[t,e]}return[{},e]}async broadcastMetaTx(e){let{provider:t}=this.config.getSigner();if(!t)throw new Error("No provider found");let i=await(await fetch(`${this.config.metaTxBroadcasterEndpoint}/broadcast`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();if(i.status!=="success")throw new Error(`Could not send Metatransaction. Reason given: ${i.data.reason}`);if(!i.data?.txHash)throw new Error("Could not get transaction hash from broadcaster response");return t.getTransaction(i.data.txHash)}async waitForMetaTx(e){let t=await e.wait();return t.parsedLogs=Ul(t.logs,this.contract.interface),t}tx(){return{send:async e=>{let t=await this.getTx(e);return[t,this.getMined.bind(this,t)]},mined:async e=>{let t=await this.getTx(e);return this.getMined(t)},encode:async()=>{let e=await this.getArgs();return this.contract.interface.encodeFunctionData(this.method,e)}}}};var{arrayify:u1,solidityKeccak256:d1,splitSignature:l1}=te,Ri=class extends Si{async sendMetaTransaction(e,t){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let a=this.config.getSigner(),{provider:i}=a;if(!i)throw new Error("No provider found");let r;this.config.network===ga.Custom?r=1:r=(await i.getNetwork()).chainId;let s=await a.getAddress(),o=await this.contract.functions.getMetatransactionNonce(s),l=d1(["uint256","address","uint256","bytes"],[o.toString(),t,r,e]),p=u1(l),f=await a.signMessage(p),{r:x,s:I,v:_}=l1(f),v={target:t,payload:e,userAddress:s,r:x,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 ie=(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}},Fu=(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=_e.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 Ap=[{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(Ap)}static connect(e,t){return new oe(e,Ap,t)}};Pi.abi=Ap;var Ep=[{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(Ep)}static connect(e,t){return new oe(e,Ep,t)}};Ni.abi=Ep;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"}],Di=class{static createInterface(){return new te.Interface(Mp)}static connect(e,t){return new oe(e,Mp,t)}};Di.abi=Mp;var Cp=[{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(Cp)}static connect(e,t){return new oe(e,Cp,t)}};Oi.abi=Cp;var Ip=[{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(Ip)}static connect(e,t){return new oe(e,Ip,t)}};Bi.abi=Ip;var Sp=[{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(Sp)}static connect(e,t){return new oe(e,Sp,t)}};Fi.abi=Sp;var{AddressZero:x1}=yt,Dn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Ba(Dn.extensionType),e.address);if(t===x1)throw new Error(`${Dn.extensionType} extension is not installed for this Colony`);let a=await Er(t,e.config.signerOrProvider);if(!_i(Dn.extensionType,a,e.version))throw new Error(`Version ${a} of the ${Dn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Dn.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${Dn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new Dn(e,r,a)}static getLatestSupportedVersion(){return Dn.supportedVersions[Dn.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||_e.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[_]),I=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,I,x,s,_e.SkillIgnore]},async _=>({...ie("OneTxPaymentMade",_)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Ba(Ae.OneTxPayment),t],async a=>({...ie("ExtensionUpgraded",a)}))}},ja=Dn;ja.supportedVersions=[{version:3,factory:Oi},{version:4,factory:Bi},{version:5,factory:Fi}],ja.extensionType=Ae.OneTxPayment;var On=class{constructor(e,t){typeof t=="string"?this.tokenClient=Tn.connect(t,e.config.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=>({...ie("Transfer",a)}))}transferFrom(e,t,a){return this.colonyNetwork.createTxCreator(this.tokenClient,"transferFrom",[e,t,a],async i=>({...ie("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=>({...ie("Approval",a)}))}};var Us=class extends On{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=Pn.connect(a,t.config.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=>({...ie("LogSetAuthority",a)}))}setOwner(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setOwner",[t],async a=>({...ie("LogSetOwner",a)}))}};var Vs=class extends On{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=vn.connect(a,t.config.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=>({...ie("Approval",i)}))}};var k6=async(n,e)=>{let t=await Tp(e,n.config.signerOrProvider);switch(t.tokenClientType){case Nn.Colony:return new Us(n,t);case Nn.Erc20:return new On(n,t);case Nn.Erc2612:return new Vs(n,t);default:throw new Error("Your token is not supported in Colony SDK (yet).")}};var Rp=[{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(Rp)}static connect(e,t){return new oe(e,Rp,t)}};Li.abi=Rp;var Pp=[{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(Pp)}static connect(e,t){return new oe(e,Pp,t)}};Ui.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"},{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(Np)}static connect(e,t){return new oe(e,Np,t)}};Vi.abi=Np;var{AddressZero:Dp}=yt;var Lu=F.from(10).pow(18),Bn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Ba(Bn.extensionType),e.address);if(t===Dp)throw new Error(`${Bn.extensionType} extension is not installed for this Colony`);let a=await Er(t,e.config.signerOrProvider);if(!_i(Bn.extensionType,a,e.version))throw new Error(`Version ${a} of the ${Bn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Bn.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${Bn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new Bn(e,r,a)}static getLatestSupportedVersion(){return Bn.supportedVersions[Bn.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=>({...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:a,value:i,branchMask:r,siblings:s}=await Cs(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),this.colony.reputation,this.votingReputationContract,e,Dp,Nl);return[e,t,Dp,Nl,a,i,r,s]},async t=>({...ie("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.config.ipfs.uploadMetadata(Re.Decision,t),[e,a]},async a=>({...ie("Annotation",a)}),{metadataType:Re.Decision})}approveStake(e,t=_e.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{...Fu("UserTokenApproved",a,i.getInternalTokenLockingContract().interface)}})}stakeMotion(e,t,a){let i=async()=>{let r=await this.colony.config.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(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 I=await this.getMinStake(o,t);if(F.from(a).lt(I))throw new Error(`The staked amount is too small. Please stake at least ${Fl(I)}`);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: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=>({...ie("MotionStaked",r),...ie("MotionEventSet",r)}))}submitVote(e,t){let a=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.config.getSigner().getAddress(),{key:p,value:f,branchMask:x,siblings:I}=await this.colony.reputation.getReputationWithProofs(o,l,s),_=await this.createMotionSalt(e),v=te.solidityKeccak256(["bytes","uint256"],[_,t]);return[e,v,p,f,x,I]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"submitVote",a,async i=>({...ie("MotionVoteSubmitted",i)}))}revealVote(e,t){let a=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.config.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:I,value:_,branchMask:v,siblings:S}=p;return[e,f,F.from(x),I,_,v,S]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"revealVote",a,async i=>({...ie("MotionVoteRevealed",i)}))}escalateMotion(e,t){let a=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.config.getSigner().getAddress(),p=await wi(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),t,r),{key:f,value:x,branchMask:I,siblings:_}=await this.colony.reputation.getReputationWithProofs(o,l,s);return[e,t,p,f,x,I,_]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"escalateMotion",a,async i=>({...ie("MotionEscalated",i)}))}finalizeMotion(e){let t=async()=>{let a=await this.votingReputationContract.getMotionState(e);if(a!==zt.Finalizable)throw new Error(`Motion cannot be finalized. It's currently in "${zt[a]}" state`);return[e]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"finalizeMotion",t,async a=>({...ie("MotionFinalized",a)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Ba(Ae.VotingReputation),t],async a=>({...ie("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}}},Ha=Bn;Ha.supportedVersions=[{version:7,factory:Li},{version:8,factory:Ui},{version:9,factory:Vi}],Ha.extensionType=Ae.VotingReputation;var v1={["motion"]:Ha,["oneTx"]:ja},Or=class{static async connect(e,t){let a=await Er(t,e.config.signerOrProvider),i=Or.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.config.signerOrProvider),s=await r.getToken(),o=await k6(e,s),l=new Or(e,r,o,a);return await l.updateExtensions(),l}static getLatestSupportedVersion(){return Or.supportedVersions[Or.supportedVersions.length-1].version}constructor(e,t,a,i){this.colony=t,this.colonyNetwork=e,this.config=e.config,this.address=t.address,this.ext={},this.reputation=new ta(e.getInternalNetworkContract(),t,{customEndpointUrl:e.config.reputationOracleEndpoint}),this.token=a,this.version=i}createColonyTxCreator(e,t,a,i,r){return new Dr({colony:this,config:this.colonyNetwork.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createPermissionedColonyTxCreator(e,t,a,i,r,s){return new Dr({colony:this,config:this.colonyNetwork.config,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 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.config.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.config.ipfs.uploadMetadata(Re.Domain,e),[_e.RootDomain,t]},{roles:vt.Architecture,domain:_e.RootDomain},async t=>({...ie("DomainAdded",t),...ie("FundingPotAdded",t),...ie("DomainMetadata",t)}),{metadataType:Re.Domain}):this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256)",[_e.RootDomain],{roles:vt.Architecture,domain:_e.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.config.ipfs.uploadMetadata(Re.Domain,e),[_e.RootDomain,t]},{roles:vt.Architecture,domain:_e.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 a=>({...ie("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=>({...ie("ColonyFundsClaimed",a)}))}moveFundsToTeam(e,t,a,i){let r=_e.RootDomain,s=a||_e.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(),I=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,I,_,v,S,e,o]},async l=>({...ie("ColonyFundsMovedBetweenFundingPots",l)}))}async getReputation(e,t=_e.RootDomain,a=3){let{skillId:i}=await this.colony.getDomain(t);return this.reputation.getReputationFraction(i,e,void 0,a)}async getReputationPoints(e,t=_e.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=>({...ie("ArbitraryTransaction(address,address,bytes,bool)",a)}))}annotateTransaction(e,t){return this.createColonyTxCreator(this.colony,"annotateTransaction",async()=>{let a;return typeof t=="string"?a=t:a=await this.config.ipfs.uploadMetadata(Re.Annotation,t),[e,a]},async a=>({...ie("Annotation",a)}),{metadataType:Re.Annotation})}installExtension(e){let t=v1[e],a=t.getLatestSupportedVersion(),{extensionType:i}=t;if(!_i(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",[Ba(i),t.getLatestSupportedVersion()],async s=>({...Fu("ExtensionInstalled",s,r.interface)}))}async getRoles(e,t=_e.RootDomain){let a=await this.colony.getUserRoles(e,t);return nu(a)}setRoles(e,t,a=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let i=await this.getRoles(e,a),r=Array.from(new Set([...i,...[].concat(t)])),s=Ll(r);return[e,a,s]},{roles:vt.Architecture,domain:a},async i=>({...ie("ColonyRoleSet",i),...ie("RecoveryRoleSet",i)}))}unsetRoles(e,t,a=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let r=(await this.getRoles(e,a)).filter(o=>![].concat(t).includes(o)),s=Ll(r);return[e,a,s]},{roles:vt.Architecture,domain:a},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 a=[],i=await t.getTokenLocking();return e?a=[...e,i]:a=[i],[this.token.address,this.address,a]},async a=>({...ie("TokenAuthorityDeployed",a)}))}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 a=>({...ie("ColonyUpgraded",a)}))}awardReputation(e,t,a=_e.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=>({...ie("ArbitraryReputationUpdate",i)}))}smiteReputation(e,t,a=_e.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:vt.Arbitration},async i=>({...ie("ArbitraryReputationUpdate",i)}))}},js=Or;js.supportedVersions=[{version:11,factory:Pi},{version:12,factory:Ni},{version:13,factory:Di}];var{splitSignature:gR}=te;var{namehash:LR}=te,{AddressZero:UR}=yt;var k1=new Zn.JsonRpcProvider(Ms.ArbitrumOne),{isAddress:A1}=te,E1=(n,e)=>{let t=new Va(k1),a=t.createEventSource(Rr),i=t.createMultiFilter(a,["DomainAdded(address,uint256)","DomainMetadata(address,uint256,string)"],n),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}})},Bp=document.querySelector("#address"),A6=document.querySelector("#button"),Fp=document.querySelector("#error"),E6=document.querySelector("#result");if(!Bp||!A6||!Fp||!E6)throw new Error("Could not find all required HTML elements");var M1=n=>{Fp.innerText=n},C1=()=>{Fp.innerText=""},Op=n=>{E6.innerText=n};A6.addEventListener("click",async()=>{C1();let n=Bp.value;return A1(n)?(Bp.value="",E1(n,e=>{Op(`A domain with id ${e[0].data.domainId} was created on Colony ${e[0].address}.`),e.forEach(async t=>{if(t.getMetadata){let a=await t.getMetadata();if(a.name===Re.Domain){let{domainName:i,domainColor:r,domainPurpose:s}=a.data;Op(`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}`)}}})}),Op(`Set up event listener for Colony ${n}`),null):M1("This is not a valid address")});})(); /** * [js-sha3]{@link https://github.com/emn178/js-sha3} * diff --git a/index.js b/index.js index 3a9c26d6a..326bc9d8a 100644 --- a/index.js +++ b/index.js @@ -1,7 +1,7 @@ -"use strict";(()=>{var d6=Object.create;var Fs=Object.defineProperty;var l6=Object.getOwnPropertyDescriptor;var p6=Object.getOwnPropertyNames;var y6=Object.getPrototypeOf,f6=Object.prototype.hasOwnProperty;var c6=(n,e,t)=>e in n?Fs(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var X=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),Li=(n,e)=>{for(var t in e)Fs(n,t,{get:e[t],enumerable:!0})},m6=(n,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of p6(e))!f6.call(n,i)&&i!==t&&Fs(n,i,{get:()=>e[i],enumerable:!(a=l6(e,i))||a.enumerable});return n};var wn=(n,e,t)=>(t=n!=null?d6(y6(n)):{},m6(e||!n||!n.__esModule?Fs(t,"default",{value:n,enumerable:!0}):t,n));var me=(n,e,t)=>(c6(n,typeof e!="symbol"?e+"":e,t),t);var _p=X(()=>{});var $u=X((kp,Ju)=>{(function(n,e){"use strict";function t(E,u){if(!E)throw new Error(u||"Assertion failed")}function a(E,u){E.super_=u;var y=function(){};y.prototype=u.prototype,E.prototype=new y,E.prototype.constructor=E}function i(E,u,y){if(i.isBN(E))return E;this.negative=0,this.words=null,this.length=0,this.red=null,E!==null&&((u==="le"||u==="be")&&(y=u,u=10),this._init(E||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=_p().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(E,u){var y=E.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 "+E)}function o(E,u,y){var x=s(E,y);return y-1>=u&&(x|=s(E,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(E,u,y,x){for(var T=0,_=0,h=Math.min(E.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"],M=[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=M[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 C(E){for(var u=new Array(E.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),I=Math.max(0,d-E.length+1);I<=c;I++){var S=d-I|0;T=E.words[S]|0,_=u.words[I]|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,I=L>>>13,S=T[1]|0,O=S&8191,H=S>>>13,Q=T[2]|0,W=Q&8191,z=Q>>>13,yt=T[3]|0,$=yt&8191,se=yt>>>13,Va=T[4]|0,Pe=Va&8191,Ne=Va>>>13,ja=T[5]|0,De=ja&8191,Oe=ja>>>13,Ha=T[6]|0,Be=Ha&8191,Fe=Ha>>>13,qa=T[7]|0,Le=qa&8191,Ue=qa>>>13,Ga=T[8]|0,Ve=Ga&8191,je=Ga>>>13,za=T[9]|0,He=za&8191,qe=za>>>13,Ka=_[0]|0,Ge=Ka&8191,ze=Ka>>>13,Wa=_[1]|0,Ke=Wa&8191,We=Wa>>>13,Ja=_[2]|0,Je=Ja&8191,$e=Ja>>>13,$a=_[3]|0,Qe=$a&8191,Xe=$a>>>13,Qa=_[4]|0,Ye=Qa&8191,Ze=Qa>>>13,Xa=_[5]|0,et=Xa&8191,tt=Xa>>>13,Ya=_[6]|0,nt=Ya&8191,at=Ya>>>13,Za=_[7]|0,it=Za&8191,rt=Za>>>13,ei=_[8]|0,st=ei&8191,ot=ei>>>13,ti=_[9]|0,ut=ti&8191,dt=ti>>>13;x.negative=u.negative^y.negative,x.length=19,g=Math.imul(c,Ge),d=Math.imul(c,ze),d=d+Math.imul(I,Ge)|0,m=Math.imul(I,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,Ke)|0,d=d+Math.imul(c,We)|0,d=d+Math.imul(I,Ke)|0,m=m+Math.imul(I,We)|0;var Ta=(w+g|0)+((d&8191)<<13)|0;w=(m+(d>>>13)|0)+(Ta>>>26)|0,Ta&=67108863,g=Math.imul(W,Ge),d=Math.imul(W,ze),d=d+Math.imul(z,Ge)|0,m=Math.imul(z,ze),g=g+Math.imul(O,Ke)|0,d=d+Math.imul(O,We)|0,d=d+Math.imul(H,Ke)|0,m=m+Math.imul(H,We)|0,g=g+Math.imul(c,Je)|0,d=d+Math.imul(c,$e)|0,d=d+Math.imul(I,Je)|0,m=m+Math.imul(I,$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(se,Ge)|0,m=Math.imul(se,ze),g=g+Math.imul(W,Ke)|0,d=d+Math.imul(W,We)|0,d=d+Math.imul(z,Ke)|0,m=m+Math.imul(z,We)|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(I,Qe)|0,m=m+Math.imul(I,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($,Ke)|0,d=d+Math.imul($,We)|0,d=d+Math.imul(se,Ke)|0,m=m+Math.imul(se,We)|0,g=g+Math.imul(W,Je)|0,d=d+Math.imul(W,$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(I,Ye)|0,m=m+Math.imul(I,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,Ke)|0,d=d+Math.imul(Pe,We)|0,d=d+Math.imul(Ne,Ke)|0,m=m+Math.imul(Ne,We)|0,g=g+Math.imul($,Je)|0,d=d+Math.imul($,$e)|0,d=d+Math.imul(se,Je)|0,m=m+Math.imul(se,$e)|0,g=g+Math.imul(W,Qe)|0,d=d+Math.imul(W,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(I,et)|0,m=m+Math.imul(I,tt)|0;var Du=(w+g|0)+((d&8191)<<13)|0;w=(m+(d>>>13)|0)+(Du>>>26)|0,Du&=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,Ke)|0,d=d+Math.imul(De,We)|0,d=d+Math.imul(Oe,Ke)|0,m=m+Math.imul(Oe,We)|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(se,Qe)|0,m=m+Math.imul(se,Xe)|0,g=g+Math.imul(W,Ye)|0,d=d+Math.imul(W,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(I,nt)|0,m=m+Math.imul(I,at)|0;var Ou=(w+g|0)+((d&8191)<<13)|0;w=(m+(d>>>13)|0)+(Ou>>>26)|0,Ou&=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,Ke)|0,d=d+Math.imul(Be,We)|0,d=d+Math.imul(Fe,Ke)|0,m=m+Math.imul(Fe,We)|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(se,Ye)|0,m=m+Math.imul(se,Ze)|0,g=g+Math.imul(W,et)|0,d=d+Math.imul(W,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(I,it)|0,m=m+Math.imul(I,rt)|0;var Bu=(w+g|0)+((d&8191)<<13)|0;w=(m+(d>>>13)|0)+(Bu>>>26)|0,Bu&=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,Ke)|0,d=d+Math.imul(Le,We)|0,d=d+Math.imul(Ue,Ke)|0,m=m+Math.imul(Ue,We)|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(se,et)|0,m=m+Math.imul(se,tt)|0,g=g+Math.imul(W,nt)|0,d=d+Math.imul(W,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(I,st)|0,m=m+Math.imul(I,ot)|0;var Fu=(w+g|0)+((d&8191)<<13)|0;w=(m+(d>>>13)|0)+(Fu>>>26)|0,Fu&=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,Ke)|0,d=d+Math.imul(Ve,We)|0,d=d+Math.imul(je,Ke)|0,m=m+Math.imul(je,We)|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(se,nt)|0,m=m+Math.imul(se,at)|0,g=g+Math.imul(W,it)|0,d=d+Math.imul(W,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(I,ut)|0,m=m+Math.imul(I,dt)|0;var Lu=(w+g|0)+((d&8191)<<13)|0;w=(m+(d>>>13)|0)+(Lu>>>26)|0,Lu&=67108863,g=Math.imul(He,Ke),d=Math.imul(He,We),d=d+Math.imul(qe,Ke)|0,m=Math.imul(qe,We),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(se,it)|0,m=m+Math.imul(se,rt)|0,g=g+Math.imul(W,st)|0,d=d+Math.imul(W,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 Uu=(w+g|0)+((d&8191)<<13)|0;w=(m+(d>>>13)|0)+(Uu>>>26)|0,Uu&=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(se,st)|0,m=m+Math.imul(se,ot)|0,g=g+Math.imul(W,ut)|0,d=d+Math.imul(W,dt)|0,d=d+Math.imul(z,ut)|0,m=m+Math.imul(z,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,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(se,ut)|0,m=m+Math.imul(se,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,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 Hu=(w+g|0)+((d&8191)<<13)|0;w=(m+(d>>>13)|0)+(Hu>>>26)|0,Hu&=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 qu=(w+g|0)+((d&8191)<<13)|0;w=(m+(d>>>13)|0)+(qu>>>26)|0,qu&=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 Gu=(w+g|0)+((d&8191)<<13)|0;w=(m+(d>>>13)|0)+(Gu>>>26)|0,Gu&=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 zu=(w+g|0)+((d&8191)<<13)|0;w=(m+(d>>>13)|0)+(zu>>>26)|0,zu&=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 Wu=(w+g|0)+((d&8191)<<13)|0;return w=(m+(d>>>13)|0)+(Wu>>>26)|0,Wu&=67108863,h[0]=ga,h[1]=Ta,h[2]=va,h[3]=wa,h[4]=_a,h[5]=Du,h[6]=Ou,h[7]=Bu,h[8]=Fu,h[9]=Lu,h[10]=Uu,h[11]=Vu,h[12]=ju,h[13]=Hu,h[14]=qu,h[15]=Gu,h[16]=zu,h[17]=Ku,h[18]=Wu,w!==0&&(h[19]=w,x.length++),x};Math.imul||(N=D);function F(E,u,y){y.negative=u.negative^E.negative,y.length=E.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(E,u,y){return F(E,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(E,u){this.x=E,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=C(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 I=(T.words[_.length+c]|0)*67108864+(T.words[_.length+c-1]|0);for(I=Math.min(I/h|0,67108863),T._ishlnsubmul(_,I,c);T.negative!==0;)I--,T.negative=0,T._ishlnsubmul(_,1,c),T.isZero()||(T.negative^=1);d&&(d.words[c]=I)}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 I=0,S=1;(x.words[0]&S)===0&&I<26;++I,S<<=1);if(I>0)for(x.iushrn(I);I-- >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 ie(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 K(E,u){this.name=E,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()}K.prototype._tmp=function(){var u=new i(null);return u.words=new Array(Math.ceil(this.n/13)),u},K.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},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")}a(ye,K),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 ie(E){if(typeof E=="string"){var u=i._prime(E);this.m=u.p,this.prime=u}else t(E.gtn(1),"modulus must be greater than 1"),this.m=E,this.prime=null}ie.prototype._verify1=function(u){t(u.negative===0,"red works only with positives"),t(u.red,"red works only with red numbers")},ie.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")},ie.prototype.imod=function(u){return this.prime?this.prime.ireduce(u)._forceRed(this):(p(u,u.umod(this.m)._forceRed(this)),u)},ie.prototype.neg=function(u){return u.isZero()?u.clone():this.m.sub(u)._forceRed(this)},ie.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)},ie.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},ie.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)},ie.prototype.isub=function(u,y){this._verify2(u,y);var x=u.isub(y);return x.cmpn(0)<0&&x.iadd(this.m),x},ie.prototype.shl=function(u,y){return this._verify1(u),this.imod(u.ushln(y))},ie.prototype.imul=function(u,y){return this._verify2(u,y),this.imod(u.imul(y))},ie.prototype.mul=function(u,y){return this._verify2(u,y),this.imod(u.mul(y))},ie.prototype.isqr=function(u){return this.imul(u,u.clone())},ie.prototype.sqr=function(u){return this.mul(u,u)},ie.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),I=_;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},ie.prototype.convertTo=function(u){var y=u.umod(this.m);return y===u?y.clone():y},ie.prototype.convertFrom=function(u){var y=u.clone();return y.red=null,y},i.mont=function(u){return new we(u)};function we(E){ie.call(this,E),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(we,ie),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 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)},we.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)},we.prototype.invm=function(u){var y=this.imod(u._invmp(this.m).mul(this.r2));return y._forceRed(this)}})(typeof Ju>"u"||Ju,kp)});var $p=X((X1,qs)=>{(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 qs=="object"&&qs.exports,o=typeof define=="function"&&define.amd,l=!a.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",p="0123456789abcdef".split(""),f=[31,7936,2031616,520093696],b=[4,1024,262144,67108864],M=[1,256,65536,16777216],k=[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};(a.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(c){return Object.prototype.toString.call(c)==="[object Array]"}),l&&(a.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,I,S){return function(O){return new d(c,I,c).update(O)[S]()}},q=function(c,I,S){return function(O,H){return new d(c,I,H).update(O)[S]()}},K=function(c,I,S){return function(O,H,Q,W){return u["cshake"+c].update(O,H,Q,W)[S]()}},ye=function(c,I,S){return function(O,H,Q,W){return u["kmac"+c].update(O,H,Q,W)[S]()}},te=function(c,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}d.prototype.update=function(c){if(this.finalized)throw new Error(e);var I,S=typeof c;if(S!=="string"){if(S==="object"){if(c===null)throw new Error(n);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(n)}else throw new Error(n);I=!0}for(var O=this.blocks,H=this.byteCount,Q=c.length,W=this.blockCount,z=0,yt=this.s,$,se;z>2]|=c[z]<>2]|=se<>2]|=(192|se>>6)<>2]|=(128|se&63)<=57344?(O[$>>2]|=(224|se>>12)<>2]|=(128|se>>6&63)<>2]|=(128|se&63)<>2]|=(240|se>>18)<>2]|=(128|se>>12&63)<>2]|=(128|se>>6&63)<>2]|=(128|se&63)<=H){for(this.start=$-H,this.block=O[W],$=0;$>8,S=c&255;S>0;)H.unshift(S),c=c>>8,S=c&255,++O;return I?H.push(O):H.unshift(O),this.update(H),H.length},d.prototype.encodeString=function(c){var I,S=typeof c;if(S!=="string"){if(S==="object"){if(c===null)throw new Error(n);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(n)}else throw new Error(n);I=!0}var O=0,H=c.length;if(I)O=H;else for(var Q=0;Q=57344?O+=3:(W=65536+((W&1023)<<10|c.charCodeAt(++Q)&1023),O+=4)}return O+=this.encode(O*8),this.update(c),O},d.prototype.bytepad=function(c,I){for(var S=this.encode(I),O=0;O>2]|=this.padding[I&3],this.lastByteIndex===this.byteCount)for(c[0]=c[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%c===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},d.prototype.arrayBuffer=function(){this.finalize();var c=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 yt=new Uint32Array(z);Q>8&255,W[z+2]=yt>>16&255,W[z+3]=yt>>24&255;Q%c===0&&L(I)}return O&&(z=Q<<2,yt=I[H],W[z]=yt&255,O>1&&(W[z+1]=yt>>8&255),O>2&&(W[z+2]=yt>>16&255)),W};function m(c,I,S){d.call(this,c,I,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 I,S,O,H,Q,W,z,yt,$,se,Va,Pe,Ne,ja,De,Oe,Ha,Be,Fe,qa,Le,Ue,Ga,Ve,je,za,He,qe,Ka,Ge,ze,Wa,Ke,We,Ja,Je,$e,$a,Qe,Xe,Qa,Ye,Ze,Xa,et,tt,Ya,nt,at,Za,it,rt,ei,st,ot,ti,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],W=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],se=c[6]^c[16]^c[26]^c[36]^c[46],Va=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],I=Pe^(W<<1|z>>>31),S=Ne^(z<<1|W>>>31),c[0]^=I,c[1]^=S,c[10]^=I,c[11]^=S,c[20]^=I,c[21]^=S,c[30]^=I,c[31]^=S,c[40]^=I,c[41]^=S,I=H^(yt<<1|$>>>31),S=Q^($<<1|yt>>>31),c[2]^=I,c[3]^=S,c[12]^=I,c[13]^=S,c[22]^=I,c[23]^=S,c[32]^=I,c[33]^=S,c[42]^=I,c[43]^=S,I=W^(se<<1|Va>>>31),S=z^(Va<<1|se>>>31),c[4]^=I,c[5]^=S,c[14]^=I,c[15]^=S,c[24]^=I,c[25]^=S,c[34]^=I,c[35]^=S,c[44]^=I,c[45]^=S,I=yt^(Pe<<1|Ne>>>31),S=$^(Ne<<1|Pe>>>31),c[6]^=I,c[7]^=S,c[16]^=I,c[17]^=S,c[26]^=I,c[27]^=S,c[36]^=I,c[37]^=S,c[46]^=I,c[47]^=S,I=se^(H<<1|Q>>>31),S=Va^(Q<<1|H>>>31),c[8]^=I,c[9]^=S,c[18]^=I,c[19]^=S,c[28]^=I,c[29]^=S,c[38]^=I,c[39]^=S,c[48]^=I,c[49]^=S,ja=c[0],De=c[1],tt=c[11]<<4|c[10]>>>28,Ya=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,We=c[2]<<1|c[3]>>>31,Ja=c[3]<<1|c[2]>>>31,Oe=c[13]<<12|c[12]>>>20,Ha=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,Za=c[34]<<15|c[35]>>>17,it=c[35]<<15|c[34]>>>17,Wa=c[45]<<29|c[44]>>>3,Ke=c[44]<<29|c[45]>>>3,Ve=c[6]<<28|c[7]>>>4,je=c[7]<<28|c[6]>>>4,ti=c[17]<<23|c[16]>>>9,ut=c[16]<<23|c[17]>>>9,$a=c[26]<<25|c[27]>>>7,Qe=c[27]<<25|c[26]>>>7,qa=c[36]<<21|c[37]>>>11,Le=c[37]<<21|c[36]>>>11,rt=c[47]<<24|c[46]>>>8,ei=c[46]<<24|c[47]>>>8,Xa=c[8]<<27|c[9]>>>5,et=c[9]<<27|c[8]>>>5,za=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,Qa=c[39]<<8|c[38]>>>24,Ue=c[48]<<14|c[49]>>>18,Ga=c[49]<<14|c[48]>>>18,c[0]=ja^~Oe&Be,c[1]=De^~Ha&Fe,c[10]=Ve^~za&qe,c[11]=je^~He&Ka,c[20]=We^~Je&$a,c[21]=Ja^~$e&Qe,c[30]=Xa^~tt&nt,c[31]=et^~Ya&at,c[40]=st^~ti&dt,c[41]=ot^~ut&ga,c[2]=Oe^~Be&qa,c[3]=Ha^~Fe&Le,c[12]=za^~qe&Ge,c[13]=He^~Ka&ze,c[22]=Je^~$a&Xe,c[23]=$e^~Qe&Qa,c[32]=tt^~nt&Za,c[33]=Ya^~at&it,c[42]=ti^~dt&Ta,c[43]=ut^~ga&va,c[4]=Be^~qa&Ue,c[5]=Fe^~Le&Ga,c[14]=qe^~Ge&Wa,c[15]=Ka^~ze&Ke,c[24]=$a^~Xe&Ye,c[25]=Qe^~Qa&Ze,c[34]=nt^~Za&rt,c[35]=at^~it&ei,c[44]=dt^~Ta&wa,c[45]=ga^~va&_a,c[6]=qa^~Ue&ja,c[7]=Le^~Ga&De,c[16]=Ge^~Wa&Ve,c[17]=ze^~Ke&je,c[26]=Xe^~Ye&We,c[27]=Qa^~Ze&Ja,c[36]=Za^~rt&Xa,c[37]=it^~ei&et,c[46]=Ta^~wa&st,c[47]=va^~_a&ot,c[8]=Ue^~ja&Oe,c[9]=Ga^~De&Ha,c[18]=Wa^~Ve&za,c[19]=Ke^~je&He,c[28]=Ye^~We&Je,c[29]=Ze^~Ja&$e,c[38]=rt^~Xa&tt,c[39]=ei^~et&Ya,c[48]=wa^~st&ti,c[49]=_a^~ot&ut,c[0]^=C[O],c[1]^=C[O+1]};if(s)qs.exports=u;else{for(x=0;x{Gy.exports=qy;function qy(n,e){if(!n)throw new Error(e||"Assertion failed")}qy.equal=function(e,t,a){if(e!=t)throw new Error(a||"Assertion failed: "+e+" != "+t)}});var zy=X((qv,wd)=>{typeof Object.create=="function"?wd.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:wd.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 kn=X(Se=>{"use strict";var T2=Zi(),v2=zy();Se.inherits=v2;function w2(n,e){return(n.charCodeAt(e)&64512)!==55296||e<0||e+1>=n.length?!1:(n.charCodeAt(e+1)&64512)===56320}function _2(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):w2(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}Se.htonl=Ky;function A2(n,e){for(var t="",a=0;a>>0}return r}Se.join32=E2;function M2(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}Se.split32=M2;function C2(n,e){return n>>>e|n<<32-e}Se.rotr32=C2;function I2(n,e){return n<>>32-e}Se.rotl32=I2;function S2(n,e){return n+e>>>0}Se.sum32=S2;function R2(n,e,t){return n+e+t>>>0}Se.sum32_3=R2;function P2(n,e,t,a){return n+e+t+a>>>0}Se.sum32_4=P2;function N2(n,e,t,a,i){return n+e+t+a+i>>>0}Se.sum32_5=N2;function D2(n,e,t,a){var i=n[e],r=n[e+1],s=a+r>>>0,o=(s>>0,n[e+1]=s}Se.sum64=D2;function O2(n,e,t,a){var i=e+a>>>0,r=(i>>0}Se.sum64_hi=O2;function B2(n,e,t,a){var i=e+a;return i>>>0}Se.sum64_lo=B2;function F2(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}Se.sum64_4_hi=F2;function L2(n,e,t,a,i,r,s,o){var l=e+a+r+o;return l>>>0}Se.sum64_4_lo=L2;function U2(n,e,t,a,i,r,s,o,l,p){var f=0,b=e;b=b+a>>>0,f+=b>>0,f+=b>>0,f+=b>>0,f+=b>>0}Se.sum64_5_hi=U2;function V2(n,e,t,a,i,r,s,o,l,p){var f=e+a+r+o+p;return f>>>0}Se.sum64_5_lo=V2;function j2(n,e,t){var a=e<<32-t|n>>>t;return a>>>0}Se.rotr64_hi=j2;function H2(n,e,t){var a=n<<32-t|e>>>t;return a>>>0}Se.rotr64_lo=H2;function q2(n,e,t){return n>>>t}Se.shr64_hi=q2;function G2(n,e,t){var a=n<<32-t|e>>>t;return a>>>0}Se.shr64_lo=G2});var er=X(Qy=>{"use strict";var $y=kn(),z2=Zi();function po(){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}Qy.BlockHash=po;po.prototype.update=function(e,t){if(e=$y.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=$y.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 K2=kn(),jn=K2.rotr32;function W2(n,e,t,a){if(n===0)return Xy(e,t,a);if(n===1||n===3)return Zy(e,t,a);if(n===2)return Yy(e,t,a)}oa.ft_1=W2;function Xy(n,e,t){return n&e^~n&t}oa.ch32=Xy;function Yy(n,e,t){return n&e^n&t^e&t}oa.maj32=Yy;function Zy(n,e,t){return n^e^t}oa.p32=Zy;function J2(n){return jn(n,2)^jn(n,13)^jn(n,22)}oa.s0_256=J2;function $2(n){return jn(n,6)^jn(n,11)^jn(n,25)}oa.s1_256=$2;function Q2(n){return jn(n,7)^jn(n,18)^n>>>3}oa.g0_256=Q2;function X2(n){return jn(n,17)^jn(n,19)^n>>>10}oa.g1_256=X2});var n0=X((Wv,t0)=>{"use strict";var tr=kn(),Y2=er(),Z2=_d(),kd=tr.rotl32,zr=tr.sum32,eh=tr.sum32_5,th=Z2.ft_1,e0=Y2.BlockHash,nh=[1518500249,1859775393,2400959708,3395469782];function Hn(){if(!(this instanceof Hn))return new Hn;e0.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}tr.inherits(Hn,e0);t0.exports=Hn;Hn.blockSize=512;Hn.outSize=160;Hn.hmacStrength=80;Hn.padLength=64;Hn.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 nr=kn(),ah=er(),ar=_d(),ih=Zi(),An=nr.sum32,rh=nr.sum32_4,sh=nr.sum32_5,oh=ar.ch32,uh=ar.maj32,dh=ar.s0_256,lh=ar.s1_256,ph=ar.g0_256,yh=ar.g1_256,a0=ah.BlockHash,fh=[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;a0.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=fh,this.W=new Array(64)}nr.inherits(qn,a0);i0.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 Ed=kn(),r0=Ad();function ua(){if(!(this instanceof ua))return new ua;r0.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}Ed.inherits(ua,r0);s0.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 Id=X((Qv,p0)=>{"use strict";var Qt=kn(),ch=er(),mh=Zi(),Gn=Qt.rotr64_hi,zn=Qt.rotr64_lo,u0=Qt.shr64_hi,d0=Qt.shr64_lo,Ca=Qt.sum64,Md=Qt.sum64_hi,Cd=Qt.sum64_lo,hh=Qt.sum64_4_hi,xh=Qt.sum64_4_lo,bh=Qt.sum64_5_hi,gh=Qt.sum64_5_lo,l0=ch.BlockHash,Th=[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;l0.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=Th,this.W=new Array(160)}Qt.inherits(En,l0);p0.exports=En;En.blockSize=1024;En.outSize=512;En.hmacStrength=192;En.padLength=128;En.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 Sd=kn(),y0=Id();function da(){if(!(this instanceof da))return new da;y0.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}Sd.inherits(da,y0);f0.exports=da;da.blockSize=1024;da.outSize=384;da.hmacStrength=192;da.padLength=128;da.prototype._digest=function(e){return e==="hex"?Sd.toHex32(this.h.slice(0,12),"big"):Sd.split32(this.h.slice(0,12),"big")}});var m0=X(ir=>{"use strict";ir.sha1=n0();ir.sha224=o0();ir.sha256=Ad();ir.sha384=c0();ir.sha512=Id()});var v0=X(T0=>{"use strict";var ui=kn(),Nh=er(),yo=ui.rotl32,h0=ui.sum32,Kr=ui.sum32_3,x0=ui.sum32_4,g0=Nh.BlockHash;function Kn(){if(!(this instanceof Kn))return new Kn;g0.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}ui.inherits(Kn,g0);T0.ripemd160=Kn;Kn.blockSize=512;Kn.outSize=160;Kn.hmacStrength=192;Kn.padLength=64;Kn.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,f=r,b=s,M=o,k=0;k<80;k++){var v=h0(yo(x0(a,b0(k,i,r,s),e[Bh[k]+t],Dh(k)),Lh[k]),o);a=o,o=s,s=yo(r,10),r=i,i=v,v=h0(yo(x0(l,b0(79-k,p,f,b),e[Fh[k]+t],Oh(k)),Uh[k]),M),l=M,M=b,b=yo(f,10),f=p,p=v}v=Kr(this.h[1],r,b),this.h[1]=Kr(this.h[2],s,M),this.h[2]=Kr(this.h[3],o,l),this.h[3]=Kr(this.h[4],a,p),this.h[4]=Kr(this.h[0],i,f),this.h[0]=v};Kn.prototype._digest=function(e){return e==="hex"?ui.toHex32(this.h,"little"):ui.split32(this.h,"little")};function b0(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 Dh(n){return n<=15?0:n<=31?1518500249:n<=47?1859775393:n<=63?2400959708:2840853838}function Oh(n){return n<=15?1352829926:n<=31?1548603684:n<=47?1836072691:n<=63?2053994217:0}var Bh=[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],Fh=[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],Lh=[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],Uh=[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 _0=X((e3,w0)=>{"use strict";var Vh=kn(),jh=Zi();function rr(n,e,t){if(!(this instanceof rr))return new rr(n,e,t);this.Hash=n,this.blockSize=n.blockSize/8,this.outSize=n.outSize/8,this.inner=null,this.outer=null,this._init(Vh.toArray(e,t))}w0.exports=rr;rr.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),jh(e.length<=this.blockSize);for(var t=e.length;t{var St=k0;St.utils=kn();St.common=er();St.sha=m0();St.ripemd=v0();St.hmac=_0();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 Qd=X(($d,Y0)=>{"use strict";(function(n){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 a(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],M=[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],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 c=0,I=d,S;I>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=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]},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]^C[d[(m+3)%4]&255]^this._Ke[L][m];d=g.slice()}for(var c=i(16),I,m=0;m<4;m++)I=this._Ke[w][m],c[4*m]=(f[d[m]>>24&255]^I>>24)&255,c[4*m+1]=(f[d[(m+1)%4]>>16&255]^I>>16)&255,c[4*m+2]=(f[d[(m+2)%4]>>8&255]^I>>8)&255,c[4*m+3]=(f[d[(m+3)%4]&255]^I)&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),I,m=0;m<4;m++)I=this._Kd[w][m],c[4*m]=(b[d[m]>>24&255]^I>>24)&255,c[4*m+1]=(b[d[(m+3)%4]>>16&255]^I>>16)&255,c[4*m+2]=(b[d[(m+2)%4]>>8&255]^I>>8)&255,c[4*m+3]=(b[d[(m+1)%4]&255]^I)&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=a(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=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,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=a(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(n){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]),C=1779033703,D=3144134277,N=1013904242,F=2773480762,U=1359893119,G=2600822924,q=528734635,K=1541459225,ye=new Uint32Array(64);function te(y){let x=0,T=y.length;for(;T>=64;){let _=C,h=D,w=N,g=F,d=U,m=G,L=q,c=K,I,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++)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=(((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;C=C+_|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,K=K+c|0,x+=64,T-=64}}te(k);let ae,Re=k.length%64,ie=k.length/536870912|0,we=k.length<<3,E=Re<56?56:120,u=k.slice(k.length-Re,k.length);for(u.push(128),ae=Re+1;ae>>24&255),u.push(ie>>>16&255),u.push(ie>>>8&255),u.push(ie>>>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 a(k,v,C){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;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 i(k,v,C,D,N){let F;for(l(k,(2*C-1)*16,N,0,16),F=0;F<2*C;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 C=8;C>0;C-=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 C=0;C<16;++C)k[C]+=v[C]}function o(k,v,C,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,C,D,N,F,U){if(C=f(C,"N"),D=f(D,"r"),N=f(N,"p"),F=f(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(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=a(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=a(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 M={scrypt:function(k,v,C,D,N,F,U){return new Promise(function(G,q){let K=0;U&&U(0),b(k,v,C,D,N,F,function(ye,te,ae){if(ye)q(ye);else if(ae)U&&K!==1&&U(1),G(new Uint8Array(ae));else if(U&&te!==K)return K=te,U(te)})})},syncScrypt:function(k,v,C,D,N,F){return new Uint8Array(b(k,v,C,D,N,F))}};typeof tl<"u"?ef.exports=M:typeof define=="function"&&define.amd?define(M):n&&(n.scrypt&&(n._scrypt=n.scrypt),n.scrypt=M)})(tl)});var Ef=X((qw,Af)=>{"use strict";var Bo="qpzry9x8gf2tvdw0s3jn54khce6mua7l",sl={};for(ns=0;ns>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 _f(n){for(var e=1,t=0;t126)return"Invalid prefix ("+n+")";e=cr(e)^a>>5}for(e=cr(e),t=0;tt)throw new TypeError("Exceeds length limit");n=n.toLowerCase();var a=_f(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=cr(a)^s,i+=Bo.charAt(s)}for(r=0;r<6;++r)a=cr(a);for(a^=1,r=0;r<6;++r){var o=a>>(5-r)*5&31;i+=Bo.charAt(o)}return i}function kf(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=_f(r);if(typeof o=="string")return o;for(var l=[],p=0;p=s.length)&&l.push(b)}return o!==1?"Invalid checksum for "+n:{prefix:r,words:l}}function Ax(){var n=kf.apply(null,arguments);if(typeof n=="object")return n}function Ex(n){var e=kf.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function Fo(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 Ll=="object"&&typeof Ul<"u"?Ul.exports=e():typeof define=="function"&&define.amd?define(e):(n=typeof globalThis<"u"?globalThis:n||self,n.fetchRetry=e())})(Ll,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,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(M,k){var v=function(D){var N=typeof Request<"u"&&o instanceof Request?o.clone():o;a(N,l).then(function(F){if(Array.isArray(b)&&b.indexOf(F.status)===-1)M(F);else if(typeof b=="function")try{return Promise.resolve(b(D,null,F)).then(function(U){U?C(D,null,F):M(F)}).catch(k)}catch(U){k(U)}else D=0}function t(a){this.name="ArgumentError",this.message=a}return n})});var Vl=X(Yo=>{"use strict";Object.defineProperty(Yo,"__esModule",{value:!0});Yo.$dictionary=void 0;Yo.$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 As=X((Qk,Vc)=>{Vc.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}});var Hl=X(Ba=>{var Ae=As(),jl=()=>[{type:Ae.RANGE,from:48,to:57}],jc=()=>[{type:Ae.CHAR,value:95},{type:Ae.RANGE,from:97,to:122},{type:Ae.RANGE,from:65,to:90}].concat(jl()),Hc=()=>[{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}],x5=()=>[{type:Ae.CHAR,value:10},{type:Ae.CHAR,value:13},{type:Ae.CHAR,value:8232},{type:Ae.CHAR,value:8233}];Ba.words=()=>({type:Ae.SET,set:jc(),not:!1});Ba.notWords=()=>({type:Ae.SET,set:jc(),not:!0});Ba.ints=()=>({type:Ae.SET,set:jl(),not:!1});Ba.notInts=()=>({type:Ae.SET,set:jl(),not:!0});Ba.whitespace=()=>({type:Ae.SET,set:Hc(),not:!1});Ba.notWhitespace=()=>({type:Ae.SET,set:Hc(),not:!0});Ba.anyChar=()=>({type:Ae.SET,set:x5(),not:!0})});var Gc=X(Es=>{var qc=As(),kr=Hl(),b5="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?",g5={0:0,t:9,n:10,v:11,f:12,r:13};Es.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 f=a?8:r?parseInt(r,16):s?parseInt(s,16):o?parseInt(o,8):l?b5.indexOf(l):g5[p],b=String.fromCharCode(f);return/[[\]{}^$.|?*+()]/.test(b)&&(b="\\"+b),b}),n};Es.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(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:qc.RANGE,from:(i[8]||i[9]).charCodeAt(0),to:i[10].charCodeAt(0)});else if(r=i[12])t.push({type:qc.CHAR,value:r.charCodeAt(0)});else return[t,a.lastIndex];Es.error(e,"Unterminated character class")};Es.error=(n,e)=>{throw new SyntaxError("Invalid regular expression: /"+n+"/: "+e)}});var zc=X(Ms=>{var Zo=As();Ms.wordBoundary=()=>({type:Zo.POSITION,value:"b"});Ms.nonWordBoundary=()=>({type:Zo.POSITION,value:"B"});Ms.begin=()=>({type:Zo.POSITION,value:"^"});Ms.end=()=>({type:Zo.POSITION,value:"$"})});var Kc=X((eA,ql)=>{var Ar=Gc(),xn=As(),vi=Hl(),eu=zc();ql.exports=n=>{var e=0,t,a,i={type:xn.ROOT,stack:[]},r=i,s=i.stack,o=[],l=N=>{Ar.error(n,`Nothing to repeat at column ${N-1}`)},p=Ar.strToChars(n);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 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}))}};Wc.exports=Fa});var Qc=X((nA,$c)=>{var tu=Kc(),Cs=Jc(),wi=tu.types;$c.exports=class Is{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=tu(e)}_setDefaults(e){this.max=e.max!=null?e.max:Is.prototype.max!=null?Is.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 wi.ROOT:case wi.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 T5=_i&&_i.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(_i,"__esModule",{value:!0});_i.RandomGenerator=void 0;var v5=T5(Qc()),w5;(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 v5.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()}})(w5=_i.RandomGenerator||(_i.RandomGenerator={}))});var Ss=X(Er=>{"use strict";var _5=Er&&Er.__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(Er,"__esModule",{value:!0});Er.TypeGuardError=void 0;var k5=function(n){_5(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);Er.TypeGuardError=k5});var Yc=X(nu=>{"use strict";Object.defineProperty(nu,"__esModule",{value:!0});nu.$any=void 0;var A5=function(n){return n!==void 0?JSON.parse(JSON.stringify(n)):void 0};nu.$any=A5});var Zc=X(au=>{"use strict";Object.defineProperty(au,"__esModule",{value:!0});au.$every=void 0;var E5=function(n,e){for(var t=null,a=0;a{"use strict";Object.defineProperty(iu,"__esModule",{value:!0});iu.$guard=void 0;var M5=Ss(),C5=function(n){return function(e,t){if(e===!0)throw new M5.TypeGuardError({method:n,path:t.path,expected:t.expected,value:t.value});return!1}};iu.$guard=C5});var tm=X(ru=>{"use strict";Object.defineProperty(ru,"__esModule",{value:!0});ru.$is_between=void 0;var I5=function(n,e,t){return e<=n&&n<=t};ru.$is_between=I5});var nm=X(su=>{"use strict";Object.defineProperty(su,"__esModule",{value:!0});su.$is_custom=void 0;var S5=Vl(),R5=function(n,e,t,a){var i,r=(i=S5.$dictionary.get(n))===null||i===void 0?void 0:i.get(e);return r===void 0?!0:r(t)(a)};su.$is_custom=R5});var am=X(ou=>{"use strict";Object.defineProperty(ou,"__esModule",{value:!0});ou.$is_date=void 0;var P5=function(n){return N5.test(n)};ou.$is_date=P5;var N5=/^(\d{4})-(\d{2})-(\d{2})$/});var im=X(uu=>{"use strict";Object.defineProperty(uu,"__esModule",{value:!0});uu.$is_datetime=void 0;var D5=function(n){return!isNaN(new Date(n).getTime())};uu.$is_datetime=D5});var rm=X(du=>{"use strict";Object.defineProperty(du,"__esModule",{value:!0});du.$is_email=void 0;var O5=function(n){return B5.test(n)};du.$is_email=O5;var B5=/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i});var sm=X(lu=>{"use strict";Object.defineProperty(lu,"__esModule",{value:!0});lu.$is_ipv4=void 0;var F5=function(n){return L5.test(n)};lu.$is_ipv4=F5;var L5=/^(?: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 om=X(pu=>{"use strict";Object.defineProperty(pu,"__esModule",{value:!0});pu.$is_ipv6=void 0;var U5=function(n){return V5.test(n)};pu.$is_ipv6=U5;var V5=/^(([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=X(yu=>{"use strict";Object.defineProperty(yu,"__esModule",{value:!0});yu.$is_url=void 0;var j5=function(n){return H5.test(n)};yu.$is_url=j5;var H5=/^[a-zA-Z0-9]+:\/\/(?:www.)?[-a-zA-Z0-9@:%._+~#=]{1,256}.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/});var dm=X(fu=>{"use strict";Object.defineProperty(fu,"__esModule",{value:!0});fu.$is_uuid=void 0;var q5=function(n){return G5.test(n)};fu.$is_uuid=q5;var G5=/^(?:[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 lm=X(cu=>{"use strict";Object.defineProperty(cu,"__esModule",{value:!0});cu.$join=void 0;var z5=function(n){return K5(n)?".".concat(n):"[".concat(JSON.stringify(n),"]")};cu.$join=z5;var K5=function(n){return W5(n)===!1&&/^[a-zA-Z_$][a-zA-Z_$0-9]*$/g.test(n)},W5=function(n){return J5.has(n)},J5=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 pm=X(mu=>{"use strict";Object.defineProperty(mu,"__esModule",{value:!0});mu.$number=void 0;var $5=Ss(),Q5=function(n){if(isFinite(n)===!1)throw new $5.TypeGuardError({method:"typia.stringify",expected:"number",value:n,message:"Error on typia.stringify(): infinite or not a number."});return n};mu.$number=Q5});var ym=X(hu=>{"use strict";Object.defineProperty(hu,"__esModule",{value:!0});hu.$report=void 0;var X5=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}};hu.$report=X5});var fm=X(xu=>{"use strict";Object.defineProperty(xu,"__esModule",{value:!0});xu.$rest=void 0;var Y5=function(n){return n.length===2?"":","+n.substring(1,n.length-1)};xu.$rest=Y5});var cm=X(bu=>{"use strict";Object.defineProperty(bu,"__esModule",{value:!0});bu.$string=void 0;var Z5=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=Z5});var mm=X(gu=>{"use strict";Object.defineProperty(gu,"__esModule",{value:!0});gu.$tail=void 0;var eb=function(n){return n[n.length-1]===","?n.substring(0,n.length-1):n};gu.$tail=eb});var gm=X(ki=>{"use strict";var Ut=ki&&ki.__assign||function(){return Ut=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 Ut(Ut({},n.is()),{number:fb.$number,string:hb.$string,tail:xb.$tail,rest:mb.$rest,throws:e(t)})},n.clone=function(t){return Ut(Ut({},n.is()),{throws:e(t),any:tb.$any})},n.prune=function(t){return Ut(Ut({},n.is()),{throws:e(t)})},n.random=function(){return{generator:hm.RandomGenerator,pick:hm.RandomGenerator.pick}};var e=function(t){return function(a){throw new xm.TypeGuardError(Ut(Ut({},a),{method:"typia.".concat(t)}))}}})(bb=ki.Namespace||(ki.Namespace={}))});var Tm=X(Rs=>{"use strict";Object.defineProperty(Rs,"__esModule",{value:!0});Rs.MapUtil=void 0;var gb;(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}}})(gb=Rs.MapUtil||(Rs.MapUtil={}))});var wm=X(vm=>{"use strict";Object.defineProperty(vm,"__esModule",{value:!0})});var km=X(_m=>{"use strict";Object.defineProperty(_m,"__esModule",{value:!0})});var Em=X(Am=>{"use strict";Object.defineProperty(Am,"__esModule",{value:!0})});var Cm=X(Mm=>{"use strict";Object.defineProperty(Mm,"__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 np=X(V=>{"use strict";var Tb=V&&V.__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]}),Ai=V&&V.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Tb(e,n,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 Mr=Vl(),Ee=gm(),vb=Tm();Ai(wm(),V);Ai(km(),V);Ai(Em(),V);Ai(Cm(),V);Ai(Sm(),V);Ai(Pm(),V);Ai(Ss(),V);function Gl(){ne("assert")}V.assert=Gl;Object.assign(Gl,Ee.Namespace.assert("assert"));function zl(){ne("assertType")}V.assertType=zl;Object.assign(zl,Ee.Namespace.assert("assertType"));function Tu(){ne("is")}V.is=Tu;Object.assign(Tu,Ee.Namespace.assert("is"));function vu(){ne("validate")}V.validate=vu;Object.assign(vu,Ee.Namespace.validate());function Kl(){ne("assertEquals")}V.assertEquals=Kl;Object.assign(Kl,Ee.Namespace.assert("assertEquals"));function Wl(){ne("equals")}V.equals=Wl;Object.assign(Wl,Ee.Namespace.is());function Jl(){ne("validateEquals")}V.validateEquals=Jl;Object.assign(Jl,Ee.Namespace.validate());V.customValidators={size:function(n){var e,t;return n?(t=(e=Mr.$dictionary.get(n))===null||e===void 0?void 0:e.size)!==null&&t!==void 0?t:0:Mr.$dictionary.size},has:function(n){return function(e){var t,a;return(a=(t=Mr.$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=Mr.$dictionary.get(n))===null||t===void 0?void 0:t.get(e)}},insert:function(n){return function(e){return function(t){var a=vb.MapUtil.take(Mr.$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=Mr.$dictionary.get(n))===null||t===void 0?void 0:t.delete(e))!==null&&a!==void 0?a:!1}}};function wb(){ne("application")}V.application=wb;function $l(){ne("assertParse")}V.assertParse=$l;Object.assign($l,Ee.Namespace.assert("assertParse"));function Ql(){ne("isParse")}V.isParse=Ql;Object.assign(Ql,Tu);function Xl(){ne("validateParse")}V.validateParse=Xl;Object.assign(Xl,vu);function Yl(){ne("stringify")}V.stringify=Yl;Object.assign(Yl,Ee.Namespace.stringify("stringify"));function wu(){ne("assertStringify")}V.assertStringify=wu;Object.assign(wu,Ee.Namespace.assert("assertStringify"));Object.assign(wu,Ee.Namespace.stringify("assertStringify"));function _u(){ne("isStringify")}V.isStringify=_u;Object.assign(_u,Ee.Namespace.is());Object.assign(_u,Ee.Namespace.stringify("isStringify"));function ku(){ne("validateStringify")}V.validateStringify=ku;Object.assign(ku,Ee.Namespace.validate());Object.assign(ku,Ee.Namespace.stringify("validateStringify"));function _b(){ne("metadata")}V.metadata=_b;function Zl(){ne("random")}V.random=Zl;Object.assign(Zl,Ee.Namespace.random());function kb(){ne("literals")}V.literals=kb;function ep(){ne("clone")}V.clone=ep;Object.assign(ep,Ee.Namespace.clone("clone"));function Au(){ne("assertClone")}V.assertClone=Au;Object.assign(Au,Ee.Namespace.assert("assertClone"));Object.assign(Au,Ee.Namespace.clone("assertClone"));function Eu(){ne("isClone")}V.isClone=Eu;Object.assign(Eu,Ee.Namespace.is());Object.assign(Eu,Ee.Namespace.clone("isClone"));function Mu(){ne("validateClone")}V.validateClone=Mu;Object.assign(Mu,Ee.Namespace.validate());Object.assign(Mu,Ee.Namespace.clone("validateClone"));function tp(){ne("prune")}V.prune=tp;Object.assign(tp,Ee.Namespace.prune("prune"));function Cu(){ne("assertPrune")}V.assertPrune=Cu;Object.assign(Cu,Ee.Namespace.assert("assertPrune"));Object.assign(Cu,Ee.Namespace.prune("assertPrune"));function Iu(){ne("isPrune")}V.isPrune=Iu;Object.assign(Iu,Ee.Namespace.is());Object.assign(Iu,Ee.Namespace.prune("isPrune"));function Su(){ne("validatePrune")}V.validatePrune=Su;Object.assign(Su,Ee.Namespace.prune("validatePrune"));Object.assign(Su,Ee.Namespace.validate());function Nm(){ne("createAssert")}V.createAssert=Nm;Object.assign(Nm,Gl);function Dm(){ne("createAssertType")}V.createAssertType=Dm;Object.assign(Dm,zl);function Om(){ne("createIs")}V.createIs=Om;Object.assign(Om,Tu);function Bm(){ne("createValidate")}V.createValidate=Bm;Object.assign(Bm,vu);function Fm(){ne("createAssertEquals")}V.createAssertEquals=Fm;Object.assign(Fm,Kl);function Lm(){ne("createEquals")}V.createEquals=Lm;Object.assign(Lm,Wl);function Um(){ne("createValidateEquals")}V.createValidateEquals=Um;Object.assign(Um,Jl);function Vm(){ne("createIsParse")}V.createIsParse=Vm;Object.assign(Vm,Ql);function jm(){ne("createAssertParse")}V.createAssertParse=jm;Object.assign(jm,$l);function Hm(){ne("createValidateParse")}V.createValidateParse=Hm;Object.assign(Hm,Xl);function qm(){ne("createStringify")}V.createStringify=qm;Object.assign(qm,Yl);function Gm(){ne("createAssertStringify")}V.createAssertStringify=Gm;Object.assign(Gm,wu);function zm(){ne("createIsStringify")}V.createIsStringify=zm;Object.assign(zm,_u);function Km(){ne("createValidateStringify")}V.createValidateStringify=Km;Object.assign(Km,ku);function Wm(){ne("createRandom")}V.createRandom=Wm;Object.assign(Wm,Zl);function Jm(){ne("createClone")}V.createClone=Jm;Object.assign(Jm,ep);function $m(){ne("createAssertClone")}V.createAssertClone=$m;Object.assign($m,Au);function Qm(){ne("createIsClone")}V.createIsClone=Qm;Object.assign(Qm,Eu);function Xm(){ne("createValidateClone")}V.createValidateClone=Xm;Object.assign(Xm,Mu);function Ym(){ne("createPrune")}V.createPrune=Ym;Object.assign(Ym,tp);function Zm(){ne("createAssertPrune")}V.createAssertPrune=Zm;Object.assign(Zm,Cu);function e6(){ne("createIsPrune")}V.createIsPrune=e6;Object.assign(e6,Iu);function t6(){ne("createValidatePrune")}V.createValidatePrune=t6;Object.assign(t6,Su);function ne(n){throw new Error("Error on typia.".concat(n,'(): no transform has been configured. Run "npx typia setup" command.'))}});var a6=X(gn=>{"use strict";var n6=gn&&gn.__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]}),Ab=gn&&gn.__setModuleDefault||(Object.create?function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}:function(n,e){n.default=e}),Eb=gn&&gn.__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)&&n6(e,n,t);return Ab(e,n),e},Mb=gn&&gn.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&n6(e,n,t)};Object.defineProperty(gn,"__esModule",{value:!0});var Cb=Eb(np());gn.default=Cb;Mb(np(),gn)});var vl={};Li(vl,{BaseContract:()=>or,BigNumber:()=>P,Contract:()=>ue,ContractFactory:()=>yi,FixedNumber:()=>ft,Signer:()=>Gt,VoidSigner:()=>sa,Wallet:()=>Cn,Wordlist:()=>hn,constants:()=>ht,errors:()=>Kt,getDefaultProvider:()=>Jo,logger:()=>oc,providers:()=>Da,utils:()=>Y,version:()=>Qo,wordlists:()=>ci});var Bp=wn($u());var Ap="logger/5.7.0";var Ep=!1,Mp=!1,Ls={debug:1,default:2,info:2,warning:3,error:4,off:5},Cp=Ls.default,Qu=null;function h6(){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 Ip=h6(),Xu;(function(n){n.DEBUG="DEBUG",n.INFO="INFO",n.WARNING="WARNING",n.ERROR="ERROR",n.OFF="OFF"})(Xu||(Xu={}));var Kt;(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"})(Kt||(Kt={}));var Sp="0123456789abcdef",A=class{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){let a=e.toLowerCase();Ls[a]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(Cp>Ls[a])&&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,a){if(Mp)return this.makeError("censored error",t,{});t||(t=A.errors.UNKNOWN_ERROR),a||(a={});let i=[];Object.keys(a).forEach(l=>{let p=a[l];try{if(p instanceof Uint8Array){let f="";for(let b=0;b>4],f+=Sp[p[b]&15];i.push(l+"=Uint8Array(0x"+f+")")}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 Kt.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 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+" ]"),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,A.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"),Ip&&this.throwError("platform missing String.prototype.normalize",A.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:Ip})}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,a){a?a=": "+a:a="",et&&this.throwError("too many arguments"+a,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 Qu||(Qu=new A(Ap)),Qu}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",A.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),Ep){if(!e)return;this.globalLogger().throwError("error censorship permanent",A.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}Mp=!!e,Ep=!!t}static setLogLevel(e){let t=Ls[e.toLowerCase()];if(t==null){A.globalLogger().warn("invalid log level - "+e);return}Cp=t}static from(e){return new A(e)}};A.errors=Kt;A.levels=Xu;var Rp="bytes/5.7.0";var wt=new A(Rp);function Np(n){return!!n.toHexString}function Ui(n){return n.slice||(n.slice=function(){let e=Array.prototype.slice.call(arguments);return Ui(new Uint8Array(Array.prototype.slice.apply(n,e)))}),n}function ta(n){return Z(n)&&!(n.length%2)||on(n)}function Pp(n){return typeof n=="number"&&n==n&&n%1===0}function on(n){if(n==null)return!1;if(n.constructor===Uint8Array)return!0;if(typeof n=="string"||!Pp(n.length)||n.length<0)return!1;for(let e=0;e=256)return!1}return!0}function B(n,e){if(e||(e={}),typeof n=="number"){wt.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),Ui(new Uint8Array(t))}if(e.allowMissingPrefix&&typeof n=="string"&&n.substring(0,2)!=="0x"&&(n="0x"+n),Np(n)&&(n=n.toHexString()),Z(n)){let t=n.substring(2);t.length%2&&(e.hexPad==="left"?t="0"+t:e.hexPad==="right"?t+="0":wt.throwArgumentError("hex data is odd-length","value",n));let a=[];for(let i=0;iB(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),Ui(a)}function Zt(n){let e=B(n);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(n,e-n.length),Ui(t)}function Z(n,e){return!(typeof n!="string"||!n.match(/^0x[0-9A-Fa-f]*$/)||e&&n.length!==2+2*e)}var Yu="0123456789abcdef";function j(n,e){if(e||(e={}),typeof n=="number"){wt.checkSafeUint53(n,"invalid hexlify value");let t="";for(;n;)t=Yu[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),Np(n))return n.toHexString();if(Z(n))return n.length%2&&(e.hexPad==="left"?n="0x0"+n.substring(2):e.hexPad==="right"?n+="0":wt.throwArgumentError("hex data is odd-length","value",n)),n.toLowerCase();if(on(n)){let t="0x";for(let a=0;a>4]+Yu[i&15]}return t}return wt.throwArgumentError("invalid hexlify value","value",n)}function Pt(n){if(typeof n!="string")n=j(n);else if(!Z(n)||n.length%2)return null;return(n.length-2)/2}function Me(n,e,t){return typeof n!="string"?n=j(n):(!Z(n)||n.length%2)&&wt.throwArgumentError("invalid hexData","value",n),e=2+2*e,t!=null?"0x"+n.substring(e,2+2*t):"0x"+n.substring(e)}function _t(n){let e="0x";return n.forEach(t=>{e+=j(t).substring(2)}),e}function Fn(n){let e=Zu(j(n,{hexPad:"left"}));return e==="0x"?"0x0":e}function Zu(n){typeof n!="string"&&(n=j(n)),Z(n)||wt.throwArgumentError("invalid hex string","value",n),n=n.substring(2);let e=0;for(;e2*e+2&&wt.throwArgumentError("value out of range","value",arguments[1]);n.length<2*e+2;)n="0x0"+n.substring(2);return n}function Ln(n){let e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(ta(n)){let t=B(n);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",n),e.v<27&&(e.v===0||e.v===1?e.v+=27:wt.throwArgumentError("signature invalid v byte","signature",n)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(t[32]|=128),e._vs=j(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=ni(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",n),i[0]&=127;let s=j(i);e.s==null?e.s=s:e.s!==s&&wt.throwArgumentError("signature v mismatch _vs","signature",n)}if(e.recoveryParam==null)e.v==null?wt.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&&wt.throwArgumentError("signature recoveryParam mismatch v","signature",n)}e.r==null||!Z(e.r)?wt.throwArgumentError("signature missing or invalid r","signature",n):e.r=fe(e.r,32),e.s==null||!Z(e.s)?wt.throwArgumentError("signature missing or invalid s","signature",n):e.s=fe(e.s,32);let t=B(e.s);t[0]>=128&&wt.throwArgumentError("signature s out of range","signature",n),e.recoveryParam&&(t[0]|=128);let a=j(t);e._vs&&(Z(e._vs)||wt.throwArgumentError("signature invalid _vs","signature",n),e._vs=fe(e._vs,32)),e._vs==null?e._vs=a:e._vs!==a&&wt.throwArgumentError("signature _vs mismatch v and s","signature",n)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function Pr(n){return n=Ln(n),j(de([n.r,n.s,n.recoveryParam?"0x1c":"0x1b"]))}var Us="bignumber/5.7.0";var Nr=Bp.default.BN,na=new A(Us),ed={},Dp=9007199254740991;function Fp(n){return n!=null&&(P.isBigNumber(n)||typeof n=="number"&&n%1===0||typeof n=="string"&&!!n.match(/^-?[0-9]+$/)||Z(n)||typeof n=="bigint"||on(n))}var Op=!1,P=class{constructor(e,t){e!==ed&&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 Wt(he(this).fromTwos(e))}toTwos(e){return Wt(he(this).toTwos(e))}abs(){return this._hex[0]==="-"?P.from(this._hex.substring(1)):this}add(e){return Wt(he(this).add(he(e)))}sub(e){return Wt(he(this).sub(he(e)))}div(e){return P.from(e).isZero()&&un("division-by-zero","div"),Wt(he(this).div(he(e)))}mul(e){return Wt(he(this).mul(he(e)))}mod(e){let t=he(e);return t.isNeg()&&un("division-by-zero","mod"),Wt(he(this).umod(t))}pow(e){let t=he(e);return t.isNeg()&&un("negative-power","pow"),Wt(he(this).pow(t))}and(e){let t=he(e);return(this.isNegative()||t.isNeg())&&un("unbound-bitwise-result","and"),Wt(he(this).and(t))}or(e){let t=he(e);return(this.isNegative()||t.isNeg())&&un("unbound-bitwise-result","or"),Wt(he(this).or(t))}xor(e){let t=he(e);return(this.isNegative()||t.isNeg())&&un("unbound-bitwise-result","xor"),Wt(he(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&un("negative-width","mask"),Wt(he(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&un("negative-width","shl"),Wt(he(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&un("negative-width","shr"),Wt(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?Op||(Op=!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(ed,Dr(e)):e.match(/^-?[0-9]+$/)?new P(ed,Dr(new Nr(e))):na.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&un("underflow","BigNumber.from",e),(e>=Dp||e<=-Dp)&&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 a=t.toHexString();if(typeof a=="string")return P.from(a)}else{let a=t._hex;if(a==null&&t.type==="BigNumber"&&(a=t.hex),typeof a=="string"&&(Z(a)||a[0]==="-"&&Z(a.substring(1))))return P.from(a)}return na.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}};function Dr(n){if(typeof n!="string")return Dr(n.toString(16));if(n[0]==="-")return n=n.substring(1),n[0]==="-"&&na.throwArgumentError("invalid hex","value",n),n=Dr(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 Wt(n){return P.from(Dr(n))}function he(n){let e=P.from(n).toHexString();return e[0]==="-"?new Nr("-"+e.substring(3),16):new Nr(e.substring(2),16)}function un(n,e,t){let a={fault:n,operation:e};return t!=null&&(a.value=t),na.throwError(n,A.errors.NUMERIC_FAULT,a)}function td(n){return new Nr(n,36).toString(16)}function nd(n){return new Nr(n,16).toString(36)}var Vt=new A(Us),Or={},Up=P.from(0),Vp=P.from(-1);function jp(n,e,t,a){let i={fault:e,operation:t};return a!==void 0&&(i.value=a),Vt.throwError(n,A.errors.NUMERIC_FAULT,i)}var Br="0";for(;Br.length<256;)Br+=Br;function ad(n){if(typeof n!="number")try{n=P.from(n).toNumber()}catch{}return typeof n=="number"&&n>=0&&n<=256&&!(n%1)?"1"+Br.substring(0,n):Vt.throwArgumentError("invalid decimal size","decimals",n)}function Vi(n,e){e==null&&(e=0);let t=ad(e);n=P.from(n);let a=n.lt(Up);a&&(n=n.mul(Vp));let i=n.mod(t).toString();for(;i.length2&&Vt.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&&jp("fractional component exceeds decimals","underflow","parseFixed"),s===""&&(s="0");s.lengthe[s]==null?l:(typeof e[s]!==o&&Vt.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&&Vt.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",a),i>80&&Vt.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new aa(Or,t,a,i)}},ft=class{constructor(e,t,a,i){e!==Or&&Vt.throwError("cannot use FixedNumber constructor; use FixedNumber.from",A.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&&Vt.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),a=dn(e._value,e.format.decimals);return ft.fromValue(t.add(a),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),a=dn(e._value,e.format.decimals);return ft.fromValue(t.sub(a),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),a=dn(e._value,e.format.decimals);return ft.fromValue(t.mul(a).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),a=dn(e._value,e.format.decimals);return ft.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=ft.from(e[0],this.format),a=!e[1].match(/^(0*)$/);return this.isNegative()&&a&&(t=t.subUnsafe(Lp.toFormat(t.format))),t}ceiling(){let e=this.toString().split(".");e.length===1&&e.push("0");let t=ft.from(e[0],this.format),a=!e[1].match(/^(0*)$/);return!this.isNegative()&&a&&(t=t.addUnsafe(Lp.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 a=ft.from("1"+Br.substring(0,e),this.format),i=x6.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&&Vt.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,a){return a==null&&t!=null&&!Fp(t)&&(a=t,t=null),t==null&&(t=0),a==null&&(a="fixed"),ft.fromString(Vi(e,t),aa.from(a))}static fromString(e,t){t==null&&(t="fixed");let a=aa.from(t),i=dn(e,a.decimals);!a.signed&&i.lt(Up)&&jp("unsigned value cannot be negative","overflow","value",e);let r=null;a.signed?r=i.toTwos(a.width).toHexString():(r=i.toHexString(),r=fe(r,a.width/8));let s=Vi(i,a.decimals);return new ft(Or,r,s,a)}static fromBytes(e,t){t==null&&(t="fixed");let a=aa.from(t);if(B(e).length>a.width/8)throw new Error("overflow");let i=P.from(e);a.signed&&(i=i.fromTwos(a.width));let r=i.toTwos((a.signed?0:1)+a.width).toHexString(),s=Vi(i,a.decimals);return new ft(Or,r,s,a)}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(a){if(a.code!==A.errors.INVALID_ARGUMENT)throw a}return Vt.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}},Lp=ft.from(1),x6=ft.from("0.5");var Hp="properties/5.7.0";var b6=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(f){try{p(a.next(f))}catch(b){s(b)}}function l(f){try{p(a.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Vs=new A(Hp);function R(n,e,t){Object.defineProperty(n,e,{enumerable:!0,value:t,writable:!1})}function mt(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 Ce(n){return b6(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 ji(n,e){(!n||typeof n!="object")&&Vs.throwArgumentError("invalid object","object",n),Object.keys(n).forEach(t=>{e[t]||Vs.throwArgumentError("invalid object key - "+t,"transaction:"+t,n)})}function Te(n){let e={};for(let t in n)e[t]=n[t];return e}var g6={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function qp(n){if(n==null||g6[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;tct(e)));if(typeof n=="object"){let e={};for(let t in n){let a=n[t];a!==void 0&&R(e,t,ct(a))}return e}return Vs.throwArgumentError(`Cannot deepCopy ${typeof n}`,"object",n)}function ct(n){return T6(n)}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),ai={},Gp={calldata:!0,memory:!0,storage:!0},v6={calldata:!0,memory:!0};function js(n,e){if(n==="bytes"||n==="string"){if(Gp[e])return!0}else if(n==="address"){if(e==="payable")return!0}else if((n.indexOf("[")>=0||n==="tuple")&&v6[e])return!0;return(Gp[e]||e==="payable")&&be.throwArgumentError("invalid modifier","name",e),!1}function w6(n,e){let t=n;function a(o){be.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!==xe.sighash&&(t+=this.type),t+="("+this.components.map(a=>a.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(ai,{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 a(i){return lt.fromObject({name:i.name,type:i.type,indexed:i.indexed,components:i.components})}return a(w6(e,!!t))}static isParamType(e){return!!(e!=null&&e._isParamType)}};function Fr(n,e){return A6(n).map(t=>lt.fromString(t,e))}var Ht=class{constructor(e,t){e!==ai&&be.throwError("use a static from method",A.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),Hs(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 Dt.fromObject(e);case"event":return jt.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"?jt.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)}},jt=class extends Ht{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(a=>JSON.parse(a.format(e)))});let t="";return e!==xe.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map(a=>a.format(e)).join(e===xe.full?", ":",")+") ",e!==xe.sighash&&this.anonymous&&(t+="anonymous "),t.trim()}static from(e){return typeof e=="string"?jt.fromString(e):jt.fromObject(e)}static fromObject(e){if(jt.isEventFragment(e))return e;e.type!=="event"&&be.throwArgumentError("invalid event object","value",e);let t={name:Lr(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(lt.fromObject):[],type:"event"};return new jt(ai,t)}static fromString(e){let t=e.match(Ur);t||be.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:be.warn("unknown modifier: "+i)}}),jt.fromObject({name:t[1].trim(),anonymous:a,inputs:Fr(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}};function Kp(n,e){e.gas=null;let t=n.split("@");return t.length!==1?(t.length>2&&be.throwArgumentError("invalid human-readable ABI signature","value",n),t[1].match(/^[0-9]+$/)||be.throwArgumentError("invalid human-readable ABI signature gas","value",n),e.gas=P.from(t[1]),t[0]):n}function Wp(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 Jp(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&&be.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",n),e.payable=e.stateMutability==="payable",n.payable!=null&&!!n.payable!==e.payable&&be.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"&&be.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&&be.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"&&be.throwArgumentError("unable to determine stateMutability","value",n),e}var Nt=class extends Ht{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(a=>JSON.parse(a.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(a=>a.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=Jp(e);t.constant&&be.throwArgumentError("constructor cannot be constant","value",e);let a={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(ai,a)}static fromString(e){let t={type:"constructor"};e=Kp(e,t);let a=e.match(Ur);return(!a||a[1].trim()!=="constructor")&&be.throwArgumentError("invalid constructor string","value",e),t.inputs=Fr(a[2].trim(),!1),Wp(a[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(a=>JSON.parse(a.format(e))),outputs:this.outputs.map(a=>JSON.parse(a.format(e)))});let t="";return e!==xe.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map(a=>a.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(a=>a.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=Jp(e),a={type:e.type,name:Lr(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(ai,a)}static fromString(e){let t={type:"function"};e=Kp(e,t);let a=e.split(" returns ");a.length>2&&be.throwArgumentError("invalid function string","value",e);let i=a[0].match(Ur);if(i||be.throwArgumentError("invalid function signature","value",e),t.name=i[1].trim(),t.name&&Lr(t.name),t.inputs=Fr(i[2],!1),Wp(i[3].trim(),t),a.length>1){let r=a[1].match(Ur);(r[1].trim()!=""||r[3].trim()!="")&&be.throwArgumentError("unexpected tokens","value",e),t.outputs=Fr(r[2],!1)}else t.outputs=[];return Dt.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}};function zp(n){let e=n.format();return(e==="Error(string)"||e==="Panic(uint256)")&&be.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",n),n}var tn=class extends Ht{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(a=>JSON.parse(a.format(e)))});let t="";return e!==xe.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map(a=>a.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:Lr(e.name),inputs:e.inputs?e.inputs.map(lt.fromObject):[]};return zp(new tn(ai,t))}static fromString(e){let t={type:"error"},a=e.match(Ur);return a||be.throwArgumentError("invalid error signature","value",e),t.name=a[1].trim(),t.name&&Lr(t.name),t.inputs=Fr(a[2],!1),zp(tn.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}};function Hi(n){return n.match(/^uint($|[^1-9])/)?n="uint256"+n.substring(4):n.match(/^int($|[^1-9])/)&&(n="int256"+n.substring(3)),n}var k6=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function Lr(n){return(!n||!n.match(k6))&&be.throwArgumentError(`invalid identifier "${n}"`,"value",n),n}var Ur=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function A6(n){n=n.trim();let e=[],t="",a=0;for(let i=0;ithis.wordSize&&id.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)}}},ri=class{constructor(e,t,a,i){R(this,"_data",B(e)),R(this,"wordSize",t||32),R(this,"_coerceFunc",a),R(this,"allowLoose",i),this._offset=0}get data(){return j(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):ri.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:id.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 ri(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 P.from(this.readBytes(this.wordSize))}};var Qp=wn($p());function le(n){return"0x"+Qp.default.keccak_256(B(n))}var Gs={};Li(Gs,{decode:()=>Vr,encode:()=>ia});var Xp="rlp/5.7.0";var Vn=new A(Xp);function Yp(n){let e=[];for(;n;)e.unshift(n&255),n>>=8;return e}function Zp(n,e,t){let a=0;for(let i=0;ie+1+a&&Vn.throwError("child data too short",A.errors.BUFFER_OVERRUN,{})}return{consumed:1+a,result:i}}function ny(n,e){if(n.length===0&&Vn.throwError("data too short",A.errors.BUFFER_OVERRUN,{}),n[e]>=248){let t=n[e]-247;e+1+t>n.length&&Vn.throwError("data short segment too short",A.errors.BUFFER_OVERRUN,{});let a=Zp(n,e+1,t);return e+1+t+a>n.length&&Vn.throwError("data long segment too short",A.errors.BUFFER_OVERRUN,{}),ey(n,e,e+1+t,t+a)}else if(n[e]>=192){let t=n[e]-192;return e+1+t>n.length&&Vn.throwError("data array too short",A.errors.BUFFER_OVERRUN,{}),ey(n,e,e+1,t)}else if(n[e]>=184){let t=n[e]-183;e+1+t>n.length&&Vn.throwError("data array too short",A.errors.BUFFER_OVERRUN,{});let a=Zp(n,e+1,t);e+1+t+a>n.length&&Vn.throwError("data array too short",A.errors.BUFFER_OVERRUN,{});let i=j(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&&Vn.throwError("data too short",A.errors.BUFFER_OVERRUN,{});let a=j(n.slice(e+1,e+1+t));return{consumed:1+t,result:a}}return{consumed:1,result:j(n[e])}}function Vr(n){let e=B(n),t=ny(e,0);return t.consumed!==e.length&&Vn.throwArgumentError("invalid rlp data","data",n),t.result}var ay="address/5.7.0";var ka=new A(ay);function iy(n){Z(n,20)||ka.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=B(le(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 E6=9007199254740991;function M6(n){return Math.log10?Math.log10(n):Math.log(n)/Math.LN10}var rd={};for(let n=0;n<10;n++)rd[String(n)]=String(n);for(let n=0;n<26;n++)rd[String.fromCharCode(65+n)]=String(10+n);var ry=Math.floor(M6(E6));function sy(n){n=n.toUpperCase(),n=n.substring(4)+n.substring(0,2)+"00";let e=n.split("").map(a=>rd[a]).join("");for(;e.length>=ry;){let a=e.substring(0,ry);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 pe(n){let e=null;if(typeof n!="string"&&ka.throwArgumentError("invalid address","address",n),n.match(/^(0x)?[0-9a-fA-F]{40}$/))n.substring(0,2)!=="0x"&&(n="0x"+n),e=iy(n),n.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==n&&ka.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)!==sy(n)&&ka.throwArgumentError("bad icap checksum","address",n),e=td(n.substring(4));e.length<40;)e="0"+e;e=iy("0x"+e)}else ka.throwArgumentError("invalid address","address",n);return e}function oy(n){try{return pe(n),!0}catch{}return!1}function uy(n){let e=nd(pe(n).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+sy("XE00"+e)+e}function si(n){let e=null;try{e=pe(n.from)}catch{ka.throwArgumentError("missing from address","transaction",n)}let t=Zt(B(P.from(n.nonce).toHexString()));return pe(Me(le(ia([e,t])),12))}function dy(n,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(Me(le(de(["0xff",pe(n),e,t])),12))}var zs=class extends kt{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=pe(t)}catch(a){this._throwError(a.message,t)}return e.writeValue(t)}decode(e){return pe(fe(e.readValue().toHexString(),20))}};var Ks=class extends kt{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 sd(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 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!==a.length&&Gi.throwArgumentError("types/value length mismatch","tuple",t);let i=new ii(n.wordSize),r=new ii(n.wordSize),s=[];e.forEach((l,p)=>{let f=a[p];if(l.dynamic){let b=r.length;l.encode(r,f);let M=i.writeUpdatableValue();s.push(k=>{M(k+b)})}else l.encode(i,f)}),s.forEach(l=>{l(i.length)});let o=n.appendWriter(i);return o+=n.appendWriter(r),o}function od(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===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(n)}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 Ws=class extends kt{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&&Gi.throwError("insufficient data length",A.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let a=[];for(let i=0;iYs,EtherSymbol:()=>cy,HashZero:()=>Ki,MaxInt256:()=>fy,MaxUint256:()=>to,MinInt256:()=>yy,NegativeOne:()=>Zs,One:()=>eo,Two:()=>ly,WeiPerEther:()=>py,Zero:()=>zi});var Ys="0x0000000000000000000000000000000000000000";var Zs=P.from(-1),zi=P.from(0),eo=P.from(1),ly=P.from(2),py=P.from("1000000000000000000"),to=P.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),yy=P.from("-0x8000000000000000000000000000000000000000000000000000000000000000"),fy=P.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");var Ki="0x0000000000000000000000000000000000000000000000000000000000000000";var cy="\u039E";var no=class extends kt{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=P.from(t),i=to.mask(e.wordSize*8);if(this.signed){let r=i.mask(this.size*8-1);(a.gt(r)||a.lt(r.add(eo).mul(Zs)))&&this._throwError("value out-of-bounds",t)}else(a.lt(zi)||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 my="strings/5.7.0";var hy=new A(my),qt;(function(n){n.current="",n.NFC="NFC",n.NFD="NFD",n.NFKC="NFKC",n.NFKD="NFKD"})(qt||(qt={}));var Ot;(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"})(Ot||(Ot={}));function C6(n,e,t,a,i){return hy.throwArgumentError(`invalid codepoint at offset ${e}; ${n}`,"bytes",t)}function xy(n,e,t,a,i){if(n===Ot.BAD_PREFIX||n===Ot.UNEXPECTED_CONTINUE){let r=0;for(let s=e+1;s>6===2;s++)r++;return r}return n===Ot.OVERRUN?t.length-e-1:0}function I6(n,e,t,a,i){return n===Ot.OVERLONG?(a.push(i),0):(a.push(65533),xy(n,e,t,a,i))}var ao=Object.freeze({error:C6,ignore:xy,replace:I6});function dd(n,e){e==null&&(e=ao.error),n=B(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(Ot.UNEXPECTED_CONTINUE,a-1,n,t):a+=e(Ot.BAD_PREFIX,a-1,n,t);continue}if(a-1+r>=n.length){a+=e(Ot.OVERRUN,a-1,n,t);continue}let o=i&(1<<8-r-1)-1;for(let l=0;l1114111){a+=e(Ot.OUT_OF_RANGE,a-1-r,n,t,o);continue}if(o>=55296&&o<=57343){a+=e(Ot.UTF16_SURROGATE,a-1-r,n,t,o);continue}if(o<=s){a+=e(Ot.OVERLONG,a-1-r,n,t,o);continue}t.push(o)}}return t}function ge(n,e=qt.current){e!=qt.current&&(hy.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 B(t)}function ud(n){let e="0000"+n.toString(16);return"\\u"+e.substring(e.length-4)}function ld(n,e){return'"'+dd(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?ud(t):(t-=65536,ud((t>>10&1023)+55296)+ud((t&1023)+56320))}).join("")+'"'}function io(n){return n.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function Jt(n,e){return io(dd(n,e))}function Aa(n,e=qt.current){return dd(ge(n,e))}function pd(n){let e=ge(n);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return j(de([e,Ki]).slice(0,32))}function yd(n){let e=B(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 Jt(e.slice(0,t))}function S6(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 by(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 cd(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 R6=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"),P6="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(n=>parseInt(n,16)),N6=[{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}],D6=fd("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=fd("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"),B6=fd("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",S6),F6=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(n){return n.reduce((e,t)=>(t.forEach(a=>{e.push(a)}),e),[])}function U6(n){return!!cd(n,R6)}function V6(n){let e=cd(n,N6);if(e)return[n+e.s];let t=D6[n];if(t)return t;let a=O6[n];if(a)return[n+a[0]];let i=B6[n];return i||null}function j6(n){return!!cd(n,F6)}function md(n){if(n.match(/^[a-z0-9-]*$/i)&&n.length<=59)return n.toLowerCase();let e=Aa(n);e=L6(e.map(a=>{if(P6.indexOf(a)>=0)return[];if(a>=65024&&a<=65039)return[];let i=V6(a);return i||[a]})),e=Aa(io(e),qt.NFKC),e.forEach(a=>{if(j6(a))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(a=>{if(U6(a))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});let t=io(e);if(t.substring(0,1)==="-"||t.substring(2,4)==="--"||t.substring(t.length-1)==="-")throw new Error("invalid hyphen");return t}var ro=class extends jr{constructor(e){super("string",e)}defaultValue(){return""}encode(e,t){return super.encode(e,ge(t))}decode(e){return Jt(super.decode(e))}};var oi=class extends kt{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 sd(e,this.coders,t)}decode(e){return e.coerce(this.name,od(e,this.coders))}};var so=new A(Un),H6=new RegExp(/^bytes([0-9]*)$/),q6=new RegExp(/^(u?int)([0-9]*)$/),Wi=class{constructor(e){R(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new zs(e.name);case"bool":return new Js(e.name);case"string":return new ro(e.name);case"bytes":return new $s(e.name);case"array":return new Ws(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new oi((e.components||[]).map(a=>this._getCoder(a)),e.name);case"":return new Xs(e.name)}let t=e.type.match(q6);if(t){let a=parseInt(t[2]||"256");return(a===0||a>256||a%8!==0)&&so.throwArgumentError("invalid "+t[1]+" bit length","param",e),new no(a/8,t[1]==="int",e.name)}if(t=e.type.match(H6),t){let a=parseInt(t[1]);return(a===0||a>32)&&so.throwArgumentError("invalid bytes length","param",e),new Qs(a,e.name)}return so.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,t){return new ri(e,this._getWordSize(),this.coerceFunc,t)}_getWriter(){return new ii(this._getWordSize())}getDefaultValue(e){let t=e.map(i=>this._getCoder(lt.from(i)));return new oi(t,"_").defaultValue()}encode(e,t){e.length!==t.length&&so.throwError("types/values length mismatch",A.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});let a=e.map(s=>this._getCoder(lt.from(s))),i=new oi(a,"_"),r=this._getWriter();return i.encode(r,t),r.data}decode(e,t,a){let i=e.map(s=>this._getCoder(lt.from(s)));return new oi(i,"_").decode(this._getReader(B(t),a))}},Hr=new Wi;function nn(n){return le(ge(n))}var oo="hash/5.7.0";var hd={};Li(hd,{decode:()=>Ji,encode:()=>$i});function Ji(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 G6(n){let e={};for(let t=0;t>--l&1}let b=31,M=Math.pow(2,b),k=M>>>1,v=k>>1,C=M-1,D=0;for(let q=0;q1;){let Re=K+ye>>>1;q>>1|f(),te=te<<1^k,ae=(ae^k)<<1|k|1;F=te,U=1+ae-te}let G=a-4;return N.map(q=>{switch(q-G){case 3:return G+65792+(n[o++]<<16|n[o++]<<8|n[o++]);case 2:return G+256+(n[o++]<<8|n[o++]);case 1:return G+n[o++];default:return q-1}})}function K6(n){let e=0;return()=>n[e++]}function vy(n){return K6(z6(n))}function W6(n){return n&1?~n>>1:n>>1}function J6(n,e){let t=Array(n);for(let a=0;ae[s]):t}function wy(n){let e=[];for(;;){let t=n();if(t==0)break;e.push(X6(t,n))}for(;;){let t=n()-1;if(t<0)break;e.push(Y6(t,n))}return G6(Ty(e))}function Q6(n){let e=[];for(;;){let t=n();if(t==0)break;e.push(t)}return e}function _y(n,e,t){let a=Array(n).fill(void 0).map(()=>[]);for(let i=0;ia[s].push(r));return a}function X6(n,e){let t=1+e(),a=e(),i=Q6(e),r=_y(i.length,1+n,e);return Ty(r.map((s,o)=>{let l=s[0],p=s.slice(1);return Array(i[o]).fill(void 0).map((f,b)=>{let M=b*a;return[l+b*t,p.map(k=>k+M)]})}))}function Y6(n,e){let t=1+e();return _y(t,1+n,e).map(i=>[i[0],i.slice(1)])}function ky(n){let e=qr(n).sort((a,i)=>a-i);return t();function t(){let a=[];for(;;){let p=qr(n,e);if(p.length==0)break;a.push({set:new Set(p),node:t()})}a.sort((p,f)=>f.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 Ay(){return vy(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 uo=Ay(),Z6=new Set(qr(uo)),e2=new Set(qr(uo)),t2=wy(uo),n2=ky(uo),Ey=45,My=95;function Cy(n){return Aa(n)}function a2(n){return n.filter(e=>e!=65039)}function Iy(n){for(let e of n.split(".")){let t=Cy(e);try{for(let a=t.lastIndexOf(My)-1;a>=0;a--)if(t[a]!==My)throw new Error("underscore only allowed at start");if(t.length>=4&&t.every(a=>a<128)&&t[2]===Ey&&t[3]===Ey)throw new Error("invalid label extension")}catch(a){throw new Error(`Invalid label "${e}": ${a.message}`)}}return n}function Sy(n){return Iy(i2(n,a2))}function i2(n,e){let t=Cy(n).reverse(),a=[];for(;t.length;){let i=s2(t);if(i){a.push(...e(i));continue}let r=t.pop();if(Z6.has(r)){a.push(r);continue}if(e2.has(r))continue;let s=t2[r];if(s){a.push(...s);continue}throw new Error(`Disallowed codepoint: 0x${r.toString(16).toUpperCase()}`)}return Iy(r2(String.fromCodePoint(...a)))}function r2(n){return n.normalize("NFC")}function s2(n,e){var t;let a=n2,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 o2=new A(oo),Py=new Uint8Array(32);Py.fill(0);function Ry(n){if(n.length===0)throw new Error("invalid ENS name; empty component");return n}function xd(n){let e=ge(Sy(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(Ry(e.slice(a))),t}function bd(n){try{return xd(n).length!==0}catch{}return!1}function Ea(n){typeof n!="string"&&o2.throwArgumentError("invalid ENS name; not a string","name",n);let e=Py,t=xd(n);for(;t.length;)e=le(de([e,le(t.pop())]));return j(e)}function Gr(n){return j(de(xd(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 Ny=`Ethereum Signed Message: -`;function Qi(n){return typeof n=="string"&&(n=ge(n)),le(de([ge(Ny),ge(String(n.length)),n]))}var u2=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(f){try{p(a.next(f))}catch(b){s(b)}}function l(f){try{p(a.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},xt=new A(oo),Fy=new Uint8Array(32);Fy.fill(0);var d2=P.from(-1),Ly=P.from(0),Uy=P.from(1),l2=P.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function p2(n){let e=B(n),t=e.length%32;return t?_t([e,Fy.slice(t)]):j(e)}var y2=fe(Uy.toHexString(),32),f2=fe(Ly.toHexString(),32),Dy={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},gd=["name","version","chainId","verifyingContract","salt"];function Oy(n){return function(e){return typeof e!="string"&&xt.throwArgumentError(`invalid domain value for ${JSON.stringify(n)}`,`domain.${n}`,e),e}}var c2={name:Oy("name"),version:Oy("version"),chainId:function(n){try{return P.from(n).toString()}catch{}return xt.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",n)},verifyingContract:function(n){try{return pe(n).toLowerCase()}catch{}return xt.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",n)},salt:function(n){try{let e=B(n);if(e.length!==32)throw new Error("bad length");return j(e)}catch{}return xt.throwArgumentError('invalid domain value "salt"',"domain.salt",n)}};function Td(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))&&xt.throwArgumentError("invalid numeric width","type",n);let i=l2.mask(t?a-1:a),r=t?i.add(Uy).mul(d2):Ly;return function(s){let o=P.from(s);return(o.lt(r)||o.gt(i))&&xt.throwArgumentError(`value out-of-bounds for ${n}`,"value",s),fe(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))&&xt.throwArgumentError("invalid bytes width","type",n),function(a){return B(a).length!==t&&xt.throwArgumentError(`invalid length for ${n}`,"value",a),p2(a)}}}switch(n){case"address":return function(e){return fe(pe(e),32)};case"bool":return function(e){return e?y2:f2};case"bytes":return function(e){return le(e)};case"string":return function(e){return nn(e)}}return null}function By(n,e){return`${n}(${e.map(({name:t,type:a})=>a+" "+t).join(",")})`}var bt=class{constructor(e){R(this,"types",Object.freeze(ct(e))),R(this,"_encoderCache",{}),R(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]&&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),!Td(f)&&(a[f]||xt.throwArgumentError(`unknown type ${JSON.stringify(f)}`,"types",e),a[f].push(o),t[o][f]=!0)})}let r=Object.keys(a).filter(o=>a[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=>{!a[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]=By(o,e[o])+l.map(p=>By(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=Td(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(_t(l))}}let a=this.types[e];if(a){let i=nn(this._types[e]);return r=>{let s=a.map(({name:o,type:l})=>{let p=this.getEncoder(l)(r[o]);return this._types[l]?le(p):p});return s.unshift(i),_t(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,a){if(Td(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&&xt.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),{}):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,a){return bt.from(t).hashStruct(e,a)}static hashDomain(e){let t=[];for(let a in e){let i=Dy[a];i||xt.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(a)}`,"domain",e),t.push({name:a,type:i})}return t.sort((a,i)=>gd.indexOf(a.name)-gd.indexOf(i.name)),bt.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,a){return _t(["0x1901",bt.hashDomain(e),bt.from(t).hash(a)])}static hash(e,t,a){return le(bt.encode(e,t,a))}static resolveNames(e,t,a,i){return u2(this,void 0,void 0,function*(){e=Te(e);let r={};e.verifyingContract&&!Z(e.verifyingContract,20)&&(r[e.verifyingContract]="0x");let s=bt.from(t);s.visit(a,(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]),a=s.visit(a,(o,l)=>o==="address"&&r[l]?r[l]:l),{domain:e,value:a}})}static getPayload(e,t,a){bt.hashDomain(e);let i={},r=[];gd.forEach(l=>{let p=e[l];p!=null&&(i[l]=c2[l](p),r.push({name:l,type:Dy[l]}))});let s=bt.from(t),o=Te(t);return o.EIP712Domain?xt.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 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{},vd=class extends en{},ra=class extends en{static isIndexed(e){return!!(e&&e._isIndexed)}},m2={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function Vy(n,e){let t=new Error(`deferred error during ABI decoding triggered accessing ${n}`);return t.error=e,t}var Ma=class{constructor(e){let t=[];typeof e=="string"?t=JSON.parse(e):t=e,R(this,"fragments",t.map(a=>Ht.from(a)).filter(a=>a!=null)),R(this,"_abiCoder",mt(new.target,"getAbiCoder")()),R(this,"functions",{}),R(this,"errors",{}),R(this,"events",{}),R(this,"structs",{}),this.fragments.forEach(a=>{let i=null;switch(a.type){case"constructor":if(this.deploy){gt.warn("duplicate definition - constructor");return}R(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]){gt.warn("duplicate definition - "+r);return}i[r]=a}),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(a=>a.format(e));return e===xe.json?JSON.stringify(t.map(a=>JSON.parse(a))):t}static getAbiCoder(){return Hr}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 a in this.functions)if(e===this.getSighash(a))return this.functions[a];gt.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?gt.throwArgumentError("no matching function","name",a):i.length>1&>.throwArgumentError("multiple matching functions","name",a),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 a=e.toLowerCase();for(let i in this.events)if(a===this.getEventTopic(i))return this.events[i];gt.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?gt.throwArgumentError("no matching event","name",a):i.length>1&>.throwArgumentError("multiple matching events","name",a),this.events[i[0]]}let t=this.events[jt.fromString(e).format()];return t||gt.throwArgumentError("no matching event","signature",e),t}getError(e){if(Z(e)){let a=mt(this.constructor,"getSighash");for(let i in this.errors){let r=this.errors[i];if(e===a(r))return this.errors[i]}gt.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?gt.throwArgumentError("no matching error","name",a):i.length>1&>.throwArgumentError("multiple matching errors","name",a),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 a=B(t);return j(a.slice(0,4))!==this.getSighash(e)&>.throwArgumentError(`data signature does not match error ${e.name}.`,"data",j(a)),this._decodeParams(e.inputs,a.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 a=B(t);return j(a.slice(0,4))!==this.getSighash(e)&>.throwArgumentError(`data signature does not match function ${e.name}.`,"data",j(a)),this._decodeParams(e.inputs,a.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 a=B(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=j(a.slice(0,4)),f=m2[p];if(f)s=this._abiCoder.decode(f.inputs,a.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,a.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 a=[];e.anonymous||a.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?a.push(null):o.baseType==="array"||o.baseType==="tuple"?gt.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&>.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(nn(l));else if(s.type==="bytes")a.push(le(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 M=this.getEventTopic(e);(!Z(a[0],32)||a[0].toLowerCase()!==M)&>.throwError("fragment/topic mismatch",A.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:M,value:a[0]}),a=a.slice(1)}let i=[],r=[],s=[];e.inputs.forEach((M,k)=>{M.indexed?M.type==="string"||M.type==="bytes"||M.baseType==="tuple"||M.baseType==="array"?(i.push(lt.fromObject({type:"bytes32",name:M.name})),s.push(!0)):(i.push(M),s.push(!1)):(r.push(M),s.push(!1))});let o=a!=null?this._abiCoder.decode(i,de(a)):null,l=this._abiCoder.decode(r,t,!0),p=[],f=0,b=0;e.inputs.forEach((M,k)=>{if(M.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(M.name&&p[M.name]==null){let v=p[k];v instanceof Error?Object.defineProperty(p,M.name,{enumerable:!0,get:()=>{throw Vy(`property ${JSON.stringify(M.name)}`,v)}}):p[M.name]=v}});for(let M=0;M{throw Vy(`index ${M}`,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),a=this.getError(t.substring(0,10).toLowerCase());return a?new vd({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 jy="abstract-provider/5.7.0";var h2=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(f){try{p(a.next(f))}catch(b){s(b)}}function l(f){try{p(a.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},x2=new A(jy),lo=class extends en{static isForkEvent(e){return!!(e&&e._isForkEvent)}};var $t=class{constructor(){x2.checkAbstract(new.target,$t),R(this,"_isProvider",!0)}getFeeData(){return h2(this,void 0,void 0,function*(){let{block:e,gasPrice:t}=yield Ce({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(s=>null)}),a=null,i=null,r=null;return e&&e.baseFeePerGas&&(a=e.baseFeePerGas,r=P.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 Hy="abstract-signer/5.7.0";var _n=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(f){try{p(a.next(f))}catch(b){s(b)}}function l(f){try{p(a.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},ln=new A(Hy),b2=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],g2=[A.errors.INSUFFICIENT_FUNDS,A.errors.NONCE_EXPIRED,A.errors.REPLACEMENT_UNDERPRICED],Gt=class{constructor(){ln.checkAbstract(new.target,Gt),R(this,"_isSigner",!0)}getBalance(e){return _n(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return _n(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return _n(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 _n(this,void 0,void 0,function*(){this._checkProvider("call");let a=yield Ce(this.checkTransaction(e));return yield this.provider.call(a,t)})}sendTransaction(e){return _n(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 _n(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return _n(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return _n(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return _n(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(let a in e)b2.indexOf(a)===-1&&ln.throwArgumentError("invalid transaction key: "+a,"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(a=>(a[0].toLowerCase()!==a[1].toLowerCase()&&ln.throwArgumentError("from address mismatch","transaction",e),a[0])),t}populateTransaction(e){return _n(this,void 0,void 0,function*(){let t=yield Ce(this.checkTransaction(e));t.to!=null&&(t.to=Promise.resolve(t.to).then(i=>_n(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 a=t.maxFeePerGas!=null||t.maxPriorityFeePerGas!=null;if(t.gasPrice!=null&&(t.type===2||a)?ln.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(t.type===0||t.type===1)&&a&&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?(a&&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(g2.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 Ce(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 Gt{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,a){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new sa(this.address,e)}};var oe=wn($u()),Wn=wn(Rd());function sr(n,e,t){return t={path:e,exports:{},require:function(a,i){return Hh(a,i??t.path)}},n(t,t.exports),t.exports}function Hh(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var Od=E0;function E0(n,e){if(!n)throw new Error(e||"Assertion failed")}E0.equal=function(e,t,a){if(e!=t)throw new Error(a||"Assertion failed: "+e+" != "+t)};var Mn=sr(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,M=f&255;b?l.push(b,M):l.push(M)}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(M>>1)-1?C=(M>>1)-D:C=D,k.isubn(C)):C=0,b[v]=C,k.iushrn(1)}return b}t.getNAF=a;function i(l,p){var f=[[],[]];l=l.clone(),p=p.clone();for(var b=0,M=0,k;l.cmpn(-b)>0||p.cmpn(-M)>0;){var v=l.andln(3)+b&3,C=p.andln(3)+M&3;v===3&&(v=-1),C===3&&(C=-1);var D;(v&1)===0?D=0:(k=l.andln(7)+b&7,(k===3||k===5)&&C===2?D=-v:D=v),f[0].push(D);var N;(C&1)===0?N=0:(k=p.andln(7)+M&7,(k===3||k===5)&&v===2?N=-C:N=C),f[1].push(N),2*b===D+1&&(b=1-b),2*M===N+1&&(M=1-M),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 oe.default(l,"hex","le")}t.intFromLE=o}),mo=an.getNAF,qh=an.getJSF,ho=an.assert;function Sa(n,e){this.type=n,this.p=new oe.default(e.p,16),this.red=e.prime?oe.default.red(e.prime):oe.default.mont(this.p),this.zero=new oe.default(0).toRed(this.red),this.one=new oe.default(1).toRed(this.red),this.two=new oe.default(2).toRed(this.red),this.n=e.n&&new oe.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 di=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){ho(e.precomputed);var a=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),b=this.jpoint(null,null,null),M=r;M>0;M--){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];ho(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,a,i,r){var s=this._wnafT1,o=this._wnafT2,l=this._wnafT3,p=0,f,b,M;for(f=0;f=1;f-=2){var v=f-1,C=f;if(s[v]!==1||s[C]!==1){l[v]=mo(a[v],s[v],this._bitLength),l[C]=mo(a[C],s[C],this._bitLength),p=Math.max(l[v].length,p),p=Math.max(l[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=qh(a[v],a[C]);for(p=Math.max(F[0].length,p),l[v]=new Array(p),l[C]=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?M=o[b][ae-1>>1]:ae<0&&(M=o[b][-ae-1>>1].neg()),M.type==="affine"?q=q.mixedAdd(M):q=q.add(M))}}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 a=[this],i=this,r=0;r=0&&(k=p,v=f),b.negative&&(b=b.neg(),M=M.neg()),k.negative&&(k=k.neg(),v=v.neg()),[{a:b,b:M},{a:k,b:v}]};fn.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),f=s.mul(i.b),b=e.sub(o).sub(l),M=p.add(f).neg();return{k1:b,k2:M}};fn.prototype.pointFromX=function(e,t){e=new oe.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)};fn.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};fn.prototype._endoWnafMulAdd=function(e,t,a){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 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)};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,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)};Mt.prototype.getX=function(){return this.x.fromRed()};Mt.prototype.getY=function(){return this.y.fromRed()};Mt.prototype.mul=function(e){return e=new oe.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,a){var i=[this,t],r=[e,a];return this.curve.endo?this.curve._endoWnafMulAdd(i,r):this.curve._wnafMulAdd(1,i,r,2)};Mt.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)};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 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};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 Rt(n,e,t,a){di.BasePoint.call(this,n,"jacobian"),e===null&&t===null&&a===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new oe.default(0)):(this.x=new oe.default(e,16),this.y=new oe.default(t,16),this.z=new oe.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}Bd(Rt,di.BasePoint);fn.prototype.jpoint=function(e,t,a){return new Rt(this,e,t,a)};Rt.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)};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(),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 f=l.redSqr(),b=f.redMul(l),M=i.redMul(f),k=p.redSqr().redIAdd(b).redISub(M).redISub(M),v=p.redMul(M.redISub(k)).redISub(s.redMul(b)),C=this.z.redMul(e.z).redMul(l);return this.curve.jpoint(k,v,C)};Rt.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(),f=p.redMul(o),b=a.redMul(p),M=l.redSqr().redIAdd(f).redISub(b).redISub(b),k=l.redMul(b.redISub(M)).redISub(r.redMul(f)),v=this.z.redMul(o);return this.curve.jpoint(M,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 a=this;for(t=0;t=0)return!1;if(a.redIAdd(r),this.x.cmp(a)===0)return!0}};Rt.prototype.inspect=function(){return this.isInfinity()?"":""};Rt.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var fo=sr(function(n,e){"use strict";var t=e;t.base=di,t.short=zh,t.mont=null,t.edwards=null}),co=sr(function(n,e){"use strict";var t=e,a=an.assert;function i(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,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:Wn.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:Wn.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:Wn.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: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"]}),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: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"]}),r("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"]}),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:Wn.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:Wn.default.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",s]})});function Ia(n){if(!(this instanceof Ia))return new Ia(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=Mn.toArray(n.entropy,n.entropyEnc||"hex"),t=Mn.toArray(n.nonce,n.nonceEnc||"hex"),a=Mn.toArray(n.pers,n.persEnc||"hex");Od(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,t,a)}var M0=Ia;Ia.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};Ia.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=Mn.toArray(a,i||"hex"),this._update(a));for(var r=[];r.length"};var Kh=an.assert;function xo(n,e){if(n instanceof xo)return n;this._importDER(n,e)||(Kh(n.r&&n.s,"Signature without r or s"),this.r=new oe.default(n.r,16),this.s=new oe.default(n.s,16),n.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=n.recoveryParam)}var bo=xo;function Wh(){this.place=0}function Pd(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 A0(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)}xo.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=A0(t),a=A0(a);!a[0]&&!(a[1]&128);)a=a.slice(1);var i=[2];Nd(i,t.length),i=i.concat(t),i.push(2),Nd(i,a.length);var r=i.concat(a),s=[48];return Nd(s,r.length),s=s.concat(r),an.encode(s,e)};var Jh=function(){throw new Error("unsupported")},C0=an.assert;function pn(n){if(!(this instanceof pn))return new pn(n);typeof n=="string"&&(C0(Object.prototype.hasOwnProperty.call(co,n),"Unknown curve "+n),n=co[n]),n instanceof co.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 $h=pn;pn.prototype.keyPair=function(e){return new Fd(this,e)};pn.prototype.keyFromPrivate=function(e,t){return Fd.fromPrivate(this,e,t)};pn.prototype.keyFromPublic=function(e,t){return Fd.fromPublic(this,e,t)};pn.prototype.genKeyPair=function(e){e||(e={});for(var t=new M0({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||Jh(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),a=this.n.byteLength(),i=this.n.sub(new oe.default(2));;){var r=new oe.default(t.generate(a));if(!(r.cmp(i)>0))return r.iaddn(1),this.keyFromPrivate(r)}};pn.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};pn.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 oe.default(e,16));for(var r=this.n.byteLength(),s=t.getPrivate().toArray("be",r),o=e.toArray("be",r),l=new M0({hash:this.hash,entropy:s,nonce:o,pers:i.pers,persEnc:i.persEnc||"utf8"}),p=this.n.sub(new oe.default(1)),f=0;;f++){var b=i.k?i.k(f):new oe.default(l.generate(this.n.byteLength()));if(b=this._truncateToN(b,!0),!(b.cmpn(1)<=0||b.cmp(p)>=0)){var M=this.g.mul(b);if(!M.isInfinity()){var k=M.getX(),v=k.umod(this.n);if(v.cmpn(0)!==0){var C=b.invm(this.n).mul(v.mul(t.getPrivate()).iadd(e));if(C=C.umod(this.n),C.cmpn(0)!==0){var D=(M.getY().isOdd()?1:0)|(k.cmp(v)!==0?2:0);return i.canonical&&C.cmp(this.nh)>0&&(C=this.n.sub(C),D^=1),new bo({r:v,s:C,recoveryParam:D})}}}}}};pn.prototype.verify=function(e,t,a,i){e=this._truncateToN(new oe.default(e,16)),a=this.keyFromPublic(a,i),t=new bo(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,a.getPublic(),p),f.isInfinity()?!1:f.eqXToP(r)):(f=this.g.mulAdd(l,a.getPublic(),p),f.isInfinity()?!1:f.getX().umod(this.n).cmp(r)===0)};pn.prototype.recoverPubKey=function(n,e,t,a){C0((3&t)===t,"The recovery param is more than two bits"),e=new bo(e,a);var i=this.n,r=new oe.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 f=e.r.invm(i),b=i.sub(r).mul(f).umod(i),M=o.mul(f).umod(i);return this.g.mulAdd(b,s,M)};pn.prototype.getKeyRecoveryParam=function(n,e,t,a){if(e=new bo(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 Qh=sr(function(n,e){"use strict";var t=e;t.version="6.5.4",t.utils=an,t.rand=function(){throw new Error("unsupported")},t.curve=fo,t.curves=co,t.ec=$h,t.eddsa=null}),I0=Qh.ec;var S0="signing-key/5.7.0";var Ud=new A(S0),Ld=null;function Jn(){return Ld||(Ld=new I0("secp256k1")),Ld}var cn=class{constructor(e){R(this,"curve","secp256k1"),R(this,"privateKey",j(e)),Pt(this.privateKey)!==32&&Ud.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)),a=Jn().keyFromPublic(B(e));return"0x"+t.pub.add(a.pub).encodeCompressed("hex")}signDigest(e){let t=Jn().keyFromPrivate(B(this.privateKey)),a=B(e);a.length!==32&&Ud.throwArgumentError("bad digest length","digest",e);let i=t.sign(a,{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)),a=Jn().keyFromPublic(B(Wr(e)));return fe("0x"+t.derive(a.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}};function go(n,e){let t=Ln(e),a={r:B(t.r),s:B(t.s)};return"0x"+Jn().recoverPubKey(B(n),a,t.recoveryParam).encode("hex",!1)}function Wr(n,e){let t=B(n);if(t.length===32){let a=new cn(t);return e?"0x"+Jn().keyFromPrivate(t).getPublic(!0,"hex"):a.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 Ud.throwArgumentError("invalid public or private key","key","[REDACTED]")}var R0="transactions/5.7.0";var Lt=new A(R0),To;(function(n){n[n.legacy=0]="legacy",n[n.eip2930=1]="eip2930",n[n.eip1559=2]="eip1559"})(To||(To={}));function jd(n){return n==="0x"?null:pe(n)}function Ft(n){return n==="0x"?zi:P.from(n)}var Xh=[{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"}],Yh={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function mn(n){let e=Wr(n);return pe(Me(le(Me(e,1)),12))}function li(n,e){return mn(go(B(n),e))}function rn(n,e){let t=Zt(P.from(n).toHexString());return t.length>32&&Lt.throwArgumentError("invalid length for "+e,"transaction:"+e,n),t}function Vd(n,e){return{address:pe(n),storageKeys:(e||[]).map((t,a)=>(Pt(t)!==32&&Lt.throwArgumentError("invalid access list storageKey",`accessList[${n}:${a}]`,t),t.toLowerCase()))}}function sn(n){if(Array.isArray(n))return n.map((t,a)=>Array.isArray(t)?(t.length>2&&Lt.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${a}]`,t),Vd(t[0],t[1])):Vd(t.address,t.storageKeys));let e=Object.keys(n).map(t=>{let a=n[t].reduce((i,r)=>(i[r]=!0,i),{});return Vd(t,Object.keys(a).sort())});return e.sort((t,a)=>t.address.localeCompare(a.address)),e}function P0(n){return sn(n).map(e=>[e.address,e.storageKeys])}function N0(n,e){if(n.gasPrice!=null){let a=P.from(n.gasPrice),i=P.from(n.maxFeePerGas||0);a.eq(i)||Lt.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:a,maxFeePerGas:i})}let t=[rn(n.chainId||0,"chainId"),rn(n.nonce||0,"nonce"),rn(n.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),rn(n.maxFeePerGas||0,"maxFeePerGas"),rn(n.gasLimit||0,"gasLimit"),n.to!=null?pe(n.to):"0x",rn(n.value||0,"value"),n.data||"0x",P0(n.accessList||[])];if(e){let a=Ln(e);t.push(rn(a.recoveryParam,"recoveryParam")),t.push(Zt(a.r)),t.push(Zt(a.s))}return _t(["0x02",ia(t)])}function D0(n,e){let t=[rn(n.chainId||0,"chainId"),rn(n.nonce||0,"nonce"),rn(n.gasPrice||0,"gasPrice"),rn(n.gasLimit||0,"gasLimit"),n.to!=null?pe(n.to):"0x",rn(n.value||0,"value"),n.data||"0x",P0(n.accessList||[])];if(e){let a=Ln(e);t.push(rn(a.recoveryParam,"recoveryParam")),t.push(Zt(a.r)),t.push(Zt(a.s))}return _t(["0x01",ia(t)])}function Zh(n,e){ji(n,Yh);let t=[];Xh.forEach(function(s){let o=n[s.name]||[],l={};s.numeric&&(l.hexPad="left"),o=B(j(o,l)),s.length&&o.length!==s.length&&o.length>0&&Lt.throwArgumentError("invalid length for "+s.name,"transaction:"+s.name,o),s.maxLength&&(o=Zt(o),o.length>s.maxLength&&Lt.throwArgumentError("invalid length for "+s.name,"transaction:"+s.name,o)),t.push(j(o))});let a=0;if(n.chainId!=null?(a=n.chainId,typeof a!="number"&&Lt.throwArgumentError("invalid transaction.chainId","transaction",n)):e&&!ta(e)&&e.v>28&&(a=Math.floor((e.v-35)/2)),a!==0&&(t.push(j(a)),t.push("0x"),t.push("0x")),!e)return ia(t);let i=Ln(e),r=27+i.recoveryParam;return a!==0?(t.pop(),t.pop(),t.pop(),r+=a*2+8,i.v>28&&i.v!==r&&Lt.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):i.v!==r&&Lt.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 Jr(n,e){if(n.type==null||n.type===0)return n.accessList!=null&&Lt.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",n),Zh(n,e);switch(n.type){case 1:return D0(n,e);case 2:return N0(n,e);default:break}return Lt.throwError(`unsupported transaction type: ${n.type}`,A.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:n.type})}function O0(n,e,t){try{let a=Ft(e[0]).toNumber();if(a!==0&&a!==1)throw new Error("bad recid");n.v=a}catch{Lt.throwArgumentError("invalid v for transaction type: 1","v",e[0])}n.r=fe(e[1],32),n.s=fe(e[2],32);try{let a=le(t(n));n.from=li(a,{r:n.r,s:n.s,recoveryParam:n.v})}catch{}}function ex(n){let e=Vr(n.slice(1));e.length!==9&&e.length!==12&&Lt.throwArgumentError("invalid component count for transaction type: 2","payload",j(n));let t=Ft(e[2]),a=Ft(e[3]),i={type:2,chainId:Ft(e[0]).toNumber(),nonce:Ft(e[1]).toNumber(),maxPriorityFeePerGas:t,maxFeePerGas:a,gasPrice:null,gasLimit:Ft(e[4]),to:jd(e[5]),value:Ft(e[6]),data:e[7],accessList:sn(e[8])};return e.length===9||(i.hash=le(n),O0(i,e.slice(9),N0)),i}function tx(n){let e=Vr(n.slice(1));e.length!==8&&e.length!==11&&Lt.throwArgumentError("invalid component count for transaction type: 1","payload",j(n));let t={type:1,chainId:Ft(e[0]).toNumber(),nonce:Ft(e[1]).toNumber(),gasPrice:Ft(e[2]),gasLimit:Ft(e[3]),to:jd(e[4]),value:Ft(e[5]),data:e[6],accessList:sn(e[7])};return e.length===8||(t.hash=le(n),O0(t,e.slice(8),D0)),t}function nx(n){let e=Vr(n);e.length!==9&&e.length!==6&&Lt.throwArgumentError("invalid raw transaction","rawTransaction",n);let t={nonce:Ft(e[0]).toNumber(),gasPrice:Ft(e[1]),gasLimit:Ft(e[2]),to:jd(e[3]),value:Ft(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 a=t.v-27,i=e.slice(0,6);t.chainId!==0&&(i.push(j(t.chainId)),i.push("0x"),i.push("0x"),a-=t.chainId*2+8);let r=le(ia(i));try{t.from=li(r,{r:j(t.r),s:j(t.s),recoveryParam:a})}catch{}t.hash=le(n)}return t.type=null,t}function vo(n){let e=B(n);if(e[0]>127)return nx(e);switch(e[0]){case 1:return tx(e);case 2:return ex(e);default:break}return Lt.throwError(`unsupported transaction type: ${e[0]}`,A.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}var B0="contracts/5.7.0";var Ra=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(f){try{p(a.next(f))}catch(b){s(b)}}function l(f){try{p(a.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Ie=new A(B0),ax={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 wo(n,e){return Ra(this,void 0,void 0,function*(){let t=yield e;typeof t!="string"&&Ie.throwArgumentError("invalid address or ENS name","name",t);try{return pe(t)}catch{}n||Ie.throwError("a provider or signer is needed to resolve ENS names",A.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});let a=yield n.resolveName(t);return a==null&&Ie.throwArgumentError("resolver or addr is not configured for ENS name","name",t),a})}function $r(n,e,t){return Ra(this,void 0,void 0,function*(){return Array.isArray(t)?yield Promise.all(t.map((a,i)=>$r(n,Array.isArray(e)?e[i]:e[a.name],a))):t.type==="address"?yield wo(n,e):t.type==="tuple"?yield $r(n,e,t.components):t.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(a=>$r(n,a,t.arrayChildren))):Promise.reject(Ie.makeError("invalid value for array",A.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function Ao(n,e,t){return Ra(this,void 0,void 0,function*(){let a={};t.length===e.inputs.length+1&&typeof t[t.length-1]=="object"&&(a=Te(t.pop())),Ie.checkArgumentCount(t.length,e.inputs.length,"passed to contract"),n.signer?a.from?a.from=Ce({override:wo(n.signer,a.from),signer:n.signer.getAddress()}).then(p=>Ra(this,void 0,void 0,function*(){return pe(p.signer)!==p.override&&Ie.throwError("Contract with a Signer cannot override from",A.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),p.override})):a.from=n.signer.getAddress():a.from&&(a.from=wo(n.provider,a.from));let i=yield Ce({args:$r(n.signer||n.provider,t,e.inputs),address:n.resolvedAddress,overrides:Ce(a)||{}}),r=n.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;ba[p]!=null);return l.length&&Ie.throwError(`cannot override ${l.map(p=>JSON.stringify(p)).join(",")}`,A.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:l}),s})}function ix(n,e){return function(...t){return Ao(n,e,t)}}function rx(n,e){let t=n.signer||n.provider;return function(...a){return Ra(this,void 0,void 0,function*(){t||Ie.throwError("estimate require a provider or signer",A.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});let i=yield Ao(n,e,a);return yield t.estimateGas(i)})}}function L0(n,e){let t=e.wait.bind(e);e.wait=a=>t(a).then(i=>(i.events=i.logs.map(r=>{let s=ct(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 U0(n,e,t){let a=n.signer||n.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=Te(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 Ao(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===A.errors.CALL_EXCEPTION&&(l.address=n.address,l.args=i,l.transaction=s),l}})}}function sx(n,e){return function(...t){return Ra(this,void 0,void 0,function*(){n.signer||Ie.throwError("sending a transaction requires a signer",A.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),n.deployTransaction!=null&&(yield n._deployed());let a=yield Ao(n,e,t),i=yield n.signer.sendTransaction(a);return L0(n,i),i})}}function F0(n,e,t){return e.constant?U0(n,e,t):sx(n,e)}function V0(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 pi=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(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]}},Hd=class extends pi{constructor(){super("error",null)}},_o=class extends pi{constructor(e,t,a,i){let r={address:e},s=t.getEventTopic(a);i?(s!==i[0]&&Ie.throwArgumentError("topic mismatch","topics",i),r.topics=i.slice()):r.topics=[s],super(V0(r),r),R(this,"address",e),R(this,"interface",t),R(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=qi(e.args);if(t.length)throw t[0].error;let a=(e.args||[]).slice();return a.push(e),a}},ko=class extends pi{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=(a,i)=>this.interface.decodeEventLog(t.eventFragment,a,i),e.args=t.args}catch{}}},or=class{constructor(e,t,a){R(this,"interface",mt(new.target,"getInterface")(t)),a==null?(R(this,"provider",null),R(this,"signer",null)):Gt.isSigner(a)?(R(this,"provider",a.provider||null),R(this,"signer",a)):$t.isProvider(a)?(R(this,"provider",a),R(this,"signer",null)):Ie.throwArgumentError("invalid signer or provider","signerOrProvider",a),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]]):Ie.warn(`Duplicate definition of ${o} (${l.join(", ")})`)})}if(R(this,"_runningEvents",{}),R(this,"_wrappedEmits",{}),e==null&&Ie.throwArgumentError("invalid contract address or ENS name","addressOrName",e),R(this,"address",e),this.provider)R(this,"resolvedAddress",wo(this.provider,e));else try{R(this,"resolvedAddress",Promise.resolve(pe(e)))}catch{Ie.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]){Ie.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,F0(this,o,!0)),this.functions[s]==null&&R(this.functions,s,F0(this,o,!1)),this.callStatic[s]==null&&R(this.callStatic,s,U0(this,o,!0)),this.populateTransaction[s]==null&&R(this.populateTransaction,s,ix(this,o)),this.estimateGas[s]==null&&R(this.estimateGas,s,rx(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 si(e)}static getInterface(e){return Ma.isInterface(e)?e:new Ma(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",A.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(e){this.signer||Ie.throwError("sending a transactions require a signer",A.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});let t=Te(e||{});return["from","to"].forEach(function(a){t[a]!=null&&Ie.throwError("cannot override "+a,A.errors.UNSUPPORTED_OPERATION,{operation:a})}),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 Hd);if(e==="event")return this._normalizeRunningEvent(new pi("event",null));if(e==="*")return this._normalizeRunningEvent(new ko(this.address,this.interface));let t=this.interface.getEvent(e);return this._normalizeRunningEvent(new _o(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 _o(this.address,this.interface,i,e.topics))}catch{}let t={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new pi(V0(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,a){let i=ct(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||Ie.throwError("events require a provider or a signer with a provider",A.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=Te(i.filter);return typeof t=="string"&&Z(t,32)?(a!=null&&Ie.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)}},ue=class extends or{},yi=class{constructor(e,t,a){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)&&Ie.throwArgumentError("invalid bytecode","bytecode",t),a&&!Gt.isSigner(a)&&Ie.throwArgumentError("invalid signer","signer",a),R(this,"bytecode",i),R(this,"interface",mt(new.target,"getInterface")(e)),R(this,"signer",a||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 a in t)if(!ax[a])throw new Error("unknown transaction override "+a)}return["data","from","to"].forEach(a=>{t[a]!=null&&Ie.throwError("cannot override "+a,A.errors.UNSUPPORTED_OPERATION,{operation:a})}),t.value&&!P.from(t.value).isZero()&&!this.interface.deploy.payable&&Ie.throwError("non-payable constructor cannot override value",A.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:t.value}),Ie.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()),Ie.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor");let a=yield $r(this.signer,e,this.interface.deploy.inputs);a.push(t);let i=this.getDeployTransaction(...a),r=yield this.signer.sendTransaction(i),s=mt(this.constructor,"getContractAddress")(r),o=mt(this.constructor,"getContract")(s,this.interface,this.signer);return L0(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&&Ie.throwError("missing compiler output",A.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 ue.getInterface(e)}static getContractAddress(e){return si(e)}static getContract(e,t,a){return new ue(e,t,a)}};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;)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]=b>>16&255,l[e.length+2]=b>>8&255,l[e.length+3]=b&255;let M=B(pa(i,n,l));r||(r=M.length,f=new Uint8Array(r),s=Math.ceil(a/r),p=a-(s-1)*r),f.set(M);for(let C=1;C{var d6=Object.create;var Fs=Object.defineProperty;var l6=Object.getOwnPropertyDescriptor;var p6=Object.getOwnPropertyNames;var y6=Object.getPrototypeOf,f6=Object.prototype.hasOwnProperty;var c6=(n,e,t)=>e in n?Fs(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var X=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),Li=(n,e)=>{for(var t in e)Fs(n,t,{get:e[t],enumerable:!0})},m6=(n,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of p6(e))!f6.call(n,i)&&i!==t&&Fs(n,i,{get:()=>e[i],enumerable:!(a=l6(e,i))||a.enumerable});return n};var wn=(n,e,t)=>(t=n!=null?d6(y6(n)):{},m6(e||!n||!n.__esModule?Fs(t,"default",{value:n,enumerable:!0}):t,n));var me=(n,e,t)=>(c6(n,typeof e!="symbol"?e+"":e,t),t);var _p=X(()=>{});var Qu=X((kp,$u)=>{(function(n,e){"use strict";function t(E,u){if(!E)throw new Error(u||"Assertion failed")}function a(E,u){E.super_=u;var y=function(){};y.prototype=u.prototype,E.prototype=new y,E.prototype.constructor=E}function i(E,u,y){if(i.isBN(E))return E;this.negative=0,this.words=null,this.length=0,this.red=null,E!==null&&((u==="le"||u==="be")&&(y=u,u=10),this._init(E||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=_p().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(E,u){var y=E.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 "+E)}function o(E,u,y){var x=s(E,y);return y-1>=u&&(x|=s(E,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(E,u,y,x){for(var T=0,_=0,h=Math.min(E.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"],M=[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=M[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 C(E){for(var u=new Array(E.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),I=Math.max(0,d-E.length+1);I<=c;I++){var S=d-I|0;T=E.words[S]|0,_=u.words[I]|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,I=L>>>13,S=T[1]|0,O=S&8191,H=S>>>13,Q=T[2]|0,W=Q&8191,z=Q>>>13,yt=T[3]|0,$=yt&8191,se=yt>>>13,Va=T[4]|0,Pe=Va&8191,Ne=Va>>>13,ja=T[5]|0,De=ja&8191,Oe=ja>>>13,Ha=T[6]|0,Be=Ha&8191,Fe=Ha>>>13,qa=T[7]|0,Le=qa&8191,Ue=qa>>>13,Ga=T[8]|0,Ve=Ga&8191,je=Ga>>>13,za=T[9]|0,He=za&8191,qe=za>>>13,Ka=_[0]|0,Ge=Ka&8191,ze=Ka>>>13,Wa=_[1]|0,Ke=Wa&8191,We=Wa>>>13,Ja=_[2]|0,Je=Ja&8191,$e=Ja>>>13,$a=_[3]|0,Qe=$a&8191,Xe=$a>>>13,Qa=_[4]|0,Ye=Qa&8191,Ze=Qa>>>13,Xa=_[5]|0,et=Xa&8191,tt=Xa>>>13,Ya=_[6]|0,nt=Ya&8191,at=Ya>>>13,Za=_[7]|0,it=Za&8191,rt=Za>>>13,ei=_[8]|0,st=ei&8191,ot=ei>>>13,ti=_[9]|0,ut=ti&8191,dt=ti>>>13;x.negative=u.negative^y.negative,x.length=19,g=Math.imul(c,Ge),d=Math.imul(c,ze),d=d+Math.imul(I,Ge)|0,m=Math.imul(I,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,Ke)|0,d=d+Math.imul(c,We)|0,d=d+Math.imul(I,Ke)|0,m=m+Math.imul(I,We)|0;var Ta=(w+g|0)+((d&8191)<<13)|0;w=(m+(d>>>13)|0)+(Ta>>>26)|0,Ta&=67108863,g=Math.imul(W,Ge),d=Math.imul(W,ze),d=d+Math.imul(z,Ge)|0,m=Math.imul(z,ze),g=g+Math.imul(O,Ke)|0,d=d+Math.imul(O,We)|0,d=d+Math.imul(H,Ke)|0,m=m+Math.imul(H,We)|0,g=g+Math.imul(c,Je)|0,d=d+Math.imul(c,$e)|0,d=d+Math.imul(I,Je)|0,m=m+Math.imul(I,$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(se,Ge)|0,m=Math.imul(se,ze),g=g+Math.imul(W,Ke)|0,d=d+Math.imul(W,We)|0,d=d+Math.imul(z,Ke)|0,m=m+Math.imul(z,We)|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(I,Qe)|0,m=m+Math.imul(I,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($,Ke)|0,d=d+Math.imul($,We)|0,d=d+Math.imul(se,Ke)|0,m=m+Math.imul(se,We)|0,g=g+Math.imul(W,Je)|0,d=d+Math.imul(W,$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(I,Ye)|0,m=m+Math.imul(I,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,Ke)|0,d=d+Math.imul(Pe,We)|0,d=d+Math.imul(Ne,Ke)|0,m=m+Math.imul(Ne,We)|0,g=g+Math.imul($,Je)|0,d=d+Math.imul($,$e)|0,d=d+Math.imul(se,Je)|0,m=m+Math.imul(se,$e)|0,g=g+Math.imul(W,Qe)|0,d=d+Math.imul(W,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(I,et)|0,m=m+Math.imul(I,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,Ke)|0,d=d+Math.imul(De,We)|0,d=d+Math.imul(Oe,Ke)|0,m=m+Math.imul(Oe,We)|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(se,Qe)|0,m=m+Math.imul(se,Xe)|0,g=g+Math.imul(W,Ye)|0,d=d+Math.imul(W,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(I,nt)|0,m=m+Math.imul(I,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,Ke)|0,d=d+Math.imul(Be,We)|0,d=d+Math.imul(Fe,Ke)|0,m=m+Math.imul(Fe,We)|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(se,Ye)|0,m=m+Math.imul(se,Ze)|0,g=g+Math.imul(W,et)|0,d=d+Math.imul(W,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(I,it)|0,m=m+Math.imul(I,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,Ke)|0,d=d+Math.imul(Le,We)|0,d=d+Math.imul(Ue,Ke)|0,m=m+Math.imul(Ue,We)|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(se,et)|0,m=m+Math.imul(se,tt)|0,g=g+Math.imul(W,nt)|0,d=d+Math.imul(W,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(I,st)|0,m=m+Math.imul(I,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,Ke)|0,d=d+Math.imul(Ve,We)|0,d=d+Math.imul(je,Ke)|0,m=m+Math.imul(je,We)|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(se,nt)|0,m=m+Math.imul(se,at)|0,g=g+Math.imul(W,it)|0,d=d+Math.imul(W,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(I,ut)|0,m=m+Math.imul(I,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,Ke),d=Math.imul(He,We),d=d+Math.imul(qe,Ke)|0,m=Math.imul(qe,We),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(se,it)|0,m=m+Math.imul(se,rt)|0,g=g+Math.imul(W,st)|0,d=d+Math.imul(W,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(se,st)|0,m=m+Math.imul(se,ot)|0,g=g+Math.imul(W,ut)|0,d=d+Math.imul(W,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(se,ut)|0,m=m+Math.imul(se,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 Ku=(w+g|0)+((d&8191)<<13)|0;w=(m+(d>>>13)|0)+(Ku>>>26)|0,Ku&=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 Wu=(w+g|0)+((d&8191)<<13)|0;w=(m+(d>>>13)|0)+(Wu>>>26)|0,Wu&=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]=Ku,h[17]=Wu,h[18]=Ju,w!==0&&(h[19]=w,x.length++),x};Math.imul||(N=D);function F(E,u,y){y.negative=u.negative^E.negative,y.length=E.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(E,u,y){return F(E,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(E,u){this.x=E,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=C(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 I=(T.words[_.length+c]|0)*67108864+(T.words[_.length+c-1]|0);for(I=Math.min(I/h|0,67108863),T._ishlnsubmul(_,I,c);T.negative!==0;)I--,T.negative=0,T._ishlnsubmul(_,1,c),T.isZero()||(T.negative^=1);d&&(d.words[c]=I)}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 I=0,S=1;(x.words[0]&S)===0&&I<26;++I,S<<=1);if(I>0)for(x.iushrn(I);I-- >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 ie(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 K(E,u){this.name=E,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()}K.prototype._tmp=function(){var u=new i(null);return u.words=new Array(Math.ceil(this.n/13)),u},K.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},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")}a(ye,K),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 ie(E){if(typeof E=="string"){var u=i._prime(E);this.m=u.p,this.prime=u}else t(E.gtn(1),"modulus must be greater than 1"),this.m=E,this.prime=null}ie.prototype._verify1=function(u){t(u.negative===0,"red works only with positives"),t(u.red,"red works only with red numbers")},ie.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")},ie.prototype.imod=function(u){return this.prime?this.prime.ireduce(u)._forceRed(this):(p(u,u.umod(this.m)._forceRed(this)),u)},ie.prototype.neg=function(u){return u.isZero()?u.clone():this.m.sub(u)._forceRed(this)},ie.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)},ie.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},ie.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)},ie.prototype.isub=function(u,y){this._verify2(u,y);var x=u.isub(y);return x.cmpn(0)<0&&x.iadd(this.m),x},ie.prototype.shl=function(u,y){return this._verify1(u),this.imod(u.ushln(y))},ie.prototype.imul=function(u,y){return this._verify2(u,y),this.imod(u.imul(y))},ie.prototype.mul=function(u,y){return this._verify2(u,y),this.imod(u.mul(y))},ie.prototype.isqr=function(u){return this.imul(u,u.clone())},ie.prototype.sqr=function(u){return this.mul(u,u)},ie.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),I=_;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},ie.prototype.convertTo=function(u){var y=u.umod(this.m);return y===u?y.clone():y},ie.prototype.convertFrom=function(u){var y=u.clone();return y.red=null,y},i.mont=function(u){return new we(u)};function we(E){ie.call(this,E),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(we,ie),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 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)},we.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)},we.prototype.invm=function(u){var y=this.imod(u._invmp(this.m).mul(this.r2));return y._forceRed(this)}})(typeof $u>"u"||$u,kp)});var $p=X((X1,qs)=>{(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 qs=="object"&&qs.exports,o=typeof define=="function"&&define.amd,l=!a.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",p="0123456789abcdef".split(""),f=[31,7936,2031616,520093696],b=[4,1024,262144,67108864],M=[1,256,65536,16777216],k=[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};(a.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(c){return Object.prototype.toString.call(c)==="[object Array]"}),l&&(a.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,I,S){return function(O){return new d(c,I,c).update(O)[S]()}},q=function(c,I,S){return function(O,H){return new d(c,I,H).update(O)[S]()}},K=function(c,I,S){return function(O,H,Q,W){return u["cshake"+c].update(O,H,Q,W)[S]()}},ye=function(c,I,S){return function(O,H,Q,W){return u["kmac"+c].update(O,H,Q,W)[S]()}},te=function(c,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}d.prototype.update=function(c){if(this.finalized)throw new Error(e);var I,S=typeof c;if(S!=="string"){if(S==="object"){if(c===null)throw new Error(n);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(n)}else throw new Error(n);I=!0}for(var O=this.blocks,H=this.byteCount,Q=c.length,W=this.blockCount,z=0,yt=this.s,$,se;z>2]|=c[z]<>2]|=se<>2]|=(192|se>>6)<>2]|=(128|se&63)<=57344?(O[$>>2]|=(224|se>>12)<>2]|=(128|se>>6&63)<>2]|=(128|se&63)<>2]|=(240|se>>18)<>2]|=(128|se>>12&63)<>2]|=(128|se>>6&63)<>2]|=(128|se&63)<=H){for(this.start=$-H,this.block=O[W],$=0;$>8,S=c&255;S>0;)H.unshift(S),c=c>>8,S=c&255,++O;return I?H.push(O):H.unshift(O),this.update(H),H.length},d.prototype.encodeString=function(c){var I,S=typeof c;if(S!=="string"){if(S==="object"){if(c===null)throw new Error(n);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(n)}else throw new Error(n);I=!0}var O=0,H=c.length;if(I)O=H;else for(var Q=0;Q=57344?O+=3:(W=65536+((W&1023)<<10|c.charCodeAt(++Q)&1023),O+=4)}return O+=this.encode(O*8),this.update(c),O},d.prototype.bytepad=function(c,I){for(var S=this.encode(I),O=0;O>2]|=this.padding[I&3],this.lastByteIndex===this.byteCount)for(c[0]=c[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%c===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},d.prototype.arrayBuffer=function(){this.finalize();var c=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 yt=new Uint32Array(z);Q>8&255,W[z+2]=yt>>16&255,W[z+3]=yt>>24&255;Q%c===0&&L(I)}return O&&(z=Q<<2,yt=I[H],W[z]=yt&255,O>1&&(W[z+1]=yt>>8&255),O>2&&(W[z+2]=yt>>16&255)),W};function m(c,I,S){d.call(this,c,I,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 I,S,O,H,Q,W,z,yt,$,se,Va,Pe,Ne,ja,De,Oe,Ha,Be,Fe,qa,Le,Ue,Ga,Ve,je,za,He,qe,Ka,Ge,ze,Wa,Ke,We,Ja,Je,$e,$a,Qe,Xe,Qa,Ye,Ze,Xa,et,tt,Ya,nt,at,Za,it,rt,ei,st,ot,ti,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],W=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],se=c[6]^c[16]^c[26]^c[36]^c[46],Va=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],I=Pe^(W<<1|z>>>31),S=Ne^(z<<1|W>>>31),c[0]^=I,c[1]^=S,c[10]^=I,c[11]^=S,c[20]^=I,c[21]^=S,c[30]^=I,c[31]^=S,c[40]^=I,c[41]^=S,I=H^(yt<<1|$>>>31),S=Q^($<<1|yt>>>31),c[2]^=I,c[3]^=S,c[12]^=I,c[13]^=S,c[22]^=I,c[23]^=S,c[32]^=I,c[33]^=S,c[42]^=I,c[43]^=S,I=W^(se<<1|Va>>>31),S=z^(Va<<1|se>>>31),c[4]^=I,c[5]^=S,c[14]^=I,c[15]^=S,c[24]^=I,c[25]^=S,c[34]^=I,c[35]^=S,c[44]^=I,c[45]^=S,I=yt^(Pe<<1|Ne>>>31),S=$^(Ne<<1|Pe>>>31),c[6]^=I,c[7]^=S,c[16]^=I,c[17]^=S,c[26]^=I,c[27]^=S,c[36]^=I,c[37]^=S,c[46]^=I,c[47]^=S,I=se^(H<<1|Q>>>31),S=Va^(Q<<1|H>>>31),c[8]^=I,c[9]^=S,c[18]^=I,c[19]^=S,c[28]^=I,c[29]^=S,c[38]^=I,c[39]^=S,c[48]^=I,c[49]^=S,ja=c[0],De=c[1],tt=c[11]<<4|c[10]>>>28,Ya=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,We=c[2]<<1|c[3]>>>31,Ja=c[3]<<1|c[2]>>>31,Oe=c[13]<<12|c[12]>>>20,Ha=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,Za=c[34]<<15|c[35]>>>17,it=c[35]<<15|c[34]>>>17,Wa=c[45]<<29|c[44]>>>3,Ke=c[44]<<29|c[45]>>>3,Ve=c[6]<<28|c[7]>>>4,je=c[7]<<28|c[6]>>>4,ti=c[17]<<23|c[16]>>>9,ut=c[16]<<23|c[17]>>>9,$a=c[26]<<25|c[27]>>>7,Qe=c[27]<<25|c[26]>>>7,qa=c[36]<<21|c[37]>>>11,Le=c[37]<<21|c[36]>>>11,rt=c[47]<<24|c[46]>>>8,ei=c[46]<<24|c[47]>>>8,Xa=c[8]<<27|c[9]>>>5,et=c[9]<<27|c[8]>>>5,za=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,Qa=c[39]<<8|c[38]>>>24,Ue=c[48]<<14|c[49]>>>18,Ga=c[49]<<14|c[48]>>>18,c[0]=ja^~Oe&Be,c[1]=De^~Ha&Fe,c[10]=Ve^~za&qe,c[11]=je^~He&Ka,c[20]=We^~Je&$a,c[21]=Ja^~$e&Qe,c[30]=Xa^~tt&nt,c[31]=et^~Ya&at,c[40]=st^~ti&dt,c[41]=ot^~ut&ga,c[2]=Oe^~Be&qa,c[3]=Ha^~Fe&Le,c[12]=za^~qe&Ge,c[13]=He^~Ka&ze,c[22]=Je^~$a&Xe,c[23]=$e^~Qe&Qa,c[32]=tt^~nt&Za,c[33]=Ya^~at&it,c[42]=ti^~dt&Ta,c[43]=ut^~ga&va,c[4]=Be^~qa&Ue,c[5]=Fe^~Le&Ga,c[14]=qe^~Ge&Wa,c[15]=Ka^~ze&Ke,c[24]=$a^~Xe&Ye,c[25]=Qe^~Qa&Ze,c[34]=nt^~Za&rt,c[35]=at^~it&ei,c[44]=dt^~Ta&wa,c[45]=ga^~va&_a,c[6]=qa^~Ue&ja,c[7]=Le^~Ga&De,c[16]=Ge^~Wa&Ve,c[17]=ze^~Ke&je,c[26]=Xe^~Ye&We,c[27]=Qa^~Ze&Ja,c[36]=Za^~rt&Xa,c[37]=it^~ei&et,c[46]=Ta^~wa&st,c[47]=va^~_a&ot,c[8]=Ue^~ja&Oe,c[9]=Ga^~De&Ha,c[18]=Wa^~Ve&za,c[19]=Ke^~je&He,c[28]=Ye^~We&Je,c[29]=Ze^~Ja&$e,c[38]=rt^~Xa&tt,c[39]=ei^~et&Ya,c[48]=wa^~st&ti,c[49]=_a^~ot&ut,c[0]^=C[O],c[1]^=C[O+1]};if(s)qs.exports=u;else{for(x=0;x{Gy.exports=qy;function qy(n,e){if(!n)throw new Error(e||"Assertion failed")}qy.equal=function(e,t,a){if(e!=t)throw new Error(a||"Assertion failed: "+e+" != "+t)}});var zy=X((qv,_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 a=function(){};a.prototype=t.prototype,e.prototype=new a,e.prototype.constructor=e}}});var kn=X(Se=>{"use strict";var T2=Zi(),v2=zy();Se.inherits=v2;function w2(n,e){return(n.charCodeAt(e)&64512)!==55296||e<0||e+1>=n.length?!1:(n.charCodeAt(e+1)&64512)===56320}function _2(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):w2(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}Se.htonl=Ky;function A2(n,e){for(var t="",a=0;a>>0}return r}Se.join32=E2;function M2(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}Se.split32=M2;function C2(n,e){return n>>>e|n<<32-e}Se.rotr32=C2;function I2(n,e){return n<>>32-e}Se.rotl32=I2;function S2(n,e){return n+e>>>0}Se.sum32=S2;function R2(n,e,t){return n+e+t>>>0}Se.sum32_3=R2;function P2(n,e,t,a){return n+e+t+a>>>0}Se.sum32_4=P2;function N2(n,e,t,a,i){return n+e+t+a+i>>>0}Se.sum32_5=N2;function D2(n,e,t,a){var i=n[e],r=n[e+1],s=a+r>>>0,o=(s>>0,n[e+1]=s}Se.sum64=D2;function O2(n,e,t,a){var i=e+a>>>0,r=(i>>0}Se.sum64_hi=O2;function B2(n,e,t,a){var i=e+a;return i>>>0}Se.sum64_lo=B2;function F2(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}Se.sum64_4_hi=F2;function L2(n,e,t,a,i,r,s,o){var l=e+a+r+o;return l>>>0}Se.sum64_4_lo=L2;function U2(n,e,t,a,i,r,s,o,l,p){var f=0,b=e;b=b+a>>>0,f+=b>>0,f+=b>>0,f+=b>>0,f+=b>>0}Se.sum64_5_hi=U2;function V2(n,e,t,a,i,r,s,o,l,p){var f=e+a+r+o+p;return f>>>0}Se.sum64_5_lo=V2;function j2(n,e,t){var a=e<<32-t|n>>>t;return a>>>0}Se.rotr64_hi=j2;function H2(n,e,t){var a=n<<32-t|e>>>t;return a>>>0}Se.rotr64_lo=H2;function q2(n,e,t){return n>>>t}Se.shr64_hi=q2;function G2(n,e,t){var a=n<<32-t|e>>>t;return a>>>0}Se.shr64_lo=G2});var er=X(Qy=>{"use strict";var $y=kn(),z2=Zi();function po(){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}Qy.BlockHash=po;po.prototype.update=function(e,t){if(e=$y.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=$y.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 K2=kn(),jn=K2.rotr32;function W2(n,e,t,a){if(n===0)return Xy(e,t,a);if(n===1||n===3)return Zy(e,t,a);if(n===2)return Yy(e,t,a)}oa.ft_1=W2;function Xy(n,e,t){return n&e^~n&t}oa.ch32=Xy;function Yy(n,e,t){return n&e^n&t^e&t}oa.maj32=Yy;function Zy(n,e,t){return n^e^t}oa.p32=Zy;function J2(n){return jn(n,2)^jn(n,13)^jn(n,22)}oa.s0_256=J2;function $2(n){return jn(n,6)^jn(n,11)^jn(n,25)}oa.s1_256=$2;function Q2(n){return jn(n,7)^jn(n,18)^n>>>3}oa.g0_256=Q2;function X2(n){return jn(n,17)^jn(n,19)^n>>>10}oa.g1_256=X2});var n0=X((Wv,t0)=>{"use strict";var tr=kn(),Y2=er(),Z2=kd(),Ad=tr.rotl32,zr=tr.sum32,eh=tr.sum32_5,th=Z2.ft_1,e0=Y2.BlockHash,nh=[1518500249,1859775393,2400959708,3395469782];function Hn(){if(!(this instanceof Hn))return new Hn;e0.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}tr.inherits(Hn,e0);t0.exports=Hn;Hn.blockSize=512;Hn.outSize=160;Hn.hmacStrength=80;Hn.padLength=64;Hn.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 nr=kn(),ah=er(),ar=kd(),ih=Zi(),An=nr.sum32,rh=nr.sum32_4,sh=nr.sum32_5,oh=ar.ch32,uh=ar.maj32,dh=ar.s0_256,lh=ar.s1_256,ph=ar.g0_256,yh=ar.g1_256,a0=ah.BlockHash,fh=[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;a0.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=fh,this.W=new Array(64)}nr.inherits(qn,a0);i0.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 Md=kn(),r0=Ed();function ua(){if(!(this instanceof ua))return new ua;r0.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}Md.inherits(ua,r0);s0.exports=ua;ua.blockSize=512;ua.outSize=224;ua.hmacStrength=192;ua.padLength=64;ua.prototype._digest=function(e){return e==="hex"?Md.toHex32(this.h.slice(0,7),"big"):Md.split32(this.h.slice(0,7),"big")}});var Sd=X((Qv,p0)=>{"use strict";var Qt=kn(),ch=er(),mh=Zi(),Gn=Qt.rotr64_hi,zn=Qt.rotr64_lo,u0=Qt.shr64_hi,d0=Qt.shr64_lo,Ca=Qt.sum64,Cd=Qt.sum64_hi,Id=Qt.sum64_lo,hh=Qt.sum64_4_hi,xh=Qt.sum64_4_lo,bh=Qt.sum64_5_hi,gh=Qt.sum64_5_lo,l0=ch.BlockHash,Th=[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;l0.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=Th,this.W=new Array(160)}Qt.inherits(En,l0);p0.exports=En;En.blockSize=1024;En.outSize=512;En.hmacStrength=192;En.padLength=128;En.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 Rd=kn(),y0=Sd();function da(){if(!(this instanceof da))return new da;y0.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}Rd.inherits(da,y0);f0.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 m0=X(ir=>{"use strict";ir.sha1=n0();ir.sha224=o0();ir.sha256=Ed();ir.sha384=c0();ir.sha512=Sd()});var v0=X(T0=>{"use strict";var ui=kn(),Nh=er(),yo=ui.rotl32,h0=ui.sum32,Kr=ui.sum32_3,x0=ui.sum32_4,g0=Nh.BlockHash;function Kn(){if(!(this instanceof Kn))return new Kn;g0.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}ui.inherits(Kn,g0);T0.ripemd160=Kn;Kn.blockSize=512;Kn.outSize=160;Kn.hmacStrength=192;Kn.padLength=64;Kn.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,f=r,b=s,M=o,k=0;k<80;k++){var v=h0(yo(x0(a,b0(k,i,r,s),e[Bh[k]+t],Dh(k)),Lh[k]),o);a=o,o=s,s=yo(r,10),r=i,i=v,v=h0(yo(x0(l,b0(79-k,p,f,b),e[Fh[k]+t],Oh(k)),Uh[k]),M),l=M,M=b,b=yo(f,10),f=p,p=v}v=Kr(this.h[1],r,b),this.h[1]=Kr(this.h[2],s,M),this.h[2]=Kr(this.h[3],o,l),this.h[3]=Kr(this.h[4],a,p),this.h[4]=Kr(this.h[0],i,f),this.h[0]=v};Kn.prototype._digest=function(e){return e==="hex"?ui.toHex32(this.h,"little"):ui.split32(this.h,"little")};function b0(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 Dh(n){return n<=15?0:n<=31?1518500249:n<=47?1859775393:n<=63?2400959708:2840853838}function Oh(n){return n<=15?1352829926:n<=31?1548603684:n<=47?1836072691:n<=63?2053994217:0}var Bh=[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],Fh=[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],Lh=[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],Uh=[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 _0=X((e3,w0)=>{"use strict";var Vh=kn(),jh=Zi();function rr(n,e,t){if(!(this instanceof rr))return new rr(n,e,t);this.Hash=n,this.blockSize=n.blockSize/8,this.outSize=n.outSize/8,this.inner=null,this.outer=null,this._init(Vh.toArray(e,t))}w0.exports=rr;rr.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),jh(e.length<=this.blockSize);for(var t=e.length;t{var St=k0;St.utils=kn();St.common=er();St.sha=m0();St.ripemd=v0();St.hmac=_0();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,Y0)=>{"use strict";(function(n){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 a(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],M=[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],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 c=0,I=d,S;I>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=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]},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]^C[d[(m+3)%4]&255]^this._Ke[L][m];d=g.slice()}for(var c=i(16),I,m=0;m<4;m++)I=this._Ke[w][m],c[4*m]=(f[d[m]>>24&255]^I>>24)&255,c[4*m+1]=(f[d[(m+1)%4]>>16&255]^I>>16)&255,c[4*m+2]=(f[d[(m+2)%4]>>8&255]^I>>8)&255,c[4*m+3]=(f[d[(m+3)%4]&255]^I)&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),I,m=0;m<4;m++)I=this._Kd[w][m],c[4*m]=(b[d[m]>>24&255]^I>>24)&255,c[4*m+1]=(b[d[(m+3)%4]>>16&255]^I>>16)&255,c[4*m+2]=(b[d[(m+2)%4]>>8&255]^I>>8)&255,c[4*m+3]=(b[d[(m+1)%4]&255]^I)&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=a(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=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,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=a(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(n){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]),C=1779033703,D=3144134277,N=1013904242,F=2773480762,U=1359893119,G=2600822924,q=528734635,K=1541459225,ye=new Uint32Array(64);function te(y){let x=0,T=y.length;for(;T>=64;){let _=C,h=D,w=N,g=F,d=U,m=G,L=q,c=K,I,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++)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=(((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;C=C+_|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,K=K+c|0,x+=64,T-=64}}te(k);let ae,Re=k.length%64,ie=k.length/536870912|0,we=k.length<<3,E=Re<56?56:120,u=k.slice(k.length-Re,k.length);for(u.push(128),ae=Re+1;ae>>24&255),u.push(ie>>>16&255),u.push(ie>>>8&255),u.push(ie>>>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 a(k,v,C){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;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 i(k,v,C,D,N){let F;for(l(k,(2*C-1)*16,N,0,16),F=0;F<2*C;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 C=8;C>0;C-=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 C=0;C<16;++C)k[C]+=v[C]}function o(k,v,C,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,C,D,N,F,U){if(C=f(C,"N"),D=f(D,"r"),N=f(N,"p"),F=f(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(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=a(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=a(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 M={scrypt:function(k,v,C,D,N,F,U){return new Promise(function(G,q){let K=0;U&&U(0),b(k,v,C,D,N,F,function(ye,te,ae){if(ye)q(ye);else if(ae)U&&K!==1&&U(1),G(new Uint8Array(ae));else if(U&&te!==K)return K=te,U(te)})})},syncScrypt:function(k,v,C,D,N,F){return new Uint8Array(b(k,v,C,D,N,F))}};typeof nl<"u"?ef.exports=M:typeof define=="function"&&define.amd?define(M):n&&(n.scrypt&&(n._scrypt=n.scrypt),n.scrypt=M)})(nl)});var Ef=X((qw,Af)=>{"use strict";var Bo="qpzry9x8gf2tvdw0s3jn54khce6mua7l",ol={};for(ns=0;ns>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 _f(n){for(var e=1,t=0;t126)return"Invalid prefix ("+n+")";e=cr(e)^a>>5}for(e=cr(e),t=0;tt)throw new TypeError("Exceeds length limit");n=n.toLowerCase();var a=_f(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=cr(a)^s,i+=Bo.charAt(s)}for(r=0;r<6;++r)a=cr(a);for(a^=1,r=0;r<6;++r){var o=a>>(5-r)*5&31;i+=Bo.charAt(o)}return i}function kf(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=_f(r);if(typeof o=="string")return o;for(var l=[],p=0;p=s.length)&&l.push(b)}return o!==1?"Invalid checksum for "+n:{prefix:r,words:l}}function Ax(){var n=kf.apply(null,arguments);if(typeof n=="object")return n}function Ex(n){var e=kf.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function Fo(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 Ll=="object"&&typeof Ul<"u"?Ul.exports=e():typeof define=="function"&&define.amd?define(e):(n=typeof globalThis<"u"?globalThis:n||self,n.fetchRetry=e())})(Ll,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,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(M,k){var v=function(D){var N=typeof Request<"u"&&o instanceof Request?o.clone():o;a(N,l).then(function(F){if(Array.isArray(b)&&b.indexOf(F.status)===-1)M(F);else if(typeof b=="function")try{return Promise.resolve(b(D,null,F)).then(function(U){U?C(D,null,F):M(F)}).catch(k)}catch(U){k(U)}else D=0}function t(a){this.name="ArgumentError",this.message=a}return n})});var Vl=X(Zo=>{"use strict";Object.defineProperty(Zo,"__esModule",{value:!0});Zo.$dictionary=void 0;Zo.$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 As=X((Xk,Vc)=>{Vc.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}});var Hl=X(Ba=>{var Ae=As(),jl=()=>[{type:Ae.RANGE,from:48,to:57}],jc=()=>[{type:Ae.CHAR,value:95},{type:Ae.RANGE,from:97,to:122},{type:Ae.RANGE,from:65,to:90}].concat(jl()),Hc=()=>[{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}],x5=()=>[{type:Ae.CHAR,value:10},{type:Ae.CHAR,value:13},{type:Ae.CHAR,value:8232},{type:Ae.CHAR,value:8233}];Ba.words=()=>({type:Ae.SET,set:jc(),not:!1});Ba.notWords=()=>({type:Ae.SET,set:jc(),not:!0});Ba.ints=()=>({type:Ae.SET,set:jl(),not:!1});Ba.notInts=()=>({type:Ae.SET,set:jl(),not:!0});Ba.whitespace=()=>({type:Ae.SET,set:Hc(),not:!1});Ba.notWhitespace=()=>({type:Ae.SET,set:Hc(),not:!0});Ba.anyChar=()=>({type:Ae.SET,set:x5(),not:!0})});var Gc=X(Es=>{var qc=As(),kr=Hl(),b5="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?",g5={0:0,t:9,n:10,v:11,f:12,r:13};Es.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 f=a?8:r?parseInt(r,16):s?parseInt(s,16):o?parseInt(o,8):l?b5.indexOf(l):g5[p],b=String.fromCharCode(f);return/[[\]{}^$.|?*+()]/.test(b)&&(b="\\"+b),b}),n};Es.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(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:qc.RANGE,from:(i[8]||i[9]).charCodeAt(0),to:i[10].charCodeAt(0)});else if(r=i[12])t.push({type:qc.CHAR,value:r.charCodeAt(0)});else return[t,a.lastIndex];Es.error(e,"Unterminated character class")};Es.error=(n,e)=>{throw new SyntaxError("Invalid regular expression: /"+n+"/: "+e)}});var zc=X(Ms=>{var eu=As();Ms.wordBoundary=()=>({type:eu.POSITION,value:"b"});Ms.nonWordBoundary=()=>({type:eu.POSITION,value:"B"});Ms.begin=()=>({type:eu.POSITION,value:"^"});Ms.end=()=>({type:eu.POSITION,value:"$"})});var Kc=X((tA,ql)=>{var Ar=Gc(),xn=As(),vi=Hl(),tu=zc();ql.exports=n=>{var e=0,t,a,i={type:xn.ROOT,stack:[]},r=i,s=i.stack,o=[],l=N=>{Ar.error(n,`Nothing to repeat at column ${N-1}`)},p=Ar.strToChars(n);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 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}))}};Wc.exports=Fa});var Qc=X((aA,$c)=>{var nu=Kc(),Cs=Jc(),wi=nu.types;$c.exports=class Is{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:Is.prototype.max!=null?Is.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 wi.ROOT:case wi.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 T5=_i&&_i.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(_i,"__esModule",{value:!0});_i.RandomGenerator=void 0;var v5=T5(Qc()),w5;(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 v5.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()}})(w5=_i.RandomGenerator||(_i.RandomGenerator={}))});var Ss=X(Er=>{"use strict";var _5=Er&&Er.__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(Er,"__esModule",{value:!0});Er.TypeGuardError=void 0;var k5=function(n){_5(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);Er.TypeGuardError=k5});var Yc=X(au=>{"use strict";Object.defineProperty(au,"__esModule",{value:!0});au.$any=void 0;var A5=function(n){return n!==void 0?JSON.parse(JSON.stringify(n)):void 0};au.$any=A5});var Zc=X(iu=>{"use strict";Object.defineProperty(iu,"__esModule",{value:!0});iu.$every=void 0;var E5=function(n,e){for(var t=null,a=0;a{"use strict";Object.defineProperty(ru,"__esModule",{value:!0});ru.$guard=void 0;var M5=Ss(),C5=function(n){return function(e,t){if(e===!0)throw new M5.TypeGuardError({method:n,path:t.path,expected:t.expected,value:t.value});return!1}};ru.$guard=C5});var tm=X(su=>{"use strict";Object.defineProperty(su,"__esModule",{value:!0});su.$is_between=void 0;var I5=function(n,e,t){return e<=n&&n<=t};su.$is_between=I5});var nm=X(ou=>{"use strict";Object.defineProperty(ou,"__esModule",{value:!0});ou.$is_custom=void 0;var S5=Vl(),R5=function(n,e,t,a){var i,r=(i=S5.$dictionary.get(n))===null||i===void 0?void 0:i.get(e);return r===void 0?!0:r(t)(a)};ou.$is_custom=R5});var am=X(uu=>{"use strict";Object.defineProperty(uu,"__esModule",{value:!0});uu.$is_date=void 0;var P5=function(n){return N5.test(n)};uu.$is_date=P5;var N5=/^(\d{4})-(\d{2})-(\d{2})$/});var im=X(du=>{"use strict";Object.defineProperty(du,"__esModule",{value:!0});du.$is_datetime=void 0;var D5=function(n){return!isNaN(new Date(n).getTime())};du.$is_datetime=D5});var rm=X(lu=>{"use strict";Object.defineProperty(lu,"__esModule",{value:!0});lu.$is_email=void 0;var O5=function(n){return B5.test(n)};lu.$is_email=O5;var B5=/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i});var sm=X(pu=>{"use strict";Object.defineProperty(pu,"__esModule",{value:!0});pu.$is_ipv4=void 0;var F5=function(n){return L5.test(n)};pu.$is_ipv4=F5;var L5=/^(?: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 om=X(yu=>{"use strict";Object.defineProperty(yu,"__esModule",{value:!0});yu.$is_ipv6=void 0;var U5=function(n){return V5.test(n)};yu.$is_ipv6=U5;var V5=/^(([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=X(fu=>{"use strict";Object.defineProperty(fu,"__esModule",{value:!0});fu.$is_url=void 0;var j5=function(n){return H5.test(n)};fu.$is_url=j5;var H5=/^[a-zA-Z0-9]+:\/\/(?:www.)?[-a-zA-Z0-9@:%._+~#=]{1,256}.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/});var dm=X(cu=>{"use strict";Object.defineProperty(cu,"__esModule",{value:!0});cu.$is_uuid=void 0;var q5=function(n){return G5.test(n)};cu.$is_uuid=q5;var G5=/^(?:[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 lm=X(mu=>{"use strict";Object.defineProperty(mu,"__esModule",{value:!0});mu.$join=void 0;var z5=function(n){return K5(n)?".".concat(n):"[".concat(JSON.stringify(n),"]")};mu.$join=z5;var K5=function(n){return W5(n)===!1&&/^[a-zA-Z_$][a-zA-Z_$0-9]*$/g.test(n)},W5=function(n){return J5.has(n)},J5=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 pm=X(hu=>{"use strict";Object.defineProperty(hu,"__esModule",{value:!0});hu.$number=void 0;var $5=Ss(),Q5=function(n){if(isFinite(n)===!1)throw new $5.TypeGuardError({method:"typia.stringify",expected:"number",value:n,message:"Error on typia.stringify(): infinite or not a number."});return n};hu.$number=Q5});var ym=X(xu=>{"use strict";Object.defineProperty(xu,"__esModule",{value:!0});xu.$report=void 0;var X5=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}};xu.$report=X5});var fm=X(bu=>{"use strict";Object.defineProperty(bu,"__esModule",{value:!0});bu.$rest=void 0;var Y5=function(n){return n.length===2?"":","+n.substring(1,n.length-1)};bu.$rest=Y5});var cm=X(gu=>{"use strict";Object.defineProperty(gu,"__esModule",{value:!0});gu.$string=void 0;var Z5=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,'"')};gu.$string=Z5});var mm=X(Tu=>{"use strict";Object.defineProperty(Tu,"__esModule",{value:!0});Tu.$tail=void 0;var eb=function(n){return n[n.length-1]===","?n.substring(0,n.length-1):n};Tu.$tail=eb});var gm=X(ki=>{"use strict";var Ut=ki&&ki.__assign||function(){return Ut=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 Ut(Ut({},n.is()),{number:fb.$number,string:hb.$string,tail:xb.$tail,rest:mb.$rest,throws:e(t)})},n.clone=function(t){return Ut(Ut({},n.is()),{throws:e(t),any:tb.$any})},n.prune=function(t){return Ut(Ut({},n.is()),{throws:e(t)})},n.random=function(){return{generator:hm.RandomGenerator,pick:hm.RandomGenerator.pick}};var e=function(t){return function(a){throw new xm.TypeGuardError(Ut(Ut({},a),{method:"typia.".concat(t)}))}}})(bb=ki.Namespace||(ki.Namespace={}))});var Tm=X(Rs=>{"use strict";Object.defineProperty(Rs,"__esModule",{value:!0});Rs.MapUtil=void 0;var gb;(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}}})(gb=Rs.MapUtil||(Rs.MapUtil={}))});var wm=X(vm=>{"use strict";Object.defineProperty(vm,"__esModule",{value:!0})});var km=X(_m=>{"use strict";Object.defineProperty(_m,"__esModule",{value:!0})});var Em=X(Am=>{"use strict";Object.defineProperty(Am,"__esModule",{value:!0})});var Cm=X(Mm=>{"use strict";Object.defineProperty(Mm,"__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 np=X(V=>{"use strict";var Tb=V&&V.__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]}),Ai=V&&V.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Tb(e,n,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 Mr=Vl(),Ee=gm(),vb=Tm();Ai(wm(),V);Ai(km(),V);Ai(Em(),V);Ai(Cm(),V);Ai(Sm(),V);Ai(Pm(),V);Ai(Ss(),V);function Gl(){ne("assert")}V.assert=Gl;Object.assign(Gl,Ee.Namespace.assert("assert"));function zl(){ne("assertType")}V.assertType=zl;Object.assign(zl,Ee.Namespace.assert("assertType"));function vu(){ne("is")}V.is=vu;Object.assign(vu,Ee.Namespace.assert("is"));function wu(){ne("validate")}V.validate=wu;Object.assign(wu,Ee.Namespace.validate());function Kl(){ne("assertEquals")}V.assertEquals=Kl;Object.assign(Kl,Ee.Namespace.assert("assertEquals"));function Wl(){ne("equals")}V.equals=Wl;Object.assign(Wl,Ee.Namespace.is());function Jl(){ne("validateEquals")}V.validateEquals=Jl;Object.assign(Jl,Ee.Namespace.validate());V.customValidators={size:function(n){var e,t;return n?(t=(e=Mr.$dictionary.get(n))===null||e===void 0?void 0:e.size)!==null&&t!==void 0?t:0:Mr.$dictionary.size},has:function(n){return function(e){var t,a;return(a=(t=Mr.$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=Mr.$dictionary.get(n))===null||t===void 0?void 0:t.get(e)}},insert:function(n){return function(e){return function(t){var a=vb.MapUtil.take(Mr.$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=Mr.$dictionary.get(n))===null||t===void 0?void 0:t.delete(e))!==null&&a!==void 0?a:!1}}};function wb(){ne("application")}V.application=wb;function $l(){ne("assertParse")}V.assertParse=$l;Object.assign($l,Ee.Namespace.assert("assertParse"));function Ql(){ne("isParse")}V.isParse=Ql;Object.assign(Ql,vu);function Xl(){ne("validateParse")}V.validateParse=Xl;Object.assign(Xl,wu);function Yl(){ne("stringify")}V.stringify=Yl;Object.assign(Yl,Ee.Namespace.stringify("stringify"));function _u(){ne("assertStringify")}V.assertStringify=_u;Object.assign(_u,Ee.Namespace.assert("assertStringify"));Object.assign(_u,Ee.Namespace.stringify("assertStringify"));function ku(){ne("isStringify")}V.isStringify=ku;Object.assign(ku,Ee.Namespace.is());Object.assign(ku,Ee.Namespace.stringify("isStringify"));function Au(){ne("validateStringify")}V.validateStringify=Au;Object.assign(Au,Ee.Namespace.validate());Object.assign(Au,Ee.Namespace.stringify("validateStringify"));function _b(){ne("metadata")}V.metadata=_b;function Zl(){ne("random")}V.random=Zl;Object.assign(Zl,Ee.Namespace.random());function kb(){ne("literals")}V.literals=kb;function ep(){ne("clone")}V.clone=ep;Object.assign(ep,Ee.Namespace.clone("clone"));function Eu(){ne("assertClone")}V.assertClone=Eu;Object.assign(Eu,Ee.Namespace.assert("assertClone"));Object.assign(Eu,Ee.Namespace.clone("assertClone"));function Mu(){ne("isClone")}V.isClone=Mu;Object.assign(Mu,Ee.Namespace.is());Object.assign(Mu,Ee.Namespace.clone("isClone"));function Cu(){ne("validateClone")}V.validateClone=Cu;Object.assign(Cu,Ee.Namespace.validate());Object.assign(Cu,Ee.Namespace.clone("validateClone"));function tp(){ne("prune")}V.prune=tp;Object.assign(tp,Ee.Namespace.prune("prune"));function Iu(){ne("assertPrune")}V.assertPrune=Iu;Object.assign(Iu,Ee.Namespace.assert("assertPrune"));Object.assign(Iu,Ee.Namespace.prune("assertPrune"));function Su(){ne("isPrune")}V.isPrune=Su;Object.assign(Su,Ee.Namespace.is());Object.assign(Su,Ee.Namespace.prune("isPrune"));function Ru(){ne("validatePrune")}V.validatePrune=Ru;Object.assign(Ru,Ee.Namespace.prune("validatePrune"));Object.assign(Ru,Ee.Namespace.validate());function Nm(){ne("createAssert")}V.createAssert=Nm;Object.assign(Nm,Gl);function Dm(){ne("createAssertType")}V.createAssertType=Dm;Object.assign(Dm,zl);function Om(){ne("createIs")}V.createIs=Om;Object.assign(Om,vu);function Bm(){ne("createValidate")}V.createValidate=Bm;Object.assign(Bm,wu);function Fm(){ne("createAssertEquals")}V.createAssertEquals=Fm;Object.assign(Fm,Kl);function Lm(){ne("createEquals")}V.createEquals=Lm;Object.assign(Lm,Wl);function Um(){ne("createValidateEquals")}V.createValidateEquals=Um;Object.assign(Um,Jl);function Vm(){ne("createIsParse")}V.createIsParse=Vm;Object.assign(Vm,Ql);function jm(){ne("createAssertParse")}V.createAssertParse=jm;Object.assign(jm,$l);function Hm(){ne("createValidateParse")}V.createValidateParse=Hm;Object.assign(Hm,Xl);function qm(){ne("createStringify")}V.createStringify=qm;Object.assign(qm,Yl);function Gm(){ne("createAssertStringify")}V.createAssertStringify=Gm;Object.assign(Gm,_u);function zm(){ne("createIsStringify")}V.createIsStringify=zm;Object.assign(zm,ku);function Km(){ne("createValidateStringify")}V.createValidateStringify=Km;Object.assign(Km,Au);function Wm(){ne("createRandom")}V.createRandom=Wm;Object.assign(Wm,Zl);function Jm(){ne("createClone")}V.createClone=Jm;Object.assign(Jm,ep);function $m(){ne("createAssertClone")}V.createAssertClone=$m;Object.assign($m,Eu);function Qm(){ne("createIsClone")}V.createIsClone=Qm;Object.assign(Qm,Mu);function Xm(){ne("createValidateClone")}V.createValidateClone=Xm;Object.assign(Xm,Cu);function Ym(){ne("createPrune")}V.createPrune=Ym;Object.assign(Ym,tp);function Zm(){ne("createAssertPrune")}V.createAssertPrune=Zm;Object.assign(Zm,Iu);function e6(){ne("createIsPrune")}V.createIsPrune=e6;Object.assign(e6,Su);function t6(){ne("createValidatePrune")}V.createValidatePrune=t6;Object.assign(t6,Ru);function ne(n){throw new Error("Error on typia.".concat(n,'(): no transform has been configured. Run "npx typia setup" command.'))}});var a6=X(gn=>{"use strict";var n6=gn&&gn.__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]}),Ab=gn&&gn.__setModuleDefault||(Object.create?function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}:function(n,e){n.default=e}),Eb=gn&&gn.__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)&&n6(e,n,t);return Ab(e,n),e},Mb=gn&&gn.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&n6(e,n,t)};Object.defineProperty(gn,"__esModule",{value:!0});var Cb=Eb(np());gn.default=Cb;Mb(np(),gn)});var wl={};Li(wl,{BaseContract:()=>or,BigNumber:()=>P,Contract:()=>ue,ContractFactory:()=>yi,FixedNumber:()=>ft,Signer:()=>Gt,VoidSigner:()=>sa,Wallet:()=>Cn,Wordlist:()=>hn,constants:()=>ht,errors:()=>Kt,getDefaultProvider:()=>Jo,logger:()=>oc,providers:()=>Da,utils:()=>Y,version:()=>Qo,wordlists:()=>ci});var Bp=wn(Qu());var Ap="logger/5.7.0";var Ep=!1,Mp=!1,Ls={debug:1,default:2,info:2,warning:3,error:4,off:5},Cp=Ls.default,Xu=null;function h6(){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 Ip=h6(),Yu;(function(n){n.DEBUG="DEBUG",n.INFO="INFO",n.WARNING="WARNING",n.ERROR="ERROR",n.OFF="OFF"})(Yu||(Yu={}));var Kt;(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"})(Kt||(Kt={}));var Sp="0123456789abcdef",A=class{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){let a=e.toLowerCase();Ls[a]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(Cp>Ls[a])&&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,a){if(Mp)return this.makeError("censored error",t,{});t||(t=A.errors.UNKNOWN_ERROR),a||(a={});let i=[];Object.keys(a).forEach(l=>{let p=a[l];try{if(p instanceof Uint8Array){let f="";for(let b=0;b>4],f+=Sp[p[b]&15];i.push(l+"=Uint8Array(0x"+f+")")}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 Kt.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 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+" ]"),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,A.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"),Ip&&this.throwError("platform missing String.prototype.normalize",A.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:Ip})}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,a){a?a=": "+a:a="",et&&this.throwError("too many arguments"+a,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(Ap)),Xu}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",A.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),Ep){if(!e)return;this.globalLogger().throwError("error censorship permanent",A.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}Mp=!!e,Ep=!!t}static setLogLevel(e){let t=Ls[e.toLowerCase()];if(t==null){A.globalLogger().warn("invalid log level - "+e);return}Cp=t}static from(e){return new A(e)}};A.errors=Kt;A.levels=Yu;var Rp="bytes/5.7.0";var wt=new A(Rp);function Np(n){return!!n.toHexString}function Ui(n){return n.slice||(n.slice=function(){let e=Array.prototype.slice.call(arguments);return Ui(new Uint8Array(Array.prototype.slice.apply(n,e)))}),n}function ta(n){return Z(n)&&!(n.length%2)||on(n)}function Pp(n){return typeof n=="number"&&n==n&&n%1===0}function on(n){if(n==null)return!1;if(n.constructor===Uint8Array)return!0;if(typeof n=="string"||!Pp(n.length)||n.length<0)return!1;for(let e=0;e=256)return!1}return!0}function B(n,e){if(e||(e={}),typeof n=="number"){wt.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),Ui(new Uint8Array(t))}if(e.allowMissingPrefix&&typeof n=="string"&&n.substring(0,2)!=="0x"&&(n="0x"+n),Np(n)&&(n=n.toHexString()),Z(n)){let t=n.substring(2);t.length%2&&(e.hexPad==="left"?t="0"+t:e.hexPad==="right"?t+="0":wt.throwArgumentError("hex data is odd-length","value",n));let a=[];for(let i=0;iB(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),Ui(a)}function Zt(n){let e=B(n);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(n,e-n.length),Ui(t)}function Z(n,e){return!(typeof n!="string"||!n.match(/^0x[0-9A-Fa-f]*$/)||e&&n.length!==2+2*e)}var Zu="0123456789abcdef";function j(n,e){if(e||(e={}),typeof n=="number"){wt.checkSafeUint53(n,"invalid hexlify value");let t="";for(;n;)t=Zu[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),Np(n))return n.toHexString();if(Z(n))return n.length%2&&(e.hexPad==="left"?n="0x0"+n.substring(2):e.hexPad==="right"?n+="0":wt.throwArgumentError("hex data is odd-length","value",n)),n.toLowerCase();if(on(n)){let t="0x";for(let a=0;a>4]+Zu[i&15]}return t}return wt.throwArgumentError("invalid hexlify value","value",n)}function Pt(n){if(typeof n!="string")n=j(n);else if(!Z(n)||n.length%2)return null;return(n.length-2)/2}function Me(n,e,t){return typeof n!="string"?n=j(n):(!Z(n)||n.length%2)&&wt.throwArgumentError("invalid hexData","value",n),e=2+2*e,t!=null?"0x"+n.substring(e,2+2*t):"0x"+n.substring(e)}function _t(n){let e="0x";return n.forEach(t=>{e+=j(t).substring(2)}),e}function Fn(n){let e=ed(j(n,{hexPad:"left"}));return e==="0x"?"0x0":e}function ed(n){typeof n!="string"&&(n=j(n)),Z(n)||wt.throwArgumentError("invalid hex string","value",n),n=n.substring(2);let e=0;for(;e2*e+2&&wt.throwArgumentError("value out of range","value",arguments[1]);n.length<2*e+2;)n="0x0"+n.substring(2);return n}function Ln(n){let e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(ta(n)){let t=B(n);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",n),e.v<27&&(e.v===0||e.v===1?e.v+=27:wt.throwArgumentError("signature invalid v byte","signature",n)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(t[32]|=128),e._vs=j(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=ni(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",n),i[0]&=127;let s=j(i);e.s==null?e.s=s:e.s!==s&&wt.throwArgumentError("signature v mismatch _vs","signature",n)}if(e.recoveryParam==null)e.v==null?wt.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&&wt.throwArgumentError("signature recoveryParam mismatch v","signature",n)}e.r==null||!Z(e.r)?wt.throwArgumentError("signature missing or invalid r","signature",n):e.r=fe(e.r,32),e.s==null||!Z(e.s)?wt.throwArgumentError("signature missing or invalid s","signature",n):e.s=fe(e.s,32);let t=B(e.s);t[0]>=128&&wt.throwArgumentError("signature s out of range","signature",n),e.recoveryParam&&(t[0]|=128);let a=j(t);e._vs&&(Z(e._vs)||wt.throwArgumentError("signature invalid _vs","signature",n),e._vs=fe(e._vs,32)),e._vs==null?e._vs=a:e._vs!==a&&wt.throwArgumentError("signature _vs mismatch v and s","signature",n)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function Pr(n){return n=Ln(n),j(de([n.r,n.s,n.recoveryParam?"0x1c":"0x1b"]))}var Us="bignumber/5.7.0";var Nr=Bp.default.BN,na=new A(Us),td={},Dp=9007199254740991;function Fp(n){return n!=null&&(P.isBigNumber(n)||typeof n=="number"&&n%1===0||typeof n=="string"&&!!n.match(/^-?[0-9]+$/)||Z(n)||typeof n=="bigint"||on(n))}var Op=!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 Wt(he(this).fromTwos(e))}toTwos(e){return Wt(he(this).toTwos(e))}abs(){return this._hex[0]==="-"?P.from(this._hex.substring(1)):this}add(e){return Wt(he(this).add(he(e)))}sub(e){return Wt(he(this).sub(he(e)))}div(e){return P.from(e).isZero()&&un("division-by-zero","div"),Wt(he(this).div(he(e)))}mul(e){return Wt(he(this).mul(he(e)))}mod(e){let t=he(e);return t.isNeg()&&un("division-by-zero","mod"),Wt(he(this).umod(t))}pow(e){let t=he(e);return t.isNeg()&&un("negative-power","pow"),Wt(he(this).pow(t))}and(e){let t=he(e);return(this.isNegative()||t.isNeg())&&un("unbound-bitwise-result","and"),Wt(he(this).and(t))}or(e){let t=he(e);return(this.isNegative()||t.isNeg())&&un("unbound-bitwise-result","or"),Wt(he(this).or(t))}xor(e){let t=he(e);return(this.isNegative()||t.isNeg())&&un("unbound-bitwise-result","xor"),Wt(he(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&un("negative-width","mask"),Wt(he(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&un("negative-width","shl"),Wt(he(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&un("negative-width","shr"),Wt(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?Op||(Op=!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,Dr(e)):e.match(/^-?[0-9]+$/)?new P(td,Dr(new Nr(e))):na.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&un("underflow","BigNumber.from",e),(e>=Dp||e<=-Dp)&&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 a=t.toHexString();if(typeof a=="string")return P.from(a)}else{let a=t._hex;if(a==null&&t.type==="BigNumber"&&(a=t.hex),typeof a=="string"&&(Z(a)||a[0]==="-"&&Z(a.substring(1))))return P.from(a)}return na.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}};function Dr(n){if(typeof n!="string")return Dr(n.toString(16));if(n[0]==="-")return n=n.substring(1),n[0]==="-"&&na.throwArgumentError("invalid hex","value",n),n=Dr(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 Wt(n){return P.from(Dr(n))}function he(n){let e=P.from(n).toHexString();return e[0]==="-"?new Nr("-"+e.substring(3),16):new Nr(e.substring(2),16)}function un(n,e,t){let a={fault:n,operation:e};return t!=null&&(a.value=t),na.throwError(n,A.errors.NUMERIC_FAULT,a)}function nd(n){return new Nr(n,36).toString(16)}function ad(n){return new Nr(n,16).toString(36)}var Vt=new A(Us),Or={},Up=P.from(0),Vp=P.from(-1);function jp(n,e,t,a){let i={fault:e,operation:t};return a!==void 0&&(i.value=a),Vt.throwError(n,A.errors.NUMERIC_FAULT,i)}var Br="0";for(;Br.length<256;)Br+=Br;function id(n){if(typeof n!="number")try{n=P.from(n).toNumber()}catch{}return typeof n=="number"&&n>=0&&n<=256&&!(n%1)?"1"+Br.substring(0,n):Vt.throwArgumentError("invalid decimal size","decimals",n)}function Vi(n,e){e==null&&(e=0);let t=id(e);n=P.from(n);let a=n.lt(Up);a&&(n=n.mul(Vp));let i=n.mod(t).toString();for(;i.length2&&Vt.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&&jp("fractional component exceeds decimals","underflow","parseFixed"),s===""&&(s="0");s.lengthe[s]==null?l:(typeof e[s]!==o&&Vt.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&&Vt.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",a),i>80&&Vt.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new aa(Or,t,a,i)}},ft=class{constructor(e,t,a,i){e!==Or&&Vt.throwError("cannot use FixedNumber constructor; use FixedNumber.from",A.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&&Vt.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),a=dn(e._value,e.format.decimals);return ft.fromValue(t.add(a),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),a=dn(e._value,e.format.decimals);return ft.fromValue(t.sub(a),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),a=dn(e._value,e.format.decimals);return ft.fromValue(t.mul(a).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),a=dn(e._value,e.format.decimals);return ft.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=ft.from(e[0],this.format),a=!e[1].match(/^(0*)$/);return this.isNegative()&&a&&(t=t.subUnsafe(Lp.toFormat(t.format))),t}ceiling(){let e=this.toString().split(".");e.length===1&&e.push("0");let t=ft.from(e[0],this.format),a=!e[1].match(/^(0*)$/);return!this.isNegative()&&a&&(t=t.addUnsafe(Lp.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 a=ft.from("1"+Br.substring(0,e),this.format),i=x6.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&&Vt.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,a){return a==null&&t!=null&&!Fp(t)&&(a=t,t=null),t==null&&(t=0),a==null&&(a="fixed"),ft.fromString(Vi(e,t),aa.from(a))}static fromString(e,t){t==null&&(t="fixed");let a=aa.from(t),i=dn(e,a.decimals);!a.signed&&i.lt(Up)&&jp("unsigned value cannot be negative","overflow","value",e);let r=null;a.signed?r=i.toTwos(a.width).toHexString():(r=i.toHexString(),r=fe(r,a.width/8));let s=Vi(i,a.decimals);return new ft(Or,r,s,a)}static fromBytes(e,t){t==null&&(t="fixed");let a=aa.from(t);if(B(e).length>a.width/8)throw new Error("overflow");let i=P.from(e);a.signed&&(i=i.fromTwos(a.width));let r=i.toTwos((a.signed?0:1)+a.width).toHexString(),s=Vi(i,a.decimals);return new ft(Or,r,s,a)}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(a){if(a.code!==A.errors.INVALID_ARGUMENT)throw a}return Vt.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}},Lp=ft.from(1),x6=ft.from("0.5");var Hp="properties/5.7.0";var b6=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(f){try{p(a.next(f))}catch(b){s(b)}}function l(f){try{p(a.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Vs=new A(Hp);function R(n,e,t){Object.defineProperty(n,e,{enumerable:!0,value:t,writable:!1})}function mt(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 Ce(n){return b6(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 ji(n,e){(!n||typeof n!="object")&&Vs.throwArgumentError("invalid object","object",n),Object.keys(n).forEach(t=>{e[t]||Vs.throwArgumentError("invalid object key - "+t,"transaction:"+t,n)})}function Te(n){let e={};for(let t in n)e[t]=n[t];return e}var g6={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function qp(n){if(n==null||g6[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;tct(e)));if(typeof n=="object"){let e={};for(let t in n){let a=n[t];a!==void 0&&R(e,t,ct(a))}return e}return Vs.throwArgumentError(`Cannot deepCopy ${typeof n}`,"object",n)}function ct(n){return T6(n)}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),ai={},Gp={calldata:!0,memory:!0,storage:!0},v6={calldata:!0,memory:!0};function js(n,e){if(n==="bytes"||n==="string"){if(Gp[e])return!0}else if(n==="address"){if(e==="payable")return!0}else if((n.indexOf("[")>=0||n==="tuple")&&v6[e])return!0;return(Gp[e]||e==="payable")&&be.throwArgumentError("invalid modifier","name",e),!1}function w6(n,e){let t=n;function a(o){be.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!==xe.sighash&&(t+=this.type),t+="("+this.components.map(a=>a.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(ai,{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 a(i){return lt.fromObject({name:i.name,type:i.type,indexed:i.indexed,components:i.components})}return a(w6(e,!!t))}static isParamType(e){return!!(e!=null&&e._isParamType)}};function Fr(n,e){return A6(n).map(t=>lt.fromString(t,e))}var Ht=class{constructor(e,t){e!==ai&&be.throwError("use a static from method",A.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),Hs(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 Dt.fromObject(e);case"event":return jt.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"?jt.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)}},jt=class extends Ht{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(a=>JSON.parse(a.format(e)))});let t="";return e!==xe.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map(a=>a.format(e)).join(e===xe.full?", ":",")+") ",e!==xe.sighash&&this.anonymous&&(t+="anonymous "),t.trim()}static from(e){return typeof e=="string"?jt.fromString(e):jt.fromObject(e)}static fromObject(e){if(jt.isEventFragment(e))return e;e.type!=="event"&&be.throwArgumentError("invalid event object","value",e);let t={name:Lr(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(lt.fromObject):[],type:"event"};return new jt(ai,t)}static fromString(e){let t=e.match(Ur);t||be.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:be.warn("unknown modifier: "+i)}}),jt.fromObject({name:t[1].trim(),anonymous:a,inputs:Fr(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}};function Kp(n,e){e.gas=null;let t=n.split("@");return t.length!==1?(t.length>2&&be.throwArgumentError("invalid human-readable ABI signature","value",n),t[1].match(/^[0-9]+$/)||be.throwArgumentError("invalid human-readable ABI signature gas","value",n),e.gas=P.from(t[1]),t[0]):n}function Wp(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 Jp(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&&be.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",n),e.payable=e.stateMutability==="payable",n.payable!=null&&!!n.payable!==e.payable&&be.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"&&be.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&&be.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"&&be.throwArgumentError("unable to determine stateMutability","value",n),e}var Nt=class extends Ht{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(a=>JSON.parse(a.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(a=>a.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=Jp(e);t.constant&&be.throwArgumentError("constructor cannot be constant","value",e);let a={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(ai,a)}static fromString(e){let t={type:"constructor"};e=Kp(e,t);let a=e.match(Ur);return(!a||a[1].trim()!=="constructor")&&be.throwArgumentError("invalid constructor string","value",e),t.inputs=Fr(a[2].trim(),!1),Wp(a[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(a=>JSON.parse(a.format(e))),outputs:this.outputs.map(a=>JSON.parse(a.format(e)))});let t="";return e!==xe.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map(a=>a.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(a=>a.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=Jp(e),a={type:e.type,name:Lr(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(ai,a)}static fromString(e){let t={type:"function"};e=Kp(e,t);let a=e.split(" returns ");a.length>2&&be.throwArgumentError("invalid function string","value",e);let i=a[0].match(Ur);if(i||be.throwArgumentError("invalid function signature","value",e),t.name=i[1].trim(),t.name&&Lr(t.name),t.inputs=Fr(i[2],!1),Wp(i[3].trim(),t),a.length>1){let r=a[1].match(Ur);(r[1].trim()!=""||r[3].trim()!="")&&be.throwArgumentError("unexpected tokens","value",e),t.outputs=Fr(r[2],!1)}else t.outputs=[];return Dt.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}};function zp(n){let e=n.format();return(e==="Error(string)"||e==="Panic(uint256)")&&be.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",n),n}var tn=class extends Ht{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(a=>JSON.parse(a.format(e)))});let t="";return e!==xe.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map(a=>a.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:Lr(e.name),inputs:e.inputs?e.inputs.map(lt.fromObject):[]};return zp(new tn(ai,t))}static fromString(e){let t={type:"error"},a=e.match(Ur);return a||be.throwArgumentError("invalid error signature","value",e),t.name=a[1].trim(),t.name&&Lr(t.name),t.inputs=Fr(a[2],!1),zp(tn.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}};function Hi(n){return n.match(/^uint($|[^1-9])/)?n="uint256"+n.substring(4):n.match(/^int($|[^1-9])/)&&(n="int256"+n.substring(3)),n}var k6=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function Lr(n){return(!n||!n.match(k6))&&be.throwArgumentError(`invalid identifier "${n}"`,"value",n),n}var Ur=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function A6(n){n=n.trim();let e=[],t="",a=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)}}},ri=class{constructor(e,t,a,i){R(this,"_data",B(e)),R(this,"wordSize",t||32),R(this,"_coerceFunc",a),R(this,"allowLoose",i),this._offset=0}get data(){return j(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):ri.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: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 ri(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 P.from(this.readBytes(this.wordSize))}};var Qp=wn($p());function le(n){return"0x"+Qp.default.keccak_256(B(n))}var Gs={};Li(Gs,{decode:()=>Vr,encode:()=>ia});var Xp="rlp/5.7.0";var Vn=new A(Xp);function Yp(n){let e=[];for(;n;)e.unshift(n&255),n>>=8;return e}function Zp(n,e,t){let a=0;for(let i=0;ie+1+a&&Vn.throwError("child data too short",A.errors.BUFFER_OVERRUN,{})}return{consumed:1+a,result:i}}function ny(n,e){if(n.length===0&&Vn.throwError("data too short",A.errors.BUFFER_OVERRUN,{}),n[e]>=248){let t=n[e]-247;e+1+t>n.length&&Vn.throwError("data short segment too short",A.errors.BUFFER_OVERRUN,{});let a=Zp(n,e+1,t);return e+1+t+a>n.length&&Vn.throwError("data long segment too short",A.errors.BUFFER_OVERRUN,{}),ey(n,e,e+1+t,t+a)}else if(n[e]>=192){let t=n[e]-192;return e+1+t>n.length&&Vn.throwError("data array too short",A.errors.BUFFER_OVERRUN,{}),ey(n,e,e+1,t)}else if(n[e]>=184){let t=n[e]-183;e+1+t>n.length&&Vn.throwError("data array too short",A.errors.BUFFER_OVERRUN,{});let a=Zp(n,e+1,t);e+1+t+a>n.length&&Vn.throwError("data array too short",A.errors.BUFFER_OVERRUN,{});let i=j(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&&Vn.throwError("data too short",A.errors.BUFFER_OVERRUN,{});let a=j(n.slice(e+1,e+1+t));return{consumed:1+t,result:a}}return{consumed:1,result:j(n[e])}}function Vr(n){let e=B(n),t=ny(e,0);return t.consumed!==e.length&&Vn.throwArgumentError("invalid rlp data","data",n),t.result}var ay="address/5.7.0";var ka=new A(ay);function iy(n){Z(n,20)||ka.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=B(le(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 E6=9007199254740991;function M6(n){return Math.log10?Math.log10(n):Math.log(n)/Math.LN10}var sd={};for(let n=0;n<10;n++)sd[String(n)]=String(n);for(let n=0;n<26;n++)sd[String.fromCharCode(65+n)]=String(10+n);var ry=Math.floor(M6(E6));function sy(n){n=n.toUpperCase(),n=n.substring(4)+n.substring(0,2)+"00";let e=n.split("").map(a=>sd[a]).join("");for(;e.length>=ry;){let a=e.substring(0,ry);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 pe(n){let e=null;if(typeof n!="string"&&ka.throwArgumentError("invalid address","address",n),n.match(/^(0x)?[0-9a-fA-F]{40}$/))n.substring(0,2)!=="0x"&&(n="0x"+n),e=iy(n),n.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==n&&ka.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)!==sy(n)&&ka.throwArgumentError("bad icap checksum","address",n),e=nd(n.substring(4));e.length<40;)e="0"+e;e=iy("0x"+e)}else ka.throwArgumentError("invalid address","address",n);return e}function oy(n){try{return pe(n),!0}catch{}return!1}function uy(n){let e=ad(pe(n).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+sy("XE00"+e)+e}function si(n){let e=null;try{e=pe(n.from)}catch{ka.throwArgumentError("missing from address","transaction",n)}let t=Zt(B(P.from(n.nonce).toHexString()));return pe(Me(le(ia([e,t])),12))}function dy(n,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(Me(le(de(["0xff",pe(n),e,t])),12))}var zs=class extends kt{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=pe(t)}catch(a){this._throwError(a.message,t)}return e.writeValue(t)}decode(e){return pe(fe(e.readValue().toHexString(),20))}};var Ks=class extends kt{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(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 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!==a.length&&Gi.throwArgumentError("types/value length mismatch","tuple",t);let i=new ii(n.wordSize),r=new ii(n.wordSize),s=[];e.forEach((l,p)=>{let f=a[p];if(l.dynamic){let b=r.length;l.encode(r,f);let M=i.writeUpdatableValue();s.push(k=>{M(k+b)})}else l.encode(i,f)}),s.forEach(l=>{l(i.length)});let o=n.appendWriter(i);return o+=n.appendWriter(r),o}function ud(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===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(n)}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 Ws=class extends kt{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&&Gi.throwError("insufficient data length",A.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let a=[];for(let i=0;iYs,EtherSymbol:()=>cy,HashZero:()=>Ki,MaxInt256:()=>fy,MaxUint256:()=>to,MinInt256:()=>yy,NegativeOne:()=>Zs,One:()=>eo,Two:()=>ly,WeiPerEther:()=>py,Zero:()=>zi});var Ys="0x0000000000000000000000000000000000000000";var Zs=P.from(-1),zi=P.from(0),eo=P.from(1),ly=P.from(2),py=P.from("1000000000000000000"),to=P.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),yy=P.from("-0x8000000000000000000000000000000000000000000000000000000000000000"),fy=P.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");var Ki="0x0000000000000000000000000000000000000000000000000000000000000000";var cy="\u039E";var no=class extends kt{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=P.from(t),i=to.mask(e.wordSize*8);if(this.signed){let r=i.mask(this.size*8-1);(a.gt(r)||a.lt(r.add(eo).mul(Zs)))&&this._throwError("value out-of-bounds",t)}else(a.lt(zi)||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 my="strings/5.7.0";var hy=new A(my),qt;(function(n){n.current="",n.NFC="NFC",n.NFD="NFD",n.NFKC="NFKC",n.NFKD="NFKD"})(qt||(qt={}));var Ot;(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"})(Ot||(Ot={}));function C6(n,e,t,a,i){return hy.throwArgumentError(`invalid codepoint at offset ${e}; ${n}`,"bytes",t)}function xy(n,e,t,a,i){if(n===Ot.BAD_PREFIX||n===Ot.UNEXPECTED_CONTINUE){let r=0;for(let s=e+1;s>6===2;s++)r++;return r}return n===Ot.OVERRUN?t.length-e-1:0}function I6(n,e,t,a,i){return n===Ot.OVERLONG?(a.push(i),0):(a.push(65533),xy(n,e,t,a,i))}var ao=Object.freeze({error:C6,ignore:xy,replace:I6});function ld(n,e){e==null&&(e=ao.error),n=B(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(Ot.UNEXPECTED_CONTINUE,a-1,n,t):a+=e(Ot.BAD_PREFIX,a-1,n,t);continue}if(a-1+r>=n.length){a+=e(Ot.OVERRUN,a-1,n,t);continue}let o=i&(1<<8-r-1)-1;for(let l=0;l1114111){a+=e(Ot.OUT_OF_RANGE,a-1-r,n,t,o);continue}if(o>=55296&&o<=57343){a+=e(Ot.UTF16_SURROGATE,a-1-r,n,t,o);continue}if(o<=s){a+=e(Ot.OVERLONG,a-1-r,n,t,o);continue}t.push(o)}}return t}function ge(n,e=qt.current){e!=qt.current&&(hy.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 B(t)}function dd(n){let e="0000"+n.toString(16);return"\\u"+e.substring(e.length-4)}function pd(n,e){return'"'+ld(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?dd(t):(t-=65536,dd((t>>10&1023)+55296)+dd((t&1023)+56320))}).join("")+'"'}function io(n){return n.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function Jt(n,e){return io(ld(n,e))}function Aa(n,e=qt.current){return ld(ge(n,e))}function yd(n){let e=ge(n);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return j(de([e,Ki]).slice(0,32))}function fd(n){let e=B(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 Jt(e.slice(0,t))}function S6(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 by(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 md(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 R6=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"),P6="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(n=>parseInt(n,16)),N6=[{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}],D6=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"),O6=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"),B6=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",S6),F6=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(n){return n.reduce((e,t)=>(t.forEach(a=>{e.push(a)}),e),[])}function U6(n){return!!md(n,R6)}function V6(n){let e=md(n,N6);if(e)return[n+e.s];let t=D6[n];if(t)return t;let a=O6[n];if(a)return[n+a[0]];let i=B6[n];return i||null}function j6(n){return!!md(n,F6)}function hd(n){if(n.match(/^[a-z0-9-]*$/i)&&n.length<=59)return n.toLowerCase();let e=Aa(n);e=L6(e.map(a=>{if(P6.indexOf(a)>=0)return[];if(a>=65024&&a<=65039)return[];let i=V6(a);return i||[a]})),e=Aa(io(e),qt.NFKC),e.forEach(a=>{if(j6(a))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(a=>{if(U6(a))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});let t=io(e);if(t.substring(0,1)==="-"||t.substring(2,4)==="--"||t.substring(t.length-1)==="-")throw new Error("invalid hyphen");return t}var ro=class extends jr{constructor(e){super("string",e)}defaultValue(){return""}encode(e,t){return super.encode(e,ge(t))}decode(e){return Jt(super.decode(e))}};var oi=class extends kt{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 od(e,this.coders,t)}decode(e){return e.coerce(this.name,ud(e,this.coders))}};var so=new A(Un),H6=new RegExp(/^bytes([0-9]*)$/),q6=new RegExp(/^(u?int)([0-9]*)$/),Wi=class{constructor(e){R(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new zs(e.name);case"bool":return new Js(e.name);case"string":return new ro(e.name);case"bytes":return new $s(e.name);case"array":return new Ws(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new oi((e.components||[]).map(a=>this._getCoder(a)),e.name);case"":return new Xs(e.name)}let t=e.type.match(q6);if(t){let a=parseInt(t[2]||"256");return(a===0||a>256||a%8!==0)&&so.throwArgumentError("invalid "+t[1]+" bit length","param",e),new no(a/8,t[1]==="int",e.name)}if(t=e.type.match(H6),t){let a=parseInt(t[1]);return(a===0||a>32)&&so.throwArgumentError("invalid bytes length","param",e),new Qs(a,e.name)}return so.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,t){return new ri(e,this._getWordSize(),this.coerceFunc,t)}_getWriter(){return new ii(this._getWordSize())}getDefaultValue(e){let t=e.map(i=>this._getCoder(lt.from(i)));return new oi(t,"_").defaultValue()}encode(e,t){e.length!==t.length&&so.throwError("types/values length mismatch",A.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});let a=e.map(s=>this._getCoder(lt.from(s))),i=new oi(a,"_"),r=this._getWriter();return i.encode(r,t),r.data}decode(e,t,a){let i=e.map(s=>this._getCoder(lt.from(s)));return new oi(i,"_").decode(this._getReader(B(t),a))}},Hr=new Wi;function nn(n){return le(ge(n))}var oo="hash/5.7.0";var xd={};Li(xd,{decode:()=>Ji,encode:()=>$i});function Ji(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 G6(n){let e={};for(let t=0;t>--l&1}let b=31,M=Math.pow(2,b),k=M>>>1,v=k>>1,C=M-1,D=0;for(let q=0;q1;){let Re=K+ye>>>1;q>>1|f(),te=te<<1^k,ae=(ae^k)<<1|k|1;F=te,U=1+ae-te}let G=a-4;return N.map(q=>{switch(q-G){case 3:return G+65792+(n[o++]<<16|n[o++]<<8|n[o++]);case 2:return G+256+(n[o++]<<8|n[o++]);case 1:return G+n[o++];default:return q-1}})}function K6(n){let e=0;return()=>n[e++]}function vy(n){return K6(z6(n))}function W6(n){return n&1?~n>>1:n>>1}function J6(n,e){let t=Array(n);for(let a=0;ae[s]):t}function wy(n){let e=[];for(;;){let t=n();if(t==0)break;e.push(X6(t,n))}for(;;){let t=n()-1;if(t<0)break;e.push(Y6(t,n))}return G6(Ty(e))}function Q6(n){let e=[];for(;;){let t=n();if(t==0)break;e.push(t)}return e}function _y(n,e,t){let a=Array(n).fill(void 0).map(()=>[]);for(let i=0;ia[s].push(r));return a}function X6(n,e){let t=1+e(),a=e(),i=Q6(e),r=_y(i.length,1+n,e);return Ty(r.map((s,o)=>{let l=s[0],p=s.slice(1);return Array(i[o]).fill(void 0).map((f,b)=>{let M=b*a;return[l+b*t,p.map(k=>k+M)]})}))}function Y6(n,e){let t=1+e();return _y(t,1+n,e).map(i=>[i[0],i.slice(1)])}function ky(n){let e=qr(n).sort((a,i)=>a-i);return t();function t(){let a=[];for(;;){let p=qr(n,e);if(p.length==0)break;a.push({set:new Set(p),node:t()})}a.sort((p,f)=>f.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 Ay(){return vy(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 uo=Ay(),Z6=new Set(qr(uo)),e2=new Set(qr(uo)),t2=wy(uo),n2=ky(uo),Ey=45,My=95;function Cy(n){return Aa(n)}function a2(n){return n.filter(e=>e!=65039)}function Iy(n){for(let e of n.split(".")){let t=Cy(e);try{for(let a=t.lastIndexOf(My)-1;a>=0;a--)if(t[a]!==My)throw new Error("underscore only allowed at start");if(t.length>=4&&t.every(a=>a<128)&&t[2]===Ey&&t[3]===Ey)throw new Error("invalid label extension")}catch(a){throw new Error(`Invalid label "${e}": ${a.message}`)}}return n}function Sy(n){return Iy(i2(n,a2))}function i2(n,e){let t=Cy(n).reverse(),a=[];for(;t.length;){let i=s2(t);if(i){a.push(...e(i));continue}let r=t.pop();if(Z6.has(r)){a.push(r);continue}if(e2.has(r))continue;let s=t2[r];if(s){a.push(...s);continue}throw new Error(`Disallowed codepoint: 0x${r.toString(16).toUpperCase()}`)}return Iy(r2(String.fromCodePoint(...a)))}function r2(n){return n.normalize("NFC")}function s2(n,e){var t;let a=n2,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 o2=new A(oo),Py=new Uint8Array(32);Py.fill(0);function Ry(n){if(n.length===0)throw new Error("invalid ENS name; empty component");return n}function bd(n){let e=ge(Sy(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(Ry(e.slice(a))),t}function gd(n){try{return bd(n).length!==0}catch{}return!1}function Ea(n){typeof n!="string"&&o2.throwArgumentError("invalid ENS name; not a string","name",n);let e=Py,t=bd(n);for(;t.length;)e=le(de([e,le(t.pop())]));return j(e)}function Gr(n){return j(de(bd(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 Ny=`Ethereum Signed Message: +`;function Qi(n){return typeof n=="string"&&(n=ge(n)),le(de([ge(Ny),ge(String(n.length)),n]))}var u2=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(f){try{p(a.next(f))}catch(b){s(b)}}function l(f){try{p(a.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},xt=new A(oo),Fy=new Uint8Array(32);Fy.fill(0);var d2=P.from(-1),Ly=P.from(0),Uy=P.from(1),l2=P.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function p2(n){let e=B(n),t=e.length%32;return t?_t([e,Fy.slice(t)]):j(e)}var y2=fe(Uy.toHexString(),32),f2=fe(Ly.toHexString(),32),Dy={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Td=["name","version","chainId","verifyingContract","salt"];function Oy(n){return function(e){return typeof e!="string"&&xt.throwArgumentError(`invalid domain value for ${JSON.stringify(n)}`,`domain.${n}`,e),e}}var c2={name:Oy("name"),version:Oy("version"),chainId:function(n){try{return P.from(n).toString()}catch{}return xt.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",n)},verifyingContract:function(n){try{return pe(n).toLowerCase()}catch{}return xt.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",n)},salt:function(n){try{let e=B(n);if(e.length!==32)throw new Error("bad length");return j(e)}catch{}return xt.throwArgumentError('invalid domain value "salt"',"domain.salt",n)}};function vd(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))&&xt.throwArgumentError("invalid numeric width","type",n);let i=l2.mask(t?a-1:a),r=t?i.add(Uy).mul(d2):Ly;return function(s){let o=P.from(s);return(o.lt(r)||o.gt(i))&&xt.throwArgumentError(`value out-of-bounds for ${n}`,"value",s),fe(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))&&xt.throwArgumentError("invalid bytes width","type",n),function(a){return B(a).length!==t&&xt.throwArgumentError(`invalid length for ${n}`,"value",a),p2(a)}}}switch(n){case"address":return function(e){return fe(pe(e),32)};case"bool":return function(e){return e?y2:f2};case"bytes":return function(e){return le(e)};case"string":return function(e){return nn(e)}}return null}function By(n,e){return`${n}(${e.map(({name:t,type:a})=>a+" "+t).join(",")})`}var bt=class{constructor(e){R(this,"types",Object.freeze(ct(e))),R(this,"_encoderCache",{}),R(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]&&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)&&(a[f]||xt.throwArgumentError(`unknown type ${JSON.stringify(f)}`,"types",e),a[f].push(o),t[o][f]=!0)})}let r=Object.keys(a).filter(o=>a[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=>{!a[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]=By(o,e[o])+l.map(p=>By(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(_t(l))}}let a=this.types[e];if(a){let i=nn(this._types[e]);return r=>{let s=a.map(({name:o,type:l})=>{let p=this.getEncoder(l)(r[o]);return this._types[l]?le(p):p});return s.unshift(i),_t(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,a){if(vd(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&&xt.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),{}):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,a){return bt.from(t).hashStruct(e,a)}static hashDomain(e){let t=[];for(let a in e){let i=Dy[a];i||xt.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(a)}`,"domain",e),t.push({name:a,type:i})}return t.sort((a,i)=>Td.indexOf(a.name)-Td.indexOf(i.name)),bt.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,a){return _t(["0x1901",bt.hashDomain(e),bt.from(t).hash(a)])}static hash(e,t,a){return le(bt.encode(e,t,a))}static resolveNames(e,t,a,i){return u2(this,void 0,void 0,function*(){e=Te(e);let r={};e.verifyingContract&&!Z(e.verifyingContract,20)&&(r[e.verifyingContract]="0x");let s=bt.from(t);s.visit(a,(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]),a=s.visit(a,(o,l)=>o==="address"&&r[l]?r[l]:l),{domain:e,value:a}})}static getPayload(e,t,a){bt.hashDomain(e);let i={},r=[];Td.forEach(l=>{let p=e[l];p!=null&&(i[l]=c2[l](p),r.push({name:l,type:Dy[l]}))});let s=bt.from(t),o=Te(t);return o.EIP712Domain?xt.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 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)}},m2={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function Vy(n,e){let t=new Error(`deferred error during ABI decoding triggered accessing ${n}`);return t.error=e,t}var Ma=class{constructor(e){let t=[];typeof e=="string"?t=JSON.parse(e):t=e,R(this,"fragments",t.map(a=>Ht.from(a)).filter(a=>a!=null)),R(this,"_abiCoder",mt(new.target,"getAbiCoder")()),R(this,"functions",{}),R(this,"errors",{}),R(this,"events",{}),R(this,"structs",{}),this.fragments.forEach(a=>{let i=null;switch(a.type){case"constructor":if(this.deploy){gt.warn("duplicate definition - constructor");return}R(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]){gt.warn("duplicate definition - "+r);return}i[r]=a}),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(a=>a.format(e));return e===xe.json?JSON.stringify(t.map(a=>JSON.parse(a))):t}static getAbiCoder(){return Hr}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 a in this.functions)if(e===this.getSighash(a))return this.functions[a];gt.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?gt.throwArgumentError("no matching function","name",a):i.length>1&>.throwArgumentError("multiple matching functions","name",a),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 a=e.toLowerCase();for(let i in this.events)if(a===this.getEventTopic(i))return this.events[i];gt.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?gt.throwArgumentError("no matching event","name",a):i.length>1&>.throwArgumentError("multiple matching events","name",a),this.events[i[0]]}let t=this.events[jt.fromString(e).format()];return t||gt.throwArgumentError("no matching event","signature",e),t}getError(e){if(Z(e)){let a=mt(this.constructor,"getSighash");for(let i in this.errors){let r=this.errors[i];if(e===a(r))return this.errors[i]}gt.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?gt.throwArgumentError("no matching error","name",a):i.length>1&>.throwArgumentError("multiple matching errors","name",a),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 a=B(t);return j(a.slice(0,4))!==this.getSighash(e)&>.throwArgumentError(`data signature does not match error ${e.name}.`,"data",j(a)),this._decodeParams(e.inputs,a.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 a=B(t);return j(a.slice(0,4))!==this.getSighash(e)&>.throwArgumentError(`data signature does not match function ${e.name}.`,"data",j(a)),this._decodeParams(e.inputs,a.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 a=B(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=j(a.slice(0,4)),f=m2[p];if(f)s=this._abiCoder.decode(f.inputs,a.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,a.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 a=[];e.anonymous||a.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?a.push(null):o.baseType==="array"||o.baseType==="tuple"?gt.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&>.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(nn(l));else if(s.type==="bytes")a.push(le(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 M=this.getEventTopic(e);(!Z(a[0],32)||a[0].toLowerCase()!==M)&>.throwError("fragment/topic mismatch",A.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:M,value:a[0]}),a=a.slice(1)}let i=[],r=[],s=[];e.inputs.forEach((M,k)=>{M.indexed?M.type==="string"||M.type==="bytes"||M.baseType==="tuple"||M.baseType==="array"?(i.push(lt.fromObject({type:"bytes32",name:M.name})),s.push(!0)):(i.push(M),s.push(!1)):(r.push(M),s.push(!1))});let o=a!=null?this._abiCoder.decode(i,de(a)):null,l=this._abiCoder.decode(r,t,!0),p=[],f=0,b=0;e.inputs.forEach((M,k)=>{if(M.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(M.name&&p[M.name]==null){let v=p[k];v instanceof Error?Object.defineProperty(p,M.name,{enumerable:!0,get:()=>{throw Vy(`property ${JSON.stringify(M.name)}`,v)}}):p[M.name]=v}});for(let M=0;M{throw Vy(`index ${M}`,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),a=this.getError(t.substring(0,10).toLowerCase());return a?new wd({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 jy="abstract-provider/5.7.0";var h2=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(f){try{p(a.next(f))}catch(b){s(b)}}function l(f){try{p(a.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},x2=new A(jy),lo=class extends en{static isForkEvent(e){return!!(e&&e._isForkEvent)}};var $t=class{constructor(){x2.checkAbstract(new.target,$t),R(this,"_isProvider",!0)}getFeeData(){return h2(this,void 0,void 0,function*(){let{block:e,gasPrice:t}=yield Ce({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(s=>null)}),a=null,i=null,r=null;return e&&e.baseFeePerGas&&(a=e.baseFeePerGas,r=P.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 Hy="abstract-signer/5.7.0";var _n=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(f){try{p(a.next(f))}catch(b){s(b)}}function l(f){try{p(a.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},ln=new A(Hy),b2=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],g2=[A.errors.INSUFFICIENT_FUNDS,A.errors.NONCE_EXPIRED,A.errors.REPLACEMENT_UNDERPRICED],Gt=class{constructor(){ln.checkAbstract(new.target,Gt),R(this,"_isSigner",!0)}getBalance(e){return _n(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return _n(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return _n(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 _n(this,void 0,void 0,function*(){this._checkProvider("call");let a=yield Ce(this.checkTransaction(e));return yield this.provider.call(a,t)})}sendTransaction(e){return _n(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 _n(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return _n(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return _n(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return _n(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(let a in e)b2.indexOf(a)===-1&&ln.throwArgumentError("invalid transaction key: "+a,"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(a=>(a[0].toLowerCase()!==a[1].toLowerCase()&&ln.throwArgumentError("from address mismatch","transaction",e),a[0])),t}populateTransaction(e){return _n(this,void 0,void 0,function*(){let t=yield Ce(this.checkTransaction(e));t.to!=null&&(t.to=Promise.resolve(t.to).then(i=>_n(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 a=t.maxFeePerGas!=null||t.maxPriorityFeePerGas!=null;if(t.gasPrice!=null&&(t.type===2||a)?ln.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(t.type===0||t.type===1)&&a&&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?(a&&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(g2.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 Ce(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 Gt{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,a){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new sa(this.address,e)}};var oe=wn(Qu()),Wn=wn(Pd());function sr(n,e,t){return t={path:e,exports:{},require:function(a,i){return Hh(a,i??t.path)}},n(t,t.exports),t.exports}function Hh(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var Bd=E0;function E0(n,e){if(!n)throw new Error(e||"Assertion failed")}E0.equal=function(e,t,a){if(e!=t)throw new Error(a||"Assertion failed: "+e+" != "+t)};var Mn=sr(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,M=f&255;b?l.push(b,M):l.push(M)}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(M>>1)-1?C=(M>>1)-D:C=D,k.isubn(C)):C=0,b[v]=C,k.iushrn(1)}return b}t.getNAF=a;function i(l,p){var f=[[],[]];l=l.clone(),p=p.clone();for(var b=0,M=0,k;l.cmpn(-b)>0||p.cmpn(-M)>0;){var v=l.andln(3)+b&3,C=p.andln(3)+M&3;v===3&&(v=-1),C===3&&(C=-1);var D;(v&1)===0?D=0:(k=l.andln(7)+b&7,(k===3||k===5)&&C===2?D=-v:D=v),f[0].push(D);var N;(C&1)===0?N=0:(k=p.andln(7)+M&7,(k===3||k===5)&&v===2?N=-C:N=C),f[1].push(N),2*b===D+1&&(b=1-b),2*M===N+1&&(M=1-M),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 oe.default(l,"hex","le")}t.intFromLE=o}),mo=an.getNAF,qh=an.getJSF,ho=an.assert;function Sa(n,e){this.type=n,this.p=new oe.default(e.p,16),this.red=e.prime?oe.default.red(e.prime):oe.default.mont(this.p),this.zero=new oe.default(0).toRed(this.red),this.one=new oe.default(1).toRed(this.red),this.two=new oe.default(2).toRed(this.red),this.n=e.n&&new oe.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 di=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){ho(e.precomputed);var a=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),b=this.jpoint(null,null,null),M=r;M>0;M--){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];ho(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,a,i,r){var s=this._wnafT1,o=this._wnafT2,l=this._wnafT3,p=0,f,b,M;for(f=0;f=1;f-=2){var v=f-1,C=f;if(s[v]!==1||s[C]!==1){l[v]=mo(a[v],s[v],this._bitLength),l[C]=mo(a[C],s[C],this._bitLength),p=Math.max(l[v].length,p),p=Math.max(l[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=qh(a[v],a[C]);for(p=Math.max(F[0].length,p),l[v]=new Array(p),l[C]=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?M=o[b][ae-1>>1]:ae<0&&(M=o[b][-ae-1>>1].neg()),M.type==="affine"?q=q.mixedAdd(M):q=q.add(M))}}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 a=[this],i=this,r=0;r=0&&(k=p,v=f),b.negative&&(b=b.neg(),M=M.neg()),k.negative&&(k=k.neg(),v=v.neg()),[{a:b,b:M},{a:k,b:v}]};fn.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),f=s.mul(i.b),b=e.sub(o).sub(l),M=p.add(f).neg();return{k1:b,k2:M}};fn.prototype.pointFromX=function(e,t){e=new oe.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)};fn.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};fn.prototype._endoWnafMulAdd=function(e,t,a){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 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)};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,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)};Mt.prototype.getX=function(){return this.x.fromRed()};Mt.prototype.getY=function(){return this.y.fromRed()};Mt.prototype.mul=function(e){return e=new oe.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,a){var i=[this,t],r=[e,a];return this.curve.endo?this.curve._endoWnafMulAdd(i,r):this.curve._wnafMulAdd(1,i,r,2)};Mt.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)};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 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};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 Rt(n,e,t,a){di.BasePoint.call(this,n,"jacobian"),e===null&&t===null&&a===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new oe.default(0)):(this.x=new oe.default(e,16),this.y=new oe.default(t,16),this.z=new oe.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}Fd(Rt,di.BasePoint);fn.prototype.jpoint=function(e,t,a){return new Rt(this,e,t,a)};Rt.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)};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(),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 f=l.redSqr(),b=f.redMul(l),M=i.redMul(f),k=p.redSqr().redIAdd(b).redISub(M).redISub(M),v=p.redMul(M.redISub(k)).redISub(s.redMul(b)),C=this.z.redMul(e.z).redMul(l);return this.curve.jpoint(k,v,C)};Rt.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(),f=p.redMul(o),b=a.redMul(p),M=l.redSqr().redIAdd(f).redISub(b).redISub(b),k=l.redMul(b.redISub(M)).redISub(r.redMul(f)),v=this.z.redMul(o);return this.curve.jpoint(M,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 a=this;for(t=0;t=0)return!1;if(a.redIAdd(r),this.x.cmp(a)===0)return!0}};Rt.prototype.inspect=function(){return this.isInfinity()?"":""};Rt.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var fo=sr(function(n,e){"use strict";var t=e;t.base=di,t.short=zh,t.mont=null,t.edwards=null}),co=sr(function(n,e){"use strict";var t=e,a=an.assert;function i(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,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:Wn.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:Wn.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:Wn.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: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"]}),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: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"]}),r("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"]}),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:Wn.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:Wn.default.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",s]})});function Ia(n){if(!(this instanceof Ia))return new Ia(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=Mn.toArray(n.entropy,n.entropyEnc||"hex"),t=Mn.toArray(n.nonce,n.nonceEnc||"hex"),a=Mn.toArray(n.pers,n.persEnc||"hex");Bd(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,t,a)}var M0=Ia;Ia.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};Ia.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=Mn.toArray(a,i||"hex"),this._update(a));for(var r=[];r.length"};var Kh=an.assert;function xo(n,e){if(n instanceof xo)return n;this._importDER(n,e)||(Kh(n.r&&n.s,"Signature without r or s"),this.r=new oe.default(n.r,16),this.s=new oe.default(n.s,16),n.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=n.recoveryParam)}var bo=xo;function Wh(){this.place=0}function Nd(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 A0(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)}xo.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=A0(t),a=A0(a);!a[0]&&!(a[1]&128);)a=a.slice(1);var i=[2];Dd(i,t.length),i=i.concat(t),i.push(2),Dd(i,a.length);var r=i.concat(a),s=[48];return Dd(s,r.length),s=s.concat(r),an.encode(s,e)};var Jh=function(){throw new Error("unsupported")},C0=an.assert;function pn(n){if(!(this instanceof pn))return new pn(n);typeof n=="string"&&(C0(Object.prototype.hasOwnProperty.call(co,n),"Unknown curve "+n),n=co[n]),n instanceof co.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 $h=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 M0({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||Jh(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),a=this.n.byteLength(),i=this.n.sub(new oe.default(2));;){var r=new oe.default(t.generate(a));if(!(r.cmp(i)>0))return r.iaddn(1),this.keyFromPrivate(r)}};pn.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};pn.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 oe.default(e,16));for(var r=this.n.byteLength(),s=t.getPrivate().toArray("be",r),o=e.toArray("be",r),l=new M0({hash:this.hash,entropy:s,nonce:o,pers:i.pers,persEnc:i.persEnc||"utf8"}),p=this.n.sub(new oe.default(1)),f=0;;f++){var b=i.k?i.k(f):new oe.default(l.generate(this.n.byteLength()));if(b=this._truncateToN(b,!0),!(b.cmpn(1)<=0||b.cmp(p)>=0)){var M=this.g.mul(b);if(!M.isInfinity()){var k=M.getX(),v=k.umod(this.n);if(v.cmpn(0)!==0){var C=b.invm(this.n).mul(v.mul(t.getPrivate()).iadd(e));if(C=C.umod(this.n),C.cmpn(0)!==0){var D=(M.getY().isOdd()?1:0)|(k.cmp(v)!==0?2:0);return i.canonical&&C.cmp(this.nh)>0&&(C=this.n.sub(C),D^=1),new bo({r:v,s:C,recoveryParam:D})}}}}}};pn.prototype.verify=function(e,t,a,i){e=this._truncateToN(new oe.default(e,16)),a=this.keyFromPublic(a,i),t=new bo(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,a.getPublic(),p),f.isInfinity()?!1:f.eqXToP(r)):(f=this.g.mulAdd(l,a.getPublic(),p),f.isInfinity()?!1:f.getX().umod(this.n).cmp(r)===0)};pn.prototype.recoverPubKey=function(n,e,t,a){C0((3&t)===t,"The recovery param is more than two bits"),e=new bo(e,a);var i=this.n,r=new oe.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 f=e.r.invm(i),b=i.sub(r).mul(f).umod(i),M=o.mul(f).umod(i);return this.g.mulAdd(b,s,M)};pn.prototype.getKeyRecoveryParam=function(n,e,t,a){if(e=new bo(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 Qh=sr(function(n,e){"use strict";var t=e;t.version="6.5.4",t.utils=an,t.rand=function(){throw new Error("unsupported")},t.curve=fo,t.curves=co,t.ec=$h,t.eddsa=null}),I0=Qh.ec;var S0="signing-key/5.7.0";var Vd=new A(S0),Ud=null;function Jn(){return Ud||(Ud=new I0("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)),a=Jn().keyFromPublic(B(e));return"0x"+t.pub.add(a.pub).encodeCompressed("hex")}signDigest(e){let t=Jn().keyFromPrivate(B(this.privateKey)),a=B(e);a.length!==32&&Vd.throwArgumentError("bad digest length","digest",e);let i=t.sign(a,{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)),a=Jn().keyFromPublic(B(Wr(e)));return fe("0x"+t.derive(a.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}};function go(n,e){let t=Ln(e),a={r:B(t.r),s:B(t.s)};return"0x"+Jn().recoverPubKey(B(n),a,t.recoveryParam).encode("hex",!1)}function Wr(n,e){let t=B(n);if(t.length===32){let a=new cn(t);return e?"0x"+Jn().keyFromPrivate(t).getPublic(!0,"hex"):a.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 R0="transactions/5.7.0";var Lt=new A(R0),To;(function(n){n[n.legacy=0]="legacy",n[n.eip2930=1]="eip2930",n[n.eip1559=2]="eip1559"})(To||(To={}));function Hd(n){return n==="0x"?null:pe(n)}function Ft(n){return n==="0x"?zi:P.from(n)}var Xh=[{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"}],Yh={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function mn(n){let e=Wr(n);return pe(Me(le(Me(e,1)),12))}function li(n,e){return mn(go(B(n),e))}function rn(n,e){let t=Zt(P.from(n).toHexString());return t.length>32&&Lt.throwArgumentError("invalid length for "+e,"transaction:"+e,n),t}function jd(n,e){return{address:pe(n),storageKeys:(e||[]).map((t,a)=>(Pt(t)!==32&&Lt.throwArgumentError("invalid access list storageKey",`accessList[${n}:${a}]`,t),t.toLowerCase()))}}function sn(n){if(Array.isArray(n))return n.map((t,a)=>Array.isArray(t)?(t.length>2&&Lt.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${a}]`,t),jd(t[0],t[1])):jd(t.address,t.storageKeys));let e=Object.keys(n).map(t=>{let a=n[t].reduce((i,r)=>(i[r]=!0,i),{});return jd(t,Object.keys(a).sort())});return e.sort((t,a)=>t.address.localeCompare(a.address)),e}function P0(n){return sn(n).map(e=>[e.address,e.storageKeys])}function N0(n,e){if(n.gasPrice!=null){let a=P.from(n.gasPrice),i=P.from(n.maxFeePerGas||0);a.eq(i)||Lt.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:a,maxFeePerGas:i})}let t=[rn(n.chainId||0,"chainId"),rn(n.nonce||0,"nonce"),rn(n.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),rn(n.maxFeePerGas||0,"maxFeePerGas"),rn(n.gasLimit||0,"gasLimit"),n.to!=null?pe(n.to):"0x",rn(n.value||0,"value"),n.data||"0x",P0(n.accessList||[])];if(e){let a=Ln(e);t.push(rn(a.recoveryParam,"recoveryParam")),t.push(Zt(a.r)),t.push(Zt(a.s))}return _t(["0x02",ia(t)])}function D0(n,e){let t=[rn(n.chainId||0,"chainId"),rn(n.nonce||0,"nonce"),rn(n.gasPrice||0,"gasPrice"),rn(n.gasLimit||0,"gasLimit"),n.to!=null?pe(n.to):"0x",rn(n.value||0,"value"),n.data||"0x",P0(n.accessList||[])];if(e){let a=Ln(e);t.push(rn(a.recoveryParam,"recoveryParam")),t.push(Zt(a.r)),t.push(Zt(a.s))}return _t(["0x01",ia(t)])}function Zh(n,e){ji(n,Yh);let t=[];Xh.forEach(function(s){let o=n[s.name]||[],l={};s.numeric&&(l.hexPad="left"),o=B(j(o,l)),s.length&&o.length!==s.length&&o.length>0&&Lt.throwArgumentError("invalid length for "+s.name,"transaction:"+s.name,o),s.maxLength&&(o=Zt(o),o.length>s.maxLength&&Lt.throwArgumentError("invalid length for "+s.name,"transaction:"+s.name,o)),t.push(j(o))});let a=0;if(n.chainId!=null?(a=n.chainId,typeof a!="number"&&Lt.throwArgumentError("invalid transaction.chainId","transaction",n)):e&&!ta(e)&&e.v>28&&(a=Math.floor((e.v-35)/2)),a!==0&&(t.push(j(a)),t.push("0x"),t.push("0x")),!e)return ia(t);let i=Ln(e),r=27+i.recoveryParam;return a!==0?(t.pop(),t.pop(),t.pop(),r+=a*2+8,i.v>28&&i.v!==r&&Lt.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):i.v!==r&&Lt.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 Jr(n,e){if(n.type==null||n.type===0)return n.accessList!=null&&Lt.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",n),Zh(n,e);switch(n.type){case 1:return D0(n,e);case 2:return N0(n,e);default:break}return Lt.throwError(`unsupported transaction type: ${n.type}`,A.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:n.type})}function O0(n,e,t){try{let a=Ft(e[0]).toNumber();if(a!==0&&a!==1)throw new Error("bad recid");n.v=a}catch{Lt.throwArgumentError("invalid v for transaction type: 1","v",e[0])}n.r=fe(e[1],32),n.s=fe(e[2],32);try{let a=le(t(n));n.from=li(a,{r:n.r,s:n.s,recoveryParam:n.v})}catch{}}function ex(n){let e=Vr(n.slice(1));e.length!==9&&e.length!==12&&Lt.throwArgumentError("invalid component count for transaction type: 2","payload",j(n));let t=Ft(e[2]),a=Ft(e[3]),i={type:2,chainId:Ft(e[0]).toNumber(),nonce:Ft(e[1]).toNumber(),maxPriorityFeePerGas:t,maxFeePerGas:a,gasPrice:null,gasLimit:Ft(e[4]),to:Hd(e[5]),value:Ft(e[6]),data:e[7],accessList:sn(e[8])};return e.length===9||(i.hash=le(n),O0(i,e.slice(9),N0)),i}function tx(n){let e=Vr(n.slice(1));e.length!==8&&e.length!==11&&Lt.throwArgumentError("invalid component count for transaction type: 1","payload",j(n));let t={type:1,chainId:Ft(e[0]).toNumber(),nonce:Ft(e[1]).toNumber(),gasPrice:Ft(e[2]),gasLimit:Ft(e[3]),to:Hd(e[4]),value:Ft(e[5]),data:e[6],accessList:sn(e[7])};return e.length===8||(t.hash=le(n),O0(t,e.slice(8),D0)),t}function nx(n){let e=Vr(n);e.length!==9&&e.length!==6&&Lt.throwArgumentError("invalid raw transaction","rawTransaction",n);let t={nonce:Ft(e[0]).toNumber(),gasPrice:Ft(e[1]),gasLimit:Ft(e[2]),to:Hd(e[3]),value:Ft(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 a=t.v-27,i=e.slice(0,6);t.chainId!==0&&(i.push(j(t.chainId)),i.push("0x"),i.push("0x"),a-=t.chainId*2+8);let r=le(ia(i));try{t.from=li(r,{r:j(t.r),s:j(t.s),recoveryParam:a})}catch{}t.hash=le(n)}return t.type=null,t}function vo(n){let e=B(n);if(e[0]>127)return nx(e);switch(e[0]){case 1:return tx(e);case 2:return ex(e);default:break}return Lt.throwError(`unsupported transaction type: ${e[0]}`,A.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}var B0="contracts/5.7.0";var Ra=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(f){try{p(a.next(f))}catch(b){s(b)}}function l(f){try{p(a.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Ie=new A(B0),ax={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 wo(n,e){return Ra(this,void 0,void 0,function*(){let t=yield e;typeof t!="string"&&Ie.throwArgumentError("invalid address or ENS name","name",t);try{return pe(t)}catch{}n||Ie.throwError("a provider or signer is needed to resolve ENS names",A.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});let a=yield n.resolveName(t);return a==null&&Ie.throwArgumentError("resolver or addr is not configured for ENS name","name",t),a})}function $r(n,e,t){return Ra(this,void 0,void 0,function*(){return Array.isArray(t)?yield Promise.all(t.map((a,i)=>$r(n,Array.isArray(e)?e[i]:e[a.name],a))):t.type==="address"?yield wo(n,e):t.type==="tuple"?yield $r(n,e,t.components):t.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(a=>$r(n,a,t.arrayChildren))):Promise.reject(Ie.makeError("invalid value for array",A.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function Ao(n,e,t){return Ra(this,void 0,void 0,function*(){let a={};t.length===e.inputs.length+1&&typeof t[t.length-1]=="object"&&(a=Te(t.pop())),Ie.checkArgumentCount(t.length,e.inputs.length,"passed to contract"),n.signer?a.from?a.from=Ce({override:wo(n.signer,a.from),signer:n.signer.getAddress()}).then(p=>Ra(this,void 0,void 0,function*(){return pe(p.signer)!==p.override&&Ie.throwError("Contract with a Signer cannot override from",A.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),p.override})):a.from=n.signer.getAddress():a.from&&(a.from=wo(n.provider,a.from));let i=yield Ce({args:$r(n.signer||n.provider,t,e.inputs),address:n.resolvedAddress,overrides:Ce(a)||{}}),r=n.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;ba[p]!=null);return l.length&&Ie.throwError(`cannot override ${l.map(p=>JSON.stringify(p)).join(",")}`,A.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:l}),s})}function ix(n,e){return function(...t){return Ao(n,e,t)}}function rx(n,e){let t=n.signer||n.provider;return function(...a){return Ra(this,void 0,void 0,function*(){t||Ie.throwError("estimate require a provider or signer",A.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});let i=yield Ao(n,e,a);return yield t.estimateGas(i)})}}function L0(n,e){let t=e.wait.bind(e);e.wait=a=>t(a).then(i=>(i.events=i.logs.map(r=>{let s=ct(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 U0(n,e,t){let a=n.signer||n.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=Te(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 Ao(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===A.errors.CALL_EXCEPTION&&(l.address=n.address,l.args=i,l.transaction=s),l}})}}function sx(n,e){return function(...t){return Ra(this,void 0,void 0,function*(){n.signer||Ie.throwError("sending a transaction requires a signer",A.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),n.deployTransaction!=null&&(yield n._deployed());let a=yield Ao(n,e,t),i=yield n.signer.sendTransaction(a);return L0(n,i),i})}}function F0(n,e,t){return e.constant?U0(n,e,t):sx(n,e)}function V0(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 pi=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(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]}},qd=class extends pi{constructor(){super("error",null)}},_o=class extends pi{constructor(e,t,a,i){let r={address:e},s=t.getEventTopic(a);i?(s!==i[0]&&Ie.throwArgumentError("topic mismatch","topics",i),r.topics=i.slice()):r.topics=[s],super(V0(r),r),R(this,"address",e),R(this,"interface",t),R(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=qi(e.args);if(t.length)throw t[0].error;let a=(e.args||[]).slice();return a.push(e),a}},ko=class extends pi{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=(a,i)=>this.interface.decodeEventLog(t.eventFragment,a,i),e.args=t.args}catch{}}},or=class{constructor(e,t,a){R(this,"interface",mt(new.target,"getInterface")(t)),a==null?(R(this,"provider",null),R(this,"signer",null)):Gt.isSigner(a)?(R(this,"provider",a.provider||null),R(this,"signer",a)):$t.isProvider(a)?(R(this,"provider",a),R(this,"signer",null)):Ie.throwArgumentError("invalid signer or provider","signerOrProvider",a),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]]):Ie.warn(`Duplicate definition of ${o} (${l.join(", ")})`)})}if(R(this,"_runningEvents",{}),R(this,"_wrappedEmits",{}),e==null&&Ie.throwArgumentError("invalid contract address or ENS name","addressOrName",e),R(this,"address",e),this.provider)R(this,"resolvedAddress",wo(this.provider,e));else try{R(this,"resolvedAddress",Promise.resolve(pe(e)))}catch{Ie.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]){Ie.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,F0(this,o,!0)),this.functions[s]==null&&R(this.functions,s,F0(this,o,!1)),this.callStatic[s]==null&&R(this.callStatic,s,U0(this,o,!0)),this.populateTransaction[s]==null&&R(this.populateTransaction,s,ix(this,o)),this.estimateGas[s]==null&&R(this.estimateGas,s,rx(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 si(e)}static getInterface(e){return Ma.isInterface(e)?e:new Ma(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",A.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(e){this.signer||Ie.throwError("sending a transactions require a signer",A.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});let t=Te(e||{});return["from","to"].forEach(function(a){t[a]!=null&&Ie.throwError("cannot override "+a,A.errors.UNSUPPORTED_OPERATION,{operation:a})}),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 pi("event",null));if(e==="*")return this._normalizeRunningEvent(new ko(this.address,this.interface));let t=this.interface.getEvent(e);return this._normalizeRunningEvent(new _o(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 _o(this.address,this.interface,i,e.topics))}catch{}let t={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new pi(V0(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,a){let i=ct(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||Ie.throwError("events require a provider or a signer with a provider",A.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=Te(i.filter);return typeof t=="string"&&Z(t,32)?(a!=null&&Ie.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)}},ue=class extends or{},yi=class{constructor(e,t,a){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)&&Ie.throwArgumentError("invalid bytecode","bytecode",t),a&&!Gt.isSigner(a)&&Ie.throwArgumentError("invalid signer","signer",a),R(this,"bytecode",i),R(this,"interface",mt(new.target,"getInterface")(e)),R(this,"signer",a||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 a in t)if(!ax[a])throw new Error("unknown transaction override "+a)}return["data","from","to"].forEach(a=>{t[a]!=null&&Ie.throwError("cannot override "+a,A.errors.UNSUPPORTED_OPERATION,{operation:a})}),t.value&&!P.from(t.value).isZero()&&!this.interface.deploy.payable&&Ie.throwError("non-payable constructor cannot override value",A.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:t.value}),Ie.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()),Ie.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor");let a=yield $r(this.signer,e,this.interface.deploy.inputs);a.push(t);let i=this.getDeployTransaction(...a),r=yield this.signer.sendTransaction(i),s=mt(this.constructor,"getContractAddress")(r),o=mt(this.constructor,"getContract")(s,this.interface,this.signer);return L0(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&&Ie.throwError("missing compiler output",A.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 ue.getInterface(e)}static getContractAddress(e){return si(e)}static getContract(e,t,a){return new ue(e,t,a)}};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;)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]=b>>16&255,l[e.length+2]=b>>8&255,l[e.length+3]=b&255;let M=B(pa(i,n,l));r||(r=M.length,f=new Uint8Array(r),s=Math.ceil(a/r),p=a-(s-1)*r),f.set(M);for(let C=1;C=256)throw new Error("Depth too large!");return K0(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 Ct(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 a=new Uint8Array(37);if(e&lr){if(!this.privateKey)throw new Error("cannot derive child of neutered node");a.set(B(this.privateKey),1),t&&(t+="'")}else a.set(B(this.publicKey));for(let b=24;b>=0;b-=8)a[33+(b>>3)]=e>>24-b&255;let i=B(pa($n.sha512,this.chainCode,a)),r=i.slice(0,32),s=i.slice(32),o=null,l=null;this.privateKey?o=Mo(P.from(r).add(this.privateKey).mod(lx)):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 Ct(dr,o,l,this.fingerprint,Mo(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=lr)throw new Error("invalid path index - "+r);a=a._derive(lr+s)}else if(r.match(/^[0-9]+$/)){let s=parseInt(r);if(s>=lr)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=B(e);if(a.length<16||a.length>64)throw new Error("invalid seed");let i=B(pa($n.sha512,px,a));return new Ct(dr,Mo(i.slice(0,32)),null,"0x00000000",Mo(i.slice(32)),0,0,t)}static fromMnemonic(e,t,a){return a=Kd(a),e=mi(pr(e,a),a),Ct._fromSeed(Wd(e,t),{phrase:e,path:"m",locale:a.locale})}static fromSeed(e){return Ct._fromSeed(e,null)}static fromExtendedKey(e){let t=la.decode(e);(t.length!==82||K0(t.slice(0,78))!==e)&&Yr.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");let a=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 Ct(dr,null,j(o),i,s,r,a,null);case"0x0488ade4":case"0x04358394 ":if(o[0]!==0)break;return new Ct(dr,j(o.slice(1)),null,i,s,r,a,null)}return Yr.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}};function Wd(n,e){e||(e="");let t=ge("mnemonic"+e,qt.NFKD);return fi(ge(n,qt.NFKD),t,2048,64,"sha512")}function pr(n,e){e=Kd(e),Yr.checkNormalize();let t=e.split(n);if(t.length%3!==0)throw new Error("invalid mnemonic");let a=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=W0(s);if((B(Xt(a.slice(0,r/8)))[0]&o)!==(a[a.length-1]&o))throw new Error("invalid checksum");return j(a.slice(0,r/8))}function mi(n,e){if(e=Kd(e),n=B(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]&yx(8-a)),a+=3);let i=n.length/4,r=B(Xt(n))[0]&W0(i);return t[t.length-1]<<=i,t[t.length-1]|=r>>8-i,e.join(t.map(s=>e.getWord(s)))}function J0(n,e){try{return pr(n,e),!0}catch{}return!1}function $0(n){return(typeof n!="number"||n<0||n>=lr||n%1)&&Yr.throwArgumentError("invalid account index","index",n),`m/44'/60'/${n}'/0/0`}var Q0="random/5.7.0";var Jd=new A(Q0);function fx(){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 X0=fx(),Co=X0.crypto||X0.msCrypto;(!Co||!Co.getRandomValues)&&(Jd.warn("WARNING: Missing strong random number source"),Co={getRandomValues:function(n){return Jd.throwError("no secure random source avaialble",A.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function Qn(n){(n<=0||n>1024||n%1||n!=n)&&Jd.throwArgumentError("invalid length","length",n);let e=new Uint8Array(n);return Co.getRandomValues(e),B(e)}function Zr(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 Xd=wn(Qd());var Io="json-wallets/5.7.0";function fa(n){return typeof n=="string"&&n.substring(0,2)!=="0x"&&(n="0x"+n),B(n)}function yr(n,e){for(n=String(n);n.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),K=B(q.encrypt(i)),ye=le(de([F,K])),te={address:n.address.substring(2).toLowerCase(),id:Z0(M),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:j(b).substring(2)},ciphertext:j(K).substring(2),kdf:"scrypt",kdfparams:{salt:j(f).substring(2),n:k,dklen:32,p:C,r:v},mac:ye.substring(2)}};if(s){let ae=Qn(16),Re=new ca.default.Counter(ae),ie=new ca.default.ModeOfOperation.ctr(U,Re),we=B(ie.encrypt(s)),E=new Date,u=E.getUTCFullYear()+"-"+yr(E.getUTCMonth()+1,2)+"-"+yr(E.getUTCDate(),2)+"T"+yr(E.getUTCHours(),2)+"-"+yr(E.getUTCMinutes(),2)+"-"+yr(E.getUTCSeconds(),2)+".0Z";te["x-ethers"]={client:p,gethFilename:"UTC--"+u+"--"+te.address,mnemonicCounter:j(ae).substring(2),mnemonicCiphertext:j(we).substring(2),path:o,locale:l,version:"0.1"}}return JSON.stringify(te)})}function df(n,e,t){if(So(n)){t&&t(0);let a=Zd(n,e);return t&&t(1),Promise.resolve(a)}return Ro(n)?uf(n,e,t):Promise.reject(new Error("invalid JSON wallet"))}function lf(n,e){if(So(n))return Zd(n,e);if(Ro(n))return of(n,e);throw new Error("invalid JSON wallet")}var pf="wallet/5.7.0";var yf=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(f){try{p(a.next(f))}catch(b){s(b)}}function l(f){try{p(a.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},fr=new A(pf);function bx(n){return n!=null&&Z(n.privateKey,32)&&n.address!=null}function gx(n){let e=n.mnemonic;return e&&e.phrase}var Cn=class extends Gt{constructor(e,t){if(super(),bx(e)){let a=new cn(e.privateKey);if(R(this,"_signingKey",()=>a),R(this,"address",mn(this.publicKey)),this.address!==pe(e.address)&&fr.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),gx(e)){let i=e.mnemonic;R(this,"_mnemonic",()=>({phrase:i.phrase,path:i.path||ya,locale:i.locale||"en"}));let r=this.mnemonic,s=Ct.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 a=new cn(e);R(this,"_signingKey",()=>a)}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 Ce(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 a=this._signingKey().signDigest(le(Jr(t)));return Jr(t,a)})}signMessage(e){return yf(this,void 0,void 0,function*(){return Pr(this._signingKey().signDigest(Qi(e)))})}_signTypedData(e,t,a){return yf(this,void 0,void 0,function*(){let i=yield bt.resolveNames(e,t,a,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 Pr(this._signingKey().signDigest(bt.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={}),il(this,e,t,a)}static createRandom(e){let t=Qn(16);e||(e={}),e.extraEntropy&&(t=B(Me(le(de([t,e.extraEntropy])),0,16)));let a=mi(t,e.locale);return Cn.fromMnemonic(a,e.path,e.locale)}static fromEncryptedJson(e,t,a){return df(e,t,a).then(i=>new Cn(i))}static fromEncryptedJsonSync(e,t){return new Cn(lf(e,t))}static fromMnemonic(e,t,a){return t||(t=ya),new Cn(Ct.fromMnemonic(e,null,a).derivePath(t))}};function ff(n,e){return li(Qi(n),e)}function cf(n,e,t,a){return li(bt.hash(n,e,t),a)}var Da={};Li(Da,{AlchemyProvider:()=>gr,AlchemyWebSocketProvider:()=>ps,AnkrProvider:()=>ys,BaseProvider:()=>Yn,CloudflareProvider:()=>fs,EtherscanProvider:()=>cs,FallbackProvider:()=>hs,Formatter:()=>J,InfuraProvider:()=>vr,InfuraWebSocketProvider:()=>bs,IpcProvider:()=>xl,JsonRpcBatchProvider:()=>Wo,JsonRpcProvider:()=>Yt,JsonRpcSigner:()=>xr,NodesmithProvider:()=>gs,PocketProvider:()=>Ts,Provider:()=>$t,Resolver:()=>hr,StaticJsonRpcProvider:()=>ls,UrlJsonRpcProvider:()=>It,Web3Provider:()=>vs,WebSocketProvider:()=>xa,getDefaultProvider:()=>Jo,getNetwork:()=>ts,isCommunityResourcable:()=>ol,isCommunityResource:()=>is,showThrottleMessage:()=>Xn});var mf="networks/5.7.1";var hf=new A(mf);function Tx(n){return n&&typeof n.renetwork=="function"}function ma(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 ma(t)},e}function Do(n,e){let t=function(a,i){return a.JsonRpcProvider?new a.JsonRpcProvider(n,e):null};return t.renetwork=function(a){return Do(n,a)},t}var xf={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:ma("homestead")},bf={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:ma("ropsten")},gf={chainId:63,name:"classicMordor",_defaultProvider:Do("https://www.ethercluster.com/mordor","classicMordor")},No={unspecified:{chainId:0,name:"unspecified"},homestead:xf,mainnet:xf,morden:{chainId:2,name:"morden"},ropsten:bf,testnet:bf,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:Do("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:gf,classicTestnet:gf,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:Do("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 ts(n){if(n==null)return null;if(typeof n=="number"){for(let a in No){let i=No[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=No[n];return a==null?null:{name:a.name,chainId:a.chainId,ensAddress:a.ensAddress,_defaultProvider:a._defaultProvider||null}}let e=No[n.name];if(!e)return typeof n.chainId!="number"&&hf.throwArgumentError("invalid network chainId","network",n),n;n.chainId!==0&&n.chainId!==e.chainId&&hf.throwArgumentError("network chainId mismatch","network",n);let t=n._defaultProvider||null;return t==null&&e._defaultProvider&&(Tx(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 Tf="web/5.7.1";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(f){try{p(a.next(f))}catch(b){s(b)}}function l(f){try{p(a.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})};function vf(n,e){return vx(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:B(new Uint8Array(i))}})}var wx=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(f){try{p(a.next(f))}catch(b){s(b)}}function l(f){try{p(a.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},In=new A(Tf);function wf(n){return new Promise(e=>{setTimeout(e,n)})}function Pa(n,e){if(n==null)return null;if(typeof n=="string")return n;if(ta(n)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return Jt(n)}catch{}return j(n)}return n}function _x(n){return ge(n.replace(/%([0-9a-f][0-9a-f])/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))}function rl(n,e,t){let a=typeof n=="object"&&n.throttleLimit!=null?n.throttleLimit:12;In.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;In.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"},f=!1,b=2*60*1e3;if(typeof n=="string")l=n;else if(typeof n=="object"){if((n==null||n.url==null)&&In.throwArgumentError("missing URL","connection.url",n),l=n.url,typeof n.timeout=="number"&&n.timeout>0&&(b=n.timeout),n.headers)for(let N in n.headers)o[N.toLowerCase()]={key:N,value:String(n.headers[N])},["if-none-match","if-modified-since"].indexOf(N.toLowerCase())>=0&&(f=!0);if(p.allowGzip=!!n.allowGzip,n.user!=null&&n.password!=null){l.substring(0,6)!=="https:"&&n.allowInsecureAuthentication!==!0&&In.throwError("basic authentication requires a secure https url",A.errors.INVALID_ARGUMENT,{argument:"url",url:l,user:n.user,password:"[REDACTED]"});let N=n.user+":"+n.password;o.authorization={key:"Authorization",value:"Basic "+$i(ge(N))}}n.skipFetchSetup!=null&&(p.skipFetchSetup=!!n.skipFetchSetup),n.fetchOptions!=null&&(p.fetchOptions=Te(n.fetchOptions))}let M=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),k=l?l.match(M):null;if(k)try{let N={statusCode:200,statusMessage:"OK",headers:{"content-type":k[1]||"text/plain"},body:k[2]?Ji(k[3]):_x(k[3])},F=N.body;return t&&(F=t(N.body,N)),Promise.resolve(F)}catch(N){In.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 C=function(){let N=null;return{promise:new Promise(function(G,q){b&&(N=setTimeout(()=>{N!=null&&(N=null,q(In.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 wx(this,void 0,void 0,function*(){for(let N=0;N=300)&&(C.cancel(),In.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 C.cancel(),G}catch(G){if(G.throttleRetry&&N{let o=null;if(r!=null)try{o=JSON.parse(Jt(r))}catch(l){In.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 n=="string"?{url:n}:Te(n);r.headers?Object.keys(r.headers).filter(o=>o.toLowerCase()==="content-type").length!==0||(r.headers=Te(r.headers),r.headers["content-type"]="application/json"):r.headers={"content-type":"application/json"},n=r}return rl(n,i,a)}function Rn(n,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,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(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()&&a(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()&&a(f)})}p()})}var pl=wn(Ef());var _e="providers/5.7.2";var as=new A(_e),J=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),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(a),maxPriorityFeePerGas:J.allowNull(a),maxFeePerGas:J.allowNull(a),gasLimit:a,to:J.allowNull(t,null),value:a,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(a),gasPrice:J.allowNull(a),maxPriorityFeePerGas:J.allowNull(a),maxFeePerGas:J.allowNull(a),to:J.allowNull(t),value:J.allowNull(a),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:a,logsBloom:J.allowNull(r),blockHash:s,transactionHash:s,logs:J.arrayOf(this.receiptLog.bind(this)),blockNumber:l,confirmations:J.allowNull(l,null),cumulativeGasUsed:a,effectiveGasPrice:J.allowNull(a),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:a,gasUsed:a,miner:J.allowNull(t),extraData:r,transactions:J.allowNull(J.arrayOf(s)),baseFeePerGas:J.allowNull(a)},e.blockWithTransactions=Te(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():as.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 pe(e)}callAddress(e){if(!Z(e,32))return null;let t=pe(Me(e,12));return t===Ys?null:t}contractAddress(e){return si(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 a=this.hex(e,t);return Pt(a)!==32?as.throwArgumentError("invalid hash","value",e):a}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 a=e._difficulty!=null?e._difficulty:e.difficulty,i=J.check(t,e);return i._difficulty=a==null?null:P.from(a),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 a=e.chainId;Z(a)&&(a=P.from(a).toNumber()),t.chainId=a}else{let a=e.networkId;a==null&&t.v==null&&(a=e.chainId),Z(a)&&(a=P.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 vo(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 a=P.from(t.root).toNumber();a===0||a===1?(t.status!=null&&t.status!==a&&as.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=a,delete t.root):as.throwArgumentError("invalid alt-root-status","value.root",t.root)}else t.root.length!==66&&as.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 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 ol(n){return n&&typeof n.isCommunityResource=="function"}function is(n){return ol(n)&&n.isCommunityResource()}var Mf=!1;function Xn(){Mf||(Mf=!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 re=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(f){try{p(a.next(f))}catch(b){s(b)}}function l(f){try{p(a.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},ce=new A(_e),Rx=10;function Cf(n){return n==null?"null":(Pt(n)!==32&&ce.throwArgumentError("invalid topic","topic",n),n.toLowerCase())}function If(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[Cf(i)]=!0});let a=Object.keys(t);return a.sort(),a.join("|")}else return Cf(e)}).join("&")}function Px(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 mr(n){if(typeof n=="string"){if(n=n.toLowerCase(),Pt(n)===32)return"tx:"+n;if(n.indexOf(":")===-1)return n}else{if(Array.isArray(n))return"filter:*:"+If(n);if(lo.isForkEvent(n))throw ce.warn("not implemented"),new Error("not implemented");if(n&&typeof n=="object")return"filter:"+(n.address||"*")+":"+If(n.topics||[])}throw new Error("invalid event - "+n)}function rs(){return new Date().getTime()}function Sf(n){return new Promise(e=>{setTimeout(e,n)})}var Nx=["block","network","pending","poll"],yl=class{constructor(e,t,a){R(this,"tag",e),R(this,"listener",t),R(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=Px(e[2]),i={};return a.length>0&&(i.topics=a),t&&t!=="*"&&(i.address=t),i}pollable(){return this.tag.indexOf(":")>=0||Nx.indexOf(this.tag)>=0}},Dx={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 ul(n){return fe(P.from(n).toHexString(),32)}function Rf(n){return la.encode(de([n,Me(Xt(Xt(n)),0,4)]))}var Df=new RegExp("^(ipfs)://(.*)$","i"),Pf=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),Df,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Lo(n,e){try{return Jt(ss(n,e))}catch{}return null}function ss(n,e){if(n==="0x")return null;let t=P.from(Me(n,e,e+32)).toNumber(),a=P.from(Me(n,t,t+32)).toNumber();return Me(n,t+32,t+32+a)}function dl(n){return n.match(/^ipfs:\/\/ipfs\//i)?n=n.substring(12):n.match(/^ipfs:\/\//i)?n=n.substring(7):ce.throwArgumentError("unsupported IPFS format","link",n),`https://gateway.ipfs.io/ipfs/${n}`}function Nf(n){let e=B(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 Ox(n){if(n.length%32===0)return n;let e=new Uint8Array(Math.ceil(n.length/32)*32);return e.set(n),e}function Of(n){let e=[],t=0;for(let a=0;aP.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 re(this,void 0,void 0,function*(){let a={to:this.address,ccipReadEnabled:!0,data:_t([e,Ea(this.name),t||"0x"])},i=!1;(yield this.supportsWildcard())&&(i=!0,a.data=_t(["0x9061b923",Of([Gr(this.name),a.data])]));try{let r=yield this.provider.call(a);return B(r).length%32===4&&ce.throwError("resolver threw error",A.errors.CALL_EXCEPTION,{transaction:a,data:r}),i&&(r=ss(r,0)),r}catch(r){if(r.code===A.errors.CALL_EXCEPTION)return null;throw r}})}_fetchBytes(e,t){return re(this,void 0,void 0,function*(){let a=yield this._fetch(e,t);return a!=null?ss(a,0):null})}_getAddress(e,t){let a=Dx[String(e)];if(a==null&&ce.throwError(`unsupported coin type: ${e}`,A.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),a.ilk==="eth")return this.provider.formatter.address(t);let i=B(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 Rf(de([[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 Rf(de([[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 re(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{let i=yield this._fetch("0x3b3b57de");return i==="0x"||i===Ki?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",ul(e));if(t==null||t==="0x")return null;let a=this._getAddress(e,t);return a==null&&ce.throwError("invalid or unsupported coin data",A.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:t}),a})}getAvatar(){return re(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 ce.throwError("invalid or unsupported content hash data",A.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return re(this,void 0,void 0,function*(){let t=ge(e);t=de([ul(64),ul(t.length),t]),t.length%32!==0&&(t=de([t,fe("0x",32-e.length%32)]));let a=yield this._fetchBytes("0x59d1d43c",j(t));return a==null||a==="0x"?null:Jt(a)})}},ll=null,Bx=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 re(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 Rn(()=>this._ready().then(e=>e,e=>{if(!(e.code===A.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return ll==null&&(ll=new J),ll}static getNetwork(e){return ts(e??"homestead")}ccipReadFetch(e,t,a){return re(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}),b=yield Sn({url:p,errorPassThrough:!0},f,(k,v)=>(k.status=v.statusCode,k));if(b.data)return b.data;let M=b.message||"unknown error";if(b.status>=400&&b.status<500)return ce.throwError(`response not found during CCIP fetch: ${M}`,A.errors.SERVER_ERROR,{url:l,errorMessage:M});s.push(M)}return ce.throwError(`error encountered during CCIP fetch: ${s.map(o=>JSON.stringify(o)).join(", ")}`,A.errors.SERVER_ERROR,{urls:a,errorMessages:s})})}_getInternalBlockNumber(e){return re(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(rs()-r.respTime<=e)return r.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}let t=rs(),a=Ce({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=rs();return i=P.from(i).toNumber(),i{this._internalBlockNumber===a&&(this._internalBlockNumber=null)}),(yield a).blockNumber})}poll(){return re(this,void 0,void 0,function*(){let e=Bx++,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)ce.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${a})`),this.emit("error",ce.makeError("network block skew detected",A.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 re(this,void 0,void 0,function*(){return ce.throwError("provider does not support network detection",A.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return re(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 Sf(0),this._network;let a=ce.makeError("underlying network changed",A.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=rs();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 re(this,void 0,void 0,function*(){return this._waitForTransaction(e,t??1,a||0,null)})}_waitForTransaction(e,t,a,i){return re(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(M=>{M()}),!1)},b=M=>{M.confirmations{this.removeListener(e,b)}),i){let M=i.startBlock,k=null,v=C=>re(this,void 0,void 0,function*(){p||(yield Sf(1e3),this.getTransactionCount(i.from).then(D=>re(this,void 0,void 0,function*(){if(!p){if(D<=i.nonce)M=C;else{{let N=yield this.getTransaction(e);if(N&&N.blockNumber!=null)return}for(k==null&&(k=M-3,k{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 M=setTimeout(()=>{f()||o(ce.makeError("timeout exceeded",A.errors.TIMEOUT,{timeout:a}))},a);M.unref&&M.unref(),l.push(()=>{clearTimeout(M)})}})})}getBlockNumber(){return re(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return re(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 re(this,void 0,void 0,function*(){yield this.getNetwork();let a=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getBalance",a);try{return P.from(i)}catch(r){return ce.throwError("bad result from backend",A.errors.SERVER_ERROR,{method:"getBalance",params:a,result:i,error:r})}})}getTransactionCount(e,t){return re(this,void 0,void 0,function*(){yield this.getNetwork();let a=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getTransactionCount",a);try{return P.from(i).toNumber()}catch(r){return ce.throwError("bad result from backend",A.errors.SERVER_ERROR,{method:"getTransactionCount",params:a,result:i,error:r})}})}getCode(e,t){return re(this,void 0,void 0,function*(){yield this.getNetwork();let a=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getCode",a);try{return j(i)}catch(r){return ce.throwError("bad result from backend",A.errors.SERVER_ERROR,{method:"getCode",params:a,result:i,error:r})}})}getStorageAt(e,t,a){return re(this,void 0,void 0,function*(){yield this.getNetwork();let i=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(a),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,a){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)=>re(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&&ce.throwError("transaction failed",A.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:l}),l)}),i}sendTransaction(e){return re(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Promise.resolve(e).then(r=>j(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 re(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?P.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?j(r):null))}),this.formatter.transactionRequest(yield Ce(a))})}_getFilter(e){return re(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 Ce(t))})}_call(e,t,a){return re(this,void 0,void 0,function*(){a>=Rx&&ce.throwError("CCIP read exceeded maximum redirections",A.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"&&Pt(r)%32===4)try{let s=Me(r,4),o=Me(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(Me(s,32,64)).toNumber(),f=P.from(Me(s,p,p+32)).toNumber(),b=Me(s,p+32);for(let N=0;Nre(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 re(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Rn(()=>re(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 re(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Rn(()=>re(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 re(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Ce({filter:this._getFilter(e)}),a=yield this.perform("getLogs",t);return a.forEach(i=>{i.removed==null&&(i.removed=!1)}),J.arrayOf(this.formatter.filterLog.bind(this.formatter))(a)})}getEtherPrice(){return re(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return re(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 re(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 hr(this,a,e);return t!==e&&!(yield i.supportsWildcard())?null:i}t=t.split(".").slice(1).join(".")}})}_getResolver(e,t){return re(this,void 0,void 0,function*(){t==null&&(t="ENS");let a=yield this.getNetwork();a.ensAddress||ce.throwError("network does not support ENS",A.errors.UNSUPPORTED_OPERATION,{operation:t,network:a.name});try{let i=yield this.call({to:a.ensAddress,data:"0x0178b8bf"+Ea(e).substring(2)});return this.formatter.callAddress(i)}catch{}return null})}resolveName(e){return re(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(a){if(Z(e))throw a}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 re(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=Lo(yield this.call({to:a,data:"0x691f3431"+Ea(t).substring(2)}),0);return(yield this.resolveName(i))!=e?null:i})}getAvatar(e){return re(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=Lo(yield this.call({to:s,data:"0x691f3431"+Ea(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 a=yield t.getAvatar();return a==null?null:a.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,a){let i=new yl(mr(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=mr(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=mr(e);return this._events.filter(a=>a.tag===t).length}listeners(e){if(e==null)return this._events.map(a=>a.listener);let t=mr(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=mr(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=mr(e);this._events=this._events.filter(i=>i.tag!==a?!0:(t.push(i),!1))}return t.forEach(a=>{this._stopEvent(a)}),this}};var ha=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(f){try{p(a.next(f))}catch(b){s(b)}}function l(f){try{p(a.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},At=new A(_e),Fx=["call","estimateGas"];function us(n,e){if(n==null)return null;if(typeof n.message=="string"&&n.message.match("reverted")){let t=Z(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=us(n[t],e);if(a)return a}return null}if(typeof n=="string")try{return us(JSON.parse(n),e)}catch{}return null}function Ff(n,e,t){let a=t.transaction||t.signedTransaction;if(n==="call"){let r=us(e,!0);if(r)return r.data;At.throwError("missing revert data in call exception; Transaction reverted without a reason string",A.errors.CALL_EXCEPTION,{data:"0x",transaction:a,error:e})}if(n==="estimateGas"){let r=us(e.body,!1);r==null&&(r=us(e,!1)),r&&At.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",A.errors.UNPREDICTABLE_GAS_LIMIT,{reason:r.message,method:n,transaction:a,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)&&At.throwError("insufficient funds for intrinsic transaction cost",A.errors.INSUFFICIENT_FUNDS,{error:e,method:n,transaction:a}),i.match(/nonce (is )?too low/i)&&At.throwError("nonce has already been used",A.errors.NONCE_EXPIRED,{error:e,method:n,transaction:a}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&At.throwError("replacement fee too low",A.errors.REPLACEMENT_UNDERPRICED,{error:e,method:n,transaction:a}),i.match(/only replay-protected/i)&&At.throwError("legacy pre-eip-155 transactions not supported",A.errors.UNSUPPORTED_OPERATION,{error:e,method:n,transaction:a}),Fx.indexOf(n)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&At.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",A.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:n,transaction:a}),e}function Bf(n){return new Promise(function(e){setTimeout(e,n)})}function Lx(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 os(n){return n&&n.toLowerCase()}var fl={},xr=class extends Gt{constructor(e,t,a){if(super(),e!==fl)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");R(this,"provider",t),a==null&&(a=0),typeof a=="string"?(R(this,"_address",this.provider.formatter.address(a)),R(this,"_index",null)):typeof a=="number"?(R(this,"_index",a),R(this,"_address",null)):At.throwArgumentError("invalid address or index","addressOrIndex",a)}connect(e){return At.throwError("cannot alter JSON-RPC Signer connection",A.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new cl(fl,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&&At.throwError("unknown account #"+this._index,A.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=Te(e);let t=this.getAddress().then(a=>(a&&(a=a.toLowerCase()),a));if(e.gasLimit==null){let a=Te(e);a.from=t,e.gasLimit=this.provider.estimateGas(a)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(a=>ha(this,void 0,void 0,function*(){if(a==null)return null;let i=yield this.provider.resolveName(a);return i==null&&At.throwArgumentError("provided ENS name resolves to null","tx.to",a),i}))),Ce({tx:Ce(e),sender:t}).then(({tx:a,sender:i})=>{a.from!=null?a.from.toLowerCase()!==i&&At.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)&&At.throwError("user rejected transaction",A.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:a}),Ff("sendTransaction",s,r)))})}signTransaction(e){return At.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),a=yield this.sendUncheckedTransaction(e);try{return yield Rn(()=>ha(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 ha(this,void 0,void 0,function*(){let t=typeof e=="string"?ge(e):e,a=yield this.getAddress();try{return yield this.provider.send("personal_sign",[j(t),a.toLowerCase()])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&At.throwError("user rejected signing",A.errors.ACTION_REJECTED,{action:"signMessage",from:a,messageData:e}),i}})}_legacySignMessage(e){return ha(this,void 0,void 0,function*(){let t=typeof e=="string"?ge(e):e,a=yield this.getAddress();try{return yield this.provider.send("eth_sign",[a.toLowerCase(),j(t)])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&At.throwError("user rejected signing",A.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:a,messageData:e}),i}})}_signTypedData(e,t,a){return ha(this,void 0,void 0,function*(){let i=yield bt.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(bt.getPayload(i.domain,t,i.value))])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&At.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,a=yield this.getAddress();return t.send("personal_unlockAccount",[a.toLowerCase(),e,null])})}},cl=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:a=>this.provider.waitForTransaction(t,a)}))}},Ux={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 a=t;a==null&&(a=new Promise((i,r)=>{setTimeout(()=>{this.detectNetwork().then(s=>{i(s)},s=>{r(s)})},0)})),super(a),e||(e=mt(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 ha(this,void 0,void 0,function*(){yield Bf(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(a){return At.throwError("could not detect network",A.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:a})}}return At.throwError("could not detect network",A.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new xr(fl,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:ct(a),provider:this});let i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];let r=Sn(this.connection,JSON.stringify(a),Lx).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",[os(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[os(t.address),t.blockTag]];case"getCode":return["eth_getCode",[os(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[os(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 a=mt(this.constructor,"hexlifyTransaction");return["eth_call",[a(t.transaction,{from:!0}),t.blockTag]]}case"estimateGas":{let a=mt(this.constructor,"hexlifyTransaction");return["eth_estimateGas",[a(t.transaction,{from:!0})]]}case"getLogs":return t.filter&&t.filter.address!=null&&(t.filter.address=os(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=Te(t),t.transaction=Te(i),delete t.transaction.type)}}let a=this.prepareRequest(e,t);a==null&&At.throwError(e+" not implemented",A.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 Bf(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=Te(Ux);if(t)for(let r in t)t[r]&&(a[r]=!0);ji(e,a);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(_e);br=function(){e.throwError("WebSockets not supported in this environment",A.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var ml=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(f){try{p(a.next(f))}catch(b){s(b)}}function l(f){try{p(a.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Uo=new A(_e),Vx=1,xa=class extends Yt{constructor(e,t){t==="any"&&Uo.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 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){Uo.throwError("cannot reset events block on WebSocketProvider",A.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(e){Uo.throwError("cannot set polling interval on WebSocketProvider",A.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return ml(this,void 0,void 0,function*(){return null})}set polling(e){!e||Uo.throwError("cannot set polling on WebSocketProvider",A.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(e,t){let a=Vx++;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 ml(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=P.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 ml(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 jx=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(f){try{p(a.next(f))}catch(b){s(b)}}function l(f){try{p(a.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},ds=new A(_e),ls=class extends Yt{detectNetwork(){let e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return jx(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",A.errors.UNKNOWN_ERROR,{}),this._network==null&&(R(this,"_network",t),this.emit("network",t,null))),t})}},It=class extends ls{constructor(e,t){ds.checkAbstract(new.target,It),e=mt(new.target,"getNetwork")(e),t=mt(new.target,"getApiKey")(t);let a=mt(new.target,"getUrl")(e,t);super(a,e),typeof t=="string"?R(this,"apiKey",t):t!=null&&Object.keys(t).forEach(i=>{R(this,i,t[i])})}_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",A.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",A.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}};var Lf=new A(_e),Vo="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC",ps=class extends xa{constructor(e,t){let a=new gr(e,t),i=a.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi.");super(i,a.network),R(this,"apiKey",a.apiKey)}isCommunityResource(){return this.apiKey===Vo}},gr=class extends It{static getWebSocketProvider(e,t){return new ps(e,t)}static getApiKey(e){return e==null?Vo:(e&&typeof e!="string"&&Lf.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:Lf.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+a+t,throttleCallback:(i,r)=>(t===Vo&&Xn(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===Vo}};var Hx=new A(_e),jo="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function qx(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 Hx.throwArgumentError("unsupported network","name",n)}var ys=class extends It{isCommunityResource(){return this.apiKey===jo}static getApiKey(e){return e??jo}static getUrl(e,t){t==null&&(t=jo);let a={allowGzip:!0,url:"https://"+qx(e.name)+t,throttleCallback:(i,r)=>(t.apiKey===jo&&Xn(),Promise.resolve(!0))};return t.projectSecret!=null&&(a.user="",a.password=t.projectSecret),a}};var Gx=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(f){try{p(a.next(f))}catch(b){s(b)}}function l(f){try{p(a.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Uf=new A(_e),fs=class extends It{static getApiKey(e){return e!=null&&Uf.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:Uf.throwArgumentError("unsupported network","network",arguments[0])}return a}perform(e,t){let a=Object.create(null,{perform:{get:()=>super.perform}});return Gx(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 Ho=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(f){try{p(a.next(f))}catch(b){s(b)}}function l(f){try{p(a.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Na=new A(_e);function Vf(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=Fn(j(a)):t==="accessList"?a="["+sn(a).map(i=>`{address:"${i.address}",storageKeys:["${i.storageKeys.join('","')}"]}`).join(",")+"]":a=j(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 jf(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 Hf(n){if(n==="pending")throw new Error("pending not supported");return n==="latest"?n:parseInt(n.substring(2),16)}function hl(n,e,t){if(n==="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 a=e.message;throw e.code===A.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/)&&Na.throwError("insufficient funds for intrinsic transaction cost",A.errors.INSUFFICIENT_FUNDS,{error:e,method:n,transaction:t}),a.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:n,transaction:t}),a.match(/another transaction with same nonce/)&&Na.throwError("replacement fee too low",A.errors.REPLACEMENT_UNDERPRICED,{error:e,method:n,transaction:t}),a.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:n,transaction:t}),e}var cs=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 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 Ho(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"?jf:zx;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 Sn(o,l,s||jf);return this.emit("debug",{action:"response",request:i,response:ct(p),provider:this}),p})}detectNetwork(){return Ho(this,void 0,void 0,function*(){return this.network})}perform(e,t){let a=Object.create(null,{perform:{get:()=>super.perform}});return Ho(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=>hl("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=Vf(t.transaction);i.module="proxy",i.action="eth_call";try{return yield this.fetch("proxy",i,!0)}catch(r){return hl("call",r,t.transaction)}}case"estimateGas":{let i=Vf(t.transaction);i.module="proxy",i.action="eth_estimateGas";try{return yield this.fetch("proxy",i,!0)}catch(r){return hl("estimateGas",r,t.transaction)}}case"getLogs":{let i={action:"getLogs"};if(t.filter.fromBlock&&(i.fromBlock=Hf(t.filter.fromBlock)),t.filter.toBlock&&(i.toBlock=Hf(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 zo=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(f){try{p(a.next(f))}catch(b){s(b)}}function l(f){try{p(a.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},hi=new A(_e);function qo(){return new Date().getTime()}function qf(n){let e=null;for(let t=0;te?null:(a+i)/2}function Tr(n){if(n===null)return"null";if(typeof n=="number"||typeof n=="boolean")return JSON.stringify(n);if(typeof n=="string")return n;if(P.isBigNumber(n))return n.toString();if(Array.isArray(n))return JSON.stringify(n.map(e=>Tr(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=Tr(a),JSON.stringify(t)+":"+a}).join(",")+"}"}throw new Error("unknown value type: "+typeof n)}var Kx=1;function zf(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=[A.errors.CALL_EXCEPTION,A.errors.INSUFFICIENT_FUNDS,A.errors.NONCE_EXPIRED,A.errors.REPLACEMENT_UNDERPRICED,A.errors.UNPREDICTABLE_GAS_LIMIT],Jx=["address","args","errorArgs","errorSignature","method","transaction"];function Go(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 $x(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 Qx(n,e,t){let a=Tr;switch(e){case"getBlockNumber":return function(i){let r=i.map(o=>o.result),s=Gf(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 Gf(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=Te(i),i.confirmations=-1,Tr(i))};break;case"getBlock":t.includeTransactions?a=function(i){return i==null?null:(i=Te(i),i.transactions=i.transactions.map(r=>(r=Te(r),r.confirmations=-1,r)),Tr(i))}:a=function(i){return i==null?null:Tr(i)};break;default:throw new Error("unknown method: "+e)}return $x(a,n.quorum)}function ms(n,e){return zo(this,void 0,void 0,function*(){let t=n.provider;return t.blockNumber!=null&&t.blockNumber>=e||e===-1?t:Rn(()=>new Promise((a,i)=>{setTimeout(function(){return t.blockNumber>=e?a(t):n.cancelled?a(null):a(void 0)},0)}),{oncePoll:t})})}function Xx(n,e,t,a){return zo(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&&Z(a.blockTag)&&(i=yield ms(n,e)),i[t](a.address,a.blockTag||"latest");case"getStorageAt":return a.blockTag&&Z(a.blockTag)&&(i=yield ms(n,e)),i.getStorageAt(a.address,a.position,a.blockTag||"latest");case"getBlock":return a.blockTag&&Z(a.blockTag)&&(i=yield ms(n,e)),i[a.includeTransactions?"getBlockWithTransactions":"getBlock"](a.blockTag||a.blockHash);case"call":case"estimateGas":return a.blockTag&&Z(a.blockTag)&&(i=yield ms(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&&Z(r.fromBlock)||r.toBlock&&Z(r.toBlock))&&(i=yield ms(n,e)),i.getLogs(r)}}return hi.throwError("unknown method error",A.errors.UNKNOWN_ERROR,{method:t,params:a})})}var hs=class extends Yn{constructor(e,t){e.length===0&&hi.throwArgumentError("missing providers","providers",e);let a=e.map((s,o)=>{if($t.isProvider(s)){let f=is(s)?2e3:750;return Object.freeze({provider:s,weight:1,stallTimeout:f,priority:1})}let l=Te(s);l.priority==null&&(l.priority=1),l.stallTimeout==null&&(l.stallTimeout=is(s)?2e3:750),l.weight==null&&(l.weight=1);let p=l.weight;return(p%1||p>512||p<1)&&hi.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&&hi.throwArgumentError("quorum will always fail; larger than total weight","quorum",t);let r=qf(a.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(a)),R(this,"quorum",t),this._highestBlockNumber=-1}detectNetwork(){return zo(this,void 0,void 0,function*(){let e=yield Promise.all(this.providerConfigs.map(t=>t.provider.getNetwork()));return qf(e)})}perform(e,t){return zo(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(k=>k.runner&&l-k.startk+v.weight,0);for(;p{k.staller=null}),k.runner=Xx(k,r,e,t).then(C=>{k.done=!0,k.result=C,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Go(k,qo()),request:{method:e,params:ct(t)},provider:this})},C=>{k.done=!0,k.error=C,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Go(k,qo()),request:{method:e,params:ct(t)},provider:this})}),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Go(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=a(b);if(k!==void 0)return i.forEach(v=>{v.staller&&v.staller.cancel(),v.cancelled=!0}),k;o||(yield zf(100).getPromise()),o=!1}let M=i.reduce((k,v)=>{if(!v.done||v.error==null)return k;let C=v.error.code;return Wx.indexOf(C)>=0&&(k[C]||(k[C]={error:v.error,weight:0}),k[C].weight+=v.weight),k},{});if(Object.keys(M).forEach(k=>{let v=M[k];if(v.weight{N.staller&&N.staller.cancel(),N.cancelled=!0});let C=v.error,D={};Jx.forEach(N=>{C[N]!=null&&(D[N]=C[N])}),hi.throwError(C.reason||C.message,k,D)}),i.filter(k=>!k.done).length===0)break}return i.forEach(l=>{l.staller&&l.staller.cancel(),l.cancelled=!0}),hi.throwError("failed to meet quorum",A.errors.SERVER_ERROR,{method:e,params:t,results:i.map(l=>Go(l)),provider:this})})}};var xl=null;var Ko=new A(_e),xs="84842078b09946638c03157f83405213",bs=class extends xa{constructor(e,t){let a=new vr(e,t),i=a.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",a.projectId),R(this,"projectId",a.projectId),R(this,"projectSecret",a.projectSecret)}isCommunityResource(){return this.projectId===xs}},vr=class extends It{static getWebSocketProvider(e,t){return new bs(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?(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 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:Ko.throwError("unsupported network",A.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let i={allowGzip:!0,url:"https://"+a+"/v3/"+t.projectId,throttleCallback:(r,s)=>(t.projectId===xs&&Xn(),Promise.resolve(!0))};return t.projectSecret!=null&&(i.user="",i.password=t.projectSecret),i}isCommunityResource(){return this.projectId===xs}};var Wo=class extends Yt{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:ct(o),provider:this}),Sn(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 M=new Error(b.error.message);M.code=b.error.code,M.data=b.error.data,p.reject(M)}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 bl=new A(_e),Yx="ETHERS_JS_SHARED",gs=class extends It{static getApiKey(e){return e&&typeof e!="string"&&bl.throwArgumentError("invalid apiKey","apiKey",e),e||Yx}static getUrl(e,t){bl.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:bl.throwArgumentError("unsupported network","network",arguments[0])}return a+"?apiKey="+t}};var Kf=new A(_e),Wf="62e1ad51b37b8e00394bda3b",Ts=class extends It{static getApiKey(e){let t={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return e==null?t.applicationId=Wf:typeof e=="string"?t.applicationId=e:e.applicationSecretKey!=null?(t.applicationId=e.applicationId,t.applicationSecretKey=e.applicationSecretKey):e.applicationId?t.applicationId=e.applicationId:Kf.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:Kf.throwError("unsupported network",A.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===Wf}};var Jf=new A(_e),Zx=1;function $f(n,e){let t="Web3LegacyFetcher";return function(a,i){let r={method:a,params:i,id:Zx++,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 e5(n){return function(e,t){t==null&&(t=[]);let a={method:e,params:t};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:ct(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 vs=class extends Yt{constructor(e,t){e==null&&Jf.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=e5(e)):e.sendAsync?i=$f(e,e.sendAsync.bind(e)):e.send?i=$f(e,e.send.bind(e)):Jf.throwArgumentError("unsupported provider","provider",e),a||(a="unknown:")),super(a,t),R(this,"jsonRpcFetchFunc",i),R(this,"provider",r)}send(e,t){return this.jsonRpcFetchFunc(e,t)}};var Qf=new A(_e);function Jo(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 Yt(n);case"ws":case"wss":return new xa(n);default:Qf.throwArgumentError("unsupported URL scheme","network",n)}}let t=ts(n);return(!t||!t._defaultProvider)&&Qf.throwError("unsupported getDefaultProvider network",A.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:n}),t._defaultProvider({FallbackProvider:hs,AlchemyProvider:gr,AnkrProvider:ys,CloudflareProvider:fs,EtherscanProvider:cs,InfuraProvider:vr,JsonRpcProvider:Yt,NodesmithProvider:gs,PocketProvider:Ts,Web3Provider:vs,IpcProvider:null},e)}var Y={};Li(Y,{AbiCoder:()=>Wi,ConstructorFragment:()=>Nt,ErrorFragment:()=>tn,EventFragment:()=>jt,FormatTypes:()=>xe,Fragment:()=>Ht,FunctionFragment:()=>Dt,HDNode:()=>Ct,Indexed:()=>ra,Interface:()=>Ma,LogDescription:()=>Xi,Logger:()=>A,ParamType:()=>lt,RLP:()=>Gs,SigningKey:()=>cn,SupportedAlgorithm:()=>$n,TransactionDescription:()=>Yi,TransactionTypes:()=>To,UnicodeNormalizationForm:()=>qt,Utf8ErrorFuncs:()=>ao,Utf8ErrorReason:()=>Ot,_TypedDataEncoder:()=>bt,_fetchData:()=>rl,_toEscapedUtf8String:()=>ld,accessListify:()=>sn,arrayify:()=>B,base58:()=>la,base64:()=>hd,checkProperties:()=>ji,checkResultErrors:()=>qi,commify:()=>ic,computeAddress:()=>mn,computeHmac:()=>pa,computePublicKey:()=>Wr,concat:()=>de,deepCopy:()=>ct,defaultAbiCoder:()=>Hr,defaultPath:()=>ya,defineReadOnly:()=>R,dnsEncode:()=>Gr,entropyToMnemonic:()=>mi,fetchJson:()=>Sn,formatBytes32String:()=>pd,formatEther:()=>rc,formatUnits:()=>gl,getAccountPath:()=>$0,getAddress:()=>pe,getContractAddress:()=>si,getCreate2Address:()=>dy,getIcapAddress:()=>uy,getJsonWalletAddress:()=>el,getStatic:()=>mt,hashMessage:()=>Qi,hexConcat:()=>_t,hexDataLength:()=>Pt,hexDataSlice:()=>Me,hexStripZeros:()=>Zu,hexValue:()=>Fn,hexZeroPad:()=>fe,hexlify:()=>j,id:()=>nn,isAddress:()=>oy,isBytes:()=>on,isBytesLike:()=>ta,isHexString:()=>Z,isValidMnemonic:()=>J0,isValidName:()=>bd,joinSignature:()=>Pr,keccak256:()=>le,mnemonicToEntropy:()=>pr,mnemonicToSeed:()=>Wd,namehash:()=>Ea,nameprep:()=>md,parseBytes32String:()=>yd,parseEther:()=>sc,parseTransaction:()=>vo,parseUnits:()=>Tl,poll:()=>Rn,randomBytes:()=>Qn,recoverAddress:()=>li,recoverPublicKey:()=>go,resolveProperties:()=>Ce,ripemd160:()=>Qr,serializeTransaction:()=>Jr,sha256:()=>Xt,sha512:()=>qd,shallowCopy:()=>Te,shuffled:()=>Zr,solidityKeccak256:()=>Zf,solidityPack:()=>$o,soliditySha256:()=>ec,splitSignature:()=>Ln,stripZeros:()=>Zt,toUtf8Bytes:()=>ge,toUtf8CodePoints:()=>Aa,toUtf8String:()=>Jt,verifyMessage:()=>ff,verifyTypedData:()=>cf,zeroPad:()=>ni});var Xf="solidity/5.7.0";var t5=new RegExp("^bytes([0-9]+)$"),n5=new RegExp("^(u?int)([0-9]*)$"),a5=new RegExp("^(.*)\\[([0-9]*)\\]$"),i5="0000000000000000000000000000000000000000000000000000000000000000",wr=new A(Xf);function Yf(n,e,t){switch(n){case"address":return t?ni(e,32):B(e);case"string":return ge(e);case"bytes":return B(e);case"bool":return e=e?"0x01":"0x00",t?ni(e,32):B(e)}let a=n.match(n5);if(a){let i=parseInt(a[2]||"256");return(a[2]&&String(i)!==a[2]||i%8!==0||i===0||i>256)&&wr.throwArgumentError("invalid number type","type",n),t&&(i=256),e=P.from(e).toTwos(i),ni(e,i/8)}if(a=n.match(t5),a){let i=parseInt(a[1]);return(String(i)!==a[1]||i===0||i>32)&&wr.throwArgumentError("invalid bytes type","type",n),B(e).byteLength!==i&&wr.throwArgumentError(`invalid value for ${n}`,"value",e),t?B((e+i5).substring(0,66)):e}if(a=n.match(a5),a&&Array.isArray(e)){let i=a[1];parseInt(a[2]||String(e.length))!=e.length&&wr.throwArgumentError(`invalid array length for ${n}`,"value",e);let s=[];return e.forEach(function(o){s.push(Yf(i,o,!0))}),de(s)}return wr.throwArgumentError("invalid type","type",n)}function $o(n,e){n.length!=e.length&&wr.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);let t=[];return n.forEach(function(a,i){t.push(Yf(a,e[i]))}),j(de(t))}function Zf(n,e){return le($o(n,e))}function ec(n,e){return Xt($o(n,e))}var tc="units/5.7.0";var nc=new A(tc),ac=["wei","kwei","mwei","gwei","szabo","finney","ether"];function ic(n){let e=String(n).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||n==="."||n==="-.")&&nc.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 gl(n,e){if(typeof e=="string"){let t=ac.indexOf(e);t!==-1&&(e=3*t)}return Vi(n,e??18)}function Tl(n,e){if(typeof n!="string"&&nc.throwArgumentError("value must be a string","value",n),typeof e=="string"){let t=ac.indexOf(e);t!==-1&&(e=3*t)}return dn(n,e??18)}function rc(n){return gl(n,18)}function sc(n){return Tl(n,18)}var Qo="ethers/5.7.2";var oc=new A(Qo);try{let n=window;n._ethers==null&&(n._ethers=vl)}catch{}var ba;(function(n){n.Mainnet="Mainnet",n.Custom="Custom",n.Gnosis="Xdai",n.Goerli="Goerli",n.Xdai="Xdai",n.XdaiQa="XdaiQa",n.ArbitrumOne="ArbitrumOne",n.ArbitrumSepolia="ArbitrumSepolia"})(ba||(ba={}));var uc;(function(n){n[n.Custom=0]="Custom",n[n.Mainnet=1]="Mainnet",n[n.Goerli=5]="Goerli",n[n.Gnosis=100]="Gnosis",n[n.Xdai=100]="Xdai",n[n.XdaiQa=100]="XdaiQa",n[n.ArbitrumSepolia=421614]="ArbitrumSepolia",n[n.ArbitrumOne=42161]="ArbitrumOne"})(uc||(uc={}));var wl;(function(n){n.Mainnet="0x5346D0f80e2816FaD329F2c140c870ffc3c3E2Ef",n.Goerli="0x79073fc2117dD054FCEdaCad1E7018C9CbE3ec0B",n.Xdai="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.XdaiQa="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.Custom="",n.ArbitrumOne="0xcccccdcc0ccf6c708d860e19353c5f9a49accccc",n.ArbitrumSepolia="0x7777494e3d8cce0D3570E21FEf820F9Fee077777"})(wl||(wl={}));var ws;(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",n.ArbitrumOne="https://app.colony.io/reputation/arbitrum-one",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/reputation/arbitrum-sepolia"})(ws||(ws={}));var _l;(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="",n.ArbitrumOne="https://app.colony.io/metatransaction/arbitrum-one",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/metatransaction/arbitrum-sepolia"})(_l||(_l={}));var _s;(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="",n.ArbitrumOne="https://app.colony.io/public-rpc/",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/public-rpc/"})(_s||(_s={}));var kl;(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",n.ArbitrumOne=".colony.joincolony.arbitrum",n.ArbitrumSepolia=".colony.joincolony.sepolia"})(kl||(kl={}));var Al;(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",n.ArbitrumOne=".user.joincolony.arbitrum",n.ArbitrumSepolia=".user.joincolony.sepolia"})(Al||(Al={}));var El;(function(n){let e;(function(i){i.ETH="0x0000000000000000000000000000000000000000",i.CLNY="0x3E828ac5C480069D4765654Fb4b8733b910b13b2",i.USDC="0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"})(e=n.Mainnet||(n.Mainnet={}));let t;(function(i){i.XDAI="0x0000000000000000000000000000000000000000",i.CLNY="0xc9B6218AffE8Aba68a13899Cbf7cF7f14DDd304C",i.USDC="0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83"})(t=n.Gnosis||(n.Gnosis={}));let a;(function(i){i.ETH="0x0000000000000000000000000000000000000000",i.CLNY="0xcccccdcc0ccf6c708d860e19353c5f9a49accccc",i.USDC="0xaf88d065e77c8cC2239327C5EDb3A432268e5831"})(a=n.ArbitrumOne||(n.ArbitrumOne={}))})(El||(El={}));var ve;(function(n){n[n.RootDomain=1]="RootDomain",n[n.RootTeam=1]="RootTeam",n[n.RootPot=1]="RootPot",n[n.SkillIgnore=0]="SkillIgnore"})(ve||(ve={}));var zt;(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"})(zt||(zt={}));var Cl="0x12345678",Ml;(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"})(Ml||(Ml={}));var vt;(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"})(vt||(vt={}));var ke;(function(n){n.FundingQueue="FundingQueue",n.IVotingReputation="IVotingReputation",n.MultisigPermissions="MultisigPermissions",n.OneTxPayment="OneTxPayment",n.ReputationBootstrapper="ReputationBootstrapper",n.StagedExpenditure="StagedExpenditure",n.StakedExpenditure="StakedExpenditure",n.StreamingPayments="StreamingPayments",n.TokenSupplier="TokenSupplier",n.VotingReputation="VotingReputation"})(ke||(ke={}));var Il=[{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"}],xi=class{static createInterface(){return new Y.Interface(Il)}static connect(e,t){return new ue(e,Il,t)}};me(xi,"abi",Il);var Sl=[{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"}],bi=class{static createInterface(){return new Y.Interface(Sl)}static connect(e,t){return new ue(e,Sl,t)}};me(bi,"abi",Sl);var dc=(n,e)=>{throw new Error(`${e}: ${n}`)},Rl=n=>n!=null;var{keccak256:s5,toUtf8Bytes:o5}=Y,{MaxUint256:u5}=ht;var Pl=n=>Y.formatEther(n);var Nl=n=>{let e=n.reduce((t,a)=>t|1<{let e=P.from(n);return[...Array(vt.LAST_ROLE).keys()].map(t=>e.shr(t).mask(1).eq(1)?t:null).filter(Rl)},gi=async(n,e,t,a)=>{if(P.from(t).eq(P.from(a)))return u5;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 P.from(o)},Oa=n=>s5(o5(n));var _r=async(n,e)=>(await bi.connect(n,e).version()).toNumber(),Dl=(n,e)=>n.map(t=>{try{return e.parseLog(t)}catch{return null}}).filter(Rl);var{hexDataSlice:Ol}=Y,{MaxUint256:d5}=ht,lc=n=>{let e=Ol(n,0,3),t=P.from(Ol(n,4,35)),a=P.from(Ol(n,36,67));return{sig:e,permissionDomainId:t,childSkillIndex:a}},pc=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[P.from(t),d5,r];let o=P.from(ve.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 gi(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]},l5=async(n,e,t,a,i)=>{let r=await Promise.all(a.map(s=>pc(n,e,t,s,i)));for(let s=0;sArray.isArray(a)?a.length===1?Zn(n,e,t,a[0],i):l5(n,e,t,a,i):pc(n,e,t,a,i);var{MaxUint256:yc}=ht,{AddressZero:p5}=ht;async function y5(n,e){let t;try{return t=await n.getCapabilityRoles(Y.hexZeroPad(e,4)),Xo(t)}catch{return[]}}async function ks(n,e,t,a,i,r,s){let o,{skillId:l}=await e.getDomain(i),{sig:p,permissionDomainId:f,childSkillIndex:b}=lc(s),M=xi.connect(r,a.signer||a.provider),k=await y5(M,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 ${ve.RootDomain}`);o=yc}else{let{skillId:F}=await e.getDomain(f),U=await n.getChildSkillId(F,b);if(U.eq(l))o=yc;else{let{children:G}=await n.getSkill(l),q=G.findIndex(K=>K.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:C,branchMask:D,siblings:N}=await t.getReputationWithProofs(l,p5);return{actionCid:o,key:v,value:C,branchMask:D,siblings:N}}var{AddressZero:f5}=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,a){this.colony=t,this.network=e;let i=a?.network||ba.ArbitrumOne;this.endpointUrl=a?.customEndpointUrl||ws[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,a){let i=await this.getBaseEndpoint(a),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,a){let i=await this.getBaseEndpoint(a),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 a=await this.getBaseEndpoint(t),i=P.from(e||0).toString(),r=`${a}/${i}`;return ea.fetchReputation(r)}async getTotalReputation(e,t){let a=await this.getBaseEndpoint(t),i=P.from(e||0).toString(),r=`${a}/${i}/${f5}/noProof`,s=await ea.fetchReputation(r);return{...s,reputationAmount:P.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(P.from(10).pow(i)).div(s).toNumber()/10**i}};var Et=n=>Array.from(Array(n-1)).map((e,t)=>t+1);var fc=10,G7=Et(fc),cc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},mc=fc-1;var hc=3,W7=Et(hc),xc={1:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],2:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]},bc=hc-1;var gc=10,Q7=Et(gc),Tc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},vc=gc-1;var wc=7,Z7=Et(wc),_c={1:[],2:[],3:[],4:[],5:[],6:[]},kc=wc-1;var Ac=8,nk=Et(Ac),Ec={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3],6:[1,2,3],7:[1,2,3]},Mc=Ac-1;var Cc=5,rk=Et(Cc),Ic={1:[1,2,3,4,5,6,7,8,9,10,11,12,13],2:[1,2,3,4,5,6,7,8,9,10,11,12,13],3:[1,2,3,4,5,6,7,8,9,10,11,12,13],4:[1,2,3,4,5,6,7,8,9,10,11,12,13]},Sc=Cc-1;var Rc=7,uk=Et(Rc),Pc={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3],6:[1,2,3]},Nc=Rc-1;var Dc=10,pk=Et(Dc),Oc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Bc=Dc-1;var Fc=14,ck=Et(Fc),Bl={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],11:[1,2,3,4,5,6],12:[1,2,3,4,5,6],13:[1,2,3,4,5,6]},Fl=Fc-1;var Lc=18,c5=Et(Lc),xk=Lc-1;var m5=(n,e)=>{switch(n){case ke.FundingQueue:return cc[e];case ke.IVotingReputation:return Bl[e];case ke.MultisigPermissions:return xc[e];case ke.OneTxPayment:return Tc[e];case ke.ReputationBootstrapper:return _c[e];case ke.StagedExpenditure:return Ic[e];case ke.StakedExpenditure:return Ec[e];case ke.StreamingPayments:return Pc[e];case ke.TokenSupplier:return Oc[e];case ke.VotingReputation:return Bl[e];default:return dc(n,"Could not find extension with name")}},Ti=(n,e,t)=>{let a=m5(n,e);return!!a&&!a.includes(t)};var h5={[ke.FundingQueue]:mc,[ke.IVotingReputation]:Fl,[ke.MultisigPermissions]:bc,[ke.OneTxPayment]:vc,[ke.ReputationBootstrapper]:kc,[ke.StagedExpenditure]:Sc,[ke.StakedExpenditure]:Mc,[ke.StreamingPayments]:Nc,[ke.TokenSupplier]:Bc,[ke.VotingReputation]:Fl};var i6=wn(Uc(),1);var Ib=wn(a6(),1);var pt;(function(n){n.DEFAULT="default",n.Annotation="annotation",n.Colony="colony",n.Decision="decision",n.Domain="domain",n.Misc="misc"})(pt||(pt={}));var ap;(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"})(ap||(ap={}));var qA=(0,i6.default)(fetch,{headers:{Accept:"application/json"},retryOn:[404,503],retries:3,retryDelay:5e3}),ip={[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 zA=typeof global<"u"&&global.process?global.process.env.COLONY_IPFS_PINATA_TOKEN:void 0;var rp=[{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(rp)}static connect(e,t){return new ue(e,rp,t)}};me(Tn,"abi",rp);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"},{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(sp)}static connect(e,t){return new ue(e,sp,t)}};me(vn,"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:"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 Y.Interface(op)}static connect(e,t){return new ue(e,op,t)}};me(Ei,"abi",op);var Ru=[{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:"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:"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:[{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:"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:"returnData",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",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:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],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:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"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:[],name:"unlock",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"}],s6="0x60c060405234801561001057600080fd5b5060405161205738038061205783398101604081905261002f91610307565b60008060018161003d6101ab565b6001600160a01b031681526020810191909152604001600090812091909155556100656101ab565b600480546001600160a01b0319166001600160a01b039290921691909117905561008d6101ab565b6001600160a01b03167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a260066100ce8482610413565b5060056100db8382610413565b5060ff81166080526007805460ff1916600117905560405146907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f90610123906006906104d1565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051601f19818403018152919052805160209091012060a0525061054692505050565b60003633301480156101be575060348110155b1561024757600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e881146102365733935050505090565b5001516001600160a01b0316919050565b3391505090565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261027557600080fd5b81516001600160401b0381111561028e5761028e61024e565b604051601f8201601f19908116603f011681016001600160401b03811182821017156102bc576102bc61024e565b6040528181528382016020018510156102d457600080fd5b60005b828110156102f3576020818601810151838301820152016102d7565b506000918101602001919091529392505050565b60008060006060848603121561031c57600080fd5b83516001600160401b0381111561033257600080fd5b61033e86828701610264565b602086015190945090506001600160401b0381111561035c57600080fd5b61036886828701610264565b925050604084015160ff8116811461037f57600080fd5b809150509250925092565b600181811c9082168061039e57607f821691505b6020821081036103be57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561040e57806000526020600020601f840160051c810160208510156103eb5750805b601f840160051c820191505b8181101561040b57600081556001016103f7565b50505b505050565b81516001600160401b0381111561042c5761042c61024e565b6104408161043a845461038a565b846103c4565b6020601f821160018114610474576000831561045c5750848201515b600019600385901b1c1916600184901b17845561040b565b600084815260208120601f198516915b828110156104a45787850151825560209485019460019092019101610484565b50848210156104c25786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b60008083546104df8161038a565b6001821680156104f6576001811461050b5761053b565b60ff198316865281151582028601935061053b565b86600052602060002060005b8381101561053357815488820152600190910190602001610517565b505081860193505b509195945050505050565b60805160a051611ae5610572600039600081816102e10152610f870152600061029b0152611ae56000f3fe6080604052600436106101815760003560e01c80637a9e5e4b116100d1578063a69df4b51161008a578063bf7e214f11610064578063bf7e214f146104b1578063cf309012146104d1578063d505accf146104eb578063dd62ed3e1461050b57600080fd5b8063a69df4b51461047c578063a9059cbb14610491578063b3eac1d8146103b957600080fd5b80637a9e5e4b146103995780637ecebe00146103b95780638da5cb5b146103ef57806395d89b41146104275780639dc29fac1461043c578063a0712d681461045c57600080fd5b806330adf81f1161013e57806340c10f191161011857806340c10f191461030357806342966c68146103235780636281133d1461034357806370a082311461036357600080fd5b806330adf81f14610255578063313ce567146102895780633644e515146102cf57600080fd5b806306fdde0314610186578063095ea7b3146101b15780630c53c51c146101e157806313af4035146101f457806318160ddd1461021657806323b872dd14610235575b600080fd5b34801561019257600080fd5b5061019b610551565b6040516101a891906115b0565b60405180910390f35b3480156101bd57600080fd5b506101d16101cc3660046115d8565b6105df565b60405190151581526020016101a8565b61019b6101ef3660046116bf565b610672565b34801561020057600080fd5b5061021461020f366004611733565b610859565b005b34801561022257600080fd5b506000545b6040519081526020016101a8565b34801561024157600080fd5b506101d1610250366004611750565b6108dc565b34801561026157600080fd5b506102277f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b34801561029557600080fd5b506102bd7f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101a8565b3480156102db57600080fd5b506102277f000000000000000000000000000000000000000000000000000000000000000081565b34801561030f57600080fd5b5061021461031e3660046115d8565b610950565b34801561032f57600080fd5b5061021461033e366004611791565b610a3f565b34801561034f57600080fd5b506101d161035e3660046117aa565b610a53565b34801561036f57600080fd5b5061022761037e366004611733565b6001600160a01b031660009081526001602052604090205490565b3480156103a557600080fd5b506102146103b4366004611733565b610ba7565b3480156103c557600080fd5b506102276103d4366004611733565b6001600160a01b031660009081526008602052604090205490565b3480156103fb57600080fd5b5060045461040f906001600160a01b031681565b6040516001600160a01b0390911681526020016101a8565b34801561043357600080fd5b5061019b610c18565b34801561044857600080fd5b506102146104573660046115d8565b610c25565b34801561046857600080fd5b50610214610477366004611791565b610e1c565b34801561048857600080fd5b50610214610e54565b34801561049d57600080fd5b506101d16104ac3660046115d8565b610e87565b3480156104bd57600080fd5b5060035461040f906001600160a01b031681565b3480156104dd57600080fd5b506007546101d19060ff1681565b3480156104f757600080fd5b50610214610506366004611831565b610ea2565b34801561051757600080fd5b506102276105263660046118a0565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6006805461055e906118d9565b80601f016020809104026020016040519081016040528092919081815260200182805461058a906118d9565b80156105d75780601f106105ac576101008083540402835291602001916105d7565b820191906000526020600020905b8154815290600101906020018083116105ba57829003601f168201915b505050505081565b600081600260006105ee611191565b6001600160a01b0390811682526020808301939093526040918201600090812091881680825291909352912091909155610626611191565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161066091815260200190565b60405180910390a35060015b92915050565b60606106a186610697886001600160a01b031660009081526008602052604090205490565b4688888888610a53565b6107045760405162461bcd60e51b815260206004820152602960248201527f6d6574617472616e73616374696f6e2d7369676e65722d7369676e617475726560448201526805adad2e6dac2e8c6d60bb1b60648201526084015b60405180910390fd5b61070d86611234565b6000306001600160a01b0316867f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e88960405160200161074e93929190611913565b60408051601f19818403018152908290526107689161194c565b6000604051808303816000865af19150503d80600081146107a5576040519150601f19603f3d011682016040523d82523d6000602084013e6107aa565b606091505b50925090508061080d5760405162461bcd60e51b815260206004820152602860248201527f636f6c6f6e792d6d65746174782d66756e6374696f6e2d63616c6c2d756e737560448201526718d8d95cdcd99d5b60c21b60648201526084016106fb565b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b87610837611191565b8860405161084793929190611968565b60405180910390a15095945050505050565b610876610864611191565b6000356001600160e01b031916611260565b6108925760405162461bcd60e51b81526004016106fb9061199d565b600480546001600160a01b0319166001600160a01b0383169081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60075460009060ff161561093d576108f5610864611191565b61093d5760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b61094884848461133b565b949350505050565b61095b610864611191565b6109775760405162461bcd60e51b81526004016106fb9061199d565b6001600160a01b0382166000908152600160205260408120805483929061099f9084906119e1565b92505081905550806000808282546109b791906119e1565b90915550506040518181526001600160a01b038316907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a26040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b610a50610a4a611191565b82610c25565b50565b600080610ad088308989604051602001610a7094939291906119f4565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b6040805160008082526020820180845284905260ff87169282019290925260608101889052608081018790529192509060019060a0016020604051602081039080840390855afa158015610b28573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610b8b5760405162461bcd60e51b815260206004820152601f60248201527f636f6c6f6e792d6d65746174782d696e76616c69642d7369676e61747572650060448201526064016106fb565b6001600160a01b038a8116911614915050979650505050505050565b610bb2610864611191565b610bce5760405162461bcd60e51b81526004016106fb9061199d565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6005805461055e906118d9565b610c2d611191565b6001600160a01b0316826001600160a01b031614610d2d576001600160a01b03821660009081526002602052604081208291610c67611191565b6001600160a01b03166001600160a01b03168152602001908152602001600020541015610cd65760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03821660009081526002602052604081208291610cf8611191565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610d279190611a3a565b90915550505b6001600160a01b038216600090815260016020526040902054811115610d955760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b03821660009081526001602052604081208054839290610dbd908490611a3a565b9250508190555080600080828254610dd59190611a3a565b90915550506040518181526001600160a01b038316907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59060200160405180910390a25050565b610e27610864611191565b610e435760405162461bcd60e51b81526004016106fb9061199d565b610a50610e4e611191565b82610950565b610e5f610864611191565b610e7b5760405162461bcd60e51b81526004016106fb9061199d565b6007805460ff19169055565b6000610e9b610e94611191565b84846108dc565b9392505050565b60075460ff1615610f0057610eb8610864611191565b610f005760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b42841015610f505760405162461bcd60e51b815260206004820152601d60248201527f636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e6500000060448201526064016106fb565b6040805180820182526002815261190160f01b6020808301919091526001600160a01b038a166000908152600890915291822080547f0000000000000000000000000000000000000000000000000000000000000000917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c9188610fd983611a4d565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161103d93929190611a66565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa1580156110a8573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906110de5750886001600160a01b0316816001600160a01b0316145b61112a5760405162461bcd60e51b815260206004820152601e60248201527f636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e6174757265000060448201526064016106fb565b6001600160a01b038981166000818152600260209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b60003633301480156111a4575060348110155b1561122d57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e8811461121c5733935050505090565b5001516001600160a01b0316919050565b3391505090565b6001600160a01b038116600090815260086020526040812080549161125883611a4d565b919050555050565b6000306001600160a01b0384160361127a5750600161066c565b6004546001600160a01b03908116908416036112985750600161066c565b6003546001600160a01b03166112b05750600061066c565b60035460405163b700961360e01b81526001600160a01b0385811660048301523060248301526001600160e01b0319851660448301529091169063b700961390606401602060405180830381865afa158015611310573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113349190611a8d565b905061066c565b6000611345611191565b6001600160a01b0316846001600160a01b031614611445576001600160a01b0384166000908152600260205260408120839161137f611191565b6001600160a01b03166001600160a01b031681526020019081526020016000205410156113ee5760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03841660009081526002602052604081208391611410611191565b6001600160a01b03166001600160a01b03168152602001908152602001600020600082825461143f9190611a3a565b90915550505b6001600160a01b0384166000908152600160205260409020548211156114ad5760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b038416600090815260016020526040812080548492906114d5908490611a3a565b90915550506001600160a01b038316600090815260016020526040812080548492906115029084906119e1565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161154e91815260200190565b60405180910390a35060019392505050565b60005b8381101561157b578181015183820152602001611563565b50506000910152565b6000815180845261159c816020860160208601611560565b601f01601f19169290920160200192915050565b602081526000610e9b6020830184611584565b6001600160a01b0381168114610a5057600080fd5b600080604083850312156115eb57600080fd5b82356115f6816115c3565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261162b57600080fd5b813567ffffffffffffffff81111561164557611645611604565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561167457611674611604565b60405281815283820160200185101561168c57600080fd5b816020850160208301376000918101602001919091529392505050565b803560ff811681146116ba57600080fd5b919050565b600080600080600060a086880312156116d757600080fd5b85356116e2816115c3565b9450602086013567ffffffffffffffff8111156116fe57600080fd5b61170a8882890161161a565b9450506040860135925060608601359150611727608087016116a9565b90509295509295909350565b60006020828403121561174557600080fd5b8135610e9b816115c3565b60008060006060848603121561176557600080fd5b8335611770816115c3565b92506020840135611780816115c3565b929592945050506040919091013590565b6000602082840312156117a357600080fd5b5035919050565b600080600080600080600060e0888a0312156117c557600080fd5b87356117d0816115c3565b96506020880135955060408801359450606088013567ffffffffffffffff8111156117fa57600080fd5b6118068a828b0161161a565b9450506080880135925060a0880135915061182360c089016116a9565b905092959891949750929550565b600080600080600080600060e0888a03121561184c57600080fd5b8735611857816115c3565b96506020880135611867816115c3565b95506040880135945060608801359350611883608089016116a9565b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156118b357600080fd5b82356118be816115c3565b915060208301356118ce816115c3565b809150509250929050565b600181811c908216806118ed57607f821691505b60208210810361190d57634e487b7160e01b600052602260045260246000fd5b50919050565b60008451611925818460208901611560565b919091019283525060601b6bffffffffffffffffffffffff19166020820152603401919050565b6000825161195e818460208701611560565b9190910192915050565b6001600160a01b0384811682528316602082015260606040820181905260009061199490830184611584565b95945050505050565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561066c5761066c6119cb565b8481526bffffffffffffffffffffffff198460601b16602082015282603482015260008251611a2a816054850160208701611560565b9190910160540195945050505050565b8181038181111561066c5761066c6119cb565b600060018201611a5f57611a5f6119cb565b5060010190565b60008451611a78818460208901611560565b91909101928352506020820152604001919050565b600060208284031215611a9f57600080fd5b81518015158114610e9b57600080fdfea264697066735822122090928a66070125904780390eb49d45fe12c136aec641b1db69316e0ffefc6da764736f6c634300081b0033",Db=n=>n.length>1,Pn=class extends yi{constructor(...e){Db(e)?super(...e):super(Ru,s6,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 Y.Interface(Ru)}static connect(e,t){return new ue(e,Ru,t)}};me(Pn,"bytecode",s6),me(Pn,"abi",Ru);var Cr;(function(n){n.TokenClient="TokenClient",n.TokenLockingClient="TokenLockingClient"})(Cr||(Cr={}));var Nn;(function(n){n.Colony="Colony",n.ColonyLegacy="ColonyLegacy",n.Erc20="Erc20",n.Erc2612="Erc2612",n.Sai="Sai"})(Nn||(Nn={}));var{AddressZero:Lb}=ht;async function Ub(n){try{await n.authority();return}catch{throw new Error("Token can not be assigned a TokenAuthority")}}var Vb=async(n,e)=>{let t,a=!0,i=!0;t=Pn.connect(n,e);try{await t.totalSupply()}catch(r){throw new Error(`Token is probably not a valid ERC20 token, got ${r.message}`)}try{await t.locked(),await Ub(t)}catch{a=!1}try{await t.nonces(Lb)}catch{i=!1}return a?t.tokenClientType=Nn.Colony:i?(t=vn.connect(n,e),t.tokenClientType=Nn.Erc2612):(t=Tn.connect(n,e),t.tokenClientType=Nn.Erc20),t.clientType=Cr.TokenClient,t},up=Vb;var{AddressZero:dp}=ht,Hb=Tn.connect(dp,new Da.BaseProvider(3656691)).interface,qb=Ei.connect(dp,new Da.BaseProvider(3656691)).interface,Gb=vn.connect(dp,new Da.BaseProvider(3656691)).interface;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:"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:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{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:"returnData",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:"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:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"}],Ps=class{static createInterface(){return new Y.Interface(lp)}static connect(e,t){return new ue(e,lp,t)}};Ps.abi=lp;var pp=[{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:"returnData",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"}],Ns=class{static createInterface(){return new Y.Interface(pp)}static connect(e,t){return new ue(e,pp,t)}};Ns.abi=pp;var yp=[{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:!1,internalType:"address",name:"bridgeAddress",type:"address"}],name:"BridgeSet",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:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateSentToBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateStoredFromBridge",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:"uint256",name:"skillId",type:"uint256"}],name:"SkillAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillCreationStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillStoredFromBridge",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:[{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"address",name:"_resolver",type:"address"}],name:"addColonyVersion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_resolver",type:"address"}],name:"addExtensionToNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"addPendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPendingSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"addReputationUpdateLogFromBridge",outputs:[],stateMutability:"nonpayable",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:"_parentSkillId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"addSkillFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",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:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"chainId",type:"uint256"}],name:"bridgeCurrentRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"bridgePendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"skillId",type:"uint256"}],name:"bridgeSkillIfNotMiningChain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"burnUnneededRewards",outputs:[],stateMutability:"nonpayable",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:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"}],name:"claimMiningReward",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:"address",name:"_tokenAddress",type:"address"}],name:"createMetaColony",outputs:[],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:"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:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateExtension",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:"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:"returnData",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"getBridgedReputationUpdateCount",outputs:[{internalType:"uint256",name:"bridgedReputationCount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"}],name:"getBridgedSkillCounts",outputs:[{internalType:"uint256",name:"skillCount",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:"uint256",name:"_id",type:"uint256"}],name:"getColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyBridgeAddress",outputs:[{internalType:"address",name:"bridge",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCreationSalt",outputs:[{internalType:"bytes32",name:"salt",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"}],name:"getColonyVersionResolver",outputs:[{internalType:"address",name:"_resolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentColonyVersion",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getENSRegistrar",outputs:[{internalType:"address",name:"_address",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:[{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:[],name:"getFeeInverse",outputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMetaColony",outputs:[{internalType:"address payable",name:"_colonyAddress",type:"address"}],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:"getMiningChainId",outputs:[{internalType:"uint256",name:"reputationMiningChainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"}],name:"getMiningDelegator",outputs:[{internalType:"address",name:"_delegator",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiningResolver",outputs:[{internalType:"address",name:"miningResolverAddress",type:"address"}],stateMutability:"view",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:"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:"address",name:"_token",type:"address"}],name:"getPayoutWhitelist",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"getPendingReputationUpdate",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:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.PendingReputationUpdate",name:"update",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"getPendingSkillAddition",outputs:[{internalType:"uint256",name:"parentId",type:"uint256"}],stateMutability:"view",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:"_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:[{internalType:"bool",name:"_active",type:"bool"}],name:"getReputationMiningCycle",outputs:[{internalType:"address",name:"_repMiningCycleAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningCycleReward",outputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningSkillId",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"view",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:"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_deprecated",type:"bool"}],internalType:"struct ColonyNetworkDataTypes.Skill",name:"_skill",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSkillCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTokenLocking",outputs:[{internalType:"address",name:"_lockingAddress",type:"address"}],stateMutability:"view",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:"miningChainId",type:"uint256"},{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"}],name:"initialiseReputationMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[{internalType:"uint256",name:"_rootLocalSkillId",type:"uint256"}],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:"address",name:"_colony",type:"address"}],name:"isColony",outputs:[{internalType:"bool",name:"_addressIsColony",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],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:"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:"_stakers",type:"address[]"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"punishStakers",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:"_username",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerUserLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_bridgeAddress",type:"address"}],name:"setColonyBridgeAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],name:"setFeeInverse",outputs:[],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:"_miningResolverAddress",type:"address"}],name:"setMiningResolver",outputs:[],stateMutability:"nonpayable",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:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",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:"uint256",name:"_amount",type:"uint256"}],name:"setReputationMiningCycleReward",outputs:[],stateMutability:"nonpayable",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:[{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"},{internalType:"uint256",name:"nonce",type:"uint256"}],name:"setReputationRootHashFromBridge",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:"address",name:"_tokenLockingAddress",type:"address"}],name:"setTokenLocking",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:"uint256",name:"_amount",type:"uint256"}],name:"stakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"startNextCycle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"startTokenAuction",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:"bytes32",name:"_extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"unstakeForMining",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:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"}],Ir=class{static createInterface(){return new Y.Interface(yp)}static connect(e,t){return new ue(e,yp,t)}};Ir.abi=yp;var Mi=class{constructor({contract:e,config:t,method:a,args:i,eventData:r,txConfig:s}){this.config=t,this.contract=e,this.method=a,this.args=i,this.eventData=r,this.txConfig=s}async getArgs(e){let t=[];return typeof this.args=="function"?t=await this.args():t=this.args,e&&t.push(e),t}async getTx(e){let t=await this.getArgs(e);return await this.contract.functions[this.method].apply(this.contract,t)}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.config.ipfs.getMetadataForEvent.bind(this.config.ipfs,ip[this.txConfig.metadataType],t.metadata);return[t,e,a]}return[t,e]}return[{},e]}async broadcastMetaTx(e){let{provider:t}=this.config.getSigner();if(!t)throw new Error("No provider found");let i=await(await fetch(`${this.config.metaTxBroadcasterEndpoint}/broadcast`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();if(i.status!=="success")throw new Error(`Could not send Metatransaction. Reason given: ${i.data.reason}`);if(!i.data?.txHash)throw new Error("Could not get transaction hash from broadcaster response");return t.getTransaction(i.data.txHash)}async waitForMetaTx(e){let t=await e.wait();return t.parsedLogs=Dl(t.logs,this.contract.interface),t}tx(){return{send:async e=>{let t=await this.getTx(e);return[t,this.getMined.bind(this,t)]},mined:async e=>{let t=await this.getTx(e);return this.getMined(t)},encode:async()=>{let e=await this.getArgs();return this.contract.interface.encodeFunctionData(this.method,e)}}}};var{arrayify:Kb,solidityKeccak256:Wb,splitSignature:Jb}=Y,Ci=class extends Mi{async sendMetaTransaction(e,t){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let a=this.config.getSigner(),{provider:i}=a;if(!i)throw new Error("No provider found");let r;this.config.network===ba.Custom?r=1:r=(await i.getNetwork()).chainId;let s=await a.getAddress(),o=await this.contract.functions.getMetatransactionNonce(s),l=Wb(["uint256","address","uint256","bytes"],[o.toString(),t,r,e]),p=Kb(l),f=await a.signMessage(p),{r:b,s:M,v:k}=Jb(f),v={target:t,payload:e,userAddress:s,r:b,s:M,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=(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}},Pu=(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=ve.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 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"}],Ii=class{static createInterface(){return new Y.Interface(fp)}static connect(e,t){return new ue(e,fp,t)}};Ii.abi=fp;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"}],Si=class{static createInterface(){return new Y.Interface(cp)}static connect(e,t){return new ue(e,cp,t)}};Si.abi=cp;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"}],Ri=class{static createInterface(){return new Y.Interface(mp)}static connect(e,t){return new ue(e,mp,t)}};Ri.abi=mp;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:[],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(hp)}static connect(e,t){return new ue(e,hp,t)}};Pi.abi=hp;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:[{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(xp)}static connect(e,t){return new ue(e,xp,t)}};Ni.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:[{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(bp)}static connect(e,t){return new ue(e,bp,t)}};Di.abi=bp;var{AddressZero:t1}=ht,Dn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Oa(Dn.extensionType),e.address);if(t===t1)throw new Error(`${Dn.extensionType} extension is not installed for this Colony`);let a=await _r(t,e.config.signerOrProvider);if(!Ti(Dn.extensionType,a,e.version))throw new Error(`Version ${a} of the ${Dn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Dn.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${Dn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new Dn(e,r,a)}static getLatestSupportedVersion(){return Dn.supportedVersions[Dn.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||ve.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]),M=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),[C,D]=await Zn(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[vt.Administration,vt.Funding]);return[k,v,C,D,f,M,b,s,ve.SkillIgnore]},async k=>({...ee("OneTxPaymentMade",k)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Oa(ke.OneTxPayment),t],async a=>({...ee("ExtensionUpgraded",a)}))}},La=Dn;La.supportedVersions=[{version:3,factory:Pi},{version:4,factory:Ni},{version:5,factory:Di}],La.extensionType=ke.OneTxPayment;var On=class{constructor(e,t){typeof t=="string"?this.tokenClient=Tn.connect(t,e.config.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=>({...ee("Transfer",a)}))}transferFrom(e,t,a){return this.colonyNetwork.createTxCreator(this.tokenClient,"transferFrom",[e,t,a],async i=>({...ee("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=>({...ee("Approval",a)}))}};var Ds=class extends On{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=Pn.connect(a,t.config.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=>({...ee("LogSetAuthority",a)}))}setOwner(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setOwner",[t],async a=>({...ee("LogSetOwner",a)}))}};var Os=class extends On{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=vn.connect(a,t.config.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=>({...ee("Approval",i)}))}};var u6=async(n,e)=>{let t=await up(e,n.config.signerOrProvider);switch(t.tokenClientType){case Nn.Colony:return new Ds(n,t);case Nn.Erc20:return new On(n,t);case Nn.Erc2612:return new Os(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"}],Oi=class{static createInterface(){return new Y.Interface(gp)}static connect(e,t){return new ue(e,gp,t)}};Oi.abi=gp;var Tp=[{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(Tp)}static connect(e,t){return new ue(e,Tp,t)}};Bi.abi=Tp;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:[{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(vp)}static connect(e,t){return new ue(e,vp,t)}};Fi.abi=vp;var{AddressZero:wp}=ht;var Nu=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===wp)throw new Error(`${Bn.extensionType} extension is not installed for this Colony`);let a=await _r(t,e.config.signerOrProvider);if(!Ti(Bn.extensionType,a,e.version))throw new Error(`Version ${a} of the ${Bn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Bn.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${Bn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new Bn(e,r,a)}static getLatestSupportedVersion(){return Bn.supportedVersions[Bn.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=P.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 Y.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=>({...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:a,value:i,branchMask:r,siblings:s}=await ks(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),this.colony.reputation,this.votingReputationContract,e,wp,Cl);return[e,t,wp,Cl,a,i,r,s]},async t=>({...ee("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.config.ipfs.uploadMetadata(pt.Decision,t),[e,a]},async a=>({...ee("Annotation",a)}),{metadataType:pt.Decision})}approveStake(e,t=ve.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{...Pu("UserTokenApproved",a,i.getInternalTokenLockingContract().interface)}})}stakeMotion(e,t,a){let i=async()=>{let r=await this.colony.config.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(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 M=await this.getMinStake(o,t);if(P.from(a).lt(M))throw new Error(`The staked amount is too small. Please stake at least ${Pl(M)}`);let{domainId:k,rootHash:v}=await this.getMotion(e),[C,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,C,D,P.from(t),a,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 a=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.config.getSigner().getAddress(),{key:p,value:f,branchMask:b,siblings:M}=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,M]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"submitVote",a,async i=>({...ee("MotionVoteSubmitted",i)}))}revealVote(e,t){let a=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.config.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:M,value:k,branchMask:v,siblings:C}=p;return[e,f,P.from(b),M,k,v,C]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"revealVote",a,async i=>({...ee("MotionVoteRevealed",i)}))}escalateMotion(e,t){let a=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.config.getSigner().getAddress(),p=await gi(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),t,r),{key:f,value:b,branchMask:M,siblings:k}=await this.colony.reputation.getReputationWithProofs(o,l,s);return[e,t,p,f,b,M,k]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"escalateMotion",a,async i=>({...ee("MotionEscalated",i)}))}finalizeMotion(e){let t=async()=>{let a=await this.votingReputationContract.getMotionState(e);if(a!==zt.Finalizable)throw new Error(`Motion cannot be finalized. It's currently in "${zt[a]}" state`);return[e]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"finalizeMotion",t,async a=>({...ee("MotionFinalized",a)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Oa(ke.VotingReputation),t],async a=>({...ee("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}}},Ua=Bn;Ua.supportedVersions=[{version:7,factory:Oi},{version:8,factory:Bi},{version:9,factory:Fi}],Ua.extensionType=ke.VotingReputation;var r1={["motion"]:Ua,["oneTx"]:La},Rr=class{static async connect(e,t){let a=await _r(t,e.config.signerOrProvider),i=Rr.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.config.signerOrProvider),s=await r.getToken(),o=await u6(e,s),l=new Rr(e,r,o,a);return await l.updateExtensions(),l}static getLatestSupportedVersion(){return Rr.supportedVersions[Rr.supportedVersions.length-1].version}constructor(e,t,a,i){this.colony=t,this.colonyNetwork=e,this.config=e.config,this.address=t.address,this.ext={},this.reputation=new ea(e.getInternalNetworkContract(),t,{customEndpointUrl:e.config.reputationOracleEndpoint}),this.token=a,this.version=i}createColonyTxCreator(e,t,a,i,r){return new Sr({colony:this,config:this.colonyNetwork.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createPermissionedColonyTxCreator(e,t,a,i,r,s){return new Sr({colony:this,config:this.colonyNetwork.config,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 Ua.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}if(!this.ext.oneTx)try{this.ext.oneTx=await La.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.config.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.config.ipfs.uploadMetadata(pt.Domain,e),[ve.RootDomain,t]},{roles:vt.Architecture,domain:ve.RootDomain},async t=>({...ee("DomainAdded",t),...ee("FundingPotAdded",t),...ee("DomainMetadata",t)}),{metadataType:pt.Domain}):this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256)",[ve.RootDomain],{roles:vt.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.config.ipfs.uploadMetadata(pt.Domain,e),[ve.RootDomain,t]},{roles:vt.Architecture,domain:ve.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 a=>({...ee("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=>({...ee("ColonyFundsClaimed",a)}))}moveFundsToTeam(e,t,a,i){let r=ve.RootDomain,s=a||ve.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(),M=await gi(b,this.colony,r,s),k=await gi(b,this.colony,r,t),{fundingPotId:v}=await this.colony.getDomain(s),{fundingPotId:C}=await this.colony.getDomain(t);return[p,f,r,M,k,v,C,e,o]},async l=>({...ee("ColonyFundsMovedBetweenFundingPots",l)}))}async getReputation(e,t=ve.RootDomain,a=3){let{skillId:i}=await this.colony.getDomain(t);return this.reputation.getReputationFraction(i,e,void 0,a)}async getReputationPoints(e,t=ve.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=>({...ee("ArbitraryTransaction(address,address,bytes,bool)",a)}))}annotateTransaction(e,t){return this.createColonyTxCreator(this.colony,"annotateTransaction",async()=>{let a;return typeof t=="string"?a=t:a=await this.config.ipfs.uploadMetadata(pt.Annotation,t),[e,a]},async a=>({...ee("Annotation",a)}),{metadataType:pt.Annotation})}installExtension(e){let t=r1[e],a=t.getLatestSupportedVersion(),{extensionType:i}=t;if(!Ti(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",[Oa(i),t.getLatestSupportedVersion()],async s=>({...Pu("ExtensionInstalled",s,r.interface)}))}async getRoles(e,t=ve.RootDomain){let a=await this.colony.getUserRoles(e,t);return Xo(a)}setRoles(e,t,a=ve.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let i=await this.getRoles(e,a),r=Array.from(new Set([...i,...[].concat(t)])),s=Nl(r);return[e,a,s]},{roles:vt.Architecture,domain:a},async i=>({...ee("ColonyRoleSet",i),...ee("RecoveryRoleSet",i)}))}unsetRoles(e,t,a=ve.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let r=(await this.getRoles(e,a)).filter(o=>![].concat(t).includes(o)),s=Nl(r);return[e,a,s]},{roles:vt.Architecture,domain:a},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 a=[],i=await t.getTokenLocking();return e?a=[...e,i]:a=[i],[this.token.address,this.address,a]},async a=>({...ee("TokenAuthorityDeployed",a)}))}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 a=>({...ee("ColonyUpgraded",a)}))}awardReputation(e,t,a=ve.RootDomain){if(P.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=>({...ee("ArbitraryReputationUpdate",i)}))}smiteReputation(e,t,a=ve.RootDomain){if(P.from(t).lte(0))throw new Error("Reputation smite must be bigger than 0");return this.createPermissionedColonyTxCreator(this.colony,"emitDomainReputationPenalty",[a,e,P.from(0).sub(t)],{domain:a,roles:vt.Arbitration},async i=>({...ee("ArbitraryReputationUpdate",i)}))}},Bs=Rr;Bs.supportedVersions=[{version:11,factory:Ii},{version:12,factory:Si},{version:13,factory:Ri}];var{splitSignature:sR}=Y;var{namehash:AR}=Y,{AddressZero:ER}=ht;var u1=()=>{window.ethereum.request({method:"wallet_addEthereumChain",params:[{chainId:"0xa4b1",chainName:"Arbitrum One via Colony",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:[_s.ArbitrumOne],blockExplorerUrls:["https://arbiscan.io/"]}]})};document.querySelector("#add_rpc")?.addEventListener("click",u1);})(); +`)}static register(e,t){if(t||(t=e.locale),ux)try{let a=window;a._ethers&&a._ethers.wordlists&&(a._ethers.wordlists[t]||R(a._ethers.wordlists,t,e))}catch{}}};var dx="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo",Xr=null;function G0(n){if(Xr==null&&(Xr=dx.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),hn.check(n)!=="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"))throw Xr=null,new Error("BIP39 Wordlist for en (English) FAILED")}var zd=class extends hn{constructor(){super("en")}getWord(e){return G0(this),Xr[e]}getWordIndex(e){return G0(this),Xr.indexOf(e)}},Kd=new zd;hn.register(Kd);var ci={en:Kd};var z0="hdnode/5.7.0";var Yr=new A(z0),lx=P.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),px=ge("Bitcoin seed"),lr=2147483648;function W0(n){return(1<=256)throw new Error("Depth too large!");return K0(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 Ct(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 a=new Uint8Array(37);if(e&lr){if(!this.privateKey)throw new Error("cannot derive child of neutered node");a.set(B(this.privateKey),1),t&&(t+="'")}else a.set(B(this.publicKey));for(let b=24;b>=0;b-=8)a[33+(b>>3)]=e>>24-b&255;let i=B(pa($n.sha512,this.chainCode,a)),r=i.slice(0,32),s=i.slice(32),o=null,l=null;this.privateKey?o=Mo(P.from(r).add(this.privateKey).mod(lx)):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 Ct(dr,o,l,this.fingerprint,Mo(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=lr)throw new Error("invalid path index - "+r);a=a._derive(lr+s)}else if(r.match(/^[0-9]+$/)){let s=parseInt(r);if(s>=lr)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=B(e);if(a.length<16||a.length>64)throw new Error("invalid seed");let i=B(pa($n.sha512,px,a));return new Ct(dr,Mo(i.slice(0,32)),null,"0x00000000",Mo(i.slice(32)),0,0,t)}static fromMnemonic(e,t,a){return a=Wd(a),e=mi(pr(e,a),a),Ct._fromSeed(Jd(e,t),{phrase:e,path:"m",locale:a.locale})}static fromSeed(e){return Ct._fromSeed(e,null)}static fromExtendedKey(e){let t=la.decode(e);(t.length!==82||K0(t.slice(0,78))!==e)&&Yr.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");let a=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 Ct(dr,null,j(o),i,s,r,a,null);case"0x0488ade4":case"0x04358394 ":if(o[0]!==0)break;return new Ct(dr,j(o.slice(1)),null,i,s,r,a,null)}return Yr.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}};function Jd(n,e){e||(e="");let t=ge("mnemonic"+e,qt.NFKD);return fi(ge(n,qt.NFKD),t,2048,64,"sha512")}function pr(n,e){e=Wd(e),Yr.checkNormalize();let t=e.split(n);if(t.length%3!==0)throw new Error("invalid mnemonic");let a=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=W0(s);if((B(Xt(a.slice(0,r/8)))[0]&o)!==(a[a.length-1]&o))throw new Error("invalid checksum");return j(a.slice(0,r/8))}function mi(n,e){if(e=Wd(e),n=B(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]&yx(8-a)),a+=3);let i=n.length/4,r=B(Xt(n))[0]&W0(i);return t[t.length-1]<<=i,t[t.length-1]|=r>>8-i,e.join(t.map(s=>e.getWord(s)))}function J0(n,e){try{return pr(n,e),!0}catch{}return!1}function $0(n){return(typeof n!="number"||n<0||n>=lr||n%1)&&Yr.throwArgumentError("invalid account index","index",n),`m/44'/60'/${n}'/0/0`}var Q0="random/5.7.0";var $d=new A(Q0);function fx(){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 X0=fx(),Co=X0.crypto||X0.msCrypto;(!Co||!Co.getRandomValues)&&($d.warn("WARNING: Missing strong random number source"),Co={getRandomValues:function(n){return $d.throwError("no secure random source avaialble",A.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function Qn(n){(n<=0||n>1024||n%1||n!=n)&&$d.throwArgumentError("invalid length","length",n);let e=new Uint8Array(n);return Co.getRandomValues(e),B(e)}function Zr(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 Yd=wn(Xd());var Io="json-wallets/5.7.0";function fa(n){return typeof n=="string"&&n.substring(0,2)!=="0x"&&(n="0x"+n),B(n)}function yr(n,e){for(n=String(n);n.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),K=B(q.encrypt(i)),ye=le(de([F,K])),te={address:n.address.substring(2).toLowerCase(),id:Z0(M),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:j(b).substring(2)},ciphertext:j(K).substring(2),kdf:"scrypt",kdfparams:{salt:j(f).substring(2),n:k,dklen:32,p:C,r:v},mac:ye.substring(2)}};if(s){let ae=Qn(16),Re=new ca.default.Counter(ae),ie=new ca.default.ModeOfOperation.ctr(U,Re),we=B(ie.encrypt(s)),E=new Date,u=E.getUTCFullYear()+"-"+yr(E.getUTCMonth()+1,2)+"-"+yr(E.getUTCDate(),2)+"T"+yr(E.getUTCHours(),2)+"-"+yr(E.getUTCMinutes(),2)+"-"+yr(E.getUTCSeconds(),2)+".0Z";te["x-ethers"]={client:p,gethFilename:"UTC--"+u+"--"+te.address,mnemonicCounter:j(ae).substring(2),mnemonicCiphertext:j(we).substring(2),path:o,locale:l,version:"0.1"}}return JSON.stringify(te)})}function df(n,e,t){if(So(n)){t&&t(0);let a=el(n,e);return t&&t(1),Promise.resolve(a)}return Ro(n)?uf(n,e,t):Promise.reject(new Error("invalid JSON wallet"))}function lf(n,e){if(So(n))return el(n,e);if(Ro(n))return of(n,e);throw new Error("invalid JSON wallet")}var pf="wallet/5.7.0";var yf=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(f){try{p(a.next(f))}catch(b){s(b)}}function l(f){try{p(a.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},fr=new A(pf);function bx(n){return n!=null&&Z(n.privateKey,32)&&n.address!=null}function gx(n){let e=n.mnemonic;return e&&e.phrase}var Cn=class extends Gt{constructor(e,t){if(super(),bx(e)){let a=new cn(e.privateKey);if(R(this,"_signingKey",()=>a),R(this,"address",mn(this.publicKey)),this.address!==pe(e.address)&&fr.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),gx(e)){let i=e.mnemonic;R(this,"_mnemonic",()=>({phrase:i.phrase,path:i.path||ya,locale:i.locale||"en"}));let r=this.mnemonic,s=Ct.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 a=new cn(e);R(this,"_signingKey",()=>a)}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 Ce(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 a=this._signingKey().signDigest(le(Jr(t)));return Jr(t,a)})}signMessage(e){return yf(this,void 0,void 0,function*(){return Pr(this._signingKey().signDigest(Qi(e)))})}_signTypedData(e,t,a){return yf(this,void 0,void 0,function*(){let i=yield bt.resolveNames(e,t,a,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 Pr(this._signingKey().signDigest(bt.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={}),rl(this,e,t,a)}static createRandom(e){let t=Qn(16);e||(e={}),e.extraEntropy&&(t=B(Me(le(de([t,e.extraEntropy])),0,16)));let a=mi(t,e.locale);return Cn.fromMnemonic(a,e.path,e.locale)}static fromEncryptedJson(e,t,a){return df(e,t,a).then(i=>new Cn(i))}static fromEncryptedJsonSync(e,t){return new Cn(lf(e,t))}static fromMnemonic(e,t,a){return t||(t=ya),new Cn(Ct.fromMnemonic(e,null,a).derivePath(t))}};function ff(n,e){return li(Qi(n),e)}function cf(n,e,t,a){return li(bt.hash(n,e,t),a)}var Da={};Li(Da,{AlchemyProvider:()=>gr,AlchemyWebSocketProvider:()=>ps,AnkrProvider:()=>ys,BaseProvider:()=>Yn,CloudflareProvider:()=>fs,EtherscanProvider:()=>cs,FallbackProvider:()=>hs,Formatter:()=>J,InfuraProvider:()=>vr,InfuraWebSocketProvider:()=>bs,IpcProvider:()=>bl,JsonRpcBatchProvider:()=>Wo,JsonRpcProvider:()=>Yt,JsonRpcSigner:()=>xr,NodesmithProvider:()=>gs,PocketProvider:()=>Ts,Provider:()=>$t,Resolver:()=>hr,StaticJsonRpcProvider:()=>ls,UrlJsonRpcProvider:()=>It,Web3Provider:()=>vs,WebSocketProvider:()=>xa,getDefaultProvider:()=>Jo,getNetwork:()=>ts,isCommunityResourcable:()=>ul,isCommunityResource:()=>is,showThrottleMessage:()=>Xn});var mf="networks/5.7.1";var hf=new A(mf);function Tx(n){return n&&typeof n.renetwork=="function"}function ma(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 ma(t)},e}function Do(n,e){let t=function(a,i){return a.JsonRpcProvider?new a.JsonRpcProvider(n,e):null};return t.renetwork=function(a){return Do(n,a)},t}var xf={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:ma("homestead")},bf={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:ma("ropsten")},gf={chainId:63,name:"classicMordor",_defaultProvider:Do("https://www.ethercluster.com/mordor","classicMordor")},No={unspecified:{chainId:0,name:"unspecified"},homestead:xf,mainnet:xf,morden:{chainId:2,name:"morden"},ropsten:bf,testnet:bf,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:Do("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:gf,classicTestnet:gf,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:Do("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 ts(n){if(n==null)return null;if(typeof n=="number"){for(let a in No){let i=No[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=No[n];return a==null?null:{name:a.name,chainId:a.chainId,ensAddress:a.ensAddress,_defaultProvider:a._defaultProvider||null}}let e=No[n.name];if(!e)return typeof n.chainId!="number"&&hf.throwArgumentError("invalid network chainId","network",n),n;n.chainId!==0&&n.chainId!==e.chainId&&hf.throwArgumentError("network chainId mismatch","network",n);let t=n._defaultProvider||null;return t==null&&e._defaultProvider&&(Tx(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 Tf="web/5.7.1";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(f){try{p(a.next(f))}catch(b){s(b)}}function l(f){try{p(a.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})};function vf(n,e){return vx(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:B(new Uint8Array(i))}})}var wx=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(f){try{p(a.next(f))}catch(b){s(b)}}function l(f){try{p(a.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},In=new A(Tf);function wf(n){return new Promise(e=>{setTimeout(e,n)})}function Pa(n,e){if(n==null)return null;if(typeof n=="string")return n;if(ta(n)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return Jt(n)}catch{}return j(n)}return n}function _x(n){return ge(n.replace(/%([0-9a-f][0-9a-f])/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))}function sl(n,e,t){let a=typeof n=="object"&&n.throttleLimit!=null?n.throttleLimit:12;In.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;In.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"},f=!1,b=2*60*1e3;if(typeof n=="string")l=n;else if(typeof n=="object"){if((n==null||n.url==null)&&In.throwArgumentError("missing URL","connection.url",n),l=n.url,typeof n.timeout=="number"&&n.timeout>0&&(b=n.timeout),n.headers)for(let N in n.headers)o[N.toLowerCase()]={key:N,value:String(n.headers[N])},["if-none-match","if-modified-since"].indexOf(N.toLowerCase())>=0&&(f=!0);if(p.allowGzip=!!n.allowGzip,n.user!=null&&n.password!=null){l.substring(0,6)!=="https:"&&n.allowInsecureAuthentication!==!0&&In.throwError("basic authentication requires a secure https url",A.errors.INVALID_ARGUMENT,{argument:"url",url:l,user:n.user,password:"[REDACTED]"});let N=n.user+":"+n.password;o.authorization={key:"Authorization",value:"Basic "+$i(ge(N))}}n.skipFetchSetup!=null&&(p.skipFetchSetup=!!n.skipFetchSetup),n.fetchOptions!=null&&(p.fetchOptions=Te(n.fetchOptions))}let M=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),k=l?l.match(M):null;if(k)try{let N={statusCode:200,statusMessage:"OK",headers:{"content-type":k[1]||"text/plain"},body:k[2]?Ji(k[3]):_x(k[3])},F=N.body;return t&&(F=t(N.body,N)),Promise.resolve(F)}catch(N){In.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 C=function(){let N=null;return{promise:new Promise(function(G,q){b&&(N=setTimeout(()=>{N!=null&&(N=null,q(In.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 wx(this,void 0,void 0,function*(){for(let N=0;N=300)&&(C.cancel(),In.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 C.cancel(),G}catch(G){if(G.throttleRetry&&N{let o=null;if(r!=null)try{o=JSON.parse(Jt(r))}catch(l){In.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 n=="string"?{url:n}:Te(n);r.headers?Object.keys(r.headers).filter(o=>o.toLowerCase()==="content-type").length!==0||(r.headers=Te(r.headers),r.headers["content-type"]="application/json"):r.headers={"content-type":"application/json"},n=r}return sl(n,i,a)}function Rn(n,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,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(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()&&a(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()&&a(f)})}p()})}var yl=wn(Ef());var _e="providers/5.7.2";var as=new A(_e),J=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),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(a),maxPriorityFeePerGas:J.allowNull(a),maxFeePerGas:J.allowNull(a),gasLimit:a,to:J.allowNull(t,null),value:a,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(a),gasPrice:J.allowNull(a),maxPriorityFeePerGas:J.allowNull(a),maxFeePerGas:J.allowNull(a),to:J.allowNull(t),value:J.allowNull(a),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:a,logsBloom:J.allowNull(r),blockHash:s,transactionHash:s,logs:J.arrayOf(this.receiptLog.bind(this)),blockNumber:l,confirmations:J.allowNull(l,null),cumulativeGasUsed:a,effectiveGasPrice:J.allowNull(a),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:a,gasUsed:a,miner:J.allowNull(t),extraData:r,transactions:J.allowNull(J.arrayOf(s)),baseFeePerGas:J.allowNull(a)},e.blockWithTransactions=Te(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():as.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 pe(e)}callAddress(e){if(!Z(e,32))return null;let t=pe(Me(e,12));return t===Ys?null:t}contractAddress(e){return si(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 a=this.hex(e,t);return Pt(a)!==32?as.throwArgumentError("invalid hash","value",e):a}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 a=e._difficulty!=null?e._difficulty:e.difficulty,i=J.check(t,e);return i._difficulty=a==null?null:P.from(a),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 a=e.chainId;Z(a)&&(a=P.from(a).toNumber()),t.chainId=a}else{let a=e.networkId;a==null&&t.v==null&&(a=e.chainId),Z(a)&&(a=P.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 vo(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 a=P.from(t.root).toNumber();a===0||a===1?(t.status!=null&&t.status!==a&&as.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=a,delete t.root):as.throwArgumentError("invalid alt-root-status","value.root",t.root)}else t.root.length!==66&&as.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 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 ul(n){return n&&typeof n.isCommunityResource=="function"}function is(n){return ul(n)&&n.isCommunityResource()}var Mf=!1;function Xn(){Mf||(Mf=!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 re=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(f){try{p(a.next(f))}catch(b){s(b)}}function l(f){try{p(a.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},ce=new A(_e),Rx=10;function Cf(n){return n==null?"null":(Pt(n)!==32&&ce.throwArgumentError("invalid topic","topic",n),n.toLowerCase())}function If(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[Cf(i)]=!0});let a=Object.keys(t);return a.sort(),a.join("|")}else return Cf(e)}).join("&")}function Px(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 mr(n){if(typeof n=="string"){if(n=n.toLowerCase(),Pt(n)===32)return"tx:"+n;if(n.indexOf(":")===-1)return n}else{if(Array.isArray(n))return"filter:*:"+If(n);if(lo.isForkEvent(n))throw ce.warn("not implemented"),new Error("not implemented");if(n&&typeof n=="object")return"filter:"+(n.address||"*")+":"+If(n.topics||[])}throw new Error("invalid event - "+n)}function rs(){return new Date().getTime()}function Sf(n){return new Promise(e=>{setTimeout(e,n)})}var Nx=["block","network","pending","poll"],fl=class{constructor(e,t,a){R(this,"tag",e),R(this,"listener",t),R(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=Px(e[2]),i={};return a.length>0&&(i.topics=a),t&&t!=="*"&&(i.address=t),i}pollable(){return this.tag.indexOf(":")>=0||Nx.indexOf(this.tag)>=0}},Dx={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(n){return fe(P.from(n).toHexString(),32)}function Rf(n){return la.encode(de([n,Me(Xt(Xt(n)),0,4)]))}var Df=new RegExp("^(ipfs)://(.*)$","i"),Pf=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),Df,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Lo(n,e){try{return Jt(ss(n,e))}catch{}return null}function ss(n,e){if(n==="0x")return null;let t=P.from(Me(n,e,e+32)).toNumber(),a=P.from(Me(n,t,t+32)).toNumber();return Me(n,t+32,t+32+a)}function ll(n){return n.match(/^ipfs:\/\/ipfs\//i)?n=n.substring(12):n.match(/^ipfs:\/\//i)?n=n.substring(7):ce.throwArgumentError("unsupported IPFS format","link",n),`https://gateway.ipfs.io/ipfs/${n}`}function Nf(n){let e=B(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 Ox(n){if(n.length%32===0)return n;let e=new Uint8Array(Math.ceil(n.length/32)*32);return e.set(n),e}function Of(n){let e=[],t=0;for(let a=0;aP.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 re(this,void 0,void 0,function*(){let a={to:this.address,ccipReadEnabled:!0,data:_t([e,Ea(this.name),t||"0x"])},i=!1;(yield this.supportsWildcard())&&(i=!0,a.data=_t(["0x9061b923",Of([Gr(this.name),a.data])]));try{let r=yield this.provider.call(a);return B(r).length%32===4&&ce.throwError("resolver threw error",A.errors.CALL_EXCEPTION,{transaction:a,data:r}),i&&(r=ss(r,0)),r}catch(r){if(r.code===A.errors.CALL_EXCEPTION)return null;throw r}})}_fetchBytes(e,t){return re(this,void 0,void 0,function*(){let a=yield this._fetch(e,t);return a!=null?ss(a,0):null})}_getAddress(e,t){let a=Dx[String(e)];if(a==null&&ce.throwError(`unsupported coin type: ${e}`,A.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),a.ilk==="eth")return this.provider.formatter.address(t);let i=B(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 Rf(de([[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 Rf(de([[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=yl.default.toWords(i.slice(2));return o.unshift(s),yl.default.encode(a.prefix,o)}}return null}getAddress(e){return re(this,void 0,void 0,function*(){if(e==null&&(e=60),e===60)try{let i=yield this._fetch("0x3b3b57de");return i==="0x"||i===Ki?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 a=this._getAddress(e,t);return a==null&&ce.throwError("invalid or unsupported coin data",A.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:t}),a})}getAvatar(){return re(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 ce.throwError("invalid or unsupported content hash data",A.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return re(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 a=yield this._fetchBytes("0x59d1d43c",j(t));return a==null||a==="0x"?null:Jt(a)})}},pl=null,Bx=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 re(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 Rn(()=>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 ts(e??"homestead")}ccipReadFetch(e,t,a){return re(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}),b=yield Sn({url:p,errorPassThrough:!0},f,(k,v)=>(k.status=v.statusCode,k));if(b.data)return b.data;let M=b.message||"unknown error";if(b.status>=400&&b.status<500)return ce.throwError(`response not found during CCIP fetch: ${M}`,A.errors.SERVER_ERROR,{url:l,errorMessage:M});s.push(M)}return ce.throwError(`error encountered during CCIP fetch: ${s.map(o=>JSON.stringify(o)).join(", ")}`,A.errors.SERVER_ERROR,{urls:a,errorMessages:s})})}_getInternalBlockNumber(e){return re(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(rs()-r.respTime<=e)return r.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}let t=rs(),a=Ce({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=rs();return i=P.from(i).toNumber(),i{this._internalBlockNumber===a&&(this._internalBlockNumber=null)}),(yield a).blockNumber})}poll(){return re(this,void 0,void 0,function*(){let e=Bx++,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)ce.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${a})`),this.emit("error",ce.makeError("network block skew detected",A.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 re(this,void 0,void 0,function*(){return ce.throwError("provider does not support network detection",A.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return re(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 Sf(0),this._network;let a=ce.makeError("underlying network changed",A.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=rs();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 re(this,void 0,void 0,function*(){return this._waitForTransaction(e,t??1,a||0,null)})}_waitForTransaction(e,t,a,i){return re(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(M=>{M()}),!1)},b=M=>{M.confirmations{this.removeListener(e,b)}),i){let M=i.startBlock,k=null,v=C=>re(this,void 0,void 0,function*(){p||(yield Sf(1e3),this.getTransactionCount(i.from).then(D=>re(this,void 0,void 0,function*(){if(!p){if(D<=i.nonce)M=C;else{{let N=yield this.getTransaction(e);if(N&&N.blockNumber!=null)return}for(k==null&&(k=M-3,k{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 M=setTimeout(()=>{f()||o(ce.makeError("timeout exceeded",A.errors.TIMEOUT,{timeout:a}))},a);M.unref&&M.unref(),l.push(()=>{clearTimeout(M)})}})})}getBlockNumber(){return re(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return re(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 re(this,void 0,void 0,function*(){yield this.getNetwork();let a=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getBalance",a);try{return P.from(i)}catch(r){return ce.throwError("bad result from backend",A.errors.SERVER_ERROR,{method:"getBalance",params:a,result:i,error:r})}})}getTransactionCount(e,t){return re(this,void 0,void 0,function*(){yield this.getNetwork();let a=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getTransactionCount",a);try{return P.from(i).toNumber()}catch(r){return ce.throwError("bad result from backend",A.errors.SERVER_ERROR,{method:"getTransactionCount",params:a,result:i,error:r})}})}getCode(e,t){return re(this,void 0,void 0,function*(){yield this.getNetwork();let a=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getCode",a);try{return j(i)}catch(r){return ce.throwError("bad result from backend",A.errors.SERVER_ERROR,{method:"getCode",params:a,result:i,error:r})}})}getStorageAt(e,t,a){return re(this,void 0,void 0,function*(){yield this.getNetwork();let i=yield Ce({address:this._getAddress(e),blockTag:this._getBlockTag(a),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,a){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)=>re(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&&ce.throwError("transaction failed",A.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:l}),l)}),i}sendTransaction(e){return re(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Promise.resolve(e).then(r=>j(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 re(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?P.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?j(r):null))}),this.formatter.transactionRequest(yield Ce(a))})}_getFilter(e){return re(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 Ce(t))})}_call(e,t,a){return re(this,void 0,void 0,function*(){a>=Rx&&ce.throwError("CCIP read exceeded maximum redirections",A.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"&&Pt(r)%32===4)try{let s=Me(r,4),o=Me(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(Me(s,32,64)).toNumber(),f=P.from(Me(s,p,p+32)).toNumber(),b=Me(s,p+32);for(let N=0;Nre(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 re(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Rn(()=>re(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 re(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return Rn(()=>re(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 re(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Ce({filter:this._getFilter(e)}),a=yield this.perform("getLogs",t);return a.forEach(i=>{i.removed==null&&(i.removed=!1)}),J.arrayOf(this.formatter.filterLog.bind(this.formatter))(a)})}getEtherPrice(){return re(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return re(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 re(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 hr(this,a,e);return t!==e&&!(yield i.supportsWildcard())?null:i}t=t.split(".").slice(1).join(".")}})}_getResolver(e,t){return re(this,void 0,void 0,function*(){t==null&&(t="ENS");let a=yield this.getNetwork();a.ensAddress||ce.throwError("network does not support ENS",A.errors.UNSUPPORTED_OPERATION,{operation:t,network:a.name});try{let i=yield this.call({to:a.ensAddress,data:"0x0178b8bf"+Ea(e).substring(2)});return this.formatter.callAddress(i)}catch{}return null})}resolveName(e){return re(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(a){if(Z(e))throw a}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 re(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=Lo(yield this.call({to:a,data:"0x691f3431"+Ea(t).substring(2)}),0);return(yield this.resolveName(i))!=e?null:i})}getAvatar(e){return re(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=Lo(yield this.call({to:s,data:"0x691f3431"+Ea(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 a=yield t.getAvatar();return a==null?null:a.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,a){let i=new fl(mr(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=mr(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=mr(e);return this._events.filter(a=>a.tag===t).length}listeners(e){if(e==null)return this._events.map(a=>a.listener);let t=mr(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=mr(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=mr(e);this._events=this._events.filter(i=>i.tag!==a?!0:(t.push(i),!1))}return t.forEach(a=>{this._stopEvent(a)}),this}};var ha=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(f){try{p(a.next(f))}catch(b){s(b)}}function l(f){try{p(a.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},At=new A(_e),Fx=["call","estimateGas"];function us(n,e){if(n==null)return null;if(typeof n.message=="string"&&n.message.match("reverted")){let t=Z(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=us(n[t],e);if(a)return a}return null}if(typeof n=="string")try{return us(JSON.parse(n),e)}catch{}return null}function Ff(n,e,t){let a=t.transaction||t.signedTransaction;if(n==="call"){let r=us(e,!0);if(r)return r.data;At.throwError("missing revert data in call exception; Transaction reverted without a reason string",A.errors.CALL_EXCEPTION,{data:"0x",transaction:a,error:e})}if(n==="estimateGas"){let r=us(e.body,!1);r==null&&(r=us(e,!1)),r&&At.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",A.errors.UNPREDICTABLE_GAS_LIMIT,{reason:r.message,method:n,transaction:a,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)&&At.throwError("insufficient funds for intrinsic transaction cost",A.errors.INSUFFICIENT_FUNDS,{error:e,method:n,transaction:a}),i.match(/nonce (is )?too low/i)&&At.throwError("nonce has already been used",A.errors.NONCE_EXPIRED,{error:e,method:n,transaction:a}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&At.throwError("replacement fee too low",A.errors.REPLACEMENT_UNDERPRICED,{error:e,method:n,transaction:a}),i.match(/only replay-protected/i)&&At.throwError("legacy pre-eip-155 transactions not supported",A.errors.UNSUPPORTED_OPERATION,{error:e,method:n,transaction:a}),Fx.indexOf(n)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&At.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",A.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:n,transaction:a}),e}function Bf(n){return new Promise(function(e){setTimeout(e,n)})}function Lx(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 os(n){return n&&n.toLowerCase()}var cl={},xr=class extends Gt{constructor(e,t,a){if(super(),e!==cl)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");R(this,"provider",t),a==null&&(a=0),typeof a=="string"?(R(this,"_address",this.provider.formatter.address(a)),R(this,"_index",null)):typeof a=="number"?(R(this,"_index",a),R(this,"_address",null)):At.throwArgumentError("invalid address or index","addressOrIndex",a)}connect(e){return At.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&&At.throwError("unknown account #"+this._index,A.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=Te(e);let t=this.getAddress().then(a=>(a&&(a=a.toLowerCase()),a));if(e.gasLimit==null){let a=Te(e);a.from=t,e.gasLimit=this.provider.estimateGas(a)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(a=>ha(this,void 0,void 0,function*(){if(a==null)return null;let i=yield this.provider.resolveName(a);return i==null&&At.throwArgumentError("provided ENS name resolves to null","tx.to",a),i}))),Ce({tx:Ce(e),sender:t}).then(({tx:a,sender:i})=>{a.from!=null?a.from.toLowerCase()!==i&&At.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)&&At.throwError("user rejected transaction",A.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:a}),Ff("sendTransaction",s,r)))})}signTransaction(e){return At.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),a=yield this.sendUncheckedTransaction(e);try{return yield Rn(()=>ha(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 ha(this,void 0,void 0,function*(){let t=typeof e=="string"?ge(e):e,a=yield this.getAddress();try{return yield this.provider.send("personal_sign",[j(t),a.toLowerCase()])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&At.throwError("user rejected signing",A.errors.ACTION_REJECTED,{action:"signMessage",from:a,messageData:e}),i}})}_legacySignMessage(e){return ha(this,void 0,void 0,function*(){let t=typeof e=="string"?ge(e):e,a=yield this.getAddress();try{return yield this.provider.send("eth_sign",[a.toLowerCase(),j(t)])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&At.throwError("user rejected signing",A.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:a,messageData:e}),i}})}_signTypedData(e,t,a){return ha(this,void 0,void 0,function*(){let i=yield bt.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(bt.getPayload(i.domain,t,i.value))])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&At.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,a=yield this.getAddress();return t.send("personal_unlockAccount",[a.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:a=>this.provider.waitForTransaction(t,a)}))}},Ux={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 a=t;a==null&&(a=new Promise((i,r)=>{setTimeout(()=>{this.detectNetwork().then(s=>{i(s)},s=>{r(s)})},0)})),super(a),e||(e=mt(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 ha(this,void 0,void 0,function*(){yield Bf(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(a){return At.throwError("could not detect network",A.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:a})}}return At.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 a={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:ct(a),provider:this});let i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];let r=Sn(this.connection,JSON.stringify(a),Lx).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",[os(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[os(t.address),t.blockTag]];case"getCode":return["eth_getCode",[os(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[os(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 a=mt(this.constructor,"hexlifyTransaction");return["eth_call",[a(t.transaction,{from:!0}),t.blockTag]]}case"estimateGas":{let a=mt(this.constructor,"hexlifyTransaction");return["eth_estimateGas",[a(t.transaction,{from:!0})]]}case"getLogs":return t.filter&&t.filter.address!=null&&(t.filter.address=os(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=Te(t),t.transaction=Te(i),delete t.transaction.type)}}let a=this.prepareRequest(e,t);a==null&&At.throwError(e+" not implemented",A.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 Bf(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=Te(Ux);if(t)for(let r in t)t[r]&&(a[r]=!0);ji(e,a);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(_e);br=function(){e.throwError("WebSockets not supported in this environment",A.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var hl=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(f){try{p(a.next(f))}catch(b){s(b)}}function l(f){try{p(a.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Uo=new A(_e),Vx=1,xa=class extends Yt{constructor(e,t){t==="any"&&Uo.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 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){Uo.throwError("cannot reset events block on WebSocketProvider",A.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(e){Uo.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||Uo.throwError("cannot set polling on WebSocketProvider",A.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(e,t){let a=Vx++;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 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:a}})}_startEvent(e){switch(e.type){case"block":this._subscribe("block",["newHeads"],t=>{let a=P.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 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 jx=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(f){try{p(a.next(f))}catch(b){s(b)}}function l(f){try{p(a.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},ds=new A(_e),ls=class extends Yt{detectNetwork(){let e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return jx(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",A.errors.UNKNOWN_ERROR,{}),this._network==null&&(R(this,"_network",t),this.emit("network",t,null))),t})}},It=class extends ls{constructor(e,t){ds.checkAbstract(new.target,It),e=mt(new.target,"getNetwork")(e),t=mt(new.target,"getApiKey")(t);let a=mt(new.target,"getUrl")(e,t);super(a,e),typeof t=="string"?R(this,"apiKey",t):t!=null&&Object.keys(t).forEach(i=>{R(this,i,t[i])})}_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",A.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",A.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}};var Lf=new A(_e),Vo="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC",ps=class extends xa{constructor(e,t){let a=new gr(e,t),i=a.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi.");super(i,a.network),R(this,"apiKey",a.apiKey)}isCommunityResource(){return this.apiKey===Vo}},gr=class extends It{static getWebSocketProvider(e,t){return new ps(e,t)}static getApiKey(e){return e==null?Vo:(e&&typeof e!="string"&&Lf.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:Lf.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+a+t,throttleCallback:(i,r)=>(t===Vo&&Xn(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===Vo}};var Hx=new A(_e),jo="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function qx(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 Hx.throwArgumentError("unsupported network","name",n)}var ys=class extends It{isCommunityResource(){return this.apiKey===jo}static getApiKey(e){return e??jo}static getUrl(e,t){t==null&&(t=jo);let a={allowGzip:!0,url:"https://"+qx(e.name)+t,throttleCallback:(i,r)=>(t.apiKey===jo&&Xn(),Promise.resolve(!0))};return t.projectSecret!=null&&(a.user="",a.password=t.projectSecret),a}};var Gx=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(f){try{p(a.next(f))}catch(b){s(b)}}function l(f){try{p(a.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Uf=new A(_e),fs=class extends It{static getApiKey(e){return e!=null&&Uf.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:Uf.throwArgumentError("unsupported network","network",arguments[0])}return a}perform(e,t){let a=Object.create(null,{perform:{get:()=>super.perform}});return Gx(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 Ho=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(f){try{p(a.next(f))}catch(b){s(b)}}function l(f){try{p(a.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Na=new A(_e);function Vf(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=Fn(j(a)):t==="accessList"?a="["+sn(a).map(i=>`{address:"${i.address}",storageKeys:["${i.storageKeys.join('","')}"]}`).join(",")+"]":a=j(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 jf(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 Hf(n){if(n==="pending")throw new Error("pending not supported");return n==="latest"?n:parseInt(n.substring(2),16)}function xl(n,e,t){if(n==="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 a=e.message;throw e.code===A.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/)&&Na.throwError("insufficient funds for intrinsic transaction cost",A.errors.INSUFFICIENT_FUNDS,{error:e,method:n,transaction:t}),a.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:n,transaction:t}),a.match(/another transaction with same nonce/)&&Na.throwError("replacement fee too low",A.errors.REPLACEMENT_UNDERPRICED,{error:e,method:n,transaction:t}),a.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:n,transaction:t}),e}var cs=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 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 Ho(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"?jf:zx;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 Sn(o,l,s||jf);return this.emit("debug",{action:"response",request:i,response:ct(p),provider:this}),p})}detectNetwork(){return Ho(this,void 0,void 0,function*(){return this.network})}perform(e,t){let a=Object.create(null,{perform:{get:()=>super.perform}});return Ho(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=Vf(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=Vf(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=Hf(t.filter.fromBlock)),t.filter.toBlock&&(i.toBlock=Hf(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 zo=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(f){try{p(a.next(f))}catch(b){s(b)}}function l(f){try{p(a.throw(f))}catch(b){s(b)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},hi=new A(_e);function qo(){return new Date().getTime()}function qf(n){let e=null;for(let t=0;te?null:(a+i)/2}function Tr(n){if(n===null)return"null";if(typeof n=="number"||typeof n=="boolean")return JSON.stringify(n);if(typeof n=="string")return n;if(P.isBigNumber(n))return n.toString();if(Array.isArray(n))return JSON.stringify(n.map(e=>Tr(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=Tr(a),JSON.stringify(t)+":"+a}).join(",")+"}"}throw new Error("unknown value type: "+typeof n)}var Kx=1;function zf(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=[A.errors.CALL_EXCEPTION,A.errors.INSUFFICIENT_FUNDS,A.errors.NONCE_EXPIRED,A.errors.REPLACEMENT_UNDERPRICED,A.errors.UNPREDICTABLE_GAS_LIMIT],Jx=["address","args","errorArgs","errorSignature","method","transaction"];function Go(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 $x(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 Qx(n,e,t){let a=Tr;switch(e){case"getBlockNumber":return function(i){let r=i.map(o=>o.result),s=Gf(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 Gf(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=Te(i),i.confirmations=-1,Tr(i))};break;case"getBlock":t.includeTransactions?a=function(i){return i==null?null:(i=Te(i),i.transactions=i.transactions.map(r=>(r=Te(r),r.confirmations=-1,r)),Tr(i))}:a=function(i){return i==null?null:Tr(i)};break;default:throw new Error("unknown method: "+e)}return $x(a,n.quorum)}function ms(n,e){return zo(this,void 0,void 0,function*(){let t=n.provider;return t.blockNumber!=null&&t.blockNumber>=e||e===-1?t:Rn(()=>new Promise((a,i)=>{setTimeout(function(){return t.blockNumber>=e?a(t):n.cancelled?a(null):a(void 0)},0)}),{oncePoll:t})})}function Xx(n,e,t,a){return zo(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&&Z(a.blockTag)&&(i=yield ms(n,e)),i[t](a.address,a.blockTag||"latest");case"getStorageAt":return a.blockTag&&Z(a.blockTag)&&(i=yield ms(n,e)),i.getStorageAt(a.address,a.position,a.blockTag||"latest");case"getBlock":return a.blockTag&&Z(a.blockTag)&&(i=yield ms(n,e)),i[a.includeTransactions?"getBlockWithTransactions":"getBlock"](a.blockTag||a.blockHash);case"call":case"estimateGas":return a.blockTag&&Z(a.blockTag)&&(i=yield ms(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&&Z(r.fromBlock)||r.toBlock&&Z(r.toBlock))&&(i=yield ms(n,e)),i.getLogs(r)}}return hi.throwError("unknown method error",A.errors.UNKNOWN_ERROR,{method:t,params:a})})}var hs=class extends Yn{constructor(e,t){e.length===0&&hi.throwArgumentError("missing providers","providers",e);let a=e.map((s,o)=>{if($t.isProvider(s)){let f=is(s)?2e3:750;return Object.freeze({provider:s,weight:1,stallTimeout:f,priority:1})}let l=Te(s);l.priority==null&&(l.priority=1),l.stallTimeout==null&&(l.stallTimeout=is(s)?2e3:750),l.weight==null&&(l.weight=1);let p=l.weight;return(p%1||p>512||p<1)&&hi.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&&hi.throwArgumentError("quorum will always fail; larger than total weight","quorum",t);let r=qf(a.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(a)),R(this,"quorum",t),this._highestBlockNumber=-1}detectNetwork(){return zo(this,void 0,void 0,function*(){let e=yield Promise.all(this.providerConfigs.map(t=>t.provider.getNetwork()));return qf(e)})}perform(e,t){return zo(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(k=>k.runner&&l-k.startk+v.weight,0);for(;p{k.staller=null}),k.runner=Xx(k,r,e,t).then(C=>{k.done=!0,k.result=C,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Go(k,qo()),request:{method:e,params:ct(t)},provider:this})},C=>{k.done=!0,k.error=C,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Go(k,qo()),request:{method:e,params:ct(t)},provider:this})}),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Go(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=a(b);if(k!==void 0)return i.forEach(v=>{v.staller&&v.staller.cancel(),v.cancelled=!0}),k;o||(yield zf(100).getPromise()),o=!1}let M=i.reduce((k,v)=>{if(!v.done||v.error==null)return k;let C=v.error.code;return Wx.indexOf(C)>=0&&(k[C]||(k[C]={error:v.error,weight:0}),k[C].weight+=v.weight),k},{});if(Object.keys(M).forEach(k=>{let v=M[k];if(v.weight{N.staller&&N.staller.cancel(),N.cancelled=!0});let C=v.error,D={};Jx.forEach(N=>{C[N]!=null&&(D[N]=C[N])}),hi.throwError(C.reason||C.message,k,D)}),i.filter(k=>!k.done).length===0)break}return i.forEach(l=>{l.staller&&l.staller.cancel(),l.cancelled=!0}),hi.throwError("failed to meet quorum",A.errors.SERVER_ERROR,{method:e,params:t,results:i.map(l=>Go(l)),provider:this})})}};var bl=null;var Ko=new A(_e),xs="84842078b09946638c03157f83405213",bs=class extends xa{constructor(e,t){let a=new vr(e,t),i=a.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",a.projectId),R(this,"projectId",a.projectId),R(this,"projectSecret",a.projectSecret)}isCommunityResource(){return this.projectId===xs}},vr=class extends It{static getWebSocketProvider(e,t){return new bs(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?(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 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:Ko.throwError("unsupported network",A.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let i={allowGzip:!0,url:"https://"+a+"/v3/"+t.projectId,throttleCallback:(r,s)=>(t.projectId===xs&&Xn(),Promise.resolve(!0))};return t.projectSecret!=null&&(i.user="",i.password=t.projectSecret),i}isCommunityResource(){return this.projectId===xs}};var Wo=class extends Yt{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:ct(o),provider:this}),Sn(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 M=new Error(b.error.message);M.code=b.error.code,M.data=b.error.data,p.reject(M)}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(_e),Yx="ETHERS_JS_SHARED",gs=class extends It{static getApiKey(e){return e&&typeof e!="string"&&gl.throwArgumentError("invalid apiKey","apiKey",e),e||Yx}static getUrl(e,t){gl.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:gl.throwArgumentError("unsupported network","network",arguments[0])}return a+"?apiKey="+t}};var Kf=new A(_e),Wf="62e1ad51b37b8e00394bda3b",Ts=class extends It{static getApiKey(e){let t={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return e==null?t.applicationId=Wf:typeof e=="string"?t.applicationId=e:e.applicationSecretKey!=null?(t.applicationId=e.applicationId,t.applicationSecretKey=e.applicationSecretKey):e.applicationId?t.applicationId=e.applicationId:Kf.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:Kf.throwError("unsupported network",A.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===Wf}};var Jf=new A(_e),Zx=1;function $f(n,e){let t="Web3LegacyFetcher";return function(a,i){let r={method:a,params:i,id:Zx++,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 e5(n){return function(e,t){t==null&&(t=[]);let a={method:e,params:t};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:ct(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 vs=class extends Yt{constructor(e,t){e==null&&Jf.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=e5(e)):e.sendAsync?i=$f(e,e.sendAsync.bind(e)):e.send?i=$f(e,e.send.bind(e)):Jf.throwArgumentError("unsupported provider","provider",e),a||(a="unknown:")),super(a,t),R(this,"jsonRpcFetchFunc",i),R(this,"provider",r)}send(e,t){return this.jsonRpcFetchFunc(e,t)}};var Qf=new A(_e);function Jo(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 Yt(n);case"ws":case"wss":return new xa(n);default:Qf.throwArgumentError("unsupported URL scheme","network",n)}}let t=ts(n);return(!t||!t._defaultProvider)&&Qf.throwError("unsupported getDefaultProvider network",A.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:n}),t._defaultProvider({FallbackProvider:hs,AlchemyProvider:gr,AnkrProvider:ys,CloudflareProvider:fs,EtherscanProvider:cs,InfuraProvider:vr,JsonRpcProvider:Yt,NodesmithProvider:gs,PocketProvider:Ts,Web3Provider:vs,IpcProvider:null},e)}var Y={};Li(Y,{AbiCoder:()=>Wi,ConstructorFragment:()=>Nt,ErrorFragment:()=>tn,EventFragment:()=>jt,FormatTypes:()=>xe,Fragment:()=>Ht,FunctionFragment:()=>Dt,HDNode:()=>Ct,Indexed:()=>ra,Interface:()=>Ma,LogDescription:()=>Xi,Logger:()=>A,ParamType:()=>lt,RLP:()=>Gs,SigningKey:()=>cn,SupportedAlgorithm:()=>$n,TransactionDescription:()=>Yi,TransactionTypes:()=>To,UnicodeNormalizationForm:()=>qt,Utf8ErrorFuncs:()=>ao,Utf8ErrorReason:()=>Ot,_TypedDataEncoder:()=>bt,_fetchData:()=>sl,_toEscapedUtf8String:()=>pd,accessListify:()=>sn,arrayify:()=>B,base58:()=>la,base64:()=>xd,checkProperties:()=>ji,checkResultErrors:()=>qi,commify:()=>ic,computeAddress:()=>mn,computeHmac:()=>pa,computePublicKey:()=>Wr,concat:()=>de,deepCopy:()=>ct,defaultAbiCoder:()=>Hr,defaultPath:()=>ya,defineReadOnly:()=>R,dnsEncode:()=>Gr,entropyToMnemonic:()=>mi,fetchJson:()=>Sn,formatBytes32String:()=>yd,formatEther:()=>rc,formatUnits:()=>Tl,getAccountPath:()=>$0,getAddress:()=>pe,getContractAddress:()=>si,getCreate2Address:()=>dy,getIcapAddress:()=>uy,getJsonWalletAddress:()=>tl,getStatic:()=>mt,hashMessage:()=>Qi,hexConcat:()=>_t,hexDataLength:()=>Pt,hexDataSlice:()=>Me,hexStripZeros:()=>ed,hexValue:()=>Fn,hexZeroPad:()=>fe,hexlify:()=>j,id:()=>nn,isAddress:()=>oy,isBytes:()=>on,isBytesLike:()=>ta,isHexString:()=>Z,isValidMnemonic:()=>J0,isValidName:()=>gd,joinSignature:()=>Pr,keccak256:()=>le,mnemonicToEntropy:()=>pr,mnemonicToSeed:()=>Jd,namehash:()=>Ea,nameprep:()=>hd,parseBytes32String:()=>fd,parseEther:()=>sc,parseTransaction:()=>vo,parseUnits:()=>vl,poll:()=>Rn,randomBytes:()=>Qn,recoverAddress:()=>li,recoverPublicKey:()=>go,resolveProperties:()=>Ce,ripemd160:()=>Qr,serializeTransaction:()=>Jr,sha256:()=>Xt,sha512:()=>Gd,shallowCopy:()=>Te,shuffled:()=>Zr,solidityKeccak256:()=>Zf,solidityPack:()=>$o,soliditySha256:()=>ec,splitSignature:()=>Ln,stripZeros:()=>Zt,toUtf8Bytes:()=>ge,toUtf8CodePoints:()=>Aa,toUtf8String:()=>Jt,verifyMessage:()=>ff,verifyTypedData:()=>cf,zeroPad:()=>ni});var Xf="solidity/5.7.0";var t5=new RegExp("^bytes([0-9]+)$"),n5=new RegExp("^(u?int)([0-9]*)$"),a5=new RegExp("^(.*)\\[([0-9]*)\\]$"),i5="0000000000000000000000000000000000000000000000000000000000000000",wr=new A(Xf);function Yf(n,e,t){switch(n){case"address":return t?ni(e,32):B(e);case"string":return ge(e);case"bytes":return B(e);case"bool":return e=e?"0x01":"0x00",t?ni(e,32):B(e)}let a=n.match(n5);if(a){let i=parseInt(a[2]||"256");return(a[2]&&String(i)!==a[2]||i%8!==0||i===0||i>256)&&wr.throwArgumentError("invalid number type","type",n),t&&(i=256),e=P.from(e).toTwos(i),ni(e,i/8)}if(a=n.match(t5),a){let i=parseInt(a[1]);return(String(i)!==a[1]||i===0||i>32)&&wr.throwArgumentError("invalid bytes type","type",n),B(e).byteLength!==i&&wr.throwArgumentError(`invalid value for ${n}`,"value",e),t?B((e+i5).substring(0,66)):e}if(a=n.match(a5),a&&Array.isArray(e)){let i=a[1];parseInt(a[2]||String(e.length))!=e.length&&wr.throwArgumentError(`invalid array length for ${n}`,"value",e);let s=[];return e.forEach(function(o){s.push(Yf(i,o,!0))}),de(s)}return wr.throwArgumentError("invalid type","type",n)}function $o(n,e){n.length!=e.length&&wr.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);let t=[];return n.forEach(function(a,i){t.push(Yf(a,e[i]))}),j(de(t))}function Zf(n,e){return le($o(n,e))}function ec(n,e){return Xt($o(n,e))}var tc="units/5.7.0";var nc=new A(tc),ac=["wei","kwei","mwei","gwei","szabo","finney","ether"];function ic(n){let e=String(n).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||n==="."||n==="-.")&&nc.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 Tl(n,e){if(typeof e=="string"){let t=ac.indexOf(e);t!==-1&&(e=3*t)}return Vi(n,e??18)}function vl(n,e){if(typeof n!="string"&&nc.throwArgumentError("value must be a string","value",n),typeof e=="string"){let t=ac.indexOf(e);t!==-1&&(e=3*t)}return dn(n,e??18)}function rc(n){return Tl(n,18)}function sc(n){return vl(n,18)}var Qo="ethers/5.7.2";var oc=new A(Qo);try{let n=window;n._ethers==null&&(n._ethers=wl)}catch{}var ba;(function(n){n.Mainnet="Mainnet",n.Custom="Custom",n.Gnosis="Xdai",n.Goerli="Goerli",n.Xdai="Xdai",n.XdaiQa="XdaiQa",n.ArbitrumOne="ArbitrumOne",n.ArbitrumSepolia="ArbitrumSepolia"})(ba||(ba={}));var uc;(function(n){n[n.Custom=0]="Custom",n[n.Mainnet=1]="Mainnet",n[n.Goerli=5]="Goerli",n[n.Gnosis=100]="Gnosis",n[n.Xdai=100]="Xdai",n[n.XdaiQa=100]="XdaiQa",n[n.ArbitrumSepolia=421614]="ArbitrumSepolia",n[n.ArbitrumOne=42161]="ArbitrumOne"})(uc||(uc={}));var _l;(function(n){n.Mainnet="0x5346D0f80e2816FaD329F2c140c870ffc3c3E2Ef",n.Goerli="0x79073fc2117dD054FCEdaCad1E7018C9CbE3ec0B",n.Xdai="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.XdaiQa="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.Custom="",n.ArbitrumOne="0xcccccdcc0ccf6c708d860e19353c5f9a49accccc",n.ArbitrumSepolia="0x7777494e3d8cce0D3570E21FEf820F9Fee077777"})(_l||(_l={}));var ws;(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",n.ArbitrumOne="https://app.colony.io/reputation/arbitrum-one",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/reputation/arbitrum-sepolia"})(ws||(ws={}));var kl;(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="",n.ArbitrumOne="https://app.colony.io/metatransaction/arbitrum-one",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/metatransaction/arbitrum-sepolia"})(kl||(kl={}));var _s;(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="",n.ArbitrumOne="https://app.colony.io/public-rpc/",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/public-rpc/"})(_s||(_s={}));var Al;(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",n.ArbitrumOne=".colony.joincolony.arbitrum",n.ArbitrumSepolia=".colony.joincolony.sepolia"})(Al||(Al={}));var El;(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",n.ArbitrumOne=".user.joincolony.arbitrum",n.ArbitrumSepolia=".user.joincolony.sepolia"})(El||(El={}));var Ml;(function(n){let e;(function(i){i.ETH="0x0000000000000000000000000000000000000000",i.CLNY="0x3E828ac5C480069D4765654Fb4b8733b910b13b2",i.USDC="0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"})(e=n.Mainnet||(n.Mainnet={}));let t;(function(i){i.XDAI="0x0000000000000000000000000000000000000000",i.CLNY="0xc9B6218AffE8Aba68a13899Cbf7cF7f14DDd304C",i.USDC="0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83"})(t=n.Gnosis||(n.Gnosis={}));let a;(function(i){i.ETH="0x0000000000000000000000000000000000000000",i.CLNY="0xcccccdcc0ccf6c708d860e19353c5f9a49accccc",i.USDC="0xaf88d065e77c8cC2239327C5EDb3A432268e5831"})(a=n.ArbitrumOne||(n.ArbitrumOne={}))})(Ml||(Ml={}));var ve;(function(n){n[n.RootDomain=1]="RootDomain",n[n.RootTeam=1]="RootTeam",n[n.RootPot=1]="RootPot",n[n.SkillIgnore=0]="SkillIgnore"})(ve||(ve={}));var zt;(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"})(zt||(zt={}));var Il="0x12345678",Cl;(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"})(Cl||(Cl={}));var vt;(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"})(vt||(vt={}));var ke;(function(n){n.FundingQueue="FundingQueue",n.IVotingReputation="IVotingReputation",n.MultisigPermissions="MultisigPermissions",n.OneTxPayment="OneTxPayment",n.ReputationBootstrapper="ReputationBootstrapper",n.StagedExpenditure="StagedExpenditure",n.StakedExpenditure="StakedExpenditure",n.StreamingPayments="StreamingPayments",n.TokenSupplier="TokenSupplier",n.VotingReputation="VotingReputation"})(ke||(ke={}));var Sl=[{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"}],xi=class{static createInterface(){return new Y.Interface(Sl)}static connect(e,t){return new ue(e,Sl,t)}};me(xi,"abi",Sl);var Rl=[{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"}],bi=class{static createInterface(){return new Y.Interface(Rl)}static connect(e,t){return new ue(e,Rl,t)}};me(bi,"abi",Rl);var dc=(n,e)=>{throw new Error(`${e}: ${n}`)},Xo=n=>n!=null;var{keccak256:s5,toUtf8Bytes:o5}=Y,{MaxUint256:u5}=ht;var Pl=n=>Y.formatEther(n);var Nl=n=>{let e=n.reduce((t,a)=>t|1<{let e=P.from(n);return[...Array(vt.LAST_ROLE).keys()].map(t=>e.shr(t).mask(1).eq(1)?t:null).filter(Xo)},gi=async(n,e,t,a)=>{if(P.from(t).eq(P.from(a)))return u5;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 P.from(o)},Oa=n=>s5(o5(n));var _r=async(n,e)=>(await bi.connect(n,e).version()).toNumber(),Dl=(n,e)=>n.map(t=>{try{return e.parseLog(t)}catch{return null}}).filter(Xo);var{hexDataSlice:Ol}=Y,{MaxUint256:d5}=ht,lc=n=>{let e=Ol(n,0,3),t=P.from(Ol(n,4,35)),a=P.from(Ol(n,36,67));return{sig:e,permissionDomainId:t,childSkillIndex:a}},pc=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[P.from(t),d5,r];let o=P.from(ve.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 gi(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]},l5=async(n,e,t,a,i)=>{let r=await Promise.all(a.map(s=>pc(n,e,t,s,i)));for(let s=0;sArray.isArray(a)?a.length===1?Zn(n,e,t,a[0],i):l5(n,e,t,a,i):pc(n,e,t,a,i);var{MaxUint256:yc}=ht,{AddressZero:p5}=ht;async function y5(n,e){let t;try{return t=await n.getCapabilityRoles(Y.hexZeroPad(e,4)),Yo(t)}catch{return[]}}async function ks(n,e,t,a,i,r,s){let o,{skillId:l}=await e.getDomain(i),{sig:p,permissionDomainId:f,childSkillIndex:b}=lc(s),M=xi.connect(r,a.signer||a.provider),k=await y5(M,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 ${ve.RootDomain}`);o=yc}else{let{skillId:F}=await e.getDomain(f),U=await n.getChildSkillId(F,b);if(U.eq(l))o=yc;else{let{children:G}=await n.getSkill(l),q=G.findIndex(K=>K.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:C,branchMask:D,siblings:N}=await t.getReputationWithProofs(l,p5);return{actionCid:o,key:v,value:C,branchMask:D,siblings:N}}var{AddressZero:f5}=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,a){this.colony=t,this.network=e;let i=a?.network||ba.ArbitrumOne;this.endpointUrl=a?.customEndpointUrl||ws[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,a){let i=await this.getBaseEndpoint(a),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,a){let i=await this.getBaseEndpoint(a),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 a=await this.getBaseEndpoint(t),i=P.from(e||0).toString(),r=`${a}/${i}`;return ea.fetchReputation(r)}async getTotalReputation(e,t){let a=await this.getBaseEndpoint(t),i=P.from(e||0).toString(),r=`${a}/${i}/${f5}/noProof`,s=await ea.fetchReputation(r);return{...s,reputationAmount:P.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(P.from(10).pow(i)).div(s).toNumber()/10**i}};var Et=n=>Array.from(Array(n-1)).map((e,t)=>t+1);var fc=10,G7=Et(fc),cc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},mc=fc-1;var hc=3,W7=Et(hc),xc={1:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],2:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]},bc=hc-1;var gc=10,Q7=Et(gc),Tc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},vc=gc-1;var wc=7,Z7=Et(wc),_c={1:[],2:[],3:[],4:[],5:[],6:[]},kc=wc-1;var Ac=8,nk=Et(Ac),Ec={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3],6:[1,2,3],7:[1,2,3]},Mc=Ac-1;var Cc=5,rk=Et(Cc),Ic={1:[1,2,3,4,5,6,7,8,9,10,11,12,13],2:[1,2,3,4,5,6,7,8,9,10,11,12,13],3:[1,2,3,4,5,6,7,8,9,10,11,12,13],4:[1,2,3,4,5,6,7,8,9,10,11,12,13]},Sc=Cc-1;var Rc=7,uk=Et(Rc),Pc={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3],6:[1,2,3]},Nc=Rc-1;var Dc=10,pk=Et(Dc),Oc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Bc=Dc-1;var Fc=14,ck=Et(Fc),Bl={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],11:[1,2,3,4,5,6],12:[1,2,3,4,5,6],13:[1,2,3,4,5,6]},Fl=Fc-1;var Lc=18,c5=Et(Lc),xk=Lc-1;var m5=(n,e)=>{switch(n){case ke.FundingQueue:return cc[e];case ke.IVotingReputation:return Bl[e];case ke.MultisigPermissions:return xc[e];case ke.OneTxPayment:return Tc[e];case ke.ReputationBootstrapper:return _c[e];case ke.StagedExpenditure:return Ic[e];case ke.StakedExpenditure:return Ec[e];case ke.StreamingPayments:return Pc[e];case ke.TokenSupplier:return Oc[e];case ke.VotingReputation:return Bl[e];default:return dc(n,"Could not find extension with name")}},Ti=(n,e,t)=>{let a=m5(n,e);return!!a&&!a.includes(t)};var h5={[ke.FundingQueue]:mc,[ke.IVotingReputation]:Fl,[ke.MultisigPermissions]:bc,[ke.OneTxPayment]:vc,[ke.ReputationBootstrapper]:kc,[ke.StagedExpenditure]:Sc,[ke.StakedExpenditure]:Mc,[ke.StreamingPayments]:Nc,[ke.TokenSupplier]:Bc,[ke.VotingReputation]:Fl};var i6=wn(Uc(),1);var Ib=wn(a6(),1);var pt;(function(n){n.DEFAULT="default",n.Annotation="annotation",n.Colony="colony",n.Decision="decision",n.Domain="domain",n.Misc="misc"})(pt||(pt={}));var ap;(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"})(ap||(ap={}));var GA=(0,i6.default)(fetch,{headers:{Accept:"application/json"},retryOn:[404,503],retries:3,retryDelay:5e3}),ip={[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 KA=typeof global<"u"&&global.process?global.process.env.COLONY_IPFS_PINATA_TOKEN:void 0;var rp=[{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(rp)}static connect(e,t){return new ue(e,rp,t)}};me(Tn,"abi",rp);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"},{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(sp)}static connect(e,t){return new ue(e,sp,t)}};me(vn,"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:"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 Y.Interface(op)}static connect(e,t){return new ue(e,op,t)}};me(Ei,"abi",op);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:"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:"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:[{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:"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:"returnData",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",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:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],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:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"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:[],name:"unlock",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"}],s6="0x60c060405234801561001057600080fd5b5060405161205738038061205783398101604081905261002f91610307565b60008060018161003d6101ab565b6001600160a01b031681526020810191909152604001600090812091909155556100656101ab565b600480546001600160a01b0319166001600160a01b039290921691909117905561008d6101ab565b6001600160a01b03167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a260066100ce8482610413565b5060056100db8382610413565b5060ff81166080526007805460ff1916600117905560405146907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f90610123906006906104d1565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051601f19818403018152919052805160209091012060a0525061054692505050565b60003633301480156101be575060348110155b1561024757600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e881146102365733935050505090565b5001516001600160a01b0316919050565b3391505090565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261027557600080fd5b81516001600160401b0381111561028e5761028e61024e565b604051601f8201601f19908116603f011681016001600160401b03811182821017156102bc576102bc61024e565b6040528181528382016020018510156102d457600080fd5b60005b828110156102f3576020818601810151838301820152016102d7565b506000918101602001919091529392505050565b60008060006060848603121561031c57600080fd5b83516001600160401b0381111561033257600080fd5b61033e86828701610264565b602086015190945090506001600160401b0381111561035c57600080fd5b61036886828701610264565b925050604084015160ff8116811461037f57600080fd5b809150509250925092565b600181811c9082168061039e57607f821691505b6020821081036103be57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561040e57806000526020600020601f840160051c810160208510156103eb5750805b601f840160051c820191505b8181101561040b57600081556001016103f7565b50505b505050565b81516001600160401b0381111561042c5761042c61024e565b6104408161043a845461038a565b846103c4565b6020601f821160018114610474576000831561045c5750848201515b600019600385901b1c1916600184901b17845561040b565b600084815260208120601f198516915b828110156104a45787850151825560209485019460019092019101610484565b50848210156104c25786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b60008083546104df8161038a565b6001821680156104f6576001811461050b5761053b565b60ff198316865281151582028601935061053b565b86600052602060002060005b8381101561053357815488820152600190910190602001610517565b505081860193505b509195945050505050565b60805160a051611ae5610572600039600081816102e10152610f870152600061029b0152611ae56000f3fe6080604052600436106101815760003560e01c80637a9e5e4b116100d1578063a69df4b51161008a578063bf7e214f11610064578063bf7e214f146104b1578063cf309012146104d1578063d505accf146104eb578063dd62ed3e1461050b57600080fd5b8063a69df4b51461047c578063a9059cbb14610491578063b3eac1d8146103b957600080fd5b80637a9e5e4b146103995780637ecebe00146103b95780638da5cb5b146103ef57806395d89b41146104275780639dc29fac1461043c578063a0712d681461045c57600080fd5b806330adf81f1161013e57806340c10f191161011857806340c10f191461030357806342966c68146103235780636281133d1461034357806370a082311461036357600080fd5b806330adf81f14610255578063313ce567146102895780633644e515146102cf57600080fd5b806306fdde0314610186578063095ea7b3146101b15780630c53c51c146101e157806313af4035146101f457806318160ddd1461021657806323b872dd14610235575b600080fd5b34801561019257600080fd5b5061019b610551565b6040516101a891906115b0565b60405180910390f35b3480156101bd57600080fd5b506101d16101cc3660046115d8565b6105df565b60405190151581526020016101a8565b61019b6101ef3660046116bf565b610672565b34801561020057600080fd5b5061021461020f366004611733565b610859565b005b34801561022257600080fd5b506000545b6040519081526020016101a8565b34801561024157600080fd5b506101d1610250366004611750565b6108dc565b34801561026157600080fd5b506102277f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b34801561029557600080fd5b506102bd7f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101a8565b3480156102db57600080fd5b506102277f000000000000000000000000000000000000000000000000000000000000000081565b34801561030f57600080fd5b5061021461031e3660046115d8565b610950565b34801561032f57600080fd5b5061021461033e366004611791565b610a3f565b34801561034f57600080fd5b506101d161035e3660046117aa565b610a53565b34801561036f57600080fd5b5061022761037e366004611733565b6001600160a01b031660009081526001602052604090205490565b3480156103a557600080fd5b506102146103b4366004611733565b610ba7565b3480156103c557600080fd5b506102276103d4366004611733565b6001600160a01b031660009081526008602052604090205490565b3480156103fb57600080fd5b5060045461040f906001600160a01b031681565b6040516001600160a01b0390911681526020016101a8565b34801561043357600080fd5b5061019b610c18565b34801561044857600080fd5b506102146104573660046115d8565b610c25565b34801561046857600080fd5b50610214610477366004611791565b610e1c565b34801561048857600080fd5b50610214610e54565b34801561049d57600080fd5b506101d16104ac3660046115d8565b610e87565b3480156104bd57600080fd5b5060035461040f906001600160a01b031681565b3480156104dd57600080fd5b506007546101d19060ff1681565b3480156104f757600080fd5b50610214610506366004611831565b610ea2565b34801561051757600080fd5b506102276105263660046118a0565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6006805461055e906118d9565b80601f016020809104026020016040519081016040528092919081815260200182805461058a906118d9565b80156105d75780601f106105ac576101008083540402835291602001916105d7565b820191906000526020600020905b8154815290600101906020018083116105ba57829003601f168201915b505050505081565b600081600260006105ee611191565b6001600160a01b0390811682526020808301939093526040918201600090812091881680825291909352912091909155610626611191565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161066091815260200190565b60405180910390a35060015b92915050565b60606106a186610697886001600160a01b031660009081526008602052604090205490565b4688888888610a53565b6107045760405162461bcd60e51b815260206004820152602960248201527f6d6574617472616e73616374696f6e2d7369676e65722d7369676e617475726560448201526805adad2e6dac2e8c6d60bb1b60648201526084015b60405180910390fd5b61070d86611234565b6000306001600160a01b0316867f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e88960405160200161074e93929190611913565b60408051601f19818403018152908290526107689161194c565b6000604051808303816000865af19150503d80600081146107a5576040519150601f19603f3d011682016040523d82523d6000602084013e6107aa565b606091505b50925090508061080d5760405162461bcd60e51b815260206004820152602860248201527f636f6c6f6e792d6d65746174782d66756e6374696f6e2d63616c6c2d756e737560448201526718d8d95cdcd99d5b60c21b60648201526084016106fb565b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b87610837611191565b8860405161084793929190611968565b60405180910390a15095945050505050565b610876610864611191565b6000356001600160e01b031916611260565b6108925760405162461bcd60e51b81526004016106fb9061199d565b600480546001600160a01b0319166001600160a01b0383169081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60075460009060ff161561093d576108f5610864611191565b61093d5760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b61094884848461133b565b949350505050565b61095b610864611191565b6109775760405162461bcd60e51b81526004016106fb9061199d565b6001600160a01b0382166000908152600160205260408120805483929061099f9084906119e1565b92505081905550806000808282546109b791906119e1565b90915550506040518181526001600160a01b038316907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a26040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b610a50610a4a611191565b82610c25565b50565b600080610ad088308989604051602001610a7094939291906119f4565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b6040805160008082526020820180845284905260ff87169282019290925260608101889052608081018790529192509060019060a0016020604051602081039080840390855afa158015610b28573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610b8b5760405162461bcd60e51b815260206004820152601f60248201527f636f6c6f6e792d6d65746174782d696e76616c69642d7369676e61747572650060448201526064016106fb565b6001600160a01b038a8116911614915050979650505050505050565b610bb2610864611191565b610bce5760405162461bcd60e51b81526004016106fb9061199d565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6005805461055e906118d9565b610c2d611191565b6001600160a01b0316826001600160a01b031614610d2d576001600160a01b03821660009081526002602052604081208291610c67611191565b6001600160a01b03166001600160a01b03168152602001908152602001600020541015610cd65760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03821660009081526002602052604081208291610cf8611191565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610d279190611a3a565b90915550505b6001600160a01b038216600090815260016020526040902054811115610d955760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b03821660009081526001602052604081208054839290610dbd908490611a3a565b9250508190555080600080828254610dd59190611a3a565b90915550506040518181526001600160a01b038316907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59060200160405180910390a25050565b610e27610864611191565b610e435760405162461bcd60e51b81526004016106fb9061199d565b610a50610e4e611191565b82610950565b610e5f610864611191565b610e7b5760405162461bcd60e51b81526004016106fb9061199d565b6007805460ff19169055565b6000610e9b610e94611191565b84846108dc565b9392505050565b60075460ff1615610f0057610eb8610864611191565b610f005760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b42841015610f505760405162461bcd60e51b815260206004820152601d60248201527f636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e6500000060448201526064016106fb565b6040805180820182526002815261190160f01b6020808301919091526001600160a01b038a166000908152600890915291822080547f0000000000000000000000000000000000000000000000000000000000000000917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c9188610fd983611a4d565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161103d93929190611a66565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa1580156110a8573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906110de5750886001600160a01b0316816001600160a01b0316145b61112a5760405162461bcd60e51b815260206004820152601e60248201527f636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e6174757265000060448201526064016106fb565b6001600160a01b038981166000818152600260209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b60003633301480156111a4575060348110155b1561122d57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e8811461121c5733935050505090565b5001516001600160a01b0316919050565b3391505090565b6001600160a01b038116600090815260086020526040812080549161125883611a4d565b919050555050565b6000306001600160a01b0384160361127a5750600161066c565b6004546001600160a01b03908116908416036112985750600161066c565b6003546001600160a01b03166112b05750600061066c565b60035460405163b700961360e01b81526001600160a01b0385811660048301523060248301526001600160e01b0319851660448301529091169063b700961390606401602060405180830381865afa158015611310573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113349190611a8d565b905061066c565b6000611345611191565b6001600160a01b0316846001600160a01b031614611445576001600160a01b0384166000908152600260205260408120839161137f611191565b6001600160a01b03166001600160a01b031681526020019081526020016000205410156113ee5760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03841660009081526002602052604081208391611410611191565b6001600160a01b03166001600160a01b03168152602001908152602001600020600082825461143f9190611a3a565b90915550505b6001600160a01b0384166000908152600160205260409020548211156114ad5760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b038416600090815260016020526040812080548492906114d5908490611a3a565b90915550506001600160a01b038316600090815260016020526040812080548492906115029084906119e1565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161154e91815260200190565b60405180910390a35060019392505050565b60005b8381101561157b578181015183820152602001611563565b50506000910152565b6000815180845261159c816020860160208601611560565b601f01601f19169290920160200192915050565b602081526000610e9b6020830184611584565b6001600160a01b0381168114610a5057600080fd5b600080604083850312156115eb57600080fd5b82356115f6816115c3565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261162b57600080fd5b813567ffffffffffffffff81111561164557611645611604565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561167457611674611604565b60405281815283820160200185101561168c57600080fd5b816020850160208301376000918101602001919091529392505050565b803560ff811681146116ba57600080fd5b919050565b600080600080600060a086880312156116d757600080fd5b85356116e2816115c3565b9450602086013567ffffffffffffffff8111156116fe57600080fd5b61170a8882890161161a565b9450506040860135925060608601359150611727608087016116a9565b90509295509295909350565b60006020828403121561174557600080fd5b8135610e9b816115c3565b60008060006060848603121561176557600080fd5b8335611770816115c3565b92506020840135611780816115c3565b929592945050506040919091013590565b6000602082840312156117a357600080fd5b5035919050565b600080600080600080600060e0888a0312156117c557600080fd5b87356117d0816115c3565b96506020880135955060408801359450606088013567ffffffffffffffff8111156117fa57600080fd5b6118068a828b0161161a565b9450506080880135925060a0880135915061182360c089016116a9565b905092959891949750929550565b600080600080600080600060e0888a03121561184c57600080fd5b8735611857816115c3565b96506020880135611867816115c3565b95506040880135945060608801359350611883608089016116a9565b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156118b357600080fd5b82356118be816115c3565b915060208301356118ce816115c3565b809150509250929050565b600181811c908216806118ed57607f821691505b60208210810361190d57634e487b7160e01b600052602260045260246000fd5b50919050565b60008451611925818460208901611560565b919091019283525060601b6bffffffffffffffffffffffff19166020820152603401919050565b6000825161195e818460208701611560565b9190910192915050565b6001600160a01b0384811682528316602082015260606040820181905260009061199490830184611584565b95945050505050565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561066c5761066c6119cb565b8481526bffffffffffffffffffffffff198460601b16602082015282603482015260008251611a2a816054850160208701611560565b9190910160540195945050505050565b8181038181111561066c5761066c6119cb565b600060018201611a5f57611a5f6119cb565b5060010190565b60008451611a78818460208901611560565b91909101928352506020820152604001919050565b600060208284031215611a9f57600080fd5b81518015158114610e9b57600080fdfea264697066735822122090928a66070125904780390eb49d45fe12c136aec641b1db69316e0ffefc6da764736f6c634300081b0033",Db=n=>n.length>1,Pn=class extends yi{constructor(...e){Db(e)?super(...e):super(Pu,s6,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 Y.Interface(Pu)}static connect(e,t){return new ue(e,Pu,t)}};me(Pn,"bytecode",s6),me(Pn,"abi",Pu);var Cr;(function(n){n.TokenClient="TokenClient",n.TokenLockingClient="TokenLockingClient"})(Cr||(Cr={}));var Nn;(function(n){n.Colony="Colony",n.ColonyLegacy="ColonyLegacy",n.Erc20="Erc20",n.Erc2612="Erc2612",n.Sai="Sai"})(Nn||(Nn={}));var{AddressZero:Lb}=ht;async function Ub(n){try{await n.authority();return}catch{throw new Error("Token can not be assigned a TokenAuthority")}}var Vb=async(n,e)=>{let t,a=!0,i=!0;t=Pn.connect(n,e);try{await t.totalSupply()}catch(r){throw new Error(`Token is probably not a valid ERC20 token, got ${r.message}`)}try{await t.locked(),await Ub(t)}catch{a=!1}try{await t.nonces(Lb)}catch{i=!1}return a?t.tokenClientType=Nn.Colony:i?(t=vn.connect(n,e),t.tokenClientType=Nn.Erc2612):(t=Tn.connect(n,e),t.tokenClientType=Nn.Erc20),t.clientType=Cr.TokenClient,t},up=Vb;var{AddressZero:dp}=ht,Hb=Tn.connect(dp,new Da.BaseProvider(3656691)).interface,qb=Ei.connect(dp,new Da.BaseProvider(3656691)).interface,Gb=vn.connect(dp,new Da.BaseProvider(3656691)).interface;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:"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:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{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:"returnData",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:"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:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"}],Ps=class{static createInterface(){return new Y.Interface(lp)}static connect(e,t){return new ue(e,lp,t)}};Ps.abi=lp;var pp=[{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:"returnData",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"}],Ns=class{static createInterface(){return new Y.Interface(pp)}static connect(e,t){return new ue(e,pp,t)}};Ns.abi=pp;var yp=[{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:!1,internalType:"address",name:"bridgeAddress",type:"address"}],name:"BridgeSet",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:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateSentToBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateStoredFromBridge",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:"uint256",name:"skillId",type:"uint256"}],name:"SkillAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillCreationStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillStoredFromBridge",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:[{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"address",name:"_resolver",type:"address"}],name:"addColonyVersion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_resolver",type:"address"}],name:"addExtensionToNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"addPendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPendingSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"addReputationUpdateLogFromBridge",outputs:[],stateMutability:"nonpayable",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:"_parentSkillId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"addSkillFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",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:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"chainId",type:"uint256"}],name:"bridgeCurrentRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"bridgePendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"skillId",type:"uint256"}],name:"bridgeSkillIfNotMiningChain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"burnUnneededRewards",outputs:[],stateMutability:"nonpayable",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:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"}],name:"claimMiningReward",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:"address",name:"_tokenAddress",type:"address"}],name:"createMetaColony",outputs:[],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:"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:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateExtension",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:"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:"returnData",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"getBridgedReputationUpdateCount",outputs:[{internalType:"uint256",name:"bridgedReputationCount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"}],name:"getBridgedSkillCounts",outputs:[{internalType:"uint256",name:"skillCount",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:"uint256",name:"_id",type:"uint256"}],name:"getColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyBridgeAddress",outputs:[{internalType:"address",name:"bridge",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCreationSalt",outputs:[{internalType:"bytes32",name:"salt",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"}],name:"getColonyVersionResolver",outputs:[{internalType:"address",name:"_resolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentColonyVersion",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getENSRegistrar",outputs:[{internalType:"address",name:"_address",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:[{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:[],name:"getFeeInverse",outputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMetaColony",outputs:[{internalType:"address payable",name:"_colonyAddress",type:"address"}],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:"getMiningChainId",outputs:[{internalType:"uint256",name:"reputationMiningChainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"}],name:"getMiningDelegator",outputs:[{internalType:"address",name:"_delegator",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiningResolver",outputs:[{internalType:"address",name:"miningResolverAddress",type:"address"}],stateMutability:"view",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:"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:"address",name:"_token",type:"address"}],name:"getPayoutWhitelist",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"getPendingReputationUpdate",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:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.PendingReputationUpdate",name:"update",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"getPendingSkillAddition",outputs:[{internalType:"uint256",name:"parentId",type:"uint256"}],stateMutability:"view",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:"_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:[{internalType:"bool",name:"_active",type:"bool"}],name:"getReputationMiningCycle",outputs:[{internalType:"address",name:"_repMiningCycleAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningCycleReward",outputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningSkillId",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"view",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:"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_deprecated",type:"bool"}],internalType:"struct ColonyNetworkDataTypes.Skill",name:"_skill",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSkillCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTokenLocking",outputs:[{internalType:"address",name:"_lockingAddress",type:"address"}],stateMutability:"view",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:"miningChainId",type:"uint256"},{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"}],name:"initialiseReputationMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[{internalType:"uint256",name:"_rootLocalSkillId",type:"uint256"}],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:"address",name:"_colony",type:"address"}],name:"isColony",outputs:[{internalType:"bool",name:"_addressIsColony",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],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:"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:"_stakers",type:"address[]"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"punishStakers",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:"_username",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerUserLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_bridgeAddress",type:"address"}],name:"setColonyBridgeAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],name:"setFeeInverse",outputs:[],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:"_miningResolverAddress",type:"address"}],name:"setMiningResolver",outputs:[],stateMutability:"nonpayable",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:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",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:"uint256",name:"_amount",type:"uint256"}],name:"setReputationMiningCycleReward",outputs:[],stateMutability:"nonpayable",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:[{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"},{internalType:"uint256",name:"nonce",type:"uint256"}],name:"setReputationRootHashFromBridge",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:"address",name:"_tokenLockingAddress",type:"address"}],name:"setTokenLocking",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:"uint256",name:"_amount",type:"uint256"}],name:"stakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"startNextCycle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"startTokenAuction",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:"bytes32",name:"_extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"unstakeForMining",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:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"}],Ir=class{static createInterface(){return new Y.Interface(yp)}static connect(e,t){return new ue(e,yp,t)}};Ir.abi=yp;var Mi=class{constructor({contract:e,config:t,method:a,args:i,eventData:r,txConfig:s}){this.config=t,this.contract=e,this.method=a,this.args=i,this.eventData=r,this.txConfig=s}async getArgs(e){let t=[];return typeof this.args=="function"?t=await this.args():t=this.args,e&&t.push(e),t}async getTx(e){let t=await this.getArgs(e);return await this.contract.functions[this.method].apply(this.contract,t)}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.config.ipfs.getMetadataForEvent.bind(this.config.ipfs,ip[this.txConfig.metadataType],t.metadata);return[t,e,a]}return[t,e]}return[{},e]}async broadcastMetaTx(e){let{provider:t}=this.config.getSigner();if(!t)throw new Error("No provider found");let i=await(await fetch(`${this.config.metaTxBroadcasterEndpoint}/broadcast`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();if(i.status!=="success")throw new Error(`Could not send Metatransaction. Reason given: ${i.data.reason}`);if(!i.data?.txHash)throw new Error("Could not get transaction hash from broadcaster response");return t.getTransaction(i.data.txHash)}async waitForMetaTx(e){let t=await e.wait();return t.parsedLogs=Dl(t.logs,this.contract.interface),t}tx(){return{send:async e=>{let t=await this.getTx(e);return[t,this.getMined.bind(this,t)]},mined:async e=>{let t=await this.getTx(e);return this.getMined(t)},encode:async()=>{let e=await this.getArgs();return this.contract.interface.encodeFunctionData(this.method,e)}}}};var{arrayify:Kb,solidityKeccak256:Wb,splitSignature:Jb}=Y,Ci=class extends Mi{async sendMetaTransaction(e,t){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let a=this.config.getSigner(),{provider:i}=a;if(!i)throw new Error("No provider found");let r;this.config.network===ba.Custom?r=1:r=(await i.getNetwork()).chainId;let s=await a.getAddress(),o=await this.contract.functions.getMetatransactionNonce(s),l=Wb(["uint256","address","uint256","bytes"],[o.toString(),t,r,e]),p=Kb(l),f=await a.signMessage(p),{r:b,s:M,v:k}=Jb(f),v={target:t,payload:e,userAddress:s,r:b,s:M,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=(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}},Nu=(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=ve.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 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"}],Ii=class{static createInterface(){return new Y.Interface(fp)}static connect(e,t){return new ue(e,fp,t)}};Ii.abi=fp;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"}],Si=class{static createInterface(){return new Y.Interface(cp)}static connect(e,t){return new ue(e,cp,t)}};Si.abi=cp;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"}],Ri=class{static createInterface(){return new Y.Interface(mp)}static connect(e,t){return new ue(e,mp,t)}};Ri.abi=mp;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:[],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(hp)}static connect(e,t){return new ue(e,hp,t)}};Pi.abi=hp;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:[{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(xp)}static connect(e,t){return new ue(e,xp,t)}};Ni.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:[{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(bp)}static connect(e,t){return new ue(e,bp,t)}};Di.abi=bp;var{AddressZero:t1}=ht,Dn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Oa(Dn.extensionType),e.address);if(t===t1)throw new Error(`${Dn.extensionType} extension is not installed for this Colony`);let a=await _r(t,e.config.signerOrProvider);if(!Ti(Dn.extensionType,a,e.version))throw new Error(`Version ${a} of the ${Dn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Dn.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${Dn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new Dn(e,r,a)}static getLatestSupportedVersion(){return Dn.supportedVersions[Dn.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||ve.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]),M=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),[C,D]=await Zn(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[vt.Administration,vt.Funding]);return[k,v,C,D,f,M,b,s,ve.SkillIgnore]},async k=>({...ee("OneTxPaymentMade",k)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Oa(ke.OneTxPayment),t],async a=>({...ee("ExtensionUpgraded",a)}))}},La=Dn;La.supportedVersions=[{version:3,factory:Pi},{version:4,factory:Ni},{version:5,factory:Di}],La.extensionType=ke.OneTxPayment;var On=class{constructor(e,t){typeof t=="string"?this.tokenClient=Tn.connect(t,e.config.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=>({...ee("Transfer",a)}))}transferFrom(e,t,a){return this.colonyNetwork.createTxCreator(this.tokenClient,"transferFrom",[e,t,a],async i=>({...ee("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=>({...ee("Approval",a)}))}};var Ds=class extends On{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=Pn.connect(a,t.config.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=>({...ee("LogSetAuthority",a)}))}setOwner(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setOwner",[t],async a=>({...ee("LogSetOwner",a)}))}};var Os=class extends On{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=vn.connect(a,t.config.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=>({...ee("Approval",i)}))}};var u6=async(n,e)=>{let t=await up(e,n.config.signerOrProvider);switch(t.tokenClientType){case Nn.Colony:return new Ds(n,t);case Nn.Erc20:return new On(n,t);case Nn.Erc2612:return new Os(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"}],Oi=class{static createInterface(){return new Y.Interface(gp)}static connect(e,t){return new ue(e,gp,t)}};Oi.abi=gp;var Tp=[{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(Tp)}static connect(e,t){return new ue(e,Tp,t)}};Bi.abi=Tp;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:[{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(vp)}static connect(e,t){return new ue(e,vp,t)}};Fi.abi=vp;var{AddressZero:wp}=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===wp)throw new Error(`${Bn.extensionType} extension is not installed for this Colony`);let a=await _r(t,e.config.signerOrProvider);if(!Ti(Bn.extensionType,a,e.version))throw new Error(`Version ${a} of the ${Bn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Bn.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${Bn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new Bn(e,r,a)}static getLatestSupportedVersion(){return Bn.supportedVersions[Bn.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=P.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 Y.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=>({...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:a,value:i,branchMask:r,siblings:s}=await ks(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),this.colony.reputation,this.votingReputationContract,e,wp,Il);return[e,t,wp,Il,a,i,r,s]},async t=>({...ee("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.config.ipfs.uploadMetadata(pt.Decision,t),[e,a]},async a=>({...ee("Annotation",a)}),{metadataType:pt.Decision})}approveStake(e,t=ve.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{...Nu("UserTokenApproved",a,i.getInternalTokenLockingContract().interface)}})}stakeMotion(e,t,a){let i=async()=>{let r=await this.colony.config.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(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 M=await this.getMinStake(o,t);if(P.from(a).lt(M))throw new Error(`The staked amount is too small. Please stake at least ${Pl(M)}`);let{domainId:k,rootHash:v}=await this.getMotion(e),[C,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,C,D,P.from(t),a,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 a=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.config.getSigner().getAddress(),{key:p,value:f,branchMask:b,siblings:M}=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,M]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"submitVote",a,async i=>({...ee("MotionVoteSubmitted",i)}))}revealVote(e,t){let a=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.config.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:M,value:k,branchMask:v,siblings:C}=p;return[e,f,P.from(b),M,k,v,C]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"revealVote",a,async i=>({...ee("MotionVoteRevealed",i)}))}escalateMotion(e,t){let a=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.config.getSigner().getAddress(),p=await gi(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),t,r),{key:f,value:b,branchMask:M,siblings:k}=await this.colony.reputation.getReputationWithProofs(o,l,s);return[e,t,p,f,b,M,k]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"escalateMotion",a,async i=>({...ee("MotionEscalated",i)}))}finalizeMotion(e){let t=async()=>{let a=await this.votingReputationContract.getMotionState(e);if(a!==zt.Finalizable)throw new Error(`Motion cannot be finalized. It's currently in "${zt[a]}" state`);return[e]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"finalizeMotion",t,async a=>({...ee("MotionFinalized",a)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Oa(ke.VotingReputation),t],async a=>({...ee("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}}},Ua=Bn;Ua.supportedVersions=[{version:7,factory:Oi},{version:8,factory:Bi},{version:9,factory:Fi}],Ua.extensionType=ke.VotingReputation;var r1={["motion"]:Ua,["oneTx"]:La},Rr=class{static async connect(e,t){let a=await _r(t,e.config.signerOrProvider),i=Rr.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.config.signerOrProvider),s=await r.getToken(),o=await u6(e,s),l=new Rr(e,r,o,a);return await l.updateExtensions(),l}static getLatestSupportedVersion(){return Rr.supportedVersions[Rr.supportedVersions.length-1].version}constructor(e,t,a,i){this.colony=t,this.colonyNetwork=e,this.config=e.config,this.address=t.address,this.ext={},this.reputation=new ea(e.getInternalNetworkContract(),t,{customEndpointUrl:e.config.reputationOracleEndpoint}),this.token=a,this.version=i}createColonyTxCreator(e,t,a,i,r){return new Sr({colony:this,config:this.colonyNetwork.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createPermissionedColonyTxCreator(e,t,a,i,r,s){return new Sr({colony:this,config:this.colonyNetwork.config,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 Ua.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}if(!this.ext.oneTx)try{this.ext.oneTx=await La.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.config.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.config.ipfs.uploadMetadata(pt.Domain,e),[ve.RootDomain,t]},{roles:vt.Architecture,domain:ve.RootDomain},async t=>({...ee("DomainAdded",t),...ee("FundingPotAdded",t),...ee("DomainMetadata",t)}),{metadataType:pt.Domain}):this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256)",[ve.RootDomain],{roles:vt.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.config.ipfs.uploadMetadata(pt.Domain,e),[ve.RootDomain,t]},{roles:vt.Architecture,domain:ve.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 a=>({...ee("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=>({...ee("ColonyFundsClaimed",a)}))}moveFundsToTeam(e,t,a,i){let r=ve.RootDomain,s=a||ve.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(),M=await gi(b,this.colony,r,s),k=await gi(b,this.colony,r,t),{fundingPotId:v}=await this.colony.getDomain(s),{fundingPotId:C}=await this.colony.getDomain(t);return[p,f,r,M,k,v,C,e,o]},async l=>({...ee("ColonyFundsMovedBetweenFundingPots",l)}))}async getReputation(e,t=ve.RootDomain,a=3){let{skillId:i}=await this.colony.getDomain(t);return this.reputation.getReputationFraction(i,e,void 0,a)}async getReputationPoints(e,t=ve.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=>({...ee("ArbitraryTransaction(address,address,bytes,bool)",a)}))}annotateTransaction(e,t){return this.createColonyTxCreator(this.colony,"annotateTransaction",async()=>{let a;return typeof t=="string"?a=t:a=await this.config.ipfs.uploadMetadata(pt.Annotation,t),[e,a]},async a=>({...ee("Annotation",a)}),{metadataType:pt.Annotation})}installExtension(e){let t=r1[e],a=t.getLatestSupportedVersion(),{extensionType:i}=t;if(!Ti(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",[Oa(i),t.getLatestSupportedVersion()],async s=>({...Nu("ExtensionInstalled",s,r.interface)}))}async getRoles(e,t=ve.RootDomain){let a=await this.colony.getUserRoles(e,t);return Yo(a)}setRoles(e,t,a=ve.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let i=await this.getRoles(e,a),r=Array.from(new Set([...i,...[].concat(t)])),s=Nl(r);return[e,a,s]},{roles:vt.Architecture,domain:a},async i=>({...ee("ColonyRoleSet",i),...ee("RecoveryRoleSet",i)}))}unsetRoles(e,t,a=ve.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let r=(await this.getRoles(e,a)).filter(o=>![].concat(t).includes(o)),s=Nl(r);return[e,a,s]},{roles:vt.Architecture,domain:a},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 a=[],i=await t.getTokenLocking();return e?a=[...e,i]:a=[i],[this.token.address,this.address,a]},async a=>({...ee("TokenAuthorityDeployed",a)}))}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 a=>({...ee("ColonyUpgraded",a)}))}awardReputation(e,t,a=ve.RootDomain){if(P.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=>({...ee("ArbitraryReputationUpdate",i)}))}smiteReputation(e,t,a=ve.RootDomain){if(P.from(t).lte(0))throw new Error("Reputation smite must be bigger than 0");return this.createPermissionedColonyTxCreator(this.colony,"emitDomainReputationPenalty",[a,e,P.from(0).sub(t)],{domain:a,roles:vt.Arbitration},async i=>({...ee("ArbitraryReputationUpdate",i)}))}},Bs=Rr;Bs.supportedVersions=[{version:11,factory:Ii},{version:12,factory:Si},{version:13,factory:Ri}];var{splitSignature:sR}=Y;var{namehash:AR}=Y,{AddressZero:ER}=ht;var u1=()=>{window.ethereum.request({method:"wallet_addEthereumChain",params:[{chainId:"0xa4b1",chainName:"Arbitrum One via Colony",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:[_s.ArbitrumOne],blockExplorerUrls:["https://arbiscan.io/"]}]})};document.querySelector("#add_rpc")?.addEventListener("click",u1);})(); /** * [js-sha3]{@link https://github.com/emn178/js-sha3} * diff --git a/local-basic.js b/local-basic.js index 61deeaa57..37673c802 100644 --- a/local-basic.js +++ b/local-basic.js @@ -1,9 +1,9 @@ -"use strict";(()=>{var R6=Object.create;var Gs=Object.defineProperty;var P6=Object.getOwnPropertyDescriptor;var N6=Object.getOwnPropertyNames;var D6=Object.getPrototypeOf,O6=Object.prototype.hasOwnProperty;var B6=(n,e,t)=>e in n?Gs(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)Gs(n,t,{get:e[t],enumerable:!0})},F6=(n,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of N6(e))!O6.call(n,i)&&i!==t&&Gs(n,i,{get:()=>e[i],enumerable:!(a=P6(e,i))||a.enumerable});return n};var _n=(n,e,t)=>(t=n!=null?R6(D6(n)):{},F6(e||!n||!n.__esModule?Gs(t,"default",{value:n,enumerable:!0}):t,n));var xe=(n,e,t)=>(B6(n,typeof e!="symbol"?e+"":e,t),t);var jp=ae(()=>{});var rd=ae((Hp,id)=>{(function(n,e){"use strict";function t(C,u){if(!C)throw new Error(u||"Assertion failed")}function a(C,u){C.super_=u;var y=function(){};y.prototype=u.prototype,C.prototype=new y,C.prototype.constructor=C}function i(C,u,y){if(i.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=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(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 b=s(C,y);return y-1>=u&&(b|=s(C,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(C,u,y,b){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()},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"],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];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=I[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(C){for(var u=new Array(C.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-C.length+1);P<=c;P++){var D=d-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[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,Y=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,Ya=A[3]|0,Ye=Ya&8191,Xe=Ya>>>13,Xa=A[4]|0,Ze=Xa&8191,et=Xa>>>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(Y,ze),d=Math.imul(Y,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(Y,Ke)|0,d=d+Math.imul(Y,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,Ye)|0,d=d+Math.imul(c,Xe)|0,d=d+Math.imul(P,Ye)|0,m=m+Math.imul(P,Xe)|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(Y,$e)|0,d=d+Math.imul(Y,Qe)|0,d=d+Math.imul(Q,$e)|0,m=m+Math.imul(Q,Qe)|0,g=g+Math.imul(V,Ye)|0,d=d+Math.imul(V,Xe)|0,d=d+Math.imul(K,Ye)|0,m=m+Math.imul(K,Xe)|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(Y,Ye)|0,d=d+Math.imul(Y,Xe)|0,d=d+Math.imul(Q,Ye)|0,m=m+Math.imul(Q,Xe)|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,Ye)|0,d=d+Math.imul(Z,Xe)|0,d=d+Math.imul(le,Ye)|0,m=m+Math.imul(le,Xe)|0,g=g+Math.imul(Y,Ze)|0,d=d+Math.imul(Y,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,Ye)|0,d=d+Math.imul(Ne,Xe)|0,d=d+Math.imul(De,Ye)|0,m=m+Math.imul(De,Xe)|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(Y,tt)|0,d=d+Math.imul(Y,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,Ye)|0,d=d+Math.imul(Oe,Xe)|0,d=d+Math.imul(Be,Ye)|0,m=m+Math.imul(Be,Xe)|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(Y,at)|0,d=d+Math.imul(Y,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,Ye)|0,d=d+Math.imul(Fe,Xe)|0,d=d+Math.imul(Le,Ye)|0,m=m+Math.imul(Le,Xe)|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(Y,rt)|0,d=d+Math.imul(Y,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,Ye)|0,d=d+Math.imul(Ue,Xe)|0,d=d+Math.imul(Ve,Ye)|0,m=m+Math.imul(Ve,Xe)|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(Y,ot)|0,d=d+Math.imul(Y,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,Ye)|0,d=d+Math.imul(je,Xe)|0,d=d+Math.imul(He,Ye)|0,m=m+Math.imul(He,Xe)|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(Y,dt)|0,d=d+Math.imul(Y,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,Ye),d=Math.imul(qe,Xe),d=d+Math.imul(Ge,Ye)|0,m=Math.imul(Ge,Xe),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 Yu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Yu>>>26)|0,Yu&=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 Xu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Xu>>>26)|0,Xu&=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]=Yu,h[13]=Xu,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(C,u,y){y.negative=u.negative^C.negative,y.length=C.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(C,u,y){return U(C,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(C,u){this.x=C,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 $(C,u){this.name=C,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(C){if(typeof C=="string"){var u=i._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 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(C){q.call(this,C),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 id>"u"||id,Hp)});var fy=ae((Tg,Qs)=>{(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 Qs=="object"&&Qs.exports,o=typeof define=="function"&&define.amd,l=!a.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",p="0123456789abcdef".split(""),f=[31,7936,2031616,520093696],x=[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};(a.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(c){return Object.prototype.toString.call(c)==="[object Array]"}),l&&(a.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,Y){return u["cshake"+c].update(V,K,ee,Y)[D]()}},de=function(c,P,D){return function(V,K,ee,Y){return u["kmac"+c].update(V,K,ee,Y)[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(n);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(n)}else throw new Error(n);P=!0}for(var V=this.blocks,K=this.byteCount,ee=c.length,Y=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[Y],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(n);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(n)}else throw new Error(n);P=!0}var V=0,K=c.length;if(P)V=K;else for(var ee=0;ee=57344?V+=3:(Y=65536+((Y&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],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 c=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 yt=new Uint32Array(Q);ee>8&255,Y[Q+2]=yt>>16&255,Y[Q+3]=yt>>24&255;ee%c===0&&G(P)}return V&&(Q=ee<<2,yt=P[K],Y[Q]=yt&255,V>1&&(Y[Q+1]=yt>>8&255),V>2&&(Y[Q+2]=yt>>16&255)),Y};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,Y,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,Ya,Ye,Xe,Xa,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],Y=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^(Y<<1|Q>>>31),D=De^(Q<<1|Y>>>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=Y^(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,Ya=c[26]<<25|c[27]>>>7,Ye=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,Xe=c[38]<<8|c[39]>>>24,Xa=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&Ya,c[21]=Qa^~Qe&Ye,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^~Ya&Xe,c[23]=Qe^~Ye&Xa,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]=Ya^~Xe&Ze,c[25]=Ye^~Xa&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]=Xe^~Ze&Je,c[27]=Xa^~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(n,e){if(!n)throw new Error(e||"Assertion failed")}o0.equal=function(e,t,a){if(e!=t)throw new Error(a||"Assertion failed: "+e+" != "+t)}});var d0=ae((y3,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 a=function(){};a.prototype=t.prototype,e.prototype=new a,e.prototype.constructor=e}}});var An=ae(Pe=>{"use strict";var H2=nr(),q2=d0();Pe.inherits=q2;function G2(n,e){return(n.charCodeAt(e)&64512)!==55296||e<0||e+1>=n.length?!1:(n.charCodeAt(e+1)&64512)===56320}function z2(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):G2(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}Pe.htonl=l0;function K2(n,e){for(var t="",a=0;a>>0}return r}Pe.join32=J2;function $2(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}Pe.split32=$2;function Q2(n,e){return n>>>e|n<<32-e}Pe.rotr32=Q2;function Y2(n,e){return n<>>32-e}Pe.rotl32=Y2;function X2(n,e){return n+e>>>0}Pe.sum32=X2;function Z2(n,e,t){return n+e+t>>>0}Pe.sum32_3=Z2;function eh(n,e,t,a){return n+e+t+a>>>0}Pe.sum32_4=eh;function th(n,e,t,a,i){return n+e+t+a+i>>>0}Pe.sum32_5=th;function nh(n,e,t,a){var i=n[e],r=n[e+1],s=a+r>>>0,o=(s>>0,n[e+1]=s}Pe.sum64=nh;function ah(n,e,t,a){var i=e+a>>>0,r=(i>>0}Pe.sum64_hi=ah;function ih(n,e,t,a){var i=e+a;return i>>>0}Pe.sum64_lo=ih;function rh(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}Pe.sum64_4_hi=rh;function sh(n,e,t,a,i,r,s,o){var l=e+a+r+o;return l>>>0}Pe.sum64_4_lo=sh;function oh(n,e,t,a,i,r,s,o,l,p){var f=0,x=e;x=x+a>>>0,f+=x>>0,f+=x>>0,f+=x>>0,f+=x>>0}Pe.sum64_5_hi=oh;function uh(n,e,t,a,i,r,s,o,l,p){var f=e+a+r+o+p;return f>>>0}Pe.sum64_5_lo=uh;function dh(n,e,t){var a=e<<32-t|n>>>t;return a>>>0}Pe.rotr64_hi=dh;function lh(n,e,t){var a=n<<32-t|e>>>t;return a>>>0}Pe.rotr64_lo=lh;function ph(n,e,t){return n>>>t}Pe.shr64_hi=ph;function yh(n,e,t){var a=n<<32-t|e>>>t;return a>>>0}Pe.shr64_lo=yh});var ar=ae(c0=>{"use strict";var f0=An(),fh=nr();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 a=e.length%this._delta8;this.pending=e.slice(e.length-a,e.length),this.pending.length===0&&(this.pending=null),e=f0.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 ch=An(),Hn=ch.rotr32;function mh(n,e,t,a){if(n===0)return m0(e,t,a);if(n===1||n===3)return x0(e,t,a);if(n===2)return h0(e,t,a)}da.ft_1=mh;function m0(n,e,t){return n&e^~n&t}da.ch32=m0;function h0(n,e,t){return n&e^n&t^e&t}da.maj32=h0;function x0(n,e,t){return n^e^t}da.p32=x0;function hh(n){return Hn(n,2)^Hn(n,13)^Hn(n,22)}da.s0_256=hh;function xh(n){return Hn(n,6)^Hn(n,11)^Hn(n,25)}da.s1_256=xh;function bh(n){return Hn(n,7)^Hn(n,18)^n>>>3}da.g0_256=bh;function gh(n){return Hn(n,17)^Hn(n,19)^n>>>10}da.g1_256=gh});var T0=ae((h3,g0)=>{"use strict";var ir=An(),Th=ar(),vh=Nd(),Dd=ir.rotl32,$r=ir.sum32,wh=ir.sum32_5,_h=vh.ft_1,b0=Th.BlockHash,kh=[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)}ir.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 a=this.W,i=0;i<16;i++)a[i]=e[t+i];for(;i{"use strict";var rr=An(),Ah=ar(),sr=Nd(),Mh=nr(),Mn=rr.sum32,Eh=rr.sum32_4,Ch=rr.sum32_5,Ih=sr.ch32,Sh=sr.maj32,Rh=sr.s0_256,Ph=sr.s1_256,Nh=sr.g0_256,Dh=sr.g1_256,v0=Ah.BlockHash,Oh=[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=Oh,this.W=new Array(64)}rr.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 a=this.W,i=0;i<16;i++)a[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((g3,I0)=>{"use strict";var Qt=An(),Bh=ar(),Fh=nr(),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,Lh=Qt.sum64_4_hi,Uh=Qt.sum64_4_lo,Vh=Qt.sum64_5_hi,jh=Qt.sum64_5_lo,C0=Bh.BlockHash,Hh=[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=Hh,this.W=new Array(160)}Qt.inherits(En,C0);I0.exports=En;En.blockSize=1024;En.outSize=512;En.hmacStrength=192;En.padLength=128;En.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 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(or=>{"use strict";or.sha1=T0();or.sha224=A0();or.sha256=Od();or.sha384=P0();or.sha512=Ud()});var U0=ae(L0=>{"use strict";var li=An(),tx=ar(),go=li.rotl32,D0=li.sum32,Qr=li.sum32_3,O0=li.sum32_4,F0=tx.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 a=this.h[0],i=this.h[1],r=this.h[2],s=this.h[3],o=this.h[4],l=a,p=i,f=r,x=s,I=o,_=0;_<80;_++){var v=D0(go(O0(a,B0(_,i,r,s),e[ix[_]+t],nx(_)),sx[_]),o);a=o,o=s,s=go(r,10),r=i,i=v,v=D0(go(O0(l,B0(79-_,p,f,x),e[rx[_]+t],ax(_)),ox[_]),I),l=I,I=x,x=go(f,10),f=p,p=v}v=Qr(this.h[1],r,x),this.h[1]=Qr(this.h[2],s,I),this.h[2]=Qr(this.h[3],o,l),this.h[3]=Qr(this.h[4],a,p),this.h[4]=Qr(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(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 nx(n){return n<=15?0:n<=31?1518500249:n<=47?1859775393:n<=63?2400959708:2840853838}function ax(n){return n<=15?1352829926:n<=31?1548603684:n<=47?1836072691:n<=63?2053994217:0}var ix=[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],rx=[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],sx=[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],ox=[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((_3,V0)=>{"use strict";var ux=An(),dx=nr();function ur(n,e,t){if(!(this instanceof ur))return new ur(n,e,t);this.Hash=n,this.blockSize=n.blockSize/8,this.outSize=n.outSize/8,this.inner=null,this.outer=null,this._init(ux.toArray(e,t))}V0.exports=ur;ur.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),dx(e.length<=this.blockSize);for(var t=e.length;t{var Rt=H0;Rt.utils=An();Rt.common=ar();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(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&&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],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],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=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,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,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 a(_,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=a(_,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=a(_,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 I={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=I:typeof define=="function"&&define.amd?define(I):n&&(n.scrypt&&(n._scrypt=n.scrypt),n.scrypt=I)})(pl)});var Gf=ae((y4,qf)=>{"use strict";var qo="qpzry9x8gf2tvdw0s3jn54khce6mua7l",hl={};for(ss=0;ss>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 jf(n){for(var e=1,t=0;t126)return"Invalid prefix ("+n+")";e=xr(e)^a>>5}for(e=xr(e),t=0;tt)throw new TypeError("Exceeds length limit");n=n.toLowerCase();var a=jf(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=xr(a)^s,i+=qo.charAt(s)}for(r=0;r<6;++r)a=xr(a);for(a^=1,r=0;r<6;++r){var o=a>>(5-r)*5&31;i+=qo.charAt(o)}return i}function Hf(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=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 "+n:{prefix:r,words:l}}function Kx(){var n=Hf.apply(null,arguments);if(typeof n=="object")return n}function Jx(n){var e=Hf.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function Go(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 zl=="object"&&typeof Wl<"u"?Wl.exports=e():typeof define=="function"&&define.amd?define(e):(n=typeof globalThis<"u"?globalThis:n||self,n.fetchRetry=e())})(zl,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,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(I,_){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)I(U);else if(typeof x=="function")try{return Promise.resolve(x(L,null,U)).then(function(H){H?S(L,null,U):I(U)}).catch(_)}catch(H){_(H)}else L=0}function t(a){this.name="ArgumentError",this.message=a}return n})});var Kl=ae(ou=>{"use strict";Object.defineProperty(ou,"__esModule",{value:!0});ou.$dictionary=void 0;ou.$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 Is=ae((gA,im)=>{im.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}});var $l=ae(Fa=>{var Me=Is(),Jl=()=>[{type:Me.RANGE,from:48,to:57}],rm=()=>[{type:Me.CHAR,value:95},{type:Me.RANGE,from:97,to:122},{type:Me.RANGE,from:65,to:90}].concat(Jl()),sm=()=>[{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}],U5=()=>[{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:rm(),not:!1});Fa.notWords=()=>({type:Me.SET,set:rm(),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:sm(),not:!1});Fa.notWhitespace=()=>({type:Me.SET,set:sm(),not:!0});Fa.anyChar=()=>({type:Me.SET,set:U5(),not:!0})});var um=ae(Ss=>{var om=Is(),Cr=$l(),V5="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?",j5={0:0,t:9,n:10,v:11,f:12,r:13};Ss.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 f=a?8:r?parseInt(r,16):s?parseInt(s,16):o?parseInt(o,8):l?V5.indexOf(l):j5[p],x=String.fromCharCode(f);return/[[\]{}^$.|?*+()]/.test(x)&&(x="\\"+x),x}),n};Ss.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(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:om.RANGE,from:(i[8]||i[9]).charCodeAt(0),to:i[10].charCodeAt(0)});else if(r=i[12])t.push({type:om.CHAR,value:r.charCodeAt(0)});else return[t,a.lastIndex];Ss.error(e,"Unterminated character class")};Ss.error=(n,e)=>{throw new SyntaxError("Invalid regular expression: /"+n+"/: "+e)}});var dm=ae(Rs=>{var uu=Is();Rs.wordBoundary=()=>({type:uu.POSITION,value:"b"});Rs.nonWordBoundary=()=>({type:uu.POSITION,value:"B"});Rs.begin=()=>({type:uu.POSITION,value:"^"});Rs.end=()=>({type:uu.POSITION,value:"$"})});var lm=ae((_A,Ql)=>{var Ir=um(),bn=Is(),_i=$l(),du=dm();Ql.exports=n=>{var e=0,t,a,i={type:bn.ROOT,stack:[]},r=i,s=i.stack,o=[],l=O=>{Ir.error(n,`Nothing to repeat at column ${O-1}`)},p=Ir.strToChars(n);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 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}))}};pm.exports=La});var cm=ae((AA,fm)=>{var lu=lm(),Ps=ym(),ki=lu.types;fm.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=lu(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 a,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),a=e.options?this._randSelect(e.options):e.stack,i="",s=0,o=a.length;s{"use strict";var H5=Ai&&Ai.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ai,"__esModule",{value:!0});Ai.RandomGenerator=void 0;var q5=H5(cm()),G5;(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 q5.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()}})(G5=Ai.RandomGenerator||(Ai.RandomGenerator={}))});var Ds=ae(Sr=>{"use strict";var z5=Sr&&Sr.__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(Sr,"__esModule",{value:!0});Sr.TypeGuardError=void 0;var W5=function(n){z5(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);Sr.TypeGuardError=W5});var hm=ae(pu=>{"use strict";Object.defineProperty(pu,"__esModule",{value:!0});pu.$any=void 0;var K5=function(n){return n!==void 0?JSON.parse(JSON.stringify(n)):void 0};pu.$any=K5});var xm=ae(yu=>{"use strict";Object.defineProperty(yu,"__esModule",{value:!0});yu.$every=void 0;var J5=function(n,e){for(var t=null,a=0;a{"use strict";Object.defineProperty(fu,"__esModule",{value:!0});fu.$guard=void 0;var $5=Ds(),Q5=function(n){return function(e,t){if(e===!0)throw new $5.TypeGuardError({method:n,path:t.path,expected:t.expected,value:t.value});return!1}};fu.$guard=Q5});var gm=ae(cu=>{"use strict";Object.defineProperty(cu,"__esModule",{value:!0});cu.$is_between=void 0;var Y5=function(n,e,t){return e<=n&&n<=t};cu.$is_between=Y5});var Tm=ae(mu=>{"use strict";Object.defineProperty(mu,"__esModule",{value:!0});mu.$is_custom=void 0;var X5=Kl(),Z5=function(n,e,t,a){var i,r=(i=X5.$dictionary.get(n))===null||i===void 0?void 0:i.get(e);return r===void 0?!0:r(t)(a)};mu.$is_custom=Z5});var vm=ae(hu=>{"use strict";Object.defineProperty(hu,"__esModule",{value:!0});hu.$is_date=void 0;var eb=function(n){return tb.test(n)};hu.$is_date=eb;var tb=/^(\d{4})-(\d{2})-(\d{2})$/});var wm=ae(xu=>{"use strict";Object.defineProperty(xu,"__esModule",{value:!0});xu.$is_datetime=void 0;var nb=function(n){return!isNaN(new Date(n).getTime())};xu.$is_datetime=nb});var _m=ae(bu=>{"use strict";Object.defineProperty(bu,"__esModule",{value:!0});bu.$is_email=void 0;var ab=function(n){return ib.test(n)};bu.$is_email=ab;var ib=/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i});var km=ae(gu=>{"use strict";Object.defineProperty(gu,"__esModule",{value:!0});gu.$is_ipv4=void 0;var rb=function(n){return sb.test(n)};gu.$is_ipv4=rb;var sb=/^(?: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 Am=ae(Tu=>{"use strict";Object.defineProperty(Tu,"__esModule",{value:!0});Tu.$is_ipv6=void 0;var ob=function(n){return ub.test(n)};Tu.$is_ipv6=ob;var ub=/^(([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 Mm=ae(vu=>{"use strict";Object.defineProperty(vu,"__esModule",{value:!0});vu.$is_url=void 0;var db=function(n){return lb.test(n)};vu.$is_url=db;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 Em=ae(wu=>{"use strict";Object.defineProperty(wu,"__esModule",{value:!0});wu.$is_uuid=void 0;var pb=function(n){return yb.test(n)};wu.$is_uuid=pb;var yb=/^(?:[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 Cm=ae(_u=>{"use strict";Object.defineProperty(_u,"__esModule",{value:!0});_u.$join=void 0;var fb=function(n){return cb(n)?".".concat(n):"[".concat(JSON.stringify(n),"]")};_u.$join=fb;var cb=function(n){return mb(n)===!1&&/^[a-zA-Z_$][a-zA-Z_$0-9]*$/g.test(n)},mb=function(n){return hb.has(n)},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 Im=ae(ku=>{"use strict";Object.defineProperty(ku,"__esModule",{value:!0});ku.$number=void 0;var xb=Ds(),bb=function(n){if(isFinite(n)===!1)throw new xb.TypeGuardError({method:"typia.stringify",expected:"number",value:n,message:"Error on typia.stringify(): infinite or not a number."});return n};ku.$number=bb});var Sm=ae(Au=>{"use strict";Object.defineProperty(Au,"__esModule",{value:!0});Au.$report=void 0;var gb=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}};Au.$report=gb});var Rm=ae(Mu=>{"use strict";Object.defineProperty(Mu,"__esModule",{value:!0});Mu.$rest=void 0;var Tb=function(n){return n.length===2?"":","+n.substring(1,n.length-1)};Mu.$rest=Tb});var Pm=ae(Eu=>{"use strict";Object.defineProperty(Eu,"__esModule",{value:!0});Eu.$string=void 0;var vb=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,'"')};Eu.$string=vb});var Nm=ae(Cu=>{"use strict";Object.defineProperty(Cu,"__esModule",{value:!0});Cu.$tail=void 0;var wb=function(n){return n[n.length-1]===","?n.substring(0,n.length-1):n};Cu.$tail=wb});var Fm=ae(Mi=>{"use strict";var Vt=Mi&&Mi.__assign||function(){return Vt=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 Vt(Vt({},n.is()),{number:Ob.$number,string:Lb.$string,tail:Ub.$tail,rest:Fb.$rest,throws:e(t)})},n.clone=function(t){return Vt(Vt({},n.is()),{throws:e(t),any:_b.$any})},n.prune=function(t){return Vt(Vt({},n.is()),{throws:e(t)})},n.random=function(){return{generator:Dm.RandomGenerator,pick:Dm.RandomGenerator.pick}};var e=function(t){return function(a){throw new Om.TypeGuardError(Vt(Vt({},a),{method:"typia.".concat(t)}))}}})(Vb=Mi.Namespace||(Mi.Namespace={}))});var Lm=ae(Os=>{"use strict";Object.defineProperty(Os,"__esModule",{value:!0});Os.MapUtil=void 0;var jb;(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}}})(jb=Os.MapUtil||(Os.MapUtil={}))});var Vm=ae(Um=>{"use strict";Object.defineProperty(Um,"__esModule",{value:!0})});var Hm=ae(jm=>{"use strict";Object.defineProperty(jm,"__esModule",{value:!0})});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 dp=ae(z=>{"use strict";var Hb=z&&z.__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]}),Ei=z&&z.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Hb(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 Rr=Kl(),Ee=Fm(),qb=Lm();Ei(Vm(),z);Ei(Hm(),z);Ei(Gm(),z);Ei(Wm(),z);Ei(Jm(),z);Ei(Qm(),z);Ei(Ds(),z);function Yl(){re("assert")}z.assert=Yl;Object.assign(Yl,Ee.Namespace.assert("assert"));function Xl(){re("assertType")}z.assertType=Xl;Object.assign(Xl,Ee.Namespace.assert("assertType"));function Iu(){re("is")}z.is=Iu;Object.assign(Iu,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(n){var e,t;return n?(t=(e=Rr.$dictionary.get(n))===null||e===void 0?void 0:e.size)!==null&&t!==void 0?t:0:Rr.$dictionary.size},has:function(n){return function(e){var t,a;return(a=(t=Rr.$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=Rr.$dictionary.get(n))===null||t===void 0?void 0:t.get(e)}},insert:function(n){return function(e){return function(t){var a=qb.MapUtil.take(Rr.$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=Rr.$dictionary.get(n))===null||t===void 0?void 0:t.delete(e))!==null&&a!==void 0?a:!1}}};function Gb(){re("application")}z.application=Gb;function np(){re("assertParse")}z.assertParse=np;Object.assign(np,Ee.Namespace.assert("assertParse"));function ap(){re("isParse")}z.isParse=ap;Object.assign(ap,Iu);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 zb(){re("metadata")}z.metadata=zb;function sp(){re("random")}z.random=sp;Object.assign(sp,Ee.Namespace.random());function Wb(){re("literals")}z.literals=Wb;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 Ym(){re("createAssert")}z.createAssert=Ym;Object.assign(Ym,Yl);function Xm(){re("createAssertType")}z.createAssertType=Xm;Object.assign(Xm,Xl);function Zm(){re("createIs")}z.createIs=Zm;Object.assign(Zm,Iu);function e6(){re("createValidate")}z.createValidate=e6;Object.assign(e6,Su);function t6(){re("createAssertEquals")}z.createAssertEquals=t6;Object.assign(t6,Zl);function n6(){re("createEquals")}z.createEquals=n6;Object.assign(n6,ep);function a6(){re("createValidateEquals")}z.createValidateEquals=a6;Object.assign(a6,tp);function i6(){re("createIsParse")}z.createIsParse=i6;Object.assign(i6,ap);function r6(){re("createAssertParse")}z.createAssertParse=r6;Object.assign(r6,np);function s6(){re("createValidateParse")}z.createValidateParse=s6;Object.assign(s6,ip);function o6(){re("createStringify")}z.createStringify=o6;Object.assign(o6,rp);function u6(){re("createAssertStringify")}z.createAssertStringify=u6;Object.assign(u6,Ru);function d6(){re("createIsStringify")}z.createIsStringify=d6;Object.assign(d6,Pu);function l6(){re("createValidateStringify")}z.createValidateStringify=l6;Object.assign(l6,Nu);function p6(){re("createRandom")}z.createRandom=p6;Object.assign(p6,sp);function y6(){re("createClone")}z.createClone=y6;Object.assign(y6,op);function f6(){re("createAssertClone")}z.createAssertClone=f6;Object.assign(f6,Du);function c6(){re("createIsClone")}z.createIsClone=c6;Object.assign(c6,Ou);function m6(){re("createValidateClone")}z.createValidateClone=m6;Object.assign(m6,Bu);function h6(){re("createPrune")}z.createPrune=h6;Object.assign(h6,up);function x6(){re("createAssertPrune")}z.createAssertPrune=x6;Object.assign(x6,Fu);function b6(){re("createIsPrune")}z.createIsPrune=b6;Object.assign(b6,Lu);function g6(){re("createValidatePrune")}z.createValidatePrune=g6;Object.assign(g6,Uu);function re(n){throw new Error("Error on typia.".concat(n,'(): no transform has been configured. Run "npx typia setup" command.'))}});var v6=ae(Tn=>{"use strict";var T6=Tn&&Tn.__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]}),Kb=Tn&&Tn.__setModuleDefault||(Object.create?function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}:function(n,e){n.default=e}),Jb=Tn&&Tn.__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)&&T6(e,n,t);return Kb(e,n),e},$b=Tn&&Tn.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&T6(e,n,t)};Object.defineProperty(Tn,"__esModule",{value:!0});var Qb=Jb(dp());Tn.default=Qb;$b(dp(),Tn)});var Rl={};ji(Rl,{BaseContract:()=>lr,BigNumber:()=>F,Contract:()=>oe,ContractFactory:()=>ci,FixedNumber:()=>ft,Signer:()=>St,VoidSigner:()=>ua,Wallet:()=>on,Wordlist:()=>xn,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 L6(){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 Kp=L6(),od;(function(n){n.DEBUG="DEBUG",n.INFO="INFO",n.WARNING="WARNING",n.ERROR="ERROR",n.OFF="OFF"})(od||(od={}));var Wt;(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"})(Wt||(Wt={}));var Jp="0123456789abcdef",M=class{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){let a=e.toLowerCase();zs[a]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(Wp>zs[a])&&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,a){if(zp)return this.makeError("censored error",t,{});t||(t=M.errors.UNKNOWN_ERROR),a||(a={});let i=[];Object.keys(a).forEach(l=>{let p=a[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(a[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(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,M.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"),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,a){a?a=": "+a:a="",et&&this.throwError("too many arguments"+a,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 Yp(n){return!!n.toHexString}function Hi(n){return n.slice||(n.slice=function(){let e=Array.prototype.slice.call(arguments);return Hi(new Uint8Array(Array.prototype.slice.apply(n,e)))}),n}function aa(n){return ie(n)&&!(n.length%2)||un(n)}function Qp(n){return typeof n=="number"&&n==n&&n%1===0}function un(n){if(n==null)return!1;if(n.constructor===Uint8Array)return!0;if(typeof n=="string"||!Qp(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"){wt.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),Hi(new Uint8Array(t))}if(e.allowMissingPrefix&&typeof n=="string"&&n.substring(0,2)!=="0x"&&(n="0x"+n),Yp(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":wt.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),Hi(a)}function Zt(n){let e=j(n);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(n,e-n.length),Hi(t)}function ie(n,e){return!(typeof n!="string"||!n.match(/^0x[0-9A-Fa-f]*$/)||e&&n.length!==2+2*e)}var ud="0123456789abcdef";function W(n,e){if(e||(e={}),typeof n=="number"){wt.checkSafeUint53(n,"invalid hexlify value");let t="";for(;n;)t=ud[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),Yp(n))return n.toHexString();if(ie(n))return n.length%2&&(e.hexPad==="left"?n="0x0"+n.substring(2):e.hexPad==="right"?n+="0":wt.throwArgumentError("hex data is odd-length","value",n)),n.toLowerCase();if(un(n)){let t="0x";for(let a=0;a>4]+ud[i&15]}return t}return wt.throwArgumentError("invalid hexlify value","value",n)}function Nt(n){if(typeof n!="string")n=W(n);else if(!ie(n)||n.length%2)return null;return(n.length-2)/2}function Ce(n,e,t){return typeof n!="string"?n=W(n):(!ie(n)||n.length%2)&&wt.throwArgumentError("invalid hexData","value",n),e=2+2*e,t!=null?"0x"+n.substring(e,2+2*t):"0x"+n.substring(e)}function _t(n){let e="0x";return n.forEach(t=>{e+=W(t).substring(2)}),e}function Ln(n){let e=dd(W(n,{hexPad:"left"}));return e==="0x"?"0x0":e}function dd(n){typeof n!="string"&&(n=W(n)),ie(n)||wt.throwArgumentError("invalid hex string","value",n),n=n.substring(2);let e=0;for(;e2*e+2&&wt.throwArgumentError("value out of range","value",arguments[1]);n.length<2*e+2;)n="0x0"+n.substring(2);return n}function Un(n){let e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(aa(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]):wt.throwArgumentError("invalid signature string","signature",n),e.v<27&&(e.v===0||e.v===1?e.v+=27:wt.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=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",n),i[0]&=127;let s=W(i);e.s==null?e.s=s:e.s!==s&&wt.throwArgumentError("signature v mismatch _vs","signature",n)}if(e.recoveryParam==null)e.v==null?wt.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&&wt.throwArgumentError("signature recoveryParam mismatch v","signature",n)}e.r==null||!ie(e.r)?wt.throwArgumentError("signature missing or invalid r","signature",n):e.r=me(e.r,32),e.s==null||!ie(e.s)?wt.throwArgumentError("signature missing or invalid s","signature",n):e.s=me(e.s,32);let t=j(e.s);t[0]>=128&&wt.throwArgumentError("signature s out of range","signature",n),e.recoveryParam&&(t[0]|=128);let a=W(t);e._vs&&(ie(e._vs)||wt.throwArgumentError("signature invalid _vs","signature",n),e._vs=me(e._vs,32)),e._vs==null?e._vs=a:e._vs!==a&&wt.throwArgumentError("signature _vs mismatch v and s","signature",n)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function Br(n){return n=Un(n),W(ye([n.r,n.s,n.recoveryParam?"0x1c":"0x1b"]))}var Ws="bignumber/5.7.0";var Fr=ey.default.BN,ia=new M(Ws),ld={},Xp=9007199254740991;function ty(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"||un(n))}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()&&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?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,Lr(e)):e.match(/^-?[0-9]+$/)?new F(ld,Lr(new Fr(e))):ia.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&dn("underflow","BigNumber.from",e),(e>=Xp||e<=-Xp)&&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 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 ia.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}};function Lr(n){if(typeof n!="string")return Lr(n.toString(16));if(n[0]==="-")return n=n.substring(1),n[0]==="-"&&ia.throwArgumentError("invalid hex","value",n),n=Lr(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 Kt(n){return F.from(Lr(n))}function be(n){let e=F.from(n).toHexString();return e[0]==="-"?new Fr("-"+e.substring(3),16):new Fr(e.substring(2),16)}function dn(n,e,t){let a={fault:n,operation:e};return t!=null&&(a.value=t),ia.throwError(n,M.errors.NUMERIC_FAULT,a)}function pd(n){return new Fr(n,36).toString(16)}function yd(n){return new Fr(n,16).toString(36)}var jt=new M(Ws),Ur={},ay=F.from(0),iy=F.from(-1);function ry(n,e,t,a){let i={fault:e,operation:t};return a!==void 0&&(i.value=a),jt.throwError(n,M.errors.NUMERIC_FAULT,i)}var Vr="0";for(;Vr.length<256;)Vr+=Vr;function fd(n){if(typeof n!="number")try{n=F.from(n).toNumber()}catch{}return typeof n=="number"&&n>=0&&n<=256&&!(n%1)?"1"+Vr.substring(0,n):jt.throwArgumentError("invalid decimal size","decimals",n)}function qi(n,e){e==null&&(e=0);let t=fd(e);n=F.from(n);let a=n.lt(ay);a&&(n=n.mul(iy));let i=n.mod(t).toString();for(;i.length2&&jt.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&&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),a=r("width","number",a),i=r("decimals","number",i)}return a%8&&jt.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",a),i>80&&jt.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new ra(Ur,t,a,i)}},ft=class{constructor(e,t,a,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=a,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),a=ln(e._value,e.format.decimals);return ft.fromValue(t.add(a),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);let t=ln(this._value,this.format.decimals),a=ln(e._value,e.format.decimals);return ft.fromValue(t.sub(a),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);let t=ln(this._value,this.format.decimals),a=ln(e._value,e.format.decimals);return ft.fromValue(t.mul(a).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);let t=ln(this._value,this.format.decimals),a=ln(e._value,e.format.decimals);return ft.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=ft.from(e[0],this.format),a=!e[1].match(/^(0*)$/);return this.isNegative()&&a&&(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),a=!e[1].match(/^(0*)$/);return!this.isNegative()&&a&&(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 a=ft.from("1"+Vr.substring(0,e),this.format),i=U6.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&&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,a){return a==null&&t!=null&&!ty(t)&&(a=t,t=null),t==null&&(t=0),a==null&&(a="fixed"),ft.fromString(qi(e,t),ra.from(a))}static fromString(e,t){t==null&&(t="fixed");let a=ra.from(t),i=ln(e,a.decimals);!a.signed&&i.lt(ay)&&ry("unsigned value cannot be negative","overflow","value",e);let r=null;a.signed?r=i.toTwos(a.width).toHexString():(r=i.toHexString(),r=me(r,a.width/8));let s=qi(i,a.decimals);return new ft(Ur,r,s,a)}static fromBytes(e,t){t==null&&(t="fixed");let a=ra.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 ft(Ur,r,s,a)}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(a){if(a.code!==M.errors.INVALID_ARGUMENT)throw a}return jt.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}},ny=ft.from(1),U6=ft.from("0.5");var sy="properties/5.7.0";var V6=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Ks=new M(sy);function B(n,e,t){Object.defineProperty(n,e,{enumerable:!0,value:t,writable:!1})}function mt(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 Ie(n){return V6(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 Gi(n,e){(!n||typeof n!="object")&&Ks.throwArgumentError("invalid object","object",n),Object.keys(n).forEach(t=>{e[t]||Ks.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 j6={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function oy(n){if(n==null||j6[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;tct(e)));if(typeof n=="object"){let e={};for(let t in n){let a=n[t];a!==void 0&&B(e,t,ct(a))}return e}return Ks.throwArgumentError(`Cannot deepCopy ${typeof n}`,"object",n)}function ct(n){return H6(n)}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},q6={calldata:!0,memory:!0};function Js(n,e){if(n==="bytes"||n==="string"){if(uy[e])return!0}else if(n==="address"){if(e==="payable")return!0}else if((n.indexOf("[")>=0||n==="tuple")&&q6[e])return!0;return(uy[e]||e==="payable")&&Te.throwArgumentError("invalid modifier","name",e),!1}function G6(n,e){let t=n;function a(o){Te.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!==ge.sighash&&(t+=this.type),t+="("+this.components.map(a=>a.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:zi(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(pt.fromObject):null})}static fromString(e,t){function a(i){return pt.fromObject({name:i.name,type:i.type,indexed:i.indexed,components:i.components})}return a(G6(e,!!t))}static isParamType(e){return!!(e!=null&&e._isParamType)}};function jr(n,e){return K6(n).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(a=>JSON.parse(a.format(e)))});let t="";return e!==ge.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map(a=>a.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(ri,t)}static fromString(e){let t=e.match(qr);t||Te.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:Te.warn("unknown modifier: "+i)}}),Ht.fromObject({name:t[1].trim(),anonymous:a,inputs:jr(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}};function ly(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 py(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 yy(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 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(a=>JSON.parse(a.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(a=>a.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 a={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,a)}static fromString(e){let t={type:"constructor"};e=ly(e,t);let a=e.match(qr);return(!a||a[1].trim()!=="constructor")&&Te.throwArgumentError("invalid constructor string","value",e),t.inputs=jr(a[2].trim(),!1),py(a[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(a=>JSON.parse(a.format(e))),outputs:this.outputs.map(a=>JSON.parse(a.format(e)))});let t="";return e!==ge.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map(a=>a.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(a=>a.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),a={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 Ot(ri,a)}static fromString(e){let t={type:"function"};e=ly(e,t);let a=e.split(" returns ");a.length>2&&Te.throwArgumentError("invalid function string","value",e);let i=a[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),a.length>1){let r=a[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 Ot.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}};function dy(n){let e=n.format();return(e==="Error(string)"||e==="Panic(uint256)")&&Te.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",n),n}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(a=>JSON.parse(a.format(e)))});let t="";return e!==ge.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map(a=>a.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(ri,t))}static fromString(e){let t={type:"error"},a=e.match(qr);return a||Te.throwArgumentError("invalid error signature","value",e),t.name=a[1].trim(),t.name&&Hr(t.name),t.inputs=jr(a[2],!1),dy(tn.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}};function zi(n){return n.match(/^uint($|[^1-9])/)?n="uint256"+n.substring(4):n.match(/^int($|[^1-9])/)&&(n="int256"+n.substring(3)),n}var W6=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function Hr(n){return(!n||!n.match(W6))&&Te.throwArgumentError(`invalid identifier "${n}"`,"value",n),n}var qr=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function K6(n){n=n.trim();let e=[],t="",a=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,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):oi.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: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 a=this._peekBytes(0,e,!!t);return this._offset+=a.length,a.slice(0,e)}readValue(){return F.from(this.readBytes(this.wordSize))}};var cy=_n(fy());function fe(n){return"0x"+cy.default.keccak_256(j(n))}var Ys={};ji(Ys,{decode:()=>Gr,encode:()=>sa});var my="rlp/5.7.0";var jn=new M(my);function hy(n){let e=[];for(;n;)e.unshift(n&255),n>>=8;return e}function xy(n,e,t){let a=0;for(let i=0;ie+1+a&&jn.throwError("child data too short",M.errors.BUFFER_OVERRUN,{})}return{consumed:1+a,result:i}}function Ty(n,e){if(n.length===0&&jn.throwError("data too short",M.errors.BUFFER_OVERRUN,{}),n[e]>=248){let t=n[e]-247;e+1+t>n.length&&jn.throwError("data short segment too short",M.errors.BUFFER_OVERRUN,{});let a=xy(n,e+1,t);return e+1+t+a>n.length&&jn.throwError("data long segment too short",M.errors.BUFFER_OVERRUN,{}),by(n,e,e+1+t,t+a)}else if(n[e]>=192){let t=n[e]-192;return e+1+t>n.length&&jn.throwError("data array too short",M.errors.BUFFER_OVERRUN,{}),by(n,e,e+1,t)}else if(n[e]>=184){let t=n[e]-183;e+1+t>n.length&&jn.throwError("data array too short",M.errors.BUFFER_OVERRUN,{});let a=xy(n,e+1,t);e+1+t+a>n.length&&jn.throwError("data array too short",M.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&&jn.throwError("data too short",M.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 Gr(n){let e=j(n),t=Ty(e,0);return t.consumed!==e.length&&jn.throwArgumentError("invalid rlp data","data",n),t.result}var vy="address/5.7.0";var Ma=new M(vy);function wy(n){ie(n,20)||Ma.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 J6=9007199254740991;function $6(n){return Math.log10?Math.log10(n):Math.log(n)/Math.LN10}var md={};for(let n=0;n<10;n++)md[String(n)]=String(n);for(let n=0;n<26;n++)md[String.fromCharCode(65+n)]=String(10+n);var _y=Math.floor($6(J6));function ky(n){n=n.toUpperCase(),n=n.substring(4)+n.substring(0,2)+"00";let e=n.split("").map(a=>md[a]).join("");for(;e.length>=_y;){let a=e.substring(0,_y);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 ce(n){let e=null;if(typeof n!="string"&&Ma.throwArgumentError("invalid address","address",n),n.match(/^(0x)?[0-9a-fA-F]{40}$/))n.substring(0,2)!=="0x"&&(n="0x"+n),e=wy(n),n.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==n&&Ma.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)!==ky(n)&&Ma.throwArgumentError("bad icap checksum","address",n),e=pd(n.substring(4));e.length<40;)e="0"+e;e=wy("0x"+e)}else Ma.throwArgumentError("invalid address","address",n);return e}function Ay(n){try{return ce(n),!0}catch{}return!1}function My(n){let e=yd(ce(n).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+ky("XE00"+e)+e}function ui(n){let e=null;try{e=ce(n.from)}catch{Ma.throwArgumentError("missing from address","transaction",n)}let t=Zt(j(F.from(n.nonce).toHexString()));return ce(Ce(fe(sa([e,t])),12))}function Ey(n,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(Ce(fe(ye(["0xff",ce(n),e,t])),12))}var Xs=class extends kt{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=ce(t)}catch(a){this._throwError(a.message,t)}return e.writeValue(t)}decode(e){return ce(me(e.readValue().toHexString(),20))}};var Zs=class extends kt{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(Vn);function hd(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 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!==a.length&&Ki.throwArgumentError("types/value length mismatch","tuple",t);let i=new si(n.wordSize),r=new si(n.wordSize),s=[];e.forEach((l,p)=>{let f=a[p];if(l.dynamic){let x=r.length;l.encode(r,f);let I=i.writeUpdatableValue();s.push(_=>{I(_+x)})}else l.encode(i,f)}),s.forEach(l=>{l(i.length)});let o=n.appendWriter(i);return o+=n.appendWriter(r),o}function xd(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===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(n)}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 kt{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&&Ki.throwError("insufficient data length",M.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let a=[];for(let i=0;iro,EtherSymbol:()=>Py,HashZero:()=>$i,MaxInt256:()=>Ry,MaxUint256:()=>uo,MinInt256:()=>Sy,NegativeOne:()=>so,One:()=>oo,Two:()=>Cy,WeiPerEther:()=>Iy,Zero:()=>Ji});var ro="0x0000000000000000000000000000000000000000";var so=F.from(-1),Ji=F.from(0),oo=F.from(1),Cy=F.from(2),Iy=F.from("1000000000000000000"),uo=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),Sy=F.from("-0x8000000000000000000000000000000000000000000000000000000000000000"),Ry=F.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");var $i="0x0000000000000000000000000000000000000000000000000000000000000000";var Py="\u039E";var lo=class extends kt{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=uo.mask(e.wordSize*8);if(this.signed){let r=i.mask(this.size*8-1);(a.gt(r)||a.lt(r.add(oo).mul(so)))&&this._throwError("value out-of-bounds",t)}else(a.lt(Ji)||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 Ny="strings/5.7.0";var Dy=new M(Ny),Gt;(function(n){n.current="",n.NFC="NFC",n.NFD="NFD",n.NFKC="NFKC",n.NFKD="NFKD"})(Gt||(Gt={}));var Bt;(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"})(Bt||(Bt={}));function Q6(n,e,t,a,i){return Dy.throwArgumentError(`invalid codepoint at offset ${e}; ${n}`,"bytes",t)}function Oy(n,e,t,a,i){if(n===Bt.BAD_PREFIX||n===Bt.UNEXPECTED_CONTINUE){let r=0;for(let s=e+1;s>6===2;s++)r++;return r}return n===Bt.OVERRUN?t.length-e-1:0}function Y6(n,e,t,a,i){return n===Bt.OVERLONG?(a.push(i),0):(a.push(65533),Oy(n,e,t,a,i))}var po=Object.freeze({error:Q6,ignore:Oy,replace:Y6});function gd(n,e){e==null&&(e=po.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(Bt.UNEXPECTED_CONTINUE,a-1,n,t):a+=e(Bt.BAD_PREFIX,a-1,n,t);continue}if(a-1+r>=n.length){a+=e(Bt.OVERRUN,a-1,n,t);continue}let o=i&(1<<8-r-1)-1;for(let l=0;l1114111){a+=e(Bt.OUT_OF_RANGE,a-1-r,n,t,o);continue}if(o>=55296&&o<=57343){a+=e(Bt.UTF16_SURROGATE,a-1-r,n,t,o);continue}if(o<=s){a+=e(Bt.OVERLONG,a-1-r,n,t,o);continue}t.push(o)}}return t}function ve(n,e=Gt.current){e!=Gt.current&&(Dy.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 bd(n){let e="0000"+n.toString(16);return"\\u"+e.substring(e.length-4)}function Td(n,e){return'"'+gd(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?bd(t):(t-=65536,bd((t>>10&1023)+55296)+bd((t&1023)+56320))}).join("")+'"'}function yo(n){return n.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function Jt(n,e){return yo(gd(n,e))}function Ea(n,e=Gt.current){return gd(ve(n,e))}function vd(n){let e=ve(n);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return W(ye([e,$i]).slice(0,32))}function wd(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 Jt(e.slice(0,t))}function X6(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 By(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 kd(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 Z6=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"),e2="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(n=>parseInt(n,16)),t2=[{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}],n2=_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"),a2=_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"),i2=_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",X6),r2=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 s2(n){return n.reduce((e,t)=>(t.forEach(a=>{e.push(a)}),e),[])}function o2(n){return!!kd(n,Z6)}function u2(n){let e=kd(n,t2);if(e)return[n+e.s];let t=n2[n];if(t)return t;let a=a2[n];if(a)return[n+a[0]];let i=i2[n];return i||null}function d2(n){return!!kd(n,r2)}function Ad(n){if(n.match(/^[a-z0-9-]*$/i)&&n.length<=59)return n.toLowerCase();let e=Ea(n);e=s2(e.map(a=>{if(e2.indexOf(a)>=0)return[];if(a>=65024&&a<=65039)return[];let i=u2(a);return i||[a]})),e=Ea(yo(e),Gt.NFKC),e.forEach(a=>{if(d2(a))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(a=>{if(o2(a))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 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 di=class extends kt{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 hd(e,this.coders,t)}decode(e){return e.coerce(this.name,xd(e,this.coders))}};var co=new M(Vn),l2=new RegExp(/^bytes([0-9]*)$/),p2=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 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(a=>this._getCoder(a)),e.name);case"":return new io(e.name)}let t=e.type.match(p2);if(t){let a=parseInt(t[2]||"256");return(a===0||a>256||a%8!==0)&&co.throwArgumentError("invalid "+t[1]+" bit length","param",e),new lo(a/8,t[1]==="int",e.name)}if(t=e.type.match(l2),t){let a=parseInt(t[1]);return(a===0||a>32)&&co.throwArgumentError("invalid bytes length","param",e),new ao(a,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 a=e.map(s=>this._getCoder(pt.from(s))),i=new di(a,"_"),r=this._getWriter();return i.encode(r,t),r.data}decode(e,t,a){let i=e.map(s=>this._getCoder(pt.from(s)));return new di(i,"_").decode(this._getReader(j(t),a))}},Wr=new Qi;function nn(n){return fe(ve(n))}var mo="hash/5.7.0";var Md={};ji(Md,{decode:()=>Yi,encode:()=>Xi});function Yi(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 y2(n){let e={};for(let t=0;t>--l&1}let x=31,I=Math.pow(2,x),_=I>>>1,v=_>>1,S=I-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=a-4;return O.map(J=>{switch(J-E){case 3:return E+65792+(n[o++]<<16|n[o++]<<8|n[o++]);case 2:return E+256+(n[o++]<<8|n[o++]);case 1:return E+n[o++];default:return J-1}})}function c2(n){let e=0;return()=>n[e++]}function Uy(n){return c2(f2(n))}function m2(n){return n&1?~n>>1:n>>1}function h2(n,e){let t=Array(n);for(let a=0;ae[s]):t}function Vy(n){let e=[];for(;;){let t=n();if(t==0)break;e.push(g2(t,n))}for(;;){let t=n()-1;if(t<0)break;e.push(T2(t,n))}return y2(Ly(e))}function b2(n){let e=[];for(;;){let t=n();if(t==0)break;e.push(t)}return e}function jy(n,e,t){let a=Array(n).fill(void 0).map(()=>[]);for(let i=0;ia[s].push(r));return a}function g2(n,e){let t=1+e(),a=e(),i=b2(e),r=jy(i.length,1+n,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 I=x*a;return[l+x*t,p.map(_=>_+I)]})}))}function T2(n,e){let t=1+e();return jy(t,1+n,e).map(i=>[i[0],i.slice(1)])}function Hy(n){let e=Kr(n).sort((a,i)=>a-i);return t();function t(){let a=[];for(;;){let p=Kr(n,e);if(p.length==0)break;a.push({set:new Set(p),node:t()})}a.sort((p,f)=>f.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 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(),v2=new Set(Kr(ho)),w2=new Set(Kr(ho)),_2=Vy(ho),k2=Hy(ho),Gy=45,zy=95;function Wy(n){return Ea(n)}function A2(n){return n.filter(e=>e!=65039)}function Ky(n){for(let e of n.split(".")){let t=Wy(e);try{for(let a=t.lastIndexOf(zy)-1;a>=0;a--)if(t[a]!==zy)throw new Error("underscore only allowed at start");if(t.length>=4&&t.every(a=>a<128)&&t[2]===Gy&&t[3]===Gy)throw new Error("invalid label extension")}catch(a){throw new Error(`Invalid label "${e}": ${a.message}`)}}return n}function Jy(n){return Ky(M2(n,A2))}function M2(n,e){let t=Wy(n).reverse(),a=[];for(;t.length;){let i=C2(t);if(i){a.push(...e(i));continue}let r=t.pop();if(v2.has(r)){a.push(r);continue}if(w2.has(r))continue;let s=_2[r];if(s){a.push(...s);continue}throw new Error(`Disallowed codepoint: 0x${r.toString(16).toUpperCase()}`)}return Ky(E2(String.fromCodePoint(...a)))}function E2(n){return n.normalize("NFC")}function C2(n,e){var t;let a=k2,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 I2=new M(mo),Qy=new Uint8Array(32);Qy.fill(0);function $y(n){if(n.length===0)throw new Error("invalid ENS name; empty component");return n}function Ed(n){let e=ve(Jy(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($y(e.slice(a))),t}function Cd(n){try{return Ed(n).length!==0}catch{}return!1}function Ca(n){typeof n!="string"&&I2.throwArgumentError("invalid ENS name; not a string","name",n);let e=Qy,t=Ed(n);for(;t.length;)e=fe(ye([e,fe(t.pop())]));return W(e)}function Jr(n){return W(ye(Ed(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 Yy=`Ethereum Signed Message: -`;function Zi(n){return typeof n=="string"&&(n=ve(n)),fe(ye([ve(Yy),ve(String(n.length)),n]))}var S2=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},xt=new M(mo),t0=new Uint8Array(32);t0.fill(0);var R2=F.from(-1),n0=F.from(0),a0=F.from(1),P2=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function N2(n){let e=j(n),t=e.length%32;return t?_t([e,t0.slice(t)]):W(e)}var D2=me(a0.toHexString(),32),O2=me(n0.toHexString(),32),Xy={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Id=["name","version","chainId","verifyingContract","salt"];function Zy(n){return function(e){return typeof e!="string"&&xt.throwArgumentError(`invalid domain value for ${JSON.stringify(n)}`,`domain.${n}`,e),e}}var B2={name:Zy("name"),version:Zy("version"),chainId:function(n){try{return F.from(n).toString()}catch{}return xt.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",n)},verifyingContract:function(n){try{return ce(n).toLowerCase()}catch{}return xt.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 xt.throwArgumentError('invalid domain value "salt"',"domain.salt",n)}};function Sd(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))&&xt.throwArgumentError("invalid numeric width","type",n);let i=P2.mask(t?a-1:a),r=t?i.add(a0).mul(R2):n0;return function(s){let o=F.from(s);return(o.lt(r)||o.gt(i))&&xt.throwArgumentError(`value out-of-bounds for ${n}`,"value",s),me(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))&&xt.throwArgumentError("invalid bytes width","type",n),function(a){return j(a).length!==t&&xt.throwArgumentError(`invalid length for ${n}`,"value",a),N2(a)}}}switch(n){case"address":return function(e){return me(ce(e),32)};case"bool":return function(e){return e?D2:O2};case"bytes":return function(e){return fe(e)};case"string":return function(e){return nn(e)}}return null}function e0(n,e){return`${n}(${e.map(({name:t,type:a})=>a+" "+t).join(",")})`}var bt=class{constructor(e){B(this,"types",Object.freeze(ct(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]&&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)&&(a[f]||xt.throwArgumentError(`unknown type ${JSON.stringify(f)}`,"types",e),a[f].push(o),t[o][f]=!0)})}let r=Object.keys(a).filter(o=>a[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=>{!a[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(_t(l))}}let a=this.types[e];if(a){let i=nn(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),_t(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,a){if(Sd(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&&xt.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),{}):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,a){return bt.from(t).hashStruct(e,a)}static hashDomain(e){let t=[];for(let a in e){let i=Xy[a];i||xt.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(a)}`,"domain",e),t.push({name:a,type:i})}return t.sort((a,i)=>Id.indexOf(a.name)-Id.indexOf(i.name)),bt.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,a){return _t(["0x1901",bt.hashDomain(e),bt.from(t).hash(a)])}static hash(e,t,a){return fe(bt.encode(e,t,a))}static resolveNames(e,t,a,i){return S2(this,void 0,void 0,function*(){e=we(e);let r={};e.verifyingContract&&!ie(e.verifyingContract,20)&&(r[e.verifyingContract]="0x");let s=bt.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){bt.hashDomain(e);let i={},r=[];Id.forEach(l=>{let p=e[l];p!=null&&(i[l]=B2[l](p),r.push({name:l,type:Xy[l]}))});let s=bt.from(t),o=we(t);return o.EIP712Domain?xt.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"&&xt.throwArgumentError("invalid string","value",p),p}return xt.throwArgumentError("unsupported type","type",l)})}}};var gt=new M(Vn);var er=class extends en{},tr=class extends en{},Rd=class extends en{},oa=class extends en{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 i0(n,e){let t=new Error(`deferred error during ABI decoding triggered accessing ${n}`);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(a=>qt.from(a)).filter(a=>a!=null)),B(this,"_abiCoder",mt(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){gt.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]){gt.warn("duplicate definition - "+r);return}i[r]=a}),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(a=>a.format(e));return e===ge.json?JSON.stringify(t.map(a=>JSON.parse(a))):t}static getAbiCoder(){return Wr}static getAddress(e){return ce(e)}static getSighash(e){return Ce(nn(e.format()),0,4)}static getEventTopic(e){return nn(e.format())}getFunction(e){if(ie(e)){for(let a in this.functions)if(e===this.getSighash(a))return this.functions[a];gt.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?gt.throwArgumentError("no matching function","name",a):i.length>1&>.throwArgumentError("multiple matching functions","name",a),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 a=e.toLowerCase();for(let i in this.events)if(a===this.getEventTopic(i))return this.events[i];gt.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?gt.throwArgumentError("no matching event","name",a):i.length>1&>.throwArgumentError("multiple matching events","name",a),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 a=mt(this.constructor,"getSighash");for(let i in this.errors){let r=this.errors[i];if(e===a(r))return this.errors[i]}gt.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?gt.throwArgumentError("no matching error","name",a):i.length>1&>.throwArgumentError("multiple matching errors","name",a),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 a=j(t);return W(a.slice(0,4))!==this.getSighash(e)&>.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(ye([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)&>.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(ye([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)),f=F2[p];if(f)s=this._abiCoder.decode(f.inputs,a.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,a.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 a=[];e.anonymous||a.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?a.push(null):o.baseType==="array"||o.baseType==="tuple"?gt.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&>.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(nn(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 I=this.getEventTopic(e);(!ie(a[0],32)||a[0].toLowerCase()!==I)&>.throwError("fragment/topic mismatch",M.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:I,value:a[0]}),a=a.slice(1)}let i=[],r=[],s=[];e.inputs.forEach((I,_)=>{I.indexed?I.type==="string"||I.type==="bytes"||I.baseType==="tuple"||I.baseType==="array"?(i.push(pt.fromObject({type:"bytes32",name:I.name})),s.push(!0)):(i.push(I),s.push(!1)):(r.push(I),s.push(!1))});let o=a!=null?this._abiCoder.decode(i,ye(a)):null,l=this._abiCoder.decode(r,t,!0),p=[],f=0,x=0;e.inputs.forEach((I,_)=>{if(I.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(I.name&&p[I.name]==null){let v=p[_];v instanceof Error?Object.defineProperty(p,I.name,{enumerable:!0,get:()=>{throw i0(`property ${JSON.stringify(I.name)}`,v)}}):p[I.name]=v}});for(let I=0;I{throw i0(`index ${I}`,_)}})}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),a=this.getError(t.substring(0,10).toLowerCase());return a?new Rd({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 r0="abstract-provider/5.7.0";var L2=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},U2=new M(r0),xo=class extends en{static isForkEvent(e){return!!(e&&e._isForkEvent)}};var $t=class{constructor(){U2.checkAbstract(new.target,$t),B(this,"_isProvider",!0)}getFeeData(){return L2(this,void 0,void 0,function*(){let{block:e,gasPrice:t}=yield Ie({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 s0="abstract-signer/5.7.0";var kn=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},pn=new M(s0),V2=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],j2=[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 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 a=yield Ie(this.checkTransaction(e));return yield this.provider.call(a,t)})}sendTransaction(e){return kn(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 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 a in e)V2.indexOf(a)===-1&&pn.throwArgumentError("invalid transaction key: "+a,"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(a=>(a[0].toLowerCase()!==a[1].toLowerCase()&&pn.throwArgumentError("from address mismatch","transaction",e),a[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&&pn.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)?pn.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(t.type===0||t.type===1)&&a&&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?(a&&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(j2.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 Ie(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,a){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 dr(n,e,t){return t={path:e,exports:{},require:function(a,i){return lx(a,i??t.path)}},n(t,t.exports),t.exports}function lx(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var zd=G0;function G0(n,e){if(!n)throw new Error(e||"Assertion failed")}G0.equal=function(e,t,a){if(e!=t)throw new Error(a||"Assertion failed: "+e+" != "+t)};var Cn=dr(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,I=f&255;x?l.push(x,I):l.push(I)}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(I>>1)-1?S=(I>>1)-L:S=L,_.isubn(S)):S=0,x[v]=S,_.iushrn(1)}return x}t.getNAF=a;function i(l,p){var f=[[],[]];l=l.clone(),p=p.clone();for(var x=0,I=0,_;l.cmpn(-x)>0||p.cmpn(-I)>0;){var v=l.andln(3)+x&3,S=p.andln(3)+I&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)+I&7,(_===3||_===5)&&v===2?O=-S:O=S),f[1].push(O),2*x===L+1&&(x=1-x),2*I===O+1&&(I=1-I),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,px=an.getJSF,_o=an.assert;function Pa(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 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 a=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),I=r;I>0;I--){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,a,i,r){var s=this._wnafT1,o=this._wnafT2,l=this._wnafT3,p=0,f,x,I;for(f=0;f=1;f-=2){var v=f-1,S=f;if(s[v]!==1||s[S]!==1){l[v]=wo(a[v],s[v],this._bitLength),l[S]=wo(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=px(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;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?I=o[x][R-1>>1]:R<0&&(I=o[x][-R-1>>1].neg()),I.type==="affine"?J=J.mixedAdd(I):J=J.add(I))}}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 a=[this],i=this,r=0;r=0&&(_=p,v=f),x.negative&&(x=x.neg(),I=I.neg()),_.negative&&(_=_.neg(),v=v.neg()),[{a:x,b:I},{a:_,b:v}]};cn.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),f=s.mul(i.b),x=e.sub(o).sub(l),I=p.add(f).neg();return{k1:x,k2:I}};cn.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)};cn.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};cn.prototype._endoWnafMulAdd=function(e,t,a){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 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)};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,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)};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,a){var i=[this,t],r=[e,a];return this.curve.endo?this.curve._endoWnafMulAdd(i,r):this.curve._wnafMulAdd(1,i,r,2)};Et.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)};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 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};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(n,e,t,a){pi.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}Wd(Pt,pi.BasePoint);cn.prototype.jpoint=function(e,t,a){return new Pt(this,e,t,a)};Pt.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)};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(),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 f=l.redSqr(),x=f.redMul(l),I=i.redMul(f),_=p.redSqr().redIAdd(x).redISub(I).redISub(I),v=p.redMul(I.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(),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(),f=p.redMul(o),x=a.redMul(p),I=l.redSqr().redIAdd(f).redISub(x).redISub(x),_=l.redMul(x.redISub(I)).redISub(r.redMul(f)),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 a=this;for(t=0;t=0)return!1;if(a.redIAdd(r),this.x.cmp(a)===0)return!0}};Pt.prototype.inspect=function(){return this.isInfinity()?"":""};Pt.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var To=dr(function(n,e){"use strict";var t=e;t.base=pi,t.short=fx,t.mont=null,t.edwards=null}),vo=dr(function(n,e){"use strict";var t=e,a=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,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: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(n){if(!(this instanceof Ra))return new Ra(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=Cn.toArray(n.entropy,n.entropyEnc||"hex"),t=Cn.toArray(n.nonce,n.nonceEnc||"hex"),a=Cn.toArray(n.pers,n.persEnc||"hex");zd(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,t,a)}var z0=Ra;Ra.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};Ra.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=Cn.toArray(a,i||"hex"),this._update(a));for(var r=[];r.length"};var cx=an.assert;function ko(n,e){if(n instanceof ko)return n;this._importDER(n,e)||(cx(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 Ao=ko;function mx(){this.place=0}function Hd(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 q0(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)}ko.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=q0(t),a=q0(a);!a[0]&&!(a[1]&128);)a=a.slice(1);var i=[2];qd(i,t.length),i=i.concat(t),i.push(2),qd(i,a.length);var r=i.concat(a),s=[48];return qd(s,r.length),s=s.concat(r),an.encode(s,e)};var hx=function(){throw new Error("unsupported")},W0=an.assert;function yn(n){if(!(this instanceof yn))return new yn(n);typeof n=="string"&&(W0(Object.prototype.hasOwnProperty.call(vo,n),"Unknown curve "+n),n=vo[n]),n instanceof vo.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 xx=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 z0({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||hx(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)}};yn.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};yn.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 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 I=this.g.mul(x);if(!I.isInfinity()){var _=I.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=(I.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,a,i){e=this._truncateToN(new pe.default(e,16)),a=this.keyFromPublic(a,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,a.getPublic(),p),f.isInfinity()?!1:f.eqXToP(r)):(f=this.g.mulAdd(l,a.getPublic(),p),f.isInfinity()?!1:f.getX().umod(this.n).cmp(r)===0)};yn.prototype.recoverPubKey=function(n,e,t,a){W0((3&t)===t,"The recovery param is more than two bits"),e=new Ao(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 f=e.r.invm(i),x=i.sub(r).mul(f).umod(i),I=o.mul(f).umod(i);return this.g.mulAdd(x,s,I)};yn.prototype.getKeyRecoveryParam=function(n,e,t,a){if(e=new Ao(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 bx=dr(function(n,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=xx,t.eddsa=null}),K0=bx.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 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)),a=$n().keyFromPublic(j(e));return"0x"+t.pub.add(a.pub).encodeCompressed("hex")}signDigest(e){let t=$n().keyFromPrivate(j(this.privateKey)),a=j(e);a.length!==32&&$d.throwArgumentError("bad digest length","digest",e);let i=t.sign(a,{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)),a=$n().keyFromPublic(j(Yr(e)));return me("0x"+t.derive(a.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}};function Mo(n,e){let t=Un(e),a={r:j(t.r),s:j(t.s)};return"0x"+$n().recoverPubKey(j(n),a,t.recoveryParam).encode("hex",!1)}function Yr(n,e){let t=j(n);if(t.length===32){let a=new mn(t);return e?"0x"+$n().keyFromPrivate(t).getPublic(!0,"hex"):a.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(n){n[n.legacy=0]="legacy",n[n.eip2930=1]="eip2930",n[n.eip1559=2]="eip1559"})(Eo||(Eo={}));function Yd(n){return n==="0x"?null:ce(n)}function Lt(n){return n==="0x"?Ji:F.from(n)}var gx=[{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"}],Tx={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function hn(n){let e=Yr(n);return ce(Ce(fe(Ce(e,1)),12))}function yi(n,e){return hn(Mo(j(n),e))}function rn(n,e){let t=Zt(F.from(n).toHexString());return t.length>32&&Ut.throwArgumentError("invalid length for "+e,"transaction:"+e,n),t}function Qd(n,e){return{address:ce(n),storageKeys:(e||[]).map((t,a)=>(Nt(t)!==32&&Ut.throwArgumentError("invalid access list storageKey",`accessList[${n}:${a}]`,t),t.toLowerCase()))}}function sn(n){if(Array.isArray(n))return n.map((t,a)=>Array.isArray(t)?(t.length>2&&Ut.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${a}]`,t),Qd(t[0],t[1])):Qd(t.address,t.storageKeys));let e=Object.keys(n).map(t=>{let a=n[t].reduce((i,r)=>(i[r]=!0,i),{});return Qd(t,Object.keys(a).sort())});return e.sort((t,a)=>t.address.localeCompare(a.address)),e}function Q0(n){return sn(n).map(e=>[e.address,e.storageKeys])}function Y0(n,e){if(n.gasPrice!=null){let a=F.from(n.gasPrice),i=F.from(n.maxFeePerGas||0);a.eq(i)||Ut.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:a,maxFeePerGas:i})}let t=[rn(n.chainId||0,"chainId"),rn(n.nonce||0,"nonce"),rn(n.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),rn(n.maxFeePerGas||0,"maxFeePerGas"),rn(n.gasLimit||0,"gasLimit"),n.to!=null?ce(n.to):"0x",rn(n.value||0,"value"),n.data||"0x",Q0(n.accessList||[])];if(e){let a=Un(e);t.push(rn(a.recoveryParam,"recoveryParam")),t.push(Zt(a.r)),t.push(Zt(a.s))}return _t(["0x02",sa(t)])}function X0(n,e){let t=[rn(n.chainId||0,"chainId"),rn(n.nonce||0,"nonce"),rn(n.gasPrice||0,"gasPrice"),rn(n.gasLimit||0,"gasLimit"),n.to!=null?ce(n.to):"0x",rn(n.value||0,"value"),n.data||"0x",Q0(n.accessList||[])];if(e){let a=Un(e);t.push(rn(a.recoveryParam,"recoveryParam")),t.push(Zt(a.r)),t.push(Zt(a.s))}return _t(["0x01",sa(t)])}function vx(n,e){Gi(n,Tx);let t=[];gx.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&&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 a=0;if(n.chainId!=null?(a=n.chainId,typeof a!="number"&&Ut.throwArgumentError("invalid transaction.chainId","transaction",n)):e&&!aa(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 sa(t);let i=Un(e),r=27+i.recoveryParam;return a!==0?(t.pop(),t.pop(),t.pop(),r+=a*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 Xr(n,e){if(n.type==null||n.type===0)return n.accessList!=null&&Ut.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",n),vx(n,e);switch(n.type){case 1:return X0(n,e);case 2:return Y0(n,e);default:break}return Ut.throwError(`unsupported transaction type: ${n.type}`,M.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:n.type})}function Z0(n,e,t){try{let a=Lt(e[0]).toNumber();if(a!==0&&a!==1)throw new Error("bad recid");n.v=a}catch{Ut.throwArgumentError("invalid v for transaction type: 1","v",e[0])}n.r=me(e[1],32),n.s=me(e[2],32);try{let a=fe(t(n));n.from=yi(a,{r:n.r,s:n.s,recoveryParam:n.v})}catch{}}function wx(n){let e=Gr(n.slice(1));e.length!==9&&e.length!==12&&Ut.throwArgumentError("invalid component count for transaction type: 2","payload",W(n));let t=Lt(e[2]),a=Lt(e[3]),i={type:2,chainId:Lt(e[0]).toNumber(),nonce:Lt(e[1]).toNumber(),maxPriorityFeePerGas:t,maxFeePerGas:a,gasPrice:null,gasLimit:Lt(e[4]),to:Yd(e[5]),value:Lt(e[6]),data:e[7],accessList:sn(e[8])};return e.length===9||(i.hash=fe(n),Z0(i,e.slice(9),Y0)),i}function _x(n){let e=Gr(n.slice(1));e.length!==8&&e.length!==11&&Ut.throwArgumentError("invalid component count for transaction type: 1","payload",W(n));let t={type:1,chainId:Lt(e[0]).toNumber(),nonce:Lt(e[1]).toNumber(),gasPrice:Lt(e[2]),gasLimit:Lt(e[3]),to:Yd(e[4]),value:Lt(e[5]),data:e[6],accessList:sn(e[7])};return e.length===8||(t.hash=fe(n),Z0(t,e.slice(8),X0)),t}function kx(n){let e=Gr(n);e.length!==9&&e.length!==6&&Ut.throwArgumentError("invalid raw transaction","rawTransaction",n);let t={nonce:Lt(e[0]).toNumber(),gasPrice:Lt(e[1]),gasLimit:Lt(e[2]),to:Yd(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 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(sa(i));try{t.from=yi(r,{r:W(t.r),s:W(t.s),recoveryParam:a})}catch{}t.hash=fe(n)}return t.type=null,t}function Co(n){let e=j(n);if(e[0]>127)return kx(e);switch(e[0]){case 1:return _x(e);case 2:return wx(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(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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Se=new M(ef),Ax={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(n,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{}n||Se.throwError("a provider or signer is needed to resolve ENS names",M.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});let a=yield n.resolveName(t);return a==null&&Se.throwArgumentError("resolver or addr is not configured for ENS name","name",t),a})}function Zr(n,e,t){return Na(this,void 0,void 0,function*(){return Array.isArray(t)?yield Promise.all(t.map((a,i)=>Zr(n,Array.isArray(e)?e[i]:e[a.name],a))):t.type==="address"?yield Io(n,e):t.type==="tuple"?yield Zr(n,e,t.components):t.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(a=>Zr(n,a,t.arrayChildren))):Promise.reject(Se.makeError("invalid value for array",M.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function Po(n,e,t){return Na(this,void 0,void 0,function*(){let a={};t.length===e.inputs.length+1&&typeof t[t.length-1]=="object"&&(a=we(t.pop())),Se.checkArgumentCount(t.length,e.inputs.length,"passed to contract"),n.signer?a.from?a.from=Ie({override:Io(n.signer,a.from),signer:n.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})):a.from=n.signer.getAddress():a.from&&(a.from=Io(n.provider,a.from));let i=yield Ie({args:Zr(n.signer||n.provider,t,e.inputs),address:n.resolvedAddress,overrides:Ie(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=sn(o.accessList)),s.gasLimit==null&&e.gas!=null){let p=21e3,f=j(r);for(let x=0;xa[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 Mx(n,e){return function(...t){return Po(n,e,t)}}function Ex(n,e){let t=n.signer||n.provider;return function(...a){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(n,e,a);return yield t.estimateGas(i)})}}function nf(n,e){let t=e.wait.bind(e);e.wait=a=>t(a).then(i=>(i.events=i.logs.map(r=>{let s=ct(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 af(n,e,t){let a=n.signer||n.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=we(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 Po(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===M.errors.CALL_EXCEPTION&&(l.address=n.address,l.args=i,l.transaction=s),l}})}}function Cx(n,e){return function(...t){return Na(this,void 0,void 0,function*(){n.signer||Se.throwError("sending a transaction requires a signer",M.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),n.deployTransaction!=null&&(yield n._deployed());let a=yield Po(n,e,t),i=yield n.signer.sendTransaction(a);return nf(n,i),i})}}function tf(n,e,t){return e.constant?af(n,e,t):Cx(n,e)}function rf(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 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(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]}},Xd=class extends fi{constructor(){super("error",null)}},So=class extends fi{constructor(e,t,a,i){let r={address:e},s=t.getEventTopic(a);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",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=Wi(e.args);if(t.length)throw t[0].error;let a=(e.args||[]).slice();return a.push(e),a}},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=(a,i)=>this.interface.decodeEventLog(t.eventFragment,a,i),e.args=t.args}catch{}}},lr=class{constructor(e,t,a){B(this,"interface",mt(new.target,"getInterface")(t)),a==null?(B(this,"provider",null),B(this,"signer",null)):St.isSigner(a)?(B(this,"provider",a.provider||null),B(this,"signer",a)):$t.isProvider(a)?(B(this,"provider",a),B(this,"signer",null)):Se.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]]):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,Mx(this,o)),this.estimateGas[s]==null&&B(this.estimateGas,s,Ex(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 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=we(e||{});return["from","to"].forEach(function(a){t[a]!=null&&Se.throwError("cannot override "+a,M.errors.UNSUPPORTED_OPERATION,{operation:a})}),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 Xd);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 a=e.topics[0];if(typeof a!="string")throw new Error("invalid topic");let i=this.interface.getEvent(a);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,a){let i=ct(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||Se.throwError("events require a provider or a signer with a provider",M.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=we(i.filter);return typeof t=="string"&&ie(t,32)?(a!=null&&Se.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 lr{},ci=class{constructor(e,t,a){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),a&&!St.isSigner(a)&&Se.throwArgumentError("invalid signer","signer",a),B(this,"bytecode",i),B(this,"interface",mt(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=we(e.pop());for(let a in t)if(!Ax[a])throw new Error("unknown transaction override "+a)}return["data","from","to"].forEach(a=>{t[a]!=null&&Se.throwError("cannot override "+a,M.errors.UNSUPPORTED_OPERATION,{operation:a})}),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 a=yield Zr(this.signer,e,this.interface.deploy.inputs);a.push(t);let i=this.getDeployTransaction(...a),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 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 ui(e)}static getContract(e,t,a){return new oe(e,t,a)}};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;)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 I=j(fa(i,n,l));r||(r=I.length,f=new Uint8Array(r),s=Math.ceil(a/r),p=a-(s-1)*r),f.set(I);for(let S=1;S{var R6=Object.create;var Gs=Object.defineProperty;var P6=Object.getOwnPropertyDescriptor;var N6=Object.getOwnPropertyNames;var D6=Object.getPrototypeOf,O6=Object.prototype.hasOwnProperty;var B6=(n,e,t)=>e in n?Gs(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)Gs(n,t,{get:e[t],enumerable:!0})},F6=(n,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of N6(e))!O6.call(n,i)&&i!==t&&Gs(n,i,{get:()=>e[i],enumerable:!(a=P6(e,i))||a.enumerable});return n};var _n=(n,e,t)=>(t=n!=null?R6(D6(n)):{},F6(e||!n||!n.__esModule?Gs(t,"default",{value:n,enumerable:!0}):t,n));var xe=(n,e,t)=>(B6(n,typeof e!="symbol"?e+"":e,t),t);var jp=ae(()=>{});var sd=ae((Hp,rd)=>{(function(n,e){"use strict";function t(C,u){if(!C)throw new Error(u||"Assertion failed")}function a(C,u){C.super_=u;var y=function(){};y.prototype=u.prototype,C.prototype=new y,C.prototype.constructor=C}function i(C,u,y){if(i.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=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(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 b=s(C,y);return y-1>=u&&(b|=s(C,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(C,u,y,b){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()},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"],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];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=I[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(C){for(var u=new Array(C.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-C.length+1);P<=c;P++){var D=d-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[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,Y=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,Ya=A[3]|0,Ye=Ya&8191,Xe=Ya>>>13,Xa=A[4]|0,Ze=Xa&8191,et=Xa>>>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(Y,ze),d=Math.imul(Y,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(Y,Ke)|0,d=d+Math.imul(Y,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,Ye)|0,d=d+Math.imul(c,Xe)|0,d=d+Math.imul(P,Ye)|0,m=m+Math.imul(P,Xe)|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(Y,$e)|0,d=d+Math.imul(Y,Qe)|0,d=d+Math.imul(Q,$e)|0,m=m+Math.imul(Q,Qe)|0,g=g+Math.imul(V,Ye)|0,d=d+Math.imul(V,Xe)|0,d=d+Math.imul(K,Ye)|0,m=m+Math.imul(K,Xe)|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(Y,Ye)|0,d=d+Math.imul(Y,Xe)|0,d=d+Math.imul(Q,Ye)|0,m=m+Math.imul(Q,Xe)|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 zu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(zu>>>26)|0,zu&=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,Ye)|0,d=d+Math.imul(Z,Xe)|0,d=d+Math.imul(le,Ye)|0,m=m+Math.imul(le,Xe)|0,g=g+Math.imul(Y,Ze)|0,d=d+Math.imul(Y,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 Wu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Wu>>>26)|0,Wu&=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,Ye)|0,d=d+Math.imul(Ne,Xe)|0,d=d+Math.imul(De,Ye)|0,m=m+Math.imul(De,Xe)|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(Y,tt)|0,d=d+Math.imul(Y,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 Ku=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Ku>>>26)|0,Ku&=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,Ye)|0,d=d+Math.imul(Oe,Xe)|0,d=d+Math.imul(Be,Ye)|0,m=m+Math.imul(Be,Xe)|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(Y,at)|0,d=d+Math.imul(Y,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 Ju=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Ju>>>26)|0,Ju&=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,Ye)|0,d=d+Math.imul(Fe,Xe)|0,d=d+Math.imul(Le,Ye)|0,m=m+Math.imul(Le,Xe)|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(Y,rt)|0,d=d+Math.imul(Y,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 $u=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+($u>>>26)|0,$u&=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,Ye)|0,d=d+Math.imul(Ue,Xe)|0,d=d+Math.imul(Ve,Ye)|0,m=m+Math.imul(Ve,Xe)|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(Y,ot)|0,d=d+Math.imul(Y,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 Qu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Qu>>>26)|0,Qu&=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,Ye)|0,d=d+Math.imul(je,Xe)|0,d=d+Math.imul(He,Ye)|0,m=m+Math.imul(He,Xe)|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(Y,dt)|0,d=d+Math.imul(Y,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,Ye),d=Math.imul(qe,Xe),d=d+Math.imul(Ge,Ye)|0,m=Math.imul(Ge,Xe),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 Zu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Zu>>>26)|0,Zu&=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 ed=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(ed>>>26)|0,ed&=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 td=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(td>>>26)|0,td&=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 nd=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(nd>>>26)|0,nd&=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 ad=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(ad>>>26)|0,ad&=67108863,g=Math.imul(qe,dt),d=Math.imul(qe,lt),d=d+Math.imul(Ge,dt)|0,m=Math.imul(Ge,lt);var id=(k+g|0)+((d&8191)<<13)|0;return k=(m+(d>>>13)|0)+(id>>>26)|0,id&=67108863,h[0]=va,h[1]=wa,h[2]=_a,h[3]=ka,h[4]=Aa,h[5]=zu,h[6]=Wu,h[7]=Ku,h[8]=Ju,h[9]=$u,h[10]=Qu,h[11]=Yu,h[12]=Xu,h[13]=Zu,h[14]=ed,h[15]=td,h[16]=nd,h[17]=ad,h[18]=id,k!==0&&(h[19]=k,b.length++),b};Math.imul||(O=L);function U(C,u,y){y.negative=u.negative^C.negative,y.length=C.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(C,u,y){return U(C,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(C,u){this.x=C,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 $(C,u){this.name=C,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(C){if(typeof C=="string"){var u=i._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 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(C){q.call(this,C),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 rd>"u"||rd,Hp)});var fy=ae((Tg,Qs)=>{(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 Qs=="object"&&Qs.exports,o=typeof define=="function"&&define.amd,l=!a.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",p="0123456789abcdef".split(""),f=[31,7936,2031616,520093696],x=[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};(a.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(c){return Object.prototype.toString.call(c)==="[object Array]"}),l&&(a.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,Y){return u["cshake"+c].update(V,K,ee,Y)[D]()}},de=function(c,P,D){return function(V,K,ee,Y){return u["kmac"+c].update(V,K,ee,Y)[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(n);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(n)}else throw new Error(n);P=!0}for(var V=this.blocks,K=this.byteCount,ee=c.length,Y=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[Y],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(n);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(n)}else throw new Error(n);P=!0}var V=0,K=c.length;if(P)V=K;else for(var ee=0;ee=57344?V+=3:(Y=65536+((Y&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],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 c=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 yt=new Uint32Array(Q);ee>8&255,Y[Q+2]=yt>>16&255,Y[Q+3]=yt>>24&255;ee%c===0&&G(P)}return V&&(Q=ee<<2,yt=P[K],Y[Q]=yt&255,V>1&&(Y[Q+1]=yt>>8&255),V>2&&(Y[Q+2]=yt>>16&255)),Y};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,Y,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,Ya,Ye,Xe,Xa,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],Y=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^(Y<<1|Q>>>31),D=De^(Q<<1|Y>>>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=Y^(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,Ya=c[26]<<25|c[27]>>>7,Ye=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,Xe=c[38]<<8|c[39]>>>24,Xa=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&Ya,c[21]=Qa^~Qe&Ye,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^~Ya&Xe,c[23]=Qe^~Ye&Xa,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]=Ya^~Xe&Ze,c[25]=Ye^~Xa&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]=Xe^~Ze&Je,c[27]=Xa^~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(n,e){if(!n)throw new Error(e||"Assertion failed")}o0.equal=function(e,t,a){if(e!=t)throw new Error(a||"Assertion failed: "+e+" != "+t)}});var d0=ae((y3,Nd)=>{typeof Object.create=="function"?Nd.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Nd.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 An=ae(Pe=>{"use strict";var H2=nr(),q2=d0();Pe.inherits=q2;function G2(n,e){return(n.charCodeAt(e)&64512)!==55296||e<0||e+1>=n.length?!1:(n.charCodeAt(e+1)&64512)===56320}function z2(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):G2(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}Pe.htonl=l0;function K2(n,e){for(var t="",a=0;a>>0}return r}Pe.join32=J2;function $2(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}Pe.split32=$2;function Q2(n,e){return n>>>e|n<<32-e}Pe.rotr32=Q2;function Y2(n,e){return n<>>32-e}Pe.rotl32=Y2;function X2(n,e){return n+e>>>0}Pe.sum32=X2;function Z2(n,e,t){return n+e+t>>>0}Pe.sum32_3=Z2;function eh(n,e,t,a){return n+e+t+a>>>0}Pe.sum32_4=eh;function th(n,e,t,a,i){return n+e+t+a+i>>>0}Pe.sum32_5=th;function nh(n,e,t,a){var i=n[e],r=n[e+1],s=a+r>>>0,o=(s>>0,n[e+1]=s}Pe.sum64=nh;function ah(n,e,t,a){var i=e+a>>>0,r=(i>>0}Pe.sum64_hi=ah;function ih(n,e,t,a){var i=e+a;return i>>>0}Pe.sum64_lo=ih;function rh(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}Pe.sum64_4_hi=rh;function sh(n,e,t,a,i,r,s,o){var l=e+a+r+o;return l>>>0}Pe.sum64_4_lo=sh;function oh(n,e,t,a,i,r,s,o,l,p){var f=0,x=e;x=x+a>>>0,f+=x>>0,f+=x>>0,f+=x>>0,f+=x>>0}Pe.sum64_5_hi=oh;function uh(n,e,t,a,i,r,s,o,l,p){var f=e+a+r+o+p;return f>>>0}Pe.sum64_5_lo=uh;function dh(n,e,t){var a=e<<32-t|n>>>t;return a>>>0}Pe.rotr64_hi=dh;function lh(n,e,t){var a=n<<32-t|e>>>t;return a>>>0}Pe.rotr64_lo=lh;function ph(n,e,t){return n>>>t}Pe.shr64_hi=ph;function yh(n,e,t){var a=n<<32-t|e>>>t;return a>>>0}Pe.shr64_lo=yh});var ar=ae(c0=>{"use strict";var f0=An(),fh=nr();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 a=e.length%this._delta8;this.pending=e.slice(e.length-a,e.length),this.pending.length===0&&(this.pending=null),e=f0.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 ch=An(),Hn=ch.rotr32;function mh(n,e,t,a){if(n===0)return m0(e,t,a);if(n===1||n===3)return x0(e,t,a);if(n===2)return h0(e,t,a)}da.ft_1=mh;function m0(n,e,t){return n&e^~n&t}da.ch32=m0;function h0(n,e,t){return n&e^n&t^e&t}da.maj32=h0;function x0(n,e,t){return n^e^t}da.p32=x0;function hh(n){return Hn(n,2)^Hn(n,13)^Hn(n,22)}da.s0_256=hh;function xh(n){return Hn(n,6)^Hn(n,11)^Hn(n,25)}da.s1_256=xh;function bh(n){return Hn(n,7)^Hn(n,18)^n>>>3}da.g0_256=bh;function gh(n){return Hn(n,17)^Hn(n,19)^n>>>10}da.g1_256=gh});var T0=ae((h3,g0)=>{"use strict";var ir=An(),Th=ar(),vh=Dd(),Od=ir.rotl32,$r=ir.sum32,wh=ir.sum32_5,_h=vh.ft_1,b0=Th.BlockHash,kh=[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)}ir.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 a=this.W,i=0;i<16;i++)a[i]=e[t+i];for(;i{"use strict";var rr=An(),Ah=ar(),sr=Dd(),Mh=nr(),Mn=rr.sum32,Eh=rr.sum32_4,Ch=rr.sum32_5,Ih=sr.ch32,Sh=sr.maj32,Rh=sr.s0_256,Ph=sr.s1_256,Nh=sr.g0_256,Dh=sr.g1_256,v0=Ah.BlockHash,Oh=[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=Oh,this.W=new Array(64)}rr.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 a=this.W,i=0;i<16;i++)a[i]=e[t+i];for(;i{"use strict";var Fd=An(),_0=Bd();function la(){if(!(this instanceof la))return new la;_0.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}Fd.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"?Fd.toHex32(this.h.slice(0,7),"big"):Fd.split32(this.h.slice(0,7),"big")}});var Vd=ae((g3,I0)=>{"use strict";var Qt=An(),Bh=ar(),Fh=nr(),zn=Qt.rotr64_hi,Wn=Qt.rotr64_lo,M0=Qt.shr64_hi,E0=Qt.shr64_lo,Sa=Qt.sum64,Ld=Qt.sum64_hi,Ud=Qt.sum64_lo,Lh=Qt.sum64_4_hi,Uh=Qt.sum64_4_lo,Vh=Qt.sum64_5_hi,jh=Qt.sum64_5_lo,C0=Bh.BlockHash,Hh=[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=Hh,this.W=new Array(160)}Qt.inherits(En,C0);I0.exports=En;En.blockSize=1024;En.outSize=512;En.hmacStrength=192;En.padLength=128;En.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 jd=An(),S0=Vd();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]}jd.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"?jd.toHex32(this.h.slice(0,12),"big"):jd.split32(this.h.slice(0,12),"big")}});var N0=ae(or=>{"use strict";or.sha1=T0();or.sha224=A0();or.sha256=Bd();or.sha384=P0();or.sha512=Vd()});var U0=ae(L0=>{"use strict";var li=An(),tx=ar(),go=li.rotl32,D0=li.sum32,Qr=li.sum32_3,O0=li.sum32_4,F0=tx.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 a=this.h[0],i=this.h[1],r=this.h[2],s=this.h[3],o=this.h[4],l=a,p=i,f=r,x=s,I=o,_=0;_<80;_++){var v=D0(go(O0(a,B0(_,i,r,s),e[ix[_]+t],nx(_)),sx[_]),o);a=o,o=s,s=go(r,10),r=i,i=v,v=D0(go(O0(l,B0(79-_,p,f,x),e[rx[_]+t],ax(_)),ox[_]),I),l=I,I=x,x=go(f,10),f=p,p=v}v=Qr(this.h[1],r,x),this.h[1]=Qr(this.h[2],s,I),this.h[2]=Qr(this.h[3],o,l),this.h[3]=Qr(this.h[4],a,p),this.h[4]=Qr(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(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 nx(n){return n<=15?0:n<=31?1518500249:n<=47?1859775393:n<=63?2400959708:2840853838}function ax(n){return n<=15?1352829926:n<=31?1548603684:n<=47?1836072691:n<=63?2053994217:0}var ix=[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],rx=[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],sx=[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],ox=[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((_3,V0)=>{"use strict";var ux=An(),dx=nr();function ur(n,e,t){if(!(this instanceof ur))return new ur(n,e,t);this.Hash=n,this.blockSize=n.blockSize/8,this.outSize=n.outSize/8,this.inner=null,this.outer=null,this._init(ux.toArray(e,t))}V0.exports=ur;ur.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),dx(e.length<=this.blockSize);for(var t=e.length;t{var Rt=H0;Rt.utils=An();Rt.common=ar();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 ol=ae((sl,xf)=>{"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&&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],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],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=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,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,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 a(_,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=a(_,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=a(_,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 I={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 yl<"u"?gf.exports=I:typeof define=="function"&&define.amd?define(I):n&&(n.scrypt&&(n._scrypt=n.scrypt),n.scrypt=I)})(yl)});var Gf=ae((y4,qf)=>{"use strict";var qo="qpzry9x8gf2tvdw0s3jn54khce6mua7l",xl={};for(ss=0;ss>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 jf(n){for(var e=1,t=0;t126)return"Invalid prefix ("+n+")";e=xr(e)^a>>5}for(e=xr(e),t=0;tt)throw new TypeError("Exceeds length limit");n=n.toLowerCase();var a=jf(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=xr(a)^s,i+=qo.charAt(s)}for(r=0;r<6;++r)a=xr(a);for(a^=1,r=0;r<6;++r){var o=a>>(5-r)*5&31;i+=qo.charAt(o)}return i}function Hf(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=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 "+n:{prefix:r,words:l}}function Kx(){var n=Hf.apply(null,arguments);if(typeof n=="object")return n}function Jx(n){var e=Hf.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function Go(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 zl=="object"&&typeof Wl<"u"?Wl.exports=e():typeof define=="function"&&define.amd?define(e):(n=typeof globalThis<"u"?globalThis:n||self,n.fetchRetry=e())})(zl,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,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(I,_){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)I(U);else if(typeof x=="function")try{return Promise.resolve(x(L,null,U)).then(function(H){H?S(L,null,U):I(U)}).catch(_)}catch(H){_(H)}else L=0}function t(a){this.name="ArgumentError",this.message=a}return n})});var Kl=ae(uu=>{"use strict";Object.defineProperty(uu,"__esModule",{value:!0});uu.$dictionary=void 0;uu.$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 Is=ae((TA,im)=>{im.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}});var $l=ae(Fa=>{var Me=Is(),Jl=()=>[{type:Me.RANGE,from:48,to:57}],rm=()=>[{type:Me.CHAR,value:95},{type:Me.RANGE,from:97,to:122},{type:Me.RANGE,from:65,to:90}].concat(Jl()),sm=()=>[{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}],U5=()=>[{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:rm(),not:!1});Fa.notWords=()=>({type:Me.SET,set:rm(),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:sm(),not:!1});Fa.notWhitespace=()=>({type:Me.SET,set:sm(),not:!0});Fa.anyChar=()=>({type:Me.SET,set:U5(),not:!0})});var um=ae(Ss=>{var om=Is(),Cr=$l(),V5="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?",j5={0:0,t:9,n:10,v:11,f:12,r:13};Ss.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 f=a?8:r?parseInt(r,16):s?parseInt(s,16):o?parseInt(o,8):l?V5.indexOf(l):j5[p],x=String.fromCharCode(f);return/[[\]{}^$.|?*+()]/.test(x)&&(x="\\"+x),x}),n};Ss.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(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:om.RANGE,from:(i[8]||i[9]).charCodeAt(0),to:i[10].charCodeAt(0)});else if(r=i[12])t.push({type:om.CHAR,value:r.charCodeAt(0)});else return[t,a.lastIndex];Ss.error(e,"Unterminated character class")};Ss.error=(n,e)=>{throw new SyntaxError("Invalid regular expression: /"+n+"/: "+e)}});var dm=ae(Rs=>{var du=Is();Rs.wordBoundary=()=>({type:du.POSITION,value:"b"});Rs.nonWordBoundary=()=>({type:du.POSITION,value:"B"});Rs.begin=()=>({type:du.POSITION,value:"^"});Rs.end=()=>({type:du.POSITION,value:"$"})});var lm=ae((kA,Ql)=>{var Ir=um(),bn=Is(),_i=$l(),lu=dm();Ql.exports=n=>{var e=0,t,a,i={type:bn.ROOT,stack:[]},r=i,s=i.stack,o=[],l=O=>{Ir.error(n,`Nothing to repeat at column ${O-1}`)},p=Ir.strToChars(n);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 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}))}};pm.exports=La});var cm=ae((MA,fm)=>{var pu=lm(),Ps=ym(),ki=pu.types;fm.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=pu(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 a,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),a=e.options?this._randSelect(e.options):e.stack,i="",s=0,o=a.length;s{"use strict";var H5=Ai&&Ai.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ai,"__esModule",{value:!0});Ai.RandomGenerator=void 0;var q5=H5(cm()),G5;(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 q5.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()}})(G5=Ai.RandomGenerator||(Ai.RandomGenerator={}))});var Ds=ae(Sr=>{"use strict";var z5=Sr&&Sr.__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(Sr,"__esModule",{value:!0});Sr.TypeGuardError=void 0;var W5=function(n){z5(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);Sr.TypeGuardError=W5});var hm=ae(yu=>{"use strict";Object.defineProperty(yu,"__esModule",{value:!0});yu.$any=void 0;var K5=function(n){return n!==void 0?JSON.parse(JSON.stringify(n)):void 0};yu.$any=K5});var xm=ae(fu=>{"use strict";Object.defineProperty(fu,"__esModule",{value:!0});fu.$every=void 0;var J5=function(n,e){for(var t=null,a=0;a{"use strict";Object.defineProperty(cu,"__esModule",{value:!0});cu.$guard=void 0;var $5=Ds(),Q5=function(n){return function(e,t){if(e===!0)throw new $5.TypeGuardError({method:n,path:t.path,expected:t.expected,value:t.value});return!1}};cu.$guard=Q5});var gm=ae(mu=>{"use strict";Object.defineProperty(mu,"__esModule",{value:!0});mu.$is_between=void 0;var Y5=function(n,e,t){return e<=n&&n<=t};mu.$is_between=Y5});var Tm=ae(hu=>{"use strict";Object.defineProperty(hu,"__esModule",{value:!0});hu.$is_custom=void 0;var X5=Kl(),Z5=function(n,e,t,a){var i,r=(i=X5.$dictionary.get(n))===null||i===void 0?void 0:i.get(e);return r===void 0?!0:r(t)(a)};hu.$is_custom=Z5});var vm=ae(xu=>{"use strict";Object.defineProperty(xu,"__esModule",{value:!0});xu.$is_date=void 0;var eb=function(n){return tb.test(n)};xu.$is_date=eb;var tb=/^(\d{4})-(\d{2})-(\d{2})$/});var wm=ae(bu=>{"use strict";Object.defineProperty(bu,"__esModule",{value:!0});bu.$is_datetime=void 0;var nb=function(n){return!isNaN(new Date(n).getTime())};bu.$is_datetime=nb});var _m=ae(gu=>{"use strict";Object.defineProperty(gu,"__esModule",{value:!0});gu.$is_email=void 0;var ab=function(n){return ib.test(n)};gu.$is_email=ab;var ib=/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i});var km=ae(Tu=>{"use strict";Object.defineProperty(Tu,"__esModule",{value:!0});Tu.$is_ipv4=void 0;var rb=function(n){return sb.test(n)};Tu.$is_ipv4=rb;var sb=/^(?: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 Am=ae(vu=>{"use strict";Object.defineProperty(vu,"__esModule",{value:!0});vu.$is_ipv6=void 0;var ob=function(n){return ub.test(n)};vu.$is_ipv6=ob;var ub=/^(([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 Mm=ae(wu=>{"use strict";Object.defineProperty(wu,"__esModule",{value:!0});wu.$is_url=void 0;var db=function(n){return lb.test(n)};wu.$is_url=db;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 Em=ae(_u=>{"use strict";Object.defineProperty(_u,"__esModule",{value:!0});_u.$is_uuid=void 0;var pb=function(n){return yb.test(n)};_u.$is_uuid=pb;var yb=/^(?:[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 Cm=ae(ku=>{"use strict";Object.defineProperty(ku,"__esModule",{value:!0});ku.$join=void 0;var fb=function(n){return cb(n)?".".concat(n):"[".concat(JSON.stringify(n),"]")};ku.$join=fb;var cb=function(n){return mb(n)===!1&&/^[a-zA-Z_$][a-zA-Z_$0-9]*$/g.test(n)},mb=function(n){return hb.has(n)},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 Im=ae(Au=>{"use strict";Object.defineProperty(Au,"__esModule",{value:!0});Au.$number=void 0;var xb=Ds(),bb=function(n){if(isFinite(n)===!1)throw new xb.TypeGuardError({method:"typia.stringify",expected:"number",value:n,message:"Error on typia.stringify(): infinite or not a number."});return n};Au.$number=bb});var Sm=ae(Mu=>{"use strict";Object.defineProperty(Mu,"__esModule",{value:!0});Mu.$report=void 0;var gb=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}};Mu.$report=gb});var Rm=ae(Eu=>{"use strict";Object.defineProperty(Eu,"__esModule",{value:!0});Eu.$rest=void 0;var Tb=function(n){return n.length===2?"":","+n.substring(1,n.length-1)};Eu.$rest=Tb});var Pm=ae(Cu=>{"use strict";Object.defineProperty(Cu,"__esModule",{value:!0});Cu.$string=void 0;var vb=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,'"')};Cu.$string=vb});var Nm=ae(Iu=>{"use strict";Object.defineProperty(Iu,"__esModule",{value:!0});Iu.$tail=void 0;var wb=function(n){return n[n.length-1]===","?n.substring(0,n.length-1):n};Iu.$tail=wb});var Fm=ae(Mi=>{"use strict";var Vt=Mi&&Mi.__assign||function(){return Vt=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 Vt(Vt({},n.is()),{number:Ob.$number,string:Lb.$string,tail:Ub.$tail,rest:Fb.$rest,throws:e(t)})},n.clone=function(t){return Vt(Vt({},n.is()),{throws:e(t),any:_b.$any})},n.prune=function(t){return Vt(Vt({},n.is()),{throws:e(t)})},n.random=function(){return{generator:Dm.RandomGenerator,pick:Dm.RandomGenerator.pick}};var e=function(t){return function(a){throw new Om.TypeGuardError(Vt(Vt({},a),{method:"typia.".concat(t)}))}}})(Vb=Mi.Namespace||(Mi.Namespace={}))});var Lm=ae(Os=>{"use strict";Object.defineProperty(Os,"__esModule",{value:!0});Os.MapUtil=void 0;var jb;(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}}})(jb=Os.MapUtil||(Os.MapUtil={}))});var Vm=ae(Um=>{"use strict";Object.defineProperty(Um,"__esModule",{value:!0})});var Hm=ae(jm=>{"use strict";Object.defineProperty(jm,"__esModule",{value:!0})});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 dp=ae(z=>{"use strict";var Hb=z&&z.__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]}),Ei=z&&z.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Hb(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 Rr=Kl(),Ee=Fm(),qb=Lm();Ei(Vm(),z);Ei(Hm(),z);Ei(Gm(),z);Ei(Wm(),z);Ei(Jm(),z);Ei(Qm(),z);Ei(Ds(),z);function Yl(){re("assert")}z.assert=Yl;Object.assign(Yl,Ee.Namespace.assert("assert"));function Xl(){re("assertType")}z.assertType=Xl;Object.assign(Xl,Ee.Namespace.assert("assertType"));function Su(){re("is")}z.is=Su;Object.assign(Su,Ee.Namespace.assert("is"));function Ru(){re("validate")}z.validate=Ru;Object.assign(Ru,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(n){var e,t;return n?(t=(e=Rr.$dictionary.get(n))===null||e===void 0?void 0:e.size)!==null&&t!==void 0?t:0:Rr.$dictionary.size},has:function(n){return function(e){var t,a;return(a=(t=Rr.$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=Rr.$dictionary.get(n))===null||t===void 0?void 0:t.get(e)}},insert:function(n){return function(e){return function(t){var a=qb.MapUtil.take(Rr.$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=Rr.$dictionary.get(n))===null||t===void 0?void 0:t.delete(e))!==null&&a!==void 0?a:!1}}};function Gb(){re("application")}z.application=Gb;function np(){re("assertParse")}z.assertParse=np;Object.assign(np,Ee.Namespace.assert("assertParse"));function ap(){re("isParse")}z.isParse=ap;Object.assign(ap,Su);function ip(){re("validateParse")}z.validateParse=ip;Object.assign(ip,Ru);function rp(){re("stringify")}z.stringify=rp;Object.assign(rp,Ee.Namespace.stringify("stringify"));function Pu(){re("assertStringify")}z.assertStringify=Pu;Object.assign(Pu,Ee.Namespace.assert("assertStringify"));Object.assign(Pu,Ee.Namespace.stringify("assertStringify"));function Nu(){re("isStringify")}z.isStringify=Nu;Object.assign(Nu,Ee.Namespace.is());Object.assign(Nu,Ee.Namespace.stringify("isStringify"));function Du(){re("validateStringify")}z.validateStringify=Du;Object.assign(Du,Ee.Namespace.validate());Object.assign(Du,Ee.Namespace.stringify("validateStringify"));function zb(){re("metadata")}z.metadata=zb;function sp(){re("random")}z.random=sp;Object.assign(sp,Ee.Namespace.random());function Wb(){re("literals")}z.literals=Wb;function op(){re("clone")}z.clone=op;Object.assign(op,Ee.Namespace.clone("clone"));function Ou(){re("assertClone")}z.assertClone=Ou;Object.assign(Ou,Ee.Namespace.assert("assertClone"));Object.assign(Ou,Ee.Namespace.clone("assertClone"));function Bu(){re("isClone")}z.isClone=Bu;Object.assign(Bu,Ee.Namespace.is());Object.assign(Bu,Ee.Namespace.clone("isClone"));function Fu(){re("validateClone")}z.validateClone=Fu;Object.assign(Fu,Ee.Namespace.validate());Object.assign(Fu,Ee.Namespace.clone("validateClone"));function up(){re("prune")}z.prune=up;Object.assign(up,Ee.Namespace.prune("prune"));function Lu(){re("assertPrune")}z.assertPrune=Lu;Object.assign(Lu,Ee.Namespace.assert("assertPrune"));Object.assign(Lu,Ee.Namespace.prune("assertPrune"));function Uu(){re("isPrune")}z.isPrune=Uu;Object.assign(Uu,Ee.Namespace.is());Object.assign(Uu,Ee.Namespace.prune("isPrune"));function Vu(){re("validatePrune")}z.validatePrune=Vu;Object.assign(Vu,Ee.Namespace.prune("validatePrune"));Object.assign(Vu,Ee.Namespace.validate());function Ym(){re("createAssert")}z.createAssert=Ym;Object.assign(Ym,Yl);function Xm(){re("createAssertType")}z.createAssertType=Xm;Object.assign(Xm,Xl);function Zm(){re("createIs")}z.createIs=Zm;Object.assign(Zm,Su);function e6(){re("createValidate")}z.createValidate=e6;Object.assign(e6,Ru);function t6(){re("createAssertEquals")}z.createAssertEquals=t6;Object.assign(t6,Zl);function n6(){re("createEquals")}z.createEquals=n6;Object.assign(n6,ep);function a6(){re("createValidateEquals")}z.createValidateEquals=a6;Object.assign(a6,tp);function i6(){re("createIsParse")}z.createIsParse=i6;Object.assign(i6,ap);function r6(){re("createAssertParse")}z.createAssertParse=r6;Object.assign(r6,np);function s6(){re("createValidateParse")}z.createValidateParse=s6;Object.assign(s6,ip);function o6(){re("createStringify")}z.createStringify=o6;Object.assign(o6,rp);function u6(){re("createAssertStringify")}z.createAssertStringify=u6;Object.assign(u6,Pu);function d6(){re("createIsStringify")}z.createIsStringify=d6;Object.assign(d6,Nu);function l6(){re("createValidateStringify")}z.createValidateStringify=l6;Object.assign(l6,Du);function p6(){re("createRandom")}z.createRandom=p6;Object.assign(p6,sp);function y6(){re("createClone")}z.createClone=y6;Object.assign(y6,op);function f6(){re("createAssertClone")}z.createAssertClone=f6;Object.assign(f6,Ou);function c6(){re("createIsClone")}z.createIsClone=c6;Object.assign(c6,Bu);function m6(){re("createValidateClone")}z.createValidateClone=m6;Object.assign(m6,Fu);function h6(){re("createPrune")}z.createPrune=h6;Object.assign(h6,up);function x6(){re("createAssertPrune")}z.createAssertPrune=x6;Object.assign(x6,Lu);function b6(){re("createIsPrune")}z.createIsPrune=b6;Object.assign(b6,Uu);function g6(){re("createValidatePrune")}z.createValidatePrune=g6;Object.assign(g6,Vu);function re(n){throw new Error("Error on typia.".concat(n,'(): no transform has been configured. Run "npx typia setup" command.'))}});var v6=ae(Tn=>{"use strict";var T6=Tn&&Tn.__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]}),Kb=Tn&&Tn.__setModuleDefault||(Object.create?function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}:function(n,e){n.default=e}),Jb=Tn&&Tn.__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)&&T6(e,n,t);return Kb(e,n),e},$b=Tn&&Tn.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&T6(e,n,t)};Object.defineProperty(Tn,"__esModule",{value:!0});var Qb=Jb(dp());Tn.default=Qb;$b(dp(),Tn)});var Pl={};ji(Pl,{BaseContract:()=>lr,BigNumber:()=>F,Contract:()=>oe,ContractFactory:()=>ci,FixedNumber:()=>ft,Signer:()=>St,VoidSigner:()=>ua,Wallet:()=>on,Wordlist:()=>xn,constants:()=>ht,errors:()=>Wt,getDefaultProvider:()=>tu,logger:()=>Ac,providers:()=>ea,utils:()=>ne,version:()=>au,wordlists:()=>hi});var ey=_n(sd());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,od=null;function L6(){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 Kp=L6(),ud;(function(n){n.DEBUG="DEBUG",n.INFO="INFO",n.WARNING="WARNING",n.ERROR="ERROR",n.OFF="OFF"})(ud||(ud={}));var Wt;(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"})(Wt||(Wt={}));var Jp="0123456789abcdef",M=class{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){let a=e.toLowerCase();zs[a]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(Wp>zs[a])&&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,a){if(zp)return this.makeError("censored error",t,{});t||(t=M.errors.UNKNOWN_ERROR),a||(a={});let i=[];Object.keys(a).forEach(l=>{let p=a[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(a[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(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,M.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"),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,a){a?a=": "+a:a="",et&&this.throwError("too many arguments"+a,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 od||(od=new M(qp)),od}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=ud;var $p="bytes/5.7.0";var wt=new M($p);function Yp(n){return!!n.toHexString}function Hi(n){return n.slice||(n.slice=function(){let e=Array.prototype.slice.call(arguments);return Hi(new Uint8Array(Array.prototype.slice.apply(n,e)))}),n}function aa(n){return ie(n)&&!(n.length%2)||un(n)}function Qp(n){return typeof n=="number"&&n==n&&n%1===0}function un(n){if(n==null)return!1;if(n.constructor===Uint8Array)return!0;if(typeof n=="string"||!Qp(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"){wt.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),Hi(new Uint8Array(t))}if(e.allowMissingPrefix&&typeof n=="string"&&n.substring(0,2)!=="0x"&&(n="0x"+n),Yp(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":wt.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),Hi(a)}function Zt(n){let e=j(n);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(n,e-n.length),Hi(t)}function ie(n,e){return!(typeof n!="string"||!n.match(/^0x[0-9A-Fa-f]*$/)||e&&n.length!==2+2*e)}var dd="0123456789abcdef";function W(n,e){if(e||(e={}),typeof n=="number"){wt.checkSafeUint53(n,"invalid hexlify value");let t="";for(;n;)t=dd[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),Yp(n))return n.toHexString();if(ie(n))return n.length%2&&(e.hexPad==="left"?n="0x0"+n.substring(2):e.hexPad==="right"?n+="0":wt.throwArgumentError("hex data is odd-length","value",n)),n.toLowerCase();if(un(n)){let t="0x";for(let a=0;a>4]+dd[i&15]}return t}return wt.throwArgumentError("invalid hexlify value","value",n)}function Nt(n){if(typeof n!="string")n=W(n);else if(!ie(n)||n.length%2)return null;return(n.length-2)/2}function Ce(n,e,t){return typeof n!="string"?n=W(n):(!ie(n)||n.length%2)&&wt.throwArgumentError("invalid hexData","value",n),e=2+2*e,t!=null?"0x"+n.substring(e,2+2*t):"0x"+n.substring(e)}function _t(n){let e="0x";return n.forEach(t=>{e+=W(t).substring(2)}),e}function Ln(n){let e=ld(W(n,{hexPad:"left"}));return e==="0x"?"0x0":e}function ld(n){typeof n!="string"&&(n=W(n)),ie(n)||wt.throwArgumentError("invalid hex string","value",n),n=n.substring(2);let e=0;for(;e2*e+2&&wt.throwArgumentError("value out of range","value",arguments[1]);n.length<2*e+2;)n="0x0"+n.substring(2);return n}function Un(n){let e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(aa(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]):wt.throwArgumentError("invalid signature string","signature",n),e.v<27&&(e.v===0||e.v===1?e.v+=27:wt.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=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",n),i[0]&=127;let s=W(i);e.s==null?e.s=s:e.s!==s&&wt.throwArgumentError("signature v mismatch _vs","signature",n)}if(e.recoveryParam==null)e.v==null?wt.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&&wt.throwArgumentError("signature recoveryParam mismatch v","signature",n)}e.r==null||!ie(e.r)?wt.throwArgumentError("signature missing or invalid r","signature",n):e.r=me(e.r,32),e.s==null||!ie(e.s)?wt.throwArgumentError("signature missing or invalid s","signature",n):e.s=me(e.s,32);let t=j(e.s);t[0]>=128&&wt.throwArgumentError("signature s out of range","signature",n),e.recoveryParam&&(t[0]|=128);let a=W(t);e._vs&&(ie(e._vs)||wt.throwArgumentError("signature invalid _vs","signature",n),e._vs=me(e._vs,32)),e._vs==null?e._vs=a:e._vs!==a&&wt.throwArgumentError("signature _vs mismatch v and s","signature",n)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function Br(n){return n=Un(n),W(ye([n.r,n.s,n.recoveryParam?"0x1c":"0x1b"]))}var Ws="bignumber/5.7.0";var Fr=ey.default.BN,ia=new M(Ws),pd={},Xp=9007199254740991;function ty(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"||un(n))}var Zp=!1,F=class{constructor(e,t){e!==pd&&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?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(pd,Lr(e)):e.match(/^-?[0-9]+$/)?new F(pd,Lr(new Fr(e))):ia.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&dn("underflow","BigNumber.from",e),(e>=Xp||e<=-Xp)&&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 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 ia.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}};function Lr(n){if(typeof n!="string")return Lr(n.toString(16));if(n[0]==="-")return n=n.substring(1),n[0]==="-"&&ia.throwArgumentError("invalid hex","value",n),n=Lr(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 Kt(n){return F.from(Lr(n))}function be(n){let e=F.from(n).toHexString();return e[0]==="-"?new Fr("-"+e.substring(3),16):new Fr(e.substring(2),16)}function dn(n,e,t){let a={fault:n,operation:e};return t!=null&&(a.value=t),ia.throwError(n,M.errors.NUMERIC_FAULT,a)}function yd(n){return new Fr(n,36).toString(16)}function fd(n){return new Fr(n,16).toString(36)}var jt=new M(Ws),Ur={},ay=F.from(0),iy=F.from(-1);function ry(n,e,t,a){let i={fault:e,operation:t};return a!==void 0&&(i.value=a),jt.throwError(n,M.errors.NUMERIC_FAULT,i)}var Vr="0";for(;Vr.length<256;)Vr+=Vr;function cd(n){if(typeof n!="number")try{n=F.from(n).toNumber()}catch{}return typeof n=="number"&&n>=0&&n<=256&&!(n%1)?"1"+Vr.substring(0,n):jt.throwArgumentError("invalid decimal size","decimals",n)}function qi(n,e){e==null&&(e=0);let t=cd(e);n=F.from(n);let a=n.lt(ay);a&&(n=n.mul(iy));let i=n.mod(t).toString();for(;i.length2&&jt.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&&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),a=r("width","number",a),i=r("decimals","number",i)}return a%8&&jt.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",a),i>80&&jt.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new ra(Ur,t,a,i)}},ft=class{constructor(e,t,a,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=a,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),a=ln(e._value,e.format.decimals);return ft.fromValue(t.add(a),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);let t=ln(this._value,this.format.decimals),a=ln(e._value,e.format.decimals);return ft.fromValue(t.sub(a),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);let t=ln(this._value,this.format.decimals),a=ln(e._value,e.format.decimals);return ft.fromValue(t.mul(a).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);let t=ln(this._value,this.format.decimals),a=ln(e._value,e.format.decimals);return ft.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=ft.from(e[0],this.format),a=!e[1].match(/^(0*)$/);return this.isNegative()&&a&&(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),a=!e[1].match(/^(0*)$/);return!this.isNegative()&&a&&(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 a=ft.from("1"+Vr.substring(0,e),this.format),i=U6.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&&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,a){return a==null&&t!=null&&!ty(t)&&(a=t,t=null),t==null&&(t=0),a==null&&(a="fixed"),ft.fromString(qi(e,t),ra.from(a))}static fromString(e,t){t==null&&(t="fixed");let a=ra.from(t),i=ln(e,a.decimals);!a.signed&&i.lt(ay)&&ry("unsigned value cannot be negative","overflow","value",e);let r=null;a.signed?r=i.toTwos(a.width).toHexString():(r=i.toHexString(),r=me(r,a.width/8));let s=qi(i,a.decimals);return new ft(Ur,r,s,a)}static fromBytes(e,t){t==null&&(t="fixed");let a=ra.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 ft(Ur,r,s,a)}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(a){if(a.code!==M.errors.INVALID_ARGUMENT)throw a}return jt.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}},ny=ft.from(1),U6=ft.from("0.5");var sy="properties/5.7.0";var V6=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Ks=new M(sy);function B(n,e,t){Object.defineProperty(n,e,{enumerable:!0,value:t,writable:!1})}function mt(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 Ie(n){return V6(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 Gi(n,e){(!n||typeof n!="object")&&Ks.throwArgumentError("invalid object","object",n),Object.keys(n).forEach(t=>{e[t]||Ks.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 j6={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function oy(n){if(n==null||j6[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;tct(e)));if(typeof n=="object"){let e={};for(let t in n){let a=n[t];a!==void 0&&B(e,t,ct(a))}return e}return Ks.throwArgumentError(`Cannot deepCopy ${typeof n}`,"object",n)}function ct(n){return H6(n)}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},q6={calldata:!0,memory:!0};function Js(n,e){if(n==="bytes"||n==="string"){if(uy[e])return!0}else if(n==="address"){if(e==="payable")return!0}else if((n.indexOf("[")>=0||n==="tuple")&&q6[e])return!0;return(uy[e]||e==="payable")&&Te.throwArgumentError("invalid modifier","name",e),!1}function G6(n,e){let t=n;function a(o){Te.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!==ge.sighash&&(t+=this.type),t+="("+this.components.map(a=>a.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:zi(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(pt.fromObject):null})}static fromString(e,t){function a(i){return pt.fromObject({name:i.name,type:i.type,indexed:i.indexed,components:i.components})}return a(G6(e,!!t))}static isParamType(e){return!!(e!=null&&e._isParamType)}};function jr(n,e){return K6(n).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(a=>JSON.parse(a.format(e)))});let t="";return e!==ge.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map(a=>a.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(ri,t)}static fromString(e){let t=e.match(qr);t||Te.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:Te.warn("unknown modifier: "+i)}}),Ht.fromObject({name:t[1].trim(),anonymous:a,inputs:jr(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}};function ly(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 py(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 yy(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 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(a=>JSON.parse(a.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(a=>a.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 a={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,a)}static fromString(e){let t={type:"constructor"};e=ly(e,t);let a=e.match(qr);return(!a||a[1].trim()!=="constructor")&&Te.throwArgumentError("invalid constructor string","value",e),t.inputs=jr(a[2].trim(),!1),py(a[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(a=>JSON.parse(a.format(e))),outputs:this.outputs.map(a=>JSON.parse(a.format(e)))});let t="";return e!==ge.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map(a=>a.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(a=>a.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),a={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 Ot(ri,a)}static fromString(e){let t={type:"function"};e=ly(e,t);let a=e.split(" returns ");a.length>2&&Te.throwArgumentError("invalid function string","value",e);let i=a[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),a.length>1){let r=a[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 Ot.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}};function dy(n){let e=n.format();return(e==="Error(string)"||e==="Panic(uint256)")&&Te.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",n),n}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(a=>JSON.parse(a.format(e)))});let t="";return e!==ge.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map(a=>a.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(ri,t))}static fromString(e){let t={type:"error"},a=e.match(qr);return a||Te.throwArgumentError("invalid error signature","value",e),t.name=a[1].trim(),t.name&&Hr(t.name),t.inputs=jr(a[2],!1),dy(tn.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}};function zi(n){return n.match(/^uint($|[^1-9])/)?n="uint256"+n.substring(4):n.match(/^int($|[^1-9])/)&&(n="int256"+n.substring(3)),n}var W6=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function Hr(n){return(!n||!n.match(W6))&&Te.throwArgumentError(`invalid identifier "${n}"`,"value",n),n}var qr=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function K6(n){n=n.trim();let e=[],t="",a=0;for(let i=0;ithis.wordSize&&md.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,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):oi.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:md.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 a=this._peekBytes(0,e,!!t);return this._offset+=a.length,a.slice(0,e)}readValue(){return F.from(this.readBytes(this.wordSize))}};var cy=_n(fy());function fe(n){return"0x"+cy.default.keccak_256(j(n))}var Ys={};ji(Ys,{decode:()=>Gr,encode:()=>sa});var my="rlp/5.7.0";var jn=new M(my);function hy(n){let e=[];for(;n;)e.unshift(n&255),n>>=8;return e}function xy(n,e,t){let a=0;for(let i=0;ie+1+a&&jn.throwError("child data too short",M.errors.BUFFER_OVERRUN,{})}return{consumed:1+a,result:i}}function Ty(n,e){if(n.length===0&&jn.throwError("data too short",M.errors.BUFFER_OVERRUN,{}),n[e]>=248){let t=n[e]-247;e+1+t>n.length&&jn.throwError("data short segment too short",M.errors.BUFFER_OVERRUN,{});let a=xy(n,e+1,t);return e+1+t+a>n.length&&jn.throwError("data long segment too short",M.errors.BUFFER_OVERRUN,{}),by(n,e,e+1+t,t+a)}else if(n[e]>=192){let t=n[e]-192;return e+1+t>n.length&&jn.throwError("data array too short",M.errors.BUFFER_OVERRUN,{}),by(n,e,e+1,t)}else if(n[e]>=184){let t=n[e]-183;e+1+t>n.length&&jn.throwError("data array too short",M.errors.BUFFER_OVERRUN,{});let a=xy(n,e+1,t);e+1+t+a>n.length&&jn.throwError("data array too short",M.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&&jn.throwError("data too short",M.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 Gr(n){let e=j(n),t=Ty(e,0);return t.consumed!==e.length&&jn.throwArgumentError("invalid rlp data","data",n),t.result}var vy="address/5.7.0";var Ma=new M(vy);function wy(n){ie(n,20)||Ma.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 J6=9007199254740991;function $6(n){return Math.log10?Math.log10(n):Math.log(n)/Math.LN10}var hd={};for(let n=0;n<10;n++)hd[String(n)]=String(n);for(let n=0;n<26;n++)hd[String.fromCharCode(65+n)]=String(10+n);var _y=Math.floor($6(J6));function ky(n){n=n.toUpperCase(),n=n.substring(4)+n.substring(0,2)+"00";let e=n.split("").map(a=>hd[a]).join("");for(;e.length>=_y;){let a=e.substring(0,_y);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 ce(n){let e=null;if(typeof n!="string"&&Ma.throwArgumentError("invalid address","address",n),n.match(/^(0x)?[0-9a-fA-F]{40}$/))n.substring(0,2)!=="0x"&&(n="0x"+n),e=wy(n),n.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==n&&Ma.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)!==ky(n)&&Ma.throwArgumentError("bad icap checksum","address",n),e=yd(n.substring(4));e.length<40;)e="0"+e;e=wy("0x"+e)}else Ma.throwArgumentError("invalid address","address",n);return e}function Ay(n){try{return ce(n),!0}catch{}return!1}function My(n){let e=fd(ce(n).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+ky("XE00"+e)+e}function ui(n){let e=null;try{e=ce(n.from)}catch{Ma.throwArgumentError("missing from address","transaction",n)}let t=Zt(j(F.from(n.nonce).toHexString()));return ce(Ce(fe(sa([e,t])),12))}function Ey(n,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(Ce(fe(ye(["0xff",ce(n),e,t])),12))}var Xs=class extends kt{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=ce(t)}catch(a){this._throwError(a.message,t)}return e.writeValue(t)}decode(e){return ce(me(e.readValue().toHexString(),20))}};var Zs=class extends kt{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(Vn);function xd(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 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!==a.length&&Ki.throwArgumentError("types/value length mismatch","tuple",t);let i=new si(n.wordSize),r=new si(n.wordSize),s=[];e.forEach((l,p)=>{let f=a[p];if(l.dynamic){let x=r.length;l.encode(r,f);let I=i.writeUpdatableValue();s.push(_=>{I(_+x)})}else l.encode(i,f)}),s.forEach(l=>{l(i.length)});let o=n.appendWriter(i);return o+=n.appendWriter(r),o}function bd(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===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(n)}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 kt{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&&Ki.throwError("insufficient data length",M.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let a=[];for(let i=0;iro,EtherSymbol:()=>Py,HashZero:()=>$i,MaxInt256:()=>Ry,MaxUint256:()=>uo,MinInt256:()=>Sy,NegativeOne:()=>so,One:()=>oo,Two:()=>Cy,WeiPerEther:()=>Iy,Zero:()=>Ji});var ro="0x0000000000000000000000000000000000000000";var so=F.from(-1),Ji=F.from(0),oo=F.from(1),Cy=F.from(2),Iy=F.from("1000000000000000000"),uo=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),Sy=F.from("-0x8000000000000000000000000000000000000000000000000000000000000000"),Ry=F.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");var $i="0x0000000000000000000000000000000000000000000000000000000000000000";var Py="\u039E";var lo=class extends kt{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=uo.mask(e.wordSize*8);if(this.signed){let r=i.mask(this.size*8-1);(a.gt(r)||a.lt(r.add(oo).mul(so)))&&this._throwError("value out-of-bounds",t)}else(a.lt(Ji)||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 Ny="strings/5.7.0";var Dy=new M(Ny),Gt;(function(n){n.current="",n.NFC="NFC",n.NFD="NFD",n.NFKC="NFKC",n.NFKD="NFKD"})(Gt||(Gt={}));var Bt;(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"})(Bt||(Bt={}));function Q6(n,e,t,a,i){return Dy.throwArgumentError(`invalid codepoint at offset ${e}; ${n}`,"bytes",t)}function Oy(n,e,t,a,i){if(n===Bt.BAD_PREFIX||n===Bt.UNEXPECTED_CONTINUE){let r=0;for(let s=e+1;s>6===2;s++)r++;return r}return n===Bt.OVERRUN?t.length-e-1:0}function Y6(n,e,t,a,i){return n===Bt.OVERLONG?(a.push(i),0):(a.push(65533),Oy(n,e,t,a,i))}var po=Object.freeze({error:Q6,ignore:Oy,replace:Y6});function Td(n,e){e==null&&(e=po.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(Bt.UNEXPECTED_CONTINUE,a-1,n,t):a+=e(Bt.BAD_PREFIX,a-1,n,t);continue}if(a-1+r>=n.length){a+=e(Bt.OVERRUN,a-1,n,t);continue}let o=i&(1<<8-r-1)-1;for(let l=0;l1114111){a+=e(Bt.OUT_OF_RANGE,a-1-r,n,t,o);continue}if(o>=55296&&o<=57343){a+=e(Bt.UTF16_SURROGATE,a-1-r,n,t,o);continue}if(o<=s){a+=e(Bt.OVERLONG,a-1-r,n,t,o);continue}t.push(o)}}return t}function ve(n,e=Gt.current){e!=Gt.current&&(Dy.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 gd(n){let e="0000"+n.toString(16);return"\\u"+e.substring(e.length-4)}function vd(n,e){return'"'+Td(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?gd(t):(t-=65536,gd((t>>10&1023)+55296)+gd((t&1023)+56320))}).join("")+'"'}function yo(n){return n.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function Jt(n,e){return yo(Td(n,e))}function Ea(n,e=Gt.current){return Td(ve(n,e))}function wd(n){let e=ve(n);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return W(ye([e,$i]).slice(0,32))}function _d(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 Jt(e.slice(0,t))}function X6(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 By(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 Ad(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 Z6=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"),e2="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(n=>parseInt(n,16)),t2=[{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}],n2=kd("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"),a2=kd("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"),i2=kd("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),r2=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 s2(n){return n.reduce((e,t)=>(t.forEach(a=>{e.push(a)}),e),[])}function o2(n){return!!Ad(n,Z6)}function u2(n){let e=Ad(n,t2);if(e)return[n+e.s];let t=n2[n];if(t)return t;let a=a2[n];if(a)return[n+a[0]];let i=i2[n];return i||null}function d2(n){return!!Ad(n,r2)}function Md(n){if(n.match(/^[a-z0-9-]*$/i)&&n.length<=59)return n.toLowerCase();let e=Ea(n);e=s2(e.map(a=>{if(e2.indexOf(a)>=0)return[];if(a>=65024&&a<=65039)return[];let i=u2(a);return i||[a]})),e=Ea(yo(e),Gt.NFKC),e.forEach(a=>{if(d2(a))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(a=>{if(o2(a))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 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 di=class extends kt{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 xd(e,this.coders,t)}decode(e){return e.coerce(this.name,bd(e,this.coders))}};var co=new M(Vn),l2=new RegExp(/^bytes([0-9]*)$/),p2=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 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(a=>this._getCoder(a)),e.name);case"":return new io(e.name)}let t=e.type.match(p2);if(t){let a=parseInt(t[2]||"256");return(a===0||a>256||a%8!==0)&&co.throwArgumentError("invalid "+t[1]+" bit length","param",e),new lo(a/8,t[1]==="int",e.name)}if(t=e.type.match(l2),t){let a=parseInt(t[1]);return(a===0||a>32)&&co.throwArgumentError("invalid bytes length","param",e),new ao(a,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 a=e.map(s=>this._getCoder(pt.from(s))),i=new di(a,"_"),r=this._getWriter();return i.encode(r,t),r.data}decode(e,t,a){let i=e.map(s=>this._getCoder(pt.from(s)));return new di(i,"_").decode(this._getReader(j(t),a))}},Wr=new Qi;function nn(n){return fe(ve(n))}var mo="hash/5.7.0";var Ed={};ji(Ed,{decode:()=>Yi,encode:()=>Xi});function Yi(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 y2(n){let e={};for(let t=0;t>--l&1}let x=31,I=Math.pow(2,x),_=I>>>1,v=_>>1,S=I-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=a-4;return O.map(J=>{switch(J-E){case 3:return E+65792+(n[o++]<<16|n[o++]<<8|n[o++]);case 2:return E+256+(n[o++]<<8|n[o++]);case 1:return E+n[o++];default:return J-1}})}function c2(n){let e=0;return()=>n[e++]}function Uy(n){return c2(f2(n))}function m2(n){return n&1?~n>>1:n>>1}function h2(n,e){let t=Array(n);for(let a=0;ae[s]):t}function Vy(n){let e=[];for(;;){let t=n();if(t==0)break;e.push(g2(t,n))}for(;;){let t=n()-1;if(t<0)break;e.push(T2(t,n))}return y2(Ly(e))}function b2(n){let e=[];for(;;){let t=n();if(t==0)break;e.push(t)}return e}function jy(n,e,t){let a=Array(n).fill(void 0).map(()=>[]);for(let i=0;ia[s].push(r));return a}function g2(n,e){let t=1+e(),a=e(),i=b2(e),r=jy(i.length,1+n,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 I=x*a;return[l+x*t,p.map(_=>_+I)]})}))}function T2(n,e){let t=1+e();return jy(t,1+n,e).map(i=>[i[0],i.slice(1)])}function Hy(n){let e=Kr(n).sort((a,i)=>a-i);return t();function t(){let a=[];for(;;){let p=Kr(n,e);if(p.length==0)break;a.push({set:new Set(p),node:t()})}a.sort((p,f)=>f.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 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(),v2=new Set(Kr(ho)),w2=new Set(Kr(ho)),_2=Vy(ho),k2=Hy(ho),Gy=45,zy=95;function Wy(n){return Ea(n)}function A2(n){return n.filter(e=>e!=65039)}function Ky(n){for(let e of n.split(".")){let t=Wy(e);try{for(let a=t.lastIndexOf(zy)-1;a>=0;a--)if(t[a]!==zy)throw new Error("underscore only allowed at start");if(t.length>=4&&t.every(a=>a<128)&&t[2]===Gy&&t[3]===Gy)throw new Error("invalid label extension")}catch(a){throw new Error(`Invalid label "${e}": ${a.message}`)}}return n}function Jy(n){return Ky(M2(n,A2))}function M2(n,e){let t=Wy(n).reverse(),a=[];for(;t.length;){let i=C2(t);if(i){a.push(...e(i));continue}let r=t.pop();if(v2.has(r)){a.push(r);continue}if(w2.has(r))continue;let s=_2[r];if(s){a.push(...s);continue}throw new Error(`Disallowed codepoint: 0x${r.toString(16).toUpperCase()}`)}return Ky(E2(String.fromCodePoint(...a)))}function E2(n){return n.normalize("NFC")}function C2(n,e){var t;let a=k2,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 I2=new M(mo),Qy=new Uint8Array(32);Qy.fill(0);function $y(n){if(n.length===0)throw new Error("invalid ENS name; empty component");return n}function Cd(n){let e=ve(Jy(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($y(e.slice(a))),t}function Id(n){try{return Cd(n).length!==0}catch{}return!1}function Ca(n){typeof n!="string"&&I2.throwArgumentError("invalid ENS name; not a string","name",n);let e=Qy,t=Cd(n);for(;t.length;)e=fe(ye([e,fe(t.pop())]));return W(e)}function Jr(n){return W(ye(Cd(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 Yy=`Ethereum Signed Message: +`;function Zi(n){return typeof n=="string"&&(n=ve(n)),fe(ye([ve(Yy),ve(String(n.length)),n]))}var S2=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},xt=new M(mo),t0=new Uint8Array(32);t0.fill(0);var R2=F.from(-1),n0=F.from(0),a0=F.from(1),P2=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function N2(n){let e=j(n),t=e.length%32;return t?_t([e,t0.slice(t)]):W(e)}var D2=me(a0.toHexString(),32),O2=me(n0.toHexString(),32),Xy={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Sd=["name","version","chainId","verifyingContract","salt"];function Zy(n){return function(e){return typeof e!="string"&&xt.throwArgumentError(`invalid domain value for ${JSON.stringify(n)}`,`domain.${n}`,e),e}}var B2={name:Zy("name"),version:Zy("version"),chainId:function(n){try{return F.from(n).toString()}catch{}return xt.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",n)},verifyingContract:function(n){try{return ce(n).toLowerCase()}catch{}return xt.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 xt.throwArgumentError('invalid domain value "salt"',"domain.salt",n)}};function Rd(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))&&xt.throwArgumentError("invalid numeric width","type",n);let i=P2.mask(t?a-1:a),r=t?i.add(a0).mul(R2):n0;return function(s){let o=F.from(s);return(o.lt(r)||o.gt(i))&&xt.throwArgumentError(`value out-of-bounds for ${n}`,"value",s),me(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))&&xt.throwArgumentError("invalid bytes width","type",n),function(a){return j(a).length!==t&&xt.throwArgumentError(`invalid length for ${n}`,"value",a),N2(a)}}}switch(n){case"address":return function(e){return me(ce(e),32)};case"bool":return function(e){return e?D2:O2};case"bytes":return function(e){return fe(e)};case"string":return function(e){return nn(e)}}return null}function e0(n,e){return`${n}(${e.map(({name:t,type:a})=>a+" "+t).join(",")})`}var bt=class{constructor(e){B(this,"types",Object.freeze(ct(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]&&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),!Rd(f)&&(a[f]||xt.throwArgumentError(`unknown type ${JSON.stringify(f)}`,"types",e),a[f].push(o),t[o][f]=!0)})}let r=Object.keys(a).filter(o=>a[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=>{!a[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=Rd(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(_t(l))}}let a=this.types[e];if(a){let i=nn(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),_t(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,a){if(Rd(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&&xt.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),{}):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,a){return bt.from(t).hashStruct(e,a)}static hashDomain(e){let t=[];for(let a in e){let i=Xy[a];i||xt.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(a)}`,"domain",e),t.push({name:a,type:i})}return t.sort((a,i)=>Sd.indexOf(a.name)-Sd.indexOf(i.name)),bt.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,a){return _t(["0x1901",bt.hashDomain(e),bt.from(t).hash(a)])}static hash(e,t,a){return fe(bt.encode(e,t,a))}static resolveNames(e,t,a,i){return S2(this,void 0,void 0,function*(){e=we(e);let r={};e.verifyingContract&&!ie(e.verifyingContract,20)&&(r[e.verifyingContract]="0x");let s=bt.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){bt.hashDomain(e);let i={},r=[];Sd.forEach(l=>{let p=e[l];p!=null&&(i[l]=B2[l](p),r.push({name:l,type:Xy[l]}))});let s=bt.from(t),o=we(t);return o.EIP712Domain?xt.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"&&xt.throwArgumentError("invalid string","value",p),p}return xt.throwArgumentError("unsupported type","type",l)})}}};var gt=new M(Vn);var er=class extends en{},tr=class extends en{},Pd=class extends en{},oa=class extends en{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 i0(n,e){let t=new Error(`deferred error during ABI decoding triggered accessing ${n}`);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(a=>qt.from(a)).filter(a=>a!=null)),B(this,"_abiCoder",mt(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){gt.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]){gt.warn("duplicate definition - "+r);return}i[r]=a}),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(a=>a.format(e));return e===ge.json?JSON.stringify(t.map(a=>JSON.parse(a))):t}static getAbiCoder(){return Wr}static getAddress(e){return ce(e)}static getSighash(e){return Ce(nn(e.format()),0,4)}static getEventTopic(e){return nn(e.format())}getFunction(e){if(ie(e)){for(let a in this.functions)if(e===this.getSighash(a))return this.functions[a];gt.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?gt.throwArgumentError("no matching function","name",a):i.length>1&>.throwArgumentError("multiple matching functions","name",a),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 a=e.toLowerCase();for(let i in this.events)if(a===this.getEventTopic(i))return this.events[i];gt.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?gt.throwArgumentError("no matching event","name",a):i.length>1&>.throwArgumentError("multiple matching events","name",a),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 a=mt(this.constructor,"getSighash");for(let i in this.errors){let r=this.errors[i];if(e===a(r))return this.errors[i]}gt.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?gt.throwArgumentError("no matching error","name",a):i.length>1&>.throwArgumentError("multiple matching errors","name",a),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 a=j(t);return W(a.slice(0,4))!==this.getSighash(e)&>.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(ye([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)&>.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(ye([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)),f=F2[p];if(f)s=this._abiCoder.decode(f.inputs,a.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,a.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 a=[];e.anonymous||a.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?a.push(null):o.baseType==="array"||o.baseType==="tuple"?gt.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&>.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(nn(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 I=this.getEventTopic(e);(!ie(a[0],32)||a[0].toLowerCase()!==I)&>.throwError("fragment/topic mismatch",M.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:I,value:a[0]}),a=a.slice(1)}let i=[],r=[],s=[];e.inputs.forEach((I,_)=>{I.indexed?I.type==="string"||I.type==="bytes"||I.baseType==="tuple"||I.baseType==="array"?(i.push(pt.fromObject({type:"bytes32",name:I.name})),s.push(!0)):(i.push(I),s.push(!1)):(r.push(I),s.push(!1))});let o=a!=null?this._abiCoder.decode(i,ye(a)):null,l=this._abiCoder.decode(r,t,!0),p=[],f=0,x=0;e.inputs.forEach((I,_)=>{if(I.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(I.name&&p[I.name]==null){let v=p[_];v instanceof Error?Object.defineProperty(p,I.name,{enumerable:!0,get:()=>{throw i0(`property ${JSON.stringify(I.name)}`,v)}}):p[I.name]=v}});for(let I=0;I{throw i0(`index ${I}`,_)}})}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),a=this.getError(t.substring(0,10).toLowerCase());return a?new Pd({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 r0="abstract-provider/5.7.0";var L2=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},U2=new M(r0),xo=class extends en{static isForkEvent(e){return!!(e&&e._isForkEvent)}};var $t=class{constructor(){U2.checkAbstract(new.target,$t),B(this,"_isProvider",!0)}getFeeData(){return L2(this,void 0,void 0,function*(){let{block:e,gasPrice:t}=yield Ie({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 s0="abstract-signer/5.7.0";var kn=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},pn=new M(s0),V2=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],j2=[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 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 a=yield Ie(this.checkTransaction(e));return yield this.provider.call(a,t)})}sendTransaction(e){return kn(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 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 a in e)V2.indexOf(a)===-1&&pn.throwArgumentError("invalid transaction key: "+a,"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(a=>(a[0].toLowerCase()!==a[1].toLowerCase()&&pn.throwArgumentError("from address mismatch","transaction",e),a[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&&pn.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)?pn.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(t.type===0||t.type===1)&&a&&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?(a&&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(j2.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 Ie(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,a){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new ua(this.address,e)}};var pe=_n(sd()),Jn=_n(Hd());function dr(n,e,t){return t={path:e,exports:{},require:function(a,i){return lx(a,i??t.path)}},n(t,t.exports),t.exports}function lx(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var Wd=G0;function G0(n,e){if(!n)throw new Error(e||"Assertion failed")}G0.equal=function(e,t,a){if(e!=t)throw new Error(a||"Assertion failed: "+e+" != "+t)};var Cn=dr(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,I=f&255;x?l.push(x,I):l.push(I)}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(I>>1)-1?S=(I>>1)-L:S=L,_.isubn(S)):S=0,x[v]=S,_.iushrn(1)}return x}t.getNAF=a;function i(l,p){var f=[[],[]];l=l.clone(),p=p.clone();for(var x=0,I=0,_;l.cmpn(-x)>0||p.cmpn(-I)>0;){var v=l.andln(3)+x&3,S=p.andln(3)+I&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)+I&7,(_===3||_===5)&&v===2?O=-S:O=S),f[1].push(O),2*x===L+1&&(x=1-x),2*I===O+1&&(I=1-I),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,px=an.getJSF,_o=an.assert;function Pa(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 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 a=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),I=r;I>0;I--){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,a,i,r){var s=this._wnafT1,o=this._wnafT2,l=this._wnafT3,p=0,f,x,I;for(f=0;f=1;f-=2){var v=f-1,S=f;if(s[v]!==1||s[S]!==1){l[v]=wo(a[v],s[v],this._bitLength),l[S]=wo(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=px(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;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?I=o[x][R-1>>1]:R<0&&(I=o[x][-R-1>>1].neg()),I.type==="affine"?J=J.mixedAdd(I):J=J.add(I))}}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 a=[this],i=this,r=0;r=0&&(_=p,v=f),x.negative&&(x=x.neg(),I=I.neg()),_.negative&&(_=_.neg(),v=v.neg()),[{a:x,b:I},{a:_,b:v}]};cn.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),f=s.mul(i.b),x=e.sub(o).sub(l),I=p.add(f).neg();return{k1:x,k2:I}};cn.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)};cn.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};cn.prototype._endoWnafMulAdd=function(e,t,a){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 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)};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,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)};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,a){var i=[this,t],r=[e,a];return this.curve.endo?this.curve._endoWnafMulAdd(i,r):this.curve._wnafMulAdd(1,i,r,2)};Et.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)};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 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};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(n,e,t,a){pi.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}Kd(Pt,pi.BasePoint);cn.prototype.jpoint=function(e,t,a){return new Pt(this,e,t,a)};Pt.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)};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(),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 f=l.redSqr(),x=f.redMul(l),I=i.redMul(f),_=p.redSqr().redIAdd(x).redISub(I).redISub(I),v=p.redMul(I.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(),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(),f=p.redMul(o),x=a.redMul(p),I=l.redSqr().redIAdd(f).redISub(x).redISub(x),_=l.redMul(x.redISub(I)).redISub(r.redMul(f)),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 a=this;for(t=0;t=0)return!1;if(a.redIAdd(r),this.x.cmp(a)===0)return!0}};Pt.prototype.inspect=function(){return this.isInfinity()?"":""};Pt.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var To=dr(function(n,e){"use strict";var t=e;t.base=pi,t.short=fx,t.mont=null,t.edwards=null}),vo=dr(function(n,e){"use strict";var t=e,a=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,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: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(n){if(!(this instanceof Ra))return new Ra(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=Cn.toArray(n.entropy,n.entropyEnc||"hex"),t=Cn.toArray(n.nonce,n.nonceEnc||"hex"),a=Cn.toArray(n.pers,n.persEnc||"hex");Wd(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,t,a)}var z0=Ra;Ra.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};Ra.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=Cn.toArray(a,i||"hex"),this._update(a));for(var r=[];r.length"};var cx=an.assert;function ko(n,e){if(n instanceof ko)return n;this._importDER(n,e)||(cx(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 Ao=ko;function mx(){this.place=0}function qd(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 q0(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)}ko.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=q0(t),a=q0(a);!a[0]&&!(a[1]&128);)a=a.slice(1);var i=[2];Gd(i,t.length),i=i.concat(t),i.push(2),Gd(i,a.length);var r=i.concat(a),s=[48];return Gd(s,r.length),s=s.concat(r),an.encode(s,e)};var hx=function(){throw new Error("unsupported")},W0=an.assert;function yn(n){if(!(this instanceof yn))return new yn(n);typeof n=="string"&&(W0(Object.prototype.hasOwnProperty.call(vo,n),"Unknown curve "+n),n=vo[n]),n instanceof vo.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 xx=yn;yn.prototype.keyPair=function(e){return new Jd(this,e)};yn.prototype.keyFromPrivate=function(e,t){return Jd.fromPrivate(this,e,t)};yn.prototype.keyFromPublic=function(e,t){return Jd.fromPublic(this,e,t)};yn.prototype.genKeyPair=function(e){e||(e={});for(var t=new z0({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||hx(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)}};yn.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};yn.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 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 I=this.g.mul(x);if(!I.isInfinity()){var _=I.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=(I.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,a,i){e=this._truncateToN(new pe.default(e,16)),a=this.keyFromPublic(a,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,a.getPublic(),p),f.isInfinity()?!1:f.eqXToP(r)):(f=this.g.mulAdd(l,a.getPublic(),p),f.isInfinity()?!1:f.getX().umod(this.n).cmp(r)===0)};yn.prototype.recoverPubKey=function(n,e,t,a){W0((3&t)===t,"The recovery param is more than two bits"),e=new Ao(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 f=e.r.invm(i),x=i.sub(r).mul(f).umod(i),I=o.mul(f).umod(i);return this.g.mulAdd(x,s,I)};yn.prototype.getKeyRecoveryParam=function(n,e,t,a){if(e=new Ao(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 bx=dr(function(n,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=xx,t.eddsa=null}),K0=bx.ec;var J0="signing-key/5.7.0";var Qd=new M(J0),$d=null;function $n(){return $d||($d=new K0("secp256k1")),$d}var mn=class{constructor(e){B(this,"curve","secp256k1"),B(this,"privateKey",W(e)),Nt(this.privateKey)!==32&&Qd.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)),a=$n().keyFromPublic(j(e));return"0x"+t.pub.add(a.pub).encodeCompressed("hex")}signDigest(e){let t=$n().keyFromPrivate(j(this.privateKey)),a=j(e);a.length!==32&&Qd.throwArgumentError("bad digest length","digest",e);let i=t.sign(a,{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)),a=$n().keyFromPublic(j(Yr(e)));return me("0x"+t.derive(a.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}};function Mo(n,e){let t=Un(e),a={r:j(t.r),s:j(t.s)};return"0x"+$n().recoverPubKey(j(n),a,t.recoveryParam).encode("hex",!1)}function Yr(n,e){let t=j(n);if(t.length===32){let a=new mn(t);return e?"0x"+$n().keyFromPrivate(t).getPublic(!0,"hex"):a.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 Qd.throwArgumentError("invalid public or private key","key","[REDACTED]")}var $0="transactions/5.7.0";var Ut=new M($0),Eo;(function(n){n[n.legacy=0]="legacy",n[n.eip2930=1]="eip2930",n[n.eip1559=2]="eip1559"})(Eo||(Eo={}));function Xd(n){return n==="0x"?null:ce(n)}function Lt(n){return n==="0x"?Ji:F.from(n)}var gx=[{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"}],Tx={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function hn(n){let e=Yr(n);return ce(Ce(fe(Ce(e,1)),12))}function yi(n,e){return hn(Mo(j(n),e))}function rn(n,e){let t=Zt(F.from(n).toHexString());return t.length>32&&Ut.throwArgumentError("invalid length for "+e,"transaction:"+e,n),t}function Yd(n,e){return{address:ce(n),storageKeys:(e||[]).map((t,a)=>(Nt(t)!==32&&Ut.throwArgumentError("invalid access list storageKey",`accessList[${n}:${a}]`,t),t.toLowerCase()))}}function sn(n){if(Array.isArray(n))return n.map((t,a)=>Array.isArray(t)?(t.length>2&&Ut.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${a}]`,t),Yd(t[0],t[1])):Yd(t.address,t.storageKeys));let e=Object.keys(n).map(t=>{let a=n[t].reduce((i,r)=>(i[r]=!0,i),{});return Yd(t,Object.keys(a).sort())});return e.sort((t,a)=>t.address.localeCompare(a.address)),e}function Q0(n){return sn(n).map(e=>[e.address,e.storageKeys])}function Y0(n,e){if(n.gasPrice!=null){let a=F.from(n.gasPrice),i=F.from(n.maxFeePerGas||0);a.eq(i)||Ut.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:a,maxFeePerGas:i})}let t=[rn(n.chainId||0,"chainId"),rn(n.nonce||0,"nonce"),rn(n.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),rn(n.maxFeePerGas||0,"maxFeePerGas"),rn(n.gasLimit||0,"gasLimit"),n.to!=null?ce(n.to):"0x",rn(n.value||0,"value"),n.data||"0x",Q0(n.accessList||[])];if(e){let a=Un(e);t.push(rn(a.recoveryParam,"recoveryParam")),t.push(Zt(a.r)),t.push(Zt(a.s))}return _t(["0x02",sa(t)])}function X0(n,e){let t=[rn(n.chainId||0,"chainId"),rn(n.nonce||0,"nonce"),rn(n.gasPrice||0,"gasPrice"),rn(n.gasLimit||0,"gasLimit"),n.to!=null?ce(n.to):"0x",rn(n.value||0,"value"),n.data||"0x",Q0(n.accessList||[])];if(e){let a=Un(e);t.push(rn(a.recoveryParam,"recoveryParam")),t.push(Zt(a.r)),t.push(Zt(a.s))}return _t(["0x01",sa(t)])}function vx(n,e){Gi(n,Tx);let t=[];gx.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&&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 a=0;if(n.chainId!=null?(a=n.chainId,typeof a!="number"&&Ut.throwArgumentError("invalid transaction.chainId","transaction",n)):e&&!aa(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 sa(t);let i=Un(e),r=27+i.recoveryParam;return a!==0?(t.pop(),t.pop(),t.pop(),r+=a*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 Xr(n,e){if(n.type==null||n.type===0)return n.accessList!=null&&Ut.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",n),vx(n,e);switch(n.type){case 1:return X0(n,e);case 2:return Y0(n,e);default:break}return Ut.throwError(`unsupported transaction type: ${n.type}`,M.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:n.type})}function Z0(n,e,t){try{let a=Lt(e[0]).toNumber();if(a!==0&&a!==1)throw new Error("bad recid");n.v=a}catch{Ut.throwArgumentError("invalid v for transaction type: 1","v",e[0])}n.r=me(e[1],32),n.s=me(e[2],32);try{let a=fe(t(n));n.from=yi(a,{r:n.r,s:n.s,recoveryParam:n.v})}catch{}}function wx(n){let e=Gr(n.slice(1));e.length!==9&&e.length!==12&&Ut.throwArgumentError("invalid component count for transaction type: 2","payload",W(n));let t=Lt(e[2]),a=Lt(e[3]),i={type:2,chainId:Lt(e[0]).toNumber(),nonce:Lt(e[1]).toNumber(),maxPriorityFeePerGas:t,maxFeePerGas:a,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(n),Z0(i,e.slice(9),Y0)),i}function _x(n){let e=Gr(n.slice(1));e.length!==8&&e.length!==11&&Ut.throwArgumentError("invalid component count for transaction type: 1","payload",W(n));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(n),Z0(t,e.slice(8),X0)),t}function kx(n){let e=Gr(n);e.length!==9&&e.length!==6&&Ut.throwArgumentError("invalid raw transaction","rawTransaction",n);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 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(sa(i));try{t.from=yi(r,{r:W(t.r),s:W(t.s),recoveryParam:a})}catch{}t.hash=fe(n)}return t.type=null,t}function Co(n){let e=j(n);if(e[0]>127)return kx(e);switch(e[0]){case 1:return _x(e);case 2:return wx(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(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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Se=new M(ef),Ax={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(n,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{}n||Se.throwError("a provider or signer is needed to resolve ENS names",M.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});let a=yield n.resolveName(t);return a==null&&Se.throwArgumentError("resolver or addr is not configured for ENS name","name",t),a})}function Zr(n,e,t){return Na(this,void 0,void 0,function*(){return Array.isArray(t)?yield Promise.all(t.map((a,i)=>Zr(n,Array.isArray(e)?e[i]:e[a.name],a))):t.type==="address"?yield Io(n,e):t.type==="tuple"?yield Zr(n,e,t.components):t.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(a=>Zr(n,a,t.arrayChildren))):Promise.reject(Se.makeError("invalid value for array",M.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function Po(n,e,t){return Na(this,void 0,void 0,function*(){let a={};t.length===e.inputs.length+1&&typeof t[t.length-1]=="object"&&(a=we(t.pop())),Se.checkArgumentCount(t.length,e.inputs.length,"passed to contract"),n.signer?a.from?a.from=Ie({override:Io(n.signer,a.from),signer:n.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})):a.from=n.signer.getAddress():a.from&&(a.from=Io(n.provider,a.from));let i=yield Ie({args:Zr(n.signer||n.provider,t,e.inputs),address:n.resolvedAddress,overrides:Ie(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=sn(o.accessList)),s.gasLimit==null&&e.gas!=null){let p=21e3,f=j(r);for(let x=0;xa[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 Mx(n,e){return function(...t){return Po(n,e,t)}}function Ex(n,e){let t=n.signer||n.provider;return function(...a){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(n,e,a);return yield t.estimateGas(i)})}}function nf(n,e){let t=e.wait.bind(e);e.wait=a=>t(a).then(i=>(i.events=i.logs.map(r=>{let s=ct(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 af(n,e,t){let a=n.signer||n.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=we(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 Po(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===M.errors.CALL_EXCEPTION&&(l.address=n.address,l.args=i,l.transaction=s),l}})}}function Cx(n,e){return function(...t){return Na(this,void 0,void 0,function*(){n.signer||Se.throwError("sending a transaction requires a signer",M.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),n.deployTransaction!=null&&(yield n._deployed());let a=yield Po(n,e,t),i=yield n.signer.sendTransaction(a);return nf(n,i),i})}}function tf(n,e,t){return e.constant?af(n,e,t):Cx(n,e)}function rf(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 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(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]}},Zd=class extends fi{constructor(){super("error",null)}},So=class extends fi{constructor(e,t,a,i){let r={address:e},s=t.getEventTopic(a);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",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=Wi(e.args);if(t.length)throw t[0].error;let a=(e.args||[]).slice();return a.push(e),a}},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=(a,i)=>this.interface.decodeEventLog(t.eventFragment,a,i),e.args=t.args}catch{}}},lr=class{constructor(e,t,a){B(this,"interface",mt(new.target,"getInterface")(t)),a==null?(B(this,"provider",null),B(this,"signer",null)):St.isSigner(a)?(B(this,"provider",a.provider||null),B(this,"signer",a)):$t.isProvider(a)?(B(this,"provider",a),B(this,"signer",null)):Se.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]]):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,Mx(this,o)),this.estimateGas[s]==null&&B(this.estimateGas,s,Ex(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 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=we(e||{});return["from","to"].forEach(function(a){t[a]!=null&&Se.throwError("cannot override "+a,M.errors.UNSUPPORTED_OPERATION,{operation:a})}),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 Zd);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 a=e.topics[0];if(typeof a!="string")throw new Error("invalid topic");let i=this.interface.getEvent(a);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,a){let i=ct(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||Se.throwError("events require a provider or a signer with a provider",M.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=we(i.filter);return typeof t=="string"&&ie(t,32)?(a!=null&&Se.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 lr{},ci=class{constructor(e,t,a){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),a&&!St.isSigner(a)&&Se.throwArgumentError("invalid signer","signer",a),B(this,"bytecode",i),B(this,"interface",mt(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=we(e.pop());for(let a in t)if(!Ax[a])throw new Error("unknown transaction override "+a)}return["data","from","to"].forEach(a=>{t[a]!=null&&Se.throwError("cannot override "+a,M.errors.UNSUPPORTED_OPERATION,{operation:a})}),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 a=yield Zr(this.signer,e,this.interface.deploy.inputs);a.push(t);let i=this.getDeployTransaction(...a),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 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 ui(e)}static getContract(e,t,a){return new oe(e,t,a)}};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;)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 I=j(fa(i,n,l));r||(r=I.length,f=new Uint8Array(r),s=Math.ceil(a/r),p=a-(s-1)*r),f.set(I);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 Ct(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 a=new Uint8Array(37);if(e&fr){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(fa(Qn.sha512,this.chainCode,a)),r=i.slice(0,32),s=i.slice(32),o=null,l=null;this.privateKey?o=Do(F.from(r).add(this.privateKey).mod(Px)):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 Ct(yr,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 a=this;for(let i=0;i=fr)throw new Error("invalid path index - "+r);a=a._derive(fr+s)}else if(r.match(/^[0-9]+$/)){let s=parseInt(r);if(s>=fr)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(fa(Qn.sha512,Nx,a));return new Ct(yr,Do(i.slice(0,32)),null,"0x00000000",Do(i.slice(32)),0,0,t)}static fromMnemonic(e,t,a){return a=nl(a),e=xi(cr(e,a),a),Ct._fromSeed(al(e,t),{phrase:e,path:"m",locale:a.locale})}static fromSeed(e){return Ct._fromSeed(e,null)}static fromExtendedKey(e){let t=ya.decode(e);(t.length!==82||pf(t.slice(0,78))!==e)&&ns.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 Ct(yr,null,W(o),i,s,r,a,null);case"0x0488ade4":case"0x04358394 ":if(o[0]!==0)break;return new Ct(yr,W(o.slice(1)),null,i,s,r,a,null)}return ns.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}};function al(n,e){e||(e="");let t=ve("mnemonic"+e,Gt.NFKD);return mi(ve(n,Gt.NFKD),t,2048,64,"sha512")}function cr(n,e){e=nl(e),ns.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=yf(s);if((j(Yt(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 xi(n,e){if(e=nl(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]&Dx(8-a)),a+=3);let i=n.length/4,r=j(Yt(n))[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(n,e){try{return cr(n,e),!0}catch{}return!1}function cf(n){return(typeof n!="number"||n<0||n>=fr||n%1)&&ns.throwArgumentError("invalid account index","index",n),`m/44'/60'/${n}'/0/0`}var mf="random/5.7.0";var il=new M(mf);function Ox(){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=Ox(),Oo=hf.crypto||hf.msCrypto;(!Oo||!Oo.getRandomValues)&&(il.warn("WARNING: Missing strong random number source"),Oo={getRandomValues:function(n){return il.throwError("no secure random source avaialble",M.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function Yn(n){(n<=0||n>1024||n%1||n!=n)&&il.throwArgumentError("invalid length","length",n);let e=new Uint8Array(n);return Oo.getRandomValues(e),j(e)}function as(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 ol=_n(sl());var Bo="json-wallets/5.7.0";function ma(n){return typeof n=="string"&&n.substring(0,2)!=="0x"&&(n="0x"+n),j(n)}function mr(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),E=new ha.default.Counter(x),J=new ha.default.ModeOfOperation.ctr(O,E),$=j(J.encrypt(i)),de=fe(ye([U,$])),T={address:n.address.substring(2).toLowerCase(),id:bf(I),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 ha.default.Counter(R),q=new ha.default.ModeOfOperation.ctr(H,N),se=j(q.encrypt(s)),C=new Date,u=C.getUTCFullYear()+"-"+mr(C.getUTCMonth()+1,2)+"-"+mr(C.getUTCDate(),2)+"T"+mr(C.getUTCHours(),2)+"-"+mr(C.getUTCMinutes(),2)+"-"+mr(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:l,version:"0.1"}}return JSON.stringify(T)})}function Ef(n,e,t){if(Fo(n)){t&&t(0);let a=dl(n,e);return t&&t(1),Promise.resolve(a)}return Lo(n)?Mf(n,e,t):Promise.reject(new Error("invalid JSON wallet"))}function Cf(n,e){if(Fo(n))return dl(n,e);if(Lo(n))return Af(n,e);throw new Error("invalid JSON wallet")}var If="wallet/5.7.0";var Sf=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},hr=new M(If);function Vx(n){return n!=null&&ie(n.privateKey,32)&&n.address!=null}function jx(n){let e=n.mnemonic;return e&&e.phrase}var on=class extends St{constructor(e,t){if(super(),Vx(e)){let a=new mn(e.privateKey);if(B(this,"_signingKey",()=>a),B(this,"address",hn(this.publicKey)),this.address!==ce(e.address)&&hr.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),jx(e)){let i=e.mnemonic;B(this,"_mnemonic",()=>({phrase:i.phrase,path:i.path||ca,locale:i.locale||"en"}));let r=this.mnemonic,s=Ct.fromMnemonic(r.phrase,null,r.locale).derivePath(r.path);hn(s.privateKey)!==this.address&&hr.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else B(this,"_mnemonic",()=>null)}else{if(mn.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 a=new mn(e);B(this,"_signingKey",()=>a)}B(this,"_mnemonic",()=>null),B(this,"address",hn(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 on(this,e)}signTransaction(e){return Ie(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 a=this._signingKey().signDigest(fe(Xr(t)));return Xr(t,a)})}signMessage(e){return Sf(this,void 0,void 0,function*(){return Br(this._signingKey().signDigest(Zi(e)))})}_signTypedData(e,t,a){return Sf(this,void 0,void 0,function*(){let i=yield bt.resolveNames(e,t,a,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,a){if(typeof t=="function"&&!a&&(a=t,t={}),a&&typeof a!="function")throw new Error("invalid callback");return t||(t={}),cl(this,e,t,a)}static createRandom(e){let t=Yn(16);e||(e={}),e.extraEntropy&&(t=j(Ce(fe(ye([t,e.extraEntropy])),0,16)));let a=xi(t,e.locale);return on.fromMnemonic(a,e.path,e.locale)}static fromEncryptedJson(e,t,a){return Ef(e,t,a).then(i=>new on(i))}static fromEncryptedJsonSync(e,t){return new on(Cf(e,t))}static fromMnemonic(e,t,a){return t||(t=ca),new on(Ct.fromMnemonic(e,null,a).derivePath(t))}};function Rf(n,e){return yi(Zi(n),e)}function Pf(n,e,t,a){return yi(bt.hash(n,e,t),a)}var ea={};ji(ea,{AlchemyProvider:()=>wr,AlchemyWebSocketProvider:()=>ms,AnkrProvider:()=>hs,BaseProvider:()=>Zn,CloudflareProvider:()=>xs,EtherscanProvider:()=>bs,FallbackProvider:()=>Ts,Formatter:()=>X,InfuraProvider:()=>kr,InfuraWebSocketProvider:()=>ws,IpcProvider:()=>El,JsonRpcBatchProvider:()=>eu,JsonRpcProvider:()=>Xt,JsonRpcSigner:()=>Tr,NodesmithProvider:()=>_s,PocketProvider:()=>ks,Provider:()=>$t,Resolver:()=>gr,StaticJsonRpcProvider:()=>cs,UrlJsonRpcProvider:()=>It,Web3Provider:()=>As,WebSocketProvider:()=>ga,getDefaultProvider:()=>tu,getNetwork:()=>rs,isCommunityResourcable:()=>xl,isCommunityResource:()=>us,showThrottleMessage:()=>Xn});var Nf="networks/5.7.1";var Df=new M(Nf);function Hx(n){return n&&typeof n.renetwork=="function"}function xa(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 xa(t)},e}function jo(n,e){let t=function(a,i){return a.JsonRpcProvider?new a.JsonRpcProvider(n,e):null};return t.renetwork=function(a){return jo(n,a)},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 rs(n){if(n==null)return null;if(typeof n=="number"){for(let a in Vo){let i=Vo[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=Vo[n];return a==null?null:{name:a.name,chainId:a.chainId,ensAddress:a.ensAddress,_defaultProvider:a._defaultProvider||null}}let e=Vo[n.name];if(!e)return typeof n.chainId!="number"&&Df.throwArgumentError("invalid network chainId","network",n),n;n.chainId!==0&&n.chainId!==e.chainId&&Df.throwArgumentError("network chainId mismatch","network",n);let t=n._defaultProvider||null;return t==null&&e._defaultProvider&&(Hx(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 Lf="web/5.7.1";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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})};function Uf(n,e){return qx(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 Gx=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},In=new M(Lf);function Vf(n){return new Promise(e=>{setTimeout(e,n)})}function Da(n,e){if(n==null)return null;if(typeof n=="string")return n;if(aa(n)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return Jt(n)}catch{}return W(n)}return n}function zx(n){return ve(n.replace(/%([0-9a-f][0-9a-f])/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))}function ml(n,e,t){let a=typeof n=="object"&&n.throttleLimit!=null?n.throttleLimit:12;In.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;In.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"},f=!1,x=2*60*1e3;if(typeof n=="string")l=n;else if(typeof n=="object"){if((n==null||n.url==null)&&In.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&&(f=!0);if(p.allowGzip=!!n.allowGzip,n.user!=null&&n.password!=null){l.substring(0,6)!=="https:"&&n.allowInsecureAuthentication!==!0&&In.throwError("basic authentication requires a secure https url",M.errors.INVALID_ARGUMENT,{argument:"url",url:l,user:n.user,password:"[REDACTED]"});let O=n.user+":"+n.password;o.authorization={key:"Authorization",value:"Basic "+Xi(ve(O))}}n.skipFetchSetup!=null&&(p.skipFetchSetup=!!n.skipFetchSetup),n.fetchOptions!=null&&(p.fetchOptions=we(n.fetchOptions))}let I=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),_=l?l.match(I):null;if(_)try{let O={statusCode:200,statusMessage:"OK",headers:{"content-type":_[1]||"text/plain"},body:_[2]?Yi(_[3]):zx(_[3])},U=O.body;return t&&(U=t(O.body,O)),Promise.resolve(U)}catch(O){In.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(In.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 Gx(this,void 0,void 0,function*(){for(let O=0;O=300)&&(S.cancel(),In.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){In.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 n=="string"?{url:n}:we(n);r.headers?Object.keys(r.headers).filter(o=>o.toLowerCase()==="content-type").length!==0||(r.headers=we(r.headers),r.headers["content-type"]="application/json"):r.headers={"content-type":"application/json"},n=r}return ml(n,i,a)}function Rn(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,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(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()&&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(f){s()&&a(f)})}p()})}var vl=_n(Gf());var ke="providers/5.7.2";var os=new M(ke),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),f=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(f),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=we(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 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():os.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 ce(e)}callAddress(e){if(!ie(e,32))return null;let t=ce(Ce(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 a=this.hex(e,t);return Nt(a)!==32?os.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 me(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 Co(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&&os.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=a,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 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 xl(n){return n&&typeof n.isCommunityResource=="function"}function us(n){return xl(n)&&n.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(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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},he=new M(ke),Zx=10;function Wf(n){return n==null?"null":(Nt(n)!==32&&he.throwArgumentError("invalid topic","topic",n),n.toLowerCase())}function Kf(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[Wf(i)]=!0});let a=Object.keys(t);return a.sort(),a.join("|")}else return Wf(e)}).join("&")}function e5(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 br(n){if(typeof n=="string"){if(n=n.toLowerCase(),Nt(n)===32)return"tx:"+n;if(n.indexOf(":")===-1)return n}else{if(Array.isArray(n))return"filter:*:"+Kf(n);if(xo.isForkEvent(n))throw he.warn("not implemented"),new Error("not implemented");if(n&&typeof n=="object")return"filter:"+(n.address||"*")+":"+Kf(n.topics||[])}throw new Error("invalid event - "+n)}function ds(){return new Date().getTime()}function Jf(n){return new Promise(e=>{setTimeout(e,n)})}var t5=["block","network","pending","poll"],wl=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=e5(e[2]),i={};return a.length>0&&(i.topics=a),t&&t!=="*"&&(i.address=t),i}pollable(){return this.tag.indexOf(":")>=0||t5.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 bl(n){return me(F.from(n).toHexString(),32)}function $f(n){return ya.encode(ye([n,Ce(Yt(Yt(n)),0,4)]))}var Xf=new RegExp("^(ipfs)://(.*)$","i"),Qf=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),Xf,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function zo(n,e){try{return Jt(ls(n,e))}catch{}return null}function ls(n,e){if(n==="0x")return null;let t=F.from(Ce(n,e,e+32)).toNumber(),a=F.from(Ce(n,t,t+32)).toNumber();return Ce(n,t+32,t+32+a)}function gl(n){return n.match(/^ipfs:\/\/ipfs\//i)?n=n.substring(12):n.match(/^ipfs:\/\//i)?n=n.substring(7):he.throwArgumentError("unsupported IPFS format","link",n),`https://gateway.ipfs.io/ipfs/${n}`}function Yf(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 a5(n){if(n.length%32===0)return n;let e=new Uint8Array(Math.ceil(n.length/32)*32);return e.set(n),e}function Zf(n){let e=[],t=0;for(let a=0;aF.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 a={to:this.address,ccipReadEnabled:!0,data:_t([e,Ca(this.name),t||"0x"])},i=!1;(yield this.supportsWildcard())&&(i=!0,a.data=_t(["0x9061b923",Zf([Jr(this.name),a.data])]));try{let r=yield this.provider.call(a);return j(r).length%32===4&&he.throwError("resolver threw error",M.errors.CALL_EXCEPTION,{transaction:a,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 a=yield this._fetch(e,t);return a!=null?ls(a,0):null})}_getAddress(e,t){let a=n5[String(e)];if(a==null&&he.throwError(`unsupported coin type: ${e}`,M.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 $f(ye([[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 $f(ye([[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=vl.default.toWords(i.slice(2));return o.unshift(s),vl.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===$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",bl(e));if(t==null||t==="0x")return null;let a=this._getAddress(e,t);return a==null&&he.throwError("invalid or unsupported coin data",M.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 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 a=yield this._fetchBytes("0x59d1d43c",W(t));return a==null||a==="0x"?null:Jt(a)})}},Tl=null,i5=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 Rn(()=>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 X),Tl}static getNetwork(e){return rs(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 Sn({url:p,errorPassThrough:!0},f,(_,v)=>(_.status=v.statusCode,_));if(x.data)return x.data;let I=x.message||"unknown error";if(x.status>=400&&x.status<500)return he.throwError(`response not found during CCIP fetch: ${I}`,M.errors.SERVER_ERROR,{url:l,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: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(ds()-r.respTime<=e)return r.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}let t=ds(),a=Ie({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=ds();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=i5++,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)he.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${a})`),this.emit("error",he.makeError("network block skew detected",M.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 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 a=he.makeError("underlying network changed",M.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=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,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,f=function(){return p?!0:(p=!0,l.forEach(I=>{I()}),!1)},x=I=>{I.confirmations{this.removeListener(e,x)}),i){let I=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)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),l.push(()=>{this.removeListener("block",v)})}if(typeof a=="number"&&a>0){let I=setTimeout(()=>{f()||o(he.makeError("timeout exceeded",M.errors.TIMEOUT,{timeout:a}))},a);I.unref&&I.unref(),l.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 a=yield Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getBalance",a);try{return F.from(i)}catch(r){return he.throwError("bad result from backend",M.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 Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getTransactionCount",a);try{return F.from(i).toNumber()}catch(r){return he.throwError("bad result from backend",M.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 Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getCode",a);try{return W(i)}catch(r){return he.throwError("bad result from backend",M.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 Ie({address:this._getAddress(e),blockTag:this._getBlockTag(a),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,a){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&&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&&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)),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 Ie(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 Ie(t))})}_call(e,t,a){return ue(this,void 0,void 0,function*(){a>=Zx&&he.throwError("CCIP read exceeded maximum redirections",M.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"&&Nt(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",M.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(),f=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&&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 Rn(()=>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 Rn(()=>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 Ie({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&&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 a=yield this._getResolver(t,"getResolver");if(a!=null){let i=new gr(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||he.throwError("network does not support ENS",M.errors.UNSUPPORTED_OPERATION,{operation:t,network:a.name});try{let i=yield this.call({to:a.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(a){if(ie(e))throw a}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",a=yield this._getResolver(t,"lookupAddress");if(a==null)return null;let i=zo(yield this.call({to:a,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 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=zo(yield this.call({to:s,data:"0x691f3431"+Ca(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 a=yield t.getAvatar();return a==null?null:a.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,a){let i=new wl(br(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=br(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=br(e);return this._events.filter(a=>a.tag===t).length}listeners(e){if(e==null)return this._events.map(a=>a.listener);let t=br(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=br(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=br(e);this._events=this._events.filter(i=>i.tag!==a?!0:(t.push(i),!1))}return t.forEach(a=>{this._stopEvent(a)}),this}};var ba=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},At=new M(ke),r5=["call","estimateGas"];function ys(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=ys(n[t],e);if(a)return a}return null}if(typeof n=="string")try{return ys(JSON.parse(n),e)}catch{}return null}function tc(n,e,t){let a=t.transaction||t.signedTransaction;if(n==="call"){let r=ys(e,!0);if(r)return r.data;At.throwError("missing revert data in call exception; Transaction reverted without a reason string",M.errors.CALL_EXCEPTION,{data:"0x",transaction:a,error:e})}if(n==="estimateGas"){let r=ys(e.body,!1);r==null&&(r=ys(e,!1)),r&&At.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",M.errors.UNPREDICTABLE_GAS_LIMIT,{reason:r.message,method:n,transaction:a,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)&&At.throwError("insufficient funds for intrinsic transaction cost",M.errors.INSUFFICIENT_FUNDS,{error:e,method:n,transaction:a}),i.match(/nonce (is )?too low/i)&&At.throwError("nonce has already been used",M.errors.NONCE_EXPIRED,{error:e,method:n,transaction:a}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&At.throwError("replacement fee too low",M.errors.REPLACEMENT_UNDERPRICED,{error:e,method:n,transaction:a}),i.match(/only replay-protected/i)&&At.throwError("legacy pre-eip-155 transactions not supported",M.errors.UNSUPPORTED_OPERATION,{error:e,method:n,transaction:a}),r5.indexOf(n)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&At.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",M.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:n,transaction:a}),e}function ec(n){return new Promise(function(e){setTimeout(e,n)})}function s5(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 ps(n){return n&&n.toLowerCase()}var _l={},Tr=class extends St{constructor(e,t,a){if(super(),e!==_l)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)):At.throwArgumentError("invalid address or index","addressOrIndex",a)}connect(e){return At.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&&At.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(a=>(a&&(a=a.toLowerCase()),a));if(e.gasLimit==null){let a=we(e);a.from=t,e.gasLimit=this.provider.estimateGas(a)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(a=>ba(this,void 0,void 0,function*(){if(a==null)return null;let i=yield this.provider.resolveName(a);return i==null&&At.throwArgumentError("provided ENS name resolves to null","tx.to",a),i}))),Ie({tx:Ie(e),sender:t}).then(({tx:a,sender:i})=>{a.from!=null?a.from.toLowerCase()!==i&&At.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)&&At.throwError("user rejected transaction",M.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:a}),tc("sendTransaction",s,r)))})}signTransaction(e){return At.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),a=yield this.sendUncheckedTransaction(e);try{return yield Rn(()=>ba(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 ba(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(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)&&At.throwError("user rejected signing",M.errors.ACTION_REJECTED,{action:"signMessage",from:a,messageData:e}),i}})}_legacySignMessage(e){return ba(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(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)&&At.throwError("user rejected signing",M.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:a,messageData:e}),i}})}_signTypedData(e,t,a){return ba(this,void 0,void 0,function*(){let i=yield bt.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(bt.getPayload(i.domain,t,i.value))])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&At.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,a=yield this.getAddress();return t.send("personal_unlockAccount",[a.toLowerCase(),e,null])})}},kl=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:a=>this.provider.waitForTransaction(t,a)}))}},o5={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0},Xt=class extends Zn{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=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 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(a){return At.throwError("could not detect network",M.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:a})}}return At.throwError("could not detect network",M.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new Tr(_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 a={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:ct(a),provider:this});let i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];let r=Sn(this.connection,JSON.stringify(a),s5).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",[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 a=mt(this.constructor,"hexlifyTransaction");return["eth_call",[a(t.transaction,{from:!0}),t.blockTag]]}case"estimateGas":{let a=mt(this.constructor,"hexlifyTransaction");return["eth_estimateGas",[a(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 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=we(t),t.transaction=we(i),delete t.transaction.type)}}let a=this.prepareRequest(e,t);a==null&&At.throwError(e+" not implemented",M.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(a[0],a[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(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 ec(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=we(o5);if(t)for(let r in t)t[r]&&(a[r]=!0);Gi(e,a);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 vr=null;try{if(vr=WebSocket,vr==null)throw new Error("inject please")}catch{let e=new M(ke);vr=function(){e.throwError("WebSockets not supported in this environment",M.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var Al=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Wo=new M(ke),u5=1,ga=class extends Xt{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 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 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){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 a=u5++;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 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: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 Al(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 d5=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},fs=new M(ke),cs=class extends Xt{detectNetwork(){let e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return d5(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 cs{constructor(e,t){fs.checkAbstract(new.target,It),e=mt(new.target,"getNetwork")(e),t=mt(new.target,"getApiKey")(t);let a=mt(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(){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(ke),Ko="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC",ms=class extends ga{constructor(e,t){let a=new wr(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===Ko}},wr=class extends It{static getWebSocketProvider(e,t){return new ms(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 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:nc.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+a+t,throttleCallback:(i,r)=>(t===Ko&&Xn(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===Ko}};var l5=new M(ke),Jo="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function p5(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 l5.throwArgumentError("unsupported network","name",n)}var hs=class extends It{isCommunityResource(){return this.apiKey===Jo}static getApiKey(e){return e??Jo}static getUrl(e,t){t==null&&(t=Jo);let a={allowGzip:!0,url:"https://"+p5(e.name)+t,throttleCallback:(i,r)=>(t.apiKey===Jo&&Xn(),Promise.resolve(!0))};return t.projectSecret!=null&&(a.user="",a.password=t.projectSecret),a}};var y5=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},ac=new M(ke),xs=class extends It{static getApiKey(e){return e!=null&&ac.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:ac.throwArgumentError("unsupported network","network",arguments[0])}return a}perform(e,t){let a=Object.create(null,{perform:{get:()=>super.perform}});return y5(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 $o=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Oa=new M(ke);function ic(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=Ln(W(a)):t==="accessList"?a="["+sn(a).map(i=>`{address:"${i.address}",storageKeys:["${i.storageKeys.join('","')}"]}`).join(",")+"]":a=W(a),e[t]=a)}return e}function f5(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 rc(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 sc(n){if(n==="pending")throw new Error("pending not supported");return n==="latest"?n:parseInt(n.substring(2),16)}function Ml(n,e,t){if(n==="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 a=e.message;throw e.code===M.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/)&&Oa.throwError("insufficient funds for intrinsic transaction cost",M.errors.INSUFFICIENT_FUNDS,{error:e,method:n,transaction:t}),a.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:n,transaction:t}),a.match(/another transaction with same nonce/)&&Oa.throwError("replacement fee too low",M.errors.REPLACEMENT_UNDERPRICED,{error:e,method:n,transaction:t}),a.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:n,transaction:t}),e}var bs=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 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 $o(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"?rc:f5;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 Sn(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 a=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 Xo=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},bi=new M(ke);function Qo(){return new Date().getTime()}function oc(n){let e=null;for(let t=0;te?null:(a+i)/2}function _r(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=>_r(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=_r(a),JSON.stringify(t)+":"+a}).join(",")+"}"}throw new Error("unknown value type: "+typeof n)}var c5=1;function dc(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 m5=[M.errors.CALL_EXCEPTION,M.errors.INSUFFICIENT_FUNDS,M.errors.NONCE_EXPIRED,M.errors.REPLACEMENT_UNDERPRICED,M.errors.UNPREDICTABLE_GAS_LIMIT],h5=["address","args","errorArgs","errorSignature","method","transaction"];function Yo(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 x5(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 b5(n,e,t){let a=_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>=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 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":a=function(i){return i==null?null:(i=we(i),i.confirmations=-1,_r(i))};break;case"getBlock":t.includeTransactions?a=function(i){return i==null?null:(i=we(i),i.transactions=i.transactions.map(r=>(r=we(r),r.confirmations=-1,r)),_r(i))}:a=function(i){return i==null?null:_r(i)};break;default:throw new Error("unknown method: "+e)}return x5(a,n.quorum)}function gs(n,e){return Xo(this,void 0,void 0,function*(){let t=n.provider;return t.blockNumber!=null&&t.blockNumber>=e||e===-1?t:Rn(()=>new Promise((a,i)=>{setTimeout(function(){return t.blockNumber>=e?a(t):n.cancelled?a(null):a(void 0)},0)}),{oncePoll:t})})}function g5(n,e,t,a){return Xo(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 gs(n,e)),i[t](a.address,a.blockTag||"latest");case"getStorageAt":return a.blockTag&&ie(a.blockTag)&&(i=yield gs(n,e)),i.getStorageAt(a.address,a.position,a.blockTag||"latest");case"getBlock":return a.blockTag&&ie(a.blockTag)&&(i=yield gs(n,e)),i[a.includeTransactions?"getBlockWithTransactions":"getBlock"](a.blockTag||a.blockHash);case"call":case"estimateGas":return a.blockTag&&ie(a.blockTag)&&(i=yield gs(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 gs(n,e)),i.getLogs(r)}}return bi.throwError("unknown method error",M.errors.UNKNOWN_ERROR,{method:t,params:a})})}var Ts=class extends Zn{constructor(e,t){e.length===0&&bi.throwArgumentError("missing providers","providers",e);let a=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=we(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)&&bi.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&&bi.throwArgumentError("quorum will always fail; larger than total weight","quorum",t);let r=oc(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 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=Qo(),p=i.filter(_=>_.runner&&l-_.start<_.stallTimeout).reduce((_,v)=>_+v.weight,0);for(;p{_.staller=null}),_.runner=g5(_,r,e,t).then(S=>{_.done=!0,_.result=S,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Yo(_,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:Yo(_,Qo()),request:{method:e,params:ct(t)},provider:this})}),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Yo(_,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 _=a(x);if(_!==void 0)return i.forEach(v=>{v.staller&&v.staller.cancel(),v.cancelled=!0}),_;o||(yield dc(100).getPromise()),o=!1}let I=i.reduce((_,v)=>{if(!v.done||v.error==null)return _;let S=v.error.code;return m5.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={};h5.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=>Yo(l)),provider:this})})}};var El=null;var Zo=new M(ke),vs="84842078b09946638c03157f83405213",ws=class extends ga{constructor(e,t){let a=new kr(e,t),i=a.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",a.projectId),B(this,"projectId",a.projectId),B(this,"projectSecret",a.projectSecret)}isCommunityResource(){return this.projectId===vs}},kr=class extends It{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?(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 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:Zo.throwError("unsupported network",M.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let i={allowGzip:!0,url:"https://"+a+"/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 eu=class extends Xt{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:ct(o),provider:this}),Sn(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 I=new Error(x.error.message);I.code=x.error.code,I.data=x.error.data,p.reject(I)}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 Cl=new M(ke),T5="ETHERS_JS_SHARED",_s=class extends It{static getApiKey(e){return e&&typeof e!="string"&&Cl.throwArgumentError("invalid apiKey","apiKey",e),e||T5}static getUrl(e,t){Cl.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:Cl.throwArgumentError("unsupported network","network",arguments[0])}return a+"?apiKey="+t}};var lc=new M(ke),pc="62e1ad51b37b8e00394bda3b",ks=class extends It{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 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:lc.throwError("unsupported network",M.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===pc}};var yc=new M(ke),v5=1;function fc(n,e){let t="Web3LegacyFetcher";return function(a,i){let r={method:a,params:i,id:v5++,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 w5(n){return function(e,t){t==null&&(t=[]);let a={method:e,params:t};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:ct(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 As=class extends Xt{constructor(e,t){e==null&&yc.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=w5(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),a||(a="unknown:")),super(a,t),B(this,"jsonRpcFetchFunc",i),B(this,"provider",r)}send(e,t){return this.jsonRpcFetchFunc(e,t)}};var cc=new M(ke);function tu(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 Xt(n);case"ws":case"wss":return new ga(n);default:cc.throwArgumentError("unsupported URL scheme","network",n)}}let t=rs(n);return(!t||!t._defaultProvider)&&cc.throwError("unsupported getDefaultProvider network",M.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:n}),t._defaultProvider({FallbackProvider:Ts,AlchemyProvider:wr,AnkrProvider:hs,CloudflareProvider:xs,EtherscanProvider:bs,InfuraProvider:kr,JsonRpcProvider:Xt,NodesmithProvider:_s,PocketProvider:ks,Web3Provider:As,IpcProvider:null},e)}var ne={};ji(ne,{AbiCoder:()=>Qi,ConstructorFragment:()=>Dt,ErrorFragment:()=>tn,EventFragment:()=>Ht,FormatTypes:()=>ge,Fragment:()=>qt,FunctionFragment:()=>Ot,HDNode:()=>Ct,Indexed:()=>oa,Interface:()=>Ia,LogDescription:()=>er,Logger:()=>M,ParamType:()=>pt,RLP:()=>Ys,SigningKey:()=>mn,SupportedAlgorithm:()=>Qn,TransactionDescription:()=>tr,TransactionTypes:()=>Eo,UnicodeNormalizationForm:()=>Gt,Utf8ErrorFuncs:()=>po,Utf8ErrorReason:()=>Bt,_TypedDataEncoder:()=>bt,_fetchData:()=>ml,_toEscapedUtf8String:()=>Td,accessListify:()=>sn,arrayify:()=>j,base58:()=>ya,base64:()=>Md,checkProperties:()=>Gi,checkResultErrors:()=>Wi,commify:()=>wc,computeAddress:()=>hn,computeHmac:()=>fa,computePublicKey:()=>Yr,concat:()=>ye,deepCopy:()=>ct,defaultAbiCoder:()=>Wr,defaultPath:()=>ca,defineReadOnly:()=>B,dnsEncode:()=>Jr,entropyToMnemonic:()=>xi,fetchJson:()=>Sn,formatBytes32String:()=>vd,formatEther:()=>_c,formatUnits:()=>Il,getAccountPath:()=>cf,getAddress:()=>ce,getContractAddress:()=>ui,getCreate2Address:()=>Ey,getIcapAddress:()=>My,getJsonWalletAddress:()=>ll,getStatic:()=>mt,hashMessage:()=>Zi,hexConcat:()=>_t,hexDataLength:()=>Nt,hexDataSlice:()=>Ce,hexStripZeros:()=>dd,hexValue:()=>Ln,hexZeroPad:()=>me,hexlify:()=>W,id:()=>nn,isAddress:()=>Ay,isBytes:()=>un,isBytesLike:()=>aa,isHexString:()=>ie,isValidMnemonic:()=>ff,isValidName:()=>Cd,joinSignature:()=>Br,keccak256:()=>fe,mnemonicToEntropy:()=>cr,mnemonicToSeed:()=>al,namehash:()=>Ca,nameprep:()=>Ad,parseBytes32String:()=>wd,parseEther:()=>kc,parseTransaction:()=>Co,parseUnits:()=>Sl,poll:()=>Rn,randomBytes:()=>Yn,recoverAddress:()=>yi,recoverPublicKey:()=>Mo,resolveProperties:()=>Ie,ripemd160:()=>es,serializeTransaction:()=>Xr,sha256:()=>Yt,sha512:()=>Zd,shallowCopy:()=>we,shuffled:()=>as,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 _5=new RegExp("^bytes([0-9]+)$"),k5=new RegExp("^(u?int)([0-9]*)$"),A5=new RegExp("^(.*)\\[([0-9]*)\\]$"),M5="0000000000000000000000000000000000000000000000000000000000000000",Ar=new M(mc);function hc(n,e,t){switch(n){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 a=n.match(k5);if(a){let i=parseInt(a[2]||"256");return(a[2]&&String(i)!==a[2]||i%8!==0||i===0||i>256)&&Ar.throwArgumentError("invalid number type","type",n),t&&(i=256),e=F.from(e).toTwos(i),ii(e,i/8)}if(a=n.match(_5),a){let i=parseInt(a[1]);return(String(i)!==a[1]||i===0||i>32)&&Ar.throwArgumentError("invalid bytes type","type",n),j(e).byteLength!==i&&Ar.throwArgumentError(`invalid value for ${n}`,"value",e),t?j((e+M5).substring(0,66)):e}if(a=n.match(A5),a&&Array.isArray(e)){let i=a[1];parseInt(a[2]||String(e.length))!=e.length&&Ar.throwArgumentError(`invalid array length for ${n}`,"value",e);let s=[];return e.forEach(function(o){s.push(hc(i,o,!0))}),ye(s)}return Ar.throwArgumentError("invalid type","type",n)}function nu(n,e){n.length!=e.length&&Ar.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);let t=[];return n.forEach(function(a,i){t.push(hc(a,e[i]))}),W(ye(t))}function xc(n,e){return fe(nu(n,e))}function bc(n,e){return Yt(nu(n,e))}var gc="units/5.7.0";var Tc=new M(gc),vc=["wei","kwei","mwei","gwei","szabo","finney","ether"];function wc(n){let e=String(n).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||n==="."||n==="-.")&&Tc.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 Il(n,e){if(typeof e=="string"){let t=vc.indexOf(e);t!==-1&&(e=3*t)}return qi(n,e??18)}function Sl(n,e){if(typeof n!="string"&&Tc.throwArgumentError("value must be a string","value",n),typeof e=="string"){let t=vc.indexOf(e);t!==-1&&(e=3*t)}return ln(n,e??18)}function _c(n){return Il(n,18)}function kc(n){return Sl(n,18)}var au="ethers/5.7.2";var Ac=new M(au);try{let n=window;n._ethers==null&&(n._ethers=Rl)}catch{}var Pn;(function(n){n.Mainnet="Mainnet",n.Custom="Custom",n.Gnosis="Xdai",n.Goerli="Goerli",n.Xdai="Xdai",n.XdaiQa="XdaiQa",n.ArbitrumOne="ArbitrumOne",n.ArbitrumSepolia="ArbitrumSepolia"})(Pn||(Pn={}));var Mc;(function(n){n[n.Custom=0]="Custom",n[n.Mainnet=1]="Mainnet",n[n.Goerli=5]="Goerli",n[n.Gnosis=100]="Gnosis",n[n.Xdai=100]="Xdai",n[n.XdaiQa=100]="XdaiQa",n[n.ArbitrumSepolia=421614]="ArbitrumSepolia",n[n.ArbitrumOne=42161]="ArbitrumOne"})(Mc||(Mc={}));var iu;(function(n){n.Mainnet="0x5346D0f80e2816FaD329F2c140c870ffc3c3E2Ef",n.Goerli="0x79073fc2117dD054FCEdaCad1E7018C9CbE3ec0B",n.Xdai="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.XdaiQa="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.Custom="",n.ArbitrumOne="0xcccccdcc0ccf6c708d860e19353c5f9a49accccc",n.ArbitrumSepolia="0x7777494e3d8cce0D3570E21FEf820F9Fee077777"})(iu||(iu={}));var Mr;(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",n.ArbitrumOne="https://app.colony.io/reputation/arbitrum-one",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/reputation/arbitrum-sepolia"})(Mr||(Mr={}));var ru;(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="",n.ArbitrumOne="https://app.colony.io/metatransaction/arbitrum-one",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/metatransaction/arbitrum-sepolia"})(ru||(ru={}));var Pl;(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="",n.ArbitrumOne="https://app.colony.io/public-rpc/",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/public-rpc/"})(Pl||(Pl={}));var Ms;(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",n.ArbitrumOne=".colony.joincolony.arbitrum",n.ArbitrumSepolia=".colony.joincolony.sepolia"})(Ms||(Ms={}));var Es;(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",n.ArbitrumOne=".user.joincolony.arbitrum",n.ArbitrumSepolia=".user.joincolony.sepolia"})(Es||(Es={}));var Nl;(function(n){let e;(function(i){i.ETH="0x0000000000000000000000000000000000000000",i.CLNY="0x3E828ac5C480069D4765654Fb4b8733b910b13b2",i.USDC="0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"})(e=n.Mainnet||(n.Mainnet={}));let t;(function(i){i.XDAI="0x0000000000000000000000000000000000000000",i.CLNY="0xc9B6218AffE8Aba68a13899Cbf7cF7f14DDd304C",i.USDC="0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83"})(t=n.Gnosis||(n.Gnosis={}));let a;(function(i){i.ETH="0x0000000000000000000000000000000000000000",i.CLNY="0xcccccdcc0ccf6c708d860e19353c5f9a49accccc",i.USDC="0xaf88d065e77c8cC2239327C5EDb3A432268e5831"})(a=n.ArbitrumOne||(n.ArbitrumOne={}))})(Nl||(Nl={}));var _e;(function(n){n[n.RootDomain=1]="RootDomain",n[n.RootTeam=1]="RootTeam",n[n.RootPot=1]="RootPot",n[n.SkillIgnore=0]="SkillIgnore"})(_e||(_e={}));var zt;(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"})(zt||(zt={}));var Ol="0x12345678",Dl;(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"})(Dl||(Dl={}));var vt;(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"})(vt||(vt={}));var Ae;(function(n){n.FundingQueue="FundingQueue",n.IVotingReputation="IVotingReputation",n.MultisigPermissions="MultisigPermissions",n.OneTxPayment="OneTxPayment",n.ReputationBootstrapper="ReputationBootstrapper",n.StagedExpenditure="StagedExpenditure",n.StakedExpenditure="StakedExpenditure",n.StreamingPayments="StreamingPayments",n.TokenSupplier="TokenSupplier",n.VotingReputation="VotingReputation"})(Ae||(Ae={}));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 Ec=(n,e)=>{throw new Error(`${e}: ${n}`)},Ll=n=>n!=null;var{keccak256:C5,toUtf8Bytes:I5}=ne,{MaxUint256:S5}=ht;var Ul=n=>ne.formatEther(n);var Vl=n=>{let e=n.reduce((t,a)=>t|1<{let e=F.from(n);return[...Array(vt.LAST_ROLE).keys()].map(t=>e.shr(t).mask(1).eq(1)?t:null).filter(Ll)},vi=async(n,e,t,a)=>{if(F.from(t).eq(F.from(a)))return S5;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)},Ba=n=>C5(I5(n));var Er=async(n,e)=>(await Ti.connect(n,e).version()).toNumber(),jl=(n,e)=>n.map(t=>{try{return e.parseLog(t)}catch{return null}}).filter(Ll);var{hexDataSlice:Hl}=ne,{MaxUint256:R5}=ht,Cc=n=>{let e=Hl(n,0,3),t=F.from(Hl(n,4,35)),a=F.from(Hl(n,36,67));return{sig:e,permissionDomainId:t,childSkillIndex:a}},Ic=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),R5,r];let o=F.from(_e.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 vi(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]},P5=async(n,e,t,a,i)=>{let r=await Promise.all(a.map(s=>Ic(n,e,t,s,i)));for(let s=0;sArray.isArray(a)?a.length===1?ta(n,e,t,a[0],i):P5(n,e,t,a,i):Ic(n,e,t,a,i);var{MaxUint256:Sc}=ht,{AddressZero:N5}=ht;async function D5(n,e){let t;try{return t=await n.getCapabilityRoles(ne.hexZeroPad(e,4)),su(t)}catch{return[]}}async function Cs(n,e,t,a,i,r,s){let o,{skillId:l}=await e.getDomain(i),{sig:p,permissionDomainId:f,childSkillIndex:x}=Cc(s),I=gi.connect(r,a.signer||a.provider),_=await D5(I,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 ${_e.RootDomain}`);o=Sc}else{let{skillId:U}=await e.getDomain(f),H=await n.getChildSkillId(U,x);if(H.eq(l))o=Sc;else{let{children:E}=await n.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,N5);return{actionCid:o,key:v,value:S,branchMask:L,siblings:O}}var{AddressZero:O5}=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,a){this.colony=t,this.network=e;let i=a?.network||Pn.ArbitrumOne;this.endpointUrl=a?.customEndpointUrl||Mr[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 na.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 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 a=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${a}/${i}`;return na.fetchReputation(r)}async getTotalReputation(e,t){let a=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${a}/${i}/${O5}/noProof`,s=await na.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 Mt=n=>Array.from(Array(n-1)).map((e,t)=>t+1);var Rc=10,fk=Mt(Rc),Pc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Nc=Rc-1;var Dc=3,hk=Mt(Dc),Oc={1:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],2:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]},Bc=Dc-1;var Fc=10,gk=Mt(Fc),Lc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Uc=Fc-1;var Vc=7,wk=Mt(Vc),jc={1:[],2:[],3:[],4:[],5:[],6:[]},Hc=Vc-1;var qc=8,Ak=Mt(qc),Gc={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3],6:[1,2,3],7:[1,2,3]},zc=qc-1;var Wc=5,Ck=Mt(Wc),Kc={1:[1,2,3,4,5,6,7,8,9,10,11,12,13],2:[1,2,3,4,5,6,7,8,9,10,11,12,13],3:[1,2,3,4,5,6,7,8,9,10,11,12,13],4:[1,2,3,4,5,6,7,8,9,10,11,12,13]},Jc=Wc-1;var $c=7,Rk=Mt($c),Qc={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3],6:[1,2,3]},Yc=$c-1;var Xc=10,Dk=Mt(Xc),Zc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},em=Xc-1;var tm=14,Fk=Mt(tm),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],11:[1,2,3,4,5,6],12:[1,2,3,4,5,6],13:[1,2,3,4,5,6]},Gl=tm-1;var nm=18,B5=Mt(nm),Vk=nm-1;var F5=(n,e)=>{switch(n){case Ae.FundingQueue:return Pc[e];case Ae.IVotingReputation:return ql[e];case Ae.MultisigPermissions:return Oc[e];case Ae.OneTxPayment:return Lc[e];case Ae.ReputationBootstrapper:return jc[e];case Ae.StagedExpenditure:return Kc[e];case Ae.StakedExpenditure:return Gc[e];case Ae.StreamingPayments:return Qc[e];case Ae.TokenSupplier:return Zc[e];case Ae.VotingReputation:return ql[e];default:return Ec(n,"Could not find extension with name")}},wi=(n,e,t)=>{let a=F5(n,e);return!!a&&!a.includes(t)};var L5={[Ae.FundingQueue]:Nc,[Ae.IVotingReputation]:Gl,[Ae.MultisigPermissions]:Bc,[Ae.OneTxPayment]:Uc,[Ae.ReputationBootstrapper]:Hc,[Ae.StagedExpenditure]:Jc,[Ae.StakedExpenditure]:zc,[Ae.StreamingPayments]:Yc,[Ae.TokenSupplier]:em,[Ae.VotingReputation]:Gl};var k6=_n(am(),1);var yp=_n(v6(),1);var Re;(function(n){n.DEFAULT="default",n.Annotation="annotation",n.Colony="colony",n.Decision="decision",n.Domain="domain",n.Misc="misc"})(Re||(Re={}));var pp=2,lp;(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"})(lp||(lp={}));var w6=n=>`Validation error(s): +`)}static register(e,t){if(t||(t=e.locale),Sx)try{let a=window;a._ethers&&a._ethers.wordlists&&(a._ethers.wordlists[t]||B(a._ethers.wordlists,t,e))}catch{}}};var Rx="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo",ts=null;function df(n){if(ts==null&&(ts=Rx.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),xn.check(n)!=="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"))throw ts=null,new Error("BIP39 Wordlist for en (English) FAILED")}var tl=class extends xn{constructor(){super("en")}getWord(e){return df(this),ts[e]}getWordIndex(e){return df(this),ts.indexOf(e)}},nl=new tl;xn.register(nl);var hi={en:nl};var lf="hdnode/5.7.0";var ns=new M(lf),Px=F.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),Nx=ve("Bitcoin seed"),fr=2147483648;function yf(n){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 Ct(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 a=new Uint8Array(37);if(e&fr){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(fa(Qn.sha512,this.chainCode,a)),r=i.slice(0,32),s=i.slice(32),o=null,l=null;this.privateKey?o=Do(F.from(r).add(this.privateKey).mod(Px)):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 Ct(yr,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 a=this;for(let i=0;i=fr)throw new Error("invalid path index - "+r);a=a._derive(fr+s)}else if(r.match(/^[0-9]+$/)){let s=parseInt(r);if(s>=fr)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(fa(Qn.sha512,Nx,a));return new Ct(yr,Do(i.slice(0,32)),null,"0x00000000",Do(i.slice(32)),0,0,t)}static fromMnemonic(e,t,a){return a=al(a),e=xi(cr(e,a),a),Ct._fromSeed(il(e,t),{phrase:e,path:"m",locale:a.locale})}static fromSeed(e){return Ct._fromSeed(e,null)}static fromExtendedKey(e){let t=ya.decode(e);(t.length!==82||pf(t.slice(0,78))!==e)&&ns.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 Ct(yr,null,W(o),i,s,r,a,null);case"0x0488ade4":case"0x04358394 ":if(o[0]!==0)break;return new Ct(yr,W(o.slice(1)),null,i,s,r,a,null)}return ns.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}};function il(n,e){e||(e="");let t=ve("mnemonic"+e,Gt.NFKD);return mi(ve(n,Gt.NFKD),t,2048,64,"sha512")}function cr(n,e){e=al(e),ns.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=yf(s);if((j(Yt(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 xi(n,e){if(e=al(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]&Dx(8-a)),a+=3);let i=n.length/4,r=j(Yt(n))[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(n,e){try{return cr(n,e),!0}catch{}return!1}function cf(n){return(typeof n!="number"||n<0||n>=fr||n%1)&&ns.throwArgumentError("invalid account index","index",n),`m/44'/60'/${n}'/0/0`}var mf="random/5.7.0";var rl=new M(mf);function Ox(){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=Ox(),Oo=hf.crypto||hf.msCrypto;(!Oo||!Oo.getRandomValues)&&(rl.warn("WARNING: Missing strong random number source"),Oo={getRandomValues:function(n){return rl.throwError("no secure random source avaialble",M.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function Yn(n){(n<=0||n>1024||n%1||n!=n)&&rl.throwArgumentError("invalid length","length",n);let e=new Uint8Array(n);return Oo.getRandomValues(e),j(e)}function as(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 ul=_n(ol());var Bo="json-wallets/5.7.0";function ma(n){return typeof n=="string"&&n.substring(0,2)!=="0x"&&(n="0x"+n),j(n)}function mr(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),E=new ha.default.Counter(x),J=new ha.default.ModeOfOperation.ctr(O,E),$=j(J.encrypt(i)),de=fe(ye([U,$])),T={address:n.address.substring(2).toLowerCase(),id:bf(I),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 ha.default.Counter(R),q=new ha.default.ModeOfOperation.ctr(H,N),se=j(q.encrypt(s)),C=new Date,u=C.getUTCFullYear()+"-"+mr(C.getUTCMonth()+1,2)+"-"+mr(C.getUTCDate(),2)+"T"+mr(C.getUTCHours(),2)+"-"+mr(C.getUTCMinutes(),2)+"-"+mr(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:l,version:"0.1"}}return JSON.stringify(T)})}function Ef(n,e,t){if(Fo(n)){t&&t(0);let a=ll(n,e);return t&&t(1),Promise.resolve(a)}return Lo(n)?Mf(n,e,t):Promise.reject(new Error("invalid JSON wallet"))}function Cf(n,e){if(Fo(n))return ll(n,e);if(Lo(n))return Af(n,e);throw new Error("invalid JSON wallet")}var If="wallet/5.7.0";var Sf=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},hr=new M(If);function Vx(n){return n!=null&&ie(n.privateKey,32)&&n.address!=null}function jx(n){let e=n.mnemonic;return e&&e.phrase}var on=class extends St{constructor(e,t){if(super(),Vx(e)){let a=new mn(e.privateKey);if(B(this,"_signingKey",()=>a),B(this,"address",hn(this.publicKey)),this.address!==ce(e.address)&&hr.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),jx(e)){let i=e.mnemonic;B(this,"_mnemonic",()=>({phrase:i.phrase,path:i.path||ca,locale:i.locale||"en"}));let r=this.mnemonic,s=Ct.fromMnemonic(r.phrase,null,r.locale).derivePath(r.path);hn(s.privateKey)!==this.address&&hr.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else B(this,"_mnemonic",()=>null)}else{if(mn.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 a=new mn(e);B(this,"_signingKey",()=>a)}B(this,"_mnemonic",()=>null),B(this,"address",hn(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 on(this,e)}signTransaction(e){return Ie(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 a=this._signingKey().signDigest(fe(Xr(t)));return Xr(t,a)})}signMessage(e){return Sf(this,void 0,void 0,function*(){return Br(this._signingKey().signDigest(Zi(e)))})}_signTypedData(e,t,a){return Sf(this,void 0,void 0,function*(){let i=yield bt.resolveNames(e,t,a,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,a){if(typeof t=="function"&&!a&&(a=t,t={}),a&&typeof a!="function")throw new Error("invalid callback");return t||(t={}),ml(this,e,t,a)}static createRandom(e){let t=Yn(16);e||(e={}),e.extraEntropy&&(t=j(Ce(fe(ye([t,e.extraEntropy])),0,16)));let a=xi(t,e.locale);return on.fromMnemonic(a,e.path,e.locale)}static fromEncryptedJson(e,t,a){return Ef(e,t,a).then(i=>new on(i))}static fromEncryptedJsonSync(e,t){return new on(Cf(e,t))}static fromMnemonic(e,t,a){return t||(t=ca),new on(Ct.fromMnemonic(e,null,a).derivePath(t))}};function Rf(n,e){return yi(Zi(n),e)}function Pf(n,e,t,a){return yi(bt.hash(n,e,t),a)}var ea={};ji(ea,{AlchemyProvider:()=>wr,AlchemyWebSocketProvider:()=>ms,AnkrProvider:()=>hs,BaseProvider:()=>Zn,CloudflareProvider:()=>xs,EtherscanProvider:()=>bs,FallbackProvider:()=>Ts,Formatter:()=>X,InfuraProvider:()=>kr,InfuraWebSocketProvider:()=>ws,IpcProvider:()=>Cl,JsonRpcBatchProvider:()=>eu,JsonRpcProvider:()=>Xt,JsonRpcSigner:()=>Tr,NodesmithProvider:()=>_s,PocketProvider:()=>ks,Provider:()=>$t,Resolver:()=>gr,StaticJsonRpcProvider:()=>cs,UrlJsonRpcProvider:()=>It,Web3Provider:()=>As,WebSocketProvider:()=>ga,getDefaultProvider:()=>tu,getNetwork:()=>rs,isCommunityResourcable:()=>bl,isCommunityResource:()=>us,showThrottleMessage:()=>Xn});var Nf="networks/5.7.1";var Df=new M(Nf);function Hx(n){return n&&typeof n.renetwork=="function"}function xa(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 xa(t)},e}function jo(n,e){let t=function(a,i){return a.JsonRpcProvider?new a.JsonRpcProvider(n,e):null};return t.renetwork=function(a){return jo(n,a)},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 rs(n){if(n==null)return null;if(typeof n=="number"){for(let a in Vo){let i=Vo[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=Vo[n];return a==null?null:{name:a.name,chainId:a.chainId,ensAddress:a.ensAddress,_defaultProvider:a._defaultProvider||null}}let e=Vo[n.name];if(!e)return typeof n.chainId!="number"&&Df.throwArgumentError("invalid network chainId","network",n),n;n.chainId!==0&&n.chainId!==e.chainId&&Df.throwArgumentError("network chainId mismatch","network",n);let t=n._defaultProvider||null;return t==null&&e._defaultProvider&&(Hx(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 Lf="web/5.7.1";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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})};function Uf(n,e){return qx(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 Gx=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},In=new M(Lf);function Vf(n){return new Promise(e=>{setTimeout(e,n)})}function Da(n,e){if(n==null)return null;if(typeof n=="string")return n;if(aa(n)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return Jt(n)}catch{}return W(n)}return n}function zx(n){return ve(n.replace(/%([0-9a-f][0-9a-f])/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))}function hl(n,e,t){let a=typeof n=="object"&&n.throttleLimit!=null?n.throttleLimit:12;In.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;In.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"},f=!1,x=2*60*1e3;if(typeof n=="string")l=n;else if(typeof n=="object"){if((n==null||n.url==null)&&In.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&&(f=!0);if(p.allowGzip=!!n.allowGzip,n.user!=null&&n.password!=null){l.substring(0,6)!=="https:"&&n.allowInsecureAuthentication!==!0&&In.throwError("basic authentication requires a secure https url",M.errors.INVALID_ARGUMENT,{argument:"url",url:l,user:n.user,password:"[REDACTED]"});let O=n.user+":"+n.password;o.authorization={key:"Authorization",value:"Basic "+Xi(ve(O))}}n.skipFetchSetup!=null&&(p.skipFetchSetup=!!n.skipFetchSetup),n.fetchOptions!=null&&(p.fetchOptions=we(n.fetchOptions))}let I=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),_=l?l.match(I):null;if(_)try{let O={statusCode:200,statusMessage:"OK",headers:{"content-type":_[1]||"text/plain"},body:_[2]?Yi(_[3]):zx(_[3])},U=O.body;return t&&(U=t(O.body,O)),Promise.resolve(U)}catch(O){In.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(In.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 Gx(this,void 0,void 0,function*(){for(let O=0;O=300)&&(S.cancel(),In.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){In.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 n=="string"?{url:n}:we(n);r.headers?Object.keys(r.headers).filter(o=>o.toLowerCase()==="content-type").length!==0||(r.headers=we(r.headers),r.headers["content-type"]="application/json"):r.headers={"content-type":"application/json"},n=r}return hl(n,i,a)}function Rn(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,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(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()&&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(f){s()&&a(f)})}p()})}var wl=_n(Gf());var ke="providers/5.7.2";var os=new M(ke),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),f=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(f),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=we(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 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():os.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 ce(e)}callAddress(e){if(!ie(e,32))return null;let t=ce(Ce(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 a=this.hex(e,t);return Nt(a)!==32?os.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 me(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 Co(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&&os.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=a,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 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 bl(n){return n&&typeof n.isCommunityResource=="function"}function us(n){return bl(n)&&n.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(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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},he=new M(ke),Zx=10;function Wf(n){return n==null?"null":(Nt(n)!==32&&he.throwArgumentError("invalid topic","topic",n),n.toLowerCase())}function Kf(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[Wf(i)]=!0});let a=Object.keys(t);return a.sort(),a.join("|")}else return Wf(e)}).join("&")}function e5(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 br(n){if(typeof n=="string"){if(n=n.toLowerCase(),Nt(n)===32)return"tx:"+n;if(n.indexOf(":")===-1)return n}else{if(Array.isArray(n))return"filter:*:"+Kf(n);if(xo.isForkEvent(n))throw he.warn("not implemented"),new Error("not implemented");if(n&&typeof n=="object")return"filter:"+(n.address||"*")+":"+Kf(n.topics||[])}throw new Error("invalid event - "+n)}function ds(){return new Date().getTime()}function Jf(n){return new Promise(e=>{setTimeout(e,n)})}var t5=["block","network","pending","poll"],_l=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=e5(e[2]),i={};return a.length>0&&(i.topics=a),t&&t!=="*"&&(i.address=t),i}pollable(){return this.tag.indexOf(":")>=0||t5.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 gl(n){return me(F.from(n).toHexString(),32)}function $f(n){return ya.encode(ye([n,Ce(Yt(Yt(n)),0,4)]))}var Xf=new RegExp("^(ipfs)://(.*)$","i"),Qf=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),Xf,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function zo(n,e){try{return Jt(ls(n,e))}catch{}return null}function ls(n,e){if(n==="0x")return null;let t=F.from(Ce(n,e,e+32)).toNumber(),a=F.from(Ce(n,t,t+32)).toNumber();return Ce(n,t+32,t+32+a)}function Tl(n){return n.match(/^ipfs:\/\/ipfs\//i)?n=n.substring(12):n.match(/^ipfs:\/\//i)?n=n.substring(7):he.throwArgumentError("unsupported IPFS format","link",n),`https://gateway.ipfs.io/ipfs/${n}`}function Yf(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 a5(n){if(n.length%32===0)return n;let e=new Uint8Array(Math.ceil(n.length/32)*32);return e.set(n),e}function Zf(n){let e=[],t=0;for(let a=0;aF.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 a={to:this.address,ccipReadEnabled:!0,data:_t([e,Ca(this.name),t||"0x"])},i=!1;(yield this.supportsWildcard())&&(i=!0,a.data=_t(["0x9061b923",Zf([Jr(this.name),a.data])]));try{let r=yield this.provider.call(a);return j(r).length%32===4&&he.throwError("resolver threw error",M.errors.CALL_EXCEPTION,{transaction:a,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 a=yield this._fetch(e,t);return a!=null?ls(a,0):null})}_getAddress(e,t){let a=n5[String(e)];if(a==null&&he.throwError(`unsupported coin type: ${e}`,M.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 $f(ye([[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 $f(ye([[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=wl.default.toWords(i.slice(2));return o.unshift(s),wl.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===$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",gl(e));if(t==null||t==="0x")return null;let a=this._getAddress(e,t);return a==null&&he.throwError("invalid or unsupported coin data",M.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 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([gl(64),gl(t.length),t]),t.length%32!==0&&(t=ye([t,me("0x",32-e.length%32)]));let a=yield this._fetchBytes("0x59d1d43c",W(t));return a==null||a==="0x"?null:Jt(a)})}},vl=null,i5=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 Rn(()=>this._ready().then(e=>e,e=>{if(!(e.code===M.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return vl==null&&(vl=new X),vl}static getNetwork(e){return rs(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 Sn({url:p,errorPassThrough:!0},f,(_,v)=>(_.status=v.statusCode,_));if(x.data)return x.data;let I=x.message||"unknown error";if(x.status>=400&&x.status<500)return he.throwError(`response not found during CCIP fetch: ${I}`,M.errors.SERVER_ERROR,{url:l,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: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(ds()-r.respTime<=e)return r.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}let t=ds(),a=Ie({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=ds();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=i5++,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)he.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${a})`),this.emit("error",he.makeError("network block skew detected",M.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 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 a=he.makeError("underlying network changed",M.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=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,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,f=function(){return p?!0:(p=!0,l.forEach(I=>{I()}),!1)},x=I=>{I.confirmations{this.removeListener(e,x)}),i){let I=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)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),l.push(()=>{this.removeListener("block",v)})}if(typeof a=="number"&&a>0){let I=setTimeout(()=>{f()||o(he.makeError("timeout exceeded",M.errors.TIMEOUT,{timeout:a}))},a);I.unref&&I.unref(),l.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 a=yield Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getBalance",a);try{return F.from(i)}catch(r){return he.throwError("bad result from backend",M.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 Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getTransactionCount",a);try{return F.from(i).toNumber()}catch(r){return he.throwError("bad result from backend",M.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 Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getCode",a);try{return W(i)}catch(r){return he.throwError("bad result from backend",M.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 Ie({address:this._getAddress(e),blockTag:this._getBlockTag(a),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,a){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&&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&&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)),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 Ie(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 Ie(t))})}_call(e,t,a){return ue(this,void 0,void 0,function*(){a>=Zx&&he.throwError("CCIP read exceeded maximum redirections",M.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"&&Nt(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",M.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(),f=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&&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 Rn(()=>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 Rn(()=>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 Ie({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&&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 a=yield this._getResolver(t,"getResolver");if(a!=null){let i=new gr(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||he.throwError("network does not support ENS",M.errors.UNSUPPORTED_OPERATION,{operation:t,network:a.name});try{let i=yield this.call({to:a.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(a){if(ie(e))throw a}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",a=yield this._getResolver(t,"lookupAddress");if(a==null)return null;let i=zo(yield this.call({to:a,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 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=zo(yield this.call({to:s,data:"0x691f3431"+Ca(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 a=yield t.getAvatar();return a==null?null:a.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,a){let i=new _l(br(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=br(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=br(e);return this._events.filter(a=>a.tag===t).length}listeners(e){if(e==null)return this._events.map(a=>a.listener);let t=br(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=br(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=br(e);this._events=this._events.filter(i=>i.tag!==a?!0:(t.push(i),!1))}return t.forEach(a=>{this._stopEvent(a)}),this}};var ba=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},At=new M(ke),r5=["call","estimateGas"];function ys(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=ys(n[t],e);if(a)return a}return null}if(typeof n=="string")try{return ys(JSON.parse(n),e)}catch{}return null}function tc(n,e,t){let a=t.transaction||t.signedTransaction;if(n==="call"){let r=ys(e,!0);if(r)return r.data;At.throwError("missing revert data in call exception; Transaction reverted without a reason string",M.errors.CALL_EXCEPTION,{data:"0x",transaction:a,error:e})}if(n==="estimateGas"){let r=ys(e.body,!1);r==null&&(r=ys(e,!1)),r&&At.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",M.errors.UNPREDICTABLE_GAS_LIMIT,{reason:r.message,method:n,transaction:a,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)&&At.throwError("insufficient funds for intrinsic transaction cost",M.errors.INSUFFICIENT_FUNDS,{error:e,method:n,transaction:a}),i.match(/nonce (is )?too low/i)&&At.throwError("nonce has already been used",M.errors.NONCE_EXPIRED,{error:e,method:n,transaction:a}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&At.throwError("replacement fee too low",M.errors.REPLACEMENT_UNDERPRICED,{error:e,method:n,transaction:a}),i.match(/only replay-protected/i)&&At.throwError("legacy pre-eip-155 transactions not supported",M.errors.UNSUPPORTED_OPERATION,{error:e,method:n,transaction:a}),r5.indexOf(n)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&At.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",M.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:n,transaction:a}),e}function ec(n){return new Promise(function(e){setTimeout(e,n)})}function s5(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 ps(n){return n&&n.toLowerCase()}var kl={},Tr=class extends St{constructor(e,t,a){if(super(),e!==kl)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)):At.throwArgumentError("invalid address or index","addressOrIndex",a)}connect(e){return At.throwError("cannot alter JSON-RPC Signer connection",M.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new Al(kl,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&&At.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(a=>(a&&(a=a.toLowerCase()),a));if(e.gasLimit==null){let a=we(e);a.from=t,e.gasLimit=this.provider.estimateGas(a)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(a=>ba(this,void 0,void 0,function*(){if(a==null)return null;let i=yield this.provider.resolveName(a);return i==null&&At.throwArgumentError("provided ENS name resolves to null","tx.to",a),i}))),Ie({tx:Ie(e),sender:t}).then(({tx:a,sender:i})=>{a.from!=null?a.from.toLowerCase()!==i&&At.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)&&At.throwError("user rejected transaction",M.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:a}),tc("sendTransaction",s,r)))})}signTransaction(e){return At.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),a=yield this.sendUncheckedTransaction(e);try{return yield Rn(()=>ba(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 ba(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(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)&&At.throwError("user rejected signing",M.errors.ACTION_REJECTED,{action:"signMessage",from:a,messageData:e}),i}})}_legacySignMessage(e){return ba(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(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)&&At.throwError("user rejected signing",M.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:a,messageData:e}),i}})}_signTypedData(e,t,a){return ba(this,void 0,void 0,function*(){let i=yield bt.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(bt.getPayload(i.domain,t,i.value))])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&At.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,a=yield this.getAddress();return t.send("personal_unlockAccount",[a.toLowerCase(),e,null])})}},Al=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:a=>this.provider.waitForTransaction(t,a)}))}},o5={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0},Xt=class extends Zn{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=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 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(a){return At.throwError("could not detect network",M.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:a})}}return At.throwError("could not detect network",M.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new Tr(kl,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:ct(a),provider:this});let i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];let r=Sn(this.connection,JSON.stringify(a),s5).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",[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 a=mt(this.constructor,"hexlifyTransaction");return["eth_call",[a(t.transaction,{from:!0}),t.blockTag]]}case"estimateGas":{let a=mt(this.constructor,"hexlifyTransaction");return["eth_estimateGas",[a(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 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=we(t),t.transaction=we(i),delete t.transaction.type)}}let a=this.prepareRequest(e,t);a==null&&At.throwError(e+" not implemented",M.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(a[0],a[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(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 ec(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=we(o5);if(t)for(let r in t)t[r]&&(a[r]=!0);Gi(e,a);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 vr=null;try{if(vr=WebSocket,vr==null)throw new Error("inject please")}catch{let e=new M(ke);vr=function(){e.throwError("WebSockets not supported in this environment",M.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var Ml=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Wo=new M(ke),u5=1,ga=class extends Xt{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 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 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){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 Ml(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 a=u5++;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 Ml(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 Ml(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 d5=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},fs=new M(ke),cs=class extends Xt{detectNetwork(){let e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return d5(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 cs{constructor(e,t){fs.checkAbstract(new.target,It),e=mt(new.target,"getNetwork")(e),t=mt(new.target,"getApiKey")(t);let a=mt(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(){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(ke),Ko="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC",ms=class extends ga{constructor(e,t){let a=new wr(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===Ko}},wr=class extends It{static getWebSocketProvider(e,t){return new ms(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 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:nc.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+a+t,throttleCallback:(i,r)=>(t===Ko&&Xn(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===Ko}};var l5=new M(ke),Jo="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function p5(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 l5.throwArgumentError("unsupported network","name",n)}var hs=class extends It{isCommunityResource(){return this.apiKey===Jo}static getApiKey(e){return e??Jo}static getUrl(e,t){t==null&&(t=Jo);let a={allowGzip:!0,url:"https://"+p5(e.name)+t,throttleCallback:(i,r)=>(t.apiKey===Jo&&Xn(),Promise.resolve(!0))};return t.projectSecret!=null&&(a.user="",a.password=t.projectSecret),a}};var y5=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},ac=new M(ke),xs=class extends It{static getApiKey(e){return e!=null&&ac.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:ac.throwArgumentError("unsupported network","network",arguments[0])}return a}perform(e,t){let a=Object.create(null,{perform:{get:()=>super.perform}});return y5(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 $o=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Oa=new M(ke);function ic(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=Ln(W(a)):t==="accessList"?a="["+sn(a).map(i=>`{address:"${i.address}",storageKeys:["${i.storageKeys.join('","')}"]}`).join(",")+"]":a=W(a),e[t]=a)}return e}function f5(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 rc(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 sc(n){if(n==="pending")throw new Error("pending not supported");return n==="latest"?n:parseInt(n.substring(2),16)}function El(n,e,t){if(n==="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 a=e.message;throw e.code===M.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/)&&Oa.throwError("insufficient funds for intrinsic transaction cost",M.errors.INSUFFICIENT_FUNDS,{error:e,method:n,transaction:t}),a.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:n,transaction:t}),a.match(/another transaction with same nonce/)&&Oa.throwError("replacement fee too low",M.errors.REPLACEMENT_UNDERPRICED,{error:e,method:n,transaction:t}),a.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:n,transaction:t}),e}var bs=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 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 $o(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"?rc:f5;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 Sn(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 a=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=>El("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 El("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 El("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 Xo=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},bi=new M(ke);function Qo(){return new Date().getTime()}function oc(n){let e=null;for(let t=0;te?null:(a+i)/2}function _r(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=>_r(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=_r(a),JSON.stringify(t)+":"+a}).join(",")+"}"}throw new Error("unknown value type: "+typeof n)}var c5=1;function dc(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 m5=[M.errors.CALL_EXCEPTION,M.errors.INSUFFICIENT_FUNDS,M.errors.NONCE_EXPIRED,M.errors.REPLACEMENT_UNDERPRICED,M.errors.UNPREDICTABLE_GAS_LIMIT],h5=["address","args","errorArgs","errorSignature","method","transaction"];function Yo(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 x5(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 b5(n,e,t){let a=_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>=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 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":a=function(i){return i==null?null:(i=we(i),i.confirmations=-1,_r(i))};break;case"getBlock":t.includeTransactions?a=function(i){return i==null?null:(i=we(i),i.transactions=i.transactions.map(r=>(r=we(r),r.confirmations=-1,r)),_r(i))}:a=function(i){return i==null?null:_r(i)};break;default:throw new Error("unknown method: "+e)}return x5(a,n.quorum)}function gs(n,e){return Xo(this,void 0,void 0,function*(){let t=n.provider;return t.blockNumber!=null&&t.blockNumber>=e||e===-1?t:Rn(()=>new Promise((a,i)=>{setTimeout(function(){return t.blockNumber>=e?a(t):n.cancelled?a(null):a(void 0)},0)}),{oncePoll:t})})}function g5(n,e,t,a){return Xo(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 gs(n,e)),i[t](a.address,a.blockTag||"latest");case"getStorageAt":return a.blockTag&&ie(a.blockTag)&&(i=yield gs(n,e)),i.getStorageAt(a.address,a.position,a.blockTag||"latest");case"getBlock":return a.blockTag&&ie(a.blockTag)&&(i=yield gs(n,e)),i[a.includeTransactions?"getBlockWithTransactions":"getBlock"](a.blockTag||a.blockHash);case"call":case"estimateGas":return a.blockTag&&ie(a.blockTag)&&(i=yield gs(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 gs(n,e)),i.getLogs(r)}}return bi.throwError("unknown method error",M.errors.UNKNOWN_ERROR,{method:t,params:a})})}var Ts=class extends Zn{constructor(e,t){e.length===0&&bi.throwArgumentError("missing providers","providers",e);let a=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=we(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)&&bi.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&&bi.throwArgumentError("quorum will always fail; larger than total weight","quorum",t);let r=oc(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 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=Qo(),p=i.filter(_=>_.runner&&l-_.start<_.stallTimeout).reduce((_,v)=>_+v.weight,0);for(;p{_.staller=null}),_.runner=g5(_,r,e,t).then(S=>{_.done=!0,_.result=S,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Yo(_,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:Yo(_,Qo()),request:{method:e,params:ct(t)},provider:this})}),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:v,backend:Yo(_,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 _=a(x);if(_!==void 0)return i.forEach(v=>{v.staller&&v.staller.cancel(),v.cancelled=!0}),_;o||(yield dc(100).getPromise()),o=!1}let I=i.reduce((_,v)=>{if(!v.done||v.error==null)return _;let S=v.error.code;return m5.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={};h5.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=>Yo(l)),provider:this})})}};var Cl=null;var Zo=new M(ke),vs="84842078b09946638c03157f83405213",ws=class extends ga{constructor(e,t){let a=new kr(e,t),i=a.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",a.projectId),B(this,"projectId",a.projectId),B(this,"projectSecret",a.projectSecret)}isCommunityResource(){return this.projectId===vs}},kr=class extends It{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?(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 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:Zo.throwError("unsupported network",M.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let i={allowGzip:!0,url:"https://"+a+"/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 eu=class extends Xt{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:ct(o),provider:this}),Sn(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 I=new Error(x.error.message);I.code=x.error.code,I.data=x.error.data,p.reject(I)}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(ke),T5="ETHERS_JS_SHARED",_s=class extends It{static getApiKey(e){return e&&typeof e!="string"&&Il.throwArgumentError("invalid apiKey","apiKey",e),e||T5}static getUrl(e,t){Il.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:Il.throwArgumentError("unsupported network","network",arguments[0])}return a+"?apiKey="+t}};var lc=new M(ke),pc="62e1ad51b37b8e00394bda3b",ks=class extends It{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 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:lc.throwError("unsupported network",M.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===pc}};var yc=new M(ke),v5=1;function fc(n,e){let t="Web3LegacyFetcher";return function(a,i){let r={method:a,params:i,id:v5++,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 w5(n){return function(e,t){t==null&&(t=[]);let a={method:e,params:t};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:ct(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 As=class extends Xt{constructor(e,t){e==null&&yc.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=w5(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),a||(a="unknown:")),super(a,t),B(this,"jsonRpcFetchFunc",i),B(this,"provider",r)}send(e,t){return this.jsonRpcFetchFunc(e,t)}};var cc=new M(ke);function tu(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 Xt(n);case"ws":case"wss":return new ga(n);default:cc.throwArgumentError("unsupported URL scheme","network",n)}}let t=rs(n);return(!t||!t._defaultProvider)&&cc.throwError("unsupported getDefaultProvider network",M.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:n}),t._defaultProvider({FallbackProvider:Ts,AlchemyProvider:wr,AnkrProvider:hs,CloudflareProvider:xs,EtherscanProvider:bs,InfuraProvider:kr,JsonRpcProvider:Xt,NodesmithProvider:_s,PocketProvider:ks,Web3Provider:As,IpcProvider:null},e)}var ne={};ji(ne,{AbiCoder:()=>Qi,ConstructorFragment:()=>Dt,ErrorFragment:()=>tn,EventFragment:()=>Ht,FormatTypes:()=>ge,Fragment:()=>qt,FunctionFragment:()=>Ot,HDNode:()=>Ct,Indexed:()=>oa,Interface:()=>Ia,LogDescription:()=>er,Logger:()=>M,ParamType:()=>pt,RLP:()=>Ys,SigningKey:()=>mn,SupportedAlgorithm:()=>Qn,TransactionDescription:()=>tr,TransactionTypes:()=>Eo,UnicodeNormalizationForm:()=>Gt,Utf8ErrorFuncs:()=>po,Utf8ErrorReason:()=>Bt,_TypedDataEncoder:()=>bt,_fetchData:()=>hl,_toEscapedUtf8String:()=>vd,accessListify:()=>sn,arrayify:()=>j,base58:()=>ya,base64:()=>Ed,checkProperties:()=>Gi,checkResultErrors:()=>Wi,commify:()=>wc,computeAddress:()=>hn,computeHmac:()=>fa,computePublicKey:()=>Yr,concat:()=>ye,deepCopy:()=>ct,defaultAbiCoder:()=>Wr,defaultPath:()=>ca,defineReadOnly:()=>B,dnsEncode:()=>Jr,entropyToMnemonic:()=>xi,fetchJson:()=>Sn,formatBytes32String:()=>wd,formatEther:()=>_c,formatUnits:()=>Sl,getAccountPath:()=>cf,getAddress:()=>ce,getContractAddress:()=>ui,getCreate2Address:()=>Ey,getIcapAddress:()=>My,getJsonWalletAddress:()=>pl,getStatic:()=>mt,hashMessage:()=>Zi,hexConcat:()=>_t,hexDataLength:()=>Nt,hexDataSlice:()=>Ce,hexStripZeros:()=>ld,hexValue:()=>Ln,hexZeroPad:()=>me,hexlify:()=>W,id:()=>nn,isAddress:()=>Ay,isBytes:()=>un,isBytesLike:()=>aa,isHexString:()=>ie,isValidMnemonic:()=>ff,isValidName:()=>Id,joinSignature:()=>Br,keccak256:()=>fe,mnemonicToEntropy:()=>cr,mnemonicToSeed:()=>il,namehash:()=>Ca,nameprep:()=>Md,parseBytes32String:()=>_d,parseEther:()=>kc,parseTransaction:()=>Co,parseUnits:()=>Rl,poll:()=>Rn,randomBytes:()=>Yn,recoverAddress:()=>yi,recoverPublicKey:()=>Mo,resolveProperties:()=>Ie,ripemd160:()=>es,serializeTransaction:()=>Xr,sha256:()=>Yt,sha512:()=>el,shallowCopy:()=>we,shuffled:()=>as,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 _5=new RegExp("^bytes([0-9]+)$"),k5=new RegExp("^(u?int)([0-9]*)$"),A5=new RegExp("^(.*)\\[([0-9]*)\\]$"),M5="0000000000000000000000000000000000000000000000000000000000000000",Ar=new M(mc);function hc(n,e,t){switch(n){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 a=n.match(k5);if(a){let i=parseInt(a[2]||"256");return(a[2]&&String(i)!==a[2]||i%8!==0||i===0||i>256)&&Ar.throwArgumentError("invalid number type","type",n),t&&(i=256),e=F.from(e).toTwos(i),ii(e,i/8)}if(a=n.match(_5),a){let i=parseInt(a[1]);return(String(i)!==a[1]||i===0||i>32)&&Ar.throwArgumentError("invalid bytes type","type",n),j(e).byteLength!==i&&Ar.throwArgumentError(`invalid value for ${n}`,"value",e),t?j((e+M5).substring(0,66)):e}if(a=n.match(A5),a&&Array.isArray(e)){let i=a[1];parseInt(a[2]||String(e.length))!=e.length&&Ar.throwArgumentError(`invalid array length for ${n}`,"value",e);let s=[];return e.forEach(function(o){s.push(hc(i,o,!0))}),ye(s)}return Ar.throwArgumentError("invalid type","type",n)}function nu(n,e){n.length!=e.length&&Ar.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);let t=[];return n.forEach(function(a,i){t.push(hc(a,e[i]))}),W(ye(t))}function xc(n,e){return fe(nu(n,e))}function bc(n,e){return Yt(nu(n,e))}var gc="units/5.7.0";var Tc=new M(gc),vc=["wei","kwei","mwei","gwei","szabo","finney","ether"];function wc(n){let e=String(n).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||n==="."||n==="-.")&&Tc.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 Sl(n,e){if(typeof e=="string"){let t=vc.indexOf(e);t!==-1&&(e=3*t)}return qi(n,e??18)}function Rl(n,e){if(typeof n!="string"&&Tc.throwArgumentError("value must be a string","value",n),typeof e=="string"){let t=vc.indexOf(e);t!==-1&&(e=3*t)}return ln(n,e??18)}function _c(n){return Sl(n,18)}function kc(n){return Rl(n,18)}var au="ethers/5.7.2";var Ac=new M(au);try{let n=window;n._ethers==null&&(n._ethers=Pl)}catch{}var Pn;(function(n){n.Mainnet="Mainnet",n.Custom="Custom",n.Gnosis="Xdai",n.Goerli="Goerli",n.Xdai="Xdai",n.XdaiQa="XdaiQa",n.ArbitrumOne="ArbitrumOne",n.ArbitrumSepolia="ArbitrumSepolia"})(Pn||(Pn={}));var Mc;(function(n){n[n.Custom=0]="Custom",n[n.Mainnet=1]="Mainnet",n[n.Goerli=5]="Goerli",n[n.Gnosis=100]="Gnosis",n[n.Xdai=100]="Xdai",n[n.XdaiQa=100]="XdaiQa",n[n.ArbitrumSepolia=421614]="ArbitrumSepolia",n[n.ArbitrumOne=42161]="ArbitrumOne"})(Mc||(Mc={}));var iu;(function(n){n.Mainnet="0x5346D0f80e2816FaD329F2c140c870ffc3c3E2Ef",n.Goerli="0x79073fc2117dD054FCEdaCad1E7018C9CbE3ec0B",n.Xdai="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.XdaiQa="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.Custom="",n.ArbitrumOne="0xcccccdcc0ccf6c708d860e19353c5f9a49accccc",n.ArbitrumSepolia="0x7777494e3d8cce0D3570E21FEf820F9Fee077777"})(iu||(iu={}));var Mr;(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",n.ArbitrumOne="https://app.colony.io/reputation/arbitrum-one",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/reputation/arbitrum-sepolia"})(Mr||(Mr={}));var ru;(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="",n.ArbitrumOne="https://app.colony.io/metatransaction/arbitrum-one",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/metatransaction/arbitrum-sepolia"})(ru||(ru={}));var Nl;(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="",n.ArbitrumOne="https://app.colony.io/public-rpc/",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/public-rpc/"})(Nl||(Nl={}));var Ms;(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",n.ArbitrumOne=".colony.joincolony.arbitrum",n.ArbitrumSepolia=".colony.joincolony.sepolia"})(Ms||(Ms={}));var Es;(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",n.ArbitrumOne=".user.joincolony.arbitrum",n.ArbitrumSepolia=".user.joincolony.sepolia"})(Es||(Es={}));var Dl;(function(n){let e;(function(i){i.ETH="0x0000000000000000000000000000000000000000",i.CLNY="0x3E828ac5C480069D4765654Fb4b8733b910b13b2",i.USDC="0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"})(e=n.Mainnet||(n.Mainnet={}));let t;(function(i){i.XDAI="0x0000000000000000000000000000000000000000",i.CLNY="0xc9B6218AffE8Aba68a13899Cbf7cF7f14DDd304C",i.USDC="0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83"})(t=n.Gnosis||(n.Gnosis={}));let a;(function(i){i.ETH="0x0000000000000000000000000000000000000000",i.CLNY="0xcccccdcc0ccf6c708d860e19353c5f9a49accccc",i.USDC="0xaf88d065e77c8cC2239327C5EDb3A432268e5831"})(a=n.ArbitrumOne||(n.ArbitrumOne={}))})(Dl||(Dl={}));var _e;(function(n){n[n.RootDomain=1]="RootDomain",n[n.RootTeam=1]="RootTeam",n[n.RootPot=1]="RootPot",n[n.SkillIgnore=0]="SkillIgnore"})(_e||(_e={}));var zt;(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"})(zt||(zt={}));var Bl="0x12345678",Ol;(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"})(Ol||(Ol={}));var vt;(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"})(vt||(vt={}));var Ae;(function(n){n.FundingQueue="FundingQueue",n.IVotingReputation="IVotingReputation",n.MultisigPermissions="MultisigPermissions",n.OneTxPayment="OneTxPayment",n.ReputationBootstrapper="ReputationBootstrapper",n.StagedExpenditure="StagedExpenditure",n.StakedExpenditure="StakedExpenditure",n.StreamingPayments="StreamingPayments",n.TokenSupplier="TokenSupplier",n.VotingReputation="VotingReputation"})(Ae||(Ae={}));var Fl=[{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(Fl)}static connect(e,t){return new oe(e,Fl,t)}};xe(gi,"abi",Fl);var Ll=[{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"}],Ti=class{static createInterface(){return new ne.Interface(Ll)}static connect(e,t){return new oe(e,Ll,t)}};xe(Ti,"abi",Ll);var Ec=(n,e)=>{throw new Error(`${e}: ${n}`)},su=n=>n!=null;var{keccak256:C5,toUtf8Bytes:I5}=ne,{MaxUint256:S5}=ht;var Ul=n=>ne.formatEther(n);var Vl=n=>{let e=n.reduce((t,a)=>t|1<{let e=F.from(n);return[...Array(vt.LAST_ROLE).keys()].map(t=>e.shr(t).mask(1).eq(1)?t:null).filter(su)},vi=async(n,e,t,a)=>{if(F.from(t).eq(F.from(a)))return S5;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)},Ba=n=>C5(I5(n));var Er=async(n,e)=>(await Ti.connect(n,e).version()).toNumber(),jl=(n,e)=>n.map(t=>{try{return e.parseLog(t)}catch{return null}}).filter(su);var{hexDataSlice:Hl}=ne,{MaxUint256:R5}=ht,Cc=n=>{let e=Hl(n,0,3),t=F.from(Hl(n,4,35)),a=F.from(Hl(n,36,67));return{sig:e,permissionDomainId:t,childSkillIndex:a}},Ic=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),R5,r];let o=F.from(_e.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 vi(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]},P5=async(n,e,t,a,i)=>{let r=await Promise.all(a.map(s=>Ic(n,e,t,s,i)));for(let s=0;sArray.isArray(a)?a.length===1?ta(n,e,t,a[0],i):P5(n,e,t,a,i):Ic(n,e,t,a,i);var{MaxUint256:Sc}=ht,{AddressZero:N5}=ht;async function D5(n,e){let t;try{return t=await n.getCapabilityRoles(ne.hexZeroPad(e,4)),ou(t)}catch{return[]}}async function Cs(n,e,t,a,i,r,s){let o,{skillId:l}=await e.getDomain(i),{sig:p,permissionDomainId:f,childSkillIndex:x}=Cc(s),I=gi.connect(r,a.signer||a.provider),_=await D5(I,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 ${_e.RootDomain}`);o=Sc}else{let{skillId:U}=await e.getDomain(f),H=await n.getChildSkillId(U,x);if(H.eq(l))o=Sc;else{let{children:E}=await n.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,N5);return{actionCid:o,key:v,value:S,branchMask:L,siblings:O}}var{AddressZero:O5}=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,a){this.colony=t,this.network=e;let i=a?.network||Pn.ArbitrumOne;this.endpointUrl=a?.customEndpointUrl||Mr[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 na.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 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 a=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${a}/${i}`;return na.fetchReputation(r)}async getTotalReputation(e,t){let a=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${a}/${i}/${O5}/noProof`,s=await na.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 Mt=n=>Array.from(Array(n-1)).map((e,t)=>t+1);var Rc=10,fk=Mt(Rc),Pc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Nc=Rc-1;var Dc=3,hk=Mt(Dc),Oc={1:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],2:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]},Bc=Dc-1;var Fc=10,gk=Mt(Fc),Lc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Uc=Fc-1;var Vc=7,wk=Mt(Vc),jc={1:[],2:[],3:[],4:[],5:[],6:[]},Hc=Vc-1;var qc=8,Ak=Mt(qc),Gc={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3],6:[1,2,3],7:[1,2,3]},zc=qc-1;var Wc=5,Ck=Mt(Wc),Kc={1:[1,2,3,4,5,6,7,8,9,10,11,12,13],2:[1,2,3,4,5,6,7,8,9,10,11,12,13],3:[1,2,3,4,5,6,7,8,9,10,11,12,13],4:[1,2,3,4,5,6,7,8,9,10,11,12,13]},Jc=Wc-1;var $c=7,Rk=Mt($c),Qc={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3],6:[1,2,3]},Yc=$c-1;var Xc=10,Dk=Mt(Xc),Zc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},em=Xc-1;var tm=14,Fk=Mt(tm),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],11:[1,2,3,4,5,6],12:[1,2,3,4,5,6],13:[1,2,3,4,5,6]},Gl=tm-1;var nm=18,B5=Mt(nm),Vk=nm-1;var F5=(n,e)=>{switch(n){case Ae.FundingQueue:return Pc[e];case Ae.IVotingReputation:return ql[e];case Ae.MultisigPermissions:return Oc[e];case Ae.OneTxPayment:return Lc[e];case Ae.ReputationBootstrapper:return jc[e];case Ae.StagedExpenditure:return Kc[e];case Ae.StakedExpenditure:return Gc[e];case Ae.StreamingPayments:return Qc[e];case Ae.TokenSupplier:return Zc[e];case Ae.VotingReputation:return ql[e];default:return Ec(n,"Could not find extension with name")}},wi=(n,e,t)=>{let a=F5(n,e);return!!a&&!a.includes(t)};var L5={[Ae.FundingQueue]:Nc,[Ae.IVotingReputation]:Gl,[Ae.MultisigPermissions]:Bc,[Ae.OneTxPayment]:Uc,[Ae.ReputationBootstrapper]:Hc,[Ae.StagedExpenditure]:Jc,[Ae.StakedExpenditure]:zc,[Ae.StreamingPayments]:Yc,[Ae.TokenSupplier]:em,[Ae.VotingReputation]:Gl};var k6=_n(am(),1);var yp=_n(v6(),1);var Re;(function(n){n.DEFAULT="default",n.Annotation="annotation",n.Colony="colony",n.Decision="decision",n.Domain="domain",n.Misc="misc"})(Re||(Re={}));var pp=2,lp;(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"})(lp||(lp={}));var w6=n=>`Validation error(s): ${n.map(t=>`Error in ${t.path}. Seen: ${t.value}, expected: ${t.expected}`).join(` -`)}`,Yb=n=>({...n,isWhitelistActivated:n.isWhitelistActivated||!1,colonySafes:n.colonySafes||[],colonyTokens:n.colonyTokens||[],verifiedAddresses:n.verifiedAddresses||[]}),fp=(n,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&&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"?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 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),de=(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: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}})(n);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 a=w6(t.errors);throw new Error(a)};var _6=(n,e)=>{let t=n===Re.Colony?Yb(e):e,a=(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&&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"?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 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),de=(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: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}})({name:n,data:t,version:pp});if(!a.success){let i=w6(a.errors);throw new Error(i)}return a.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,k6.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]:""},Pr=class{adapter;constructor(e){this.adapter=e||new mp}static eventSupportsMetadata(e){return!!Object.keys(Bs).includes(e)}async getMetadata(e,t){let a=this.adapter.getIpfsUrl(e),r=await(await hp(a)).json();return fp(r,t)}async getMetadataForEvent(e,t){let a=this.adapter.getIpfsUrl(t),r=await(await hp(a)).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),a=await hp(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=_6(e,t),i=JSON.stringify(a);return this.adapter.uploadJson(i)}};var lM=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 ne.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 ne.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"}],Ci=class{static createInterface(){return new ne.Interface(gp)}static connect(e,t){return new oe(e,gp,t)}};xe(Ci,"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:"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:"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:[{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:"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:"returnData",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",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:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],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:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"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:[],name:"unlock",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"}],A6="0x60c060405234801561001057600080fd5b5060405161205738038061205783398101604081905261002f91610307565b60008060018161003d6101ab565b6001600160a01b031681526020810191909152604001600090812091909155556100656101ab565b600480546001600160a01b0319166001600160a01b039290921691909117905561008d6101ab565b6001600160a01b03167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a260066100ce8482610413565b5060056100db8382610413565b5060ff81166080526007805460ff1916600117905560405146907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f90610123906006906104d1565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051601f19818403018152919052805160209091012060a0525061054692505050565b60003633301480156101be575060348110155b1561024757600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e881146102365733935050505090565b5001516001600160a01b0316919050565b3391505090565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261027557600080fd5b81516001600160401b0381111561028e5761028e61024e565b604051601f8201601f19908116603f011681016001600160401b03811182821017156102bc576102bc61024e565b6040528181528382016020018510156102d457600080fd5b60005b828110156102f3576020818601810151838301820152016102d7565b506000918101602001919091529392505050565b60008060006060848603121561031c57600080fd5b83516001600160401b0381111561033257600080fd5b61033e86828701610264565b602086015190945090506001600160401b0381111561035c57600080fd5b61036886828701610264565b925050604084015160ff8116811461037f57600080fd5b809150509250925092565b600181811c9082168061039e57607f821691505b6020821081036103be57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561040e57806000526020600020601f840160051c810160208510156103eb5750805b601f840160051c820191505b8181101561040b57600081556001016103f7565b50505b505050565b81516001600160401b0381111561042c5761042c61024e565b6104408161043a845461038a565b846103c4565b6020601f821160018114610474576000831561045c5750848201515b600019600385901b1c1916600184901b17845561040b565b600084815260208120601f198516915b828110156104a45787850151825560209485019460019092019101610484565b50848210156104c25786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b60008083546104df8161038a565b6001821680156104f6576001811461050b5761053b565b60ff198316865281151582028601935061053b565b86600052602060002060005b8381101561053357815488820152600190910190602001610517565b505081860193505b509195945050505050565b60805160a051611ae5610572600039600081816102e10152610f870152600061029b0152611ae56000f3fe6080604052600436106101815760003560e01c80637a9e5e4b116100d1578063a69df4b51161008a578063bf7e214f11610064578063bf7e214f146104b1578063cf309012146104d1578063d505accf146104eb578063dd62ed3e1461050b57600080fd5b8063a69df4b51461047c578063a9059cbb14610491578063b3eac1d8146103b957600080fd5b80637a9e5e4b146103995780637ecebe00146103b95780638da5cb5b146103ef57806395d89b41146104275780639dc29fac1461043c578063a0712d681461045c57600080fd5b806330adf81f1161013e57806340c10f191161011857806340c10f191461030357806342966c68146103235780636281133d1461034357806370a082311461036357600080fd5b806330adf81f14610255578063313ce567146102895780633644e515146102cf57600080fd5b806306fdde0314610186578063095ea7b3146101b15780630c53c51c146101e157806313af4035146101f457806318160ddd1461021657806323b872dd14610235575b600080fd5b34801561019257600080fd5b5061019b610551565b6040516101a891906115b0565b60405180910390f35b3480156101bd57600080fd5b506101d16101cc3660046115d8565b6105df565b60405190151581526020016101a8565b61019b6101ef3660046116bf565b610672565b34801561020057600080fd5b5061021461020f366004611733565b610859565b005b34801561022257600080fd5b506000545b6040519081526020016101a8565b34801561024157600080fd5b506101d1610250366004611750565b6108dc565b34801561026157600080fd5b506102277f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b34801561029557600080fd5b506102bd7f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101a8565b3480156102db57600080fd5b506102277f000000000000000000000000000000000000000000000000000000000000000081565b34801561030f57600080fd5b5061021461031e3660046115d8565b610950565b34801561032f57600080fd5b5061021461033e366004611791565b610a3f565b34801561034f57600080fd5b506101d161035e3660046117aa565b610a53565b34801561036f57600080fd5b5061022761037e366004611733565b6001600160a01b031660009081526001602052604090205490565b3480156103a557600080fd5b506102146103b4366004611733565b610ba7565b3480156103c557600080fd5b506102276103d4366004611733565b6001600160a01b031660009081526008602052604090205490565b3480156103fb57600080fd5b5060045461040f906001600160a01b031681565b6040516001600160a01b0390911681526020016101a8565b34801561043357600080fd5b5061019b610c18565b34801561044857600080fd5b506102146104573660046115d8565b610c25565b34801561046857600080fd5b50610214610477366004611791565b610e1c565b34801561048857600080fd5b50610214610e54565b34801561049d57600080fd5b506101d16104ac3660046115d8565b610e87565b3480156104bd57600080fd5b5060035461040f906001600160a01b031681565b3480156104dd57600080fd5b506007546101d19060ff1681565b3480156104f757600080fd5b50610214610506366004611831565b610ea2565b34801561051757600080fd5b506102276105263660046118a0565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6006805461055e906118d9565b80601f016020809104026020016040519081016040528092919081815260200182805461058a906118d9565b80156105d75780601f106105ac576101008083540402835291602001916105d7565b820191906000526020600020905b8154815290600101906020018083116105ba57829003601f168201915b505050505081565b600081600260006105ee611191565b6001600160a01b0390811682526020808301939093526040918201600090812091881680825291909352912091909155610626611191565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161066091815260200190565b60405180910390a35060015b92915050565b60606106a186610697886001600160a01b031660009081526008602052604090205490565b4688888888610a53565b6107045760405162461bcd60e51b815260206004820152602960248201527f6d6574617472616e73616374696f6e2d7369676e65722d7369676e617475726560448201526805adad2e6dac2e8c6d60bb1b60648201526084015b60405180910390fd5b61070d86611234565b6000306001600160a01b0316867f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e88960405160200161074e93929190611913565b60408051601f19818403018152908290526107689161194c565b6000604051808303816000865af19150503d80600081146107a5576040519150601f19603f3d011682016040523d82523d6000602084013e6107aa565b606091505b50925090508061080d5760405162461bcd60e51b815260206004820152602860248201527f636f6c6f6e792d6d65746174782d66756e6374696f6e2d63616c6c2d756e737560448201526718d8d95cdcd99d5b60c21b60648201526084016106fb565b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b87610837611191565b8860405161084793929190611968565b60405180910390a15095945050505050565b610876610864611191565b6000356001600160e01b031916611260565b6108925760405162461bcd60e51b81526004016106fb9061199d565b600480546001600160a01b0319166001600160a01b0383169081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60075460009060ff161561093d576108f5610864611191565b61093d5760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b61094884848461133b565b949350505050565b61095b610864611191565b6109775760405162461bcd60e51b81526004016106fb9061199d565b6001600160a01b0382166000908152600160205260408120805483929061099f9084906119e1565b92505081905550806000808282546109b791906119e1565b90915550506040518181526001600160a01b038316907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a26040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b610a50610a4a611191565b82610c25565b50565b600080610ad088308989604051602001610a7094939291906119f4565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b6040805160008082526020820180845284905260ff87169282019290925260608101889052608081018790529192509060019060a0016020604051602081039080840390855afa158015610b28573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610b8b5760405162461bcd60e51b815260206004820152601f60248201527f636f6c6f6e792d6d65746174782d696e76616c69642d7369676e61747572650060448201526064016106fb565b6001600160a01b038a8116911614915050979650505050505050565b610bb2610864611191565b610bce5760405162461bcd60e51b81526004016106fb9061199d565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6005805461055e906118d9565b610c2d611191565b6001600160a01b0316826001600160a01b031614610d2d576001600160a01b03821660009081526002602052604081208291610c67611191565b6001600160a01b03166001600160a01b03168152602001908152602001600020541015610cd65760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03821660009081526002602052604081208291610cf8611191565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610d279190611a3a565b90915550505b6001600160a01b038216600090815260016020526040902054811115610d955760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b03821660009081526001602052604081208054839290610dbd908490611a3a565b9250508190555080600080828254610dd59190611a3a565b90915550506040518181526001600160a01b038316907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59060200160405180910390a25050565b610e27610864611191565b610e435760405162461bcd60e51b81526004016106fb9061199d565b610a50610e4e611191565b82610950565b610e5f610864611191565b610e7b5760405162461bcd60e51b81526004016106fb9061199d565b6007805460ff19169055565b6000610e9b610e94611191565b84846108dc565b9392505050565b60075460ff1615610f0057610eb8610864611191565b610f005760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b42841015610f505760405162461bcd60e51b815260206004820152601d60248201527f636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e6500000060448201526064016106fb565b6040805180820182526002815261190160f01b6020808301919091526001600160a01b038a166000908152600890915291822080547f0000000000000000000000000000000000000000000000000000000000000000917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c9188610fd983611a4d565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161103d93929190611a66565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa1580156110a8573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906110de5750886001600160a01b0316816001600160a01b0316145b61112a5760405162461bcd60e51b815260206004820152601e60248201527f636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e6174757265000060448201526064016106fb565b6001600160a01b038981166000818152600260209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b60003633301480156111a4575060348110155b1561122d57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e8811461121c5733935050505090565b5001516001600160a01b0316919050565b3391505090565b6001600160a01b038116600090815260086020526040812080549161125883611a4d565b919050555050565b6000306001600160a01b0384160361127a5750600161066c565b6004546001600160a01b03908116908416036112985750600161066c565b6003546001600160a01b03166112b05750600061066c565b60035460405163b700961360e01b81526001600160a01b0385811660048301523060248301526001600160e01b0319851660448301529091169063b700961390606401602060405180830381865afa158015611310573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113349190611a8d565b905061066c565b6000611345611191565b6001600160a01b0316846001600160a01b031614611445576001600160a01b0384166000908152600260205260408120839161137f611191565b6001600160a01b03166001600160a01b031681526020019081526020016000205410156113ee5760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03841660009081526002602052604081208391611410611191565b6001600160a01b03166001600160a01b03168152602001908152602001600020600082825461143f9190611a3a565b90915550505b6001600160a01b0384166000908152600160205260409020548211156114ad5760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b038416600090815260016020526040812080548492906114d5908490611a3a565b90915550506001600160a01b038316600090815260016020526040812080548492906115029084906119e1565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161154e91815260200190565b60405180910390a35060019392505050565b60005b8381101561157b578181015183820152602001611563565b50506000910152565b6000815180845261159c816020860160208601611560565b601f01601f19169290920160200192915050565b602081526000610e9b6020830184611584565b6001600160a01b0381168114610a5057600080fd5b600080604083850312156115eb57600080fd5b82356115f6816115c3565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261162b57600080fd5b813567ffffffffffffffff81111561164557611645611604565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561167457611674611604565b60405281815283820160200185101561168c57600080fd5b816020850160208301376000918101602001919091529392505050565b803560ff811681146116ba57600080fd5b919050565b600080600080600060a086880312156116d757600080fd5b85356116e2816115c3565b9450602086013567ffffffffffffffff8111156116fe57600080fd5b61170a8882890161161a565b9450506040860135925060608601359150611727608087016116a9565b90509295509295909350565b60006020828403121561174557600080fd5b8135610e9b816115c3565b60008060006060848603121561176557600080fd5b8335611770816115c3565b92506020840135611780816115c3565b929592945050506040919091013590565b6000602082840312156117a357600080fd5b5035919050565b600080600080600080600060e0888a0312156117c557600080fd5b87356117d0816115c3565b96506020880135955060408801359450606088013567ffffffffffffffff8111156117fa57600080fd5b6118068a828b0161161a565b9450506080880135925060a0880135915061182360c089016116a9565b905092959891949750929550565b600080600080600080600060e0888a03121561184c57600080fd5b8735611857816115c3565b96506020880135611867816115c3565b95506040880135945060608801359350611883608089016116a9565b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156118b357600080fd5b82356118be816115c3565b915060208301356118ce816115c3565b809150509250929050565b600181811c908216806118ed57607f821691505b60208210810361190d57634e487b7160e01b600052602260045260246000fd5b50919050565b60008451611925818460208901611560565b919091019283525060601b6bffffffffffffffffffffffff19166020820152603401919050565b6000825161195e818460208701611560565b9190910192915050565b6001600160a01b0384811682528316602082015260606040820181905260009061199490830184611584565b95945050505050565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561066c5761066c6119cb565b8481526bffffffffffffffffffffffff198460601b16602082015282603482015260008251611a2a816054850160208701611560565b9190910160540195945050505050565b8181038181111561066c5761066c6119cb565b600060018201611a5f57611a5f6119cb565b5060010190565b60008451611a78818460208901611560565b91909101928352506020820152604001919050565b600060208284031215611a9f57600080fd5b81518015158114610e9b57600080fdfea264697066735822122090928a66070125904780390eb49d45fe12c136aec641b1db69316e0ffefc6da764736f6c634300081b0033",t1=n=>n.length>1,Nn=class extends ci{constructor(...e){t1(e)?super(...e):super(Vu,A6,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 ne.Interface(Vu)}static connect(e,t){return new oe(e,Vu,t)}};xe(Nn,"bytecode",A6),xe(Nn,"abi",Vu);var Tp=[{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:"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:"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:[{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:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",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:"_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:"_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:"returnData",type:"bytes"}],stateMutability:"payable",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:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"",type:"address"}],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"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",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:"_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:"_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:"_token",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"incrementLockCounterTo",outputs:[],stateMutability:"nonpayable",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:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"pure",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetwork",type:"address"}],name:"setColonyNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",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:"_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:"_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:"_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:"_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"}],Ii=class{static createInterface(){return new ne.Interface(Tp)}static connect(e,t){return new oe(e,Tp,t)}};xe(Ii,"abi",Tp);var Si;(function(n){n.TokenClient="TokenClient",n.TokenLockingClient="TokenLockingClient"})(Si||(Si={}));var Dn;(function(n){n.Colony="Colony",n.ColonyLegacy="ColonyLegacy",n.Erc20="Erc20",n.Erc2612="Erc2612",n.Sai="Sai"})(Dn||(Dn={}));var{AddressZero:r1}=ht;async function s1(n){try{await n.authority();return}catch{throw new Error("Token can not be assigned a TokenAuthority")}}var o1=async(n,e)=>{let t,a=!0,i=!0;t=Nn.connect(n,e);try{await t.totalSupply()}catch(r){throw new Error(`Token is probably not a valid ERC20 token, got ${r.message}`)}try{await t.locked(),await s1(t)}catch{a=!1}try{await t.nonces(r1)}catch{i=!1}return a?t.tokenClientType=Dn.Colony:i?(t=wn.connect(n,e),t.tokenClientType=Dn.Erc2612):(t=vn.connect(n,e),t.tokenClientType=Dn.Erc20),t.clientType=Si.TokenClient,t},vp=o1;var u1=(n,e)=>{let t=Ii.connect(n,e);return t.clientType=Si.TokenLockingClient,t},wp=u1;var{AddressZero:_p}=ht,d1=vn.connect(_p,new ea.BaseProvider(3656691)).interface,l1=Ci.connect(_p,new ea.BaseProvider(3656691)).interface,p1=wn.connect(_p,new ea.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"},{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:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{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:"returnData",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:"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:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"}],Fs=class{static createInterface(){return new ne.Interface(kp)}static connect(e,t){return new oe(e,kp,t)}};Fs.abi=kp;var Ap=[{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:"returnData",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"}],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:"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:!1,internalType:"address",name:"bridgeAddress",type:"address"}],name:"BridgeSet",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:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateSentToBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateStoredFromBridge",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:"uint256",name:"skillId",type:"uint256"}],name:"SkillAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillCreationStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillStoredFromBridge",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:[{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"address",name:"_resolver",type:"address"}],name:"addColonyVersion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_resolver",type:"address"}],name:"addExtensionToNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"addPendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPendingSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"addReputationUpdateLogFromBridge",outputs:[],stateMutability:"nonpayable",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:"_parentSkillId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"addSkillFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",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:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"chainId",type:"uint256"}],name:"bridgeCurrentRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"bridgePendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"skillId",type:"uint256"}],name:"bridgeSkillIfNotMiningChain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"burnUnneededRewards",outputs:[],stateMutability:"nonpayable",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:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"}],name:"claimMiningReward",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:"address",name:"_tokenAddress",type:"address"}],name:"createMetaColony",outputs:[],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:"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:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateExtension",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:"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:"returnData",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"getBridgedReputationUpdateCount",outputs:[{internalType:"uint256",name:"bridgedReputationCount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"}],name:"getBridgedSkillCounts",outputs:[{internalType:"uint256",name:"skillCount",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:"uint256",name:"_id",type:"uint256"}],name:"getColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyBridgeAddress",outputs:[{internalType:"address",name:"bridge",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCreationSalt",outputs:[{internalType:"bytes32",name:"salt",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"}],name:"getColonyVersionResolver",outputs:[{internalType:"address",name:"_resolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentColonyVersion",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getENSRegistrar",outputs:[{internalType:"address",name:"_address",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:[{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:[],name:"getFeeInverse",outputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMetaColony",outputs:[{internalType:"address payable",name:"_colonyAddress",type:"address"}],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:"getMiningChainId",outputs:[{internalType:"uint256",name:"reputationMiningChainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"}],name:"getMiningDelegator",outputs:[{internalType:"address",name:"_delegator",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiningResolver",outputs:[{internalType:"address",name:"miningResolverAddress",type:"address"}],stateMutability:"view",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:"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:"address",name:"_token",type:"address"}],name:"getPayoutWhitelist",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"getPendingReputationUpdate",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:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.PendingReputationUpdate",name:"update",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"getPendingSkillAddition",outputs:[{internalType:"uint256",name:"parentId",type:"uint256"}],stateMutability:"view",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:"_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:[{internalType:"bool",name:"_active",type:"bool"}],name:"getReputationMiningCycle",outputs:[{internalType:"address",name:"_repMiningCycleAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningCycleReward",outputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningSkillId",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"view",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:"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_deprecated",type:"bool"}],internalType:"struct ColonyNetworkDataTypes.Skill",name:"_skill",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSkillCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTokenLocking",outputs:[{internalType:"address",name:"_lockingAddress",type:"address"}],stateMutability:"view",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:"miningChainId",type:"uint256"},{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"}],name:"initialiseReputationMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[{internalType:"uint256",name:"_rootLocalSkillId",type:"uint256"}],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:"address",name:"_colony",type:"address"}],name:"isColony",outputs:[{internalType:"bool",name:"_addressIsColony",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],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:"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:"_stakers",type:"address[]"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"punishStakers",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:"_username",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerUserLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_bridgeAddress",type:"address"}],name:"setColonyBridgeAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],name:"setFeeInverse",outputs:[],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:"_miningResolverAddress",type:"address"}],name:"setMiningResolver",outputs:[],stateMutability:"nonpayable",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:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",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:"uint256",name:"_amount",type:"uint256"}],name:"setReputationMiningCycleReward",outputs:[],stateMutability:"nonpayable",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:[{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"},{internalType:"uint256",name:"nonce",type:"uint256"}],name:"setReputationRootHashFromBridge",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:"address",name:"_tokenLockingAddress",type:"address"}],name:"setTokenLocking",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:"uint256",name:"_amount",type:"uint256"}],name:"stakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"startNextCycle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"startTokenAuction",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:"bytes32",name:"_extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"unstakeForMining",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:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"}],Ri=class{static createInterface(){return new ne.Interface(Mp)}static connect(e,t){return new oe(e,Mp,t)}};Ri.abi=Mp;var Ta=class{constructor({contract:e,config:t,method:a,args:i,eventData:r,txConfig:s}){this.config=t,this.contract=e,this.method=a,this.args=i,this.eventData=r,this.txConfig=s}async getArgs(e){let t=[];return typeof this.args=="function"?t=await this.args():t=this.args,e&&t.push(e),t}async getTx(e){let t=await this.getArgs(e);return await this.contract.functions[this.method].apply(this.contract,t)}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.config.ipfs.getMetadataForEvent.bind(this.config.ipfs,Bs[this.txConfig.metadataType],t.metadata);return[t,e,a]}return[t,e]}return[{},e]}async broadcastMetaTx(e){let{provider:t}=this.config.getSigner();if(!t)throw new Error("No provider found");let i=await(await fetch(`${this.config.metaTxBroadcasterEndpoint}/broadcast`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();if(i.status!=="success")throw new Error(`Could not send Metatransaction. Reason given: ${i.data.reason}`);if(!i.data?.txHash)throw new Error("Could not get transaction hash from broadcaster response");return t.getTransaction(i.data.txHash)}async waitForMetaTx(e){let t=await e.wait();return t.parsedLogs=jl(t.logs,this.contract.interface),t}tx(){return{send:async e=>{let t=await this.getTx(e);return[t,this.getMined.bind(this,t)]},mined:async e=>{let t=await this.getTx(e);return this.getMined(t)},encode:async()=>{let e=await this.getArgs();return this.contract.interface.encodeFunctionData(this.method,e)}}}};var{arrayify:f1,solidityKeccak256:c1,splitSignature:m1}=ne,Ua=class extends Ta{async sendMetaTransaction(e,t){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let a=this.config.getSigner(),{provider:i}=a;if(!i)throw new Error("No provider found");let r;this.config.network===Pn.Custom?r=1:r=(await i.getNetwork()).chainId;let s=await a.getAddress(),o=await this.contract.functions.getMetatransactionNonce(s),l=c1(["uint256","address","uint256","bytes"],[o.toString(),t,r,e]),p=f1(l),f=await a.signMessage(p),{r:x,s:I,v:_}=m1(f),v={target:t,payload:e,userAddress:s,r:x,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=(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}},ju=(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=_e.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 Ep=[{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 ne.Interface(Ep)}static connect(e,t){return new oe(e,Ep,t)}};Pi.abi=Ep;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 ne.Interface(Cp)}static connect(e,t){return new oe(e,Cp,t)}};Ni.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"}],Di=class{static createInterface(){return new ne.Interface(Ip)}static connect(e,t){return new oe(e,Ip,t)}};Di.abi=Ip;var Sp=[{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 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:[{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 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{AddressZero:w1}=ht,On=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Ba(On.extensionType),e.address);if(t===w1)throw new Error(`${On.extensionType} extension is not installed for this Colony`);let a=await Er(t,e.config.signerOrProvider);if(!wi(On.extensionType,a,e.version))throw new Error(`Version ${a} of the ${On.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=On.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${On.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new On(e,r,a)}static getLatestSupportedVersion(){return On.supportedVersions[On.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||_e.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[_]),I=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,I,x,s,_e.SkillIgnore]},async _=>({...te("OneTxPaymentMade",_)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Ba(Ae.OneTxPayment),t],async a=>({...te("ExtensionUpgraded",a)}))}},Va=On;Va.supportedVersions=[{version:3,factory:Oi},{version:4,factory:Bi},{version:5,factory:Fi}],Va.extensionType=Ae.OneTxPayment;var Bn=class{constructor(e,t){typeof t=="string"?this.tokenClient=vn.connect(t,e.config.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=>({...te("Transfer",a)}))}transferFrom(e,t,a){return this.colonyNetwork.createTxCreator(this.tokenClient,"transferFrom",[e,t,a],async i=>({...te("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=>({...te("Approval",a)}))}};var Us=class extends Bn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=Nn.connect(a,t.config.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=>({...te("LogSetAuthority",a)}))}setOwner(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setOwner",[t],async a=>({...te("LogSetOwner",a)}))}};var Vs=class extends Bn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=wn.connect(a,t.config.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=>({...te("Approval",i)}))}};var M6=async(n,e)=>{let t=await vp(e,n.config.signerOrProvider);switch(t.tokenClientType){case Dn.Colony:return new Us(n,t);case Dn.Erc20:return new Bn(n,t);case Dn.Erc2612:return new Vs(n,t);default:throw new Error("Your token is not supported in Colony SDK (yet).")}};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"},{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 ne.Interface(Np)}static connect(e,t){return new oe(e,Np,t)}};Li.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"},{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 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{AddressZero:Bp}=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===Bp)throw new Error(`${Fn.extensionType} extension is not installed for this Colony`);let a=await Er(t,e.config.signerOrProvider);if(!wi(Fn.extensionType,a,e.version))throw new Error(`Version ${a} of the ${Fn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Fn.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${Fn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new Fn(e,r,a)}static getLatestSupportedVersion(){return Fn.supportedVersions[Fn.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 ne.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=>({...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:a,value:i,branchMask:r,siblings:s}=await Cs(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),this.colony.reputation,this.votingReputationContract,e,Bp,Ol);return[e,t,Bp,Ol,a,i,r,s]},async t=>({...te("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.config.ipfs.uploadMetadata(Re.Decision,t),[e,a]},async a=>({...te("Annotation",a)}),{metadataType:Re.Decision})}approveStake(e,t=_e.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{...ju("UserTokenApproved",a,i.getInternalTokenLockingContract().interface)}})}stakeMotion(e,t,a){let i=async()=>{let r=await this.colony.config.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(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 I=await this.getMinStake(o,t);if(F.from(a).lt(I))throw new Error(`The staked amount is too small. Please stake at least ${Ul(I)}`);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),a,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 a=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.config.getSigner().getAddress(),{key:p,value:f,branchMask:x,siblings:I}=await this.colony.reputation.getReputationWithProofs(o,l,s),_=await this.createMotionSalt(e),v=ne.solidityKeccak256(["bytes","uint256"],[_,t]);return[e,v,p,f,x,I]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"submitVote",a,async i=>({...te("MotionVoteSubmitted",i)}))}revealVote(e,t){let a=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.config.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:I,value:_,branchMask:v,siblings:S}=p;return[e,f,F.from(x),I,_,v,S]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"revealVote",a,async i=>({...te("MotionVoteRevealed",i)}))}escalateMotion(e,t){let a=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.config.getSigner().getAddress(),p=await vi(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),t,r),{key:f,value:x,branchMask:I,siblings:_}=await this.colony.reputation.getReputationWithProofs(o,l,s);return[e,t,p,f,x,I,_]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"escalateMotion",a,async i=>({...te("MotionEscalated",i)}))}finalizeMotion(e){let t=async()=>{let a=await this.votingReputationContract.getMotionState(e);if(a!==zt.Finalizable)throw new Error(`Motion cannot be finalized. It's currently in "${zt[a]}" state`);return[e]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"finalizeMotion",t,async a=>({...te("MotionFinalized",a)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Ba(Ae.VotingReputation),t],async a=>({...te("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}}},ja=Fn;ja.supportedVersions=[{version:7,factory:Li},{version:8,factory:Ui},{version:9,factory:Vi}],ja.extensionType=Ae.VotingReputation;var M1={["motion"]:ja,["oneTx"]:Va},Dr=class{static async connect(e,t){let a=await Er(t,e.config.signerOrProvider),i=Dr.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.config.signerOrProvider),s=await r.getToken(),o=await M6(e,s),l=new Dr(e,r,o,a);return await l.updateExtensions(),l}static getLatestSupportedVersion(){return Dr.supportedVersions[Dr.supportedVersions.length-1].version}constructor(e,t,a,i){this.colony=t,this.colonyNetwork=e,this.config=e.config,this.address=t.address,this.ext={},this.reputation=new na(e.getInternalNetworkContract(),t,{customEndpointUrl:e.config.reputationOracleEndpoint}),this.token=a,this.version=i}createColonyTxCreator(e,t,a,i,r){return new Nr({colony:this,config:this.colonyNetwork.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createPermissionedColonyTxCreator(e,t,a,i,r,s){return new Nr({colony:this,config:this.colonyNetwork.config,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 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.config.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.config.ipfs.uploadMetadata(Re.Domain,e),[_e.RootDomain,t]},{roles:vt.Architecture,domain:_e.RootDomain},async t=>({...te("DomainAdded",t),...te("FundingPotAdded",t),...te("DomainMetadata",t)}),{metadataType:Re.Domain}):this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256)",[_e.RootDomain],{roles:vt.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.config.ipfs.uploadMetadata(Re.Domain,e),[_e.RootDomain,t]},{roles:vt.Architecture,domain:_e.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 a=>({...te("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=>({...te("ColonyFundsClaimed",a)}))}moveFundsToTeam(e,t,a,i){let r=_e.RootDomain,s=a||_e.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(),I=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,I,_,v,S,e,o]},async l=>({...te("ColonyFundsMovedBetweenFundingPots",l)}))}async getReputation(e,t=_e.RootDomain,a=3){let{skillId:i}=await this.colony.getDomain(t);return this.reputation.getReputationFraction(i,e,void 0,a)}async getReputationPoints(e,t=_e.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=>({...te("ArbitraryTransaction(address,address,bytes,bool)",a)}))}annotateTransaction(e,t){return this.createColonyTxCreator(this.colony,"annotateTransaction",async()=>{let a;return typeof t=="string"?a=t:a=await this.config.ipfs.uploadMetadata(Re.Annotation,t),[e,a]},async a=>({...te("Annotation",a)}),{metadataType:Re.Annotation})}installExtension(e){let t=M1[e],a=t.getLatestSupportedVersion(),{extensionType:i}=t;if(!wi(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",[Ba(i),t.getLatestSupportedVersion()],async s=>({...ju("ExtensionInstalled",s,r.interface)}))}async getRoles(e,t=_e.RootDomain){let a=await this.colony.getUserRoles(e,t);return su(a)}setRoles(e,t,a=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let i=await this.getRoles(e,a),r=Array.from(new Set([...i,...[].concat(t)])),s=Vl(r);return[e,a,s]},{roles:vt.Architecture,domain:a},async i=>({...te("ColonyRoleSet",i),...te("RecoveryRoleSet",i)}))}unsetRoles(e,t,a=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let r=(await this.getRoles(e,a)).filter(o=>![].concat(t).includes(o)),s=Vl(r);return[e,a,s]},{roles:vt.Architecture,domain:a},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 a=[],i=await t.getTokenLocking();return e?a=[...e,i]:a=[i],[this.token.address,this.address,a]},async a=>({...te("TokenAuthorityDeployed",a)}))}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 a=>({...te("ColonyUpgraded",a)}))}awardReputation(e,t,a=_e.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=>({...te("ArbitraryReputationUpdate",i)}))}smiteReputation(e,t,a=_e.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:vt.Arbitration},async i=>({...te("ArbitraryReputationUpdate",i)}))}},Or=Dr;Or.supportedVersions=[{version:11,factory:Pi},{version:12,factory:Ni},{version:13,factory:Di}];var{splitSignature:E1}=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,a]){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let i=this.contract.signer,{provider:r}=i;if(!r)throw new Error("No provider found");let s;this.config.network===Pn.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:a,nonce:l.toString(),deadline:f}),{r:I,s:_,v}=E1(x),S={target:e,owner:o,spender:t,value:a.toString(),deadline:f,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 js=class{constructor(e,t){this.address=t,this.colonyNetwork=e,this.tokenLockingContract=wp(this.address,e.config.signerOrProvider)}getInternalTokenLockingContract(){return this.tokenLockingContract}deposit(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"deposit(address,uint256,bool)",[e,t,!1],async a=>({...te("UserTokenDeposited",a)}))}withdraw(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"withdraw(address,uint256,bool)",[e,t,!1],async a=>({...te("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 Hs=class{constructor(e,t){let a=t?.network||Pn.ArbitrumOne;this.metaTxBroadcasterEndpoint=t?.metaTxBroadcasterEndpoint||ru[a],this.ipfs=new Pr(t?.ipfsAdapter),this.network=a,this.reputationOracleEndpoint=t?.reputationOracleEndpoint||Mr[a],this.signerOrProvider=e}getSigner(){if(!(this.signerOrProvider instanceof St))throw new Error("Need a signer to create a transaction");return this.signerOrProvider}};var{namehash:E6}=ne,{AddressZero:Fp}=ht,qs=class{constructor(e,t){this.config=new Hs(e,t),this.contract=Ri.connect(t?.customNetworkAddress||iu[this.config.network],e)}async getTokenLocking(){if(!this.locking){let e=await this.contract.getTokenLocking();this.locking=new js(this,e)}return this.locking}getInternalNetworkContract(){return this.contract}createTxCreator(e,t,a,i,r){return new Ta({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createMetaTxCreator(e,t,a,i,r){return new Ua({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createEip2612TxCreator(e,t,a,i,r){return new qu({config:this.config,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[Fp,e.name,e.symbol,e.decimals||18,0,t,""]}return[e,"","",0,0,t,""]};return a?this.createMetaTxCreator(this.contract,"createColonyForFrontend",async()=>{let r=await i();return typeof a=="string"?r[6]=a:r[6]=await this.config.ipfs.uploadMetadata(Re.Colony,a),r},async r=>({...te("TokenDeployed",r),...te("ColonyAdded",r),...te("TokenAuthorityDeployed",r)}),{metadataType:Re.Colony}):this.createMetaTxCreator(this.contract,"createColonyForFrontend",i,async r=>({...te("TokenDeployed",r),...te("ColonyAdded",r),...te("TokenAuthorityDeployed",r)}))}async getColony(e){return Or.connect(this,e)}async getMetaColony(){let e=await this.contract.getMetaColony();return this.getColony(e)}async getColonyLabel(e){let t=await this.contract.lookupRegisteredENSDomain(e);return t?t.replace(Ms[this.config.network],""):null}async getColonyAddress(e){let t=E6(`${e}${Ms[this.config.network]}`),a=await this.contract.addr(t);return a!==Fp?a:null}async getUsername(e){let t=await this.contract.lookupRegisteredENSDomain(e);return t?t.replace(Es[this.config.network],""):null}async getUserAddress(e){let t=E6(`${e}${Es[this.config.network]}`),a=await this.contract.addr(t);return a!==Fp?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.contract,"registerUserLabel",t,async a=>({...te("UserLabelRegistered",a)}))}deployToken(e,t,a=18){return this.createMetaTxCreator(this.contract,"deployTokenViaNetwork",[e,t,a],async i=>({...te("TokenDeployed",i)}))}};var{formatEther:C1,isAddress:I1}=ne,S1=new ea.JsonRpcProvider("http://127.0.0.1:8545"),R1=()=>new on("0x0355596cdb5e5242ad082c4fe3f8bbe48c9dba843fe1f99dd8272f487e70efae",S1),P1=async n=>{let e=R1(),i=await(await new qs(e,{customNetworkAddress:n,reputationOracleEndpoint:"http://localhost:3000"}).getMetaColony()).getBalance();return C1(i)},Up=document.querySelector("#address"),I6=document.querySelector("#button"),Vp=document.querySelector("#error"),S6=document.querySelector("#result");if(!Up||!I6||!Vp||!S6)throw new Error("Could not find all required HTML elements");var C6=n=>{Vp.innerText=n},N1=()=>{Vp.innerText=""},Lp=n=>{S6.innerText=n};I6.addEventListener("click",async()=>{N1();let n=Up.value;if(!I1(n))return C6("This is not a valid address");Lp("Thinking..."),Up.value="";let e;try{e=await P1(n),Lp(`${e} CLNY in root domain of local MetaColony`)}catch(t){C6(`Found an error: ${t.message}`),Lp("")}return null});})(); +`)}`,Yb=n=>({...n,isWhitelistActivated:n.isWhitelistActivated||!1,colonySafes:n.colonySafes||[],colonyTokens:n.colonyTokens||[],verifiedAddresses:n.verifiedAddresses||[]}),fp=(n,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&&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"?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 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),de=(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: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}})(n);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 a=w6(t.errors);throw new Error(a)};var _6=(n,e)=>{let t=n===Re.Colony?Yb(e):e,a=(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&&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"?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 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),de=(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: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}})({name:n,data:t,version:pp});if(!a.success){let i=w6(a.errors);throw new Error(i)}return a.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,k6.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]:""},Pr=class{adapter;constructor(e){this.adapter=e||new mp}static eventSupportsMetadata(e){return!!Object.keys(Bs).includes(e)}async getMetadata(e,t){let a=this.adapter.getIpfsUrl(e),r=await(await hp(a)).json();return fp(r,t)}async getMetadataForEvent(e,t){let a=this.adapter.getIpfsUrl(t),r=await(await hp(a)).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),a=await hp(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=_6(e,t),i=JSON.stringify(a);return this.adapter.uploadJson(i)}};var pM=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 ne.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 ne.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"}],Ci=class{static createInterface(){return new ne.Interface(gp)}static connect(e,t){return new oe(e,gp,t)}};xe(Ci,"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:"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:"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:[{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:"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:"returnData",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",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:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],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:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"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:[],name:"unlock",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"}],A6="0x60c060405234801561001057600080fd5b5060405161205738038061205783398101604081905261002f91610307565b60008060018161003d6101ab565b6001600160a01b031681526020810191909152604001600090812091909155556100656101ab565b600480546001600160a01b0319166001600160a01b039290921691909117905561008d6101ab565b6001600160a01b03167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a260066100ce8482610413565b5060056100db8382610413565b5060ff81166080526007805460ff1916600117905560405146907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f90610123906006906104d1565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051601f19818403018152919052805160209091012060a0525061054692505050565b60003633301480156101be575060348110155b1561024757600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e881146102365733935050505090565b5001516001600160a01b0316919050565b3391505090565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261027557600080fd5b81516001600160401b0381111561028e5761028e61024e565b604051601f8201601f19908116603f011681016001600160401b03811182821017156102bc576102bc61024e565b6040528181528382016020018510156102d457600080fd5b60005b828110156102f3576020818601810151838301820152016102d7565b506000918101602001919091529392505050565b60008060006060848603121561031c57600080fd5b83516001600160401b0381111561033257600080fd5b61033e86828701610264565b602086015190945090506001600160401b0381111561035c57600080fd5b61036886828701610264565b925050604084015160ff8116811461037f57600080fd5b809150509250925092565b600181811c9082168061039e57607f821691505b6020821081036103be57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561040e57806000526020600020601f840160051c810160208510156103eb5750805b601f840160051c820191505b8181101561040b57600081556001016103f7565b50505b505050565b81516001600160401b0381111561042c5761042c61024e565b6104408161043a845461038a565b846103c4565b6020601f821160018114610474576000831561045c5750848201515b600019600385901b1c1916600184901b17845561040b565b600084815260208120601f198516915b828110156104a45787850151825560209485019460019092019101610484565b50848210156104c25786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b60008083546104df8161038a565b6001821680156104f6576001811461050b5761053b565b60ff198316865281151582028601935061053b565b86600052602060002060005b8381101561053357815488820152600190910190602001610517565b505081860193505b509195945050505050565b60805160a051611ae5610572600039600081816102e10152610f870152600061029b0152611ae56000f3fe6080604052600436106101815760003560e01c80637a9e5e4b116100d1578063a69df4b51161008a578063bf7e214f11610064578063bf7e214f146104b1578063cf309012146104d1578063d505accf146104eb578063dd62ed3e1461050b57600080fd5b8063a69df4b51461047c578063a9059cbb14610491578063b3eac1d8146103b957600080fd5b80637a9e5e4b146103995780637ecebe00146103b95780638da5cb5b146103ef57806395d89b41146104275780639dc29fac1461043c578063a0712d681461045c57600080fd5b806330adf81f1161013e57806340c10f191161011857806340c10f191461030357806342966c68146103235780636281133d1461034357806370a082311461036357600080fd5b806330adf81f14610255578063313ce567146102895780633644e515146102cf57600080fd5b806306fdde0314610186578063095ea7b3146101b15780630c53c51c146101e157806313af4035146101f457806318160ddd1461021657806323b872dd14610235575b600080fd5b34801561019257600080fd5b5061019b610551565b6040516101a891906115b0565b60405180910390f35b3480156101bd57600080fd5b506101d16101cc3660046115d8565b6105df565b60405190151581526020016101a8565b61019b6101ef3660046116bf565b610672565b34801561020057600080fd5b5061021461020f366004611733565b610859565b005b34801561022257600080fd5b506000545b6040519081526020016101a8565b34801561024157600080fd5b506101d1610250366004611750565b6108dc565b34801561026157600080fd5b506102277f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b34801561029557600080fd5b506102bd7f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101a8565b3480156102db57600080fd5b506102277f000000000000000000000000000000000000000000000000000000000000000081565b34801561030f57600080fd5b5061021461031e3660046115d8565b610950565b34801561032f57600080fd5b5061021461033e366004611791565b610a3f565b34801561034f57600080fd5b506101d161035e3660046117aa565b610a53565b34801561036f57600080fd5b5061022761037e366004611733565b6001600160a01b031660009081526001602052604090205490565b3480156103a557600080fd5b506102146103b4366004611733565b610ba7565b3480156103c557600080fd5b506102276103d4366004611733565b6001600160a01b031660009081526008602052604090205490565b3480156103fb57600080fd5b5060045461040f906001600160a01b031681565b6040516001600160a01b0390911681526020016101a8565b34801561043357600080fd5b5061019b610c18565b34801561044857600080fd5b506102146104573660046115d8565b610c25565b34801561046857600080fd5b50610214610477366004611791565b610e1c565b34801561048857600080fd5b50610214610e54565b34801561049d57600080fd5b506101d16104ac3660046115d8565b610e87565b3480156104bd57600080fd5b5060035461040f906001600160a01b031681565b3480156104dd57600080fd5b506007546101d19060ff1681565b3480156104f757600080fd5b50610214610506366004611831565b610ea2565b34801561051757600080fd5b506102276105263660046118a0565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6006805461055e906118d9565b80601f016020809104026020016040519081016040528092919081815260200182805461058a906118d9565b80156105d75780601f106105ac576101008083540402835291602001916105d7565b820191906000526020600020905b8154815290600101906020018083116105ba57829003601f168201915b505050505081565b600081600260006105ee611191565b6001600160a01b0390811682526020808301939093526040918201600090812091881680825291909352912091909155610626611191565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161066091815260200190565b60405180910390a35060015b92915050565b60606106a186610697886001600160a01b031660009081526008602052604090205490565b4688888888610a53565b6107045760405162461bcd60e51b815260206004820152602960248201527f6d6574617472616e73616374696f6e2d7369676e65722d7369676e617475726560448201526805adad2e6dac2e8c6d60bb1b60648201526084015b60405180910390fd5b61070d86611234565b6000306001600160a01b0316867f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e88960405160200161074e93929190611913565b60408051601f19818403018152908290526107689161194c565b6000604051808303816000865af19150503d80600081146107a5576040519150601f19603f3d011682016040523d82523d6000602084013e6107aa565b606091505b50925090508061080d5760405162461bcd60e51b815260206004820152602860248201527f636f6c6f6e792d6d65746174782d66756e6374696f6e2d63616c6c2d756e737560448201526718d8d95cdcd99d5b60c21b60648201526084016106fb565b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b87610837611191565b8860405161084793929190611968565b60405180910390a15095945050505050565b610876610864611191565b6000356001600160e01b031916611260565b6108925760405162461bcd60e51b81526004016106fb9061199d565b600480546001600160a01b0319166001600160a01b0383169081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60075460009060ff161561093d576108f5610864611191565b61093d5760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b61094884848461133b565b949350505050565b61095b610864611191565b6109775760405162461bcd60e51b81526004016106fb9061199d565b6001600160a01b0382166000908152600160205260408120805483929061099f9084906119e1565b92505081905550806000808282546109b791906119e1565b90915550506040518181526001600160a01b038316907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a26040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b610a50610a4a611191565b82610c25565b50565b600080610ad088308989604051602001610a7094939291906119f4565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b6040805160008082526020820180845284905260ff87169282019290925260608101889052608081018790529192509060019060a0016020604051602081039080840390855afa158015610b28573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610b8b5760405162461bcd60e51b815260206004820152601f60248201527f636f6c6f6e792d6d65746174782d696e76616c69642d7369676e61747572650060448201526064016106fb565b6001600160a01b038a8116911614915050979650505050505050565b610bb2610864611191565b610bce5760405162461bcd60e51b81526004016106fb9061199d565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6005805461055e906118d9565b610c2d611191565b6001600160a01b0316826001600160a01b031614610d2d576001600160a01b03821660009081526002602052604081208291610c67611191565b6001600160a01b03166001600160a01b03168152602001908152602001600020541015610cd65760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03821660009081526002602052604081208291610cf8611191565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610d279190611a3a565b90915550505b6001600160a01b038216600090815260016020526040902054811115610d955760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b03821660009081526001602052604081208054839290610dbd908490611a3a565b9250508190555080600080828254610dd59190611a3a565b90915550506040518181526001600160a01b038316907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59060200160405180910390a25050565b610e27610864611191565b610e435760405162461bcd60e51b81526004016106fb9061199d565b610a50610e4e611191565b82610950565b610e5f610864611191565b610e7b5760405162461bcd60e51b81526004016106fb9061199d565b6007805460ff19169055565b6000610e9b610e94611191565b84846108dc565b9392505050565b60075460ff1615610f0057610eb8610864611191565b610f005760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b42841015610f505760405162461bcd60e51b815260206004820152601d60248201527f636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e6500000060448201526064016106fb565b6040805180820182526002815261190160f01b6020808301919091526001600160a01b038a166000908152600890915291822080547f0000000000000000000000000000000000000000000000000000000000000000917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c9188610fd983611a4d565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161103d93929190611a66565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa1580156110a8573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906110de5750886001600160a01b0316816001600160a01b0316145b61112a5760405162461bcd60e51b815260206004820152601e60248201527f636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e6174757265000060448201526064016106fb565b6001600160a01b038981166000818152600260209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b60003633301480156111a4575060348110155b1561122d57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e8811461121c5733935050505090565b5001516001600160a01b0316919050565b3391505090565b6001600160a01b038116600090815260086020526040812080549161125883611a4d565b919050555050565b6000306001600160a01b0384160361127a5750600161066c565b6004546001600160a01b03908116908416036112985750600161066c565b6003546001600160a01b03166112b05750600061066c565b60035460405163b700961360e01b81526001600160a01b0385811660048301523060248301526001600160e01b0319851660448301529091169063b700961390606401602060405180830381865afa158015611310573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113349190611a8d565b905061066c565b6000611345611191565b6001600160a01b0316846001600160a01b031614611445576001600160a01b0384166000908152600260205260408120839161137f611191565b6001600160a01b03166001600160a01b031681526020019081526020016000205410156113ee5760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03841660009081526002602052604081208391611410611191565b6001600160a01b03166001600160a01b03168152602001908152602001600020600082825461143f9190611a3a565b90915550505b6001600160a01b0384166000908152600160205260409020548211156114ad5760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b038416600090815260016020526040812080548492906114d5908490611a3a565b90915550506001600160a01b038316600090815260016020526040812080548492906115029084906119e1565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161154e91815260200190565b60405180910390a35060019392505050565b60005b8381101561157b578181015183820152602001611563565b50506000910152565b6000815180845261159c816020860160208601611560565b601f01601f19169290920160200192915050565b602081526000610e9b6020830184611584565b6001600160a01b0381168114610a5057600080fd5b600080604083850312156115eb57600080fd5b82356115f6816115c3565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261162b57600080fd5b813567ffffffffffffffff81111561164557611645611604565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561167457611674611604565b60405281815283820160200185101561168c57600080fd5b816020850160208301376000918101602001919091529392505050565b803560ff811681146116ba57600080fd5b919050565b600080600080600060a086880312156116d757600080fd5b85356116e2816115c3565b9450602086013567ffffffffffffffff8111156116fe57600080fd5b61170a8882890161161a565b9450506040860135925060608601359150611727608087016116a9565b90509295509295909350565b60006020828403121561174557600080fd5b8135610e9b816115c3565b60008060006060848603121561176557600080fd5b8335611770816115c3565b92506020840135611780816115c3565b929592945050506040919091013590565b6000602082840312156117a357600080fd5b5035919050565b600080600080600080600060e0888a0312156117c557600080fd5b87356117d0816115c3565b96506020880135955060408801359450606088013567ffffffffffffffff8111156117fa57600080fd5b6118068a828b0161161a565b9450506080880135925060a0880135915061182360c089016116a9565b905092959891949750929550565b600080600080600080600060e0888a03121561184c57600080fd5b8735611857816115c3565b96506020880135611867816115c3565b95506040880135945060608801359350611883608089016116a9565b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156118b357600080fd5b82356118be816115c3565b915060208301356118ce816115c3565b809150509250929050565b600181811c908216806118ed57607f821691505b60208210810361190d57634e487b7160e01b600052602260045260246000fd5b50919050565b60008451611925818460208901611560565b919091019283525060601b6bffffffffffffffffffffffff19166020820152603401919050565b6000825161195e818460208701611560565b9190910192915050565b6001600160a01b0384811682528316602082015260606040820181905260009061199490830184611584565b95945050505050565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561066c5761066c6119cb565b8481526bffffffffffffffffffffffff198460601b16602082015282603482015260008251611a2a816054850160208701611560565b9190910160540195945050505050565b8181038181111561066c5761066c6119cb565b600060018201611a5f57611a5f6119cb565b5060010190565b60008451611a78818460208901611560565b91909101928352506020820152604001919050565b600060208284031215611a9f57600080fd5b81518015158114610e9b57600080fdfea264697066735822122090928a66070125904780390eb49d45fe12c136aec641b1db69316e0ffefc6da764736f6c634300081b0033",t1=n=>n.length>1,Nn=class extends ci{constructor(...e){t1(e)?super(...e):super(ju,A6,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 ne.Interface(ju)}static connect(e,t){return new oe(e,ju,t)}};xe(Nn,"bytecode",A6),xe(Nn,"abi",ju);var Tp=[{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:"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:"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:[{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:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",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:"_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:"_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:"returnData",type:"bytes"}],stateMutability:"payable",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:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"",type:"address"}],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"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",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:"_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:"_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:"_token",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"incrementLockCounterTo",outputs:[],stateMutability:"nonpayable",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:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"pure",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetwork",type:"address"}],name:"setColonyNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",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:"_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:"_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:"_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:"_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"}],Ii=class{static createInterface(){return new ne.Interface(Tp)}static connect(e,t){return new oe(e,Tp,t)}};xe(Ii,"abi",Tp);var Si;(function(n){n.TokenClient="TokenClient",n.TokenLockingClient="TokenLockingClient"})(Si||(Si={}));var Dn;(function(n){n.Colony="Colony",n.ColonyLegacy="ColonyLegacy",n.Erc20="Erc20",n.Erc2612="Erc2612",n.Sai="Sai"})(Dn||(Dn={}));var{AddressZero:r1}=ht;async function s1(n){try{await n.authority();return}catch{throw new Error("Token can not be assigned a TokenAuthority")}}var o1=async(n,e)=>{let t,a=!0,i=!0;t=Nn.connect(n,e);try{await t.totalSupply()}catch(r){throw new Error(`Token is probably not a valid ERC20 token, got ${r.message}`)}try{await t.locked(),await s1(t)}catch{a=!1}try{await t.nonces(r1)}catch{i=!1}return a?t.tokenClientType=Dn.Colony:i?(t=wn.connect(n,e),t.tokenClientType=Dn.Erc2612):(t=vn.connect(n,e),t.tokenClientType=Dn.Erc20),t.clientType=Si.TokenClient,t},vp=o1;var u1=(n,e)=>{let t=Ii.connect(n,e);return t.clientType=Si.TokenLockingClient,t},wp=u1;var{AddressZero:_p}=ht,d1=vn.connect(_p,new ea.BaseProvider(3656691)).interface,l1=Ci.connect(_p,new ea.BaseProvider(3656691)).interface,p1=wn.connect(_p,new ea.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"},{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:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{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:"returnData",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:"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:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"}],Fs=class{static createInterface(){return new ne.Interface(kp)}static connect(e,t){return new oe(e,kp,t)}};Fs.abi=kp;var Ap=[{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:"returnData",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"}],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:"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:!1,internalType:"address",name:"bridgeAddress",type:"address"}],name:"BridgeSet",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:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateSentToBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateStoredFromBridge",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:"uint256",name:"skillId",type:"uint256"}],name:"SkillAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillCreationStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillStoredFromBridge",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:[{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"address",name:"_resolver",type:"address"}],name:"addColonyVersion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_resolver",type:"address"}],name:"addExtensionToNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"addPendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPendingSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"addReputationUpdateLogFromBridge",outputs:[],stateMutability:"nonpayable",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:"_parentSkillId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"addSkillFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",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:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"chainId",type:"uint256"}],name:"bridgeCurrentRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"bridgePendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"skillId",type:"uint256"}],name:"bridgeSkillIfNotMiningChain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"burnUnneededRewards",outputs:[],stateMutability:"nonpayable",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:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"}],name:"claimMiningReward",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:"address",name:"_tokenAddress",type:"address"}],name:"createMetaColony",outputs:[],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:"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:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateExtension",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:"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:"returnData",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"getBridgedReputationUpdateCount",outputs:[{internalType:"uint256",name:"bridgedReputationCount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"}],name:"getBridgedSkillCounts",outputs:[{internalType:"uint256",name:"skillCount",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:"uint256",name:"_id",type:"uint256"}],name:"getColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyBridgeAddress",outputs:[{internalType:"address",name:"bridge",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCreationSalt",outputs:[{internalType:"bytes32",name:"salt",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"}],name:"getColonyVersionResolver",outputs:[{internalType:"address",name:"_resolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentColonyVersion",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getENSRegistrar",outputs:[{internalType:"address",name:"_address",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:[{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:[],name:"getFeeInverse",outputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMetaColony",outputs:[{internalType:"address payable",name:"_colonyAddress",type:"address"}],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:"getMiningChainId",outputs:[{internalType:"uint256",name:"reputationMiningChainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"}],name:"getMiningDelegator",outputs:[{internalType:"address",name:"_delegator",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiningResolver",outputs:[{internalType:"address",name:"miningResolverAddress",type:"address"}],stateMutability:"view",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:"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:"address",name:"_token",type:"address"}],name:"getPayoutWhitelist",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"getPendingReputationUpdate",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:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.PendingReputationUpdate",name:"update",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"getPendingSkillAddition",outputs:[{internalType:"uint256",name:"parentId",type:"uint256"}],stateMutability:"view",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:"_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:[{internalType:"bool",name:"_active",type:"bool"}],name:"getReputationMiningCycle",outputs:[{internalType:"address",name:"_repMiningCycleAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningCycleReward",outputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningSkillId",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"view",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:"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_deprecated",type:"bool"}],internalType:"struct ColonyNetworkDataTypes.Skill",name:"_skill",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSkillCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTokenLocking",outputs:[{internalType:"address",name:"_lockingAddress",type:"address"}],stateMutability:"view",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:"miningChainId",type:"uint256"},{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"}],name:"initialiseReputationMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[{internalType:"uint256",name:"_rootLocalSkillId",type:"uint256"}],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:"address",name:"_colony",type:"address"}],name:"isColony",outputs:[{internalType:"bool",name:"_addressIsColony",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],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:"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:"_stakers",type:"address[]"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"punishStakers",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:"_username",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerUserLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_bridgeAddress",type:"address"}],name:"setColonyBridgeAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],name:"setFeeInverse",outputs:[],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:"_miningResolverAddress",type:"address"}],name:"setMiningResolver",outputs:[],stateMutability:"nonpayable",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:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",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:"uint256",name:"_amount",type:"uint256"}],name:"setReputationMiningCycleReward",outputs:[],stateMutability:"nonpayable",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:[{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"},{internalType:"uint256",name:"nonce",type:"uint256"}],name:"setReputationRootHashFromBridge",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:"address",name:"_tokenLockingAddress",type:"address"}],name:"setTokenLocking",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:"uint256",name:"_amount",type:"uint256"}],name:"stakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"startNextCycle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"startTokenAuction",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:"bytes32",name:"_extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"unstakeForMining",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:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"}],Ri=class{static createInterface(){return new ne.Interface(Mp)}static connect(e,t){return new oe(e,Mp,t)}};Ri.abi=Mp;var Ta=class{constructor({contract:e,config:t,method:a,args:i,eventData:r,txConfig:s}){this.config=t,this.contract=e,this.method=a,this.args=i,this.eventData=r,this.txConfig=s}async getArgs(e){let t=[];return typeof this.args=="function"?t=await this.args():t=this.args,e&&t.push(e),t}async getTx(e){let t=await this.getArgs(e);return await this.contract.functions[this.method].apply(this.contract,t)}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.config.ipfs.getMetadataForEvent.bind(this.config.ipfs,Bs[this.txConfig.metadataType],t.metadata);return[t,e,a]}return[t,e]}return[{},e]}async broadcastMetaTx(e){let{provider:t}=this.config.getSigner();if(!t)throw new Error("No provider found");let i=await(await fetch(`${this.config.metaTxBroadcasterEndpoint}/broadcast`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();if(i.status!=="success")throw new Error(`Could not send Metatransaction. Reason given: ${i.data.reason}`);if(!i.data?.txHash)throw new Error("Could not get transaction hash from broadcaster response");return t.getTransaction(i.data.txHash)}async waitForMetaTx(e){let t=await e.wait();return t.parsedLogs=jl(t.logs,this.contract.interface),t}tx(){return{send:async e=>{let t=await this.getTx(e);return[t,this.getMined.bind(this,t)]},mined:async e=>{let t=await this.getTx(e);return this.getMined(t)},encode:async()=>{let e=await this.getArgs();return this.contract.interface.encodeFunctionData(this.method,e)}}}};var{arrayify:f1,solidityKeccak256:c1,splitSignature:m1}=ne,Ua=class extends Ta{async sendMetaTransaction(e,t){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let a=this.config.getSigner(),{provider:i}=a;if(!i)throw new Error("No provider found");let r;this.config.network===Pn.Custom?r=1:r=(await i.getNetwork()).chainId;let s=await a.getAddress(),o=await this.contract.functions.getMetatransactionNonce(s),l=c1(["uint256","address","uint256","bytes"],[o.toString(),t,r,e]),p=f1(l),f=await a.signMessage(p),{r:x,s:I,v:_}=m1(f),v={target:t,payload:e,userAddress:s,r:x,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=(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}},Hu=(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=_e.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 Ep=[{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 ne.Interface(Ep)}static connect(e,t){return new oe(e,Ep,t)}};Pi.abi=Ep;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 ne.Interface(Cp)}static connect(e,t){return new oe(e,Cp,t)}};Ni.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"}],Di=class{static createInterface(){return new ne.Interface(Ip)}static connect(e,t){return new oe(e,Ip,t)}};Di.abi=Ip;var Sp=[{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 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:[{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 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{AddressZero:w1}=ht,On=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Ba(On.extensionType),e.address);if(t===w1)throw new Error(`${On.extensionType} extension is not installed for this Colony`);let a=await Er(t,e.config.signerOrProvider);if(!wi(On.extensionType,a,e.version))throw new Error(`Version ${a} of the ${On.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=On.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${On.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new On(e,r,a)}static getLatestSupportedVersion(){return On.supportedVersions[On.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||_e.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[_]),I=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,I,x,s,_e.SkillIgnore]},async _=>({...te("OneTxPaymentMade",_)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Ba(Ae.OneTxPayment),t],async a=>({...te("ExtensionUpgraded",a)}))}},Va=On;Va.supportedVersions=[{version:3,factory:Oi},{version:4,factory:Bi},{version:5,factory:Fi}],Va.extensionType=Ae.OneTxPayment;var Bn=class{constructor(e,t){typeof t=="string"?this.tokenClient=vn.connect(t,e.config.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=>({...te("Transfer",a)}))}transferFrom(e,t,a){return this.colonyNetwork.createTxCreator(this.tokenClient,"transferFrom",[e,t,a],async i=>({...te("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=>({...te("Approval",a)}))}};var Us=class extends Bn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=Nn.connect(a,t.config.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=>({...te("LogSetAuthority",a)}))}setOwner(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setOwner",[t],async a=>({...te("LogSetOwner",a)}))}};var Vs=class extends Bn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=wn.connect(a,t.config.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=>({...te("Approval",i)}))}};var M6=async(n,e)=>{let t=await vp(e,n.config.signerOrProvider);switch(t.tokenClientType){case Dn.Colony:return new Us(n,t);case Dn.Erc20:return new Bn(n,t);case Dn.Erc2612:return new Vs(n,t);default:throw new Error("Your token is not supported in Colony SDK (yet).")}};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"},{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 ne.Interface(Np)}static connect(e,t){return new oe(e,Np,t)}};Li.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"},{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 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{AddressZero:Bp}=ht;var qu=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===Bp)throw new Error(`${Fn.extensionType} extension is not installed for this Colony`);let a=await Er(t,e.config.signerOrProvider);if(!wi(Fn.extensionType,a,e.version))throw new Error(`Version ${a} of the ${Fn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Fn.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${Fn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new Fn(e,r,a)}static getLatestSupportedVersion(){return Fn.supportedVersions[Fn.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 ne.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=>({...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:a,value:i,branchMask:r,siblings:s}=await Cs(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),this.colony.reputation,this.votingReputationContract,e,Bp,Bl);return[e,t,Bp,Bl,a,i,r,s]},async t=>({...te("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.config.ipfs.uploadMetadata(Re.Decision,t),[e,a]},async a=>({...te("Annotation",a)}),{metadataType:Re.Decision})}approveStake(e,t=_e.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{...Hu("UserTokenApproved",a,i.getInternalTokenLockingContract().interface)}})}stakeMotion(e,t,a){let i=async()=>{let r=await this.colony.config.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(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 I=await this.getMinStake(o,t);if(F.from(a).lt(I))throw new Error(`The staked amount is too small. Please stake at least ${Ul(I)}`);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),a,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 a=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.config.getSigner().getAddress(),{key:p,value:f,branchMask:x,siblings:I}=await this.colony.reputation.getReputationWithProofs(o,l,s),_=await this.createMotionSalt(e),v=ne.solidityKeccak256(["bytes","uint256"],[_,t]);return[e,v,p,f,x,I]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"submitVote",a,async i=>({...te("MotionVoteSubmitted",i)}))}revealVote(e,t){let a=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.config.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:I,value:_,branchMask:v,siblings:S}=p;return[e,f,F.from(x),I,_,v,S]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"revealVote",a,async i=>({...te("MotionVoteRevealed",i)}))}escalateMotion(e,t){let a=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.config.getSigner().getAddress(),p=await vi(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),t,r),{key:f,value:x,branchMask:I,siblings:_}=await this.colony.reputation.getReputationWithProofs(o,l,s);return[e,t,p,f,x,I,_]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"escalateMotion",a,async i=>({...te("MotionEscalated",i)}))}finalizeMotion(e){let t=async()=>{let a=await this.votingReputationContract.getMotionState(e);if(a!==zt.Finalizable)throw new Error(`Motion cannot be finalized. It's currently in "${zt[a]}" state`);return[e]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"finalizeMotion",t,async a=>({...te("MotionFinalized",a)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Ba(Ae.VotingReputation),t],async a=>({...te("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}}},ja=Fn;ja.supportedVersions=[{version:7,factory:Li},{version:8,factory:Ui},{version:9,factory:Vi}],ja.extensionType=Ae.VotingReputation;var M1={["motion"]:ja,["oneTx"]:Va},Dr=class{static async connect(e,t){let a=await Er(t,e.config.signerOrProvider),i=Dr.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.config.signerOrProvider),s=await r.getToken(),o=await M6(e,s),l=new Dr(e,r,o,a);return await l.updateExtensions(),l}static getLatestSupportedVersion(){return Dr.supportedVersions[Dr.supportedVersions.length-1].version}constructor(e,t,a,i){this.colony=t,this.colonyNetwork=e,this.config=e.config,this.address=t.address,this.ext={},this.reputation=new na(e.getInternalNetworkContract(),t,{customEndpointUrl:e.config.reputationOracleEndpoint}),this.token=a,this.version=i}createColonyTxCreator(e,t,a,i,r){return new Nr({colony:this,config:this.colonyNetwork.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createPermissionedColonyTxCreator(e,t,a,i,r,s){return new Nr({colony:this,config:this.colonyNetwork.config,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 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.config.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.config.ipfs.uploadMetadata(Re.Domain,e),[_e.RootDomain,t]},{roles:vt.Architecture,domain:_e.RootDomain},async t=>({...te("DomainAdded",t),...te("FundingPotAdded",t),...te("DomainMetadata",t)}),{metadataType:Re.Domain}):this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256)",[_e.RootDomain],{roles:vt.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.config.ipfs.uploadMetadata(Re.Domain,e),[_e.RootDomain,t]},{roles:vt.Architecture,domain:_e.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 a=>({...te("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=>({...te("ColonyFundsClaimed",a)}))}moveFundsToTeam(e,t,a,i){let r=_e.RootDomain,s=a||_e.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(),I=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,I,_,v,S,e,o]},async l=>({...te("ColonyFundsMovedBetweenFundingPots",l)}))}async getReputation(e,t=_e.RootDomain,a=3){let{skillId:i}=await this.colony.getDomain(t);return this.reputation.getReputationFraction(i,e,void 0,a)}async getReputationPoints(e,t=_e.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=>({...te("ArbitraryTransaction(address,address,bytes,bool)",a)}))}annotateTransaction(e,t){return this.createColonyTxCreator(this.colony,"annotateTransaction",async()=>{let a;return typeof t=="string"?a=t:a=await this.config.ipfs.uploadMetadata(Re.Annotation,t),[e,a]},async a=>({...te("Annotation",a)}),{metadataType:Re.Annotation})}installExtension(e){let t=M1[e],a=t.getLatestSupportedVersion(),{extensionType:i}=t;if(!wi(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",[Ba(i),t.getLatestSupportedVersion()],async s=>({...Hu("ExtensionInstalled",s,r.interface)}))}async getRoles(e,t=_e.RootDomain){let a=await this.colony.getUserRoles(e,t);return ou(a)}setRoles(e,t,a=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let i=await this.getRoles(e,a),r=Array.from(new Set([...i,...[].concat(t)])),s=Vl(r);return[e,a,s]},{roles:vt.Architecture,domain:a},async i=>({...te("ColonyRoleSet",i),...te("RecoveryRoleSet",i)}))}unsetRoles(e,t,a=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let r=(await this.getRoles(e,a)).filter(o=>![].concat(t).includes(o)),s=Vl(r);return[e,a,s]},{roles:vt.Architecture,domain:a},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 a=[],i=await t.getTokenLocking();return e?a=[...e,i]:a=[i],[this.token.address,this.address,a]},async a=>({...te("TokenAuthorityDeployed",a)}))}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 a=>({...te("ColonyUpgraded",a)}))}awardReputation(e,t,a=_e.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=>({...te("ArbitraryReputationUpdate",i)}))}smiteReputation(e,t,a=_e.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:vt.Arbitration},async i=>({...te("ArbitraryReputationUpdate",i)}))}},Or=Dr;Or.supportedVersions=[{version:11,factory:Pi},{version:12,factory:Ni},{version:13,factory:Di}];var{splitSignature:E1}=ne,Gu=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,a]){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let i=this.contract.signer,{provider:r}=i;if(!r)throw new Error("No provider found");let s;this.config.network===Pn.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:a,nonce:l.toString(),deadline:f}),{r:I,s:_,v}=E1(x),S={target:e,owner:o,spender:t,value:a.toString(),deadline:f,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 js=class{constructor(e,t){this.address=t,this.colonyNetwork=e,this.tokenLockingContract=wp(this.address,e.config.signerOrProvider)}getInternalTokenLockingContract(){return this.tokenLockingContract}deposit(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"deposit(address,uint256,bool)",[e,t,!1],async a=>({...te("UserTokenDeposited",a)}))}withdraw(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"withdraw(address,uint256,bool)",[e,t,!1],async a=>({...te("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 Hs=class{constructor(e,t){let a=t?.network||Pn.ArbitrumOne;this.metaTxBroadcasterEndpoint=t?.metaTxBroadcasterEndpoint||ru[a],this.ipfs=new Pr(t?.ipfsAdapter),this.network=a,this.reputationOracleEndpoint=t?.reputationOracleEndpoint||Mr[a],this.signerOrProvider=e}getSigner(){if(!(this.signerOrProvider instanceof St))throw new Error("Need a signer to create a transaction");return this.signerOrProvider}};var{namehash:E6}=ne,{AddressZero:Fp}=ht,qs=class{constructor(e,t){this.config=new Hs(e,t),this.contract=Ri.connect(t?.customNetworkAddress||iu[this.config.network],e)}async getTokenLocking(){if(!this.locking){let e=await this.contract.getTokenLocking();this.locking=new js(this,e)}return this.locking}getInternalNetworkContract(){return this.contract}createTxCreator(e,t,a,i,r){return new Ta({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createMetaTxCreator(e,t,a,i,r){return new Ua({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createEip2612TxCreator(e,t,a,i,r){return new Gu({config:this.config,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[Fp,e.name,e.symbol,e.decimals||18,0,t,""]}return[e,"","",0,0,t,""]};return a?this.createMetaTxCreator(this.contract,"createColonyForFrontend",async()=>{let r=await i();return typeof a=="string"?r[6]=a:r[6]=await this.config.ipfs.uploadMetadata(Re.Colony,a),r},async r=>({...te("TokenDeployed",r),...te("ColonyAdded",r),...te("TokenAuthorityDeployed",r)}),{metadataType:Re.Colony}):this.createMetaTxCreator(this.contract,"createColonyForFrontend",i,async r=>({...te("TokenDeployed",r),...te("ColonyAdded",r),...te("TokenAuthorityDeployed",r)}))}async getColony(e){return Or.connect(this,e)}async getMetaColony(){let e=await this.contract.getMetaColony();return this.getColony(e)}async getColonyLabel(e){let t=await this.contract.lookupRegisteredENSDomain(e);return t?t.replace(Ms[this.config.network],""):null}async getColonyAddress(e){let t=E6(`${e}${Ms[this.config.network]}`),a=await this.contract.addr(t);return a!==Fp?a:null}async getUsername(e){let t=await this.contract.lookupRegisteredENSDomain(e);return t?t.replace(Es[this.config.network],""):null}async getUserAddress(e){let t=E6(`${e}${Es[this.config.network]}`),a=await this.contract.addr(t);return a!==Fp?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.contract,"registerUserLabel",t,async a=>({...te("UserLabelRegistered",a)}))}deployToken(e,t,a=18){return this.createMetaTxCreator(this.contract,"deployTokenViaNetwork",[e,t,a],async i=>({...te("TokenDeployed",i)}))}};var{formatEther:C1,isAddress:I1}=ne,S1=new ea.JsonRpcProvider("http://127.0.0.1:8545"),R1=()=>new on("0x0355596cdb5e5242ad082c4fe3f8bbe48c9dba843fe1f99dd8272f487e70efae",S1),P1=async n=>{let e=R1(),i=await(await new qs(e,{customNetworkAddress:n,reputationOracleEndpoint:"http://localhost:3000"}).getMetaColony()).getBalance();return C1(i)},Up=document.querySelector("#address"),I6=document.querySelector("#button"),Vp=document.querySelector("#error"),S6=document.querySelector("#result");if(!Up||!I6||!Vp||!S6)throw new Error("Could not find all required HTML elements");var C6=n=>{Vp.innerText=n},N1=()=>{Vp.innerText=""},Lp=n=>{S6.innerText=n};I6.addEventListener("click",async()=>{N1();let n=Up.value;if(!I1(n))return C6("This is not a valid address");Lp("Thinking..."),Up.value="";let e;try{e=await P1(n),Lp(`${e} CLNY in root domain of local MetaColony`)}catch(t){C6(`Found an error: ${t.message}`),Lp("")}return null});})(); /** * [js-sha3]{@link https://github.com/emn178/js-sha3} * diff --git a/local-motions.js b/local-motions.js index 7b7d117d3..be7650643 100644 --- a/local-motions.js +++ b/local-motions.js @@ -1,12 +1,12 @@ -"use strict";(()=>{var nh=Object.create;var Zs=Object.defineProperty;var ah=Object.getOwnPropertyDescriptor;var ih=Object.getOwnPropertyNames;var rh=Object.getPrototypeOf,sh=Object.prototype.hasOwnProperty;var oh=(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),Ki=(n,e)=>{for(var t in e)Zs(n,t,{get:e[t],enumerable:!0})},uh=(n,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of ih(e))!sh.call(n,i)&&i!==t&&Zs(n,i,{get:()=>e[i],enumerable:!(a=ah(e,i))||a.enumerable});return n};var Cn=(n,e,t)=>(t=n!=null?nh(rh(n)):{},uh(e||!n||!n.__esModule?Zs(t,"default",{value:n,enumerable:!0}):t,n));var be=(n,e,t)=>(oh(n,typeof e!="symbol"?e+"":e,t),t);var Zp=ae(()=>{});var hd=ae((ey,md)=>{(function(n,e){"use strict";function t(C,u){if(!C)throw new Error(u||"Assertion failed")}function a(C,u){C.super_=u;var y=function(){};y.prototype=u.prototype,C.prototype=new y,C.prototype.constructor=C}function i(C,u,y){if(i.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=i:e.BN=i,i.BN=i,i.wordSize=26;var r;try{typeof window<"u"&&typeof window.Buffer<"u"?r=window.Buffer:r=Zp().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(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 b=s(C,y);return y-1>=u&&(b|=s(C,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(C,u,y,b){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()},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"],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];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=I[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(C){for(var u=new Array(C.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-C.length+1);P<=c;P++){var D=d-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[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,Y=ee&8191,Q=ee>>>13,mt=w[3]|0,Z=mt&8191,le=mt>>>13,$a=w[4]|0,Be=$a&8191,Fe=$a>>>13,Qa=w[5]|0,Le=Qa&8191,Ue=Qa>>>13,Ya=w[6]|0,Ve=Ya&8191,je=Ya>>>13,Xa=w[7]|0,He=Xa&8191,qe=Xa>>>13,Za=w[8]|0,Ge=Za&8191,ze=Za>>>13,ei=w[9]|0,We=ei&8191,Ke=ei>>>13,ti=A[0]|0,Je=ti&8191,$e=ti>>>13,ni=A[1]|0,Qe=ni&8191,Ye=ni>>>13,ai=A[2]|0,Xe=ai&8191,Ze=ai>>>13,ii=A[3]|0,et=ii&8191,tt=ii>>>13,ri=A[4]|0,nt=ri&8191,at=ri>>>13,si=A[5]|0,it=si&8191,rt=si>>>13,oi=A[6]|0,st=oi&8191,ot=oi>>>13,ui=A[7]|0,ut=ui&8191,dt=ui>>>13,di=A[8]|0,lt=di&8191,pt=di>>>13,li=A[9]|0,yt=li&8191,ft=li>>>13;b.negative=u.negative^y.negative,b.length=19,g=Math.imul(c,Je),d=Math.imul(c,$e),d=d+Math.imul(P,Je)|0,m=Math.imul(P,$e);var Ca=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Ca>>>26)|0,Ca&=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(c,Qe)|0,d=d+Math.imul(c,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(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(c,Xe)|0,d=d+Math.imul(c,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(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 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(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 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(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,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(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,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(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,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,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(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(We,Je),d=Math.imul(We,$e),d=d+Math.imul(Ke,Je)|0,m=Math.imul(Ke,$e),g=g+Math.imul(Ge,Qe)|0,d=d+Math.imul(Ge,Ye)|0,d=d+Math.imul(ze,Qe)|0,m=m+Math.imul(ze,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(c,yt)|0,d=d+Math.imul(c,ft)|0,d=d+Math.imul(P,yt)|0,m=m+Math.imul(P,ft)|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(Ge,Xe)|0,d=d+Math.imul(Ge,Ze)|0,d=d+Math.imul(ze,Xe)|0,m=m+Math.imul(ze,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,ft)|0,d=d+Math.imul(K,yt)|0,m=m+Math.imul(K,ft)|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(Ge,et)|0,d=d+Math.imul(Ge,tt)|0,d=d+Math.imul(ze,et)|0,m=m+Math.imul(ze,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,ft)|0,d=d+Math.imul(Q,yt)|0,m=m+Math.imul(Q,ft)|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(Ge,nt)|0,d=d+Math.imul(Ge,at)|0,d=d+Math.imul(ze,nt)|0,m=m+Math.imul(ze,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,ft)|0,d=d+Math.imul(le,yt)|0,m=m+Math.imul(le,ft)|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(Ge,it)|0,d=d+Math.imul(Ge,rt)|0,d=d+Math.imul(ze,it)|0,m=m+Math.imul(ze,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,ft)|0,d=d+Math.imul(Fe,yt)|0,m=m+Math.imul(Fe,ft)|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(Ge,st)|0,d=d+Math.imul(Ge,ot)|0,d=d+Math.imul(ze,st)|0,m=m+Math.imul(ze,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,ft)|0,d=d+Math.imul(Ue,yt)|0,m=m+Math.imul(Ue,ft)|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(Ge,ut)|0,d=d+Math.imul(Ge,dt)|0,d=d+Math.imul(ze,ut)|0,m=m+Math.imul(ze,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,ft)|0,d=d+Math.imul(je,yt)|0,m=m+Math.imul(je,ft)|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(Ge,lt)|0,d=d+Math.imul(Ge,pt)|0,d=d+Math.imul(ze,lt)|0,m=m+Math.imul(ze,pt)|0,g=g+Math.imul(He,yt)|0,d=d+Math.imul(He,ft)|0,d=d+Math.imul(qe,yt)|0,m=m+Math.imul(qe,ft)|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(Ge,yt)|0,d=d+Math.imul(Ge,ft)|0,d=d+Math.imul(ze,yt)|0,m=m+Math.imul(ze,ft)|0;var fd=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(fd>>>26)|0,fd&=67108863,g=Math.imul(We,yt),d=Math.imul(We,ft),d=d+Math.imul(Ke,yt)|0,m=Math.imul(Ke,ft);var cd=(k+g|0)+((d&8191)<<13)|0;return k=(m+(d>>>13)|0)+(cd>>>26)|0,cd&=67108863,h[0]=Ca,h[1]=Ia,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]=fd,h[18]=cd,k!==0&&(h[19]=k,b.length++),b};Math.imul||(O=L);function U(C,u,y){y.negative=u.negative^C.negative,y.length=C.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(C,u,y){return U(C,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(C,u){this.x=C,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 $(C,u){this.name=C,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(C){if(typeof C=="string"){var u=i._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 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(C){q.call(this,C),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,ey)});var Ay=ae((Zg,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(""),f=[31,7936,2031616,520093696],x=[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};(a.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(c){return Object.prototype.toString.call(c)==="[object Array]"}),l&&(a.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,Y){return u["cshake"+c].update(V,K,ee,Y)[D]()}},de=function(c,P,D){return function(V,K,ee,Y){return u["kmac"+c].update(V,K,ee,Y)[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(n);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(n)}else throw new Error(n);P=!0}for(var V=this.blocks,K=this.byteCount,ee=c.length,Y=this.blockCount,Q=0,mt=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[Y],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(n);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(n)}else throw new Error(n);P=!0}var V=0,K=c.length;if(P)V=K;else for(var ee=0;ee=57344?V+=3:(Y=65536+((Y&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],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 c=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%c===0&&G(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(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,Y,Q,mt,Z,le,$a,Be,Fe,Qa,Le,Ue,Ya,Ve,je,Xa,He,qe,Za,Ge,ze,ei,We,Ke,ti,Je,$e,ni,Qe,Ye,ai,Xe,Ze,ii,et,tt,ri,nt,at,si,it,rt,oi,st,ot,ui,ut,dt,di,lt,pt,li,yt,ft,Ca,Ia,Sa,Ra,Pa;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],Y=c[2]^c[12]^c[22]^c[32]^c[42],Q=c[3]^c[13]^c[23]^c[33]^c[43],mt=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],$a=c[7]^c[17]^c[27]^c[37]^c[47],Be=c[8]^c[18]^c[28]^c[38]^c[48],Fe=c[9]^c[19]^c[29]^c[39]^c[49],P=Be^(Y<<1|Q>>>31),D=Fe^(Q<<1|Y>>>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^(mt<<1|Z>>>31),D=ee^(Z<<1|mt>>>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=Y^(le<<1|$a>>>31),D=Q^($a<<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=mt^(Be<<1|Fe>>>31),D=Z^(Fe<<1|Be>>>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=$a^(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],Le=c[1],rt=c[11]<<4|c[10]>>>28,oi=c[10]<<4|c[11]>>>28,Ke=c[20]<<3|c[21]>>>29,ti=c[21]<<3|c[20]>>>29,Ia=c[31]<<9|c[30]>>>23,Sa=c[30]<<9|c[31]>>>23,nt=c[40]<<18|c[41]>>>14,at=c[41]<<18|c[40]>>>14,Ye=c[2]<<1|c[3]>>>31,ai=c[3]<<1|c[2]>>>31,Ue=c[13]<<12|c[12]>>>20,Ya=c[12]<<12|c[13]>>>20,st=c[22]<<10|c[23]>>>22,ot=c[23]<<10|c[22]>>>22,Je=c[33]<<13|c[32]>>>19,$e=c[32]<<13|c[33]>>>19,Ra=c[42]<<2|c[43]>>>30,Pa=c[43]<<2|c[42]>>>30,lt=c[5]<<30|c[4]>>>2,pt=c[4]<<30|c[5]>>>2,Xe=c[14]<<6|c[15]>>>26,Ze=c[15]<<6|c[14]>>>26,Ve=c[25]<<11|c[24]>>>21,je=c[24]<<11|c[25]>>>21,ui=c[34]<<15|c[35]>>>17,ut=c[35]<<15|c[34]>>>17,ni=c[45]<<29|c[44]>>>3,Qe=c[44]<<29|c[45]>>>3,Ge=c[6]<<28|c[7]>>>4,ze=c[7]<<28|c[6]>>>4,li=c[17]<<23|c[16]>>>9,yt=c[16]<<23|c[17]>>>9,ii=c[26]<<25|c[27]>>>7,et=c[27]<<25|c[26]>>>7,Xa=c[36]<<21|c[37]>>>11,He=c[37]<<21|c[36]>>>11,dt=c[47]<<24|c[46]>>>8,di=c[46]<<24|c[47]>>>8,si=c[8]<<27|c[9]>>>5,it=c[9]<<27|c[8]>>>5,ei=c[18]<<20|c[19]>>>12,We=c[19]<<20|c[18]>>>12,ft=c[29]<<7|c[28]>>>25,Ca=c[28]<<7|c[29]>>>25,tt=c[38]<<8|c[39]>>>24,ri=c[39]<<8|c[38]>>>24,qe=c[48]<<14|c[49]>>>18,Za=c[49]<<14|c[48]>>>18,c[0]=Qa^~Ue&Ve,c[1]=Le^~Ya&je,c[10]=Ge^~ei&Ke,c[11]=ze^~We&ti,c[20]=Ye^~Xe&ii,c[21]=ai^~Ze&et,c[30]=si^~rt&st,c[31]=it^~oi&ot,c[40]=lt^~li&ft,c[41]=pt^~yt&Ca,c[2]=Ue^~Ve&Xa,c[3]=Ya^~je&He,c[12]=ei^~Ke&Je,c[13]=We^~ti&$e,c[22]=Xe^~ii&tt,c[23]=Ze^~et&ri,c[32]=rt^~st&ui,c[33]=oi^~ot&ut,c[42]=li^~ft&Ia,c[43]=yt^~Ca&Sa,c[4]=Ve^~Xa&qe,c[5]=je^~He&Za,c[14]=Ke^~Je&ni,c[15]=ti^~$e&Qe,c[24]=ii^~tt&nt,c[25]=et^~ri&at,c[34]=st^~ui&dt,c[35]=ot^~ut&di,c[44]=ft^~Ia&Ra,c[45]=Ca^~Sa&Pa,c[6]=Xa^~qe&Qa,c[7]=He^~Za&Le,c[16]=Je^~ni&Ge,c[17]=$e^~Qe&ze,c[26]=tt^~nt&Ye,c[27]=ri^~at&ai,c[36]=ui^~dt&si,c[37]=ut^~di&it,c[46]=Ia^~Ra<,c[47]=Sa^~Pa&pt,c[8]=qe^~Qa&Ue,c[9]=Za^~Le&Ya,c[18]=ni^~Ge&ei,c[19]=Qe^~ze&We,c[28]=nt^~Ye&Xe,c[29]=at^~ai&Ze,c[38]=dt^~si&rt,c[39]=di^~it&oi,c[48]=Ra^~lt&li,c[49]=Pa^~pt&yt,c[0]^=S[V],c[1]^=S[V+1]};if(s)ro.exports=u;else{for(b=0;b{T0.exports=g0;function g0(n,e){if(!n)throw new Error(e||"Assertion failed")}g0.equal=function(e,t,a){if(e!=t)throw new Error(a||"Assertion failed: "+e+" != "+t)}});var v0=ae((z3,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 Sn=ae(De=>{"use strict";var f2=ur(),c2=v0();De.inherits=c2;function m2(n,e){return(n.charCodeAt(e)&64512)!==55296||e<0||e+1>=n.length?!1:(n.charCodeAt(e+1)&64512)===56320}function h2(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):m2(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=w0;function b2(n,e){for(var t="",a=0;a>>0}return r}De.join32=g2;function T2(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=T2;function v2(n,e){return n>>>e|n<<32-e}De.rotr32=v2;function w2(n,e){return n<>>32-e}De.rotl32=w2;function _2(n,e){return n+e>>>0}De.sum32=_2;function k2(n,e,t){return n+e+t>>>0}De.sum32_3=k2;function A2(n,e,t,a){return n+e+t+a>>>0}De.sum32_4=A2;function E2(n,e,t,a,i){return n+e+t+a+i>>>0}De.sum32_5=E2;function M2(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=M2;function C2(n,e,t,a){var i=e+a>>>0,r=(i>>0}De.sum64_hi=C2;function I2(n,e,t,a){var i=e+a;return i>>>0}De.sum64_lo=I2;function S2(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=S2;function R2(n,e,t,a,i,r,s,o){var l=e+a+r+o;return l>>>0}De.sum64_4_lo=R2;function P2(n,e,t,a,i,r,s,o,l,p){var f=0,x=e;x=x+a>>>0,f+=x>>0,f+=x>>0,f+=x>>0,f+=x>>0}De.sum64_5_hi=P2;function N2(n,e,t,a,i,r,s,o,l,p){var f=e+a+r+o+p;return f>>>0}De.sum64_5_lo=N2;function D2(n,e,t){var a=e<<32-t|n>>>t;return a>>>0}De.rotr64_hi=D2;function O2(n,e,t){var a=n<<32-t|e>>>t;return a>>>0}De.rotr64_lo=O2;function B2(n,e,t){return n>>>t}De.shr64_hi=B2;function F2(n,e,t){var a=n<<32-t|e>>>t;return a>>>0}De.shr64_lo=F2});var dr=ae(E0=>{"use strict";var A0=Sn(),L2=ur();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}E0.BlockHash=Mo;Mo.prototype.update=function(e,t){if(e=A0.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=A0.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 U2=Sn(),Kn=U2.rotr32;function V2(n,e,t,a){if(n===0)return M0(e,t,a);if(n===1||n===3)return I0(e,t,a);if(n===2)return C0(e,t,a)}ha.ft_1=V2;function M0(n,e,t){return n&e^~n&t}ha.ch32=M0;function C0(n,e,t){return n&e^n&t^e&t}ha.maj32=C0;function I0(n,e,t){return n^e^t}ha.p32=I0;function j2(n){return Kn(n,2)^Kn(n,13)^Kn(n,22)}ha.s0_256=j2;function H2(n){return Kn(n,6)^Kn(n,11)^Kn(n,25)}ha.s1_256=H2;function q2(n){return Kn(n,7)^Kn(n,18)^n>>>3}ha.g0_256=q2;function G2(n){return Kn(n,17)^Kn(n,19)^n>>>10}ha.g1_256=G2});var P0=ae(($3,R0)=>{"use strict";var lr=Sn(),z2=dr(),W2=Gd(),zd=lr.rotl32,is=lr.sum32,K2=lr.sum32_5,J2=W2.ft_1,S0=z2.BlockHash,$2=[1518500249,1859775393,2400959708,3395469782];function Jn(){if(!(this instanceof Jn))return new Jn;S0.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}lr.inherits(Jn,S0);R0.exports=Jn;Jn.blockSize=512;Jn.outSize=160;Jn.hmacStrength=80;Jn.padLength=64;Jn.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 pr=Sn(),Q2=dr(),yr=Gd(),Y2=ur(),Rn=pr.sum32,X2=pr.sum32_4,Z2=pr.sum32_5,ex=yr.ch32,tx=yr.maj32,nx=yr.s0_256,ax=yr.s1_256,ix=yr.g0_256,rx=yr.g1_256,N0=Q2.BlockHash,sx=[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 $n(){if(!(this instanceof $n))return new $n;N0.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=sx,this.W=new Array(64)}pr.inherits($n,N0);D0.exports=$n;$n.blockSize=512;$n.outSize=256;$n.hmacStrength=192;$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 Kd=Sn(),O0=Wd();function xa(){if(!(this instanceof xa))return new xa;O0.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}Kd.inherits(xa,O0);B0.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((X3,j0)=>{"use strict";var Zt=Sn(),ox=dr(),ux=ur(),Qn=Zt.rotr64_hi,Yn=Zt.rotr64_lo,L0=Zt.shr64_hi,U0=Zt.shr64_lo,Fa=Zt.sum64,Jd=Zt.sum64_hi,$d=Zt.sum64_lo,dx=Zt.sum64_4_hi,lx=Zt.sum64_4_lo,px=Zt.sum64_5_hi,yx=Zt.sum64_5_lo,V0=ox.BlockHash,fx=[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 Pn(){if(!(this instanceof Pn))return new Pn;V0.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=fx,this.W=new Array(160)}Zt.inherits(Pn,V0);j0.exports=Pn;Pn.blockSize=1024;Pn.outSize=512;Pn.hmacStrength=192;Pn.padLength=128;Pn.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=Sn(),H0=Qd();function ba(){if(!(this instanceof ba))return new ba;H0.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}Yd.inherits(ba,H0);q0.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 z0=ae(fr=>{"use strict";fr.sha1=P0();fr.sha224=F0();fr.sha256=Wd();fr.sha384=G0();fr.sha512=Qd()});var Y0=ae(Q0=>{"use strict";var xi=Sn(),Ex=dr(),Co=xi.rotl32,W0=xi.sum32,rs=xi.sum32_3,K0=xi.sum32_4,$0=Ex.BlockHash;function Xn(){if(!(this instanceof Xn))return new Xn;$0.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}xi.inherits(Xn,$0);Q0.ripemd160=Xn;Xn.blockSize=512;Xn.outSize=160;Xn.hmacStrength=192;Xn.padLength=64;Xn.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,f=r,x=s,I=o,_=0;_<80;_++){var v=W0(Co(K0(a,J0(_,i,r,s),e[Ix[_]+t],Mx(_)),Rx[_]),o);a=o,o=s,s=Co(r,10),r=i,i=v,v=W0(Co(K0(l,J0(79-_,p,f,x),e[Sx[_]+t],Cx(_)),Px[_]),I),l=I,I=x,x=Co(f,10),f=p,p=v}v=rs(this.h[1],r,x),this.h[1]=rs(this.h[2],s,I),this.h[2]=rs(this.h[3],o,l),this.h[3]=rs(this.h[4],a,p),this.h[4]=rs(this.h[0],i,f),this.h[0]=v};Xn.prototype._digest=function(e){return e==="hex"?xi.toHex32(this.h,"little"):xi.split32(this.h,"little")};function J0(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 Mx(n){return n<=15?0:n<=31?1518500249:n<=47?1859775393:n<=63?2400959708:2840853838}function Cx(n){return n<=15?1352829926:n<=31?1548603684:n<=47?1836072691:n<=63?2053994217:0}var Ix=[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],Sx=[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],Rx=[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],Px=[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 Z0=ae((n8,X0)=>{"use strict";var Nx=Sn(),Dx=ur();function cr(n,e,t){if(!(this instanceof cr))return new cr(n,e,t);this.Hash=n,this.blockSize=n.blockSize/8,this.outSize=n.outSize/8,this.inner=null,this.outer=null,this._init(Nx.toArray(e,t))}X0.exports=cr;cr.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),Dx(e.length<=this.blockSize);for(var t=e.length;t{var Dt=ef;Dt.utils=Sn();Dt.common=dr();Dt.sha=z0();Dt.ripemd=Y0();Dt.hmac=Z0();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,If)=>{"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&&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],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],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=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,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,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,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 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=a(_,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=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 I={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"?Rf.exports=I:typeof define=="function"&&define.amd?define(I):n&&(n.scrypt&&(n._scrypt=n.scrypt),n.scrypt=I)})(wl)});var nc=ae((z4,tc)=>{"use strict";var Xo="qpzry9x8gf2tvdw0s3jn54khce6mua7l",Ml={};for(ms=0;ms>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 Zf(n){for(var e=1,t=0;t126)return"Invalid prefix ("+n+")";e=_r(e)^a>>5}for(e=_r(e),t=0;tt)throw new TypeError("Exceeds length limit");n=n.toLowerCase();var a=Zf(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=_r(a)^s,i+=Xo.charAt(s)}for(r=0;r<6;++r)a=_r(a);for(a^=1,r=0;r<6;++r){var o=a>>(5-r)*5&31;i+=Xo.charAt(o)}return i}function ec(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=Zf(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 b5(){var n=ec.apply(null,arguments);if(typeof n=="object")return n}function g5(n){var e=ec.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,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(I,_){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)I(U);else if(typeof x=="function")try{return Promise.resolve(x(L,null,U)).then(function(H){H?S(L,null,U):I(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 Ls=ae((XA,hm)=>{hm.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}});var rp=ae(Ga=>{var Ce=Ls(),ip=()=>[{type:Ce.RANGE,from:48,to:57}],xm=()=>[{type:Ce.CHAR,value:95},{type:Ce.RANGE,from:97,to:122},{type:Ce.RANGE,from:65,to:90}].concat(ip()),bm=()=>[{type:Ce.CHAR,value:9},{type:Ce.CHAR,value:10},{type:Ce.CHAR,value:11},{type:Ce.CHAR,value:12},{type:Ce.CHAR,value:13},{type:Ce.CHAR,value:32},{type:Ce.CHAR,value:160},{type:Ce.CHAR,value:5760},{type:Ce.RANGE,from:8192,to:8202},{type:Ce.CHAR,value:8232},{type:Ce.CHAR,value:8233},{type:Ce.CHAR,value:8239},{type:Ce.CHAR,value:8287},{type:Ce.CHAR,value:12288},{type:Ce.CHAR,value:65279}],db=()=>[{type:Ce.CHAR,value:10},{type:Ce.CHAR,value:13},{type:Ce.CHAR,value:8232},{type:Ce.CHAR,value:8233}];Ga.words=()=>({type:Ce.SET,set:xm(),not:!1});Ga.notWords=()=>({type:Ce.SET,set:xm(),not:!0});Ga.ints=()=>({type:Ce.SET,set:ip(),not:!1});Ga.notInts=()=>({type:Ce.SET,set:ip(),not:!0});Ga.whitespace=()=>({type:Ce.SET,set:bm(),not:!1});Ga.notWhitespace=()=>({type:Ce.SET,set:bm(),not:!0});Ga.anyChar=()=>({type:Ce.SET,set:db(),not:!0})});var Tm=ae(Us=>{var gm=Ls(),Fr=rp(),lb="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?",pb={0:0,t:9,n:10,v:11,f:12,r:13};Us.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 f=a?8:r?parseInt(r,16):s?parseInt(s,16):o?parseInt(o,8):l?lb.indexOf(l):pb[p],x=String.fromCharCode(f);return/[[\]{}^$.|?*+()]/.test(x)&&(x="\\"+x),x}),n};Us.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(Fr.words());else if(i[2])t.push(Fr.ints());else if(i[3])t.push(Fr.whitespace());else if(i[4])t.push(Fr.notWords());else if(i[5])t.push(Fr.notInts());else if(i[6])t.push(Fr.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,a.lastIndex];Us.error(e,"Unterminated character class")};Us.error=(n,e)=>{throw new SyntaxError("Invalid regular expression: /"+n+"/: "+e)}});var vm=ae(Vs=>{var xu=Ls();Vs.wordBoundary=()=>({type:xu.POSITION,value:"b"});Vs.nonWordBoundary=()=>({type:xu.POSITION,value:"B"});Vs.begin=()=>({type:xu.POSITION,value:"^"});Vs.end=()=>({type:xu.POSITION,value:"$"})});var wm=ae((nE,sp)=>{var Lr=Tm(),_n=Ls(),Ii=rp(),bu=vm();sp.exports=n=>{var e=0,t,a,i={type:_n.ROOT,stack:[]},r=i,s=i.stack,o=[],l=O=>{Lr.error(n,`Nothing to repeat at column ${O-1}`)},p=Lr.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}))}};_m.exports=za});var Em=ae((iE,Am)=>{var gu=wm(),js=km(),Si=gu.types;Am.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 a,i,r,s,o;switch(e.type){case Si.ROOT:case Si.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 yb=Ri&&Ri.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ri,"__esModule",{value:!0});Ri.RandomGenerator=void 0;var fb=yb(Em()),cb;(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 fb.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()}})(cb=Ri.RandomGenerator||(Ri.RandomGenerator={}))});var qs=ae(Ur=>{"use strict";var mb=Ur&&Ur.__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(Ur,"__esModule",{value:!0});Ur.TypeGuardError=void 0;var hb=function(n){mb(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);Ur.TypeGuardError=hb});var Cm=ae(Tu=>{"use strict";Object.defineProperty(Tu,"__esModule",{value:!0});Tu.$any=void 0;var xb=function(n){return n!==void 0?JSON.parse(JSON.stringify(n)):void 0};Tu.$any=xb});var Im=ae(vu=>{"use strict";Object.defineProperty(vu,"__esModule",{value:!0});vu.$every=void 0;var bb=function(n,e){for(var t=null,a=0;a{"use strict";Object.defineProperty(wu,"__esModule",{value:!0});wu.$guard=void 0;var gb=qs(),Tb=function(n){return function(e,t){if(e===!0)throw new gb.TypeGuardError({method:n,path:t.path,expected:t.expected,value:t.value});return!1}};wu.$guard=Tb});var Rm=ae(_u=>{"use strict";Object.defineProperty(_u,"__esModule",{value:!0});_u.$is_between=void 0;var vb=function(n,e,t){return e<=n&&n<=t};_u.$is_between=vb});var Pm=ae(ku=>{"use strict";Object.defineProperty(ku,"__esModule",{value:!0});ku.$is_custom=void 0;var wb=ap(),_b=function(n,e,t,a){var i,r=(i=wb.$dictionary.get(n))===null||i===void 0?void 0:i.get(e);return r===void 0?!0:r(t)(a)};ku.$is_custom=_b});var Nm=ae(Au=>{"use strict";Object.defineProperty(Au,"__esModule",{value:!0});Au.$is_date=void 0;var kb=function(n){return Ab.test(n)};Au.$is_date=kb;var Ab=/^(\d{4})-(\d{2})-(\d{2})$/});var Dm=ae(Eu=>{"use strict";Object.defineProperty(Eu,"__esModule",{value:!0});Eu.$is_datetime=void 0;var Eb=function(n){return!isNaN(new Date(n).getTime())};Eu.$is_datetime=Eb});var Om=ae(Mu=>{"use strict";Object.defineProperty(Mu,"__esModule",{value:!0});Mu.$is_email=void 0;var Mb=function(n){return Cb.test(n)};Mu.$is_email=Mb;var Cb=/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i});var Bm=ae(Cu=>{"use strict";Object.defineProperty(Cu,"__esModule",{value:!0});Cu.$is_ipv4=void 0;var Ib=function(n){return Sb.test(n)};Cu.$is_ipv4=Ib;var Sb=/^(?: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(Iu=>{"use strict";Object.defineProperty(Iu,"__esModule",{value:!0});Iu.$is_ipv6=void 0;var Rb=function(n){return Pb.test(n)};Iu.$is_ipv6=Rb;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 Lm=ae(Su=>{"use strict";Object.defineProperty(Su,"__esModule",{value:!0});Su.$is_url=void 0;var Nb=function(n){return Db.test(n)};Su.$is_url=Nb;var Db=/^[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(Ru=>{"use strict";Object.defineProperty(Ru,"__esModule",{value:!0});Ru.$is_uuid=void 0;var Ob=function(n){return Bb.test(n)};Ru.$is_uuid=Ob;var Bb=/^(?:[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(Pu=>{"use strict";Object.defineProperty(Pu,"__esModule",{value:!0});Pu.$join=void 0;var Fb=function(n){return Lb(n)?".".concat(n):"[".concat(JSON.stringify(n),"]")};Pu.$join=Fb;var Lb=function(n){return Ub(n)===!1&&/^[a-zA-Z_$][a-zA-Z_$0-9]*$/g.test(n)},Ub=function(n){return Vb.has(n)},Vb=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(Nu=>{"use strict";Object.defineProperty(Nu,"__esModule",{value:!0});Nu.$number=void 0;var jb=qs(),Hb=function(n){if(isFinite(n)===!1)throw new jb.TypeGuardError({method:"typia.stringify",expected:"number",value:n,message:"Error on typia.stringify(): infinite or not a number."});return n};Nu.$number=Hb});var Hm=ae(Du=>{"use strict";Object.defineProperty(Du,"__esModule",{value:!0});Du.$report=void 0;var qb=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=qb});var qm=ae(Ou=>{"use strict";Object.defineProperty(Ou,"__esModule",{value:!0});Ou.$rest=void 0;var Gb=function(n){return n.length===2?"":","+n.substring(1,n.length-1)};Ou.$rest=Gb});var Gm=ae(Bu=>{"use strict";Object.defineProperty(Bu,"__esModule",{value:!0});Bu.$string=void 0;var zb=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=zb});var zm=ae(Fu=>{"use strict";Object.defineProperty(Fu,"__esModule",{value:!0});Fu.$tail=void 0;var Wb=function(n){return n[n.length-1]===","?n.substring(0,n.length-1):n};Fu.$tail=Wb});var $m=ae(Pi=>{"use strict";var Gt=Pi&&Pi.__assign||function(){return Gt=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 Gt(Gt({},n.is()),{number:r1.$number,string:u1.$string,tail:d1.$tail,rest:o1.$rest,throws:e(t)})},n.clone=function(t){return Gt(Gt({},n.is()),{throws:e(t),any:Kb.$any})},n.prune=function(t){return Gt(Gt({},n.is()),{throws:e(t)})},n.random=function(){return{generator:Wm.RandomGenerator,pick:Wm.RandomGenerator.pick}};var e=function(t){return function(a){throw new Km.TypeGuardError(Gt(Gt({},a),{method:"typia.".concat(t)}))}}})(l1=Pi.Namespace||(Pi.Namespace={}))});var Qm=ae(Gs=>{"use strict";Object.defineProperty(Gs,"__esModule",{value:!0});Gs.MapUtil=void 0;var p1;(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}}})(p1=Gs.MapUtil||(Gs.MapUtil={}))});var Xm=ae(Ym=>{"use strict";Object.defineProperty(Ym,"__esModule",{value:!0})});var e6=ae(Zm=>{"use strict";Object.defineProperty(Zm,"__esModule",{value:!0})});var n6=ae(t6=>{"use strict";Object.defineProperty(t6,"__esModule",{value:!0})});var i6=ae(a6=>{"use strict";Object.defineProperty(a6,"__esModule",{value:!0})});var s6=ae(r6=>{"use strict";Object.defineProperty(r6,"__esModule",{value:!0})});var u6=ae(o6=>{"use strict";Object.defineProperty(o6,"__esModule",{value:!0})});var gp=ae(z=>{"use strict";var y1=z&&z.__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]}),Ni=z&&z.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&y1(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 Vr=ap(),Ie=$m(),f1=Qm();Ni(Xm(),z);Ni(e6(),z);Ni(n6(),z);Ni(i6(),z);Ni(s6(),z);Ni(u6(),z);Ni(qs(),z);function op(){re("assert")}z.assert=op;Object.assign(op,Ie.Namespace.assert("assert"));function up(){re("assertType")}z.assertType=up;Object.assign(up,Ie.Namespace.assert("assertType"));function Lu(){re("is")}z.is=Lu;Object.assign(Lu,Ie.Namespace.assert("is"));function Uu(){re("validate")}z.validate=Uu;Object.assign(Uu,Ie.Namespace.validate());function dp(){re("assertEquals")}z.assertEquals=dp;Object.assign(dp,Ie.Namespace.assert("assertEquals"));function lp(){re("equals")}z.equals=lp;Object.assign(lp,Ie.Namespace.is());function pp(){re("validateEquals")}z.validateEquals=pp;Object.assign(pp,Ie.Namespace.validate());z.customValidators={size:function(n){var e,t;return n?(t=(e=Vr.$dictionary.get(n))===null||e===void 0?void 0:e.size)!==null&&t!==void 0?t:0:Vr.$dictionary.size},has:function(n){return function(e){var t,a;return(a=(t=Vr.$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=Vr.$dictionary.get(n))===null||t===void 0?void 0:t.get(e)}},insert:function(n){return function(e){return function(t){var a=f1.MapUtil.take(Vr.$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=Vr.$dictionary.get(n))===null||t===void 0?void 0:t.delete(e))!==null&&a!==void 0?a:!1}}};function c1(){re("application")}z.application=c1;function yp(){re("assertParse")}z.assertParse=yp;Object.assign(yp,Ie.Namespace.assert("assertParse"));function fp(){re("isParse")}z.isParse=fp;Object.assign(fp,Lu);function cp(){re("validateParse")}z.validateParse=cp;Object.assign(cp,Uu);function mp(){re("stringify")}z.stringify=mp;Object.assign(mp,Ie.Namespace.stringify("stringify"));function Vu(){re("assertStringify")}z.assertStringify=Vu;Object.assign(Vu,Ie.Namespace.assert("assertStringify"));Object.assign(Vu,Ie.Namespace.stringify("assertStringify"));function ju(){re("isStringify")}z.isStringify=ju;Object.assign(ju,Ie.Namespace.is());Object.assign(ju,Ie.Namespace.stringify("isStringify"));function Hu(){re("validateStringify")}z.validateStringify=Hu;Object.assign(Hu,Ie.Namespace.validate());Object.assign(Hu,Ie.Namespace.stringify("validateStringify"));function m1(){re("metadata")}z.metadata=m1;function hp(){re("random")}z.random=hp;Object.assign(hp,Ie.Namespace.random());function h1(){re("literals")}z.literals=h1;function xp(){re("clone")}z.clone=xp;Object.assign(xp,Ie.Namespace.clone("clone"));function qu(){re("assertClone")}z.assertClone=qu;Object.assign(qu,Ie.Namespace.assert("assertClone"));Object.assign(qu,Ie.Namespace.clone("assertClone"));function Gu(){re("isClone")}z.isClone=Gu;Object.assign(Gu,Ie.Namespace.is());Object.assign(Gu,Ie.Namespace.clone("isClone"));function zu(){re("validateClone")}z.validateClone=zu;Object.assign(zu,Ie.Namespace.validate());Object.assign(zu,Ie.Namespace.clone("validateClone"));function bp(){re("prune")}z.prune=bp;Object.assign(bp,Ie.Namespace.prune("prune"));function Wu(){re("assertPrune")}z.assertPrune=Wu;Object.assign(Wu,Ie.Namespace.assert("assertPrune"));Object.assign(Wu,Ie.Namespace.prune("assertPrune"));function Ku(){re("isPrune")}z.isPrune=Ku;Object.assign(Ku,Ie.Namespace.is());Object.assign(Ku,Ie.Namespace.prune("isPrune"));function Ju(){re("validatePrune")}z.validatePrune=Ju;Object.assign(Ju,Ie.Namespace.prune("validatePrune"));Object.assign(Ju,Ie.Namespace.validate());function d6(){re("createAssert")}z.createAssert=d6;Object.assign(d6,op);function l6(){re("createAssertType")}z.createAssertType=l6;Object.assign(l6,up);function p6(){re("createIs")}z.createIs=p6;Object.assign(p6,Lu);function y6(){re("createValidate")}z.createValidate=y6;Object.assign(y6,Uu);function f6(){re("createAssertEquals")}z.createAssertEquals=f6;Object.assign(f6,dp);function c6(){re("createEquals")}z.createEquals=c6;Object.assign(c6,lp);function m6(){re("createValidateEquals")}z.createValidateEquals=m6;Object.assign(m6,pp);function h6(){re("createIsParse")}z.createIsParse=h6;Object.assign(h6,fp);function x6(){re("createAssertParse")}z.createAssertParse=x6;Object.assign(x6,yp);function b6(){re("createValidateParse")}z.createValidateParse=b6;Object.assign(b6,cp);function g6(){re("createStringify")}z.createStringify=g6;Object.assign(g6,mp);function T6(){re("createAssertStringify")}z.createAssertStringify=T6;Object.assign(T6,Vu);function v6(){re("createIsStringify")}z.createIsStringify=v6;Object.assign(v6,ju);function w6(){re("createValidateStringify")}z.createValidateStringify=w6;Object.assign(w6,Hu);function _6(){re("createRandom")}z.createRandom=_6;Object.assign(_6,hp);function k6(){re("createClone")}z.createClone=k6;Object.assign(k6,xp);function A6(){re("createAssertClone")}z.createAssertClone=A6;Object.assign(A6,qu);function E6(){re("createIsClone")}z.createIsClone=E6;Object.assign(E6,Gu);function M6(){re("createValidateClone")}z.createValidateClone=M6;Object.assign(M6,zu);function C6(){re("createPrune")}z.createPrune=C6;Object.assign(C6,bp);function I6(){re("createAssertPrune")}z.createAssertPrune=I6;Object.assign(I6,Wu);function S6(){re("createIsPrune")}z.createIsPrune=S6;Object.assign(S6,Ku);function R6(){re("createValidatePrune")}z.createValidatePrune=R6;Object.assign(R6,Ju);function re(n){throw new Error("Error on typia.".concat(n,'(): no transform has been configured. Run "npx typia setup" command.'))}});var N6=ae(An=>{"use strict";var P6=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]}),x1=An&&An.__setModuleDefault||(Object.create?function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}:function(n,e){n.default=e}),b1=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)&&P6(e,n,t);return x1(e,n),e},g1=An&&An.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&P6(e,n,t)};Object.defineProperty(An,"__esModule",{value:!0});var T1=b1(gp());An.default=T1;g1(gp(),An)});var Hl={};Ki(Hl,{BaseContract:()=>hr,BigNumber:()=>F,Contract:()=>oe,ContractFactory:()=>vi,FixedNumber:()=>ht,Signer:()=>Nt,VoidSigner:()=>ma,Wallet:()=>ln,Wordlist:()=>wn,constants:()=>gt,errors:()=>$t,getDefaultProvider:()=>lu,logger:()=>Fc,providers:()=>ra,utils:()=>te,version:()=>yu,wordlists:()=>_i});var yy=Cn(hd());var ty="logger/5.7.0";var ny=!1,ay=!1,eo={debug:1,default:2,info:2,warning:3,error:4,off:5},iy=eo.default,xd=null;function dh(){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 ry=dh(),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 sy="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),!(iy>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(ay)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 f="";for(let x=0;x>4],f+=sy[p[x]&15];i.push(l+"=Uint8Array(0x"+f+")")}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"),ry&&this.throwError("platform missing String.prototype.normalize",E.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:ry})}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(ty)),xd}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",E.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),ny){if(!e)return;this.globalLogger().throwError("error censorship permanent",E.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}ay=!!e,ny=!!t}static setLogLevel(e){let t=eo[e.toLowerCase()];if(t==null){E.globalLogger().warn("invalid log level - "+e);return}iy=t}static from(e){return new E(e)}};E.errors=$t;E.levels=bd;var oy="bytes/5.7.0";var kt=new E(oy);function dy(n){return!!n.toHexString}function Ji(n){return n.slice||(n.slice=function(){let e=Array.prototype.slice.call(arguments);return Ji(new Uint8Array(Array.prototype.slice.apply(n,e)))}),n}function la(n){return ie(n)&&!(n.length%2)||fn(n)}function uy(n){return typeof n=="number"&&n==n&&n%1===0}function fn(n){if(n==null)return!1;if(n.constructor===Uint8Array)return!0;if(typeof n=="string"||!uy(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),Ji(new Uint8Array(t))}if(e.allowMissingPrefix&&typeof n=="string"&&n.substring(0,2)!=="0x"&&(n="0x"+n),dy(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),Ji(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),Ji(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),dy(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(fn(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 At(n){let e="0x";return n.forEach(t=>{e+=W(t).substring(2)}),e}function qn(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=pi(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=me(e.r,32),e.s==null||!ie(e.s)?kt.throwArgumentError("signature missing or invalid s","signature",n):e.s=me(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=me(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 zr(n){return n=Gn(n),W(ye([n.r,n.s,n.recoveryParam?"0x1c":"0x1b"]))}var to="bignumber/5.7.0";var Wr=yy.default.BN,pa=new E(to),vd={},ly=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"||fn(n))}var py=!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()&&cn("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()&&cn("division-by-zero","mod"),Qt(ge(this).umod(t))}pow(e){let t=ge(e);return t.isNeg()&&cn("negative-power","pow"),Qt(ge(this).pow(t))}and(e){let t=ge(e);return(this.isNegative()||t.isNeg())&&cn("unbound-bitwise-result","and"),Qt(ge(this).and(t))}or(e){let t=ge(e);return(this.isNegative()||t.isNeg())&&cn("unbound-bitwise-result","or"),Qt(ge(this).or(t))}xor(e){let t=ge(e);return(this.isNegative()||t.isNeg())&&cn("unbound-bitwise-result","xor"),Qt(ge(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&cn("negative-width","mask"),Qt(ge(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&cn("negative-width","shl"),Qt(ge(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&cn("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{cn("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?py||(py=!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,Kr(e)):e.match(/^-?[0-9]+$/)?new F(vd,Kr(new Wr(e))):pa.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&cn("underflow","BigNumber.from",e),(e>=ly||e<=-ly)&&cn("overflow","BigNumber.from",e),F.from(String(e));let t=e;if(typeof t=="bigint")return F.from(t.toString());if(fn(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 Kr(n){if(typeof n!="string")return Kr(n.toString(16));if(n[0]==="-")return n=n.substring(1),n[0]==="-"&&pa.throwArgumentError("invalid hex","value",n),n=Kr(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(Kr(n))}function ge(n){let e=F.from(n).toHexString();return e[0]==="-"?new Wr("-"+e.substring(3),16):new Wr(e.substring(2),16)}function cn(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 Wr(n,36).toString(16)}function _d(n){return new Wr(n,16).toString(36)}var zt=new E(to),Jr={},my=F.from(0),hy=F.from(-1);function xy(n,e,t,a){let i={fault:e,operation:t};return a!==void 0&&(i.value=a),zt.throwError(n,E.errors.NUMERIC_FAULT,i)}var $r="0";for(;$r.length<256;)$r+=$r;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"+$r.substring(0,n):zt.throwArgumentError("invalid decimal size","decimals",n)}function $i(n,e){e==null&&(e=0);let t=kd(e);n=F.from(n);let a=n.lt(my);a&&(n=n.mul(hy));let i=n.mod(t).toString();for(;i.length2&&zt.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&&xy("fractional component exceeds decimals","underflow","parseFixed"),s===""&&(s="0");s.lengthe[s]==null?l:(typeof e[s]!==o&&zt.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&&zt.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",a),i>80&&zt.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new ya(Jr,t,a,i)}},ht=class{constructor(e,t,a,i){e!==Jr&&zt.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&&zt.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(cy.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(cy.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 a=ht.from("1"+$r.substring(0,e),this.format),i=lh.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&&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 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($i(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(my)&&xy("unsigned value cannot be negative","overflow","value",e);let r=null;a.signed?r=i.toTwos(a.width).toHexString():(r=i.toHexString(),r=me(r,a.width/8));let s=$i(i,a.decimals);return new ht(Jr,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=$i(i,a.decimals);return new ht(Jr,r,s,a)}static from(e,t){if(typeof e=="string")return ht.fromString(e,t);if(fn(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 zt.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}},cy=ht.from(1),lh=ht.from("0.5");var by="properties/5.7.0";var ph=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},no=new E(by);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 ph(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 Qi(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 yh={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function gy(n){if(n==null||yh[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 fh(n)}var an=class{constructor(e){for(let t in e)this[t]=xt(e[t])}};var zn="abi/5.7.0";var ve=new E(zn),yi={},Ty={calldata:!0,memory:!0,storage:!0},ch={calldata:!0,memory:!0};function ao(n,e){if(n==="bytes"||n==="string"){if(Ty[e])return!0}else if(n==="address"){if(e==="payable")return!0}else if((n.indexOf("[")>=0||n==="tuple")&&ch[e])return!0;return(Ty[e]||e==="payable")&&ve.throwArgumentError("invalid modifier","name",e),!1}function mh(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"?ct.fromString(e,t):ct.fromObject(e)}static fromObject(e){return ct.isParamType(e)?e:new ct(yi,{name:e.name||null,type:Yi(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(ct.fromObject):null})}static fromString(e,t){function a(i){return ct.fromObject({name:i.name,type:i.type,indexed:i.indexed,components:i.components})}return a(mh(e,!!t))}static isParamType(e){return!!(e!=null&&e._isParamType)}};function Qr(n,e){return bh(n).map(t=>ct.fromString(t,e))}var Kt=class{constructor(e,t){e!==yi&&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:Yr(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(ct.fromObject):[],type:"event"};return new Wt(yi,t)}static fromString(e){let t=e.match(Xr);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:Qr(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}};function wy(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 _y(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 ky(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=ky(e);t.constant&&ve.throwArgumentError("constructor cannot be constant","value",e);let a={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(yi,a)}static fromString(e){let t={type:"constructor"};e=wy(e,t);let a=e.match(Xr);return(!a||a[1].trim()!=="constructor")&&ve.throwArgumentError("invalid constructor string","value",e),t.inputs=Qr(a[2].trim(),!1),_y(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=ky(e),a={type:e.type,name:Yr(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(yi,a)}static fromString(e){let t={type:"function"};e=wy(e,t);let a=e.split(" returns ");a.length>2&&ve.throwArgumentError("invalid function string","value",e);let i=a[0].match(Xr);if(i||ve.throwArgumentError("invalid function signature","value",e),t.name=i[1].trim(),t.name&&Yr(t.name),t.inputs=Qr(i[2],!1),_y(i[3].trim(),t),a.length>1){let r=a[1].match(Xr);(r[1].trim()!=""||r[3].trim()!="")&&ve.throwArgumentError("unexpected tokens","value",e),t.outputs=Qr(r[2],!1)}else t.outputs=[];return Ut.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}};function vy(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:Yr(e.name),inputs:e.inputs?e.inputs.map(ct.fromObject):[]};return vy(new rn(yi,t))}static fromString(e){let t={type:"error"},a=e.match(Xr);return a||ve.throwArgumentError("invalid error signature","value",e),t.name=a[1].trim(),t.name&&Yr(t.name),t.inputs=Qr(a[2],!1),vy(rn.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}};function Yi(n){return n.match(/^uint($|[^1-9])/)?n="uint256"+n.substring(4):n.match(/^int($|[^1-9])/)&&(n="int256"+n.substring(3)),n}var xh=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function Yr(n){return(!n||!n.match(xh))&&ve.throwArgumentError(`invalid identifier "${n}"`,"value",n),n}var Xr=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function bh(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=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)}}},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 Ey=Cn(Ay());function fe(n){return"0x"+Ey.default.keccak_256(j(n))}var so={};Ki(so,{decode:()=>Zr,encode:()=>fa});var My="rlp/5.7.0";var Wn=new E(My);function Cy(n){let e=[];for(;n;)e.unshift(n&255),n>>=8;return e}function Iy(n,e,t){let a=0;for(let i=0;ie+1+a&&Wn.throwError("child data too short",E.errors.BUFFER_OVERRUN,{})}return{consumed:1+a,result:i}}function Py(n,e){if(n.length===0&&Wn.throwError("data too short",E.errors.BUFFER_OVERRUN,{}),n[e]>=248){let t=n[e]-247;e+1+t>n.length&&Wn.throwError("data short segment too short",E.errors.BUFFER_OVERRUN,{});let a=Iy(n,e+1,t);return e+1+t+a>n.length&&Wn.throwError("data long segment too short",E.errors.BUFFER_OVERRUN,{}),Sy(n,e,e+1+t,t+a)}else if(n[e]>=192){let t=n[e]-192;return e+1+t>n.length&&Wn.throwError("data array too short",E.errors.BUFFER_OVERRUN,{}),Sy(n,e,e+1,t)}else if(n[e]>=184){let t=n[e]-183;e+1+t>n.length&&Wn.throwError("data array too short",E.errors.BUFFER_OVERRUN,{});let a=Iy(n,e+1,t);e+1+t+a>n.length&&Wn.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&&Wn.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 Zr(n){let e=j(n),t=Py(e,0);return t.consumed!==e.length&&Wn.throwArgumentError("invalid rlp data","data",n),t.result}var Ny="address/5.7.0";var Na=new E(Ny);function Dy(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 gh=9007199254740991;function Th(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 Oy=Math.floor(Th(gh));function By(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>=Oy;){let a=e.substring(0,Oy);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 ce(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=Dy(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)!==By(n)&&Na.throwArgumentError("bad icap checksum","address",n),e=wd(n.substring(4));e.length<40;)e="0"+e;e=Dy("0x"+e)}else Na.throwArgumentError("invalid address","address",n);return e}function Fy(n){try{return ce(n),!0}catch{}return!1}function Ly(n){let e=_d(ce(n).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+By("XE00"+e)+e}function mi(n){let e=null;try{e=ce(n.from)}catch{Na.throwArgumentError("missing from address","transaction",n)}let t=nn(j(F.from(n.nonce).toHexString()));return ce(Se(fe(fa([e,t])),12))}function Uy(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),ce(Se(fe(ye(["0xff",ce(n),e,t])),12))}var oo=class extends Et{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=ce(t)}catch(a){this._throwError(a.message,t)}return e.writeValue(t)}decode(e){return ce(me(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 Zi=new E(zn);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 f=p.localName;return f||Zi.throwError("cannot encode object for signature with missing names",E.errors.INVALID_ARGUMENT,{argument:"values",coder:p,value:t}),l[f]&&Zi.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 Zi.throwArgumentError("invalid tuple value","tuple",t);e.length!==a.length&&Zi.throwArgumentError("types/value length mismatch","tuple",t);let i=new fi(n.wordSize),r=new fi(n.wordSize),s=[];e.forEach((l,p)=>{let f=a[p];if(l.dynamic){let x=r.length;l.encode(r,f);let I=i.writeUpdatableValue();s.push(_=>{I(_+x)})}else l.encode(i,f)}),s.forEach(l=>{l(i.length)});let o=n.appendWriter(i);return o+=n.appendWriter(r),o}function Cd(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 Et{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&&Zi.throwError("insufficient data length",E.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let a=[];for(let i=0;imo,EtherSymbol:()=>Gy,HashZero:()=>tr,MaxInt256:()=>qy,MaxUint256:()=>bo,MinInt256:()=>Hy,NegativeOne:()=>ho,One:()=>xo,Two:()=>Vy,WeiPerEther:()=>jy,Zero:()=>er});var mo="0x0000000000000000000000000000000000000000";var ho=F.from(-1),er=F.from(0),xo=F.from(1),Vy=F.from(2),jy=F.from("1000000000000000000"),bo=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),Hy=F.from("-0x8000000000000000000000000000000000000000000000000000000000000000"),qy=F.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");var tr="0x0000000000000000000000000000000000000000000000000000000000000000";var Gy="\u039E";var go=class extends Et{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(er)||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 zy="strings/5.7.0";var Wy=new E(zy),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 vh(n,e,t,a,i){return Wy.throwArgumentError(`invalid codepoint at offset ${e}; ${n}`,"bytes",t)}function Ky(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 wh(n,e,t,a,i){return n===Vt.OVERLONG?(a.push(i),0):(a.push(65533),Ky(n,e,t,a,i))}var To=Object.freeze({error:vh,ignore:Ky,replace:wh});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&&(Wy.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 Id(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?Id(t):(t-=65536,Id((t>>10&1023)+55296)+Id((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(ye([e,tr]).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 _h(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 Jy(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 kh=Jy("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"),Ah="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(n=>parseInt(n,16)),Eh=[{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}],Mh=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"),Ch=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"),Ih=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",_h),Sh=Jy("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 Rh(n){return n.reduce((e,t)=>(t.forEach(a=>{e.push(a)}),e),[])}function Ph(n){return!!Od(n,kh)}function Nh(n){let e=Od(n,Eh);if(e)return[n+e.s];let t=Mh[n];if(t)return t;let a=Ch[n];if(a)return[n+a[0]];let i=Ih[n];return i||null}function Dh(n){return!!Od(n,Sh)}function Bd(n){if(n.match(/^[a-z0-9-]*$/i)&&n.length<=59)return n.toLowerCase();let e=Da(n);e=Rh(e.map(a=>{if(Ah.indexOf(a)>=0)return[];if(a>=65024&&a<=65039)return[];let i=Nh(a);return i||[a]})),e=Da(vo(e),Jt.NFKC),e.forEach(a=>{if(Dh(a))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(a=>{if(Ph(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 es{constructor(e){super("string",e)}defaultValue(){return""}encode(e,t){return super.encode(e,we(t))}decode(e){return Yt(super.decode(e))}};var hi=class extends Et{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,Cd(e,this.coders))}};var _o=new E(zn),Oh=new RegExp(/^bytes([0-9]*)$/),Bh=new RegExp(/^(u?int)([0-9]*)$/),nr=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 hi((e.components||[]).map(a=>this._getCoder(a)),e.name);case"":return new co(e.name)}let t=e.type.match(Bh);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(Oh),t){let a=parseInt(t[1]);return(a===0||a>32)&&_o.throwArgumentError("invalid bytes length","param",e),new fo(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 fi(this._getWordSize())}getDefaultValue(e){let t=e.map(i=>this._getCoder(ct.from(i)));return new hi(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(ct.from(s))),i=new hi(a,"_"),r=this._getWriter();return i.encode(r,t),r.data}decode(e,t,a){let i=e.map(s=>this._getCoder(ct.from(s)));return new hi(i,"_").decode(this._getReader(j(t),a))}},ts=new nr;function sn(n){return fe(we(n))}var ko="hash/5.7.0";var Fd={};Ki(Fd,{decode:()=>ar,encode:()=>ir});function ar(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 Fh(n){let e={};for(let t=0;t>--l&1}let x=31,I=Math.pow(2,x),_=I>>>1,v=_>>1,S=I-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=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 Uh(n){let e=0;return()=>n[e++]}function Yy(n){return Uh(Lh(n))}function Vh(n){return n&1?~n>>1:n>>1}function jh(n,e){let t=Array(n);for(let a=0;ae[s]):t}function Xy(n){let e=[];for(;;){let t=n();if(t==0)break;e.push(Gh(t,n))}for(;;){let t=n()-1;if(t<0)break;e.push(zh(t,n))}return Fh(Qy(e))}function qh(n){let e=[];for(;;){let t=n();if(t==0)break;e.push(t)}return e}function Zy(n,e,t){let a=Array(n).fill(void 0).map(()=>[]);for(let i=0;ia[s].push(r));return a}function Gh(n,e){let t=1+e(),a=e(),i=qh(e),r=Zy(i.length,1+n,e);return Qy(r.map((s,o)=>{let l=s[0],p=s.slice(1);return Array(i[o]).fill(void 0).map((f,x)=>{let I=x*a;return[l+x*t,p.map(_=>_+I)]})}))}function zh(n,e){let t=1+e();return Zy(t,1+n,e).map(i=>[i[0],i.slice(1)])}function e0(n){let e=ns(n).sort((a,i)=>a-i);return t();function t(){let a=[];for(;;){let p=ns(n,e);if(p.length==0)break;a.push({set:new Set(p),node:t()})}a.sort((p,f)=>f.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 t0(){return Yy(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 Ao=t0(),Wh=new Set(ns(Ao)),Kh=new Set(ns(Ao)),Jh=Xy(Ao),$h=e0(Ao),n0=45,a0=95;function i0(n){return Da(n)}function Qh(n){return n.filter(e=>e!=65039)}function r0(n){for(let e of n.split(".")){let t=i0(e);try{for(let a=t.lastIndexOf(a0)-1;a>=0;a--)if(t[a]!==a0)throw new Error("underscore only allowed at start");if(t.length>=4&&t.every(a=>a<128)&&t[2]===n0&&t[3]===n0)throw new Error("invalid label extension")}catch(a){throw new Error(`Invalid label "${e}": ${a.message}`)}}return n}function s0(n){return r0(Yh(n,Qh))}function Yh(n,e){let t=i0(n).reverse(),a=[];for(;t.length;){let i=Zh(t);if(i){a.push(...e(i));continue}let r=t.pop();if(Wh.has(r)){a.push(r);continue}if(Kh.has(r))continue;let s=Jh[r];if(s){a.push(...s);continue}throw new Error(`Disallowed codepoint: 0x${r.toString(16).toUpperCase()}`)}return r0(Xh(String.fromCodePoint(...a)))}function Xh(n){return n.normalize("NFC")}function Zh(n,e){var t;let a=$h,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 e2=new E(ko),u0=new Uint8Array(32);u0.fill(0);function o0(n){if(n.length===0)throw new Error("invalid ENS name; empty component");return n}function Ld(n){let e=we(s0(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(o0(e.slice(a))),t}function Ud(n){try{return Ld(n).length!==0}catch{}return!1}function Oa(n){typeof n!="string"&&e2.throwArgumentError("invalid ENS name; not a string","name",n);let e=u0,t=Ld(n);for(;t.length;)e=fe(ye([e,fe(t.pop())]));return W(e)}function as(n){return W(ye(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 d0=`Ethereum Signed Message: -`;function rr(n){return typeof n=="string"&&(n=we(n)),fe(ye([we(d0),we(String(n.length)),n]))}var t2=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Tt=new E(ko),f0=new Uint8Array(32);f0.fill(0);var n2=F.from(-1),c0=F.from(0),m0=F.from(1),a2=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function i2(n){let e=j(n),t=e.length%32;return t?At([e,f0.slice(t)]):W(e)}var r2=me(m0.toHexString(),32),s2=me(c0.toHexString(),32),l0={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Vd=["name","version","chainId","verifyingContract","salt"];function p0(n){return function(e){return typeof e!="string"&&Tt.throwArgumentError(`invalid domain value for ${JSON.stringify(n)}`,`domain.${n}`,e),e}}var o2={name:p0("name"),version:p0("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 ce(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=a2.mask(t?a-1:a),r=t?i.add(m0).mul(n2):c0;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),me(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),i2(a)}}}switch(n){case"address":return function(e){return me(ce(e),32)};case"bool":return function(e){return e?r2:s2};case"bytes":return function(e){return fe(e)};case"string":return function(e){return sn(e)}}return null}function y0(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 f=p.type.match(/^([^\x5b]*)(\x5b|$)/)[1];f===o&&Tt.throwArgumentError(`circular type reference to ${JSON.stringify(f)}`,"types",e),!jd(f)&&(a[f]||Tt.throwArgumentError(`unknown type ${JSON.stringify(f)}`,"types",e),a[f].push(o),t[o][f]=!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(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]=y0(o,e[o])+l.map(p=>y0(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(At(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),At(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=l0[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 At(["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 t2(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]=o2[l](p),r.push({name:l,type:l0[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(zn);var sr=class extends an{},or=class extends an{},Hd=class extends an{},ca=class extends an{static isIndexed(e){return!!(e&&e._isIndexed)}},u2={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function h0(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 ts}static getAddress(e){return ce(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(ye([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(ye([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)),f=u2[p];if(f)s=this._abiCoder.decode(f.inputs,a.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,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]),me(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 I=this.getEventTopic(e);(!ie(a[0],32)||a[0].toLowerCase()!==I)&&wt.throwError("fragment/topic mismatch",E.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:I,value:a[0]}),a=a.slice(1)}let i=[],r=[],s=[];e.inputs.forEach((I,_)=>{I.indexed?I.type==="string"||I.type==="bytes"||I.baseType==="tuple"||I.baseType==="array"?(i.push(ct.fromObject({type:"bytes32",name:I.name})),s.push(!0)):(i.push(I),s.push(!1)):(r.push(I),s.push(!1))});let o=a!=null?this._abiCoder.decode(i,ye(a)):null,l=this._abiCoder.decode(r,t,!0),p=[],f=0,x=0;e.inputs.forEach((I,_)=>{if(I.indexed)if(o==null)p[_]=new ca({_isIndexed:!0,hash:null});else if(s[_])p[_]=new ca({_isIndexed:!0,hash:o[x++]});else try{p[_]=o[x++]}catch(v){p[_]=v}else try{p[_]=l[f++]}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 h0(`property ${JSON.stringify(I.name)}`,v)}}):p[I.name]=v}});for(let I=0;I{throw h0(`index ${I}`,_)}})}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),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 x0="abstract-provider/5.7.0";var d2=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},l2=new E(x0),Eo=class extends an{static isForkEvent(e){return!!(e&&e._isForkEvent)}};var Xt=class{constructor(){l2.checkAbstract(new.target,Xt),B(this,"_isProvider",!0)}getFeeData(){return d2(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 b0="abstract-signer/5.7.0";var In=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},hn=new E(b0),p2=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],y2=[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 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 Re(this.checkTransaction(e));return yield this.provider.estimateGas(t)})}call(e,t){return In(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 In(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 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 a in e)p2.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 In(this,void 0,void 0,function*(){let t=yield Re(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&&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(y2.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()),Zn=Cn(Xd());function mr(n,e,t){return t={path:e,exports:{},require:function(a,i){return Ox(a,i??t.path)}},n(t,t.exports),t.exports}function Ox(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var nl=nf;function nf(n,e){if(!n)throw new Error(e||"Assertion failed")}nf.equal=function(e,t,a){if(e!=t)throw new Error(a||"Assertion failed: "+e+" != "+t)};var Nn=mr(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,I=f&255;x?l.push(x,I):l.push(I)}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(I>>1)-1?S=(I>>1)-L:S=L,_.isubn(S)):S=0,x[v]=S,_.iushrn(1)}return x}t.getNAF=a;function i(l,p){var f=[[],[]];l=l.clone(),p=p.clone();for(var x=0,I=0,_;l.cmpn(-x)>0||p.cmpn(-I)>0;){var v=l.andln(3)+x&3,S=p.andln(3)+I&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)+I&7,(_===3||_===5)&&v===2?O=-S:O=S),f[1].push(O),2*x===L+1&&(x=1-x),2*I===O+1&&(I=1-I),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}),Ro=on.getNAF,Bx=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 bi=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 f=this.jpoint(null,null,null),x=this.jpoint(null,null,null),I=r;I>0;I--){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];Po(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};Ua.prototype._wnafMulAdd=function(e,t,a,i,r){var s=this._wnafT1,o=this._wnafT2,l=this._wnafT3,p=0,f,x,I;for(f=0;f=1;f-=2){var v=f-1,S=f;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=Bx(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;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?I=o[x][R-1>>1]:R<0&&(I=o[x][-R-1>>1].neg()),I.type==="affine"?J=J.mixedAdd(I):J=J.add(I))}}for(f=0;f=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=f),x.negative&&(x=x.neg(),I=I.neg()),_.negative&&(_=_.neg(),v=v.neg()),[{a:x,b:I},{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),f=s.mul(i.b),x=e.sub(o).sub(l),I=p.add(f).neg();return{k1:x,k2:I}};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":""};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 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)};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,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)};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,a){var i=[this,t],r=[e,a];return this.curve.endo?this.curve._endoWnafMulAdd(i,r):this.curve._wnafMulAdd(1,i,r,2)};It.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)};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 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};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,a){bi.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,bi.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 f=l.redSqr(),x=f.redMul(l),I=i.redMul(f),_=p.redSqr().redIAdd(x).redISub(I).redISub(I),v=p.redMul(I.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(),f=p.redMul(o),x=a.redMul(p),I=l.redSqr().redIAdd(f).redISub(x).redISub(x),_=l.redMul(x.redISub(I)).redISub(r.redMul(f)),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 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 Io=mr(function(n,e){"use strict";var t=e;t.base=bi,t.short=Lx,t.mont=null,t.edwards=null}),So=mr(function(n,e){"use strict";var t=e,a=on.assert;function i(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,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:Zn.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:Zn.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:Zn.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:Zn.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:Zn.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:Zn.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:Zn.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:Zn.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=Nn.toArray(n.entropy,n.entropyEnc||"hex"),t=Nn.toArray(n.nonce,n.nonceEnc||"hex"),a=Nn.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 af=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=Nn.toArray(a,i||"hex"),this._update(a));for(var r=[];r.length"};var Ux=on.assert;function No(n,e){if(n instanceof No)return n;this._importDER(n,e)||(Ux(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 Vx(){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 tf(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=tf(t),a=tf(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 jx=function(){throw new Error("unsupported")},rf=on.assert;function xn(n){if(!(this instanceof xn))return new xn(n);typeof n=="string"&&(rf(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 Hx=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 af({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||jx(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 af({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 I=this.g.mul(x);if(!I.isInfinity()){var _=I.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=(I.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),f;return this.curve._maxwellTrick?(f=this.g.jmulAdd(l,a.getPublic(),p),f.isInfinity()?!1:f.eqXToP(r)):(f=this.g.mulAdd(l,a.getPublic(),p),f.isInfinity()?!1:f.getX().umod(this.n).cmp(r)===0)};xn.prototype.recoverPubKey=function(n,e,t,a){rf((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 f=e.r.invm(i),x=i.sub(r).mul(f).umod(i),I=o.mul(f).umod(i);return this.g.mulAdd(x,s,I)};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 qx=mr(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=Hx,t.eddsa=null}),sf=qx.ec;var of="signing-key/5.7.0";var sl=new E(of),rl=null;function ea(){return rl||(rl=new sf("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=ea().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=ea().keyFromPublic(j(this.publicKey)),a=ea().keyFromPublic(j(e));return"0x"+t.pub.add(a.pub).encodeCompressed("hex")}signDigest(e){let t=ea().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:me("0x"+i.r.toString(16),32),s:me("0x"+i.s.toString(16),32)})}computeSharedSecret(e){let t=ea().keyFromPrivate(j(this.privateKey)),a=ea().keyFromPublic(j(ss(e)));return me("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"+ea().recoverPubKey(j(n),a,t.recoveryParam).encode("hex",!1)}function ss(n,e){let t=j(n);if(t.length===32){let a=new Tn(t);return e?"0x"+ea().keyFromPrivate(t).getPublic(!0,"hex"):a.publicKey}else{if(t.length===33)return e?W(t):"0x"+ea().keyFromPublic(t).getPublic(!1,"hex");if(t.length===65)return e?"0x"+ea().keyFromPublic(t).getPublic(!0,"hex"):W(t)}return sl.throwArgumentError("invalid public or private key","key","[REDACTED]")}var uf="transactions/5.7.0";var qt=new E(uf),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:ce(n)}function Ht(n){return n==="0x"?er:F.from(n)}var Gx=[{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"}],zx={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function vn(n){let e=ss(n);return ce(Se(fe(Se(e,1)),12))}function gi(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:ce(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 df(n){return dn(n).map(e=>[e.address,e.storageKeys])}function lf(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?ce(n.to):"0x",un(n.value||0,"value"),n.data||"0x",df(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 At(["0x02",fa(t)])}function pf(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?ce(n.to):"0x",un(n.value||0,"value"),n.data||"0x",df(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 At(["0x01",fa(t)])}function Wx(n,e){Qi(n,zx);let t=[];Gx.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 fa(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))),fa(t)}function os(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),Wx(n,e);switch(n.type){case 1:return pf(n,e);case 2:return lf(n,e);default:break}return qt.throwError(`unsupported transaction type: ${n.type}`,E.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:n.type})}function yf(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=me(e[1],32),n.s=me(e[2],32);try{let a=fe(t(n));n.from=gi(a,{r:n.r,s:n.s,recoveryParam:n.v})}catch{}}function Kx(n){let e=Zr(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),yf(i,e.slice(9),lf)),i}function Jx(n){let e=Zr(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),yf(t,e.slice(8),pf)),t}function $x(n){let e=Zr(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=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 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(fa(i));try{t.from=gi(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 $x(e);switch(e[0]){case 1:return Jx(e);case 2:return Kx(e);default:break}return qt.throwError(`unsupported transaction type: ${e[0]}`,E.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}var ff="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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Pe=new E(ff),Qx={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 ce(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 us(n,e,t){return Va(this,void 0,void 0,function*(){return Array.isArray(t)?yield Promise.all(t.map((a,i)=>us(n,Array.isArray(e)?e[i]:e[a.name],a))):t.type==="address"?yield Lo(n,e):t.type==="tuple"?yield us(n,e,t.components):t.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(a=>us(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 ce(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:us(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,f=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 Yx(n,e){return function(...t){return jo(n,e,t)}}function Xx(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 mf(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 hf(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 Zx(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 mf(n,i),i})}}function cf(n,e,t){return e.constant?hf(n,e,t):Zx(n,e)}function xf(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 Ti=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 Ti{constructor(){super("error",null)}},Uo=class extends Ti{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(xf(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=Xi(e.args);if(t.length)throw t[0].error;let a=(e.args||[]).slice();return a.push(e),a}},Vo=class extends Ti{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{}}},hr=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(ce(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,cf(this,o,!0)),this.functions[s]==null&&B(this.functions,s,cf(this,o,!1)),this.callStatic[s]==null&&B(this.callStatic,s,hf(this,o,!0)),this.populateTransaction[s]==null&&B(this.populateTransaction,s,Yx(this,o)),this.estimateGas[s]==null&&B(this.estimateGas,s,Xx(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 mi(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 ca.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 Ti("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 Ti(xf(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 hr{},vi=class{constructor(e,t,a){let i=null;typeof t=="string"?i=t:fn(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(!Qx[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(ye([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 us(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 mf(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 mi(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 I=j(Ta(i,n,l));r||(r=I.length,f=new Uint8Array(r),s=Math.ceil(a/r),p=a-(s-1)*r),f.set(I);for(let S=1;S{var nh=Object.create;var Zs=Object.defineProperty;var ah=Object.getOwnPropertyDescriptor;var ih=Object.getOwnPropertyNames;var rh=Object.getPrototypeOf,sh=Object.prototype.hasOwnProperty;var oh=(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),Ki=(n,e)=>{for(var t in e)Zs(n,t,{get:e[t],enumerable:!0})},uh=(n,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of ih(e))!sh.call(n,i)&&i!==t&&Zs(n,i,{get:()=>e[i],enumerable:!(a=ah(e,i))||a.enumerable});return n};var Cn=(n,e,t)=>(t=n!=null?nh(rh(n)):{},uh(e||!n||!n.__esModule?Zs(t,"default",{value:n,enumerable:!0}):t,n));var be=(n,e,t)=>(oh(n,typeof e!="symbol"?e+"":e,t),t);var Zp=ae(()=>{});var xd=ae((ey,hd)=>{(function(n,e){"use strict";function t(C,u){if(!C)throw new Error(u||"Assertion failed")}function a(C,u){C.super_=u;var y=function(){};y.prototype=u.prototype,C.prototype=new y,C.prototype.constructor=C}function i(C,u,y){if(i.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=i:e.BN=i,i.BN=i,i.wordSize=26;var r;try{typeof window<"u"&&typeof window.Buffer<"u"?r=window.Buffer:r=Zp().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(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 b=s(C,y);return y-1>=u&&(b|=s(C,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(C,u,y,b){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()},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"],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];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=I[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(C){for(var u=new Array(C.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-C.length+1);P<=c;P++){var D=d-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[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,Y=ee&8191,Q=ee>>>13,mt=w[3]|0,Z=mt&8191,le=mt>>>13,$a=w[4]|0,Be=$a&8191,Fe=$a>>>13,Qa=w[5]|0,Le=Qa&8191,Ue=Qa>>>13,Ya=w[6]|0,Ve=Ya&8191,je=Ya>>>13,Xa=w[7]|0,He=Xa&8191,qe=Xa>>>13,Za=w[8]|0,Ge=Za&8191,ze=Za>>>13,ei=w[9]|0,We=ei&8191,Ke=ei>>>13,ti=A[0]|0,Je=ti&8191,$e=ti>>>13,ni=A[1]|0,Qe=ni&8191,Ye=ni>>>13,ai=A[2]|0,Xe=ai&8191,Ze=ai>>>13,ii=A[3]|0,et=ii&8191,tt=ii>>>13,ri=A[4]|0,nt=ri&8191,at=ri>>>13,si=A[5]|0,it=si&8191,rt=si>>>13,oi=A[6]|0,st=oi&8191,ot=oi>>>13,ui=A[7]|0,ut=ui&8191,dt=ui>>>13,di=A[8]|0,lt=di&8191,pt=di>>>13,li=A[9]|0,yt=li&8191,ft=li>>>13;b.negative=u.negative^y.negative,b.length=19,g=Math.imul(c,Je),d=Math.imul(c,$e),d=d+Math.imul(P,Je)|0,m=Math.imul(P,$e);var Ca=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Ca>>>26)|0,Ca&=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(c,Qe)|0,d=d+Math.imul(c,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(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(c,Xe)|0,d=d+Math.imul(c,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(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 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(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 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(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 nd=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(nd>>>26)|0,nd&=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(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 ad=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(ad>>>26)|0,ad&=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(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 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,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(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 rd=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(rd>>>26)|0,rd&=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(Ge,Qe)|0,d=d+Math.imul(Ge,Ye)|0,d=d+Math.imul(ze,Qe)|0,m=m+Math.imul(ze,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(c,yt)|0,d=d+Math.imul(c,ft)|0,d=d+Math.imul(P,yt)|0,m=m+Math.imul(P,ft)|0;var sd=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(sd>>>26)|0,sd&=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(Ge,Xe)|0,d=d+Math.imul(Ge,Ze)|0,d=d+Math.imul(ze,Xe)|0,m=m+Math.imul(ze,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,ft)|0,d=d+Math.imul(K,yt)|0,m=m+Math.imul(K,ft)|0;var od=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(od>>>26)|0,od&=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(Ge,et)|0,d=d+Math.imul(Ge,tt)|0,d=d+Math.imul(ze,et)|0,m=m+Math.imul(ze,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,ft)|0,d=d+Math.imul(Q,yt)|0,m=m+Math.imul(Q,ft)|0;var ud=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(ud>>>26)|0,ud&=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(Ge,nt)|0,d=d+Math.imul(Ge,at)|0,d=d+Math.imul(ze,nt)|0,m=m+Math.imul(ze,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,ft)|0,d=d+Math.imul(le,yt)|0,m=m+Math.imul(le,ft)|0;var dd=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(dd>>>26)|0,dd&=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(Ge,it)|0,d=d+Math.imul(Ge,rt)|0,d=d+Math.imul(ze,it)|0,m=m+Math.imul(ze,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,ft)|0,d=d+Math.imul(Fe,yt)|0,m=m+Math.imul(Fe,ft)|0;var ld=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(ld>>>26)|0,ld&=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(Ge,st)|0,d=d+Math.imul(Ge,ot)|0,d=d+Math.imul(ze,st)|0,m=m+Math.imul(ze,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,ft)|0,d=d+Math.imul(Ue,yt)|0,m=m+Math.imul(Ue,ft)|0;var pd=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(pd>>>26)|0,pd&=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(Ge,ut)|0,d=d+Math.imul(Ge,dt)|0,d=d+Math.imul(ze,ut)|0,m=m+Math.imul(ze,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,ft)|0,d=d+Math.imul(je,yt)|0,m=m+Math.imul(je,ft)|0;var yd=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(yd>>>26)|0,yd&=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(Ge,lt)|0,d=d+Math.imul(Ge,pt)|0,d=d+Math.imul(ze,lt)|0,m=m+Math.imul(ze,pt)|0,g=g+Math.imul(He,yt)|0,d=d+Math.imul(He,ft)|0,d=d+Math.imul(qe,yt)|0,m=m+Math.imul(qe,ft)|0;var fd=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(fd>>>26)|0,fd&=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(Ge,yt)|0,d=d+Math.imul(Ge,ft)|0,d=d+Math.imul(ze,yt)|0,m=m+Math.imul(ze,ft)|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,ft),d=d+Math.imul(Ke,yt)|0,m=Math.imul(Ke,ft);var md=(k+g|0)+((d&8191)<<13)|0;return k=(m+(d>>>13)|0)+(md>>>26)|0,md&=67108863,h[0]=Ca,h[1]=Ia,h[2]=Sa,h[3]=Ra,h[4]=Pa,h[5]=nd,h[6]=ad,h[7]=id,h[8]=rd,h[9]=sd,h[10]=od,h[11]=ud,h[12]=dd,h[13]=ld,h[14]=pd,h[15]=yd,h[16]=fd,h[17]=cd,h[18]=md,k!==0&&(h[19]=k,b.length++),b};Math.imul||(O=L);function U(C,u,y){y.negative=u.negative^C.negative,y.length=C.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(C,u,y){return U(C,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(C,u){this.x=C,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 $(C,u){this.name=C,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(C){if(typeof C=="string"){var u=i._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 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(C){q.call(this,C),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 hd>"u"||hd,ey)});var Ay=ae((Zg,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(""),f=[31,7936,2031616,520093696],x=[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};(a.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(c){return Object.prototype.toString.call(c)==="[object Array]"}),l&&(a.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,Y){return u["cshake"+c].update(V,K,ee,Y)[D]()}},de=function(c,P,D){return function(V,K,ee,Y){return u["kmac"+c].update(V,K,ee,Y)[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(n);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(n)}else throw new Error(n);P=!0}for(var V=this.blocks,K=this.byteCount,ee=c.length,Y=this.blockCount,Q=0,mt=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[Y],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(n);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(n)}else throw new Error(n);P=!0}var V=0,K=c.length;if(P)V=K;else for(var ee=0;ee=57344?V+=3:(Y=65536+((Y&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],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 c=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%c===0&&G(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(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,Y,Q,mt,Z,le,$a,Be,Fe,Qa,Le,Ue,Ya,Ve,je,Xa,He,qe,Za,Ge,ze,ei,We,Ke,ti,Je,$e,ni,Qe,Ye,ai,Xe,Ze,ii,et,tt,ri,nt,at,si,it,rt,oi,st,ot,ui,ut,dt,di,lt,pt,li,yt,ft,Ca,Ia,Sa,Ra,Pa;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],Y=c[2]^c[12]^c[22]^c[32]^c[42],Q=c[3]^c[13]^c[23]^c[33]^c[43],mt=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],$a=c[7]^c[17]^c[27]^c[37]^c[47],Be=c[8]^c[18]^c[28]^c[38]^c[48],Fe=c[9]^c[19]^c[29]^c[39]^c[49],P=Be^(Y<<1|Q>>>31),D=Fe^(Q<<1|Y>>>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^(mt<<1|Z>>>31),D=ee^(Z<<1|mt>>>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=Y^(le<<1|$a>>>31),D=Q^($a<<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=mt^(Be<<1|Fe>>>31),D=Z^(Fe<<1|Be>>>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=$a^(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],Le=c[1],rt=c[11]<<4|c[10]>>>28,oi=c[10]<<4|c[11]>>>28,Ke=c[20]<<3|c[21]>>>29,ti=c[21]<<3|c[20]>>>29,Ia=c[31]<<9|c[30]>>>23,Sa=c[30]<<9|c[31]>>>23,nt=c[40]<<18|c[41]>>>14,at=c[41]<<18|c[40]>>>14,Ye=c[2]<<1|c[3]>>>31,ai=c[3]<<1|c[2]>>>31,Ue=c[13]<<12|c[12]>>>20,Ya=c[12]<<12|c[13]>>>20,st=c[22]<<10|c[23]>>>22,ot=c[23]<<10|c[22]>>>22,Je=c[33]<<13|c[32]>>>19,$e=c[32]<<13|c[33]>>>19,Ra=c[42]<<2|c[43]>>>30,Pa=c[43]<<2|c[42]>>>30,lt=c[5]<<30|c[4]>>>2,pt=c[4]<<30|c[5]>>>2,Xe=c[14]<<6|c[15]>>>26,Ze=c[15]<<6|c[14]>>>26,Ve=c[25]<<11|c[24]>>>21,je=c[24]<<11|c[25]>>>21,ui=c[34]<<15|c[35]>>>17,ut=c[35]<<15|c[34]>>>17,ni=c[45]<<29|c[44]>>>3,Qe=c[44]<<29|c[45]>>>3,Ge=c[6]<<28|c[7]>>>4,ze=c[7]<<28|c[6]>>>4,li=c[17]<<23|c[16]>>>9,yt=c[16]<<23|c[17]>>>9,ii=c[26]<<25|c[27]>>>7,et=c[27]<<25|c[26]>>>7,Xa=c[36]<<21|c[37]>>>11,He=c[37]<<21|c[36]>>>11,dt=c[47]<<24|c[46]>>>8,di=c[46]<<24|c[47]>>>8,si=c[8]<<27|c[9]>>>5,it=c[9]<<27|c[8]>>>5,ei=c[18]<<20|c[19]>>>12,We=c[19]<<20|c[18]>>>12,ft=c[29]<<7|c[28]>>>25,Ca=c[28]<<7|c[29]>>>25,tt=c[38]<<8|c[39]>>>24,ri=c[39]<<8|c[38]>>>24,qe=c[48]<<14|c[49]>>>18,Za=c[49]<<14|c[48]>>>18,c[0]=Qa^~Ue&Ve,c[1]=Le^~Ya&je,c[10]=Ge^~ei&Ke,c[11]=ze^~We&ti,c[20]=Ye^~Xe&ii,c[21]=ai^~Ze&et,c[30]=si^~rt&st,c[31]=it^~oi&ot,c[40]=lt^~li&ft,c[41]=pt^~yt&Ca,c[2]=Ue^~Ve&Xa,c[3]=Ya^~je&He,c[12]=ei^~Ke&Je,c[13]=We^~ti&$e,c[22]=Xe^~ii&tt,c[23]=Ze^~et&ri,c[32]=rt^~st&ui,c[33]=oi^~ot&ut,c[42]=li^~ft&Ia,c[43]=yt^~Ca&Sa,c[4]=Ve^~Xa&qe,c[5]=je^~He&Za,c[14]=Ke^~Je&ni,c[15]=ti^~$e&Qe,c[24]=ii^~tt&nt,c[25]=et^~ri&at,c[34]=st^~ui&dt,c[35]=ot^~ut&di,c[44]=ft^~Ia&Ra,c[45]=Ca^~Sa&Pa,c[6]=Xa^~qe&Qa,c[7]=He^~Za&Le,c[16]=Je^~ni&Ge,c[17]=$e^~Qe&ze,c[26]=tt^~nt&Ye,c[27]=ri^~at&ai,c[36]=ui^~dt&si,c[37]=ut^~di&it,c[46]=Ia^~Ra<,c[47]=Sa^~Pa&pt,c[8]=qe^~Qa&Ue,c[9]=Za^~Le&Ya,c[18]=ni^~Ge&ei,c[19]=Qe^~ze&We,c[28]=nt^~Ye&Xe,c[29]=at^~ai&Ze,c[38]=dt^~si&rt,c[39]=di^~it&oi,c[48]=Ra^~lt&li,c[49]=Pa^~pt&yt,c[0]^=S[V],c[1]^=S[V+1]};if(s)ro.exports=u;else{for(b=0;b{T0.exports=g0;function g0(n,e){if(!n)throw new Error(e||"Assertion failed")}g0.equal=function(e,t,a){if(e!=t)throw new Error(a||"Assertion failed: "+e+" != "+t)}});var v0=ae((z3,Gd)=>{typeof Object.create=="function"?Gd.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Gd.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 Sn=ae(De=>{"use strict";var f2=ur(),c2=v0();De.inherits=c2;function m2(n,e){return(n.charCodeAt(e)&64512)!==55296||e<0||e+1>=n.length?!1:(n.charCodeAt(e+1)&64512)===56320}function h2(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):m2(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=w0;function b2(n,e){for(var t="",a=0;a>>0}return r}De.join32=g2;function T2(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=T2;function v2(n,e){return n>>>e|n<<32-e}De.rotr32=v2;function w2(n,e){return n<>>32-e}De.rotl32=w2;function _2(n,e){return n+e>>>0}De.sum32=_2;function k2(n,e,t){return n+e+t>>>0}De.sum32_3=k2;function A2(n,e,t,a){return n+e+t+a>>>0}De.sum32_4=A2;function E2(n,e,t,a,i){return n+e+t+a+i>>>0}De.sum32_5=E2;function M2(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=M2;function C2(n,e,t,a){var i=e+a>>>0,r=(i>>0}De.sum64_hi=C2;function I2(n,e,t,a){var i=e+a;return i>>>0}De.sum64_lo=I2;function S2(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=S2;function R2(n,e,t,a,i,r,s,o){var l=e+a+r+o;return l>>>0}De.sum64_4_lo=R2;function P2(n,e,t,a,i,r,s,o,l,p){var f=0,x=e;x=x+a>>>0,f+=x>>0,f+=x>>0,f+=x>>0,f+=x>>0}De.sum64_5_hi=P2;function N2(n,e,t,a,i,r,s,o,l,p){var f=e+a+r+o+p;return f>>>0}De.sum64_5_lo=N2;function D2(n,e,t){var a=e<<32-t|n>>>t;return a>>>0}De.rotr64_hi=D2;function O2(n,e,t){var a=n<<32-t|e>>>t;return a>>>0}De.rotr64_lo=O2;function B2(n,e,t){return n>>>t}De.shr64_hi=B2;function F2(n,e,t){var a=n<<32-t|e>>>t;return a>>>0}De.shr64_lo=F2});var dr=ae(E0=>{"use strict";var A0=Sn(),L2=ur();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}E0.BlockHash=Mo;Mo.prototype.update=function(e,t){if(e=A0.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=A0.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 U2=Sn(),Kn=U2.rotr32;function V2(n,e,t,a){if(n===0)return M0(e,t,a);if(n===1||n===3)return I0(e,t,a);if(n===2)return C0(e,t,a)}ha.ft_1=V2;function M0(n,e,t){return n&e^~n&t}ha.ch32=M0;function C0(n,e,t){return n&e^n&t^e&t}ha.maj32=C0;function I0(n,e,t){return n^e^t}ha.p32=I0;function j2(n){return Kn(n,2)^Kn(n,13)^Kn(n,22)}ha.s0_256=j2;function H2(n){return Kn(n,6)^Kn(n,11)^Kn(n,25)}ha.s1_256=H2;function q2(n){return Kn(n,7)^Kn(n,18)^n>>>3}ha.g0_256=q2;function G2(n){return Kn(n,17)^Kn(n,19)^n>>>10}ha.g1_256=G2});var P0=ae(($3,R0)=>{"use strict";var lr=Sn(),z2=dr(),W2=zd(),Wd=lr.rotl32,is=lr.sum32,K2=lr.sum32_5,J2=W2.ft_1,S0=z2.BlockHash,$2=[1518500249,1859775393,2400959708,3395469782];function Jn(){if(!(this instanceof Jn))return new Jn;S0.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}lr.inherits(Jn,S0);R0.exports=Jn;Jn.blockSize=512;Jn.outSize=160;Jn.hmacStrength=80;Jn.padLength=64;Jn.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 pr=Sn(),Q2=dr(),yr=zd(),Y2=ur(),Rn=pr.sum32,X2=pr.sum32_4,Z2=pr.sum32_5,ex=yr.ch32,tx=yr.maj32,nx=yr.s0_256,ax=yr.s1_256,ix=yr.g0_256,rx=yr.g1_256,N0=Q2.BlockHash,sx=[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 $n(){if(!(this instanceof $n))return new $n;N0.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=sx,this.W=new Array(64)}pr.inherits($n,N0);D0.exports=$n;$n.blockSize=512;$n.outSize=256;$n.hmacStrength=192;$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 Jd=Sn(),O0=Kd();function xa(){if(!(this instanceof xa))return new xa;O0.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}Jd.inherits(xa,O0);B0.exports=xa;xa.blockSize=512;xa.outSize=224;xa.hmacStrength=192;xa.padLength=64;xa.prototype._digest=function(e){return e==="hex"?Jd.toHex32(this.h.slice(0,7),"big"):Jd.split32(this.h.slice(0,7),"big")}});var Yd=ae((X3,j0)=>{"use strict";var Zt=Sn(),ox=dr(),ux=ur(),Qn=Zt.rotr64_hi,Yn=Zt.rotr64_lo,L0=Zt.shr64_hi,U0=Zt.shr64_lo,Fa=Zt.sum64,$d=Zt.sum64_hi,Qd=Zt.sum64_lo,dx=Zt.sum64_4_hi,lx=Zt.sum64_4_lo,px=Zt.sum64_5_hi,yx=Zt.sum64_5_lo,V0=ox.BlockHash,fx=[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 Pn(){if(!(this instanceof Pn))return new Pn;V0.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=fx,this.W=new Array(160)}Zt.inherits(Pn,V0);j0.exports=Pn;Pn.blockSize=1024;Pn.outSize=512;Pn.hmacStrength=192;Pn.padLength=128;Pn.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 Xd=Sn(),H0=Yd();function ba(){if(!(this instanceof ba))return new ba;H0.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}Xd.inherits(ba,H0);q0.exports=ba;ba.blockSize=1024;ba.outSize=384;ba.hmacStrength=192;ba.padLength=128;ba.prototype._digest=function(e){return e==="hex"?Xd.toHex32(this.h.slice(0,12),"big"):Xd.split32(this.h.slice(0,12),"big")}});var z0=ae(fr=>{"use strict";fr.sha1=P0();fr.sha224=F0();fr.sha256=Kd();fr.sha384=G0();fr.sha512=Yd()});var Y0=ae(Q0=>{"use strict";var xi=Sn(),Ex=dr(),Co=xi.rotl32,W0=xi.sum32,rs=xi.sum32_3,K0=xi.sum32_4,$0=Ex.BlockHash;function Xn(){if(!(this instanceof Xn))return new Xn;$0.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}xi.inherits(Xn,$0);Q0.ripemd160=Xn;Xn.blockSize=512;Xn.outSize=160;Xn.hmacStrength=192;Xn.padLength=64;Xn.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,f=r,x=s,I=o,_=0;_<80;_++){var v=W0(Co(K0(a,J0(_,i,r,s),e[Ix[_]+t],Mx(_)),Rx[_]),o);a=o,o=s,s=Co(r,10),r=i,i=v,v=W0(Co(K0(l,J0(79-_,p,f,x),e[Sx[_]+t],Cx(_)),Px[_]),I),l=I,I=x,x=Co(f,10),f=p,p=v}v=rs(this.h[1],r,x),this.h[1]=rs(this.h[2],s,I),this.h[2]=rs(this.h[3],o,l),this.h[3]=rs(this.h[4],a,p),this.h[4]=rs(this.h[0],i,f),this.h[0]=v};Xn.prototype._digest=function(e){return e==="hex"?xi.toHex32(this.h,"little"):xi.split32(this.h,"little")};function J0(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 Mx(n){return n<=15?0:n<=31?1518500249:n<=47?1859775393:n<=63?2400959708:2840853838}function Cx(n){return n<=15?1352829926:n<=31?1548603684:n<=47?1836072691:n<=63?2053994217:0}var Ix=[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],Sx=[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],Rx=[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],Px=[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 Z0=ae((n8,X0)=>{"use strict";var Nx=Sn(),Dx=ur();function cr(n,e,t){if(!(this instanceof cr))return new cr(n,e,t);this.Hash=n,this.blockSize=n.blockSize/8,this.outSize=n.outSize/8,this.inner=null,this.outer=null,this._init(Nx.toArray(e,t))}X0.exports=cr;cr.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),Dx(e.length<=this.blockSize);for(var t=e.length;t{var Dt=ef;Dt.utils=Sn();Dt.common=dr();Dt.sha=z0();Dt.ripemd=Y0();Dt.hmac=Z0();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 bl=ae((xl,If)=>{"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&&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],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],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=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,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,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,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 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=a(_,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=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 I={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 _l<"u"?Rf.exports=I:typeof define=="function"&&define.amd?define(I):n&&(n.scrypt&&(n._scrypt=n.scrypt),n.scrypt=I)})(_l)});var nc=ae((z4,tc)=>{"use strict";var Xo="qpzry9x8gf2tvdw0s3jn54khce6mua7l",Cl={};for(ms=0;ms>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 Zf(n){for(var e=1,t=0;t126)return"Invalid prefix ("+n+")";e=_r(e)^a>>5}for(e=_r(e),t=0;tt)throw new TypeError("Exceeds length limit");n=n.toLowerCase();var a=Zf(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=_r(a)^s,i+=Xo.charAt(s)}for(r=0;r<6;++r)a=_r(a);for(a^=1,r=0;r<6;++r){var o=a>>(5-r)*5&31;i+=Xo.charAt(o)}return i}function ec(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=Zf(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 b5(){var n=ec.apply(null,arguments);if(typeof n=="object")return n}function g5(n){var e=ec.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,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(I,_){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)I(U);else if(typeof x=="function")try{return Promise.resolve(x(L,null,U)).then(function(H){H?S(L,null,U):I(U)}).catch(_)}catch(H){_(H)}else L=0}function t(a){this.name="ArgumentError",this.message=a}return n})});var ap=ae(xu=>{"use strict";Object.defineProperty(xu,"__esModule",{value:!0});xu.$dictionary=void 0;xu.$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 Ls=ae((ZA,hm)=>{hm.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}});var rp=ae(Ga=>{var Ce=Ls(),ip=()=>[{type:Ce.RANGE,from:48,to:57}],xm=()=>[{type:Ce.CHAR,value:95},{type:Ce.RANGE,from:97,to:122},{type:Ce.RANGE,from:65,to:90}].concat(ip()),bm=()=>[{type:Ce.CHAR,value:9},{type:Ce.CHAR,value:10},{type:Ce.CHAR,value:11},{type:Ce.CHAR,value:12},{type:Ce.CHAR,value:13},{type:Ce.CHAR,value:32},{type:Ce.CHAR,value:160},{type:Ce.CHAR,value:5760},{type:Ce.RANGE,from:8192,to:8202},{type:Ce.CHAR,value:8232},{type:Ce.CHAR,value:8233},{type:Ce.CHAR,value:8239},{type:Ce.CHAR,value:8287},{type:Ce.CHAR,value:12288},{type:Ce.CHAR,value:65279}],db=()=>[{type:Ce.CHAR,value:10},{type:Ce.CHAR,value:13},{type:Ce.CHAR,value:8232},{type:Ce.CHAR,value:8233}];Ga.words=()=>({type:Ce.SET,set:xm(),not:!1});Ga.notWords=()=>({type:Ce.SET,set:xm(),not:!0});Ga.ints=()=>({type:Ce.SET,set:ip(),not:!1});Ga.notInts=()=>({type:Ce.SET,set:ip(),not:!0});Ga.whitespace=()=>({type:Ce.SET,set:bm(),not:!1});Ga.notWhitespace=()=>({type:Ce.SET,set:bm(),not:!0});Ga.anyChar=()=>({type:Ce.SET,set:db(),not:!0})});var Tm=ae(Us=>{var gm=Ls(),Fr=rp(),lb="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?",pb={0:0,t:9,n:10,v:11,f:12,r:13};Us.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 f=a?8:r?parseInt(r,16):s?parseInt(s,16):o?parseInt(o,8):l?lb.indexOf(l):pb[p],x=String.fromCharCode(f);return/[[\]{}^$.|?*+()]/.test(x)&&(x="\\"+x),x}),n};Us.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(Fr.words());else if(i[2])t.push(Fr.ints());else if(i[3])t.push(Fr.whitespace());else if(i[4])t.push(Fr.notWords());else if(i[5])t.push(Fr.notInts());else if(i[6])t.push(Fr.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,a.lastIndex];Us.error(e,"Unterminated character class")};Us.error=(n,e)=>{throw new SyntaxError("Invalid regular expression: /"+n+"/: "+e)}});var vm=ae(Vs=>{var bu=Ls();Vs.wordBoundary=()=>({type:bu.POSITION,value:"b"});Vs.nonWordBoundary=()=>({type:bu.POSITION,value:"B"});Vs.begin=()=>({type:bu.POSITION,value:"^"});Vs.end=()=>({type:bu.POSITION,value:"$"})});var wm=ae((aE,sp)=>{var Lr=Tm(),_n=Ls(),Ii=rp(),gu=vm();sp.exports=n=>{var e=0,t,a,i={type:_n.ROOT,stack:[]},r=i,s=i.stack,o=[],l=O=>{Lr.error(n,`Nothing to repeat at column ${O-1}`)},p=Lr.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}))}};_m.exports=za});var Em=ae((rE,Am)=>{var Tu=wm(),js=km(),Si=Tu.types;Am.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=Tu(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 a,i,r,s,o;switch(e.type){case Si.ROOT:case Si.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 yb=Ri&&Ri.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ri,"__esModule",{value:!0});Ri.RandomGenerator=void 0;var fb=yb(Em()),cb;(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 fb.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()}})(cb=Ri.RandomGenerator||(Ri.RandomGenerator={}))});var qs=ae(Ur=>{"use strict";var mb=Ur&&Ur.__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(Ur,"__esModule",{value:!0});Ur.TypeGuardError=void 0;var hb=function(n){mb(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);Ur.TypeGuardError=hb});var Cm=ae(vu=>{"use strict";Object.defineProperty(vu,"__esModule",{value:!0});vu.$any=void 0;var xb=function(n){return n!==void 0?JSON.parse(JSON.stringify(n)):void 0};vu.$any=xb});var Im=ae(wu=>{"use strict";Object.defineProperty(wu,"__esModule",{value:!0});wu.$every=void 0;var bb=function(n,e){for(var t=null,a=0;a{"use strict";Object.defineProperty(_u,"__esModule",{value:!0});_u.$guard=void 0;var gb=qs(),Tb=function(n){return function(e,t){if(e===!0)throw new gb.TypeGuardError({method:n,path:t.path,expected:t.expected,value:t.value});return!1}};_u.$guard=Tb});var Rm=ae(ku=>{"use strict";Object.defineProperty(ku,"__esModule",{value:!0});ku.$is_between=void 0;var vb=function(n,e,t){return e<=n&&n<=t};ku.$is_between=vb});var Pm=ae(Au=>{"use strict";Object.defineProperty(Au,"__esModule",{value:!0});Au.$is_custom=void 0;var wb=ap(),_b=function(n,e,t,a){var i,r=(i=wb.$dictionary.get(n))===null||i===void 0?void 0:i.get(e);return r===void 0?!0:r(t)(a)};Au.$is_custom=_b});var Nm=ae(Eu=>{"use strict";Object.defineProperty(Eu,"__esModule",{value:!0});Eu.$is_date=void 0;var kb=function(n){return Ab.test(n)};Eu.$is_date=kb;var Ab=/^(\d{4})-(\d{2})-(\d{2})$/});var Dm=ae(Mu=>{"use strict";Object.defineProperty(Mu,"__esModule",{value:!0});Mu.$is_datetime=void 0;var Eb=function(n){return!isNaN(new Date(n).getTime())};Mu.$is_datetime=Eb});var Om=ae(Cu=>{"use strict";Object.defineProperty(Cu,"__esModule",{value:!0});Cu.$is_email=void 0;var Mb=function(n){return Cb.test(n)};Cu.$is_email=Mb;var Cb=/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i});var Bm=ae(Iu=>{"use strict";Object.defineProperty(Iu,"__esModule",{value:!0});Iu.$is_ipv4=void 0;var Ib=function(n){return Sb.test(n)};Iu.$is_ipv4=Ib;var Sb=/^(?: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(Su=>{"use strict";Object.defineProperty(Su,"__esModule",{value:!0});Su.$is_ipv6=void 0;var Rb=function(n){return Pb.test(n)};Su.$is_ipv6=Rb;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 Lm=ae(Ru=>{"use strict";Object.defineProperty(Ru,"__esModule",{value:!0});Ru.$is_url=void 0;var Nb=function(n){return Db.test(n)};Ru.$is_url=Nb;var Db=/^[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(Pu=>{"use strict";Object.defineProperty(Pu,"__esModule",{value:!0});Pu.$is_uuid=void 0;var Ob=function(n){return Bb.test(n)};Pu.$is_uuid=Ob;var Bb=/^(?:[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(Nu=>{"use strict";Object.defineProperty(Nu,"__esModule",{value:!0});Nu.$join=void 0;var Fb=function(n){return Lb(n)?".".concat(n):"[".concat(JSON.stringify(n),"]")};Nu.$join=Fb;var Lb=function(n){return Ub(n)===!1&&/^[a-zA-Z_$][a-zA-Z_$0-9]*$/g.test(n)},Ub=function(n){return Vb.has(n)},Vb=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(Du=>{"use strict";Object.defineProperty(Du,"__esModule",{value:!0});Du.$number=void 0;var jb=qs(),Hb=function(n){if(isFinite(n)===!1)throw new jb.TypeGuardError({method:"typia.stringify",expected:"number",value:n,message:"Error on typia.stringify(): infinite or not a number."});return n};Du.$number=Hb});var Hm=ae(Ou=>{"use strict";Object.defineProperty(Ou,"__esModule",{value:!0});Ou.$report=void 0;var qb=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}};Ou.$report=qb});var qm=ae(Bu=>{"use strict";Object.defineProperty(Bu,"__esModule",{value:!0});Bu.$rest=void 0;var Gb=function(n){return n.length===2?"":","+n.substring(1,n.length-1)};Bu.$rest=Gb});var Gm=ae(Fu=>{"use strict";Object.defineProperty(Fu,"__esModule",{value:!0});Fu.$string=void 0;var zb=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,'"')};Fu.$string=zb});var zm=ae(Lu=>{"use strict";Object.defineProperty(Lu,"__esModule",{value:!0});Lu.$tail=void 0;var Wb=function(n){return n[n.length-1]===","?n.substring(0,n.length-1):n};Lu.$tail=Wb});var $m=ae(Pi=>{"use strict";var Gt=Pi&&Pi.__assign||function(){return Gt=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 Gt(Gt({},n.is()),{number:r1.$number,string:u1.$string,tail:d1.$tail,rest:o1.$rest,throws:e(t)})},n.clone=function(t){return Gt(Gt({},n.is()),{throws:e(t),any:Kb.$any})},n.prune=function(t){return Gt(Gt({},n.is()),{throws:e(t)})},n.random=function(){return{generator:Wm.RandomGenerator,pick:Wm.RandomGenerator.pick}};var e=function(t){return function(a){throw new Km.TypeGuardError(Gt(Gt({},a),{method:"typia.".concat(t)}))}}})(l1=Pi.Namespace||(Pi.Namespace={}))});var Qm=ae(Gs=>{"use strict";Object.defineProperty(Gs,"__esModule",{value:!0});Gs.MapUtil=void 0;var p1;(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}}})(p1=Gs.MapUtil||(Gs.MapUtil={}))});var Xm=ae(Ym=>{"use strict";Object.defineProperty(Ym,"__esModule",{value:!0})});var e6=ae(Zm=>{"use strict";Object.defineProperty(Zm,"__esModule",{value:!0})});var n6=ae(t6=>{"use strict";Object.defineProperty(t6,"__esModule",{value:!0})});var i6=ae(a6=>{"use strict";Object.defineProperty(a6,"__esModule",{value:!0})});var s6=ae(r6=>{"use strict";Object.defineProperty(r6,"__esModule",{value:!0})});var u6=ae(o6=>{"use strict";Object.defineProperty(o6,"__esModule",{value:!0})});var gp=ae(z=>{"use strict";var y1=z&&z.__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]}),Ni=z&&z.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&y1(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 Vr=ap(),Ie=$m(),f1=Qm();Ni(Xm(),z);Ni(e6(),z);Ni(n6(),z);Ni(i6(),z);Ni(s6(),z);Ni(u6(),z);Ni(qs(),z);function op(){re("assert")}z.assert=op;Object.assign(op,Ie.Namespace.assert("assert"));function up(){re("assertType")}z.assertType=up;Object.assign(up,Ie.Namespace.assert("assertType"));function Uu(){re("is")}z.is=Uu;Object.assign(Uu,Ie.Namespace.assert("is"));function Vu(){re("validate")}z.validate=Vu;Object.assign(Vu,Ie.Namespace.validate());function dp(){re("assertEquals")}z.assertEquals=dp;Object.assign(dp,Ie.Namespace.assert("assertEquals"));function lp(){re("equals")}z.equals=lp;Object.assign(lp,Ie.Namespace.is());function pp(){re("validateEquals")}z.validateEquals=pp;Object.assign(pp,Ie.Namespace.validate());z.customValidators={size:function(n){var e,t;return n?(t=(e=Vr.$dictionary.get(n))===null||e===void 0?void 0:e.size)!==null&&t!==void 0?t:0:Vr.$dictionary.size},has:function(n){return function(e){var t,a;return(a=(t=Vr.$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=Vr.$dictionary.get(n))===null||t===void 0?void 0:t.get(e)}},insert:function(n){return function(e){return function(t){var a=f1.MapUtil.take(Vr.$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=Vr.$dictionary.get(n))===null||t===void 0?void 0:t.delete(e))!==null&&a!==void 0?a:!1}}};function c1(){re("application")}z.application=c1;function yp(){re("assertParse")}z.assertParse=yp;Object.assign(yp,Ie.Namespace.assert("assertParse"));function fp(){re("isParse")}z.isParse=fp;Object.assign(fp,Uu);function cp(){re("validateParse")}z.validateParse=cp;Object.assign(cp,Vu);function mp(){re("stringify")}z.stringify=mp;Object.assign(mp,Ie.Namespace.stringify("stringify"));function ju(){re("assertStringify")}z.assertStringify=ju;Object.assign(ju,Ie.Namespace.assert("assertStringify"));Object.assign(ju,Ie.Namespace.stringify("assertStringify"));function Hu(){re("isStringify")}z.isStringify=Hu;Object.assign(Hu,Ie.Namespace.is());Object.assign(Hu,Ie.Namespace.stringify("isStringify"));function qu(){re("validateStringify")}z.validateStringify=qu;Object.assign(qu,Ie.Namespace.validate());Object.assign(qu,Ie.Namespace.stringify("validateStringify"));function m1(){re("metadata")}z.metadata=m1;function hp(){re("random")}z.random=hp;Object.assign(hp,Ie.Namespace.random());function h1(){re("literals")}z.literals=h1;function xp(){re("clone")}z.clone=xp;Object.assign(xp,Ie.Namespace.clone("clone"));function Gu(){re("assertClone")}z.assertClone=Gu;Object.assign(Gu,Ie.Namespace.assert("assertClone"));Object.assign(Gu,Ie.Namespace.clone("assertClone"));function zu(){re("isClone")}z.isClone=zu;Object.assign(zu,Ie.Namespace.is());Object.assign(zu,Ie.Namespace.clone("isClone"));function Wu(){re("validateClone")}z.validateClone=Wu;Object.assign(Wu,Ie.Namespace.validate());Object.assign(Wu,Ie.Namespace.clone("validateClone"));function bp(){re("prune")}z.prune=bp;Object.assign(bp,Ie.Namespace.prune("prune"));function Ku(){re("assertPrune")}z.assertPrune=Ku;Object.assign(Ku,Ie.Namespace.assert("assertPrune"));Object.assign(Ku,Ie.Namespace.prune("assertPrune"));function Ju(){re("isPrune")}z.isPrune=Ju;Object.assign(Ju,Ie.Namespace.is());Object.assign(Ju,Ie.Namespace.prune("isPrune"));function $u(){re("validatePrune")}z.validatePrune=$u;Object.assign($u,Ie.Namespace.prune("validatePrune"));Object.assign($u,Ie.Namespace.validate());function d6(){re("createAssert")}z.createAssert=d6;Object.assign(d6,op);function l6(){re("createAssertType")}z.createAssertType=l6;Object.assign(l6,up);function p6(){re("createIs")}z.createIs=p6;Object.assign(p6,Uu);function y6(){re("createValidate")}z.createValidate=y6;Object.assign(y6,Vu);function f6(){re("createAssertEquals")}z.createAssertEquals=f6;Object.assign(f6,dp);function c6(){re("createEquals")}z.createEquals=c6;Object.assign(c6,lp);function m6(){re("createValidateEquals")}z.createValidateEquals=m6;Object.assign(m6,pp);function h6(){re("createIsParse")}z.createIsParse=h6;Object.assign(h6,fp);function x6(){re("createAssertParse")}z.createAssertParse=x6;Object.assign(x6,yp);function b6(){re("createValidateParse")}z.createValidateParse=b6;Object.assign(b6,cp);function g6(){re("createStringify")}z.createStringify=g6;Object.assign(g6,mp);function T6(){re("createAssertStringify")}z.createAssertStringify=T6;Object.assign(T6,ju);function v6(){re("createIsStringify")}z.createIsStringify=v6;Object.assign(v6,Hu);function w6(){re("createValidateStringify")}z.createValidateStringify=w6;Object.assign(w6,qu);function _6(){re("createRandom")}z.createRandom=_6;Object.assign(_6,hp);function k6(){re("createClone")}z.createClone=k6;Object.assign(k6,xp);function A6(){re("createAssertClone")}z.createAssertClone=A6;Object.assign(A6,Gu);function E6(){re("createIsClone")}z.createIsClone=E6;Object.assign(E6,zu);function M6(){re("createValidateClone")}z.createValidateClone=M6;Object.assign(M6,Wu);function C6(){re("createPrune")}z.createPrune=C6;Object.assign(C6,bp);function I6(){re("createAssertPrune")}z.createAssertPrune=I6;Object.assign(I6,Ku);function S6(){re("createIsPrune")}z.createIsPrune=S6;Object.assign(S6,Ju);function R6(){re("createValidatePrune")}z.createValidatePrune=R6;Object.assign(R6,$u);function re(n){throw new Error("Error on typia.".concat(n,'(): no transform has been configured. Run "npx typia setup" command.'))}});var N6=ae(An=>{"use strict";var P6=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]}),x1=An&&An.__setModuleDefault||(Object.create?function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}:function(n,e){n.default=e}),b1=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)&&P6(e,n,t);return x1(e,n),e},g1=An&&An.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&P6(e,n,t)};Object.defineProperty(An,"__esModule",{value:!0});var T1=b1(gp());An.default=T1;g1(gp(),An)});var ql={};Ki(ql,{BaseContract:()=>hr,BigNumber:()=>F,Contract:()=>oe,ContractFactory:()=>vi,FixedNumber:()=>ht,Signer:()=>Nt,VoidSigner:()=>ma,Wallet:()=>ln,Wordlist:()=>wn,constants:()=>gt,errors:()=>$t,getDefaultProvider:()=>lu,logger:()=>Fc,providers:()=>ra,utils:()=>te,version:()=>yu,wordlists:()=>_i});var yy=Cn(xd());var ty="logger/5.7.0";var ny=!1,ay=!1,eo={debug:1,default:2,info:2,warning:3,error:4,off:5},iy=eo.default,bd=null;function dh(){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 ry=dh(),gd;(function(n){n.DEBUG="DEBUG",n.INFO="INFO",n.WARNING="WARNING",n.ERROR="ERROR",n.OFF="OFF"})(gd||(gd={}));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 sy="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),!(iy>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(ay)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 f="";for(let x=0;x>4],f+=sy[p[x]&15];i.push(l+"=Uint8Array(0x"+f+")")}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"),ry&&this.throwError("platform missing String.prototype.normalize",E.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:ry})}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 bd||(bd=new E(ty)),bd}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",E.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),ny){if(!e)return;this.globalLogger().throwError("error censorship permanent",E.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}ay=!!e,ny=!!t}static setLogLevel(e){let t=eo[e.toLowerCase()];if(t==null){E.globalLogger().warn("invalid log level - "+e);return}iy=t}static from(e){return new E(e)}};E.errors=$t;E.levels=gd;var oy="bytes/5.7.0";var kt=new E(oy);function dy(n){return!!n.toHexString}function Ji(n){return n.slice||(n.slice=function(){let e=Array.prototype.slice.call(arguments);return Ji(new Uint8Array(Array.prototype.slice.apply(n,e)))}),n}function la(n){return ie(n)&&!(n.length%2)||fn(n)}function uy(n){return typeof n=="number"&&n==n&&n%1===0}function fn(n){if(n==null)return!1;if(n.constructor===Uint8Array)return!0;if(typeof n=="string"||!uy(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),Ji(new Uint8Array(t))}if(e.allowMissingPrefix&&typeof n=="string"&&n.substring(0,2)!=="0x"&&(n="0x"+n),dy(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),Ji(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),Ji(t)}function ie(n,e){return!(typeof n!="string"||!n.match(/^0x[0-9A-Fa-f]*$/)||e&&n.length!==2+2*e)}var Td="0123456789abcdef";function W(n,e){if(e||(e={}),typeof n=="number"){kt.checkSafeUint53(n,"invalid hexlify value");let t="";for(;n;)t=Td[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),dy(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(fn(n)){let t="0x";for(let a=0;a>4]+Td[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 At(n){let e="0x";return n.forEach(t=>{e+=W(t).substring(2)}),e}function qn(n){let e=vd(W(n,{hexPad:"left"}));return e==="0x"?"0x0":e}function vd(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=pi(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=me(e.r,32),e.s==null||!ie(e.s)?kt.throwArgumentError("signature missing or invalid s","signature",n):e.s=me(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=me(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 zr(n){return n=Gn(n),W(ye([n.r,n.s,n.recoveryParam?"0x1c":"0x1b"]))}var to="bignumber/5.7.0";var Wr=yy.default.BN,pa=new E(to),wd={},ly=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"||fn(n))}var py=!1,F=class{constructor(e,t){e!==wd&&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()&&cn("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()&&cn("division-by-zero","mod"),Qt(ge(this).umod(t))}pow(e){let t=ge(e);return t.isNeg()&&cn("negative-power","pow"),Qt(ge(this).pow(t))}and(e){let t=ge(e);return(this.isNegative()||t.isNeg())&&cn("unbound-bitwise-result","and"),Qt(ge(this).and(t))}or(e){let t=ge(e);return(this.isNegative()||t.isNeg())&&cn("unbound-bitwise-result","or"),Qt(ge(this).or(t))}xor(e){let t=ge(e);return(this.isNegative()||t.isNeg())&&cn("unbound-bitwise-result","xor"),Qt(ge(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&cn("negative-width","mask"),Qt(ge(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&cn("negative-width","shl"),Qt(ge(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&cn("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{cn("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?py||(py=!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(wd,Kr(e)):e.match(/^-?[0-9]+$/)?new F(wd,Kr(new Wr(e))):pa.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&cn("underflow","BigNumber.from",e),(e>=ly||e<=-ly)&&cn("overflow","BigNumber.from",e),F.from(String(e));let t=e;if(typeof t=="bigint")return F.from(t.toString());if(fn(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 Kr(n){if(typeof n!="string")return Kr(n.toString(16));if(n[0]==="-")return n=n.substring(1),n[0]==="-"&&pa.throwArgumentError("invalid hex","value",n),n=Kr(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(Kr(n))}function ge(n){let e=F.from(n).toHexString();return e[0]==="-"?new Wr("-"+e.substring(3),16):new Wr(e.substring(2),16)}function cn(n,e,t){let a={fault:n,operation:e};return t!=null&&(a.value=t),pa.throwError(n,E.errors.NUMERIC_FAULT,a)}function _d(n){return new Wr(n,36).toString(16)}function kd(n){return new Wr(n,16).toString(36)}var zt=new E(to),Jr={},my=F.from(0),hy=F.from(-1);function xy(n,e,t,a){let i={fault:e,operation:t};return a!==void 0&&(i.value=a),zt.throwError(n,E.errors.NUMERIC_FAULT,i)}var $r="0";for(;$r.length<256;)$r+=$r;function Ad(n){if(typeof n!="number")try{n=F.from(n).toNumber()}catch{}return typeof n=="number"&&n>=0&&n<=256&&!(n%1)?"1"+$r.substring(0,n):zt.throwArgumentError("invalid decimal size","decimals",n)}function $i(n,e){e==null&&(e=0);let t=Ad(e);n=F.from(n);let a=n.lt(my);a&&(n=n.mul(hy));let i=n.mod(t).toString();for(;i.length2&&zt.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&&xy("fractional component exceeds decimals","underflow","parseFixed"),s===""&&(s="0");s.lengthe[s]==null?l:(typeof e[s]!==o&&zt.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&&zt.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",a),i>80&&zt.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new ya(Jr,t,a,i)}},ht=class{constructor(e,t,a,i){e!==Jr&&zt.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&&zt.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(cy.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(cy.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 a=ht.from("1"+$r.substring(0,e),this.format),i=lh.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&&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 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($i(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(my)&&xy("unsigned value cannot be negative","overflow","value",e);let r=null;a.signed?r=i.toTwos(a.width).toHexString():(r=i.toHexString(),r=me(r,a.width/8));let s=$i(i,a.decimals);return new ht(Jr,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=$i(i,a.decimals);return new ht(Jr,r,s,a)}static from(e,t){if(typeof e=="string")return ht.fromString(e,t);if(fn(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 zt.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}},cy=ht.from(1),lh=ht.from("0.5");var by="properties/5.7.0";var ph=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},no=new E(by);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 ph(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 Qi(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 yh={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function gy(n){if(n==null||yh[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 fh(n)}var an=class{constructor(e){for(let t in e)this[t]=xt(e[t])}};var zn="abi/5.7.0";var ve=new E(zn),yi={},Ty={calldata:!0,memory:!0,storage:!0},ch={calldata:!0,memory:!0};function ao(n,e){if(n==="bytes"||n==="string"){if(Ty[e])return!0}else if(n==="address"){if(e==="payable")return!0}else if((n.indexOf("[")>=0||n==="tuple")&&ch[e])return!0;return(Ty[e]||e==="payable")&&ve.throwArgumentError("invalid modifier","name",e),!1}function mh(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"?ct.fromString(e,t):ct.fromObject(e)}static fromObject(e){return ct.isParamType(e)?e:new ct(yi,{name:e.name||null,type:Yi(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(ct.fromObject):null})}static fromString(e,t){function a(i){return ct.fromObject({name:i.name,type:i.type,indexed:i.indexed,components:i.components})}return a(mh(e,!!t))}static isParamType(e){return!!(e!=null&&e._isParamType)}};function Qr(n,e){return bh(n).map(t=>ct.fromString(t,e))}var Kt=class{constructor(e,t){e!==yi&&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:Yr(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(ct.fromObject):[],type:"event"};return new Wt(yi,t)}static fromString(e){let t=e.match(Xr);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:Qr(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}};function wy(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 _y(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 ky(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=ky(e);t.constant&&ve.throwArgumentError("constructor cannot be constant","value",e);let a={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(yi,a)}static fromString(e){let t={type:"constructor"};e=wy(e,t);let a=e.match(Xr);return(!a||a[1].trim()!=="constructor")&&ve.throwArgumentError("invalid constructor string","value",e),t.inputs=Qr(a[2].trim(),!1),_y(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=ky(e),a={type:e.type,name:Yr(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(yi,a)}static fromString(e){let t={type:"function"};e=wy(e,t);let a=e.split(" returns ");a.length>2&&ve.throwArgumentError("invalid function string","value",e);let i=a[0].match(Xr);if(i||ve.throwArgumentError("invalid function signature","value",e),t.name=i[1].trim(),t.name&&Yr(t.name),t.inputs=Qr(i[2],!1),_y(i[3].trim(),t),a.length>1){let r=a[1].match(Xr);(r[1].trim()!=""||r[3].trim()!="")&&ve.throwArgumentError("unexpected tokens","value",e),t.outputs=Qr(r[2],!1)}else t.outputs=[];return Ut.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}};function vy(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:Yr(e.name),inputs:e.inputs?e.inputs.map(ct.fromObject):[]};return vy(new rn(yi,t))}static fromString(e){let t={type:"error"},a=e.match(Xr);return a||ve.throwArgumentError("invalid error signature","value",e),t.name=a[1].trim(),t.name&&Yr(t.name),t.inputs=Qr(a[2],!1),vy(rn.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}};function Yi(n){return n.match(/^uint($|[^1-9])/)?n="uint256"+n.substring(4):n.match(/^int($|[^1-9])/)&&(n="int256"+n.substring(3)),n}var xh=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function Yr(n){return(!n||!n.match(xh))&&ve.throwArgumentError(`invalid identifier "${n}"`,"value",n),n}var Xr=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function bh(n){n=n.trim();let e=[],t="",a=0;for(let i=0;ithis.wordSize&&Ed.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)}}},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:Ed.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 Ey=Cn(Ay());function fe(n){return"0x"+Ey.default.keccak_256(j(n))}var so={};Ki(so,{decode:()=>Zr,encode:()=>fa});var My="rlp/5.7.0";var Wn=new E(My);function Cy(n){let e=[];for(;n;)e.unshift(n&255),n>>=8;return e}function Iy(n,e,t){let a=0;for(let i=0;ie+1+a&&Wn.throwError("child data too short",E.errors.BUFFER_OVERRUN,{})}return{consumed:1+a,result:i}}function Py(n,e){if(n.length===0&&Wn.throwError("data too short",E.errors.BUFFER_OVERRUN,{}),n[e]>=248){let t=n[e]-247;e+1+t>n.length&&Wn.throwError("data short segment too short",E.errors.BUFFER_OVERRUN,{});let a=Iy(n,e+1,t);return e+1+t+a>n.length&&Wn.throwError("data long segment too short",E.errors.BUFFER_OVERRUN,{}),Sy(n,e,e+1+t,t+a)}else if(n[e]>=192){let t=n[e]-192;return e+1+t>n.length&&Wn.throwError("data array too short",E.errors.BUFFER_OVERRUN,{}),Sy(n,e,e+1,t)}else if(n[e]>=184){let t=n[e]-183;e+1+t>n.length&&Wn.throwError("data array too short",E.errors.BUFFER_OVERRUN,{});let a=Iy(n,e+1,t);e+1+t+a>n.length&&Wn.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&&Wn.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 Zr(n){let e=j(n),t=Py(e,0);return t.consumed!==e.length&&Wn.throwArgumentError("invalid rlp data","data",n),t.result}var Ny="address/5.7.0";var Na=new E(Ny);function Dy(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 gh=9007199254740991;function Th(n){return Math.log10?Math.log10(n):Math.log(n)/Math.LN10}var Md={};for(let n=0;n<10;n++)Md[String(n)]=String(n);for(let n=0;n<26;n++)Md[String.fromCharCode(65+n)]=String(10+n);var Oy=Math.floor(Th(gh));function By(n){n=n.toUpperCase(),n=n.substring(4)+n.substring(0,2)+"00";let e=n.split("").map(a=>Md[a]).join("");for(;e.length>=Oy;){let a=e.substring(0,Oy);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 ce(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=Dy(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)!==By(n)&&Na.throwArgumentError("bad icap checksum","address",n),e=_d(n.substring(4));e.length<40;)e="0"+e;e=Dy("0x"+e)}else Na.throwArgumentError("invalid address","address",n);return e}function Fy(n){try{return ce(n),!0}catch{}return!1}function Ly(n){let e=kd(ce(n).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+By("XE00"+e)+e}function mi(n){let e=null;try{e=ce(n.from)}catch{Na.throwArgumentError("missing from address","transaction",n)}let t=nn(j(F.from(n.nonce).toHexString()));return ce(Se(fe(fa([e,t])),12))}function Uy(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),ce(Se(fe(ye(["0xff",ce(n),e,t])),12))}var oo=class extends Et{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=ce(t)}catch(a){this._throwError(a.message,t)}return e.writeValue(t)}decode(e){return ce(me(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 Zi=new E(zn);function Cd(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 f=p.localName;return f||Zi.throwError("cannot encode object for signature with missing names",E.errors.INVALID_ARGUMENT,{argument:"values",coder:p,value:t}),l[f]&&Zi.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 Zi.throwArgumentError("invalid tuple value","tuple",t);e.length!==a.length&&Zi.throwArgumentError("types/value length mismatch","tuple",t);let i=new fi(n.wordSize),r=new fi(n.wordSize),s=[];e.forEach((l,p)=>{let f=a[p];if(l.dynamic){let x=r.length;l.encode(r,f);let I=i.writeUpdatableValue();s.push(_=>{I(_+x)})}else l.encode(i,f)}),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 Et{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&&Zi.throwError("insufficient data length",E.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let a=[];for(let i=0;imo,EtherSymbol:()=>Gy,HashZero:()=>tr,MaxInt256:()=>qy,MaxUint256:()=>bo,MinInt256:()=>Hy,NegativeOne:()=>ho,One:()=>xo,Two:()=>Vy,WeiPerEther:()=>jy,Zero:()=>er});var mo="0x0000000000000000000000000000000000000000";var ho=F.from(-1),er=F.from(0),xo=F.from(1),Vy=F.from(2),jy=F.from("1000000000000000000"),bo=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),Hy=F.from("-0x8000000000000000000000000000000000000000000000000000000000000000"),qy=F.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");var tr="0x0000000000000000000000000000000000000000000000000000000000000000";var Gy="\u039E";var go=class extends Et{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(er)||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 zy="strings/5.7.0";var Wy=new E(zy),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 vh(n,e,t,a,i){return Wy.throwArgumentError(`invalid codepoint at offset ${e}; ${n}`,"bytes",t)}function Ky(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 wh(n,e,t,a,i){return n===Vt.OVERLONG?(a.push(i),0):(a.push(65533),Ky(n,e,t,a,i))}var To=Object.freeze({error:vh,ignore:Ky,replace:wh});function Rd(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&&(Wy.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 Sd(n){let e="0000"+n.toString(16);return"\\u"+e.substring(e.length-4)}function Pd(n,e){return'"'+Rd(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?Sd(t):(t-=65536,Sd((t>>10&1023)+55296)+Sd((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(Rd(n,e))}function Da(n,e=Jt.current){return Rd(we(n,e))}function Nd(n){let e=we(n);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return W(ye([e,tr]).slice(0,32))}function Dd(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 _h(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 Jy(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 Bd(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 kh=Jy("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"),Ah="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(n=>parseInt(n,16)),Eh=[{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}],Mh=Od("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"),Ch=Od("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"),Ih=Od("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",_h),Sh=Jy("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 Rh(n){return n.reduce((e,t)=>(t.forEach(a=>{e.push(a)}),e),[])}function Ph(n){return!!Bd(n,kh)}function Nh(n){let e=Bd(n,Eh);if(e)return[n+e.s];let t=Mh[n];if(t)return t;let a=Ch[n];if(a)return[n+a[0]];let i=Ih[n];return i||null}function Dh(n){return!!Bd(n,Sh)}function Fd(n){if(n.match(/^[a-z0-9-]*$/i)&&n.length<=59)return n.toLowerCase();let e=Da(n);e=Rh(e.map(a=>{if(Ah.indexOf(a)>=0)return[];if(a>=65024&&a<=65039)return[];let i=Nh(a);return i||[a]})),e=Da(vo(e),Jt.NFKC),e.forEach(a=>{if(Dh(a))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(a=>{if(Ph(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 es{constructor(e){super("string",e)}defaultValue(){return""}encode(e,t){return super.encode(e,we(t))}decode(e){return Yt(super.decode(e))}};var hi=class extends Et{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 Cd(e,this.coders,t)}decode(e){return e.coerce(this.name,Id(e,this.coders))}};var _o=new E(zn),Oh=new RegExp(/^bytes([0-9]*)$/),Bh=new RegExp(/^(u?int)([0-9]*)$/),nr=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 hi((e.components||[]).map(a=>this._getCoder(a)),e.name);case"":return new co(e.name)}let t=e.type.match(Bh);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(Oh),t){let a=parseInt(t[1]);return(a===0||a>32)&&_o.throwArgumentError("invalid bytes length","param",e),new fo(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 fi(this._getWordSize())}getDefaultValue(e){let t=e.map(i=>this._getCoder(ct.from(i)));return new hi(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(ct.from(s))),i=new hi(a,"_"),r=this._getWriter();return i.encode(r,t),r.data}decode(e,t,a){let i=e.map(s=>this._getCoder(ct.from(s)));return new hi(i,"_").decode(this._getReader(j(t),a))}},ts=new nr;function sn(n){return fe(we(n))}var ko="hash/5.7.0";var Ld={};Ki(Ld,{decode:()=>ar,encode:()=>ir});function ar(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 Fh(n){let e={};for(let t=0;t>--l&1}let x=31,I=Math.pow(2,x),_=I>>>1,v=_>>1,S=I-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=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 Uh(n){let e=0;return()=>n[e++]}function Yy(n){return Uh(Lh(n))}function Vh(n){return n&1?~n>>1:n>>1}function jh(n,e){let t=Array(n);for(let a=0;ae[s]):t}function Xy(n){let e=[];for(;;){let t=n();if(t==0)break;e.push(Gh(t,n))}for(;;){let t=n()-1;if(t<0)break;e.push(zh(t,n))}return Fh(Qy(e))}function qh(n){let e=[];for(;;){let t=n();if(t==0)break;e.push(t)}return e}function Zy(n,e,t){let a=Array(n).fill(void 0).map(()=>[]);for(let i=0;ia[s].push(r));return a}function Gh(n,e){let t=1+e(),a=e(),i=qh(e),r=Zy(i.length,1+n,e);return Qy(r.map((s,o)=>{let l=s[0],p=s.slice(1);return Array(i[o]).fill(void 0).map((f,x)=>{let I=x*a;return[l+x*t,p.map(_=>_+I)]})}))}function zh(n,e){let t=1+e();return Zy(t,1+n,e).map(i=>[i[0],i.slice(1)])}function e0(n){let e=ns(n).sort((a,i)=>a-i);return t();function t(){let a=[];for(;;){let p=ns(n,e);if(p.length==0)break;a.push({set:new Set(p),node:t()})}a.sort((p,f)=>f.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 t0(){return Yy(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 Ao=t0(),Wh=new Set(ns(Ao)),Kh=new Set(ns(Ao)),Jh=Xy(Ao),$h=e0(Ao),n0=45,a0=95;function i0(n){return Da(n)}function Qh(n){return n.filter(e=>e!=65039)}function r0(n){for(let e of n.split(".")){let t=i0(e);try{for(let a=t.lastIndexOf(a0)-1;a>=0;a--)if(t[a]!==a0)throw new Error("underscore only allowed at start");if(t.length>=4&&t.every(a=>a<128)&&t[2]===n0&&t[3]===n0)throw new Error("invalid label extension")}catch(a){throw new Error(`Invalid label "${e}": ${a.message}`)}}return n}function s0(n){return r0(Yh(n,Qh))}function Yh(n,e){let t=i0(n).reverse(),a=[];for(;t.length;){let i=Zh(t);if(i){a.push(...e(i));continue}let r=t.pop();if(Wh.has(r)){a.push(r);continue}if(Kh.has(r))continue;let s=Jh[r];if(s){a.push(...s);continue}throw new Error(`Disallowed codepoint: 0x${r.toString(16).toUpperCase()}`)}return r0(Xh(String.fromCodePoint(...a)))}function Xh(n){return n.normalize("NFC")}function Zh(n,e){var t;let a=$h,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 e2=new E(ko),u0=new Uint8Array(32);u0.fill(0);function o0(n){if(n.length===0)throw new Error("invalid ENS name; empty component");return n}function Ud(n){let e=we(s0(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(o0(e.slice(a))),t}function Vd(n){try{return Ud(n).length!==0}catch{}return!1}function Oa(n){typeof n!="string"&&e2.throwArgumentError("invalid ENS name; not a string","name",n);let e=u0,t=Ud(n);for(;t.length;)e=fe(ye([e,fe(t.pop())]));return W(e)}function as(n){return W(ye(Ud(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 d0=`Ethereum Signed Message: +`;function rr(n){return typeof n=="string"&&(n=we(n)),fe(ye([we(d0),we(String(n.length)),n]))}var t2=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Tt=new E(ko),f0=new Uint8Array(32);f0.fill(0);var n2=F.from(-1),c0=F.from(0),m0=F.from(1),a2=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function i2(n){let e=j(n),t=e.length%32;return t?At([e,f0.slice(t)]):W(e)}var r2=me(m0.toHexString(),32),s2=me(c0.toHexString(),32),l0={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},jd=["name","version","chainId","verifyingContract","salt"];function p0(n){return function(e){return typeof e!="string"&&Tt.throwArgumentError(`invalid domain value for ${JSON.stringify(n)}`,`domain.${n}`,e),e}}var o2={name:p0("name"),version:p0("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 ce(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 Hd(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=a2.mask(t?a-1:a),r=t?i.add(m0).mul(n2):c0;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),me(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),i2(a)}}}switch(n){case"address":return function(e){return me(ce(e),32)};case"bool":return function(e){return e?r2:s2};case"bytes":return function(e){return fe(e)};case"string":return function(e){return sn(e)}}return null}function y0(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 f=p.type.match(/^([^\x5b]*)(\x5b|$)/)[1];f===o&&Tt.throwArgumentError(`circular type reference to ${JSON.stringify(f)}`,"types",e),!Hd(f)&&(a[f]||Tt.throwArgumentError(`unknown type ${JSON.stringify(f)}`,"types",e),a[f].push(o),t[o][f]=!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(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]=y0(o,e[o])+l.map(p=>y0(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=Hd(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(At(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),At(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(Hd(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=l0[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)=>jd.indexOf(a.name)-jd.indexOf(i.name)),vt.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,a){return At(["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 t2(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=[];jd.forEach(l=>{let p=e[l];p!=null&&(i[l]=o2[l](p),r.push({name:l,type:l0[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(zn);var sr=class extends an{},or=class extends an{},qd=class extends an{},ca=class extends an{static isIndexed(e){return!!(e&&e._isIndexed)}},u2={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function h0(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 ts}static getAddress(e){return ce(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(ye([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(ye([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)),f=u2[p];if(f)s=this._abiCoder.decode(f.inputs,a.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,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]),me(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 I=this.getEventTopic(e);(!ie(a[0],32)||a[0].toLowerCase()!==I)&&wt.throwError("fragment/topic mismatch",E.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:I,value:a[0]}),a=a.slice(1)}let i=[],r=[],s=[];e.inputs.forEach((I,_)=>{I.indexed?I.type==="string"||I.type==="bytes"||I.baseType==="tuple"||I.baseType==="array"?(i.push(ct.fromObject({type:"bytes32",name:I.name})),s.push(!0)):(i.push(I),s.push(!1)):(r.push(I),s.push(!1))});let o=a!=null?this._abiCoder.decode(i,ye(a)):null,l=this._abiCoder.decode(r,t,!0),p=[],f=0,x=0;e.inputs.forEach((I,_)=>{if(I.indexed)if(o==null)p[_]=new ca({_isIndexed:!0,hash:null});else if(s[_])p[_]=new ca({_isIndexed:!0,hash:o[x++]});else try{p[_]=o[x++]}catch(v){p[_]=v}else try{p[_]=l[f++]}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 h0(`property ${JSON.stringify(I.name)}`,v)}}):p[I.name]=v}});for(let I=0;I{throw h0(`index ${I}`,_)}})}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),a=this.getError(t.substring(0,10).toLowerCase());return a?new qd({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 x0="abstract-provider/5.7.0";var d2=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},l2=new E(x0),Eo=class extends an{static isForkEvent(e){return!!(e&&e._isForkEvent)}};var Xt=class{constructor(){l2.checkAbstract(new.target,Xt),B(this,"_isProvider",!0)}getFeeData(){return d2(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 b0="abstract-signer/5.7.0";var In=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},hn=new E(b0),p2=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],y2=[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 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 Re(this.checkTransaction(e));return yield this.provider.estimateGas(t)})}call(e,t){return In(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 In(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 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 a in e)p2.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 In(this,void 0,void 0,function*(){let t=yield Re(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&&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(y2.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(xd()),Zn=Cn(Zd());function mr(n,e,t){return t={path:e,exports:{},require:function(a,i){return Ox(a,i??t.path)}},n(t,t.exports),t.exports}function Ox(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var al=nf;function nf(n,e){if(!n)throw new Error(e||"Assertion failed")}nf.equal=function(e,t,a){if(e!=t)throw new Error(a||"Assertion failed: "+e+" != "+t)};var Nn=mr(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,I=f&255;x?l.push(x,I):l.push(I)}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(I>>1)-1?S=(I>>1)-L:S=L,_.isubn(S)):S=0,x[v]=S,_.iushrn(1)}return x}t.getNAF=a;function i(l,p){var f=[[],[]];l=l.clone(),p=p.clone();for(var x=0,I=0,_;l.cmpn(-x)>0||p.cmpn(-I)>0;){var v=l.andln(3)+x&3,S=p.andln(3)+I&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)+I&7,(_===3||_===5)&&v===2?O=-S:O=S),f[1].push(O),2*x===L+1&&(x=1-x),2*I===O+1&&(I=1-I),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}),Ro=on.getNAF,Bx=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 bi=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 f=this.jpoint(null,null,null),x=this.jpoint(null,null,null),I=r;I>0;I--){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];Po(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};Ua.prototype._wnafMulAdd=function(e,t,a,i,r){var s=this._wnafT1,o=this._wnafT2,l=this._wnafT3,p=0,f,x,I;for(f=0;f=1;f-=2){var v=f-1,S=f;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=Bx(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;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?I=o[x][R-1>>1]:R<0&&(I=o[x][-R-1>>1].neg()),I.type==="affine"?J=J.mixedAdd(I):J=J.add(I))}}for(f=0;f=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=f),x.negative&&(x=x.neg(),I=I.neg()),_.negative&&(_=_.neg(),v=v.neg()),[{a:x,b:I},{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),f=s.mul(i.b),x=e.sub(o).sub(l),I=p.add(f).neg();return{k1:x,k2:I}};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":""};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 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)};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,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)};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,a){var i=[this,t],r=[e,a];return this.curve.endo?this.curve._endoWnafMulAdd(i,r):this.curve._wnafMulAdd(1,i,r,2)};It.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)};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 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};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,a){bi.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}il(Ot,bi.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 f=l.redSqr(),x=f.redMul(l),I=i.redMul(f),_=p.redSqr().redIAdd(x).redISub(I).redISub(I),v=p.redMul(I.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(),f=p.redMul(o),x=a.redMul(p),I=l.redSqr().redIAdd(f).redISub(x).redISub(x),_=l.redMul(x.redISub(I)).redISub(r.redMul(f)),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 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 Io=mr(function(n,e){"use strict";var t=e;t.base=bi,t.short=Lx,t.mont=null,t.edwards=null}),So=mr(function(n,e){"use strict";var t=e,a=on.assert;function i(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,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:Zn.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:Zn.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:Zn.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:Zn.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:Zn.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:Zn.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:Zn.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:Zn.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=Nn.toArray(n.entropy,n.entropyEnc||"hex"),t=Nn.toArray(n.nonce,n.nonceEnc||"hex"),a=Nn.toArray(n.pers,n.persEnc||"hex");al(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,t,a)}var af=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=Nn.toArray(a,i||"hex"),this._update(a));for(var r=[];r.length"};var Ux=on.assert;function No(n,e){if(n instanceof No)return n;this._importDER(n,e)||(Ux(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 Vx(){this.place=0}function el(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 tf(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=tf(t),a=tf(a);!a[0]&&!(a[1]&128);)a=a.slice(1);var i=[2];tl(i,t.length),i=i.concat(t),i.push(2),tl(i,a.length);var r=i.concat(a),s=[48];return tl(s,r.length),s=s.concat(r),on.encode(s,e)};var jx=function(){throw new Error("unsupported")},rf=on.assert;function xn(n){if(!(this instanceof xn))return new xn(n);typeof n=="string"&&(rf(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 Hx=xn;xn.prototype.keyPair=function(e){return new rl(this,e)};xn.prototype.keyFromPrivate=function(e,t){return rl.fromPrivate(this,e,t)};xn.prototype.keyFromPublic=function(e,t){return rl.fromPublic(this,e,t)};xn.prototype.genKeyPair=function(e){e||(e={});for(var t=new af({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||jx(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 af({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 I=this.g.mul(x);if(!I.isInfinity()){var _=I.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=(I.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),f;return this.curve._maxwellTrick?(f=this.g.jmulAdd(l,a.getPublic(),p),f.isInfinity()?!1:f.eqXToP(r)):(f=this.g.mulAdd(l,a.getPublic(),p),f.isInfinity()?!1:f.getX().umod(this.n).cmp(r)===0)};xn.prototype.recoverPubKey=function(n,e,t,a){rf((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 f=e.r.invm(i),x=i.sub(r).mul(f).umod(i),I=o.mul(f).umod(i);return this.g.mulAdd(x,s,I)};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 qx=mr(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=Hx,t.eddsa=null}),sf=qx.ec;var of="signing-key/5.7.0";var ol=new E(of),sl=null;function ea(){return sl||(sl=new sf("secp256k1")),sl}var Tn=class{constructor(e){B(this,"curve","secp256k1"),B(this,"privateKey",W(e)),Ft(this.privateKey)!==32&&ol.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");let t=ea().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=ea().keyFromPublic(j(this.publicKey)),a=ea().keyFromPublic(j(e));return"0x"+t.pub.add(a.pub).encodeCompressed("hex")}signDigest(e){let t=ea().keyFromPrivate(j(this.privateKey)),a=j(e);a.length!==32&&ol.throwArgumentError("bad digest length","digest",e);let i=t.sign(a,{canonical:!0});return Gn({recoveryParam:i.recoveryParam,r:me("0x"+i.r.toString(16),32),s:me("0x"+i.s.toString(16),32)})}computeSharedSecret(e){let t=ea().keyFromPrivate(j(this.privateKey)),a=ea().keyFromPublic(j(ss(e)));return me("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"+ea().recoverPubKey(j(n),a,t.recoveryParam).encode("hex",!1)}function ss(n,e){let t=j(n);if(t.length===32){let a=new Tn(t);return e?"0x"+ea().keyFromPrivate(t).getPublic(!0,"hex"):a.publicKey}else{if(t.length===33)return e?W(t):"0x"+ea().keyFromPublic(t).getPublic(!1,"hex");if(t.length===65)return e?"0x"+ea().keyFromPublic(t).getPublic(!0,"hex"):W(t)}return ol.throwArgumentError("invalid public or private key","key","[REDACTED]")}var uf="transactions/5.7.0";var qt=new E(uf),Bo;(function(n){n[n.legacy=0]="legacy",n[n.eip2930=1]="eip2930",n[n.eip1559=2]="eip1559"})(Bo||(Bo={}));function dl(n){return n==="0x"?null:ce(n)}function Ht(n){return n==="0x"?er:F.from(n)}var Gx=[{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"}],zx={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function vn(n){let e=ss(n);return ce(Se(fe(Se(e,1)),12))}function gi(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 ul(n,e){return{address:ce(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),ul(t[0],t[1])):ul(t.address,t.storageKeys));let e=Object.keys(n).map(t=>{let a=n[t].reduce((i,r)=>(i[r]=!0,i),{});return ul(t,Object.keys(a).sort())});return e.sort((t,a)=>t.address.localeCompare(a.address)),e}function df(n){return dn(n).map(e=>[e.address,e.storageKeys])}function lf(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?ce(n.to):"0x",un(n.value||0,"value"),n.data||"0x",df(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 At(["0x02",fa(t)])}function pf(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?ce(n.to):"0x",un(n.value||0,"value"),n.data||"0x",df(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 At(["0x01",fa(t)])}function Wx(n,e){Qi(n,zx);let t=[];Gx.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 fa(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))),fa(t)}function os(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),Wx(n,e);switch(n.type){case 1:return pf(n,e);case 2:return lf(n,e);default:break}return qt.throwError(`unsupported transaction type: ${n.type}`,E.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:n.type})}function yf(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=me(e[1],32),n.s=me(e[2],32);try{let a=fe(t(n));n.from=gi(a,{r:n.r,s:n.s,recoveryParam:n.v})}catch{}}function Kx(n){let e=Zr(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:dl(e[5]),value:Ht(e[6]),data:e[7],accessList:dn(e[8])};return e.length===9||(i.hash=fe(n),yf(i,e.slice(9),lf)),i}function Jx(n){let e=Zr(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:dl(e[4]),value:Ht(e[5]),data:e[6],accessList:dn(e[7])};return e.length===8||(t.hash=fe(n),yf(t,e.slice(8),pf)),t}function $x(n){let e=Zr(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:dl(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 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(fa(i));try{t.from=gi(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 $x(e);switch(e[0]){case 1:return Jx(e);case 2:return Kx(e);default:break}return qt.throwError(`unsupported transaction type: ${e[0]}`,E.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}var ff="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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Pe=new E(ff),Qx={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 ce(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 us(n,e,t){return Va(this,void 0,void 0,function*(){return Array.isArray(t)?yield Promise.all(t.map((a,i)=>us(n,Array.isArray(e)?e[i]:e[a.name],a))):t.type==="address"?yield Lo(n,e):t.type==="tuple"?yield us(n,e,t.components):t.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(a=>us(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 ce(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:us(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,f=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 Yx(n,e){return function(...t){return jo(n,e,t)}}function Xx(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 mf(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 hf(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 Zx(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 mf(n,i),i})}}function cf(n,e,t){return e.constant?hf(n,e,t):Zx(n,e)}function xf(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 Ti=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]}},ll=class extends Ti{constructor(){super("error",null)}},Uo=class extends Ti{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(xf(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=Xi(e.args);if(t.length)throw t[0].error;let a=(e.args||[]).slice();return a.push(e),a}},Vo=class extends Ti{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{}}},hr=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(ce(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,cf(this,o,!0)),this.functions[s]==null&&B(this.functions,s,cf(this,o,!1)),this.callStatic[s]==null&&B(this.callStatic,s,hf(this,o,!0)),this.populateTransaction[s]==null&&B(this.populateTransaction,s,Yx(this,o)),this.estimateGas[s]==null&&B(this.estimateGas,s,Xx(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 mi(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 ca.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 ll);if(e==="event")return this._normalizeRunningEvent(new Ti("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 Ti(xf(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 hr{},vi=class{constructor(e,t,a){let i=null;typeof t=="string"?i=t:fn(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(!Qx[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(ye([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 us(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 mf(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 mi(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 I=j(Ta(i,n,l));r||(r=I.length,f=new Uint8Array(r),s=Math.ceil(a/r),p=a-(s-1)*r),f.set(I);for(let S=1;S=256)throw new Error("Depth too large!");return _f(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 St(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 a=new Uint8Array(37);if(e&gr){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(ta.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(a5)):l=new Tn(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 St(br,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=gr)throw new Error("invalid path index - "+r);a=a._derive(gr+s)}else if(r.match(/^[0-9]+$/)){let s=parseInt(r);if(s>=gr)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(ta.sha512,i5,a));return new St(br,qo(i.slice(0,32)),null,"0x00000000",qo(i.slice(32)),0,0,t)}static fromMnemonic(e,t,a){return a=fl(a),e=ki(Tr(e,a),a),St._fromSeed(cl(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||_f(t.slice(0,78))!==e)&&ps.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(br,null,W(o),i,s,r,a,null);case"0x0488ade4":case"0x04358394 ":if(o[0]!==0)break;return new St(br,W(o.slice(1)),null,i,s,r,a,null)}return ps.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}};function cl(n,e){e||(e="");let t=we("mnemonic"+e,Jt.NFKD);return wi(we(n,Jt.NFKD),t,2048,64,"sha512")}function Tr(n,e){e=fl(e),ps.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=kf(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 ki(n,e){if(e=fl(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]&r5(8-a)),a+=3);let i=n.length/4,r=j(en(n))[0]&kf(i);return t[t.length-1]<<=i,t[t.length-1]|=r>>8-i,e.join(t.map(s=>e.getWord(s)))}function Af(n,e){try{return Tr(n,e),!0}catch{}return!1}function Ef(n){return(typeof n!="number"||n<0||n>=gr||n%1)&&ps.throwArgumentError("invalid account index","index",n),`m/44'/60'/${n}'/0/0`}var Mf="random/5.7.0";var ml=new E(Mf);function s5(){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 Cf=s5(),Go=Cf.crypto||Cf.msCrypto;(!Go||!Go.getRandomValues)&&(ml.warn("WARNING: Missing strong random number source"),Go={getRandomValues:function(n){return ml.throwError("no secure random source avaialble",E.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function na(n){(n<=0||n>1024||n%1||n!=n)&&ml.throwArgumentError("invalid length","length",n);let e=new Uint8Array(n);return Go.getRandomValues(e),j(e)}function ys(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 zo="json-wallets/5.7.0";function wa(n){return typeof n=="string"&&n.substring(0,2)!=="0x"&&(n="0x"+n),j(n)}function vr(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(ye([U,$])),T={address:n.address.substring(2).toLowerCase(),id:Sf(I),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=na(16),N=new _a.default.Counter(R),q=new _a.default.ModeOfOperation.ctr(H,N),se=j(q.encrypt(s)),C=new Date,u=C.getUTCFullYear()+"-"+vr(C.getUTCMonth()+1,2)+"-"+vr(C.getUTCDate(),2)+"T"+vr(C.getUTCHours(),2)+"-"+vr(C.getUTCMinutes(),2)+"-"+vr(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:l,version:"0.1"}}return JSON.stringify(T)})}function Uf(n,e,t){if(Wo(n)){t&&t(0);let a=Tl(n,e);return t&&t(1),Promise.resolve(a)}return Ko(n)?Lf(n,e,t):Promise.reject(new Error("invalid JSON wallet"))}function Vf(n,e){if(Wo(n))return Tl(n,e);if(Ko(n))return Ff(n,e);throw new Error("invalid JSON wallet")}var jf="wallet/5.7.0";var Hf=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},wr=new E(jf);function p5(n){return n!=null&&ie(n.privateKey,32)&&n.address!=null}function y5(n){let e=n.mnemonic;return e&&e.phrase}var ln=class extends Nt{constructor(e,t){if(super(),p5(e)){let a=new Tn(e.privateKey);if(B(this,"_signingKey",()=>a),B(this,"address",vn(this.publicKey)),this.address!==ce(e.address)&&wr.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),y5(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&&wr.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else B(this,"_mnemonic",()=>null)}else{if(Tn.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 a=new Tn(e);B(this,"_signingKey",()=>a)}B(this,"_mnemonic",()=>null),B(this,"address",vn(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 ln(this,e)}signTransaction(e){return Re(e).then(t=>{t.from!=null&&(ce(t.from)!==this.address&&wr.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete t.from);let a=this._signingKey().signDigest(fe(os(t)));return os(t,a)})}signMessage(e){return Hf(this,void 0,void 0,function*(){return zr(this._signingKey().signDigest(rr(e)))})}_signTypedData(e,t,a){return Hf(this,void 0,void 0,function*(){let i=yield vt.resolveNames(e,t,a,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(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=na(16);e||(e={}),e.extraEntropy&&(t=j(Se(fe(ye([t,e.extraEntropy])),0,16)));let a=ki(t,e.locale);return ln.fromMnemonic(a,e.path,e.locale)}static fromEncryptedJson(e,t,a){return Uf(e,t,a).then(i=>new ln(i))}static fromEncryptedJsonSync(e,t){return new ln(Vf(e,t))}static fromMnemonic(e,t,a){return t||(t=va),new ln(St.fromMnemonic(e,null,a).derivePath(t))}};function qf(n,e){return gi(rr(n),e)}function Gf(n,e,t,a){return gi(vt.hash(n,e,t),a)}var ra={};Ki(ra,{AlchemyProvider:()=>Cr,AlchemyWebSocketProvider:()=>ks,AnkrProvider:()=>As,BaseProvider:()=>ia,CloudflareProvider:()=>Es,EtherscanProvider:()=>Ms,FallbackProvider:()=>Is,Formatter:()=>X,InfuraProvider:()=>Sr,InfuraWebSocketProvider:()=>Rs,IpcProvider:()=>Ll,JsonRpcBatchProvider:()=>du,JsonRpcProvider:()=>tn,JsonRpcSigner:()=>Er,NodesmithProvider:()=>Ps,PocketProvider:()=>Ns,Provider:()=>Xt,Resolver:()=>Ar,StaticJsonRpcProvider:()=>_s,UrlJsonRpcProvider:()=>Rt,Web3Provider:()=>Ds,WebSocketProvider:()=>Ea,getDefaultProvider:()=>lu,getNetwork:()=>cs,isCommunityResourcable:()=>Cl,isCommunityResource:()=>xs,showThrottleMessage:()=>aa});var zf="networks/5.7.1";var Wf=new E(zf);function f5(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 Kf={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:ka("homestead")},Jf={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:ka("ropsten")},$f={chainId:63,name:"classicMordor",_defaultProvider:Qo("https://www.ethercluster.com/mordor","classicMordor")},$o={unspecified:{chainId:0,name:"unspecified"},homestead:Kf,mainnet:Kf,morden:{chainId:2,name:"morden"},ropsten:Jf,testnet:Jf,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:$f,classicTestnet:$f,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 cs(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"&&Wf.throwArgumentError("invalid network chainId","network",n),n;n.chainId!==0&&n.chainId!==e.chainId&&Wf.throwArgumentError("network chainId mismatch","network",n);let t=n._defaultProvider||null;return t==null&&e._defaultProvider&&(f5(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 Qf="web/5.7.1";var c5=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})};function Yf(n,e){return c5(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 m5=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Dn=new E(Qf);function Xf(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 h5(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;Dn.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;Dn.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"},f=!1,x=2*60*1e3;if(typeof n=="string")l=n;else if(typeof n=="object"){if((n==null||n.url==null)&&Dn.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&&(f=!0);if(p.allowGzip=!!n.allowGzip,n.user!=null&&n.password!=null){l.substring(0,6)!=="https:"&&n.allowInsecureAuthentication!==!0&&Dn.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 "+ir(we(O))}}n.skipFetchSetup!=null&&(p.skipFetchSetup=!!n.skipFetchSetup),n.fetchOptions!=null&&(p.fetchOptions=_e(n.fetchOptions))}let I=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),_=l?l.match(I):null;if(_)try{let O={statusCode:200,statusMessage:"OK",headers:{"content-type":_[1]||"text/plain"},body:_[2]?ar(_[3]):h5(_[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: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(Dn.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 m5(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: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){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=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 Bn(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(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()&&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(f){s()&&a(f)})}p()})}var Pl=Cn(nc());var Ee="providers/5.7.2";var hs=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),f=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(f),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():hs.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 ce(e)}callAddress(e){if(!ie(e,32))return null;let t=ce(Se(e,12));return t===mo?null:t}contractAddress(e){return mi(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 qn(e);throw new Error("invalid blockTag")}hash(e,t){let a=this.hex(e,t);return Ft(a)!==32?hs.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 me(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&&hs.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=a,delete t.root):hs.throwArgumentError("invalid alt-root-status","value.root",t.root)}else t.root.length!==66&&hs.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 Cl(n){return n&&typeof n.isCommunityResource=="function"}function xs(n){return Cl(n)&&n.isCommunityResource()}var ac=!1;function aa(){ac||(ac=!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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},he=new E(Ee),k5=10;function ic(n){return n==null?"null":(Ft(n)!==32&&he.throwArgumentError("invalid topic","topic",n),n.toLowerCase())}function rc(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[ic(i)]=!0});let a=Object.keys(t);return a.sort(),a.join("|")}else return ic(e)}).join("&")}function A5(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 kr(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:*:"+rc(n);if(Eo.isForkEvent(n))throw he.warn("not implemented"),new Error("not implemented");if(n&&typeof n=="object")return"filter:"+(n.address||"*")+":"+rc(n.topics||[])}throw new Error("invalid event - "+n)}function bs(){return new Date().getTime()}function sc(n){return new Promise(e=>{setTimeout(e,n)})}var E5=["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=A5(e[2]),i={};return a.length>0&&(i.topics=a),t&&t!=="*"&&(i.address=t),i}pollable(){return this.tag.indexOf(":")>=0||E5.indexOf(this.tag)>=0}},M5={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(n){return me(F.from(n).toHexString(),32)}function oc(n){return ga.encode(ye([n,Se(en(en(n)),0,4)]))}var lc=new RegExp("^(ipfs)://(.*)$","i"),uc=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),lc,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function eu(n,e){try{return Yt(gs(n,e))}catch{}return null}function gs(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):he.throwArgumentError("unsupported IPFS format","link",n),`https://gateway.ipfs.io/ipfs/${n}`}function dc(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 C5(n){if(n.length%32===0)return n;let e=new Uint8Array(Math.ceil(n.length/32)*32);return e.set(n),e}function pc(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:At([e,Oa(this.name),t||"0x"])},i=!1;(yield this.supportsWildcard())&&(i=!0,a.data=At(["0x9061b923",pc([as(this.name),a.data])]));try{let r=yield this.provider.call(a);return j(r).length%32===4&&he.throwError("resolver threw error",E.errors.CALL_EXCEPTION,{transaction:a,data:r}),i&&(r=gs(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?gs(a,0):null})}_getAddress(e,t){let a=M5[String(e)];if(a==null&&he.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 oc(ye([[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 oc(ye([[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===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",Il(e));if(t==null||t==="0x")return null;let a=this._getAddress(e,t);return a==null&&he.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 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=we(e);t=ye([Il(64),Il(t.length),t]),t.length%32!==0&&(t=ye([t,me("0x",32-e.length%32)]));let a=yield this._fetchBytes("0x59d1d43c",W(t));return a==null||a==="0x"?null:Yt(a)})}},Rl=null,I5=1,ia=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)):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 Rl==null&&(Rl=new X),Rl}static getNetwork(e){return cs(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 On({url:p,errorPassThrough:!0},f,(_,v)=>(_.status=v.statusCode,_));if(x.data)return x.data;let I=x.message||"unknown error";if(x.status>=400&&x.status<500)return he.throwError(`response not found during CCIP fetch: ${I}`,E.errors.SERVER_ERROR,{url:l,errorMessage:I});s.push(I)}return he.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(bs()-r.respTime<=e)return r.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}let t=bs(),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=bs();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=I5++,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)he.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${a})`),this.emit("error",he.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 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 sc(0),this._network;let a=he.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=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,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,f=function(){return p?!0:(p=!0,l.forEach(I=>{I()}),!1)},x=I=>{I.confirmations{this.removeListener(e,x)}),i){let I=i.startBlock,_=null,v=S=>ue(this,void 0,void 0,function*(){p||(yield sc(1e3),this.getTransactionCount(i.from).then(L=>ue(this,void 0,void 0,function*(){if(!p){if(L<=i.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),l.push(()=>{this.removeListener("block",v)})}if(typeof a=="number"&&a>0){let I=setTimeout(()=>{f()||o(he.makeError("timeout exceeded",E.errors.TIMEOUT,{timeout:a}))},a);I.unref&&I.unref(),l.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",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 he.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 he.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 he.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=>qn(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,a){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&&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&&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)),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>=k5&&he.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)||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(Se(s,32,64)).toNumber(),f=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 Bn(()=>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 Bn(()=>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&&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 a=yield this._getResolver(t,"getResolver");if(a!=null){let i=new Ar(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||he.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"&&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",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 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=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 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,a){let i=new Nl(kr(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=kr(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=kr(e);return this._events.filter(a=>a.tag===t).length}listeners(e){if(e==null)return this._events.map(a=>a.listener);let t=kr(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=kr(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=kr(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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Mt=new E(Ee),S5=["call","estimateGas"];function vs(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=vs(n[t],e);if(a)return a}return null}if(typeof n=="string")try{return vs(JSON.parse(n),e)}catch{}return null}function fc(n,e,t){let a=t.transaction||t.signedTransaction;if(n==="call"){let r=vs(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:a,error:e})}if(n==="estimateGas"){let r=vs(e.body,!1);r==null&&(r=vs(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: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)&&Mt.throwError("insufficient funds for intrinsic transaction cost",E.errors.INSUFFICIENT_FUNDS,{error:e,method:n,transaction:a}),i.match(/nonce (is )?too low/i)&&Mt.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)&&Mt.throwError("replacement fee too low",E.errors.REPLACEMENT_UNDERPRICED,{error:e,method:n,transaction:a}),i.match(/only replay-protected/i)&&Mt.throwError("legacy pre-eip-155 transactions not supported",E.errors.UNSUPPORTED_OPERATION,{error:e,method:n,transaction:a}),S5.indexOf(n)>=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:n,transaction:a}),e}function yc(n){return new Promise(function(e){setTimeout(e,n)})}function R5(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 Ts(n){return n&&n.toLowerCase()}var Dl={},Er=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)):Mt.throwArgumentError("invalid address or index","addressOrIndex",a)}connect(e){return Mt.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&&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(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&&Mt.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&&Mt.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)&&Mt.throwError("user rejected transaction",E.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:a}),fc("sendTransaction",s,r)))})}signTransaction(e){return Mt.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 Bn(()=>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)&&Mt.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)&&Mt.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)&&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 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 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:a=>this.provider.waitForTransaction(t,a)}))}},P5={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 ia{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 yc(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 Mt.throwError("could not detect network",E.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:a})}}return Mt.throwError("could not detect network",E.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new Er(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=On(this.connection,JSON.stringify(a),R5).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",[Ts(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[Ts(t.address),t.blockTag]];case"getCode":return["eth_getCode",[Ts(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[Ts(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 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=Ts(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&&Mt.throwError(e+" not implemented",E.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(a[0],a[1])}catch(i){return fc(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 yc(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(P5);if(t)for(let r in t)t[r]&&(a[r]=!0);Qi(e,a);let i={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(r){if(e[r]==null)return;let s=qn(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(Ee);Mr=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},tu=new E(Ee),N5=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 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 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=N5++;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===Mr.CONNECTING&&(yield new Promise(e=>{this.websocket.onopen=function(){e(!0)},this.websocket.onerror=function(){e(!1)}})),this.websocket.close(1e3)})}};var D5=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},ws=new E(Ee),_s=class extends tn{detectNetwork(){let e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return D5(this,void 0,void 0,function*(){let t=this.network;return t==null&&(t=yield e.detectNetwork.call(this),t||ws.throwError("no network detected",E.errors.UNKNOWN_ERROR,{}),this._network==null&&(B(this,"_network",t),this.emit("network",t,null))),t})}},Rt=class extends _s{constructor(e,t){ws.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(){ws.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(e){return ws.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 ws.throwError("not implemented; sub-classes must override getUrl",E.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}};var cc=new E(Ee),nu="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC",ks=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 ks(e,t)}static getApiKey(e){return e==null?nu:(e&&typeof e!="string"&&cc.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:cc.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+a+t,throttleCallback:(i,r)=>(t===nu&&aa(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===nu}};var O5=new E(Ee),au="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function B5(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 O5.throwArgumentError("unsupported network","name",n)}var As=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://"+B5(e.name)+t,throttleCallback:(i,r)=>(t.apiKey===au&&aa(),Promise.resolve(!0))};return t.projectSecret!=null&&(a.user="",a.password=t.projectSecret),a}};var F5=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},mc=new E(Ee),Es=class extends Rt{static getApiKey(e){return e!=null&&mc.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:mc.throwArgumentError("unsupported network","network",arguments[0])}return a}perform(e,t){let a=Object.create(null,{perform:{get:()=>super.perform}});return F5(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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Ha=new E(Ee);function hc(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=qn(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 L5(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 xc(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 bc(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 Ms=class extends ia{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"?xc:L5;this.emit("debug",{action:"request",request:i,provider:this});let o={url:i,throttleSlotInterval:1e3,throttleCallback:(f,x)=>(this.isCommunityResource()&&aa(),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 On(o,l,s||xc);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=hc(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=hc(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=bc(t.filter.fromBlock)),t.filter.toBlock&&(i.toBlock=bc(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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Ai=new E(Ee);function ru(){return new Date().getTime()}function gc(n){let e=null;for(let t=0;te?null:(a+i)/2}function Ir(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=>Ir(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=Ir(a),JSON.stringify(t)+":"+a}).join(",")+"}"}throw new Error("unknown value type: "+typeof n)}var U5=1;function vc(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 V5=[E.errors.CALL_EXCEPTION,E.errors.INSUFFICIENT_FUNDS,E.errors.NONCE_EXPIRED,E.errors.REPLACEMENT_UNDERPRICED,E.errors.UNPREDICTABLE_GAS_LIMIT],j5=["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 H5(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 q5(n,e,t){let a=Ir;switch(e){case"getBlockNumber":return function(i){let r=i.map(o=>o.result),s=Tc(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 Tc(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,Ir(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)),Ir(i))}:a=function(i){return i==null?null:Ir(i)};break;default:throw new Error("unknown method: "+e)}return H5(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:Bn(()=>new Promise((a,i)=>{setTimeout(function(){return t.blockNumber>=e?a(t):n.cancelled?a(null):a(void 0)},0)}),{oncePoll:t})})}function G5(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 Ai.throwError("unknown method error",E.errors.UNKNOWN_ERROR,{method:t,params:a})})}var Is=class extends ia{constructor(e,t){e.length===0&&Ai.throwArgumentError("missing providers","providers",e);let a=e.map((s,o)=>{if(Xt.isProvider(s)){let f=xs(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=xs(s)?2e3:750),l.weight==null&&(l.weight=1);let p=l.weight;return(p%1||p>512||p<1)&&Ai.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&&Ai.throwArgumentError("quorum will always fail; larger than total weight","quorum",t);let r=gc(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 gc(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(f=>f.hash,f=>f)));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=G5(_,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 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 _=a(x);if(_!==void 0)return i.forEach(v=>{v.staller&&v.staller.cancel(),v.cancelled=!0}),_;o||(yield vc(100).getPromise()),o=!1}let I=i.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={};j5.forEach(O=>{S[O]!=null&&(L[O]=S[O])}),Ai.throwError(S.reason||S.message,_,L)}),i.filter(_=>!_.done).length===0)break}return i.forEach(l=>{l.staller&&l.staller.cancel(),l.cancelled=!0}),Ai.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),Ss="84842078b09946638c03157f83405213",Rs=class extends Ea{constructor(e,t){let a=new Sr(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===Ss}},Sr=class extends Rt{static getWebSocketProvider(e,t){return new Rs(e,t)}static getApiKey(e){let t={apiKey:Ss,projectId:Ss,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===Ss&&aa(),Promise.resolve(!0))};return t.projectSecret!=null&&(i.user="",i.password=t.projectSecret),i}isCommunityResource(){return this.projectId===Ss}};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}),On(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 I=new Error(x.error.message);I.code=x.error.code,I.data=x.error.data,p.reject(I)}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),z5="ETHERS_JS_SHARED",Ps=class extends Rt{static getApiKey(e){return e&&typeof e!="string"&&Ul.throwArgumentError("invalid apiKey","apiKey",e),e||z5}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 wc=new E(Ee),_c="62e1ad51b37b8e00394bda3b",Ns=class extends Rt{static getApiKey(e){let t={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return e==null?t.applicationId=_c: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 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:wc.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===_c}};var kc=new E(Ee),W5=1;function Ac(n,e){let t="Web3LegacyFetcher";return function(a,i){let r={method:a,params:i,id:W5++,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 f=new Error(p.error.message);return f.code=p.error.code,f.data=p.error.data,o(f)}s(p.result)})})}}function K5(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 Ds=class extends tn{constructor(e,t){e==null&&kc.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=K5(e)):e.sendAsync?i=Ac(e,e.sendAsync.bind(e)):e.send?i=Ac(e,e.send.bind(e)):kc.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 Ec=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:Ec.throwArgumentError("unsupported URL scheme","network",n)}}let t=cs(n);return(!t||!t._defaultProvider)&&Ec.throwError("unsupported getDefaultProvider network",E.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:n}),t._defaultProvider({FallbackProvider:Is,AlchemyProvider:Cr,AnkrProvider:As,CloudflareProvider:Es,EtherscanProvider:Ms,InfuraProvider:Sr,JsonRpcProvider:tn,NodesmithProvider:Ps,PocketProvider:Ns,Web3Provider:Ds,IpcProvider:null},e)}var te={};Ki(te,{AbiCoder:()=>nr,ConstructorFragment:()=>Lt,ErrorFragment:()=>rn,EventFragment:()=>Wt,FormatTypes:()=>Te,Fragment:()=>Kt,FunctionFragment:()=>Ut,HDNode:()=>St,Indexed:()=>ca,Interface:()=>Ba,LogDescription:()=>sr,Logger:()=>E,ParamType:()=>ct,RLP:()=>so,SigningKey:()=>Tn,SupportedAlgorithm:()=>ta,TransactionDescription:()=>or,TransactionTypes:()=>Bo,UnicodeNormalizationForm:()=>Jt,Utf8ErrorFuncs:()=>To,Utf8ErrorReason:()=>Vt,_TypedDataEncoder:()=>vt,_fetchData:()=>El,_toEscapedUtf8String:()=>Rd,accessListify:()=>dn,arrayify:()=>j,base58:()=>ga,base64:()=>Fd,checkProperties:()=>Qi,checkResultErrors:()=>Xi,commify:()=>Dc,computeAddress:()=>vn,computeHmac:()=>Ta,computePublicKey:()=>ss,concat:()=>ye,deepCopy:()=>xt,defaultAbiCoder:()=>ts,defaultPath:()=>va,defineReadOnly:()=>B,dnsEncode:()=>as,entropyToMnemonic:()=>ki,fetchJson:()=>On,formatBytes32String:()=>Pd,formatEther:()=>Oc,formatUnits:()=>Vl,getAccountPath:()=>Ef,getAddress:()=>ce,getContractAddress:()=>mi,getCreate2Address:()=>Uy,getIcapAddress:()=>Ly,getJsonWalletAddress:()=>vl,getStatic:()=>bt,hashMessage:()=>rr,hexConcat:()=>At,hexDataLength:()=>Ft,hexDataSlice:()=>Se,hexStripZeros:()=>Td,hexValue:()=>qn,hexZeroPad:()=>me,hexlify:()=>W,id:()=>sn,isAddress:()=>Fy,isBytes:()=>fn,isBytesLike:()=>la,isHexString:()=>ie,isValidMnemonic:()=>Af,isValidName:()=>Ud,joinSignature:()=>zr,keccak256:()=>fe,mnemonicToEntropy:()=>Tr,mnemonicToSeed:()=>cl,namehash:()=>Oa,nameprep:()=>Bd,parseBytes32String:()=>Nd,parseEther:()=>Bc,parseTransaction:()=>Fo,parseUnits:()=>jl,poll:()=>Bn,randomBytes:()=>na,recoverAddress:()=>gi,recoverPublicKey:()=>Oo,resolveProperties:()=>Re,ripemd160:()=>ds,serializeTransaction:()=>os,sha256:()=>en,sha512:()=>ll,shallowCopy:()=>_e,shuffled:()=>ys,solidityKeccak256:()=>Ic,solidityPack:()=>pu,soliditySha256:()=>Sc,splitSignature:()=>Gn,stripZeros:()=>nn,toUtf8Bytes:()=>we,toUtf8CodePoints:()=>Da,toUtf8String:()=>Yt,verifyMessage:()=>qf,verifyTypedData:()=>Gf,zeroPad:()=>pi});var Mc="solidity/5.7.0";var J5=new RegExp("^bytes([0-9]+)$"),$5=new RegExp("^(u?int)([0-9]*)$"),Q5=new RegExp("^(.*)\\[([0-9]*)\\]$"),Y5="0000000000000000000000000000000000000000000000000000000000000000",Rr=new E(Mc);function Cc(n,e,t){switch(n){case"address":return t?pi(e,32):j(e);case"string":return we(e);case"bytes":return j(e);case"bool":return e=e?"0x01":"0x00",t?pi(e,32):j(e)}let a=n.match($5);if(a){let i=parseInt(a[2]||"256");return(a[2]&&String(i)!==a[2]||i%8!==0||i===0||i>256)&&Rr.throwArgumentError("invalid number type","type",n),t&&(i=256),e=F.from(e).toTwos(i),pi(e,i/8)}if(a=n.match(J5),a){let i=parseInt(a[1]);return(String(i)!==a[1]||i===0||i>32)&&Rr.throwArgumentError("invalid bytes type","type",n),j(e).byteLength!==i&&Rr.throwArgumentError(`invalid value for ${n}`,"value",e),t?j((e+Y5).substring(0,66)):e}if(a=n.match(Q5),a&&Array.isArray(e)){let i=a[1];parseInt(a[2]||String(e.length))!=e.length&&Rr.throwArgumentError(`invalid array length for ${n}`,"value",e);let s=[];return e.forEach(function(o){s.push(Cc(i,o,!0))}),ye(s)}return Rr.throwArgumentError("invalid type","type",n)}function pu(n,e){n.length!=e.length&&Rr.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);let t=[];return n.forEach(function(a,i){t.push(Cc(a,e[i]))}),W(ye(t))}function Ic(n,e){return fe(pu(n,e))}function Sc(n,e){return en(pu(n,e))}var Rc="units/5.7.0";var Pc=new E(Rc),Nc=["wei","kwei","mwei","gwei","szabo","finney","ether"];function Dc(n){let e=String(n).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||n==="."||n==="-.")&&Pc.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=Nc.indexOf(e);t!==-1&&(e=3*t)}return $i(n,e??18)}function jl(n,e){if(typeof n!="string"&&Pc.throwArgumentError("value must be a string","value",n),typeof e=="string"){let t=Nc.indexOf(e);t!==-1&&(e=3*t)}return mn(n,e??18)}function Oc(n){return Vl(n,18)}function Bc(n){return jl(n,18)}var yu="ethers/5.7.2";var Fc=new E(yu);try{let n=window;n._ethers==null&&(n._ethers=Hl)}catch{}var Fn;(function(n){n.Mainnet="Mainnet",n.Custom="Custom",n.Gnosis="Xdai",n.Goerli="Goerli",n.Xdai="Xdai",n.XdaiQa="XdaiQa",n.ArbitrumOne="ArbitrumOne",n.ArbitrumSepolia="ArbitrumSepolia"})(Fn||(Fn={}));var Lc;(function(n){n[n.Custom=0]="Custom",n[n.Mainnet=1]="Mainnet",n[n.Goerli=5]="Goerli",n[n.Gnosis=100]="Gnosis",n[n.Xdai=100]="Xdai",n[n.XdaiQa=100]="XdaiQa",n[n.ArbitrumSepolia=421614]="ArbitrumSepolia",n[n.ArbitrumOne=42161]="ArbitrumOne"})(Lc||(Lc={}));var fu;(function(n){n.Mainnet="0x5346D0f80e2816FaD329F2c140c870ffc3c3E2Ef",n.Goerli="0x79073fc2117dD054FCEdaCad1E7018C9CbE3ec0B",n.Xdai="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.XdaiQa="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.Custom="",n.ArbitrumOne="0xcccccdcc0ccf6c708d860e19353c5f9a49accccc",n.ArbitrumSepolia="0x7777494e3d8cce0D3570E21FEf820F9Fee077777"})(fu||(fu={}));var Pr;(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",n.ArbitrumOne="https://app.colony.io/reputation/arbitrum-one",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/reputation/arbitrum-sepolia"})(Pr||(Pr={}));var cu;(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="",n.ArbitrumOne="https://app.colony.io/metatransaction/arbitrum-one",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/metatransaction/arbitrum-sepolia"})(cu||(cu={}));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="",n.ArbitrumOne="https://app.colony.io/public-rpc/",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/public-rpc/"})(ql||(ql={}));var Os;(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",n.ArbitrumOne=".colony.joincolony.arbitrum",n.ArbitrumSepolia=".colony.joincolony.sepolia"})(Os||(Os={}));var Bs;(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",n.ArbitrumOne=".user.joincolony.arbitrum",n.ArbitrumSepolia=".user.joincolony.sepolia"})(Bs||(Bs={}));var Gl;(function(n){let e;(function(i){i.ETH="0x0000000000000000000000000000000000000000",i.CLNY="0x3E828ac5C480069D4765654Fb4b8733b910b13b2",i.USDC="0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"})(e=n.Mainnet||(n.Mainnet={}));let t;(function(i){i.XDAI="0x0000000000000000000000000000000000000000",i.CLNY="0xc9B6218AffE8Aba68a13899Cbf7cF7f14DDd304C",i.USDC="0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83"})(t=n.Gnosis||(n.Gnosis={}));let a;(function(i){i.ETH="0x0000000000000000000000000000000000000000",i.CLNY="0xcccccdcc0ccf6c708d860e19353c5f9a49accccc",i.USDC="0xaf88d065e77c8cC2239327C5EDb3A432268e5831"})(a=n.ArbitrumOne||(n.ArbitrumOne={}))})(Gl||(Gl={}));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",zl;(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"})(zl||(zl={}));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 xe;(function(n){n.FundingQueue="FundingQueue",n.IVotingReputation="IVotingReputation",n.MultisigPermissions="MultisigPermissions",n.OneTxPayment="OneTxPayment",n.ReputationBootstrapper="ReputationBootstrapper",n.StagedExpenditure="StagedExpenditure",n.StakedExpenditure="StakedExpenditure",n.StreamingPayments="StreamingPayments",n.TokenSupplier="TokenSupplier",n.VotingReputation="VotingReputation"})(xe||(xe={}));var Kl=[{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",type:"function"}],Ei=class{static createInterface(){return new te.Interface(Kl)}static connect(e,t){return new oe(e,Kl,t)}};be(Ei,"abi",Kl);var Jl=[{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"}],Mi=class{static createInterface(){return new te.Interface(Jl)}static connect(e,t){return new oe(e,Jl,t)}};be(Mi,"abi",Jl);var Uc=(n,e)=>{throw new Error(`${e}: ${n}`)},$l=n=>n!=null;var{keccak256:Z5,toUtf8Bytes:eb}=te,{MaxUint256:tb}=gt;var Nr=n=>te.formatEther(n),Dr=n=>te.parseEther(n),pn=n=>Dr(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)},Ci=async(n,e,t,a)=>{if(F.from(t).eq(F.from(a)))return tb;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=>Z5(eb(n));var Or=async(n,e)=>(await Mi.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:nb}=gt,Vc=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}},jc=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),nb,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 Ci(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]},ab=async(n,e,t,a,i)=>{let r=await Promise.all(a.map(s=>jc(n,e,t,s,i)));for(let s=0;sArray.isArray(a)?a.length===1?sa(n,e,t,a[0],i):ab(n,e,t,a,i):jc(n,e,t,a,i);var{MaxUint256:Hc}=gt,{AddressZero:ib}=gt;async function rb(n,e){let t;try{return t=await n.getCapabilityRoles(te.hexZeroPad(e,4)),mu(t)}catch{return[]}}async function Fs(n,e,t,a,i,r,s){let o,{skillId:l}=await e.getDomain(i),{sig:p,permissionDomainId:f,childSkillIndex:x}=Vc(s),I=Ei.connect(r,a.signer||a.provider),_=await rb(I,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=Hc}else{let{skillId:U}=await e.getDomain(f),H=await n.getChildSkillId(U,x);if(H.eq(l))o=Hc;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,ib);return{actionCid:o,key:v,value:S,branchMask:L,siblings:O}}var{AddressZero:sb}=gt,oa=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||Fn.ArbitrumOne;this.endpointUrl=a?.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,a){let i=await this.getBaseEndpoint(a),r=F.from(e||0).toString(),s=`${i}/${r}/${t}/noProof`,o=await oa.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 oa.fetchReputation(s);return{...o,reputationAmount:F.from(o.reputationAmount||0)}}async getReputationAcrossDomains(e,t){let i=`${await this.getBaseEndpoint(t)}/${e}/all`,r=await oa.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 a=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${a}/${i}`;return oa.fetchReputation(r)}async getTotalReputation(e,t){let a=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${a}/${i}/${sb}/noProof`,s=await oa.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 Ct=n=>Array.from(Array(n-1)).map((e,t)=>t+1);var qc=10,Wk=Ct(qc),Gc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},zc=qc-1;var Wc=3,$k=Ct(Wc),Kc={1:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],2:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]},Jc=Wc-1;var $c=10,Xk=Ct($c),Qc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Yc=$c-1;var Xc=7,tA=Ct(Xc),Zc={1:[],2:[],3:[],4:[],5:[],6:[]},em=Xc-1;var tm=8,iA=Ct(tm),nm={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3],6:[1,2,3],7:[1,2,3]},am=tm-1;var im=5,oA=Ct(im),rm={1:[1,2,3,4,5,6,7,8,9,10,11,12,13],2:[1,2,3,4,5,6,7,8,9,10,11,12,13],3:[1,2,3,4,5,6,7,8,9,10,11,12,13],4:[1,2,3,4,5,6,7,8,9,10,11,12,13]},sm=im-1;var om=7,lA=Ct(om),um={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3],6:[1,2,3]},dm=om-1;var lm=10,fA=Ct(lm),pm={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},ym=lm-1;var fm=14,hA=Ct(fm),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],11:[1,2,3,4,5,6],12:[1,2,3,4,5,6],13:[1,2,3,4,5,6]},ep=fm-1;var cm=18,ob=Ct(cm),gA=cm-1;var ub=(n,e)=>{switch(n){case xe.FundingQueue:return Gc[e];case xe.IVotingReputation:return Zl[e];case xe.MultisigPermissions:return Kc[e];case xe.OneTxPayment:return Qc[e];case xe.ReputationBootstrapper:return Zc[e];case xe.StagedExpenditure:return rm[e];case xe.StakedExpenditure:return nm[e];case xe.StreamingPayments:return um[e];case xe.TokenSupplier:return pm[e];case xe.VotingReputation:return Zl[e];default:return Uc(n,"Could not find extension with name")}},ua=(n,e,t)=>{let a=ub(n,e);return!!a&&!a.includes(t)};var Br={[xe.FundingQueue]:zc,[xe.IVotingReputation]:ep,[xe.MultisigPermissions]:Jc,[xe.OneTxPayment]:Yc,[xe.ReputationBootstrapper]:em,[xe.StagedExpenditure]:sm,[xe.StakedExpenditure]:am,[xe.StreamingPayments]:dm,[xe.TokenSupplier]:ym,[xe.VotingReputation]:ep};var B6=Cn(mm(),1);var wp=Cn(N6(),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 D6=n=>`Validation error(s): +`)}static register(e,t){if(t||(t=e.locale),t5)try{let a=window;a._ethers&&a._ethers.wordlists&&(a._ethers.wordlists[t]||B(a._ethers.wordlists,t,e))}catch{}}};var n5="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo",ls=null;function vf(n){if(ls==null&&(ls=n5.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),wn.check(n)!=="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"))throw ls=null,new Error("BIP39 Wordlist for en (English) FAILED")}var yl=class extends wn{constructor(){super("en")}getWord(e){return vf(this),ls[e]}getWordIndex(e){return vf(this),ls.indexOf(e)}},fl=new yl;wn.register(fl);var _i={en:fl};var wf="hdnode/5.7.0";var ps=new E(wf),a5=F.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),i5=we("Bitcoin seed"),gr=2147483648;function kf(n){return(1<=256)throw new Error("Depth too large!");return _f(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 St(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 a=new Uint8Array(37);if(e&gr){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(ta.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(a5)):l=new Tn(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 St(br,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=gr)throw new Error("invalid path index - "+r);a=a._derive(gr+s)}else if(r.match(/^[0-9]+$/)){let s=parseInt(r);if(s>=gr)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(ta.sha512,i5,a));return new St(br,qo(i.slice(0,32)),null,"0x00000000",qo(i.slice(32)),0,0,t)}static fromMnemonic(e,t,a){return a=cl(a),e=ki(Tr(e,a),a),St._fromSeed(ml(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||_f(t.slice(0,78))!==e)&&ps.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(br,null,W(o),i,s,r,a,null);case"0x0488ade4":case"0x04358394 ":if(o[0]!==0)break;return new St(br,W(o.slice(1)),null,i,s,r,a,null)}return ps.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}};function ml(n,e){e||(e="");let t=we("mnemonic"+e,Jt.NFKD);return wi(we(n,Jt.NFKD),t,2048,64,"sha512")}function Tr(n,e){e=cl(e),ps.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=kf(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 ki(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]&r5(8-a)),a+=3);let i=n.length/4,r=j(en(n))[0]&kf(i);return t[t.length-1]<<=i,t[t.length-1]|=r>>8-i,e.join(t.map(s=>e.getWord(s)))}function Af(n,e){try{return Tr(n,e),!0}catch{}return!1}function Ef(n){return(typeof n!="number"||n<0||n>=gr||n%1)&&ps.throwArgumentError("invalid account index","index",n),`m/44'/60'/${n}'/0/0`}var Mf="random/5.7.0";var hl=new E(Mf);function s5(){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 Cf=s5(),Go=Cf.crypto||Cf.msCrypto;(!Go||!Go.getRandomValues)&&(hl.warn("WARNING: Missing strong random number source"),Go={getRandomValues:function(n){return hl.throwError("no secure random source avaialble",E.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function na(n){(n<=0||n>1024||n%1||n!=n)&&hl.throwArgumentError("invalid length","length",n);let e=new Uint8Array(n);return Go.getRandomValues(e),j(e)}function ys(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 gl=Cn(bl());var zo="json-wallets/5.7.0";function wa(n){return typeof n=="string"&&n.substring(0,2)!=="0x"&&(n="0x"+n),j(n)}function vr(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(ye([U,$])),T={address:n.address.substring(2).toLowerCase(),id:Sf(I),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=na(16),N=new _a.default.Counter(R),q=new _a.default.ModeOfOperation.ctr(H,N),se=j(q.encrypt(s)),C=new Date,u=C.getUTCFullYear()+"-"+vr(C.getUTCMonth()+1,2)+"-"+vr(C.getUTCDate(),2)+"T"+vr(C.getUTCHours(),2)+"-"+vr(C.getUTCMinutes(),2)+"-"+vr(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:l,version:"0.1"}}return JSON.stringify(T)})}function Uf(n,e,t){if(Wo(n)){t&&t(0);let a=vl(n,e);return t&&t(1),Promise.resolve(a)}return Ko(n)?Lf(n,e,t):Promise.reject(new Error("invalid JSON wallet"))}function Vf(n,e){if(Wo(n))return vl(n,e);if(Ko(n))return Ff(n,e);throw new Error("invalid JSON wallet")}var jf="wallet/5.7.0";var Hf=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},wr=new E(jf);function p5(n){return n!=null&&ie(n.privateKey,32)&&n.address!=null}function y5(n){let e=n.mnemonic;return e&&e.phrase}var ln=class extends Nt{constructor(e,t){if(super(),p5(e)){let a=new Tn(e.privateKey);if(B(this,"_signingKey",()=>a),B(this,"address",vn(this.publicKey)),this.address!==ce(e.address)&&wr.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),y5(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&&wr.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else B(this,"_mnemonic",()=>null)}else{if(Tn.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 a=new Tn(e);B(this,"_signingKey",()=>a)}B(this,"_mnemonic",()=>null),B(this,"address",vn(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 ln(this,e)}signTransaction(e){return Re(e).then(t=>{t.from!=null&&(ce(t.from)!==this.address&&wr.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete t.from);let a=this._signingKey().signDigest(fe(os(t)));return os(t,a)})}signMessage(e){return Hf(this,void 0,void 0,function*(){return zr(this._signingKey().signDigest(rr(e)))})}_signTypedData(e,t,a){return Hf(this,void 0,void 0,function*(){let i=yield vt.resolveNames(e,t,a,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(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={}),El(this,e,t,a)}static createRandom(e){let t=na(16);e||(e={}),e.extraEntropy&&(t=j(Se(fe(ye([t,e.extraEntropy])),0,16)));let a=ki(t,e.locale);return ln.fromMnemonic(a,e.path,e.locale)}static fromEncryptedJson(e,t,a){return Uf(e,t,a).then(i=>new ln(i))}static fromEncryptedJsonSync(e,t){return new ln(Vf(e,t))}static fromMnemonic(e,t,a){return t||(t=va),new ln(St.fromMnemonic(e,null,a).derivePath(t))}};function qf(n,e){return gi(rr(n),e)}function Gf(n,e,t,a){return gi(vt.hash(n,e,t),a)}var ra={};Ki(ra,{AlchemyProvider:()=>Cr,AlchemyWebSocketProvider:()=>ks,AnkrProvider:()=>As,BaseProvider:()=>ia,CloudflareProvider:()=>Es,EtherscanProvider:()=>Ms,FallbackProvider:()=>Is,Formatter:()=>X,InfuraProvider:()=>Sr,InfuraWebSocketProvider:()=>Rs,IpcProvider:()=>Ul,JsonRpcBatchProvider:()=>du,JsonRpcProvider:()=>tn,JsonRpcSigner:()=>Er,NodesmithProvider:()=>Ps,PocketProvider:()=>Ns,Provider:()=>Xt,Resolver:()=>Ar,StaticJsonRpcProvider:()=>_s,UrlJsonRpcProvider:()=>Rt,Web3Provider:()=>Ds,WebSocketProvider:()=>Ea,getDefaultProvider:()=>lu,getNetwork:()=>cs,isCommunityResourcable:()=>Il,isCommunityResource:()=>xs,showThrottleMessage:()=>aa});var zf="networks/5.7.1";var Wf=new E(zf);function f5(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 Kf={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:ka("homestead")},Jf={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:ka("ropsten")},$f={chainId:63,name:"classicMordor",_defaultProvider:Qo("https://www.ethercluster.com/mordor","classicMordor")},$o={unspecified:{chainId:0,name:"unspecified"},homestead:Kf,mainnet:Kf,morden:{chainId:2,name:"morden"},ropsten:Jf,testnet:Jf,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:$f,classicTestnet:$f,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 cs(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"&&Wf.throwArgumentError("invalid network chainId","network",n),n;n.chainId!==0&&n.chainId!==e.chainId&&Wf.throwArgumentError("network chainId mismatch","network",n);let t=n._defaultProvider||null;return t==null&&e._defaultProvider&&(f5(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 Qf="web/5.7.1";var c5=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})};function Yf(n,e){return c5(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 m5=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Dn=new E(Qf);function Xf(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 h5(n){return we(n.replace(/%([0-9a-f][0-9a-f])/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))}function Ml(n,e,t){let a=typeof n=="object"&&n.throttleLimit!=null?n.throttleLimit:12;Dn.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;Dn.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"},f=!1,x=2*60*1e3;if(typeof n=="string")l=n;else if(typeof n=="object"){if((n==null||n.url==null)&&Dn.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&&(f=!0);if(p.allowGzip=!!n.allowGzip,n.user!=null&&n.password!=null){l.substring(0,6)!=="https:"&&n.allowInsecureAuthentication!==!0&&Dn.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 "+ir(we(O))}}n.skipFetchSetup!=null&&(p.skipFetchSetup=!!n.skipFetchSetup),n.fetchOptions!=null&&(p.fetchOptions=_e(n.fetchOptions))}let I=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),_=l?l.match(I):null;if(_)try{let O={statusCode:200,statusMessage:"OK",headers:{"content-type":_[1]||"text/plain"},body:_[2]?ar(_[3]):h5(_[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: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(Dn.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 m5(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: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){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=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 Ml(n,i,a)}function Bn(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(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()&&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(f){s()&&a(f)})}p()})}var Nl=Cn(nc());var Ee="providers/5.7.2";var hs=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),f=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(f),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():hs.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 ce(e)}callAddress(e){if(!ie(e,32))return null;let t=ce(Se(e,12));return t===mo?null:t}contractAddress(e){return mi(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 qn(e);throw new Error("invalid blockTag")}hash(e,t){let a=this.hex(e,t);return Ft(a)!==32?hs.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 me(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&&hs.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=a,delete t.root):hs.throwArgumentError("invalid alt-root-status","value.root",t.root)}else t.root.length!==66&&hs.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 xs(n){return Il(n)&&n.isCommunityResource()}var ac=!1;function aa(){ac||(ac=!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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},he=new E(Ee),k5=10;function ic(n){return n==null?"null":(Ft(n)!==32&&he.throwArgumentError("invalid topic","topic",n),n.toLowerCase())}function rc(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[ic(i)]=!0});let a=Object.keys(t);return a.sort(),a.join("|")}else return ic(e)}).join("&")}function A5(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 kr(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:*:"+rc(n);if(Eo.isForkEvent(n))throw he.warn("not implemented"),new Error("not implemented");if(n&&typeof n=="object")return"filter:"+(n.address||"*")+":"+rc(n.topics||[])}throw new Error("invalid event - "+n)}function bs(){return new Date().getTime()}function sc(n){return new Promise(e=>{setTimeout(e,n)})}var E5=["block","network","pending","poll"],Dl=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=A5(e[2]),i={};return a.length>0&&(i.topics=a),t&&t!=="*"&&(i.address=t),i}pollable(){return this.tag.indexOf(":")>=0||E5.indexOf(this.tag)>=0}},M5={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 Sl(n){return me(F.from(n).toHexString(),32)}function oc(n){return ga.encode(ye([n,Se(en(en(n)),0,4)]))}var lc=new RegExp("^(ipfs)://(.*)$","i"),uc=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),lc,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function eu(n,e){try{return Yt(gs(n,e))}catch{}return null}function gs(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 Rl(n){return n.match(/^ipfs:\/\/ipfs\//i)?n=n.substring(12):n.match(/^ipfs:\/\//i)?n=n.substring(7):he.throwArgumentError("unsupported IPFS format","link",n),`https://gateway.ipfs.io/ipfs/${n}`}function dc(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 C5(n){if(n.length%32===0)return n;let e=new Uint8Array(Math.ceil(n.length/32)*32);return e.set(n),e}function pc(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:At([e,Oa(this.name),t||"0x"])},i=!1;(yield this.supportsWildcard())&&(i=!0,a.data=At(["0x9061b923",pc([as(this.name),a.data])]));try{let r=yield this.provider.call(a);return j(r).length%32===4&&he.throwError("resolver threw error",E.errors.CALL_EXCEPTION,{transaction:a,data:r}),i&&(r=gs(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?gs(a,0):null})}_getAddress(e,t){let a=M5[String(e)];if(a==null&&he.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 oc(ye([[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 oc(ye([[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=Nl.default.toWords(i.slice(2));return o.unshift(s),Nl.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===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",Sl(e));if(t==null||t==="0x")return null;let a=this._getAddress(e,t);return a==null&&he.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 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=we(e);t=ye([Sl(64),Sl(t.length),t]),t.length%32!==0&&(t=ye([t,me("0x",32-e.length%32)]));let a=yield this._fetchBytes("0x59d1d43c",W(t));return a==null||a==="0x"?null:Yt(a)})}},Pl=null,I5=1,ia=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)):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 Pl==null&&(Pl=new X),Pl}static getNetwork(e){return cs(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 On({url:p,errorPassThrough:!0},f,(_,v)=>(_.status=v.statusCode,_));if(x.data)return x.data;let I=x.message||"unknown error";if(x.status>=400&&x.status<500)return he.throwError(`response not found during CCIP fetch: ${I}`,E.errors.SERVER_ERROR,{url:l,errorMessage:I});s.push(I)}return he.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(bs()-r.respTime<=e)return r.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}let t=bs(),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=bs();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=I5++,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)he.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${a})`),this.emit("error",he.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 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 sc(0),this._network;let a=he.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=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,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,f=function(){return p?!0:(p=!0,l.forEach(I=>{I()}),!1)},x=I=>{I.confirmations{this.removeListener(e,x)}),i){let I=i.startBlock,_=null,v=S=>ue(this,void 0,void 0,function*(){p||(yield sc(1e3),this.getTransactionCount(i.from).then(L=>ue(this,void 0,void 0,function*(){if(!p){if(L<=i.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),l.push(()=>{this.removeListener("block",v)})}if(typeof a=="number"&&a>0){let I=setTimeout(()=>{f()||o(he.makeError("timeout exceeded",E.errors.TIMEOUT,{timeout:a}))},a);I.unref&&I.unref(),l.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",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 he.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 he.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 he.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=>qn(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,a){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&&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&&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)),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>=k5&&he.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)||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(Se(s,32,64)).toNumber(),f=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 Bn(()=>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 Bn(()=>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&&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 a=yield this._getResolver(t,"getResolver");if(a!=null){let i=new Ar(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||he.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"&&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",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 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=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 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,a){let i=new Dl(kr(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=kr(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=kr(e);return this._events.filter(a=>a.tag===t).length}listeners(e){if(e==null)return this._events.map(a=>a.listener);let t=kr(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=kr(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=kr(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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Mt=new E(Ee),S5=["call","estimateGas"];function vs(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=vs(n[t],e);if(a)return a}return null}if(typeof n=="string")try{return vs(JSON.parse(n),e)}catch{}return null}function fc(n,e,t){let a=t.transaction||t.signedTransaction;if(n==="call"){let r=vs(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:a,error:e})}if(n==="estimateGas"){let r=vs(e.body,!1);r==null&&(r=vs(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: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)&&Mt.throwError("insufficient funds for intrinsic transaction cost",E.errors.INSUFFICIENT_FUNDS,{error:e,method:n,transaction:a}),i.match(/nonce (is )?too low/i)&&Mt.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)&&Mt.throwError("replacement fee too low",E.errors.REPLACEMENT_UNDERPRICED,{error:e,method:n,transaction:a}),i.match(/only replay-protected/i)&&Mt.throwError("legacy pre-eip-155 transactions not supported",E.errors.UNSUPPORTED_OPERATION,{error:e,method:n,transaction:a}),S5.indexOf(n)>=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:n,transaction:a}),e}function yc(n){return new Promise(function(e){setTimeout(e,n)})}function R5(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 Ts(n){return n&&n.toLowerCase()}var Ol={},Er=class extends Nt{constructor(e,t,a){if(super(),e!==Ol)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)):Mt.throwArgumentError("invalid address or index","addressOrIndex",a)}connect(e){return Mt.throwError("cannot alter JSON-RPC Signer connection",E.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new Bl(Ol,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(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&&Mt.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&&Mt.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)&&Mt.throwError("user rejected transaction",E.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:a}),fc("sendTransaction",s,r)))})}signTransaction(e){return Mt.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 Bn(()=>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)&&Mt.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)&&Mt.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)&&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 Aa(this,void 0,void 0,function*(){let t=this.provider,a=yield this.getAddress();return t.send("personal_unlockAccount",[a.toLowerCase(),e,null])})}},Bl=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:a=>this.provider.waitForTransaction(t,a)}))}},P5={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 ia{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 yc(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 Mt.throwError("could not detect network",E.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:a})}}return Mt.throwError("could not detect network",E.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new Er(Ol,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=On(this.connection,JSON.stringify(a),R5).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",[Ts(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[Ts(t.address),t.blockTag]];case"getCode":return["eth_getCode",[Ts(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[Ts(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 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=Ts(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&&Mt.throwError(e+" not implemented",E.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(a[0],a[1])}catch(i){return fc(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 yc(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(P5);if(t)for(let r in t)t[r]&&(a[r]=!0);Qi(e,a);let i={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(r){if(e[r]==null)return;let s=qn(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(Ee);Mr=function(){e.throwError("WebSockets not supported in this environment",E.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var Fl=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},tu=new E(Ee),N5=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 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 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 Fl(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=N5++;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 Fl(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 Fl(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 D5=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},ws=new E(Ee),_s=class extends tn{detectNetwork(){let e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return D5(this,void 0,void 0,function*(){let t=this.network;return t==null&&(t=yield e.detectNetwork.call(this),t||ws.throwError("no network detected",E.errors.UNKNOWN_ERROR,{}),this._network==null&&(B(this,"_network",t),this.emit("network",t,null))),t})}},Rt=class extends _s{constructor(e,t){ws.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(){ws.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(e){return ws.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 ws.throwError("not implemented; sub-classes must override getUrl",E.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}};var cc=new E(Ee),nu="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC",ks=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 ks(e,t)}static getApiKey(e){return e==null?nu:(e&&typeof e!="string"&&cc.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:cc.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+a+t,throttleCallback:(i,r)=>(t===nu&&aa(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===nu}};var O5=new E(Ee),au="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function B5(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 O5.throwArgumentError("unsupported network","name",n)}var As=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://"+B5(e.name)+t,throttleCallback:(i,r)=>(t.apiKey===au&&aa(),Promise.resolve(!0))};return t.projectSecret!=null&&(a.user="",a.password=t.projectSecret),a}};var F5=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},mc=new E(Ee),Es=class extends Rt{static getApiKey(e){return e!=null&&mc.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:mc.throwArgumentError("unsupported network","network",arguments[0])}return a}perform(e,t){let a=Object.create(null,{perform:{get:()=>super.perform}});return F5(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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Ha=new E(Ee);function hc(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=qn(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 L5(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 xc(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 bc(n){if(n==="pending")throw new Error("pending not supported");return n==="latest"?n:parseInt(n.substring(2),16)}function Ll(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 Ms=class extends ia{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"?xc:L5;this.emit("debug",{action:"request",request:i,provider:this});let o={url:i,throttleSlotInterval:1e3,throttleCallback:(f,x)=>(this.isCommunityResource()&&aa(),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 On(o,l,s||xc);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=>Ll("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=hc(t.transaction);i.module="proxy",i.action="eth_call";try{return yield this.fetch("proxy",i,!0)}catch(r){return Ll("call",r,t.transaction)}}case"estimateGas":{let i=hc(t.transaction);i.module="proxy",i.action="eth_estimateGas";try{return yield this.fetch("proxy",i,!0)}catch(r){return Ll("estimateGas",r,t.transaction)}}case"getLogs":{let i={action:"getLogs"};if(t.filter.fromBlock&&(i.fromBlock=bc(t.filter.fromBlock)),t.filter.toBlock&&(i.toBlock=bc(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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Ai=new E(Ee);function ru(){return new Date().getTime()}function gc(n){let e=null;for(let t=0;te?null:(a+i)/2}function Ir(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=>Ir(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=Ir(a),JSON.stringify(t)+":"+a}).join(",")+"}"}throw new Error("unknown value type: "+typeof n)}var U5=1;function vc(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 V5=[E.errors.CALL_EXCEPTION,E.errors.INSUFFICIENT_FUNDS,E.errors.NONCE_EXPIRED,E.errors.REPLACEMENT_UNDERPRICED,E.errors.UNPREDICTABLE_GAS_LIMIT],j5=["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 H5(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 q5(n,e,t){let a=Ir;switch(e){case"getBlockNumber":return function(i){let r=i.map(o=>o.result),s=Tc(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 Tc(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,Ir(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)),Ir(i))}:a=function(i){return i==null?null:Ir(i)};break;default:throw new Error("unknown method: "+e)}return H5(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:Bn(()=>new Promise((a,i)=>{setTimeout(function(){return t.blockNumber>=e?a(t):n.cancelled?a(null):a(void 0)},0)}),{oncePoll:t})})}function G5(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 Ai.throwError("unknown method error",E.errors.UNKNOWN_ERROR,{method:t,params:a})})}var Is=class extends ia{constructor(e,t){e.length===0&&Ai.throwArgumentError("missing providers","providers",e);let a=e.map((s,o)=>{if(Xt.isProvider(s)){let f=xs(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=xs(s)?2e3:750),l.weight==null&&(l.weight=1);let p=l.weight;return(p%1||p>512||p<1)&&Ai.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&&Ai.throwArgumentError("quorum will always fail; larger than total weight","quorum",t);let r=gc(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 gc(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(f=>f.hash,f=>f)));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=G5(_,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 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 _=a(x);if(_!==void 0)return i.forEach(v=>{v.staller&&v.staller.cancel(),v.cancelled=!0}),_;o||(yield vc(100).getPromise()),o=!1}let I=i.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={};j5.forEach(O=>{S[O]!=null&&(L[O]=S[O])}),Ai.throwError(S.reason||S.message,_,L)}),i.filter(_=>!_.done).length===0)break}return i.forEach(l=>{l.staller&&l.staller.cancel(),l.cancelled=!0}),Ai.throwError("failed to meet quorum",E.errors.SERVER_ERROR,{method:e,params:t,results:i.map(l=>su(l)),provider:this})})}};var Ul=null;var uu=new E(Ee),Ss="84842078b09946638c03157f83405213",Rs=class extends Ea{constructor(e,t){let a=new Sr(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===Ss}},Sr=class extends Rt{static getWebSocketProvider(e,t){return new Rs(e,t)}static getApiKey(e){let t={apiKey:Ss,projectId:Ss,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===Ss&&aa(),Promise.resolve(!0))};return t.projectSecret!=null&&(i.user="",i.password=t.projectSecret),i}isCommunityResource(){return this.projectId===Ss}};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}),On(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 I=new Error(x.error.message);I.code=x.error.code,I.data=x.error.data,p.reject(I)}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 Vl=new E(Ee),z5="ETHERS_JS_SHARED",Ps=class extends Rt{static getApiKey(e){return e&&typeof e!="string"&&Vl.throwArgumentError("invalid apiKey","apiKey",e),e||z5}static getUrl(e,t){Vl.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:Vl.throwArgumentError("unsupported network","network",arguments[0])}return a+"?apiKey="+t}};var wc=new E(Ee),_c="62e1ad51b37b8e00394bda3b",Ns=class extends Rt{static getApiKey(e){let t={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return e==null?t.applicationId=_c: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 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:wc.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===_c}};var kc=new E(Ee),W5=1;function Ac(n,e){let t="Web3LegacyFetcher";return function(a,i){let r={method:a,params:i,id:W5++,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 f=new Error(p.error.message);return f.code=p.error.code,f.data=p.error.data,o(f)}s(p.result)})})}}function K5(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 Ds=class extends tn{constructor(e,t){e==null&&kc.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=K5(e)):e.sendAsync?i=Ac(e,e.sendAsync.bind(e)):e.send?i=Ac(e,e.send.bind(e)):kc.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 Ec=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:Ec.throwArgumentError("unsupported URL scheme","network",n)}}let t=cs(n);return(!t||!t._defaultProvider)&&Ec.throwError("unsupported getDefaultProvider network",E.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:n}),t._defaultProvider({FallbackProvider:Is,AlchemyProvider:Cr,AnkrProvider:As,CloudflareProvider:Es,EtherscanProvider:Ms,InfuraProvider:Sr,JsonRpcProvider:tn,NodesmithProvider:Ps,PocketProvider:Ns,Web3Provider:Ds,IpcProvider:null},e)}var te={};Ki(te,{AbiCoder:()=>nr,ConstructorFragment:()=>Lt,ErrorFragment:()=>rn,EventFragment:()=>Wt,FormatTypes:()=>Te,Fragment:()=>Kt,FunctionFragment:()=>Ut,HDNode:()=>St,Indexed:()=>ca,Interface:()=>Ba,LogDescription:()=>sr,Logger:()=>E,ParamType:()=>ct,RLP:()=>so,SigningKey:()=>Tn,SupportedAlgorithm:()=>ta,TransactionDescription:()=>or,TransactionTypes:()=>Bo,UnicodeNormalizationForm:()=>Jt,Utf8ErrorFuncs:()=>To,Utf8ErrorReason:()=>Vt,_TypedDataEncoder:()=>vt,_fetchData:()=>Ml,_toEscapedUtf8String:()=>Pd,accessListify:()=>dn,arrayify:()=>j,base58:()=>ga,base64:()=>Ld,checkProperties:()=>Qi,checkResultErrors:()=>Xi,commify:()=>Dc,computeAddress:()=>vn,computeHmac:()=>Ta,computePublicKey:()=>ss,concat:()=>ye,deepCopy:()=>xt,defaultAbiCoder:()=>ts,defaultPath:()=>va,defineReadOnly:()=>B,dnsEncode:()=>as,entropyToMnemonic:()=>ki,fetchJson:()=>On,formatBytes32String:()=>Nd,formatEther:()=>Oc,formatUnits:()=>jl,getAccountPath:()=>Ef,getAddress:()=>ce,getContractAddress:()=>mi,getCreate2Address:()=>Uy,getIcapAddress:()=>Ly,getJsonWalletAddress:()=>wl,getStatic:()=>bt,hashMessage:()=>rr,hexConcat:()=>At,hexDataLength:()=>Ft,hexDataSlice:()=>Se,hexStripZeros:()=>vd,hexValue:()=>qn,hexZeroPad:()=>me,hexlify:()=>W,id:()=>sn,isAddress:()=>Fy,isBytes:()=>fn,isBytesLike:()=>la,isHexString:()=>ie,isValidMnemonic:()=>Af,isValidName:()=>Vd,joinSignature:()=>zr,keccak256:()=>fe,mnemonicToEntropy:()=>Tr,mnemonicToSeed:()=>ml,namehash:()=>Oa,nameprep:()=>Fd,parseBytes32String:()=>Dd,parseEther:()=>Bc,parseTransaction:()=>Fo,parseUnits:()=>Hl,poll:()=>Bn,randomBytes:()=>na,recoverAddress:()=>gi,recoverPublicKey:()=>Oo,resolveProperties:()=>Re,ripemd160:()=>ds,serializeTransaction:()=>os,sha256:()=>en,sha512:()=>pl,shallowCopy:()=>_e,shuffled:()=>ys,solidityKeccak256:()=>Ic,solidityPack:()=>pu,soliditySha256:()=>Sc,splitSignature:()=>Gn,stripZeros:()=>nn,toUtf8Bytes:()=>we,toUtf8CodePoints:()=>Da,toUtf8String:()=>Yt,verifyMessage:()=>qf,verifyTypedData:()=>Gf,zeroPad:()=>pi});var Mc="solidity/5.7.0";var J5=new RegExp("^bytes([0-9]+)$"),$5=new RegExp("^(u?int)([0-9]*)$"),Q5=new RegExp("^(.*)\\[([0-9]*)\\]$"),Y5="0000000000000000000000000000000000000000000000000000000000000000",Rr=new E(Mc);function Cc(n,e,t){switch(n){case"address":return t?pi(e,32):j(e);case"string":return we(e);case"bytes":return j(e);case"bool":return e=e?"0x01":"0x00",t?pi(e,32):j(e)}let a=n.match($5);if(a){let i=parseInt(a[2]||"256");return(a[2]&&String(i)!==a[2]||i%8!==0||i===0||i>256)&&Rr.throwArgumentError("invalid number type","type",n),t&&(i=256),e=F.from(e).toTwos(i),pi(e,i/8)}if(a=n.match(J5),a){let i=parseInt(a[1]);return(String(i)!==a[1]||i===0||i>32)&&Rr.throwArgumentError("invalid bytes type","type",n),j(e).byteLength!==i&&Rr.throwArgumentError(`invalid value for ${n}`,"value",e),t?j((e+Y5).substring(0,66)):e}if(a=n.match(Q5),a&&Array.isArray(e)){let i=a[1];parseInt(a[2]||String(e.length))!=e.length&&Rr.throwArgumentError(`invalid array length for ${n}`,"value",e);let s=[];return e.forEach(function(o){s.push(Cc(i,o,!0))}),ye(s)}return Rr.throwArgumentError("invalid type","type",n)}function pu(n,e){n.length!=e.length&&Rr.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);let t=[];return n.forEach(function(a,i){t.push(Cc(a,e[i]))}),W(ye(t))}function Ic(n,e){return fe(pu(n,e))}function Sc(n,e){return en(pu(n,e))}var Rc="units/5.7.0";var Pc=new E(Rc),Nc=["wei","kwei","mwei","gwei","szabo","finney","ether"];function Dc(n){let e=String(n).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||n==="."||n==="-.")&&Pc.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 jl(n,e){if(typeof e=="string"){let t=Nc.indexOf(e);t!==-1&&(e=3*t)}return $i(n,e??18)}function Hl(n,e){if(typeof n!="string"&&Pc.throwArgumentError("value must be a string","value",n),typeof e=="string"){let t=Nc.indexOf(e);t!==-1&&(e=3*t)}return mn(n,e??18)}function Oc(n){return jl(n,18)}function Bc(n){return Hl(n,18)}var yu="ethers/5.7.2";var Fc=new E(yu);try{let n=window;n._ethers==null&&(n._ethers=ql)}catch{}var Fn;(function(n){n.Mainnet="Mainnet",n.Custom="Custom",n.Gnosis="Xdai",n.Goerli="Goerli",n.Xdai="Xdai",n.XdaiQa="XdaiQa",n.ArbitrumOne="ArbitrumOne",n.ArbitrumSepolia="ArbitrumSepolia"})(Fn||(Fn={}));var Lc;(function(n){n[n.Custom=0]="Custom",n[n.Mainnet=1]="Mainnet",n[n.Goerli=5]="Goerli",n[n.Gnosis=100]="Gnosis",n[n.Xdai=100]="Xdai",n[n.XdaiQa=100]="XdaiQa",n[n.ArbitrumSepolia=421614]="ArbitrumSepolia",n[n.ArbitrumOne=42161]="ArbitrumOne"})(Lc||(Lc={}));var fu;(function(n){n.Mainnet="0x5346D0f80e2816FaD329F2c140c870ffc3c3E2Ef",n.Goerli="0x79073fc2117dD054FCEdaCad1E7018C9CbE3ec0B",n.Xdai="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.XdaiQa="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.Custom="",n.ArbitrumOne="0xcccccdcc0ccf6c708d860e19353c5f9a49accccc",n.ArbitrumSepolia="0x7777494e3d8cce0D3570E21FEf820F9Fee077777"})(fu||(fu={}));var Pr;(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",n.ArbitrumOne="https://app.colony.io/reputation/arbitrum-one",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/reputation/arbitrum-sepolia"})(Pr||(Pr={}));var cu;(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="",n.ArbitrumOne="https://app.colony.io/metatransaction/arbitrum-one",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/metatransaction/arbitrum-sepolia"})(cu||(cu={}));var Gl;(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="",n.ArbitrumOne="https://app.colony.io/public-rpc/",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/public-rpc/"})(Gl||(Gl={}));var Os;(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",n.ArbitrumOne=".colony.joincolony.arbitrum",n.ArbitrumSepolia=".colony.joincolony.sepolia"})(Os||(Os={}));var Bs;(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",n.ArbitrumOne=".user.joincolony.arbitrum",n.ArbitrumSepolia=".user.joincolony.sepolia"})(Bs||(Bs={}));var zl;(function(n){let e;(function(i){i.ETH="0x0000000000000000000000000000000000000000",i.CLNY="0x3E828ac5C480069D4765654Fb4b8733b910b13b2",i.USDC="0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"})(e=n.Mainnet||(n.Mainnet={}));let t;(function(i){i.XDAI="0x0000000000000000000000000000000000000000",i.CLNY="0xc9B6218AffE8Aba68a13899Cbf7cF7f14DDd304C",i.USDC="0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83"})(t=n.Gnosis||(n.Gnosis={}));let a;(function(i){i.ETH="0x0000000000000000000000000000000000000000",i.CLNY="0xcccccdcc0ccf6c708d860e19353c5f9a49accccc",i.USDC="0xaf88d065e77c8cC2239327C5EDb3A432268e5831"})(a=n.ArbitrumOne||(n.ArbitrumOne={}))})(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 Kl="0x12345678",Wl;(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"})(Wl||(Wl={}));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 xe;(function(n){n.FundingQueue="FundingQueue",n.IVotingReputation="IVotingReputation",n.MultisigPermissions="MultisigPermissions",n.OneTxPayment="OneTxPayment",n.ReputationBootstrapper="ReputationBootstrapper",n.StagedExpenditure="StagedExpenditure",n.StakedExpenditure="StakedExpenditure",n.StreamingPayments="StreamingPayments",n.TokenSupplier="TokenSupplier",n.VotingReputation="VotingReputation"})(xe||(xe={}));var Jl=[{inputs:[{internalType:"bytes4",name:"_sig",type:"bytes4"}],name:"getCapabilityRoles",outputs:[{internalType:"bytes32",name:"roles",type:"bytes32"}],stateMutability:"view",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 $l=[{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"}],Mi=class{static createInterface(){return new te.Interface($l)}static connect(e,t){return new oe(e,$l,t)}};be(Mi,"abi",$l);var Uc=(n,e)=>{throw new Error(`${e}: ${n}`)},mu=n=>n!=null;var{keccak256:Z5,toUtf8Bytes:eb}=te,{MaxUint256:tb}=gt;var Nr=n=>te.formatEther(n),Dr=n=>te.parseEther(n),pn=n=>Dr(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(mu)},Ci=async(n,e,t,a)=>{if(F.from(t).eq(F.from(a)))return tb;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=>Z5(eb(n));var Or=async(n,e)=>(await Mi.connect(n,e).version()).toNumber(),Yl=(n,e)=>n.map(t=>{try{return e.parseLog(t)}catch{return null}}).filter(mu);var{hexDataSlice:Xl}=te,{MaxUint256:nb}=gt,Vc=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}},jc=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),nb,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 Ci(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]},ab=async(n,e,t,a,i)=>{let r=await Promise.all(a.map(s=>jc(n,e,t,s,i)));for(let s=0;sArray.isArray(a)?a.length===1?sa(n,e,t,a[0],i):ab(n,e,t,a,i):jc(n,e,t,a,i);var{MaxUint256:Hc}=gt,{AddressZero:ib}=gt;async function rb(n,e){let t;try{return t=await n.getCapabilityRoles(te.hexZeroPad(e,4)),hu(t)}catch{return[]}}async function Fs(n,e,t,a,i,r,s){let o,{skillId:l}=await e.getDomain(i),{sig:p,permissionDomainId:f,childSkillIndex:x}=Vc(s),I=Ei.connect(r,a.signer||a.provider),_=await rb(I,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=Hc}else{let{skillId:U}=await e.getDomain(f),H=await n.getChildSkillId(U,x);if(H.eq(l))o=Hc;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,ib);return{actionCid:o,key:v,value:S,branchMask:L,siblings:O}}var{AddressZero:sb}=gt,oa=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||Fn.ArbitrumOne;this.endpointUrl=a?.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,a){let i=await this.getBaseEndpoint(a),r=F.from(e||0).toString(),s=`${i}/${r}/${t}/noProof`,o=await oa.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 oa.fetchReputation(s);return{...o,reputationAmount:F.from(o.reputationAmount||0)}}async getReputationAcrossDomains(e,t){let i=`${await this.getBaseEndpoint(t)}/${e}/all`,r=await oa.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 a=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${a}/${i}`;return oa.fetchReputation(r)}async getTotalReputation(e,t){let a=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${a}/${i}/${sb}/noProof`,s=await oa.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 Ct=n=>Array.from(Array(n-1)).map((e,t)=>t+1);var qc=10,Wk=Ct(qc),Gc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},zc=qc-1;var Wc=3,$k=Ct(Wc),Kc={1:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],2:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]},Jc=Wc-1;var $c=10,Xk=Ct($c),Qc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Yc=$c-1;var Xc=7,tA=Ct(Xc),Zc={1:[],2:[],3:[],4:[],5:[],6:[]},em=Xc-1;var tm=8,iA=Ct(tm),nm={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3],6:[1,2,3],7:[1,2,3]},am=tm-1;var im=5,oA=Ct(im),rm={1:[1,2,3,4,5,6,7,8,9,10,11,12,13],2:[1,2,3,4,5,6,7,8,9,10,11,12,13],3:[1,2,3,4,5,6,7,8,9,10,11,12,13],4:[1,2,3,4,5,6,7,8,9,10,11,12,13]},sm=im-1;var om=7,lA=Ct(om),um={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3],6:[1,2,3]},dm=om-1;var lm=10,fA=Ct(lm),pm={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},ym=lm-1;var fm=14,hA=Ct(fm),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],11:[1,2,3,4,5,6],12:[1,2,3,4,5,6],13:[1,2,3,4,5,6]},ep=fm-1;var cm=18,ob=Ct(cm),gA=cm-1;var ub=(n,e)=>{switch(n){case xe.FundingQueue:return Gc[e];case xe.IVotingReputation:return Zl[e];case xe.MultisigPermissions:return Kc[e];case xe.OneTxPayment:return Qc[e];case xe.ReputationBootstrapper:return Zc[e];case xe.StagedExpenditure:return rm[e];case xe.StakedExpenditure:return nm[e];case xe.StreamingPayments:return um[e];case xe.TokenSupplier:return pm[e];case xe.VotingReputation:return Zl[e];default:return Uc(n,"Could not find extension with name")}},ua=(n,e,t)=>{let a=ub(n,e);return!!a&&!a.includes(t)};var Br={[xe.FundingQueue]:zc,[xe.IVotingReputation]:ep,[xe.MultisigPermissions]:Jc,[xe.OneTxPayment]:Yc,[xe.ReputationBootstrapper]:em,[xe.StagedExpenditure]:sm,[xe.StakedExpenditure]:am,[xe.StreamingPayments]:dm,[xe.TokenSupplier]:ym,[xe.VotingReputation]:ep};var B6=Cn(mm(),1);var wp=Cn(N6(),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 D6=n=>`Validation error(s): ${n.map(t=>`Error in ${t.path}. Seen: ${t.value}, expected: ${t.expected}`).join(` -`)}`,v1=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 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&&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"?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=wp.default.validate.report(s);r(i)===!1&&((p,f,x=!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}))&&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"?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: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}})(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=D6(t.errors);throw new Error(a)};var O6=(n,e)=>{let t=n===Ne.Colony?v1(e):e,a=(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&&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"?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=wp.default.validate.report(s);r(i)===!1&&((p,f,x=!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}))&&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"?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: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}})({name:n,data:t,version:vp});if(!a.success){let i=D6(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,B6.default)(fetch,{headers:{Accept:"application/json"},retryOn:[404,503],retries:3,retryDelay:5e3}),zs={[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]:""},jr=class{adapter;constructor(e){this.adapter=e||new Ap}static eventSupportsMetadata(e){return!!Object.keys(zs).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(zs).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=O6(e,t),i=JSON.stringify(a);return this.adapter.uploadJson(i)}};var qE=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 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)}};be(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"}],Di=class{static createInterface(){return new te.Interface(Ip)}static connect(e,t){return new oe(e,Ip,t)}};be(Di,"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:"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:"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:[{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:"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:"returnData",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",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:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],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:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"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:[],name:"unlock",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"}],F6="0x60c060405234801561001057600080fd5b5060405161205738038061205783398101604081905261002f91610307565b60008060018161003d6101ab565b6001600160a01b031681526020810191909152604001600090812091909155556100656101ab565b600480546001600160a01b0319166001600160a01b039290921691909117905561008d6101ab565b6001600160a01b03167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a260066100ce8482610413565b5060056100db8382610413565b5060ff81166080526007805460ff1916600117905560405146907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f90610123906006906104d1565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051601f19818403018152919052805160209091012060a0525061054692505050565b60003633301480156101be575060348110155b1561024757600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e881146102365733935050505090565b5001516001600160a01b0316919050565b3391505090565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261027557600080fd5b81516001600160401b0381111561028e5761028e61024e565b604051601f8201601f19908116603f011681016001600160401b03811182821017156102bc576102bc61024e565b6040528181528382016020018510156102d457600080fd5b60005b828110156102f3576020818601810151838301820152016102d7565b506000918101602001919091529392505050565b60008060006060848603121561031c57600080fd5b83516001600160401b0381111561033257600080fd5b61033e86828701610264565b602086015190945090506001600160401b0381111561035c57600080fd5b61036886828701610264565b925050604084015160ff8116811461037f57600080fd5b809150509250925092565b600181811c9082168061039e57607f821691505b6020821081036103be57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561040e57806000526020600020601f840160051c810160208510156103eb5750805b601f840160051c820191505b8181101561040b57600081556001016103f7565b50505b505050565b81516001600160401b0381111561042c5761042c61024e565b6104408161043a845461038a565b846103c4565b6020601f821160018114610474576000831561045c5750848201515b600019600385901b1c1916600184901b17845561040b565b600084815260208120601f198516915b828110156104a45787850151825560209485019460019092019101610484565b50848210156104c25786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b60008083546104df8161038a565b6001821680156104f6576001811461050b5761053b565b60ff198316865281151582028601935061053b565b86600052602060002060005b8381101561053357815488820152600190910190602001610517565b505081860193505b509195945050505050565b60805160a051611ae5610572600039600081816102e10152610f870152600061029b0152611ae56000f3fe6080604052600436106101815760003560e01c80637a9e5e4b116100d1578063a69df4b51161008a578063bf7e214f11610064578063bf7e214f146104b1578063cf309012146104d1578063d505accf146104eb578063dd62ed3e1461050b57600080fd5b8063a69df4b51461047c578063a9059cbb14610491578063b3eac1d8146103b957600080fd5b80637a9e5e4b146103995780637ecebe00146103b95780638da5cb5b146103ef57806395d89b41146104275780639dc29fac1461043c578063a0712d681461045c57600080fd5b806330adf81f1161013e57806340c10f191161011857806340c10f191461030357806342966c68146103235780636281133d1461034357806370a082311461036357600080fd5b806330adf81f14610255578063313ce567146102895780633644e515146102cf57600080fd5b806306fdde0314610186578063095ea7b3146101b15780630c53c51c146101e157806313af4035146101f457806318160ddd1461021657806323b872dd14610235575b600080fd5b34801561019257600080fd5b5061019b610551565b6040516101a891906115b0565b60405180910390f35b3480156101bd57600080fd5b506101d16101cc3660046115d8565b6105df565b60405190151581526020016101a8565b61019b6101ef3660046116bf565b610672565b34801561020057600080fd5b5061021461020f366004611733565b610859565b005b34801561022257600080fd5b506000545b6040519081526020016101a8565b34801561024157600080fd5b506101d1610250366004611750565b6108dc565b34801561026157600080fd5b506102277f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b34801561029557600080fd5b506102bd7f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101a8565b3480156102db57600080fd5b506102277f000000000000000000000000000000000000000000000000000000000000000081565b34801561030f57600080fd5b5061021461031e3660046115d8565b610950565b34801561032f57600080fd5b5061021461033e366004611791565b610a3f565b34801561034f57600080fd5b506101d161035e3660046117aa565b610a53565b34801561036f57600080fd5b5061022761037e366004611733565b6001600160a01b031660009081526001602052604090205490565b3480156103a557600080fd5b506102146103b4366004611733565b610ba7565b3480156103c557600080fd5b506102276103d4366004611733565b6001600160a01b031660009081526008602052604090205490565b3480156103fb57600080fd5b5060045461040f906001600160a01b031681565b6040516001600160a01b0390911681526020016101a8565b34801561043357600080fd5b5061019b610c18565b34801561044857600080fd5b506102146104573660046115d8565b610c25565b34801561046857600080fd5b50610214610477366004611791565b610e1c565b34801561048857600080fd5b50610214610e54565b34801561049d57600080fd5b506101d16104ac3660046115d8565b610e87565b3480156104bd57600080fd5b5060035461040f906001600160a01b031681565b3480156104dd57600080fd5b506007546101d19060ff1681565b3480156104f757600080fd5b50610214610506366004611831565b610ea2565b34801561051757600080fd5b506102276105263660046118a0565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6006805461055e906118d9565b80601f016020809104026020016040519081016040528092919081815260200182805461058a906118d9565b80156105d75780601f106105ac576101008083540402835291602001916105d7565b820191906000526020600020905b8154815290600101906020018083116105ba57829003601f168201915b505050505081565b600081600260006105ee611191565b6001600160a01b0390811682526020808301939093526040918201600090812091881680825291909352912091909155610626611191565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161066091815260200190565b60405180910390a35060015b92915050565b60606106a186610697886001600160a01b031660009081526008602052604090205490565b4688888888610a53565b6107045760405162461bcd60e51b815260206004820152602960248201527f6d6574617472616e73616374696f6e2d7369676e65722d7369676e617475726560448201526805adad2e6dac2e8c6d60bb1b60648201526084015b60405180910390fd5b61070d86611234565b6000306001600160a01b0316867f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e88960405160200161074e93929190611913565b60408051601f19818403018152908290526107689161194c565b6000604051808303816000865af19150503d80600081146107a5576040519150601f19603f3d011682016040523d82523d6000602084013e6107aa565b606091505b50925090508061080d5760405162461bcd60e51b815260206004820152602860248201527f636f6c6f6e792d6d65746174782d66756e6374696f6e2d63616c6c2d756e737560448201526718d8d95cdcd99d5b60c21b60648201526084016106fb565b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b87610837611191565b8860405161084793929190611968565b60405180910390a15095945050505050565b610876610864611191565b6000356001600160e01b031916611260565b6108925760405162461bcd60e51b81526004016106fb9061199d565b600480546001600160a01b0319166001600160a01b0383169081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60075460009060ff161561093d576108f5610864611191565b61093d5760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b61094884848461133b565b949350505050565b61095b610864611191565b6109775760405162461bcd60e51b81526004016106fb9061199d565b6001600160a01b0382166000908152600160205260408120805483929061099f9084906119e1565b92505081905550806000808282546109b791906119e1565b90915550506040518181526001600160a01b038316907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a26040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b610a50610a4a611191565b82610c25565b50565b600080610ad088308989604051602001610a7094939291906119f4565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b6040805160008082526020820180845284905260ff87169282019290925260608101889052608081018790529192509060019060a0016020604051602081039080840390855afa158015610b28573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610b8b5760405162461bcd60e51b815260206004820152601f60248201527f636f6c6f6e792d6d65746174782d696e76616c69642d7369676e61747572650060448201526064016106fb565b6001600160a01b038a8116911614915050979650505050505050565b610bb2610864611191565b610bce5760405162461bcd60e51b81526004016106fb9061199d565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6005805461055e906118d9565b610c2d611191565b6001600160a01b0316826001600160a01b031614610d2d576001600160a01b03821660009081526002602052604081208291610c67611191565b6001600160a01b03166001600160a01b03168152602001908152602001600020541015610cd65760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03821660009081526002602052604081208291610cf8611191565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610d279190611a3a565b90915550505b6001600160a01b038216600090815260016020526040902054811115610d955760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b03821660009081526001602052604081208054839290610dbd908490611a3a565b9250508190555080600080828254610dd59190611a3a565b90915550506040518181526001600160a01b038316907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59060200160405180910390a25050565b610e27610864611191565b610e435760405162461bcd60e51b81526004016106fb9061199d565b610a50610e4e611191565b82610950565b610e5f610864611191565b610e7b5760405162461bcd60e51b81526004016106fb9061199d565b6007805460ff19169055565b6000610e9b610e94611191565b84846108dc565b9392505050565b60075460ff1615610f0057610eb8610864611191565b610f005760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b42841015610f505760405162461bcd60e51b815260206004820152601d60248201527f636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e6500000060448201526064016106fb565b6040805180820182526002815261190160f01b6020808301919091526001600160a01b038a166000908152600890915291822080547f0000000000000000000000000000000000000000000000000000000000000000917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c9188610fd983611a4d565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161103d93929190611a66565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa1580156110a8573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906110de5750886001600160a01b0316816001600160a01b0316145b61112a5760405162461bcd60e51b815260206004820152601e60248201527f636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e6174757265000060448201526064016106fb565b6001600160a01b038981166000818152600260209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b60003633301480156111a4575060348110155b1561122d57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e8811461121c5733935050505090565b5001516001600160a01b0316919050565b3391505090565b6001600160a01b038116600090815260086020526040812080549161125883611a4d565b919050555050565b6000306001600160a01b0384160361127a5750600161066c565b6004546001600160a01b03908116908416036112985750600161066c565b6003546001600160a01b03166112b05750600061066c565b60035460405163b700961360e01b81526001600160a01b0385811660048301523060248301526001600160e01b0319851660448301529091169063b700961390606401602060405180830381865afa158015611310573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113349190611a8d565b905061066c565b6000611345611191565b6001600160a01b0316846001600160a01b031614611445576001600160a01b0384166000908152600260205260408120839161137f611191565b6001600160a01b03166001600160a01b031681526020019081526020016000205410156113ee5760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03841660009081526002602052604081208391611410611191565b6001600160a01b03166001600160a01b03168152602001908152602001600020600082825461143f9190611a3a565b90915550505b6001600160a01b0384166000908152600160205260409020548211156114ad5760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b038416600090815260016020526040812080548492906114d5908490611a3a565b90915550506001600160a01b038316600090815260016020526040812080548492906115029084906119e1565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161154e91815260200190565b60405180910390a35060019392505050565b60005b8381101561157b578181015183820152602001611563565b50506000910152565b6000815180845261159c816020860160208601611560565b601f01601f19169290920160200192915050565b602081526000610e9b6020830184611584565b6001600160a01b0381168114610a5057600080fd5b600080604083850312156115eb57600080fd5b82356115f6816115c3565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261162b57600080fd5b813567ffffffffffffffff81111561164557611645611604565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561167457611674611604565b60405281815283820160200185101561168c57600080fd5b816020850160208301376000918101602001919091529392505050565b803560ff811681146116ba57600080fd5b919050565b600080600080600060a086880312156116d757600080fd5b85356116e2816115c3565b9450602086013567ffffffffffffffff8111156116fe57600080fd5b61170a8882890161161a565b9450506040860135925060608601359150611727608087016116a9565b90509295509295909350565b60006020828403121561174557600080fd5b8135610e9b816115c3565b60008060006060848603121561176557600080fd5b8335611770816115c3565b92506020840135611780816115c3565b929592945050506040919091013590565b6000602082840312156117a357600080fd5b5035919050565b600080600080600080600060e0888a0312156117c557600080fd5b87356117d0816115c3565b96506020880135955060408801359450606088013567ffffffffffffffff8111156117fa57600080fd5b6118068a828b0161161a565b9450506080880135925060a0880135915061182360c089016116a9565b905092959891949750929550565b600080600080600080600060e0888a03121561184c57600080fd5b8735611857816115c3565b96506020880135611867816115c3565b95506040880135945060608801359350611883608089016116a9565b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156118b357600080fd5b82356118be816115c3565b915060208301356118ce816115c3565b809150509250929050565b600181811c908216806118ed57607f821691505b60208210810361190d57634e487b7160e01b600052602260045260246000fd5b50919050565b60008451611925818460208901611560565b919091019283525060601b6bffffffffffffffffffffffff19166020820152603401919050565b6000825161195e818460208701611560565b9190910192915050565b6001600160a01b0384811682528316602082015260606040820181905260009061199490830184611584565b95945050505050565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561066c5761066c6119cb565b8481526bffffffffffffffffffffffff198460601b16602082015282603482015260008251611a2a816054850160208701611560565b9190910160540195945050505050565b8181038181111561066c5761066c6119cb565b600060018201611a5f57611a5f6119cb565b5060010190565b60008451611a78818460208901611560565b91909101928352506020820152604001919050565b600060208284031215611a9f57600080fd5b81518015158114610e9b57600080fdfea264697066735822122090928a66070125904780390eb49d45fe12c136aec641b1db69316e0ffefc6da764736f6c634300081b0033",A1=n=>n.length>1,Ln=class extends vi{constructor(...e){A1(e)?super(...e):super($u,F6,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(Ln,"bytecode",F6),be(Ln,"abi",$u);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:"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:"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:[{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:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",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:"_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:"_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:"returnData",type:"bytes"}],stateMutability:"payable",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:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"",type:"address"}],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"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",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:"_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:"_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:"_token",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"incrementLockCounterTo",outputs:[],stateMutability:"nonpayable",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:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"pure",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetwork",type:"address"}],name:"setColonyNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",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:"_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:"_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:"_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:"_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"}],Oi=class{static createInterface(){return new te.Interface(Sp)}static connect(e,t){return new oe(e,Sp,t)}};be(Oi,"abi",Sp);var Bi;(function(n){n.TokenClient="TokenClient",n.TokenLockingClient="TokenLockingClient"})(Bi||(Bi={}));var Un;(function(n){n.Colony="Colony",n.ColonyLegacy="ColonyLegacy",n.Erc20="Erc20",n.Erc2612="Erc2612",n.Sai="Sai"})(Un||(Un={}));var{AddressZero:I1}=gt;async function S1(n){try{await n.authority();return}catch{throw new Error("Token can not be assigned a TokenAuthority")}}var R1=async(n,e)=>{let t,a=!0,i=!0;t=Ln.connect(n,e);try{await t.totalSupply()}catch(r){throw new Error(`Token is probably not a valid ERC20 token, got ${r.message}`)}try{await t.locked(),await S1(t)}catch{a=!1}try{await t.nonces(I1)}catch{i=!1}return a?t.tokenClientType=Un.Colony:i?(t=Mn.connect(n,e),t.tokenClientType=Un.Erc2612):(t=En.connect(n,e),t.tokenClientType=Un.Erc20),t.clientType=Bi.TokenClient,t},Rp=R1;var P1=(n,e)=>{let t=Oi.connect(n,e);return t.clientType=Bi.TokenLockingClient,t},Pp=P1;var{AddressZero:Np}=gt,N1=En.connect(Np,new ra.BaseProvider(3656691)).interface,D1=Di.connect(Np,new ra.BaseProvider(3656691)).interface,O1=Mn.connect(Np,new ra.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"},{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:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{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:"returnData",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:"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:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"}],Ws=class{static createInterface(){return new te.Interface(Dp)}static connect(e,t){return new oe(e,Dp,t)}};Ws.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:"returnData",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"}],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:"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:!1,internalType:"address",name:"bridgeAddress",type:"address"}],name:"BridgeSet",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:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateSentToBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateStoredFromBridge",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:"uint256",name:"skillId",type:"uint256"}],name:"SkillAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillCreationStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillStoredFromBridge",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:[{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"address",name:"_resolver",type:"address"}],name:"addColonyVersion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_resolver",type:"address"}],name:"addExtensionToNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"addPendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPendingSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"addReputationUpdateLogFromBridge",outputs:[],stateMutability:"nonpayable",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:"_parentSkillId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"addSkillFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",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:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"chainId",type:"uint256"}],name:"bridgeCurrentRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"bridgePendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"skillId",type:"uint256"}],name:"bridgeSkillIfNotMiningChain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"burnUnneededRewards",outputs:[],stateMutability:"nonpayable",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:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"}],name:"claimMiningReward",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:"address",name:"_tokenAddress",type:"address"}],name:"createMetaColony",outputs:[],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:"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:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateExtension",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:"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:"returnData",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"getBridgedReputationUpdateCount",outputs:[{internalType:"uint256",name:"bridgedReputationCount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"}],name:"getBridgedSkillCounts",outputs:[{internalType:"uint256",name:"skillCount",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:"uint256",name:"_id",type:"uint256"}],name:"getColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyBridgeAddress",outputs:[{internalType:"address",name:"bridge",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCreationSalt",outputs:[{internalType:"bytes32",name:"salt",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"}],name:"getColonyVersionResolver",outputs:[{internalType:"address",name:"_resolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentColonyVersion",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getENSRegistrar",outputs:[{internalType:"address",name:"_address",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:[{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:[],name:"getFeeInverse",outputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMetaColony",outputs:[{internalType:"address payable",name:"_colonyAddress",type:"address"}],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:"getMiningChainId",outputs:[{internalType:"uint256",name:"reputationMiningChainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"}],name:"getMiningDelegator",outputs:[{internalType:"address",name:"_delegator",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiningResolver",outputs:[{internalType:"address",name:"miningResolverAddress",type:"address"}],stateMutability:"view",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:"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:"address",name:"_token",type:"address"}],name:"getPayoutWhitelist",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"getPendingReputationUpdate",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:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.PendingReputationUpdate",name:"update",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"getPendingSkillAddition",outputs:[{internalType:"uint256",name:"parentId",type:"uint256"}],stateMutability:"view",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:"_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:[{internalType:"bool",name:"_active",type:"bool"}],name:"getReputationMiningCycle",outputs:[{internalType:"address",name:"_repMiningCycleAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningCycleReward",outputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningSkillId",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"view",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:"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_deprecated",type:"bool"}],internalType:"struct ColonyNetworkDataTypes.Skill",name:"_skill",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSkillCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTokenLocking",outputs:[{internalType:"address",name:"_lockingAddress",type:"address"}],stateMutability:"view",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:"miningChainId",type:"uint256"},{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"}],name:"initialiseReputationMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[{internalType:"uint256",name:"_rootLocalSkillId",type:"uint256"}],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:"address",name:"_colony",type:"address"}],name:"isColony",outputs:[{internalType:"bool",name:"_addressIsColony",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],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:"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:"_stakers",type:"address[]"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"punishStakers",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:"_username",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerUserLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_bridgeAddress",type:"address"}],name:"setColonyBridgeAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],name:"setFeeInverse",outputs:[],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:"_miningResolverAddress",type:"address"}],name:"setMiningResolver",outputs:[],stateMutability:"nonpayable",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:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",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:"uint256",name:"_amount",type:"uint256"}],name:"setReputationMiningCycleReward",outputs:[],stateMutability:"nonpayable",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:[{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"},{internalType:"uint256",name:"nonce",type:"uint256"}],name:"setReputationRootHashFromBridge",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:"address",name:"_tokenLockingAddress",type:"address"}],name:"setTokenLocking",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:"uint256",name:"_amount",type:"uint256"}],name:"stakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"startNextCycle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"startTokenAuction",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:"bytes32",name:"_extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"unstakeForMining",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:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"}],Fi=class{static createInterface(){return new te.Interface(Bp)}static connect(e,t){return new oe(e,Bp,t)}};Fi.abi=Bp;var Ma=class{constructor({contract:e,config:t,method:a,args:i,eventData:r,txConfig:s}){this.config=t,this.contract=e,this.method=a,this.args=i,this.eventData=r,this.txConfig=s}async getArgs(e){let t=[];return typeof this.args=="function"?t=await this.args():t=this.args,e&&t.push(e),t}async getTx(e){let t=await this.getArgs(e);return await this.contract.functions[this.method].apply(this.contract,t)}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.config.ipfs.getMetadataForEvent.bind(this.config.ipfs,zs[this.txConfig.metadataType],t.metadata);return[t,e,a]}return[t,e]}return[{},e]}async broadcastMetaTx(e){let{provider:t}=this.config.getSigner();if(!t)throw new Error("No provider found");let i=await(await fetch(`${this.config.metaTxBroadcasterEndpoint}/broadcast`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();if(i.status!=="success")throw new Error(`Could not send Metatransaction. Reason given: ${i.data.reason}`);if(!i.data?.txHash)throw new Error("Could not get transaction hash from broadcaster response");return t.getTransaction(i.data.txHash)}async waitForMetaTx(e){let t=await e.wait();return t.parsedLogs=Yl(t.logs,this.contract.interface),t}tx(){return{send:async e=>{let t=await this.getTx(e);return[t,this.getMined.bind(this,t)]},mined:async e=>{let t=await this.getTx(e);return this.getMined(t)},encode:async()=>{let e=await this.getArgs();return this.contract.interface.encodeFunctionData(this.method,e)}}}};var{arrayify:F1,solidityKeccak256:L1,splitSignature:U1}=te,Wa=class extends Ma{async sendMetaTransaction(e,t){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let a=this.config.getSigner(),{provider:i}=a;if(!i)throw new Error("No provider found");let r;this.config.network===Fn.Custom?r=1:r=(await i.getNetwork()).chainId;let s=await a.getAddress(),o=await this.contract.functions.getMetatransactionNonce(s),l=L1(["uint256","address","uint256","bytes"],[o.toString(),t,r,e]),p=F1(l),f=await a.signMessage(p),{r:x,s:I,v:_}=U1(f),v={target:t,payload:e,userAddress:s,r:x,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(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 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"}],Li=class{static createInterface(){return new te.Interface(Fp)}static connect(e,t){return new oe(e,Fp,t)}};Li.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"}],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:[],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(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:[{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(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{AddressZero:W1}=gt,Vn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(qa(Vn.extensionType),e.address);if(t===W1)throw new Error(`${Vn.extensionType} extension is not installed for this Colony`);let a=await Or(t,e.config.signerOrProvider);if(!ua(Vn.extensionType,a,e.version))throw new Error(`Version ${a} of the ${Vn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Vn.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${Vn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new Vn(e,r,a)}static getLatestSupportedVersion(){return Vn.supportedVersions[Vn.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 f=p.map(_=>r[_]),x=p.map(_=>l[_]),I=p.map(_=>o[_]);return this.colony.createColonyTxCreator(this.oneTxPaymentContract,"makePaymentFundedFromDomain",async()=>{let[_,v]=await sa(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[Me.Administration,Me.Funding],this.oneTxPaymentContract.address),[S,L]=await sa(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[Me.Administration,Me.Funding]);return[_,v,S,L,f,I,x,s,Ae.SkillIgnore]},async _=>({...ne("OneTxPaymentMade",_)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[qa(xe.OneTxPayment),t],async a=>({...ne("ExtensionUpgraded",a)}))}},Ka=Vn;Ka.supportedVersions=[{version:3,factory:ji},{version:4,factory:Hi},{version:5,factory:qi}],Ka.extensionType=xe.OneTxPayment;var jn=class{constructor(e,t){typeof t=="string"?this.tokenClient=En.connect(t,e.config.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 Js=class extends jn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=Ln.connect(a,t.config.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 $s=class extends jn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=Mn.connect(a,t.config.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 L6=async(n,e)=>{let t=await Rp(e,n.config.signerOrProvider);switch(t.tokenClientType){case Un.Colony:return new Js(n,t);case Un.Erc20:return new jn(n,t);case Un.Erc2612:return new $s(n,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"}],Gi=class{static createInterface(){return new te.Interface(qp)}static connect(e,t){return new oe(e,qp,t)}};Gi.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"}],zi=class{static createInterface(){return new te.Interface(Gp)}static connect(e,t){return new oe(e,Gp,t)}};zi.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"}],Wi=class{static createInterface(){return new te.Interface(zp)}static connect(e,t){return new oe(e,zp,t)}};Wi.abi=zp;var{AddressZero:Wp}=gt;var Yu=F.from(10).pow(18),Hn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(qa(Hn.extensionType),e.address);if(t===Wp)throw new Error(`${Hn.extensionType} extension is not installed for this Colony`);let a=await Or(t,e.config.signerOrProvider);if(!ua(Hn.extensionType,a,e.version))throw new Error(`Version ${a} of the ${Hn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Hn.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${Hn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new Hn(e,r,a)}static getLatestSupportedVersion(){return Hn.supportedVersions[Hn.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 Fs(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),this.colony.reputation,this.votingReputationContract,e,Wp,Wl);return[e,t,Wp,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.config.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.config.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 I=await this.getMinStake(o,t);if(F.from(a).lt(I))throw new Error(`The staked amount is too small. Please stake at least ${Nr(I)}`);let{domainId:_,rootHash:v}=await this.getMotion(e),[S,L]=await sa(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.config.getSigner().getAddress(),{key:p,value:f,branchMask:x,siblings:I}=await this.colony.reputation.getReputationWithProofs(o,l,s),_=await this.createMotionSalt(e),v=te.solidityKeccak256(["bytes","uint256"],[_,t]);return[e,v,p,f,x,I]};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.config.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:I,value:_,branchMask:v,siblings:S}=p;return[e,f,F.from(x),I,_,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.config.getSigner().getAddress(),p=await Ci(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),t,r),{key:f,value:x,branchMask:I,siblings:_}=await this.colony.reputation.getReputationWithProofs(o,l,s);return[e,t,p,f,x,I,_]};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(xe.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}}},Ja=Hn;Ja.supportedVersions=[{version:7,factory:Gi},{version:8,factory:zi},{version:9,factory:Wi}],Ja.extensionType=xe.VotingReputation;var Q1={["motion"]:Ja,["oneTx"]:Ka},qr=class{static async connect(e,t){let a=await Or(t,e.config.signerOrProvider),i=qr.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.config.signerOrProvider),s=await r.getToken(),o=await L6(e,s),l=new qr(e,r,o,a);return await l.updateExtensions(),l}static getLatestSupportedVersion(){return qr.supportedVersions[qr.supportedVersions.length-1].version}constructor(e,t,a,i){this.colony=t,this.colonyNetwork=e,this.config=e.config,this.address=t.address,this.ext={},this.reputation=new oa(e.getInternalNetworkContract(),t,{customEndpointUrl:e.config.reputationOracleEndpoint}),this.token=a,this.version=i}createColonyTxCreator(e,t,a,i,r){return new Hr({colony:this,config:this.colonyNetwork.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createPermissionedColonyTxCreator(e,t,a,i,r,s){return new Hr({colony:this,config:this.colonyNetwork.config,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 Ja.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}if(!this.ext.oneTx)try{this.ext.oneTx=await Ka.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 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.config.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.config.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.config.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,f]=await sa(this.colonyNetwork.getInternalNetworkContract(),this.colony,r,Me.Funding),x=this.colonyNetwork.getInternalNetworkContract(),I=await Ci(x,this.colony,r,s),_=await Ci(x,this.colony,r,t),{fundingPotId:v}=await this.colony.getDomain(s),{fundingPotId:S}=await this.colony.getDomain(t);return[p,f,r,I,_,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(address,address,bytes,bool)",a)}))}annotateTransaction(e,t){return this.createColonyTxCreator(this.colony,"annotateTransaction",async()=>{let a;return typeof t=="string"?a=t:a=await this.config.ipfs.uploadMetadata(Ne.Annotation,t),[e,a]},async a=>({...ne("Annotation",a)}),{metadataType:Ne.Annotation})}installExtension(e){let t=Q1[e],a=t.getLatestSupportedVersion(),{extensionType:i}=t;if(!ua(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=qr;Gr.supportedVersions=[{version:11,factory:Li},{version:12,factory:Ui},{version:13,factory:Vi}];var{splitSignature:Y1}=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.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let i=this.contract.signer,{provider:r}=i;if(!r)throw new Error("No provider found");let s;this.config.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(),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:a,nonce:l.toString(),deadline:f}),{r:I,s:_,v}=Y1(x),S={target:e,owner:o,spender:t,value:a.toString(),deadline:f,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 Qs=class{constructor(e,t){this.address=t,this.colonyNetwork=e,this.tokenLockingContract=Pp(this.address,e.config.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 Ys=class{constructor(e,t){let a=t?.network||Fn.ArbitrumOne;this.metaTxBroadcasterEndpoint=t?.metaTxBroadcasterEndpoint||cu[a],this.ipfs=new jr(t?.ipfsAdapter),this.network=a,this.reputationOracleEndpoint=t?.reputationOracleEndpoint||Pr[a],this.signerOrProvider=e}getSigner(){if(!(this.signerOrProvider instanceof Nt))throw new Error("Need a signer to create a transaction");return this.signerOrProvider}};var{namehash:U6}=te,{AddressZero:Kp}=gt,Xs=class{constructor(e,t){this.config=new Ys(e,t),this.contract=Fi.connect(t?.customNetworkAddress||fu[this.config.network],e)}async getTokenLocking(){if(!this.locking){let e=await this.contract.getTokenLocking();this.locking=new Qs(this,e)}return this.locking}getInternalNetworkContract(){return this.contract}createTxCreator(e,t,a,i,r){return new Ma({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createMetaTxCreator(e,t,a,i,r){return new Wa({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createEip2612TxCreator(e,t,a,i,r){return new Xu({config:this.config,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[Kp,e.name,e.symbol,e.decimals||18,0,t,""]}return[e,"","",0,0,t,""]};return a?this.createMetaTxCreator(this.contract,"createColonyForFrontend",async()=>{let r=await i();return typeof a=="string"?r[6]=a:r[6]=await this.config.ipfs.uploadMetadata(Ne.Colony,a),r},async r=>({...ne("TokenDeployed",r),...ne("ColonyAdded",r),...ne("TokenAuthorityDeployed",r)}),{metadataType:Ne.Colony}):this.createMetaTxCreator(this.contract,"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.contract.getMetaColony();return this.getColony(e)}async getColonyLabel(e){let t=await this.contract.lookupRegisteredENSDomain(e);return t?t.replace(Os[this.config.network],""):null}async getColonyAddress(e){let t=U6(`${e}${Os[this.config.network]}`),a=await this.contract.addr(t);return a!==Kp?a:null}async getUsername(e){let t=await this.contract.lookupRegisteredENSDomain(e);return t?t.replace(Bs[this.config.network],""):null}async getUserAddress(e){let t=U6(`${e}${Bs[this.config.network]}`),a=await this.contract.addr(t);return a!==Kp?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.contract,"registerUserLabel",t,async a=>({...ne("UserLabelRegistered",a)}))}deployToken(e,t,a=18){return this.createMetaTxCreator(this.contract,"deployTokenViaNetwork",[e,t,a],async i=>({...ne("TokenDeployed",i)}))}};var V6=async n=>{if(!n.ext.oneTx){if(!ua(xe.OneTxPayment,Br[xe.OneTxPayment],n.version))throw new Error(`OneTxPayment extension of version ${Br[xe.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()}},j6=async n=>{if(!n.ext.motions){if(!ua(xe.VotingReputation,Br[xe.VotingReputation],n.version))throw new Error(`VotingReputation extension of version ${Br[xe.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:eg}=te,Jp=new ra.JsonRpcProvider("http://127.0.0.1:8545"),ed,Oe,yn,tg=()=>new ln("0x0355596cdb5e5242ad082c4fe3f8bbe48c9dba843fe1f99dd8272f487e70efae",Jp),ng=async n=>{let e=tg();ed=new Xs(e,{customNetworkAddress:n,reputationOracleEndpoint:"http://localhost:3000"}),Oe=await ed.getMetaColony()},ag=async()=>{if(await V6(Oe),await j6(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()},ig=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",Dr(n)).motion().mined();if(!e)throw new Error("Could not get motionId from tx");return e},rg=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}},sg=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()},og=async n=>{await Oe.ext.motions?.stakeMotion(yn,1,n).tx().mined()},ug=async n=>{await Oe.ext.motions?.stakeMotion(yn,0,n).tx().mined()},dg=async()=>{await Oe.ext.motions?.submitVote(yn,1).tx().mined()},lg=async()=>{await Oe.ext.motions?.submitVote(yn,0).tx().mined()},pg=async()=>{await Qp(7*60),await Oe.ext.motions?.revealVote(yn).tx().mined()},yg=async()=>{await Qp(7*60),await Oe.ext.motions?.finalizeMotion(yn).tx().mined()},Qp=async n=>{await Jp.send("evm_increaseTime",[n]),await Jp.send("evm_mine",[])},Zu=document.querySelector("#address"),$p=document.querySelector("#payment_amount"),Yp=document.querySelector("#stake_amount"),H6=document.querySelector("#button_create_motion"),q6=document.querySelector("#motion_id"),G6=document.querySelector("#button_connect"),z6=document.querySelector("#button_bootstrap"),W6=document.querySelector("#button_stake_clny"),K6=document.querySelector("#button_get_motion"),J6=document.querySelector("#button_jump"),$6=document.querySelector("#button_stake_yay"),Q6=document.querySelector("#button_stake_nay"),Y6=document.querySelector("#button_vote_yay"),X6=document.querySelector("#button_vote_nay"),Z6=document.querySelector("#button_reveal"),eh=document.querySelector("#button_finalize"),Xp=document.querySelector("#error"),th=document.querySelector("#result");if(!Zu||!$p||!q6||!Yp||!Xp||!th||!G6||!z6||!W6||!H6||!K6||!J6||!$6||!Q6||!Y6||!X6||!Z6||!eh)throw new Error("Could not find all required HTML elements");var Pt=n=>{Xp.innerText=`Found an error: ${n.message}`,console.error(n)},da=()=>{Xp.innerText=""},ke=n=>{th.innerText=n};G6.addEventListener("click",async()=>{da();let n=Zu.value;if(!eg(n))return Pt(new Error("This is not a valid address"));ke("Processing...");try{await ng(Zu.value),ke(` +`)}`,v1=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 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&&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"?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=wp.default.validate.report(s);r(i)===!1&&((p,f,x=!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}))&&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"?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: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}})(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=D6(t.errors);throw new Error(a)};var O6=(n,e)=>{let t=n===Ne.Colony?v1(e):e,a=(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&&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"?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=wp.default.validate.report(s);r(i)===!1&&((p,f,x=!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}))&&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"?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: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}})({name:n,data:t,version:vp});if(!a.success){let i=D6(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,B6.default)(fetch,{headers:{Accept:"application/json"},retryOn:[404,503],retries:3,retryDelay:5e3}),zs={[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]:""},jr=class{adapter;constructor(e){this.adapter=e||new Ap}static eventSupportsMetadata(e){return!!Object.keys(zs).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(zs).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=O6(e,t),i=JSON.stringify(a);return this.adapter.uploadJson(i)}};var GE=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 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)}};be(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"}],Di=class{static createInterface(){return new te.Interface(Ip)}static connect(e,t){return new oe(e,Ip,t)}};be(Di,"abi",Ip);var Qu=[{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:"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:"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:[{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:"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:"returnData",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",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:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],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:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"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:[],name:"unlock",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"}],F6="0x60c060405234801561001057600080fd5b5060405161205738038061205783398101604081905261002f91610307565b60008060018161003d6101ab565b6001600160a01b031681526020810191909152604001600090812091909155556100656101ab565b600480546001600160a01b0319166001600160a01b039290921691909117905561008d6101ab565b6001600160a01b03167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a260066100ce8482610413565b5060056100db8382610413565b5060ff81166080526007805460ff1916600117905560405146907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f90610123906006906104d1565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051601f19818403018152919052805160209091012060a0525061054692505050565b60003633301480156101be575060348110155b1561024757600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e881146102365733935050505090565b5001516001600160a01b0316919050565b3391505090565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261027557600080fd5b81516001600160401b0381111561028e5761028e61024e565b604051601f8201601f19908116603f011681016001600160401b03811182821017156102bc576102bc61024e565b6040528181528382016020018510156102d457600080fd5b60005b828110156102f3576020818601810151838301820152016102d7565b506000918101602001919091529392505050565b60008060006060848603121561031c57600080fd5b83516001600160401b0381111561033257600080fd5b61033e86828701610264565b602086015190945090506001600160401b0381111561035c57600080fd5b61036886828701610264565b925050604084015160ff8116811461037f57600080fd5b809150509250925092565b600181811c9082168061039e57607f821691505b6020821081036103be57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561040e57806000526020600020601f840160051c810160208510156103eb5750805b601f840160051c820191505b8181101561040b57600081556001016103f7565b50505b505050565b81516001600160401b0381111561042c5761042c61024e565b6104408161043a845461038a565b846103c4565b6020601f821160018114610474576000831561045c5750848201515b600019600385901b1c1916600184901b17845561040b565b600084815260208120601f198516915b828110156104a45787850151825560209485019460019092019101610484565b50848210156104c25786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b60008083546104df8161038a565b6001821680156104f6576001811461050b5761053b565b60ff198316865281151582028601935061053b565b86600052602060002060005b8381101561053357815488820152600190910190602001610517565b505081860193505b509195945050505050565b60805160a051611ae5610572600039600081816102e10152610f870152600061029b0152611ae56000f3fe6080604052600436106101815760003560e01c80637a9e5e4b116100d1578063a69df4b51161008a578063bf7e214f11610064578063bf7e214f146104b1578063cf309012146104d1578063d505accf146104eb578063dd62ed3e1461050b57600080fd5b8063a69df4b51461047c578063a9059cbb14610491578063b3eac1d8146103b957600080fd5b80637a9e5e4b146103995780637ecebe00146103b95780638da5cb5b146103ef57806395d89b41146104275780639dc29fac1461043c578063a0712d681461045c57600080fd5b806330adf81f1161013e57806340c10f191161011857806340c10f191461030357806342966c68146103235780636281133d1461034357806370a082311461036357600080fd5b806330adf81f14610255578063313ce567146102895780633644e515146102cf57600080fd5b806306fdde0314610186578063095ea7b3146101b15780630c53c51c146101e157806313af4035146101f457806318160ddd1461021657806323b872dd14610235575b600080fd5b34801561019257600080fd5b5061019b610551565b6040516101a891906115b0565b60405180910390f35b3480156101bd57600080fd5b506101d16101cc3660046115d8565b6105df565b60405190151581526020016101a8565b61019b6101ef3660046116bf565b610672565b34801561020057600080fd5b5061021461020f366004611733565b610859565b005b34801561022257600080fd5b506000545b6040519081526020016101a8565b34801561024157600080fd5b506101d1610250366004611750565b6108dc565b34801561026157600080fd5b506102277f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b34801561029557600080fd5b506102bd7f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101a8565b3480156102db57600080fd5b506102277f000000000000000000000000000000000000000000000000000000000000000081565b34801561030f57600080fd5b5061021461031e3660046115d8565b610950565b34801561032f57600080fd5b5061021461033e366004611791565b610a3f565b34801561034f57600080fd5b506101d161035e3660046117aa565b610a53565b34801561036f57600080fd5b5061022761037e366004611733565b6001600160a01b031660009081526001602052604090205490565b3480156103a557600080fd5b506102146103b4366004611733565b610ba7565b3480156103c557600080fd5b506102276103d4366004611733565b6001600160a01b031660009081526008602052604090205490565b3480156103fb57600080fd5b5060045461040f906001600160a01b031681565b6040516001600160a01b0390911681526020016101a8565b34801561043357600080fd5b5061019b610c18565b34801561044857600080fd5b506102146104573660046115d8565b610c25565b34801561046857600080fd5b50610214610477366004611791565b610e1c565b34801561048857600080fd5b50610214610e54565b34801561049d57600080fd5b506101d16104ac3660046115d8565b610e87565b3480156104bd57600080fd5b5060035461040f906001600160a01b031681565b3480156104dd57600080fd5b506007546101d19060ff1681565b3480156104f757600080fd5b50610214610506366004611831565b610ea2565b34801561051757600080fd5b506102276105263660046118a0565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6006805461055e906118d9565b80601f016020809104026020016040519081016040528092919081815260200182805461058a906118d9565b80156105d75780601f106105ac576101008083540402835291602001916105d7565b820191906000526020600020905b8154815290600101906020018083116105ba57829003601f168201915b505050505081565b600081600260006105ee611191565b6001600160a01b0390811682526020808301939093526040918201600090812091881680825291909352912091909155610626611191565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161066091815260200190565b60405180910390a35060015b92915050565b60606106a186610697886001600160a01b031660009081526008602052604090205490565b4688888888610a53565b6107045760405162461bcd60e51b815260206004820152602960248201527f6d6574617472616e73616374696f6e2d7369676e65722d7369676e617475726560448201526805adad2e6dac2e8c6d60bb1b60648201526084015b60405180910390fd5b61070d86611234565b6000306001600160a01b0316867f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e88960405160200161074e93929190611913565b60408051601f19818403018152908290526107689161194c565b6000604051808303816000865af19150503d80600081146107a5576040519150601f19603f3d011682016040523d82523d6000602084013e6107aa565b606091505b50925090508061080d5760405162461bcd60e51b815260206004820152602860248201527f636f6c6f6e792d6d65746174782d66756e6374696f6e2d63616c6c2d756e737560448201526718d8d95cdcd99d5b60c21b60648201526084016106fb565b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b87610837611191565b8860405161084793929190611968565b60405180910390a15095945050505050565b610876610864611191565b6000356001600160e01b031916611260565b6108925760405162461bcd60e51b81526004016106fb9061199d565b600480546001600160a01b0319166001600160a01b0383169081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60075460009060ff161561093d576108f5610864611191565b61093d5760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b61094884848461133b565b949350505050565b61095b610864611191565b6109775760405162461bcd60e51b81526004016106fb9061199d565b6001600160a01b0382166000908152600160205260408120805483929061099f9084906119e1565b92505081905550806000808282546109b791906119e1565b90915550506040518181526001600160a01b038316907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a26040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b610a50610a4a611191565b82610c25565b50565b600080610ad088308989604051602001610a7094939291906119f4565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b6040805160008082526020820180845284905260ff87169282019290925260608101889052608081018790529192509060019060a0016020604051602081039080840390855afa158015610b28573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610b8b5760405162461bcd60e51b815260206004820152601f60248201527f636f6c6f6e792d6d65746174782d696e76616c69642d7369676e61747572650060448201526064016106fb565b6001600160a01b038a8116911614915050979650505050505050565b610bb2610864611191565b610bce5760405162461bcd60e51b81526004016106fb9061199d565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6005805461055e906118d9565b610c2d611191565b6001600160a01b0316826001600160a01b031614610d2d576001600160a01b03821660009081526002602052604081208291610c67611191565b6001600160a01b03166001600160a01b03168152602001908152602001600020541015610cd65760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03821660009081526002602052604081208291610cf8611191565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610d279190611a3a565b90915550505b6001600160a01b038216600090815260016020526040902054811115610d955760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b03821660009081526001602052604081208054839290610dbd908490611a3a565b9250508190555080600080828254610dd59190611a3a565b90915550506040518181526001600160a01b038316907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59060200160405180910390a25050565b610e27610864611191565b610e435760405162461bcd60e51b81526004016106fb9061199d565b610a50610e4e611191565b82610950565b610e5f610864611191565b610e7b5760405162461bcd60e51b81526004016106fb9061199d565b6007805460ff19169055565b6000610e9b610e94611191565b84846108dc565b9392505050565b60075460ff1615610f0057610eb8610864611191565b610f005760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b42841015610f505760405162461bcd60e51b815260206004820152601d60248201527f636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e6500000060448201526064016106fb565b6040805180820182526002815261190160f01b6020808301919091526001600160a01b038a166000908152600890915291822080547f0000000000000000000000000000000000000000000000000000000000000000917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c9188610fd983611a4d565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161103d93929190611a66565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa1580156110a8573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906110de5750886001600160a01b0316816001600160a01b0316145b61112a5760405162461bcd60e51b815260206004820152601e60248201527f636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e6174757265000060448201526064016106fb565b6001600160a01b038981166000818152600260209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b60003633301480156111a4575060348110155b1561122d57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e8811461121c5733935050505090565b5001516001600160a01b0316919050565b3391505090565b6001600160a01b038116600090815260086020526040812080549161125883611a4d565b919050555050565b6000306001600160a01b0384160361127a5750600161066c565b6004546001600160a01b03908116908416036112985750600161066c565b6003546001600160a01b03166112b05750600061066c565b60035460405163b700961360e01b81526001600160a01b0385811660048301523060248301526001600160e01b0319851660448301529091169063b700961390606401602060405180830381865afa158015611310573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113349190611a8d565b905061066c565b6000611345611191565b6001600160a01b0316846001600160a01b031614611445576001600160a01b0384166000908152600260205260408120839161137f611191565b6001600160a01b03166001600160a01b031681526020019081526020016000205410156113ee5760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03841660009081526002602052604081208391611410611191565b6001600160a01b03166001600160a01b03168152602001908152602001600020600082825461143f9190611a3a565b90915550505b6001600160a01b0384166000908152600160205260409020548211156114ad5760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b038416600090815260016020526040812080548492906114d5908490611a3a565b90915550506001600160a01b038316600090815260016020526040812080548492906115029084906119e1565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161154e91815260200190565b60405180910390a35060019392505050565b60005b8381101561157b578181015183820152602001611563565b50506000910152565b6000815180845261159c816020860160208601611560565b601f01601f19169290920160200192915050565b602081526000610e9b6020830184611584565b6001600160a01b0381168114610a5057600080fd5b600080604083850312156115eb57600080fd5b82356115f6816115c3565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261162b57600080fd5b813567ffffffffffffffff81111561164557611645611604565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561167457611674611604565b60405281815283820160200185101561168c57600080fd5b816020850160208301376000918101602001919091529392505050565b803560ff811681146116ba57600080fd5b919050565b600080600080600060a086880312156116d757600080fd5b85356116e2816115c3565b9450602086013567ffffffffffffffff8111156116fe57600080fd5b61170a8882890161161a565b9450506040860135925060608601359150611727608087016116a9565b90509295509295909350565b60006020828403121561174557600080fd5b8135610e9b816115c3565b60008060006060848603121561176557600080fd5b8335611770816115c3565b92506020840135611780816115c3565b929592945050506040919091013590565b6000602082840312156117a357600080fd5b5035919050565b600080600080600080600060e0888a0312156117c557600080fd5b87356117d0816115c3565b96506020880135955060408801359450606088013567ffffffffffffffff8111156117fa57600080fd5b6118068a828b0161161a565b9450506080880135925060a0880135915061182360c089016116a9565b905092959891949750929550565b600080600080600080600060e0888a03121561184c57600080fd5b8735611857816115c3565b96506020880135611867816115c3565b95506040880135945060608801359350611883608089016116a9565b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156118b357600080fd5b82356118be816115c3565b915060208301356118ce816115c3565b809150509250929050565b600181811c908216806118ed57607f821691505b60208210810361190d57634e487b7160e01b600052602260045260246000fd5b50919050565b60008451611925818460208901611560565b919091019283525060601b6bffffffffffffffffffffffff19166020820152603401919050565b6000825161195e818460208701611560565b9190910192915050565b6001600160a01b0384811682528316602082015260606040820181905260009061199490830184611584565b95945050505050565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561066c5761066c6119cb565b8481526bffffffffffffffffffffffff198460601b16602082015282603482015260008251611a2a816054850160208701611560565b9190910160540195945050505050565b8181038181111561066c5761066c6119cb565b600060018201611a5f57611a5f6119cb565b5060010190565b60008451611a78818460208901611560565b91909101928352506020820152604001919050565b600060208284031215611a9f57600080fd5b81518015158114610e9b57600080fdfea264697066735822122090928a66070125904780390eb49d45fe12c136aec641b1db69316e0ffefc6da764736f6c634300081b0033",A1=n=>n.length>1,Ln=class extends vi{constructor(...e){A1(e)?super(...e):super(Qu,F6,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(Qu)}static connect(e,t){return new oe(e,Qu,t)}};be(Ln,"bytecode",F6),be(Ln,"abi",Qu);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:"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:"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:[{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:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",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:"_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:"_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:"returnData",type:"bytes"}],stateMutability:"payable",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:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"",type:"address"}],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"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",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:"_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:"_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:"_token",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"incrementLockCounterTo",outputs:[],stateMutability:"nonpayable",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:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"pure",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetwork",type:"address"}],name:"setColonyNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",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:"_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:"_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:"_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:"_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"}],Oi=class{static createInterface(){return new te.Interface(Sp)}static connect(e,t){return new oe(e,Sp,t)}};be(Oi,"abi",Sp);var Bi;(function(n){n.TokenClient="TokenClient",n.TokenLockingClient="TokenLockingClient"})(Bi||(Bi={}));var Un;(function(n){n.Colony="Colony",n.ColonyLegacy="ColonyLegacy",n.Erc20="Erc20",n.Erc2612="Erc2612",n.Sai="Sai"})(Un||(Un={}));var{AddressZero:I1}=gt;async function S1(n){try{await n.authority();return}catch{throw new Error("Token can not be assigned a TokenAuthority")}}var R1=async(n,e)=>{let t,a=!0,i=!0;t=Ln.connect(n,e);try{await t.totalSupply()}catch(r){throw new Error(`Token is probably not a valid ERC20 token, got ${r.message}`)}try{await t.locked(),await S1(t)}catch{a=!1}try{await t.nonces(I1)}catch{i=!1}return a?t.tokenClientType=Un.Colony:i?(t=Mn.connect(n,e),t.tokenClientType=Un.Erc2612):(t=En.connect(n,e),t.tokenClientType=Un.Erc20),t.clientType=Bi.TokenClient,t},Rp=R1;var P1=(n,e)=>{let t=Oi.connect(n,e);return t.clientType=Bi.TokenLockingClient,t},Pp=P1;var{AddressZero:Np}=gt,N1=En.connect(Np,new ra.BaseProvider(3656691)).interface,D1=Di.connect(Np,new ra.BaseProvider(3656691)).interface,O1=Mn.connect(Np,new ra.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"},{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:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{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:"returnData",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:"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:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"}],Ws=class{static createInterface(){return new te.Interface(Dp)}static connect(e,t){return new oe(e,Dp,t)}};Ws.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:"returnData",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"}],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:"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:!1,internalType:"address",name:"bridgeAddress",type:"address"}],name:"BridgeSet",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:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateSentToBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateStoredFromBridge",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:"uint256",name:"skillId",type:"uint256"}],name:"SkillAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillCreationStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillStoredFromBridge",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:[{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"address",name:"_resolver",type:"address"}],name:"addColonyVersion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_resolver",type:"address"}],name:"addExtensionToNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"addPendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPendingSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"addReputationUpdateLogFromBridge",outputs:[],stateMutability:"nonpayable",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:"_parentSkillId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"addSkillFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",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:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"chainId",type:"uint256"}],name:"bridgeCurrentRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"bridgePendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"skillId",type:"uint256"}],name:"bridgeSkillIfNotMiningChain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"burnUnneededRewards",outputs:[],stateMutability:"nonpayable",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:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"}],name:"claimMiningReward",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:"address",name:"_tokenAddress",type:"address"}],name:"createMetaColony",outputs:[],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:"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:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateExtension",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:"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:"returnData",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"getBridgedReputationUpdateCount",outputs:[{internalType:"uint256",name:"bridgedReputationCount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"}],name:"getBridgedSkillCounts",outputs:[{internalType:"uint256",name:"skillCount",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:"uint256",name:"_id",type:"uint256"}],name:"getColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyBridgeAddress",outputs:[{internalType:"address",name:"bridge",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCreationSalt",outputs:[{internalType:"bytes32",name:"salt",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"}],name:"getColonyVersionResolver",outputs:[{internalType:"address",name:"_resolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentColonyVersion",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getENSRegistrar",outputs:[{internalType:"address",name:"_address",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:[{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:[],name:"getFeeInverse",outputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMetaColony",outputs:[{internalType:"address payable",name:"_colonyAddress",type:"address"}],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:"getMiningChainId",outputs:[{internalType:"uint256",name:"reputationMiningChainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"}],name:"getMiningDelegator",outputs:[{internalType:"address",name:"_delegator",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiningResolver",outputs:[{internalType:"address",name:"miningResolverAddress",type:"address"}],stateMutability:"view",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:"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:"address",name:"_token",type:"address"}],name:"getPayoutWhitelist",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"getPendingReputationUpdate",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:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.PendingReputationUpdate",name:"update",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"getPendingSkillAddition",outputs:[{internalType:"uint256",name:"parentId",type:"uint256"}],stateMutability:"view",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:"_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:[{internalType:"bool",name:"_active",type:"bool"}],name:"getReputationMiningCycle",outputs:[{internalType:"address",name:"_repMiningCycleAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningCycleReward",outputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningSkillId",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"view",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:"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_deprecated",type:"bool"}],internalType:"struct ColonyNetworkDataTypes.Skill",name:"_skill",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSkillCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTokenLocking",outputs:[{internalType:"address",name:"_lockingAddress",type:"address"}],stateMutability:"view",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:"miningChainId",type:"uint256"},{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"}],name:"initialiseReputationMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[{internalType:"uint256",name:"_rootLocalSkillId",type:"uint256"}],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:"address",name:"_colony",type:"address"}],name:"isColony",outputs:[{internalType:"bool",name:"_addressIsColony",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],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:"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:"_stakers",type:"address[]"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"punishStakers",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:"_username",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerUserLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_bridgeAddress",type:"address"}],name:"setColonyBridgeAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],name:"setFeeInverse",outputs:[],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:"_miningResolverAddress",type:"address"}],name:"setMiningResolver",outputs:[],stateMutability:"nonpayable",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:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",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:"uint256",name:"_amount",type:"uint256"}],name:"setReputationMiningCycleReward",outputs:[],stateMutability:"nonpayable",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:[{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"},{internalType:"uint256",name:"nonce",type:"uint256"}],name:"setReputationRootHashFromBridge",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:"address",name:"_tokenLockingAddress",type:"address"}],name:"setTokenLocking",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:"uint256",name:"_amount",type:"uint256"}],name:"stakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"startNextCycle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"startTokenAuction",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:"bytes32",name:"_extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"unstakeForMining",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:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"}],Fi=class{static createInterface(){return new te.Interface(Bp)}static connect(e,t){return new oe(e,Bp,t)}};Fi.abi=Bp;var Ma=class{constructor({contract:e,config:t,method:a,args:i,eventData:r,txConfig:s}){this.config=t,this.contract=e,this.method=a,this.args=i,this.eventData=r,this.txConfig=s}async getArgs(e){let t=[];return typeof this.args=="function"?t=await this.args():t=this.args,e&&t.push(e),t}async getTx(e){let t=await this.getArgs(e);return await this.contract.functions[this.method].apply(this.contract,t)}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.config.ipfs.getMetadataForEvent.bind(this.config.ipfs,zs[this.txConfig.metadataType],t.metadata);return[t,e,a]}return[t,e]}return[{},e]}async broadcastMetaTx(e){let{provider:t}=this.config.getSigner();if(!t)throw new Error("No provider found");let i=await(await fetch(`${this.config.metaTxBroadcasterEndpoint}/broadcast`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();if(i.status!=="success")throw new Error(`Could not send Metatransaction. Reason given: ${i.data.reason}`);if(!i.data?.txHash)throw new Error("Could not get transaction hash from broadcaster response");return t.getTransaction(i.data.txHash)}async waitForMetaTx(e){let t=await e.wait();return t.parsedLogs=Yl(t.logs,this.contract.interface),t}tx(){return{send:async e=>{let t=await this.getTx(e);return[t,this.getMined.bind(this,t)]},mined:async e=>{let t=await this.getTx(e);return this.getMined(t)},encode:async()=>{let e=await this.getArgs();return this.contract.interface.encodeFunctionData(this.method,e)}}}};var{arrayify:F1,solidityKeccak256:L1,splitSignature:U1}=te,Wa=class extends Ma{async sendMetaTransaction(e,t){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let a=this.config.getSigner(),{provider:i}=a;if(!i)throw new Error("No provider found");let r;this.config.network===Fn.Custom?r=1:r=(await i.getNetwork()).chainId;let s=await a.getAddress(),o=await this.contract.functions.getMetatransactionNonce(s),l=L1(["uint256","address","uint256","bytes"],[o.toString(),t,r,e]),p=F1(l),f=await a.signMessage(p),{r:x,s:I,v:_}=U1(f),v={target:t,payload:e,userAddress:s,r:x,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(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}},Yu=(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 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"}],Li=class{static createInterface(){return new te.Interface(Fp)}static connect(e,t){return new oe(e,Fp,t)}};Li.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"}],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:[],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(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:[{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(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{AddressZero:W1}=gt,Vn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(qa(Vn.extensionType),e.address);if(t===W1)throw new Error(`${Vn.extensionType} extension is not installed for this Colony`);let a=await Or(t,e.config.signerOrProvider);if(!ua(Vn.extensionType,a,e.version))throw new Error(`Version ${a} of the ${Vn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Vn.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${Vn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new Vn(e,r,a)}static getLatestSupportedVersion(){return Vn.supportedVersions[Vn.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 f=p.map(_=>r[_]),x=p.map(_=>l[_]),I=p.map(_=>o[_]);return this.colony.createColonyTxCreator(this.oneTxPaymentContract,"makePaymentFundedFromDomain",async()=>{let[_,v]=await sa(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[Me.Administration,Me.Funding],this.oneTxPaymentContract.address),[S,L]=await sa(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),s,[Me.Administration,Me.Funding]);return[_,v,S,L,f,I,x,s,Ae.SkillIgnore]},async _=>({...ne("OneTxPaymentMade",_)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[qa(xe.OneTxPayment),t],async a=>({...ne("ExtensionUpgraded",a)}))}},Ka=Vn;Ka.supportedVersions=[{version:3,factory:ji},{version:4,factory:Hi},{version:5,factory:qi}],Ka.extensionType=xe.OneTxPayment;var jn=class{constructor(e,t){typeof t=="string"?this.tokenClient=En.connect(t,e.config.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 Js=class extends jn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=Ln.connect(a,t.config.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 $s=class extends jn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=Mn.connect(a,t.config.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 L6=async(n,e)=>{let t=await Rp(e,n.config.signerOrProvider);switch(t.tokenClientType){case Un.Colony:return new Js(n,t);case Un.Erc20:return new jn(n,t);case Un.Erc2612:return new $s(n,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"}],Gi=class{static createInterface(){return new te.Interface(qp)}static connect(e,t){return new oe(e,qp,t)}};Gi.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"}],zi=class{static createInterface(){return new te.Interface(Gp)}static connect(e,t){return new oe(e,Gp,t)}};zi.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"}],Wi=class{static createInterface(){return new te.Interface(zp)}static connect(e,t){return new oe(e,zp,t)}};Wi.abi=zp;var{AddressZero:Wp}=gt;var Xu=F.from(10).pow(18),Hn=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(qa(Hn.extensionType),e.address);if(t===Wp)throw new Error(`${Hn.extensionType} extension is not installed for this Colony`);let a=await Or(t,e.config.signerOrProvider);if(!ua(Hn.extensionType,a,e.version))throw new Error(`Version ${a} of the ${Hn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Hn.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${Hn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new Hn(e,r,a)}static getLatestSupportedVersion(){return Hn.supportedVersions[Hn.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 Fs(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),this.colony.reputation,this.votingReputationContract,e,Wp,Kl);return[e,t,Wp,Kl,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.config.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{...Yu("UserTokenApproved",a,i.getInternalTokenLockingContract().interface)}})}stakeMotion(e,t,a){let i=async()=>{let r=await this.colony.config.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 I=await this.getMinStake(o,t);if(F.from(a).lt(I))throw new Error(`The staked amount is too small. Please stake at least ${Nr(I)}`);let{domainId:_,rootHash:v}=await this.getMotion(e),[S,L]=await sa(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.config.getSigner().getAddress(),{key:p,value:f,branchMask:x,siblings:I}=await this.colony.reputation.getReputationWithProofs(o,l,s),_=await this.createMotionSalt(e),v=te.solidityKeccak256(["bytes","uint256"],[_,t]);return[e,v,p,f,x,I]};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.config.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:I,value:_,branchMask:v,siblings:S}=p;return[e,f,F.from(x),I,_,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.config.getSigner().getAddress(),p=await Ci(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),t,r),{key:f,value:x,branchMask:I,siblings:_}=await this.colony.reputation.getReputationWithProofs(o,l,s);return[e,t,p,f,x,I,_]};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(xe.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}}},Ja=Hn;Ja.supportedVersions=[{version:7,factory:Gi},{version:8,factory:zi},{version:9,factory:Wi}],Ja.extensionType=xe.VotingReputation;var Q1={["motion"]:Ja,["oneTx"]:Ka},qr=class{static async connect(e,t){let a=await Or(t,e.config.signerOrProvider),i=qr.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.config.signerOrProvider),s=await r.getToken(),o=await L6(e,s),l=new qr(e,r,o,a);return await l.updateExtensions(),l}static getLatestSupportedVersion(){return qr.supportedVersions[qr.supportedVersions.length-1].version}constructor(e,t,a,i){this.colony=t,this.colonyNetwork=e,this.config=e.config,this.address=t.address,this.ext={},this.reputation=new oa(e.getInternalNetworkContract(),t,{customEndpointUrl:e.config.reputationOracleEndpoint}),this.token=a,this.version=i}createColonyTxCreator(e,t,a,i,r){return new Hr({colony:this,config:this.colonyNetwork.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createPermissionedColonyTxCreator(e,t,a,i,r,s){return new Hr({colony:this,config:this.colonyNetwork.config,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 Ja.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}if(!this.ext.oneTx)try{this.ext.oneTx=await Ka.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 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.config.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.config.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.config.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,f]=await sa(this.colonyNetwork.getInternalNetworkContract(),this.colony,r,Me.Funding),x=this.colonyNetwork.getInternalNetworkContract(),I=await Ci(x,this.colony,r,s),_=await Ci(x,this.colony,r,t),{fundingPotId:v}=await this.colony.getDomain(s),{fundingPotId:S}=await this.colony.getDomain(t);return[p,f,r,I,_,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(address,address,bytes,bool)",a)}))}annotateTransaction(e,t){return this.createColonyTxCreator(this.colony,"annotateTransaction",async()=>{let a;return typeof t=="string"?a=t:a=await this.config.ipfs.uploadMetadata(Ne.Annotation,t),[e,a]},async a=>({...ne("Annotation",a)}),{metadataType:Ne.Annotation})}installExtension(e){let t=Q1[e],a=t.getLatestSupportedVersion(),{extensionType:i}=t;if(!ua(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=>({...Yu("ExtensionInstalled",s,r.interface)}))}async getRoles(e,t=Ae.RootDomain){let a=await this.colony.getUserRoles(e,t);return hu(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=qr;Gr.supportedVersions=[{version:11,factory:Li},{version:12,factory:Ui},{version:13,factory:Vi}];var{splitSignature:Y1}=te,Zu=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.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let i=this.contract.signer,{provider:r}=i;if(!r)throw new Error("No provider found");let s;this.config.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(),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:a,nonce:l.toString(),deadline:f}),{r:I,s:_,v}=Y1(x),S={target:e,owner:o,spender:t,value:a.toString(),deadline:f,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 Qs=class{constructor(e,t){this.address=t,this.colonyNetwork=e,this.tokenLockingContract=Pp(this.address,e.config.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 Ys=class{constructor(e,t){let a=t?.network||Fn.ArbitrumOne;this.metaTxBroadcasterEndpoint=t?.metaTxBroadcasterEndpoint||cu[a],this.ipfs=new jr(t?.ipfsAdapter),this.network=a,this.reputationOracleEndpoint=t?.reputationOracleEndpoint||Pr[a],this.signerOrProvider=e}getSigner(){if(!(this.signerOrProvider instanceof Nt))throw new Error("Need a signer to create a transaction");return this.signerOrProvider}};var{namehash:U6}=te,{AddressZero:Kp}=gt,Xs=class{constructor(e,t){this.config=new Ys(e,t),this.contract=Fi.connect(t?.customNetworkAddress||fu[this.config.network],e)}async getTokenLocking(){if(!this.locking){let e=await this.contract.getTokenLocking();this.locking=new Qs(this,e)}return this.locking}getInternalNetworkContract(){return this.contract}createTxCreator(e,t,a,i,r){return new Ma({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createMetaTxCreator(e,t,a,i,r){return new Wa({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createEip2612TxCreator(e,t,a,i,r){return new Zu({config:this.config,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[Kp,e.name,e.symbol,e.decimals||18,0,t,""]}return[e,"","",0,0,t,""]};return a?this.createMetaTxCreator(this.contract,"createColonyForFrontend",async()=>{let r=await i();return typeof a=="string"?r[6]=a:r[6]=await this.config.ipfs.uploadMetadata(Ne.Colony,a),r},async r=>({...ne("TokenDeployed",r),...ne("ColonyAdded",r),...ne("TokenAuthorityDeployed",r)}),{metadataType:Ne.Colony}):this.createMetaTxCreator(this.contract,"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.contract.getMetaColony();return this.getColony(e)}async getColonyLabel(e){let t=await this.contract.lookupRegisteredENSDomain(e);return t?t.replace(Os[this.config.network],""):null}async getColonyAddress(e){let t=U6(`${e}${Os[this.config.network]}`),a=await this.contract.addr(t);return a!==Kp?a:null}async getUsername(e){let t=await this.contract.lookupRegisteredENSDomain(e);return t?t.replace(Bs[this.config.network],""):null}async getUserAddress(e){let t=U6(`${e}${Bs[this.config.network]}`),a=await this.contract.addr(t);return a!==Kp?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.contract,"registerUserLabel",t,async a=>({...ne("UserLabelRegistered",a)}))}deployToken(e,t,a=18){return this.createMetaTxCreator(this.contract,"deployTokenViaNetwork",[e,t,a],async i=>({...ne("TokenDeployed",i)}))}};var V6=async n=>{if(!n.ext.oneTx){if(!ua(xe.OneTxPayment,Br[xe.OneTxPayment],n.version))throw new Error(`OneTxPayment extension of version ${Br[xe.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()}},j6=async n=>{if(!n.ext.motions){if(!ua(xe.VotingReputation,Br[xe.VotingReputation],n.version))throw new Error(`VotingReputation extension of version ${Br[xe.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:eg}=te,Jp=new ra.JsonRpcProvider("http://127.0.0.1:8545"),td,Oe,yn,tg=()=>new ln("0x0355596cdb5e5242ad082c4fe3f8bbe48c9dba843fe1f99dd8272f487e70efae",Jp),ng=async n=>{let e=tg();td=new Xs(e,{customNetworkAddress:n,reputationOracleEndpoint:"http://localhost:3000"}),Oe=await td.getMetaColony()},ag=async()=>{if(await V6(Oe),await j6(Oe),Oe=await td.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()},ig=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",Dr(n)).motion().mined();if(!e)throw new Error("Could not get motionId from tx");return e},rg=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}},sg=async()=>{await Oe.token.approve(pn`20`).tx().mined(),await(await td.getTokenLocking()).deposit(Oe.token.address,pn`20`).tx().mined(),await Oe.ext.motions?.approveStake(pn`20`).tx().mined()},og=async n=>{await Oe.ext.motions?.stakeMotion(yn,1,n).tx().mined()},ug=async n=>{await Oe.ext.motions?.stakeMotion(yn,0,n).tx().mined()},dg=async()=>{await Oe.ext.motions?.submitVote(yn,1).tx().mined()},lg=async()=>{await Oe.ext.motions?.submitVote(yn,0).tx().mined()},pg=async()=>{await Qp(7*60),await Oe.ext.motions?.revealVote(yn).tx().mined()},yg=async()=>{await Qp(7*60),await Oe.ext.motions?.finalizeMotion(yn).tx().mined()},Qp=async n=>{await Jp.send("evm_increaseTime",[n]),await Jp.send("evm_mine",[])},ed=document.querySelector("#address"),$p=document.querySelector("#payment_amount"),Yp=document.querySelector("#stake_amount"),H6=document.querySelector("#button_create_motion"),q6=document.querySelector("#motion_id"),G6=document.querySelector("#button_connect"),z6=document.querySelector("#button_bootstrap"),W6=document.querySelector("#button_stake_clny"),K6=document.querySelector("#button_get_motion"),J6=document.querySelector("#button_jump"),$6=document.querySelector("#button_stake_yay"),Q6=document.querySelector("#button_stake_nay"),Y6=document.querySelector("#button_vote_yay"),X6=document.querySelector("#button_vote_nay"),Z6=document.querySelector("#button_reveal"),eh=document.querySelector("#button_finalize"),Xp=document.querySelector("#error"),th=document.querySelector("#result");if(!ed||!$p||!q6||!Yp||!Xp||!th||!G6||!z6||!W6||!H6||!K6||!J6||!$6||!Q6||!Y6||!X6||!Z6||!eh)throw new Error("Could not find all required HTML elements");var Pt=n=>{Xp.innerText=`Found an error: ${n.message}`,console.error(n)},da=()=>{Xp.innerText=""},ke=n=>{th.innerText=n};G6.addEventListener("click",async()=>{da();let n=ed.value;if(!eg(n))return Pt(new Error("This is not a valid address"));ke("Processing...");try{await ng(ed.value),ke(` Connected to Colony with address: ${Oe.address}. Colony version: ${Oe.version}. - `)}catch(e){Pt(e),ke("")}finally{Zu.value=""}return null});z6.addEventListener("click",async()=>{da(),ke("Processing...");try{await ag()}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)")});W6.addEventListener("click",async()=>{da(),ke("Processing...");try{await sg()}catch(n){Pt(n),ke("")}ke("Successfully approved tokens for use in staking")});H6.addEventListener("click",async()=>{da(),ke("Processing...");try{let n=$p.value,e=await ig(n);ke(`Motion created! Motion ID is: ${e}`)}catch(n){Pt(n),ke("")}finally{$p.value=""}return null});K6.addEventListener("click",async()=>{let n=q6.value;ke("Processing...");try{let{domainId:e,altTarget:t,action:a,motionState:i,remainingStakes:r}=await rg(n),s={domainId:e.toString(),altTarget:t,action:a,motionState:i,remainingYayStakes:Nr(r.remainingToFullyYayStaked),remainingNayStakes:Nr(r.remainingToFullyNayStaked)};ke(JSON.stringify(s))}catch(e){Pt(e),ke("")}});J6.addEventListener("click",async()=>{await Qp(3600),ke("Whooo that was a hell of a ride. Welcome to the future")});$6.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=Dr(Yp.value);try{await og(n)}catch(e){Pt(e),ke("");return}ke("Staked! Feel free to refresh the motion to see the new values")});Q6.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=Dr(Yp.value);try{await ug(n)}catch(e){Pt(e),ke("");return}ke("Staked! Feel free to refresh the motion to see the new values")});Y6.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 dg()}catch(n){Pt(n),ke("");return}ke("Voted yay!")});X6.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 lg()}catch(n){Pt(n),ke("");return}ke("Voted nay!")});Z6.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!")});eh.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 yg()}catch(n){Pt(n),ke("");return}ke("Motion was successfully finailzed. The action was executed and rewards are paid out")});})(); + `)}catch(e){Pt(e),ke("")}finally{ed.value=""}return null});z6.addEventListener("click",async()=>{da(),ke("Processing...");try{await ag()}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)")});W6.addEventListener("click",async()=>{da(),ke("Processing...");try{await sg()}catch(n){Pt(n),ke("")}ke("Successfully approved tokens for use in staking")});H6.addEventListener("click",async()=>{da(),ke("Processing...");try{let n=$p.value,e=await ig(n);ke(`Motion created! Motion ID is: ${e}`)}catch(n){Pt(n),ke("")}finally{$p.value=""}return null});K6.addEventListener("click",async()=>{let n=q6.value;ke("Processing...");try{let{domainId:e,altTarget:t,action:a,motionState:i,remainingStakes:r}=await rg(n),s={domainId:e.toString(),altTarget:t,action:a,motionState:i,remainingYayStakes:Nr(r.remainingToFullyYayStaked),remainingNayStakes:Nr(r.remainingToFullyNayStaked)};ke(JSON.stringify(s))}catch(e){Pt(e),ke("")}});J6.addEventListener("click",async()=>{await Qp(3600),ke("Whooo that was a hell of a ride. Welcome to the future")});$6.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=Dr(Yp.value);try{await og(n)}catch(e){Pt(e),ke("");return}ke("Staked! Feel free to refresh the motion to see the new values")});Q6.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=Dr(Yp.value);try{await ug(n)}catch(e){Pt(e),ke("");return}ke("Staked! Feel free to refresh the motion to see the new values")});Y6.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 dg()}catch(n){Pt(n),ke("");return}ke("Voted yay!")});X6.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 lg()}catch(n){Pt(n),ke("");return}ke("Voted nay!")});Z6.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!")});eh.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 yg()}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 611231c08..c2dd81acb 100644 --- a/local-reputation.js +++ b/local-reputation.js @@ -1,12 +1,12 @@ -"use strict";(()=>{var z6=Object.create;var Js=Object.defineProperty;var W6=Object.getOwnPropertyDescriptor;var K6=Object.getOwnPropertyNames;var J6=Object.getPrototypeOf,$6=Object.prototype.hasOwnProperty;var Q6=(n,e,t)=>e in n?Js(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),qi=(n,e)=>{for(var t in e)Js(n,t,{get:e[t],enumerable:!0})},Y6=(n,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of K6(e))!$6.call(n,i)&&i!==t&&Js(n,i,{get:()=>e[i],enumerable:!(a=W6(e,i))||a.enumerable});return n};var _n=(n,e,t)=>(t=n!=null?z6(J6(n)):{},Y6(e||!n||!n.__esModule?Js(t,"default",{value:n,enumerable:!0}):t,n));var xe=(n,e,t)=>(Q6(n,typeof e!="symbol"?e+"":e,t),t);var $p=ae(()=>{});var md=ae((Qp,cd)=>{(function(n,e){"use strict";function t(C,u){if(!C)throw new Error(u||"Assertion failed")}function a(C,u){C.super_=u;var y=function(){};y.prototype=u.prototype,C.prototype=new y,C.prototype.constructor=C}function i(C,u,y){if(i.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=i:e.BN=i,i.BN=i,i.wordSize=26;var r;try{typeof window<"u"&&typeof window.Buffer<"u"?r=window.Buffer:r=$p().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(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 b=s(C,y);return y-1>=u&&(b|=s(C,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(C,u,y,b){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()},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"],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];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=I[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(C){for(var u=new Array(C.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-C.length+1);P<=c;P++){var D=d-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[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,Y=ee&8191,Q=ee>>>13,ft=w[3]|0,Z=ft&8191,le=ft>>>13,Ga=w[4]|0,De=Ga&8191,Oe=Ga>>>13,za=w[5]|0,Be=za&8191,Fe=za>>>13,Wa=w[6]|0,Le=Wa&8191,Ue=Wa>>>13,Ka=w[7]|0,Ve=Ka&8191,je=Ka>>>13,Ja=w[8]|0,He=Ja&8191,qe=Ja>>>13,$a=w[9]|0,Ge=$a&8191,ze=$a>>>13,Qa=A[0]|0,We=Qa&8191,Ke=Qa>>>13,Ya=A[1]|0,Je=Ya&8191,$e=Ya>>>13,Xa=A[2]|0,Qe=Xa&8191,Ye=Xa>>>13,Za=A[3]|0,Xe=Za&8191,Ze=Za>>>13,ei=A[4]|0,et=ei&8191,tt=ei>>>13,ti=A[5]|0,nt=ti&8191,at=ti>>>13,ni=A[6]|0,it=ni&8191,rt=ni>>>13,ai=A[7]|0,st=ai&8191,ot=ai>>>13,ii=A[8]|0,ut=ii&8191,dt=ii>>>13,ri=A[9]|0,lt=ri&8191,pt=ri>>>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(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(c,Qe)|0,d=d+Math.imul(c,Ye)|0,d=d+Math.imul(P,Qe)|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(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(c,Xe)|0,d=d+Math.imul(c,Ze)|0,d=d+Math.imul(P,Xe)|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(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(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,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(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,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(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,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(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,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(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,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(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,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 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,Ye),d=d+Math.imul(ze,Qe)|0,m=Math.imul(ze,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 sd=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(sd>>>26)|0,sd&=67108863,g=Math.imul(Ge,Xe),d=Math.imul(Ge,Ze),d=d+Math.imul(ze,Xe)|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(C,u,y){y.negative=u.negative^C.negative,y.length=C.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(C,u,y){return U(C,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(C,u){this.x=C,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 $(C,u){this.name=C,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(C){if(typeof C=="string"){var u=i._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 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(C){q.call(this,C),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 cd>"u"||cd,Qp)});var vy=ae((Og,eo)=>{(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 eo=="object"&&eo.exports,o=typeof define=="function"&&define.amd,l=!a.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",p="0123456789abcdef".split(""),f=[31,7936,2031616,520093696],x=[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};(a.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(c){return Object.prototype.toString.call(c)==="[object Array]"}),l&&(a.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,Y){return u["cshake"+c].update(V,K,ee,Y)[D]()}},de=function(c,P,D){return function(V,K,ee,Y){return u["kmac"+c].update(V,K,ee,Y)[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(n);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(n)}else throw new Error(n);P=!0}for(var V=this.blocks,K=this.byteCount,ee=c.length,Y=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[Y],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(n);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(n)}else throw new Error(n);P=!0}var V=0,K=c.length;if(P)V=K;else for(var ee=0;ee=57344?V+=3:(Y=65536+((Y&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],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 c=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%c===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(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,Y,Q,ft,Z,le,Ga,De,Oe,za,Be,Fe,Wa,Le,Ue,Ka,Ve,je,Ja,He,qe,$a,Ge,ze,Qa,We,Ke,Ya,Je,$e,Xa,Qe,Ye,Za,Xe,Ze,ei,et,tt,ti,nt,at,ni,it,rt,ai,st,ot,ii,ut,dt,ri,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],Y=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],Ga=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^(Y<<1|Q>>>31),D=Oe^(Q<<1|Y>>>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=Y^(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=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=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],Be=c[1],at=c[11]<<4|c[10]>>>28,ni=c[10]<<4|c[11]>>>28,ze=c[20]<<3|c[21]>>>29,Qa=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,Wa=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,Ye=c[15]<<6|c[14]>>>26,Le=c[25]<<11|c[24]>>>21,Ue=c[24]<<11|c[25]>>>21,ai=c[34]<<15|c[35]>>>17,st=c[35]<<15|c[34]>>>17,Ya=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,ri=c[17]<<23|c[16]>>>9,lt=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,Ve=c[37]<<21|c[36]>>>11,ot=c[47]<<24|c[46]>>>8,ii=c[46]<<24|c[47]>>>8,ti=c[8]<<27|c[9]>>>5,nt=c[9]<<27|c[8]>>>5,$a=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,ei=c[39]<<8|c[38]>>>24,je=c[48]<<14|c[49]>>>18,Ja=c[49]<<14|c[48]>>>18,c[0]=za^~Fe&Le,c[1]=Be^~Wa&Ue,c[10]=He^~$a&ze,c[11]=qe^~Ge&Qa,c[20]=$e^~Qe&Za,c[21]=Xa^~Ye&Xe,c[30]=ti^~at&it,c[31]=nt^~ni&rt,c[40]=ut^~ri&pt,c[41]=dt^~lt&_a,c[2]=Fe^~Le&Ka,c[3]=Wa^~Ue&Ve,c[12]=$a^~ze&We,c[13]=Ge^~Qa&Ke,c[22]=Qe^~Za&Ze,c[23]=Ye^~Xe&ei,c[32]=at^~it&ai,c[33]=ni^~rt&st,c[42]=ri^~pt&ka,c[43]=lt^~_a&Aa,c[4]=Le^~Ka&je,c[5]=Ue^~Ve&Ja,c[14]=ze^~We&Ya,c[15]=Qa^~Ke&Je,c[24]=Za^~Ze&et,c[25]=Xe^~ei&tt,c[34]=it^~ai&ot,c[35]=rt^~st&ii,c[44]=pt^~ka&Ea,c[45]=_a^~Aa&Ma,c[6]=Ka^~je&za,c[7]=Ve^~Ja&Be,c[16]=We^~Ya&He,c[17]=Ke^~Je&qe,c[26]=Ze^~et&$e,c[27]=ei^~tt&Xa,c[36]=ai^~ot&ti,c[37]=st^~ii&nt,c[46]=ka^~Ea&ut,c[47]=Aa^~Ma&dt,c[8]=je^~za&Fe,c[9]=Ja^~Be&Wa,c[18]=Ya^~He&$a,c[19]=Je^~qe&Ge,c[28]=et^~$e&Qe,c[29]=tt^~Xa&Ye,c[38]=ot^~ti&at,c[39]=ii^~nt&ni,c[48]=Ea^~ut&ri,c[49]=Ma^~dt<,c[0]^=S[V],c[1]^=S[V+1]};if(s)eo.exports=u;else{for(b=0;b{h0.exports=m0;function m0(n,e){if(!n)throw new Error(e||"Assertion failed")}m0.equal=function(e,t,a){if(e!=t)throw new Error(a||"Assertion failed: "+e+" != "+t)}});var x0=ae((M3,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 a=function(){};a.prototype=t.prototype,e.prototype=new a,e.prototype.constructor=e}}});var An=ae(Pe=>{"use strict";var n2=ir(),a2=x0();Pe.inherits=a2;function i2(n,e){return(n.charCodeAt(e)&64512)!==55296||e<0||e+1>=n.length?!1:(n.charCodeAt(e+1)&64512)===56320}function r2(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):i2(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}Pe.htonl=b0;function o2(n,e){for(var t="",a=0;a>>0}return r}Pe.join32=u2;function d2(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}Pe.split32=d2;function l2(n,e){return n>>>e|n<<32-e}Pe.rotr32=l2;function p2(n,e){return n<>>32-e}Pe.rotl32=p2;function y2(n,e){return n+e>>>0}Pe.sum32=y2;function f2(n,e,t){return n+e+t>>>0}Pe.sum32_3=f2;function c2(n,e,t,a){return n+e+t+a>>>0}Pe.sum32_4=c2;function m2(n,e,t,a,i){return n+e+t+a+i>>>0}Pe.sum32_5=m2;function h2(n,e,t,a){var i=n[e],r=n[e+1],s=a+r>>>0,o=(s>>0,n[e+1]=s}Pe.sum64=h2;function x2(n,e,t,a){var i=e+a>>>0,r=(i>>0}Pe.sum64_hi=x2;function b2(n,e,t,a){var i=e+a;return i>>>0}Pe.sum64_lo=b2;function g2(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}Pe.sum64_4_hi=g2;function T2(n,e,t,a,i,r,s,o){var l=e+a+r+o;return l>>>0}Pe.sum64_4_lo=T2;function v2(n,e,t,a,i,r,s,o,l,p){var f=0,x=e;x=x+a>>>0,f+=x>>0,f+=x>>0,f+=x>>0,f+=x>>0}Pe.sum64_5_hi=v2;function w2(n,e,t,a,i,r,s,o,l,p){var f=e+a+r+o+p;return f>>>0}Pe.sum64_5_lo=w2;function _2(n,e,t){var a=e<<32-t|n>>>t;return a>>>0}Pe.rotr64_hi=_2;function k2(n,e,t){var a=n<<32-t|e>>>t;return a>>>0}Pe.rotr64_lo=k2;function A2(n,e,t){return n>>>t}Pe.shr64_hi=A2;function E2(n,e,t){var a=n<<32-t|e>>>t;return a>>>0}Pe.shr64_lo=E2});var rr=ae(w0=>{"use strict";var v0=An(),M2=ir();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}w0.BlockHash=wo;wo.prototype.update=function(e,t){if(e=v0.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=v0.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 C2=An(),qn=C2.rotr32;function I2(n,e,t,a){if(n===0)return _0(e,t,a);if(n===1||n===3)return A0(e,t,a);if(n===2)return k0(e,t,a)}la.ft_1=I2;function _0(n,e,t){return n&e^~n&t}la.ch32=_0;function k0(n,e,t){return n&e^n&t^e&t}la.maj32=k0;function A0(n,e,t){return n^e^t}la.p32=A0;function S2(n){return qn(n,2)^qn(n,13)^qn(n,22)}la.s0_256=S2;function R2(n){return qn(n,6)^qn(n,11)^qn(n,25)}la.s1_256=R2;function P2(n){return qn(n,7)^qn(n,18)^n>>>3}la.g0_256=P2;function N2(n){return qn(n,17)^qn(n,19)^n>>>10}la.g1_256=N2});var C0=ae((R3,M0)=>{"use strict";var sr=An(),D2=rr(),O2=qd(),Gd=sr.rotl32,Xr=sr.sum32,B2=sr.sum32_5,F2=O2.ft_1,E0=D2.BlockHash,L2=[1518500249,1859775393,2400959708,3395469782];function Gn(){if(!(this instanceof Gn))return new Gn;E0.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}sr.inherits(Gn,E0);M0.exports=Gn;Gn.blockSize=512;Gn.outSize=160;Gn.hmacStrength=80;Gn.padLength=64;Gn.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 or=An(),U2=rr(),ur=qd(),V2=ir(),En=or.sum32,j2=or.sum32_4,H2=or.sum32_5,q2=ur.ch32,G2=ur.maj32,z2=ur.s0_256,W2=ur.s1_256,K2=ur.g0_256,J2=ur.g1_256,I0=U2.BlockHash,$2=[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=$2,this.W=new Array(64)}or.inherits(zn,I0);S0.exports=zn;zn.blockSize=512;zn.outSize=256;zn.hmacStrength=192;zn.padLength=64;zn.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 Wd=An(),R0=zd();function pa(){if(!(this instanceof pa))return new pa;R0.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}Wd.inherits(pa,R0);P0.exports=pa;pa.blockSize=512;pa.outSize=224;pa.hmacStrength=192;pa.padLength=64;pa.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((D3,F0)=>{"use strict";var Qt=An(),Q2=rr(),Y2=ir(),Wn=Qt.rotr64_hi,Kn=Qt.rotr64_lo,D0=Qt.shr64_hi,O0=Qt.shr64_lo,Pa=Qt.sum64,Kd=Qt.sum64_hi,Jd=Qt.sum64_lo,X2=Qt.sum64_4_hi,Z2=Qt.sum64_4_lo,ex=Qt.sum64_5_hi,tx=Qt.sum64_5_lo,B0=Q2.BlockHash,nx=[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 Mn(){if(!(this instanceof Mn))return new Mn;B0.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=nx,this.W=new Array(160)}Qt.inherits(Mn,B0);F0.exports=Mn;Mn.blockSize=1024;Mn.outSize=512;Mn.hmacStrength=192;Mn.padLength=128;Mn.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 Qd=An(),L0=$d();function ya(){if(!(this instanceof ya))return new ya;L0.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}Qd.inherits(ya,L0);U0.exports=ya;ya.blockSize=1024;ya.outSize=384;ya.hmacStrength=192;ya.padLength=128;ya.prototype._digest=function(e){return e==="hex"?Qd.toHex32(this.h.slice(0,12),"big"):Qd.split32(this.h.slice(0,12),"big")}});var j0=ae(dr=>{"use strict";dr.sha1=C0();dr.sha224=N0();dr.sha256=zd();dr.sha384=V0();dr.sha512=$d()});var K0=ae(W0=>{"use strict";var yi=An(),mx=rr(),_o=yi.rotl32,H0=yi.sum32,Zr=yi.sum32_3,q0=yi.sum32_4,z0=mx.BlockHash;function Jn(){if(!(this instanceof Jn))return new Jn;z0.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}yi.inherits(Jn,z0);W0.ripemd160=Jn;Jn.blockSize=512;Jn.outSize=160;Jn.hmacStrength=192;Jn.padLength=64;Jn.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,f=r,x=s,I=o,_=0;_<80;_++){var v=H0(_o(q0(a,G0(_,i,r,s),e[bx[_]+t],hx(_)),Tx[_]),o);a=o,o=s,s=_o(r,10),r=i,i=v,v=H0(_o(q0(l,G0(79-_,p,f,x),e[gx[_]+t],xx(_)),vx[_]),I),l=I,I=x,x=_o(f,10),f=p,p=v}v=Zr(this.h[1],r,x),this.h[1]=Zr(this.h[2],s,I),this.h[2]=Zr(this.h[3],o,l),this.h[3]=Zr(this.h[4],a,p),this.h[4]=Zr(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 G0(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 hx(n){return n<=15?0:n<=31?1518500249:n<=47?1859775393:n<=63?2400959708:2840853838}function xx(n){return n<=15?1352829926:n<=31?1548603684:n<=47?1836072691:n<=63?2053994217:0}var bx=[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],gx=[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],Tx=[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],vx=[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 $0=ae((L3,J0)=>{"use strict";var wx=An(),_x=ir();function lr(n,e,t){if(!(this instanceof lr))return new lr(n,e,t);this.Hash=n,this.blockSize=n.blockSize/8,this.outSize=n.outSize/8,this.inner=null,this.outer=null,this._init(wx.toArray(e,t))}J0.exports=lr;lr.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),_x(e.length<=this.blockSize);for(var t=e.length;t{var Rt=Q0;Rt.utils=An();Rt.common=rr();Rt.sha=j0();Rt.ripemd=K0();Rt.hmac=$0();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,Af)=>{"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&&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],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],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=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,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,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,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 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=a(_,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=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 I={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"?Mf.exports=I:typeof define=="function"&&define.amd?define(I):n&&(n.scrypt&&(n._scrypt=n.scrypt),n.scrypt=I)})(vl)});var Xf=ae((M4,Yf)=>{"use strict";var Ko="qpzry9x8gf2tvdw0s3jn54khce6mua7l",El={};for(ds=0;ds>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 $f(n){for(var e=1,t=0;t126)return"Invalid prefix ("+n+")";e=gr(e)^a>>5}for(e=gr(e),t=0;tt)throw new TypeError("Exceeds length limit");n=n.toLowerCase();var a=$f(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=gr(a)^s,i+=Ko.charAt(s)}for(r=0;r<6;++r)a=gr(a);for(a^=1,r=0;r<6;++r){var o=a>>(5-r)*5&31;i+=Ko.charAt(o)}return i}function Qf(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=$f(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 o5(){var n=Qf.apply(null,arguments);if(typeof n=="object")return n}function u5(n){var e=Qf.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function Jo(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 ep=="object"&&typeof tp<"u"?tp.exports=e():typeof define=="function"&&define.amd?define(e):(n=typeof globalThis<"u"?globalThis:n||self,n.fetchRetry=e())})(ep,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,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(I,_){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)I(U);else if(typeof x=="function")try{return Promise.resolve(x(L,null,U)).then(function(H){H?S(L,null,U):I(U)}).catch(_)}catch(H){_(H)}else L=0}function t(a){this.name="ArgumentError",this.message=a}return n})});var np=ae(cu=>{"use strict";Object.defineProperty(cu,"__esModule",{value:!0});cu.$dictionary=void 0;cu.$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 Ps=ae((DA,ym)=>{ym.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}});var ip=ae(Ua=>{var Ee=Ps(),ap=()=>[{type:Ee.RANGE,from:48,to:57}],fm=()=>[{type:Ee.CHAR,value:95},{type:Ee.RANGE,from:97,to:122},{type:Ee.RANGE,from:65,to:90}].concat(ap()),cm=()=>[{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}],X5=()=>[{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:fm(),not:!1});Ua.notWords=()=>({type:Ee.SET,set:fm(),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:cm(),not:!1});Ua.notWhitespace=()=>({type:Ee.SET,set:cm(),not:!0});Ua.anyChar=()=>({type:Ee.SET,set:X5(),not:!0})});var hm=ae(Ns=>{var mm=Ps(),Rr=ip(),Z5="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?",eb={0:0,t:9,n:10,v:11,f:12,r:13};Ns.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 f=a?8:r?parseInt(r,16):s?parseInt(s,16):o?parseInt(o,8):l?Z5.indexOf(l):eb[p],x=String.fromCharCode(f);return/[[\]{}^$.|?*+()]/.test(x)&&(x="\\"+x),x}),n};Ns.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(Rr.words());else if(i[2])t.push(Rr.ints());else if(i[3])t.push(Rr.whitespace());else if(i[4])t.push(Rr.notWords());else if(i[5])t.push(Rr.notInts());else if(i[6])t.push(Rr.notWhitespace());else if(i[7])t.push({type:mm.RANGE,from:(i[8]||i[9]).charCodeAt(0),to:i[10].charCodeAt(0)});else if(r=i[12])t.push({type:mm.CHAR,value:r.charCodeAt(0)});else return[t,a.lastIndex];Ns.error(e,"Unterminated character class")};Ns.error=(n,e)=>{throw new SyntaxError("Invalid regular expression: /"+n+"/: "+e)}});var xm=ae(Ds=>{var mu=Ps();Ds.wordBoundary=()=>({type:mu.POSITION,value:"b"});Ds.nonWordBoundary=()=>({type:mu.POSITION,value:"B"});Ds.begin=()=>({type:mu.POSITION,value:"^"});Ds.end=()=>({type:mu.POSITION,value:"$"})});var bm=ae((LA,rp)=>{var Pr=hm(),bn=Ps(),ki=ip(),hu=xm();rp.exports=n=>{var e=0,t,a,i={type:bn.ROOT,stack:[]},r=i,s=i.stack,o=[],l=O=>{Pr.error(n,`Nothing to repeat at column ${O-1}`)},p=Pr.strToChars(n);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 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}))}};gm.exports=Va});var wm=ae((VA,vm)=>{var xu=bm(),Os=Tm(),Ai=xu.types;vm.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=xu(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 a,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),a=e.options?this._randSelect(e.options):e.stack,i="",s=0,o=a.length;s{"use strict";var tb=Ei&&Ei.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ei,"__esModule",{value:!0});Ei.RandomGenerator=void 0;var nb=tb(wm()),ab;(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 nb.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()}})(ab=Ei.RandomGenerator||(Ei.RandomGenerator={}))});var Fs=ae(Nr=>{"use strict";var ib=Nr&&Nr.__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(Nr,"__esModule",{value:!0});Nr.TypeGuardError=void 0;var rb=function(n){ib(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);Nr.TypeGuardError=rb});var km=ae(bu=>{"use strict";Object.defineProperty(bu,"__esModule",{value:!0});bu.$any=void 0;var sb=function(n){return n!==void 0?JSON.parse(JSON.stringify(n)):void 0};bu.$any=sb});var Am=ae(gu=>{"use strict";Object.defineProperty(gu,"__esModule",{value:!0});gu.$every=void 0;var ob=function(n,e){for(var t=null,a=0;a{"use strict";Object.defineProperty(Tu,"__esModule",{value:!0});Tu.$guard=void 0;var ub=Fs(),db=function(n){return function(e,t){if(e===!0)throw new ub.TypeGuardError({method:n,path:t.path,expected:t.expected,value:t.value});return!1}};Tu.$guard=db});var Mm=ae(vu=>{"use strict";Object.defineProperty(vu,"__esModule",{value:!0});vu.$is_between=void 0;var lb=function(n,e,t){return e<=n&&n<=t};vu.$is_between=lb});var Cm=ae(wu=>{"use strict";Object.defineProperty(wu,"__esModule",{value:!0});wu.$is_custom=void 0;var pb=np(),yb=function(n,e,t,a){var i,r=(i=pb.$dictionary.get(n))===null||i===void 0?void 0:i.get(e);return r===void 0?!0:r(t)(a)};wu.$is_custom=yb});var Im=ae(_u=>{"use strict";Object.defineProperty(_u,"__esModule",{value:!0});_u.$is_date=void 0;var fb=function(n){return cb.test(n)};_u.$is_date=fb;var cb=/^(\d{4})-(\d{2})-(\d{2})$/});var Sm=ae(ku=>{"use strict";Object.defineProperty(ku,"__esModule",{value:!0});ku.$is_datetime=void 0;var mb=function(n){return!isNaN(new Date(n).getTime())};ku.$is_datetime=mb});var Rm=ae(Au=>{"use strict";Object.defineProperty(Au,"__esModule",{value:!0});Au.$is_email=void 0;var hb=function(n){return xb.test(n)};Au.$is_email=hb;var xb=/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i});var Pm=ae(Eu=>{"use strict";Object.defineProperty(Eu,"__esModule",{value:!0});Eu.$is_ipv4=void 0;var bb=function(n){return gb.test(n)};Eu.$is_ipv4=bb;var gb=/^(?: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 Nm=ae(Mu=>{"use strict";Object.defineProperty(Mu,"__esModule",{value:!0});Mu.$is_ipv6=void 0;var Tb=function(n){return vb.test(n)};Mu.$is_ipv6=Tb;var vb=/^(([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 Dm=ae(Cu=>{"use strict";Object.defineProperty(Cu,"__esModule",{value:!0});Cu.$is_url=void 0;var wb=function(n){return _b.test(n)};Cu.$is_url=wb;var _b=/^[a-zA-Z0-9]+:\/\/(?:www.)?[-a-zA-Z0-9@:%._+~#=]{1,256}.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/});var Om=ae(Iu=>{"use strict";Object.defineProperty(Iu,"__esModule",{value:!0});Iu.$is_uuid=void 0;var kb=function(n){return Ab.test(n)};Iu.$is_uuid=kb;var Ab=/^(?:[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 Bm=ae(Su=>{"use strict";Object.defineProperty(Su,"__esModule",{value:!0});Su.$join=void 0;var Eb=function(n){return Mb(n)?".".concat(n):"[".concat(JSON.stringify(n),"]")};Su.$join=Eb;var Mb=function(n){return Cb(n)===!1&&/^[a-zA-Z_$][a-zA-Z_$0-9]*$/g.test(n)},Cb=function(n){return Ib.has(n)},Ib=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 Fm=ae(Ru=>{"use strict";Object.defineProperty(Ru,"__esModule",{value:!0});Ru.$number=void 0;var Sb=Fs(),Rb=function(n){if(isFinite(n)===!1)throw new Sb.TypeGuardError({method:"typia.stringify",expected:"number",value:n,message:"Error on typia.stringify(): infinite or not a number."});return n};Ru.$number=Rb});var Lm=ae(Pu=>{"use strict";Object.defineProperty(Pu,"__esModule",{value:!0});Pu.$report=void 0;var Pb=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}};Pu.$report=Pb});var Um=ae(Nu=>{"use strict";Object.defineProperty(Nu,"__esModule",{value:!0});Nu.$rest=void 0;var Nb=function(n){return n.length===2?"":","+n.substring(1,n.length-1)};Nu.$rest=Nb});var Vm=ae(Du=>{"use strict";Object.defineProperty(Du,"__esModule",{value:!0});Du.$string=void 0;var Db=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,'"')};Du.$string=Db});var jm=ae(Ou=>{"use strict";Object.defineProperty(Ou,"__esModule",{value:!0});Ou.$tail=void 0;var Ob=function(n){return n[n.length-1]===","?n.substring(0,n.length-1):n};Ou.$tail=Ob});var zm=ae(Mi=>{"use strict";var Vt=Mi&&Mi.__assign||function(){return Vt=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 Vt(Vt({},n.is()),{number:Jb.$number,string:Yb.$string,tail:Xb.$tail,rest:Qb.$rest,throws:e(t)})},n.clone=function(t){return Vt(Vt({},n.is()),{throws:e(t),any:Bb.$any})},n.prune=function(t){return Vt(Vt({},n.is()),{throws:e(t)})},n.random=function(){return{generator:Hm.RandomGenerator,pick:Hm.RandomGenerator.pick}};var e=function(t){return function(a){throw new qm.TypeGuardError(Vt(Vt({},a),{method:"typia.".concat(t)}))}}})(Zb=Mi.Namespace||(Mi.Namespace={}))});var Wm=ae(Ls=>{"use strict";Object.defineProperty(Ls,"__esModule",{value:!0});Ls.MapUtil=void 0;var e1;(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}}})(e1=Ls.MapUtil||(Ls.MapUtil={}))});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 Xm=ae(Ym=>{"use strict";Object.defineProperty(Ym,"__esModule",{value:!0})});var e6=ae(Zm=>{"use strict";Object.defineProperty(Zm,"__esModule",{value:!0})});var n6=ae(t6=>{"use strict";Object.defineProperty(t6,"__esModule",{value:!0})});var i6=ae(a6=>{"use strict";Object.defineProperty(a6,"__esModule",{value:!0})});var bp=ae(z=>{"use strict";var t1=z&&z.__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]}),Ci=z&&z.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&t1(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 Dr=np(),Me=zm(),n1=Wm();Ci(Jm(),z);Ci(Qm(),z);Ci(Xm(),z);Ci(e6(),z);Ci(n6(),z);Ci(i6(),z);Ci(Fs(),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(n){var e,t;return n?(t=(e=Dr.$dictionary.get(n))===null||e===void 0?void 0:e.size)!==null&&t!==void 0?t:0:Dr.$dictionary.size},has:function(n){return function(e){var t,a;return(a=(t=Dr.$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=Dr.$dictionary.get(n))===null||t===void 0?void 0:t.get(e)}},insert:function(n){return function(e){return function(t){var a=n1.MapUtil.take(Dr.$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=Dr.$dictionary.get(n))===null||t===void 0?void 0:t.delete(e))!==null&&a!==void 0?a:!1}}};function a1(){re("application")}z.application=a1;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 i1(){re("metadata")}z.metadata=i1;function mp(){re("random")}z.random=mp;Object.assign(mp,Me.Namespace.random());function r1(){re("literals")}z.literals=r1;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 r6(){re("createAssert")}z.createAssert=r6;Object.assign(r6,sp);function s6(){re("createAssertType")}z.createAssertType=s6;Object.assign(s6,op);function o6(){re("createIs")}z.createIs=o6;Object.assign(o6,Bu);function u6(){re("createValidate")}z.createValidate=u6;Object.assign(u6,Fu);function d6(){re("createAssertEquals")}z.createAssertEquals=d6;Object.assign(d6,up);function l6(){re("createEquals")}z.createEquals=l6;Object.assign(l6,dp);function p6(){re("createValidateEquals")}z.createValidateEquals=p6;Object.assign(p6,lp);function y6(){re("createIsParse")}z.createIsParse=y6;Object.assign(y6,yp);function f6(){re("createAssertParse")}z.createAssertParse=f6;Object.assign(f6,pp);function c6(){re("createValidateParse")}z.createValidateParse=c6;Object.assign(c6,fp);function m6(){re("createStringify")}z.createStringify=m6;Object.assign(m6,cp);function h6(){re("createAssertStringify")}z.createAssertStringify=h6;Object.assign(h6,Lu);function x6(){re("createIsStringify")}z.createIsStringify=x6;Object.assign(x6,Uu);function b6(){re("createValidateStringify")}z.createValidateStringify=b6;Object.assign(b6,Vu);function g6(){re("createRandom")}z.createRandom=g6;Object.assign(g6,mp);function T6(){re("createClone")}z.createClone=T6;Object.assign(T6,hp);function v6(){re("createAssertClone")}z.createAssertClone=v6;Object.assign(v6,ju);function w6(){re("createIsClone")}z.createIsClone=w6;Object.assign(w6,Hu);function _6(){re("createValidateClone")}z.createValidateClone=_6;Object.assign(_6,qu);function k6(){re("createPrune")}z.createPrune=k6;Object.assign(k6,xp);function A6(){re("createAssertPrune")}z.createAssertPrune=A6;Object.assign(A6,Gu);function E6(){re("createIsPrune")}z.createIsPrune=E6;Object.assign(E6,zu);function M6(){re("createValidatePrune")}z.createValidatePrune=M6;Object.assign(M6,Wu);function re(n){throw new Error("Error on typia.".concat(n,'(): no transform has been configured. Run "npx typia setup" command.'))}});var I6=ae(Tn=>{"use strict";var C6=Tn&&Tn.__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]}),s1=Tn&&Tn.__setModuleDefault||(Object.create?function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}:function(n,e){n.default=e}),o1=Tn&&Tn.__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)&&C6(e,n,t);return s1(e,n),e},u1=Tn&&Tn.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&C6(e,n,t)};Object.defineProperty(Tn,"__esModule",{value:!0});var d1=o1(bp());Tn.default=d1;u1(bp(),Tn)});var jl={};qi(jl,{BaseContract:()=>yr,BigNumber:()=>F,Contract:()=>oe,ContractFactory:()=>hi,FixedNumber:()=>ct,Signer:()=>St,VoidSigner:()=>da,Wallet:()=>on,Wordlist:()=>xn,constants:()=>xt,errors:()=>Wt,getDefaultProvider:()=>ru,logger:()=>Nc,providers:()=>ta,utils:()=>te,version:()=>ou,wordlists:()=>bi});var uy=_n(md());var Yp="logger/5.7.0";var Xp=!1,Zp=!1,$s={debug:1,default:2,info:2,warning:3,error:4,off:5},ey=$s.default,hd=null;function X6(){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 ty=X6(),xd;(function(n){n.DEBUG="DEBUG",n.INFO="INFO",n.WARNING="WARNING",n.ERROR="ERROR",n.OFF="OFF"})(xd||(xd={}));var Wt;(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"})(Wt||(Wt={}));var ny="0123456789abcdef",E=class{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){let a=e.toLowerCase();$s[a]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(ey>$s[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(Zp)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 f="";for(let x=0;x>4],f+=ny[p[x]&15];i.push(l+"=Uint8Array(0x"+f+")")}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 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(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"),ty&&this.throwError("platform missing String.prototype.normalize",E.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:ty})}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 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"}),Xp){if(!e)return;this.globalLogger().throwError("error censorship permanent",E.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}Zp=!!e,Xp=!!t}static setLogLevel(e){let t=$s[e.toLowerCase()];if(t==null){E.globalLogger().warn("invalid log level - "+e);return}ey=t}static from(e){return new E(e)}};E.errors=Wt;E.levels=xd;var ay="bytes/5.7.0";var wt=new E(ay);function ry(n){return!!n.toHexString}function Gi(n){return n.slice||(n.slice=function(){let e=Array.prototype.slice.call(arguments);return Gi(new Uint8Array(Array.prototype.slice.apply(n,e)))}),n}function ia(n){return ie(n)&&!(n.length%2)||un(n)}function iy(n){return typeof n=="number"&&n==n&&n%1===0}function un(n){if(n==null)return!1;if(n.constructor===Uint8Array)return!0;if(typeof n=="string"||!iy(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"){wt.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),Gi(new Uint8Array(t))}if(e.allowMissingPrefix&&typeof n=="string"&&n.substring(0,2)!=="0x"&&(n="0x"+n),ry(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":wt.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),Gi(a)}function Zt(n){let e=j(n);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(n,e-n.length),Gi(t)}function ie(n,e){return!(typeof n!="string"||!n.match(/^0x[0-9A-Fa-f]*$/)||e&&n.length!==2+2*e)}var bd="0123456789abcdef";function W(n,e){if(e||(e={}),typeof n=="number"){wt.checkSafeUint53(n,"invalid hexlify value");let t="";for(;n;)t=bd[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),ry(n))return n.toHexString();if(ie(n))return n.length%2&&(e.hexPad==="left"?n="0x0"+n.substring(2):e.hexPad==="right"?n+="0":wt.throwArgumentError("hex data is odd-length","value",n)),n.toLowerCase();if(un(n)){let t="0x";for(let a=0;a>4]+bd[i&15]}return t}return wt.throwArgumentError("invalid hexlify value","value",n)}function Nt(n){if(typeof n!="string")n=W(n);else if(!ie(n)||n.length%2)return null;return(n.length-2)/2}function Ce(n,e,t){return typeof n!="string"?n=W(n):(!ie(n)||n.length%2)&&wt.throwArgumentError("invalid hexData","value",n),e=2+2*e,t!=null?"0x"+n.substring(e,2+2*t):"0x"+n.substring(e)}function _t(n){let e="0x";return n.forEach(t=>{e+=W(t).substring(2)}),e}function Un(n){let e=gd(W(n,{hexPad:"left"}));return e==="0x"?"0x0":e}function gd(n){typeof n!="string"&&(n=W(n)),ie(n)||wt.throwArgumentError("invalid hex string","value",n),n=n.substring(2);let e=0;for(;e2*e+2&&wt.throwArgumentError("value out of range","value",arguments[1]);n.length<2*e+2;)n="0x0"+n.substring(2);return n}function Vn(n){let e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(ia(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]):wt.throwArgumentError("invalid signature string","signature",n),e.v<27&&(e.v===0||e.v===1?e.v+=27:wt.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=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",n),i[0]&=127;let s=W(i);e.s==null?e.s=s:e.s!==s&&wt.throwArgumentError("signature v mismatch _vs","signature",n)}if(e.recoveryParam==null)e.v==null?wt.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&&wt.throwArgumentError("signature recoveryParam mismatch v","signature",n)}e.r==null||!ie(e.r)?wt.throwArgumentError("signature missing or invalid r","signature",n):e.r=me(e.r,32),e.s==null||!ie(e.s)?wt.throwArgumentError("signature missing or invalid s","signature",n):e.s=me(e.s,32);let t=j(e.s);t[0]>=128&&wt.throwArgumentError("signature s out of range","signature",n),e.recoveryParam&&(t[0]|=128);let a=W(t);e._vs&&(ie(e._vs)||wt.throwArgumentError("signature invalid _vs","signature",n),e._vs=me(e._vs,32)),e._vs==null?e._vs=a:e._vs!==a&&wt.throwArgumentError("signature _vs mismatch v and s","signature",n)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function Ur(n){return n=Vn(n),W(ye([n.r,n.s,n.recoveryParam?"0x1c":"0x1b"]))}var Qs="bignumber/5.7.0";var Vr=uy.default.BN,ra=new E(Qs),Td={},sy=9007199254740991;function dy(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"||un(n))}var oy=!1,F=class{constructor(e,t){e!==Td&&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()&&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 ra.throwError("this platform does not support BigInt",E.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?oy||(oy=!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(Td,jr(e)):e.match(/^-?[0-9]+$/)?new F(Td,jr(new Vr(e))):ra.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&dn("underflow","BigNumber.from",e),(e>=sy||e<=-sy)&&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 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 ra.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]==="-"&&ra.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 Kt(n){return F.from(jr(n))}function be(n){let e=F.from(n).toHexString();return e[0]==="-"?new Vr("-"+e.substring(3),16):new Vr(e.substring(2),16)}function dn(n,e,t){let a={fault:n,operation:e};return t!=null&&(a.value=t),ra.throwError(n,E.errors.NUMERIC_FAULT,a)}function vd(n){return new Vr(n,36).toString(16)}function wd(n){return new Vr(n,16).toString(36)}var jt=new E(Qs),Hr={},py=F.from(0),yy=F.from(-1);function fy(n,e,t,a){let i={fault:e,operation:t};return a!==void 0&&(i.value=a),jt.throwError(n,E.errors.NUMERIC_FAULT,i)}var qr="0";for(;qr.length<256;)qr+=qr;function _d(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):jt.throwArgumentError("invalid decimal size","decimals",n)}function zi(n,e){e==null&&(e=0);let t=_d(e);n=F.from(n);let a=n.lt(py);a&&(n=n.mul(yy));let i=n.mod(t).toString();for(;i.length2&&jt.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&&fy("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),a=r("width","number",a),i=r("decimals","number",i)}return a%8&&jt.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",a),i>80&&jt.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new sa(Hr,t,a,i)}},ct=class{constructor(e,t,a,i){e!==Hr&&jt.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&&jt.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);let t=ln(this._value,this.format.decimals),a=ln(e._value,e.format.decimals);return ct.fromValue(t.add(a),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);let t=ln(this._value,this.format.decimals),a=ln(e._value,e.format.decimals);return ct.fromValue(t.sub(a),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);let t=ln(this._value,this.format.decimals),a=ln(e._value,e.format.decimals);return ct.fromValue(t.mul(a).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);let t=ln(this._value,this.format.decimals),a=ln(e._value,e.format.decimals);return ct.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=ct.from(e[0],this.format),a=!e[1].match(/^(0*)$/);return this.isNegative()&&a&&(t=t.subUnsafe(ly.toFormat(t.format))),t}ceiling(){let e=this.toString().split(".");e.length===1&&e.push("0");let t=ct.from(e[0],this.format),a=!e[1].match(/^(0*)$/);return!this.isNegative()&&a&&(t=t.addUnsafe(ly.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 a=ct.from("1"+qr.substring(0,e),this.format),i=Z6.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&&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,a){return a==null&&t!=null&&!dy(t)&&(a=t,t=null),t==null&&(t=0),a==null&&(a="fixed"),ct.fromString(zi(e,t),sa.from(a))}static fromString(e,t){t==null&&(t="fixed");let a=sa.from(t),i=ln(e,a.decimals);!a.signed&&i.lt(py)&&fy("unsigned value cannot be negative","overflow","value",e);let r=null;a.signed?r=i.toTwos(a.width).toHexString():(r=i.toHexString(),r=me(r,a.width/8));let s=zi(i,a.decimals);return new ct(Hr,r,s,a)}static fromBytes(e,t){t==null&&(t="fixed");let a=sa.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=zi(i,a.decimals);return new ct(Hr,r,s,a)}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(a){if(a.code!==E.errors.INVALID_ARGUMENT)throw a}return jt.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}},ly=ct.from(1),Z6=ct.from("0.5");var cy="properties/5.7.0";var eh=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Ys=new E(cy);function B(n,e,t){Object.defineProperty(n,e,{enumerable:!0,value:t,writable:!1})}function ht(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 Ie(n){return eh(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 Wi(n,e){(!n||typeof n!="object")&&Ys.throwArgumentError("invalid object","object",n),Object.keys(n).forEach(t=>{e[t]||Ys.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 th={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function my(n){if(n==null||th[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;tmt(e)));if(typeof n=="object"){let e={};for(let t in n){let a=n[t];a!==void 0&&B(e,t,mt(a))}return e}return Ys.throwArgumentError(`Cannot deepCopy ${typeof n}`,"object",n)}function mt(n){return nh(n)}var en=class{constructor(e){for(let t in e)this[t]=mt(e[t])}};var jn="abi/5.7.0";var Te=new E(jn),oi={},hy={calldata:!0,memory:!0,storage:!0},ah={calldata:!0,memory:!0};function Xs(n,e){if(n==="bytes"||n==="string"){if(hy[e])return!0}else if(n==="address"){if(e==="payable")return!0}else if((n.indexOf("[")>=0||n==="tuple")&&ah[e])return!0;return(hy[e]||e==="payable")&&Te.throwArgumentError("invalid modifier","name",e),!1}function ih(n,e){let t=n;function a(o){Te.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!==ge.sighash&&(t+=this.type),t+="("+this.components.map(a=>a.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(oi,{name:e.name||null,type:Ki(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(yt.fromObject):null})}static fromString(e,t){function a(i){return yt.fromObject({name:i.name,type:i.type,indexed:i.indexed,components:i.components})}return a(ih(e,!!t))}static isParamType(e){return!!(e!=null&&e._isParamType)}};function Gr(n,e){return oh(n).map(t=>yt.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()"}),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 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(a=>JSON.parse(a.format(e)))});let t="";return e!==ge.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map(a=>a.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:zr(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(yt.fromObject):[],type:"event"};return new Ht(oi,t)}static fromString(e){let t=e.match(Wr);t||Te.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:Te.warn("unknown modifier: "+i)}}),Ht.fromObject({name:t[1].trim(),anonymous:a,inputs:Gr(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}};function by(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 gy(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 Ty(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 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(a=>JSON.parse(a.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(a=>a.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=Ty(e);t.constant&&Te.throwArgumentError("constructor cannot be constant","value",e);let a={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(oi,a)}static fromString(e){let t={type:"constructor"};e=by(e,t);let a=e.match(Wr);return(!a||a[1].trim()!=="constructor")&&Te.throwArgumentError("invalid constructor string","value",e),t.inputs=Gr(a[2].trim(),!1),gy(a[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(a=>JSON.parse(a.format(e))),outputs:this.outputs.map(a=>JSON.parse(a.format(e)))});let t="";return e!==ge.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map(a=>a.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(a=>a.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=Ty(e),a={type:e.type,name:zr(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(oi,a)}static fromString(e){let t={type:"function"};e=by(e,t);let a=e.split(" returns ");a.length>2&&Te.throwArgumentError("invalid function string","value",e);let i=a[0].match(Wr);if(i||Te.throwArgumentError("invalid function signature","value",e),t.name=i[1].trim(),t.name&&zr(t.name),t.inputs=Gr(i[2],!1),gy(i[3].trim(),t),a.length>1){let r=a[1].match(Wr);(r[1].trim()!=""||r[3].trim()!="")&&Te.throwArgumentError("unexpected tokens","value",e),t.outputs=Gr(r[2],!1)}else t.outputs=[];return Ot.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}};function xy(n){let e=n.format();return(e==="Error(string)"||e==="Panic(uint256)")&&Te.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",n),n}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(a=>JSON.parse(a.format(e)))});let t="";return e!==ge.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map(a=>a.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:zr(e.name),inputs:e.inputs?e.inputs.map(yt.fromObject):[]};return xy(new tn(oi,t))}static fromString(e){let t={type:"error"},a=e.match(Wr);return a||Te.throwArgumentError("invalid error signature","value",e),t.name=a[1].trim(),t.name&&zr(t.name),t.inputs=Gr(a[2],!1),xy(tn.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}};function Ki(n){return n.match(/^uint($|[^1-9])/)?n="uint256"+n.substring(4):n.match(/^int($|[^1-9])/)&&(n="int256"+n.substring(3)),n}var sh=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function zr(n){return(!n||!n.match(sh))&&Te.throwArgumentError(`invalid identifier "${n}"`,"value",n),n}var Wr=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function oh(n){n=n.trim();let e=[],t="",a=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)}}},di=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):di.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: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 di(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 wy=_n(vy());function fe(n){return"0x"+wy.default.keccak_256(j(n))}var to={};qi(to,{decode:()=>Kr,encode:()=>oa});var _y="rlp/5.7.0";var Hn=new E(_y);function ky(n){let e=[];for(;n;)e.unshift(n&255),n>>=8;return e}function Ay(n,e,t){let a=0;for(let i=0;ie+1+a&&Hn.throwError("child data too short",E.errors.BUFFER_OVERRUN,{})}return{consumed:1+a,result:i}}function Cy(n,e){if(n.length===0&&Hn.throwError("data too short",E.errors.BUFFER_OVERRUN,{}),n[e]>=248){let t=n[e]-247;e+1+t>n.length&&Hn.throwError("data short segment too short",E.errors.BUFFER_OVERRUN,{});let a=Ay(n,e+1,t);return e+1+t+a>n.length&&Hn.throwError("data long segment too short",E.errors.BUFFER_OVERRUN,{}),Ey(n,e,e+1+t,t+a)}else if(n[e]>=192){let t=n[e]-192;return e+1+t>n.length&&Hn.throwError("data array too short",E.errors.BUFFER_OVERRUN,{}),Ey(n,e,e+1,t)}else if(n[e]>=184){let t=n[e]-183;e+1+t>n.length&&Hn.throwError("data array too short",E.errors.BUFFER_OVERRUN,{});let a=Ay(n,e+1,t);e+1+t+a>n.length&&Hn.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&&Hn.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 Kr(n){let e=j(n),t=Cy(e,0);return t.consumed!==e.length&&Hn.throwArgumentError("invalid rlp data","data",n),t.result}var Iy="address/5.7.0";var Ca=new E(Iy);function Sy(n){ie(n,20)||Ca.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 uh=9007199254740991;function dh(n){return Math.log10?Math.log10(n):Math.log(n)/Math.LN10}var Ad={};for(let n=0;n<10;n++)Ad[String(n)]=String(n);for(let n=0;n<26;n++)Ad[String.fromCharCode(65+n)]=String(10+n);var Ry=Math.floor(dh(uh));function Py(n){n=n.toUpperCase(),n=n.substring(4)+n.substring(0,2)+"00";let e=n.split("").map(a=>Ad[a]).join("");for(;e.length>=Ry;){let a=e.substring(0,Ry);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 ce(n){let e=null;if(typeof n!="string"&&Ca.throwArgumentError("invalid address","address",n),n.match(/^(0x)?[0-9a-fA-F]{40}$/))n.substring(0,2)!=="0x"&&(n="0x"+n),e=Sy(n),n.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==n&&Ca.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)!==Py(n)&&Ca.throwArgumentError("bad icap checksum","address",n),e=vd(n.substring(4));e.length<40;)e="0"+e;e=Sy("0x"+e)}else Ca.throwArgumentError("invalid address","address",n);return e}function Ny(n){try{return ce(n),!0}catch{}return!1}function Dy(n){let e=wd(ce(n).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+Py("XE00"+e)+e}function li(n){let e=null;try{e=ce(n.from)}catch{Ca.throwArgumentError("missing from address","transaction",n)}let t=Zt(j(F.from(n.nonce).toHexString()));return ce(Ce(fe(oa([e,t])),12))}function Oy(n,e,t){return Nt(e)!==32&&Ca.throwArgumentError("salt must be 32 bytes","salt",e),Nt(t)!==32&&Ca.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",t),ce(Ce(fe(ye(["0xff",ce(n),e,t])),12))}var no=class extends kt{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=ce(t)}catch(a){this._throwError(a.message,t)}return e.writeValue(t)}decode(e){return ce(me(e.readValue().toHexString(),20))}};var ao=class extends kt{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 $i=new E(jn);function Ed(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 f=p.localName;return f||$i.throwError("cannot encode object for signature with missing names",E.errors.INVALID_ARGUMENT,{argument:"values",coder:p,value:t}),l[f]&&$i.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 $i.throwArgumentError("invalid tuple value","tuple",t);e.length!==a.length&&$i.throwArgumentError("types/value length mismatch","tuple",t);let i=new ui(n.wordSize),r=new ui(n.wordSize),s=[];e.forEach((l,p)=>{let f=a[p];if(l.dynamic){let x=r.length;l.encode(r,f);let I=i.writeUpdatableValue();s.push(_=>{I(_+x)})}else l.encode(i,f)}),s.forEach(l=>{l(i.length)});let o=n.appendWriter(i);return o+=n.appendWriter(r),o}function Md(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 io=class extends kt{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&&$i.throwError("insufficient data length",E.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let a=[];for(let i=0;ilo,EtherSymbol:()=>Vy,HashZero:()=>Yi,MaxInt256:()=>Uy,MaxUint256:()=>fo,MinInt256:()=>Ly,NegativeOne:()=>po,One:()=>yo,Two:()=>By,WeiPerEther:()=>Fy,Zero:()=>Qi});var lo="0x0000000000000000000000000000000000000000";var po=F.from(-1),Qi=F.from(0),yo=F.from(1),By=F.from(2),Fy=F.from("1000000000000000000"),fo=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),Ly=F.from("-0x8000000000000000000000000000000000000000000000000000000000000000"),Uy=F.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");var Yi="0x0000000000000000000000000000000000000000000000000000000000000000";var Vy="\u039E";var co=class extends kt{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=fo.mask(e.wordSize*8);if(this.signed){let r=i.mask(this.size*8-1);(a.gt(r)||a.lt(r.add(yo).mul(po)))&&this._throwError("value out-of-bounds",t)}else(a.lt(Qi)||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 jy="strings/5.7.0";var Hy=new E(jy),Gt;(function(n){n.current="",n.NFC="NFC",n.NFD="NFD",n.NFKC="NFKC",n.NFKD="NFKD"})(Gt||(Gt={}));var Bt;(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"})(Bt||(Bt={}));function lh(n,e,t,a,i){return Hy.throwArgumentError(`invalid codepoint at offset ${e}; ${n}`,"bytes",t)}function qy(n,e,t,a,i){if(n===Bt.BAD_PREFIX||n===Bt.UNEXPECTED_CONTINUE){let r=0;for(let s=e+1;s>6===2;s++)r++;return r}return n===Bt.OVERRUN?t.length-e-1:0}function ph(n,e,t,a,i){return n===Bt.OVERLONG?(a.push(i),0):(a.push(65533),qy(n,e,t,a,i))}var mo=Object.freeze({error:lh,ignore:qy,replace:ph});function Id(n,e){e==null&&(e=mo.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(Bt.UNEXPECTED_CONTINUE,a-1,n,t):a+=e(Bt.BAD_PREFIX,a-1,n,t);continue}if(a-1+r>=n.length){a+=e(Bt.OVERRUN,a-1,n,t);continue}let o=i&(1<<8-r-1)-1;for(let l=0;l1114111){a+=e(Bt.OUT_OF_RANGE,a-1-r,n,t,o);continue}if(o>=55296&&o<=57343){a+=e(Bt.UTF16_SURROGATE,a-1-r,n,t,o);continue}if(o<=s){a+=e(Bt.OVERLONG,a-1-r,n,t,o);continue}t.push(o)}}return t}function ve(n,e=Gt.current){e!=Gt.current&&(Hy.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 Sd(n,e){return'"'+Id(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 ho(n){return n.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function Jt(n,e){return ho(Id(n,e))}function Ia(n,e=Gt.current){return Id(ve(n,e))}function Rd(n){let e=ve(n);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(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 Jt(e.slice(0,t))}function yh(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 Gy(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 Dd(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 fh=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"),ch="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(n=>parseInt(n,16)),mh=[{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}],hh=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"),xh=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"),bh=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",yh),gh=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 Th(n){return n.reduce((e,t)=>(t.forEach(a=>{e.push(a)}),e),[])}function vh(n){return!!Dd(n,fh)}function wh(n){let e=Dd(n,mh);if(e)return[n+e.s];let t=hh[n];if(t)return t;let a=xh[n];if(a)return[n+a[0]];let i=bh[n];return i||null}function _h(n){return!!Dd(n,gh)}function Od(n){if(n.match(/^[a-z0-9-]*$/i)&&n.length<=59)return n.toLowerCase();let e=Ia(n);e=Th(e.map(a=>{if(ch.indexOf(a)>=0)return[];if(a>=65024&&a<=65039)return[];let i=wh(a);return i||[a]})),e=Ia(ho(e),Gt.NFKC),e.forEach(a=>{if(_h(a))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(a=>{if(vh(a))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 Jr{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 kt{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 Ed(e,this.coders,t)}decode(e){return e.coerce(this.name,Md(e,this.coders))}};var bo=new E(jn),kh=new RegExp(/^bytes([0-9]*)$/),Ah=new RegExp(/^(u?int)([0-9]*)$/),Xi=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 pi((e.components||[]).map(a=>this._getCoder(a)),e.name);case"":return new uo(e.name)}let t=e.type.match(Ah);if(t){let a=parseInt(t[2]||"256");return(a===0||a>256||a%8!==0)&&bo.throwArgumentError("invalid "+t[1]+" bit length","param",e),new co(a/8,t[1]==="int",e.name)}if(t=e.type.match(kh),t){let a=parseInt(t[1]);return(a===0||a>32)&&bo.throwArgumentError("invalid bytes length","param",e),new oo(a,e.name)}return bo.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(yt.from(i)));return new pi(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 a=e.map(s=>this._getCoder(yt.from(s))),i=new pi(a,"_"),r=this._getWriter();return i.encode(r,t),r.data}decode(e,t,a){let i=e.map(s=>this._getCoder(yt.from(s)));return new pi(i,"_").decode(this._getReader(j(t),a))}},$r=new Xi;function nn(n){return fe(ve(n))}var go="hash/5.7.0";var Bd={};qi(Bd,{decode:()=>Zi,encode:()=>er});function Zi(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 Eh(n){let e={};for(let t=0;t>--l&1}let x=31,I=Math.pow(2,x),_=I>>>1,v=_>>1,S=I-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=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 Ch(n){let e=0;return()=>n[e++]}function Ky(n){return Ch(Mh(n))}function Ih(n){return n&1?~n>>1:n>>1}function Sh(n,e){let t=Array(n);for(let a=0;ae[s]):t}function Jy(n){let e=[];for(;;){let t=n();if(t==0)break;e.push(Nh(t,n))}for(;;){let t=n()-1;if(t<0)break;e.push(Dh(t,n))}return Eh(Wy(e))}function Ph(n){let e=[];for(;;){let t=n();if(t==0)break;e.push(t)}return e}function $y(n,e,t){let a=Array(n).fill(void 0).map(()=>[]);for(let i=0;ia[s].push(r));return a}function Nh(n,e){let t=1+e(),a=e(),i=Ph(e),r=$y(i.length,1+n,e);return Wy(r.map((s,o)=>{let l=s[0],p=s.slice(1);return Array(i[o]).fill(void 0).map((f,x)=>{let I=x*a;return[l+x*t,p.map(_=>_+I)]})}))}function Dh(n,e){let t=1+e();return $y(t,1+n,e).map(i=>[i[0],i.slice(1)])}function Qy(n){let e=Qr(n).sort((a,i)=>a-i);return t();function t(){let a=[];for(;;){let p=Qr(n,e);if(p.length==0)break;a.push({set:new Set(p),node:t()})}a.sort((p,f)=>f.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 Yy(){return Ky(Zi("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(),Oh=new Set(Qr(To)),Bh=new Set(Qr(To)),Fh=Jy(To),Lh=Qy(To),Xy=45,Zy=95;function e0(n){return Ia(n)}function Uh(n){return n.filter(e=>e!=65039)}function t0(n){for(let e of n.split(".")){let t=e0(e);try{for(let a=t.lastIndexOf(Zy)-1;a>=0;a--)if(t[a]!==Zy)throw new Error("underscore only allowed at start");if(t.length>=4&&t.every(a=>a<128)&&t[2]===Xy&&t[3]===Xy)throw new Error("invalid label extension")}catch(a){throw new Error(`Invalid label "${e}": ${a.message}`)}}return n}function n0(n){return t0(Vh(n,Uh))}function Vh(n,e){let t=e0(n).reverse(),a=[];for(;t.length;){let i=Hh(t);if(i){a.push(...e(i));continue}let r=t.pop();if(Oh.has(r)){a.push(r);continue}if(Bh.has(r))continue;let s=Fh[r];if(s){a.push(...s);continue}throw new Error(`Disallowed codepoint: 0x${r.toString(16).toUpperCase()}`)}return t0(jh(String.fromCodePoint(...a)))}function jh(n){return n.normalize("NFC")}function Hh(n,e){var t;let a=Lh,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 qh=new E(go),i0=new Uint8Array(32);i0.fill(0);function a0(n){if(n.length===0)throw new Error("invalid ENS name; empty component");return n}function Fd(n){let e=ve(n0(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(a0(e.slice(a))),t}function Ld(n){try{return Fd(n).length!==0}catch{}return!1}function Sa(n){typeof n!="string"&&qh.throwArgumentError("invalid ENS name; not a string","name",n);let e=i0,t=Fd(n);for(;t.length;)e=fe(ye([e,fe(t.pop())]));return W(e)}function Yr(n){return W(ye(Fd(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 r0=`Ethereum Signed Message: -`;function tr(n){return typeof n=="string"&&(n=ve(n)),fe(ye([ve(r0),ve(String(n.length)),n]))}var Gh=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},bt=new E(go),d0=new Uint8Array(32);d0.fill(0);var zh=F.from(-1),l0=F.from(0),p0=F.from(1),Wh=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function Kh(n){let e=j(n),t=e.length%32;return t?_t([e,d0.slice(t)]):W(e)}var Jh=me(p0.toHexString(),32),$h=me(l0.toHexString(),32),s0={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Ud=["name","version","chainId","verifyingContract","salt"];function o0(n){return function(e){return typeof e!="string"&&bt.throwArgumentError(`invalid domain value for ${JSON.stringify(n)}`,`domain.${n}`,e),e}}var Qh={name:o0("name"),version:o0("version"),chainId:function(n){try{return F.from(n).toString()}catch{}return bt.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",n)},verifyingContract:function(n){try{return ce(n).toLowerCase()}catch{}return bt.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 bt.throwArgumentError('invalid domain value "salt"',"domain.salt",n)}};function Vd(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))&&bt.throwArgumentError("invalid numeric width","type",n);let i=Wh.mask(t?a-1:a),r=t?i.add(p0).mul(zh):l0;return function(s){let o=F.from(s);return(o.lt(r)||o.gt(i))&&bt.throwArgumentError(`value out-of-bounds for ${n}`,"value",s),me(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))&&bt.throwArgumentError("invalid bytes width","type",n),function(a){return j(a).length!==t&&bt.throwArgumentError(`invalid length for ${n}`,"value",a),Kh(a)}}}switch(n){case"address":return function(e){return me(ce(e),32)};case"bool":return function(e){return e?Jh:$h};case"bytes":return function(e){return fe(e)};case"string":return function(e){return nn(e)}}return null}function u0(n,e){return`${n}(${e.map(({name:t,type:a})=>a+" "+t).join(",")})`}var gt=class{constructor(e){B(this,"types",Object.freeze(mt(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]&&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)&&(a[f]||bt.throwArgumentError(`unknown type ${JSON.stringify(f)}`,"types",e),a[f].push(o),t[o][f]=!0)})}let r=Object.keys(a).filter(o=>a[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=>{!a[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]=u0(o,e[o])+l.map(p=>u0(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(_t(l))}}let a=this.types[e];if(a){let i=nn(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),_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 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(Vd(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&&bt.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),{}):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,a){return gt.from(t).hashStruct(e,a)}static hashDomain(e){let t=[];for(let a in e){let i=s0[a];i||bt.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(a)}`,"domain",e),t.push({name:a,type:i})}return t.sort((a,i)=>Ud.indexOf(a.name)-Ud.indexOf(i.name)),gt.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,a){return _t(["0x1901",gt.hashDomain(e),gt.from(t).hash(a)])}static hash(e,t,a){return fe(gt.encode(e,t,a))}static resolveNames(e,t,a,i){return Gh(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(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){gt.hashDomain(e);let i={},r=[];Ud.forEach(l=>{let p=e[l];p!=null&&(i[l]=Qh[l](p),r.push({name:l,type:s0[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(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"&&bt.throwArgumentError("invalid string","value",p),p}return bt.throwArgumentError("unsupported type","type",l)})}}};var Tt=new E(jn);var nr=class extends en{},ar=class extends en{},jd=class extends en{},ua=class extends en{static isIndexed(e){return!!(e&&e._isIndexed)}},Yh={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function y0(n,e){let t=new Error(`deferred error during ABI decoding triggered accessing ${n}`);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(a=>qt.from(a)).filter(a=>a!=null)),B(this,"_abiCoder",ht(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){Tt.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]){Tt.warn("duplicate definition - "+r);return}i[r]=a}),this.deploy||B(this,"deploy",Dt.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(a=>a.format(e));return e===ge.json?JSON.stringify(t.map(a=>JSON.parse(a))):t}static getAbiCoder(){return $r}static getAddress(e){return ce(e)}static getSighash(e){return Ce(nn(e.format()),0,4)}static getEventTopic(e){return nn(e.format())}getFunction(e){if(ie(e)){for(let a in this.functions)if(e===this.getSighash(a))return this.functions[a];Tt.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?Tt.throwArgumentError("no matching function","name",a):i.length>1&&Tt.throwArgumentError("multiple matching functions","name",a),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 a=e.toLowerCase();for(let i in this.events)if(a===this.getEventTopic(i))return this.events[i];Tt.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?Tt.throwArgumentError("no matching event","name",a):i.length>1&&Tt.throwArgumentError("multiple matching events","name",a),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 a=ht(this.constructor,"getSighash");for(let i in this.errors){let r=this.errors[i];if(e===a(r))return this.errors[i]}Tt.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?Tt.throwArgumentError("no matching error","name",a):i.length>1&&Tt.throwArgumentError("multiple matching errors","name",a),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 a=j(t);return W(a.slice(0,4))!==this.getSighash(e)&&Tt.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(ye([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)&&Tt.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(ye([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)),f=Yh[p];if(f)s=this._abiCoder.decode(f.inputs,a.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,a.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 a=[];e.anonymous||a.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&&Tt.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"?Tt.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&&Tt.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(nn(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 I=this.getEventTopic(e);(!ie(a[0],32)||a[0].toLowerCase()!==I)&&Tt.throwError("fragment/topic mismatch",E.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:I,value:a[0]}),a=a.slice(1)}let i=[],r=[],s=[];e.inputs.forEach((I,_)=>{I.indexed?I.type==="string"||I.type==="bytes"||I.baseType==="tuple"||I.baseType==="array"?(i.push(yt.fromObject({type:"bytes32",name:I.name})),s.push(!0)):(i.push(I),s.push(!1)):(r.push(I),s.push(!1))});let o=a!=null?this._abiCoder.decode(i,ye(a)):null,l=this._abiCoder.decode(r,t,!0),p=[],f=0,x=0;e.inputs.forEach((I,_)=>{if(I.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(I.name&&p[I.name]==null){let v=p[_];v instanceof Error?Object.defineProperty(p,I.name,{enumerable:!0,get:()=>{throw y0(`property ${JSON.stringify(I.name)}`,v)}}):p[I.name]=v}});for(let I=0;I{throw y0(`index ${I}`,_)}})}return Object.freeze(p)}parseTransaction(e){let t=this.getFunction(e.data.substring(0,10).toLowerCase());return t?new ar({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 nr({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 jd({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 f0="abstract-provider/5.7.0";var Xh=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Zh=new E(f0),vo=class extends en{static isForkEvent(e){return!!(e&&e._isForkEvent)}};var $t=class{constructor(){Zh.checkAbstract(new.target,$t),B(this,"_isProvider",!0)}getFeeData(){return Xh(this,void 0,void 0,function*(){let{block:e,gasPrice:t}=yield Ie({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 c0="abstract-signer/5.7.0";var kn=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},pn=new E(c0),e2=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],t2=[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 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 a=yield Ie(this.checkTransaction(e));return yield this.provider.call(a,t)})}sendTransaction(e){return kn(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 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 a in e)e2.indexOf(a)===-1&&pn.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()&&pn.throwArgumentError("from address mismatch","transaction",e),a[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&&pn.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)?pn.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(t.type===0||t.type===1)&&a&&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?(a&&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(t2.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 Ie(t)})}_checkProvider(e){this.provider||pn.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(()=>{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,a){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new da(this.address,e)}};var pe=_n(md()),$n=_n(Yd());function pr(n,e,t){return t={path:e,exports:{},require:function(a,i){return kx(a,i??t.path)}},n(t,t.exports),t.exports}function kx(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var tl=X0;function X0(n,e){if(!n)throw new Error(e||"Assertion failed")}X0.equal=function(e,t,a){if(e!=t)throw new Error(a||"Assertion failed: "+e+" != "+t)};var Cn=pr(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,I=f&255;x?l.push(x,I):l.push(I)}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(I>>1)-1?S=(I>>1)-L:S=L,_.isubn(S)):S=0,x[v]=S,_.iushrn(1)}return x}t.getNAF=a;function i(l,p){var f=[[],[]];l=l.clone(),p=p.clone();for(var x=0,I=0,_;l.cmpn(-x)>0||p.cmpn(-I)>0;){var v=l.andln(3)+x&3,S=p.andln(3)+I&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)+I&7,(_===3||_===5)&&v===2?O=-S:O=S),f[1].push(O),2*x===L+1&&(x=1-x),2*I===O+1&&(I=1-I),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,Ax=an.getJSF,Mo=an.assert;function Da(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 fi=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 a=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),I=r;I>0;I--){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,a,i,r){var s=this._wnafT1,o=this._wnafT2,l=this._wnafT3,p=0,f,x,I;for(f=0;f=1;f-=2){var v=f-1,S=f;if(s[v]!==1||s[S]!==1){l[v]=Eo(a[v],s[v],this._bitLength),l[S]=Eo(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=Ax(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;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?I=o[x][R-1>>1]:R<0&&(I=o[x][-R-1>>1].neg()),I.type==="affine"?J=J.mixedAdd(I):J=J.add(I))}}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 a=[this],i=this,r=0;r=0&&(_=p,v=f),x.negative&&(x=x.neg(),I=I.neg()),_.negative&&(_=_.neg(),v=v.neg()),[{a:x,b:I},{a:_,b:v}]};cn.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),f=s.mul(i.b),x=e.sub(o).sub(l),I=p.add(f).neg();return{k1:x,k2:I}};cn.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)};cn.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};cn.prototype._endoWnafMulAdd=function(e,t,a){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 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)};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,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)};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,a){var i=[this,t],r=[e,a];return this.curve.endo?this.curve._endoWnafMulAdd(i,r):this.curve._wnafMulAdd(1,i,r,2)};Mt.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)};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 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};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(n,e,t,a){fi.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}nl(Pt,fi.BasePoint);cn.prototype.jpoint=function(e,t,a){return new Pt(this,e,t,a)};Pt.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)};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(),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 f=l.redSqr(),x=f.redMul(l),I=i.redMul(f),_=p.redSqr().redIAdd(x).redISub(I).redISub(I),v=p.redMul(I.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(),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(),f=p.redMul(o),x=a.redMul(p),I=l.redSqr().redIAdd(f).redISub(x).redISub(x),_=l.redMul(x.redISub(I)).redISub(r.redMul(f)),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 a=this;for(t=0;t=0)return!1;if(a.redIAdd(r),this.x.cmp(a)===0)return!0}};Pt.prototype.inspect=function(){return this.isInfinity()?"":""};Pt.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var ko=pr(function(n,e){"use strict";var t=e;t.base=fi,t.short=Mx,t.mont=null,t.edwards=null}),Ao=pr(function(n,e){"use strict";var t=e,a=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,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:$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(n){if(!(this instanceof Na))return new Na(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=Cn.toArray(n.entropy,n.entropyEnc||"hex"),t=Cn.toArray(n.nonce,n.nonceEnc||"hex"),a=Cn.toArray(n.pers,n.persEnc||"hex");tl(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,t,a)}var Z0=Na;Na.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};Na.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=Cn.toArray(a,i||"hex"),this._update(a));for(var r=[];r.length"};var Cx=an.assert;function Co(n,e){if(n instanceof Co)return n;this._importDER(n,e)||(Cx(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 Io=Co;function Ix(){this.place=0}function Xd(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 Y0(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)}Co.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=Y0(t),a=Y0(a);!a[0]&&!(a[1]&128);)a=a.slice(1);var i=[2];Zd(i,t.length),i=i.concat(t),i.push(2),Zd(i,a.length);var r=i.concat(a),s=[48];return Zd(s,r.length),s=s.concat(r),an.encode(s,e)};var Sx=function(){throw new Error("unsupported")},ef=an.assert;function yn(n){if(!(this instanceof yn))return new yn(n);typeof n=="string"&&(ef(Object.prototype.hasOwnProperty.call(Ao,n),"Unknown curve "+n),n=Ao[n]),n instanceof Ao.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 Rx=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 Z0({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||Sx(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)}};yn.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};yn.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 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 I=this.g.mul(x);if(!I.isInfinity()){var _=I.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=(I.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 Io({r:v,s:S,recoveryParam:L})}}}}}};yn.prototype.verify=function(e,t,a,i){e=this._truncateToN(new pe.default(e,16)),a=this.keyFromPublic(a,i),t=new Io(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,a.getPublic(),p),f.isInfinity()?!1:f.eqXToP(r)):(f=this.g.mulAdd(l,a.getPublic(),p),f.isInfinity()?!1:f.getX().umod(this.n).cmp(r)===0)};yn.prototype.recoverPubKey=function(n,e,t,a){ef((3&t)===t,"The recovery param is more than two bits"),e=new Io(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 f=e.r.invm(i),x=i.sub(r).mul(f).umod(i),I=o.mul(f).umod(i);return this.g.mulAdd(x,s,I)};yn.prototype.getKeyRecoveryParam=function(n,e,t,a){if(e=new Io(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 Px=pr(function(n,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=Rx,t.eddsa=null}),tf=Px.ec;var nf="signing-key/5.7.0";var rl=new E(nf),il=null;function Qn(){return il||(il=new tf("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)),a=Qn().keyFromPublic(j(e));return"0x"+t.pub.add(a.pub).encodeCompressed("hex")}signDigest(e){let t=Qn().keyFromPrivate(j(this.privateKey)),a=j(e);a.length!==32&&rl.throwArgumentError("bad digest length","digest",e);let i=t.sign(a,{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)),a=Qn().keyFromPublic(j(es(e)));return me("0x"+t.derive(a.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}};function So(n,e){let t=Vn(e),a={r:j(t.r),s:j(t.s)};return"0x"+Qn().recoverPubKey(j(n),a,t.recoveryParam).encode("hex",!1)}function es(n,e){let t=j(n);if(t.length===32){let a=new mn(t);return e?"0x"+Qn().keyFromPrivate(t).getPublic(!0,"hex"):a.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 af="transactions/5.7.0";var Ut=new E(af),Ro;(function(n){n[n.legacy=0]="legacy",n[n.eip2930=1]="eip2930",n[n.eip1559=2]="eip1559"})(Ro||(Ro={}));function ol(n){return n==="0x"?null:ce(n)}function Lt(n){return n==="0x"?Qi:F.from(n)}var Nx=[{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"}],Dx={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function hn(n){let e=es(n);return ce(Ce(fe(Ce(e,1)),12))}function ci(n,e){return hn(So(j(n),e))}function rn(n,e){let t=Zt(F.from(n).toHexString());return t.length>32&&Ut.throwArgumentError("invalid length for "+e,"transaction:"+e,n),t}function sl(n,e){return{address:ce(n),storageKeys:(e||[]).map((t,a)=>(Nt(t)!==32&&Ut.throwArgumentError("invalid access list storageKey",`accessList[${n}:${a}]`,t),t.toLowerCase()))}}function sn(n){if(Array.isArray(n))return n.map((t,a)=>Array.isArray(t)?(t.length>2&&Ut.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${a}]`,t),sl(t[0],t[1])):sl(t.address,t.storageKeys));let e=Object.keys(n).map(t=>{let a=n[t].reduce((i,r)=>(i[r]=!0,i),{});return sl(t,Object.keys(a).sort())});return e.sort((t,a)=>t.address.localeCompare(a.address)),e}function rf(n){return sn(n).map(e=>[e.address,e.storageKeys])}function sf(n,e){if(n.gasPrice!=null){let a=F.from(n.gasPrice),i=F.from(n.maxFeePerGas||0);a.eq(i)||Ut.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:a,maxFeePerGas:i})}let t=[rn(n.chainId||0,"chainId"),rn(n.nonce||0,"nonce"),rn(n.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),rn(n.maxFeePerGas||0,"maxFeePerGas"),rn(n.gasLimit||0,"gasLimit"),n.to!=null?ce(n.to):"0x",rn(n.value||0,"value"),n.data||"0x",rf(n.accessList||[])];if(e){let a=Vn(e);t.push(rn(a.recoveryParam,"recoveryParam")),t.push(Zt(a.r)),t.push(Zt(a.s))}return _t(["0x02",oa(t)])}function of(n,e){let t=[rn(n.chainId||0,"chainId"),rn(n.nonce||0,"nonce"),rn(n.gasPrice||0,"gasPrice"),rn(n.gasLimit||0,"gasLimit"),n.to!=null?ce(n.to):"0x",rn(n.value||0,"value"),n.data||"0x",rf(n.accessList||[])];if(e){let a=Vn(e);t.push(rn(a.recoveryParam,"recoveryParam")),t.push(Zt(a.r)),t.push(Zt(a.s))}return _t(["0x01",oa(t)])}function Ox(n,e){Wi(n,Dx);let t=[];Nx.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&&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 a=0;if(n.chainId!=null?(a=n.chainId,typeof a!="number"&&Ut.throwArgumentError("invalid transaction.chainId","transaction",n)):e&&!ia(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 oa(t);let i=Vn(e),r=27+i.recoveryParam;return a!==0?(t.pop(),t.pop(),t.pop(),r+=a*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 ts(n,e){if(n.type==null||n.type===0)return n.accessList!=null&&Ut.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",n),Ox(n,e);switch(n.type){case 1:return of(n,e);case 2:return sf(n,e);default:break}return Ut.throwError(`unsupported transaction type: ${n.type}`,E.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:n.type})}function uf(n,e,t){try{let a=Lt(e[0]).toNumber();if(a!==0&&a!==1)throw new Error("bad recid");n.v=a}catch{Ut.throwArgumentError("invalid v for transaction type: 1","v",e[0])}n.r=me(e[1],32),n.s=me(e[2],32);try{let a=fe(t(n));n.from=ci(a,{r:n.r,s:n.s,recoveryParam:n.v})}catch{}}function Bx(n){let e=Kr(n.slice(1));e.length!==9&&e.length!==12&&Ut.throwArgumentError("invalid component count for transaction type: 2","payload",W(n));let t=Lt(e[2]),a=Lt(e[3]),i={type:2,chainId:Lt(e[0]).toNumber(),nonce:Lt(e[1]).toNumber(),maxPriorityFeePerGas:t,maxFeePerGas:a,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(n),uf(i,e.slice(9),sf)),i}function Fx(n){let e=Kr(n.slice(1));e.length!==8&&e.length!==11&&Ut.throwArgumentError("invalid component count for transaction type: 1","payload",W(n));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(n),uf(t,e.slice(8),of)),t}function Lx(n){let e=Kr(n);e.length!==9&&e.length!==6&&Ut.throwArgumentError("invalid raw transaction","rawTransaction",n);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=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 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(oa(i));try{t.from=ci(r,{r:W(t.r),s:W(t.s),recoveryParam:a})}catch{}t.hash=fe(n)}return t.type=null,t}function Po(n){let e=j(n);if(e[0]>127)return Lx(e);switch(e[0]){case 1:return Fx(e);case 2:return Bx(e);default:break}return Ut.throwError(`unsupported transaction type: ${e[0]}`,E.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}var df="contracts/5.7.0";var Oa=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Se=new E(df),Ux={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(n,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{}n||Se.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&&Se.throwArgumentError("resolver or addr is not configured for ENS name","name",t),a})}function ns(n,e,t){return Oa(this,void 0,void 0,function*(){return Array.isArray(t)?yield Promise.all(t.map((a,i)=>ns(n,Array.isArray(e)?e[i]:e[a.name],a))):t.type==="address"?yield No(n,e):t.type==="tuple"?yield ns(n,e,t.components):t.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(a=>ns(n,a,t.arrayChildren))):Promise.reject(Se.makeError("invalid value for array",E.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function Bo(n,e,t){return Oa(this,void 0,void 0,function*(){let a={};t.length===e.inputs.length+1&&typeof t[t.length-1]=="object"&&(a=_e(t.pop())),Se.checkArgumentCount(t.length,e.inputs.length,"passed to contract"),n.signer?a.from?a.from=Ie({override:No(n.signer,a.from),signer:n.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})):a.from=n.signer.getAddress():a.from&&(a.from=No(n.provider,a.from));let i=yield Ie({args:ns(n.signer||n.provider,t,e.inputs),address:n.resolvedAddress,overrides:Ie(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=sn(o.accessList)),s.gasLimit==null&&e.gas!=null){let p=21e3,f=j(r);for(let x=0;xa[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 Vx(n,e){return function(...t){return Bo(n,e,t)}}function jx(n,e){let t=n.signer||n.provider;return function(...a){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(n,e,a);return yield t.estimateGas(i)})}}function pf(n,e){let t=e.wait.bind(e);e.wait=a=>t(a).then(i=>(i.events=i.logs.map(r=>{let s=mt(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 yf(n,e,t){let a=n.signer||n.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)}n.deployTransaction!=null&&(yield n._deployed(r));let s=yield Bo(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 Hx(n,e){return function(...t){return Oa(this,void 0,void 0,function*(){n.signer||Se.throwError("sending a transaction requires a signer",E.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),n.deployTransaction!=null&&(yield n._deployed());let a=yield Bo(n,e,t),i=yield n.signer.sendTransaction(a);return pf(n,i),i})}}function lf(n,e,t){return e.constant?yf(n,e,t):Hx(n,e)}function ff(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 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(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]}},ul=class extends mi{constructor(){super("error",null)}},Do=class extends mi{constructor(e,t,a,i){let r={address:e},s=t.getEventTopic(a);i?(s!==i[0]&&Se.throwArgumentError("topic mismatch","topics",i),r.topics=i.slice()):r.topics=[s],super(ff(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=Ji(e.args);if(t.length)throw t[0].error;let a=(e.args||[]).slice();return a.push(e),a}},Oo=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=(a,i)=>this.interface.decodeEventLog(t.eventFragment,a,i),e.args=t.args}catch{}}},yr=class{constructor(e,t,a){B(this,"interface",ht(new.target,"getInterface")(t)),a==null?(B(this,"provider",null),B(this,"signer",null)):St.isSigner(a)?(B(this,"provider",a.provider||null),B(this,"signer",a)):$t.isProvider(a)?(B(this,"provider",a),B(this,"signer",null)):Se.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]]):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,lf(this,o,!0)),this.functions[s]==null&&B(this.functions,s,lf(this,o,!1)),this.callStatic[s]==null&&B(this.callStatic,s,yf(this,o,!0)),this.populateTransaction[s]==null&&B(this.populateTransaction,s,Vx(this,o)),this.estimateGas[s]==null&&B(this.estimateGas,s,jx(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 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(a){t[a]!=null&&Se.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 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 ul);if(e==="event")return this._normalizeRunningEvent(new mi("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 a=e.topics[0];if(typeof a!="string")throw new Error("invalid topic");let i=this.interface.getEvent(a);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 mi(ff(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,a){let i=mt(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||Se.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&&Se.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 yr{},hi=class{constructor(e,t,a){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),a&&!St.isSigner(a)&&Se.throwArgumentError("invalid signer","signer",a),B(this,"bytecode",i),B(this,"interface",ht(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(!Ux[a])throw new Error("unknown transaction override "+a)}return["data","from","to"].forEach(a=>{t[a]!=null&&Se.throwError("cannot override "+a,E.errors.UNSUPPORTED_OPERATION,{operation:a})}),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 a=yield ns(this.signer,e,this.interface.deploy.inputs);a.push(t);let i=this.getDeployTransaction(...a),r=yield this.signer.sendTransaction(i),s=ht(this.constructor,"getContractAddress")(r),o=ht(this.constructor,"getContract")(s,this.interface,this.signer);return pf(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 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 li(e)}static getContract(e,t,a){return new oe(e,t,a)}};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;)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 I=j(ca(i,n,l));r||(r=I.length,f=new Uint8Array(r),s=Math.ceil(a/r),p=a-(s-1)*r),f.set(I);for(let S=1;S{var z6=Object.create;var Js=Object.defineProperty;var W6=Object.getOwnPropertyDescriptor;var K6=Object.getOwnPropertyNames;var J6=Object.getPrototypeOf,$6=Object.prototype.hasOwnProperty;var Q6=(n,e,t)=>e in n?Js(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),qi=(n,e)=>{for(var t in e)Js(n,t,{get:e[t],enumerable:!0})},Y6=(n,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of K6(e))!$6.call(n,i)&&i!==t&&Js(n,i,{get:()=>e[i],enumerable:!(a=W6(e,i))||a.enumerable});return n};var _n=(n,e,t)=>(t=n!=null?z6(J6(n)):{},Y6(e||!n||!n.__esModule?Js(t,"default",{value:n,enumerable:!0}):t,n));var xe=(n,e,t)=>(Q6(n,typeof e!="symbol"?e+"":e,t),t);var $p=ae(()=>{});var hd=ae((Qp,md)=>{(function(n,e){"use strict";function t(C,u){if(!C)throw new Error(u||"Assertion failed")}function a(C,u){C.super_=u;var y=function(){};y.prototype=u.prototype,C.prototype=new y,C.prototype.constructor=C}function i(C,u,y){if(i.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=i:e.BN=i,i.BN=i,i.wordSize=26;var r;try{typeof window<"u"&&typeof window.Buffer<"u"?r=window.Buffer:r=$p().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(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 b=s(C,y);return y-1>=u&&(b|=s(C,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(C,u,y,b){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()},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"],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];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=I[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(C){for(var u=new Array(C.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-C.length+1);P<=c;P++){var D=d-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[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,Y=ee&8191,Q=ee>>>13,ft=w[3]|0,Z=ft&8191,le=ft>>>13,Ga=w[4]|0,De=Ga&8191,Oe=Ga>>>13,za=w[5]|0,Be=za&8191,Fe=za>>>13,Wa=w[6]|0,Le=Wa&8191,Ue=Wa>>>13,Ka=w[7]|0,Ve=Ka&8191,je=Ka>>>13,Ja=w[8]|0,He=Ja&8191,qe=Ja>>>13,$a=w[9]|0,Ge=$a&8191,ze=$a>>>13,Qa=A[0]|0,We=Qa&8191,Ke=Qa>>>13,Ya=A[1]|0,Je=Ya&8191,$e=Ya>>>13,Xa=A[2]|0,Qe=Xa&8191,Ye=Xa>>>13,Za=A[3]|0,Xe=Za&8191,Ze=Za>>>13,ei=A[4]|0,et=ei&8191,tt=ei>>>13,ti=A[5]|0,nt=ti&8191,at=ti>>>13,ni=A[6]|0,it=ni&8191,rt=ni>>>13,ai=A[7]|0,st=ai&8191,ot=ai>>>13,ii=A[8]|0,ut=ii&8191,dt=ii>>>13,ri=A[9]|0,lt=ri&8191,pt=ri>>>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(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(c,Qe)|0,d=d+Math.imul(c,Ye)|0,d=d+Math.imul(P,Qe)|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(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(c,Xe)|0,d=d+Math.imul(c,Ze)|0,d=d+Math.imul(P,Xe)|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(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(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,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(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 td=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(td>>>26)|0,td&=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(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 nd=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(nd>>>26)|0,nd&=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(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 ad=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(ad>>>26)|0,ad&=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(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 id=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(id>>>26)|0,id&=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,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(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 rd=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(rd>>>26)|0,rd&=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,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 sd=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(sd>>>26)|0,sd&=67108863,g=Math.imul(Ge,Qe),d=Math.imul(Ge,Ye),d=d+Math.imul(ze,Qe)|0,m=Math.imul(ze,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 od=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(od>>>26)|0,od&=67108863,g=Math.imul(Ge,Xe),d=Math.imul(Ge,Ze),d=d+Math.imul(ze,Xe)|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 ud=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(ud>>>26)|0,ud&=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 dd=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(dd>>>26)|0,dd&=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 ld=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(ld>>>26)|0,ld&=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 pd=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(pd>>>26)|0,pd&=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 yd=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(yd>>>26)|0,yd&=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 fd=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(fd>>>26)|0,fd&=67108863,g=Math.imul(Ge,lt),d=Math.imul(Ge,pt),d=d+Math.imul(ze,lt)|0,m=Math.imul(ze,pt);var cd=(k+g|0)+((d&8191)<<13)|0;return k=(m+(d>>>13)|0)+(cd>>>26)|0,cd&=67108863,h[0]=_a,h[1]=ka,h[2]=Aa,h[3]=Ea,h[4]=Ma,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]=fd,h[18]=cd,k!==0&&(h[19]=k,b.length++),b};Math.imul||(O=L);function U(C,u,y){y.negative=u.negative^C.negative,y.length=C.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(C,u,y){return U(C,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(C,u){this.x=C,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 $(C,u){this.name=C,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(C){if(typeof C=="string"){var u=i._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 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(C){q.call(this,C),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,Qp)});var vy=ae((Og,eo)=>{(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 eo=="object"&&eo.exports,o=typeof define=="function"&&define.amd,l=!a.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",p="0123456789abcdef".split(""),f=[31,7936,2031616,520093696],x=[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};(a.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(c){return Object.prototype.toString.call(c)==="[object Array]"}),l&&(a.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,Y){return u["cshake"+c].update(V,K,ee,Y)[D]()}},de=function(c,P,D){return function(V,K,ee,Y){return u["kmac"+c].update(V,K,ee,Y)[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(n);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(n)}else throw new Error(n);P=!0}for(var V=this.blocks,K=this.byteCount,ee=c.length,Y=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[Y],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(n);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(n)}else throw new Error(n);P=!0}var V=0,K=c.length;if(P)V=K;else for(var ee=0;ee=57344?V+=3:(Y=65536+((Y&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],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 c=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%c===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(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,Y,Q,ft,Z,le,Ga,De,Oe,za,Be,Fe,Wa,Le,Ue,Ka,Ve,je,Ja,He,qe,$a,Ge,ze,Qa,We,Ke,Ya,Je,$e,Xa,Qe,Ye,Za,Xe,Ze,ei,et,tt,ti,nt,at,ni,it,rt,ai,st,ot,ii,ut,dt,ri,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],Y=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],Ga=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^(Y<<1|Q>>>31),D=Oe^(Q<<1|Y>>>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=Y^(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=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=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],Be=c[1],at=c[11]<<4|c[10]>>>28,ni=c[10]<<4|c[11]>>>28,ze=c[20]<<3|c[21]>>>29,Qa=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,Wa=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,Ye=c[15]<<6|c[14]>>>26,Le=c[25]<<11|c[24]>>>21,Ue=c[24]<<11|c[25]>>>21,ai=c[34]<<15|c[35]>>>17,st=c[35]<<15|c[34]>>>17,Ya=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,ri=c[17]<<23|c[16]>>>9,lt=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,Ve=c[37]<<21|c[36]>>>11,ot=c[47]<<24|c[46]>>>8,ii=c[46]<<24|c[47]>>>8,ti=c[8]<<27|c[9]>>>5,nt=c[9]<<27|c[8]>>>5,$a=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,ei=c[39]<<8|c[38]>>>24,je=c[48]<<14|c[49]>>>18,Ja=c[49]<<14|c[48]>>>18,c[0]=za^~Fe&Le,c[1]=Be^~Wa&Ue,c[10]=He^~$a&ze,c[11]=qe^~Ge&Qa,c[20]=$e^~Qe&Za,c[21]=Xa^~Ye&Xe,c[30]=ti^~at&it,c[31]=nt^~ni&rt,c[40]=ut^~ri&pt,c[41]=dt^~lt&_a,c[2]=Fe^~Le&Ka,c[3]=Wa^~Ue&Ve,c[12]=$a^~ze&We,c[13]=Ge^~Qa&Ke,c[22]=Qe^~Za&Ze,c[23]=Ye^~Xe&ei,c[32]=at^~it&ai,c[33]=ni^~rt&st,c[42]=ri^~pt&ka,c[43]=lt^~_a&Aa,c[4]=Le^~Ka&je,c[5]=Ue^~Ve&Ja,c[14]=ze^~We&Ya,c[15]=Qa^~Ke&Je,c[24]=Za^~Ze&et,c[25]=Xe^~ei&tt,c[34]=it^~ai&ot,c[35]=rt^~st&ii,c[44]=pt^~ka&Ea,c[45]=_a^~Aa&Ma,c[6]=Ka^~je&za,c[7]=Ve^~Ja&Be,c[16]=We^~Ya&He,c[17]=Ke^~Je&qe,c[26]=Ze^~et&$e,c[27]=ei^~tt&Xa,c[36]=ai^~ot&ti,c[37]=st^~ii&nt,c[46]=ka^~Ea&ut,c[47]=Aa^~Ma&dt,c[8]=je^~za&Fe,c[9]=Ja^~Be&Wa,c[18]=Ya^~He&$a,c[19]=Je^~qe&Ge,c[28]=et^~$e&Qe,c[29]=tt^~Xa&Ye,c[38]=ot^~ti&at,c[39]=ii^~nt&ni,c[48]=Ea^~ut&ri,c[49]=Ma^~dt<,c[0]^=S[V],c[1]^=S[V+1]};if(s)eo.exports=u;else{for(b=0;b{h0.exports=m0;function m0(n,e){if(!n)throw new Error(e||"Assertion failed")}m0.equal=function(e,t,a){if(e!=t)throw new Error(a||"Assertion failed: "+e+" != "+t)}});var x0=ae((M3,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 An=ae(Pe=>{"use strict";var n2=ir(),a2=x0();Pe.inherits=a2;function i2(n,e){return(n.charCodeAt(e)&64512)!==55296||e<0||e+1>=n.length?!1:(n.charCodeAt(e+1)&64512)===56320}function r2(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):i2(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}Pe.htonl=b0;function o2(n,e){for(var t="",a=0;a>>0}return r}Pe.join32=u2;function d2(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}Pe.split32=d2;function l2(n,e){return n>>>e|n<<32-e}Pe.rotr32=l2;function p2(n,e){return n<>>32-e}Pe.rotl32=p2;function y2(n,e){return n+e>>>0}Pe.sum32=y2;function f2(n,e,t){return n+e+t>>>0}Pe.sum32_3=f2;function c2(n,e,t,a){return n+e+t+a>>>0}Pe.sum32_4=c2;function m2(n,e,t,a,i){return n+e+t+a+i>>>0}Pe.sum32_5=m2;function h2(n,e,t,a){var i=n[e],r=n[e+1],s=a+r>>>0,o=(s>>0,n[e+1]=s}Pe.sum64=h2;function x2(n,e,t,a){var i=e+a>>>0,r=(i>>0}Pe.sum64_hi=x2;function b2(n,e,t,a){var i=e+a;return i>>>0}Pe.sum64_lo=b2;function g2(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}Pe.sum64_4_hi=g2;function T2(n,e,t,a,i,r,s,o){var l=e+a+r+o;return l>>>0}Pe.sum64_4_lo=T2;function v2(n,e,t,a,i,r,s,o,l,p){var f=0,x=e;x=x+a>>>0,f+=x>>0,f+=x>>0,f+=x>>0,f+=x>>0}Pe.sum64_5_hi=v2;function w2(n,e,t,a,i,r,s,o,l,p){var f=e+a+r+o+p;return f>>>0}Pe.sum64_5_lo=w2;function _2(n,e,t){var a=e<<32-t|n>>>t;return a>>>0}Pe.rotr64_hi=_2;function k2(n,e,t){var a=n<<32-t|e>>>t;return a>>>0}Pe.rotr64_lo=k2;function A2(n,e,t){return n>>>t}Pe.shr64_hi=A2;function E2(n,e,t){var a=n<<32-t|e>>>t;return a>>>0}Pe.shr64_lo=E2});var rr=ae(w0=>{"use strict";var v0=An(),M2=ir();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}w0.BlockHash=wo;wo.prototype.update=function(e,t){if(e=v0.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=v0.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 C2=An(),qn=C2.rotr32;function I2(n,e,t,a){if(n===0)return _0(e,t,a);if(n===1||n===3)return A0(e,t,a);if(n===2)return k0(e,t,a)}la.ft_1=I2;function _0(n,e,t){return n&e^~n&t}la.ch32=_0;function k0(n,e,t){return n&e^n&t^e&t}la.maj32=k0;function A0(n,e,t){return n^e^t}la.p32=A0;function S2(n){return qn(n,2)^qn(n,13)^qn(n,22)}la.s0_256=S2;function R2(n){return qn(n,6)^qn(n,11)^qn(n,25)}la.s1_256=R2;function P2(n){return qn(n,7)^qn(n,18)^n>>>3}la.g0_256=P2;function N2(n){return qn(n,17)^qn(n,19)^n>>>10}la.g1_256=N2});var C0=ae((R3,M0)=>{"use strict";var sr=An(),D2=rr(),O2=Gd(),zd=sr.rotl32,Xr=sr.sum32,B2=sr.sum32_5,F2=O2.ft_1,E0=D2.BlockHash,L2=[1518500249,1859775393,2400959708,3395469782];function Gn(){if(!(this instanceof Gn))return new Gn;E0.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}sr.inherits(Gn,E0);M0.exports=Gn;Gn.blockSize=512;Gn.outSize=160;Gn.hmacStrength=80;Gn.padLength=64;Gn.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 or=An(),U2=rr(),ur=Gd(),V2=ir(),En=or.sum32,j2=or.sum32_4,H2=or.sum32_5,q2=ur.ch32,G2=ur.maj32,z2=ur.s0_256,W2=ur.s1_256,K2=ur.g0_256,J2=ur.g1_256,I0=U2.BlockHash,$2=[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=$2,this.W=new Array(64)}or.inherits(zn,I0);S0.exports=zn;zn.blockSize=512;zn.outSize=256;zn.hmacStrength=192;zn.padLength=64;zn.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=An(),R0=Wd();function pa(){if(!(this instanceof pa))return new pa;R0.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}Kd.inherits(pa,R0);P0.exports=pa;pa.blockSize=512;pa.outSize=224;pa.hmacStrength=192;pa.padLength=64;pa.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((D3,F0)=>{"use strict";var Qt=An(),Q2=rr(),Y2=ir(),Wn=Qt.rotr64_hi,Kn=Qt.rotr64_lo,D0=Qt.shr64_hi,O0=Qt.shr64_lo,Pa=Qt.sum64,Jd=Qt.sum64_hi,$d=Qt.sum64_lo,X2=Qt.sum64_4_hi,Z2=Qt.sum64_4_lo,ex=Qt.sum64_5_hi,tx=Qt.sum64_5_lo,B0=Q2.BlockHash,nx=[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 Mn(){if(!(this instanceof Mn))return new Mn;B0.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=nx,this.W=new Array(160)}Qt.inherits(Mn,B0);F0.exports=Mn;Mn.blockSize=1024;Mn.outSize=512;Mn.hmacStrength=192;Mn.padLength=128;Mn.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=An(),L0=Qd();function ya(){if(!(this instanceof ya))return new ya;L0.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}Yd.inherits(ya,L0);U0.exports=ya;ya.blockSize=1024;ya.outSize=384;ya.hmacStrength=192;ya.padLength=128;ya.prototype._digest=function(e){return e==="hex"?Yd.toHex32(this.h.slice(0,12),"big"):Yd.split32(this.h.slice(0,12),"big")}});var j0=ae(dr=>{"use strict";dr.sha1=C0();dr.sha224=N0();dr.sha256=Wd();dr.sha384=V0();dr.sha512=Qd()});var K0=ae(W0=>{"use strict";var yi=An(),mx=rr(),_o=yi.rotl32,H0=yi.sum32,Zr=yi.sum32_3,q0=yi.sum32_4,z0=mx.BlockHash;function Jn(){if(!(this instanceof Jn))return new Jn;z0.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}yi.inherits(Jn,z0);W0.ripemd160=Jn;Jn.blockSize=512;Jn.outSize=160;Jn.hmacStrength=192;Jn.padLength=64;Jn.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,f=r,x=s,I=o,_=0;_<80;_++){var v=H0(_o(q0(a,G0(_,i,r,s),e[bx[_]+t],hx(_)),Tx[_]),o);a=o,o=s,s=_o(r,10),r=i,i=v,v=H0(_o(q0(l,G0(79-_,p,f,x),e[gx[_]+t],xx(_)),vx[_]),I),l=I,I=x,x=_o(f,10),f=p,p=v}v=Zr(this.h[1],r,x),this.h[1]=Zr(this.h[2],s,I),this.h[2]=Zr(this.h[3],o,l),this.h[3]=Zr(this.h[4],a,p),this.h[4]=Zr(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 G0(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 hx(n){return n<=15?0:n<=31?1518500249:n<=47?1859775393:n<=63?2400959708:2840853838}function xx(n){return n<=15?1352829926:n<=31?1548603684:n<=47?1836072691:n<=63?2053994217:0}var bx=[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],gx=[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],Tx=[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],vx=[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 $0=ae((L3,J0)=>{"use strict";var wx=An(),_x=ir();function lr(n,e,t){if(!(this instanceof lr))return new lr(n,e,t);this.Hash=n,this.blockSize=n.blockSize/8,this.outSize=n.outSize/8,this.inner=null,this.outer=null,this._init(wx.toArray(e,t))}J0.exports=lr;lr.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),_x(e.length<=this.blockSize);for(var t=e.length;t{var Rt=Q0;Rt.utils=An();Rt.common=rr();Rt.sha=j0();Rt.ripemd=K0();Rt.hmac=$0();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 xl=ae((hl,Af)=>{"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&&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],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],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=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,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,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,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 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=a(_,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=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 I={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"?Mf.exports=I:typeof define=="function"&&define.amd?define(I):n&&(n.scrypt&&(n._scrypt=n.scrypt),n.scrypt=I)})(wl)});var Xf=ae((M4,Yf)=>{"use strict";var Ko="qpzry9x8gf2tvdw0s3jn54khce6mua7l",Ml={};for(ds=0;ds>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 $f(n){for(var e=1,t=0;t126)return"Invalid prefix ("+n+")";e=gr(e)^a>>5}for(e=gr(e),t=0;tt)throw new TypeError("Exceeds length limit");n=n.toLowerCase();var a=$f(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=gr(a)^s,i+=Ko.charAt(s)}for(r=0;r<6;++r)a=gr(a);for(a^=1,r=0;r<6;++r){var o=a>>(5-r)*5&31;i+=Ko.charAt(o)}return i}function Qf(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=$f(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 o5(){var n=Qf.apply(null,arguments);if(typeof n=="object")return n}function u5(n){var e=Qf.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function Jo(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 ep=="object"&&typeof tp<"u"?tp.exports=e():typeof define=="function"&&define.amd?define(e):(n=typeof globalThis<"u"?globalThis:n||self,n.fetchRetry=e())})(ep,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,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(I,_){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)I(U);else if(typeof x=="function")try{return Promise.resolve(x(L,null,U)).then(function(H){H?S(L,null,U):I(U)}).catch(_)}catch(H){_(H)}else L=0}function t(a){this.name="ArgumentError",this.message=a}return n})});var np=ae(mu=>{"use strict";Object.defineProperty(mu,"__esModule",{value:!0});mu.$dictionary=void 0;mu.$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 Ps=ae((OA,ym)=>{ym.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}});var ip=ae(Ua=>{var Ee=Ps(),ap=()=>[{type:Ee.RANGE,from:48,to:57}],fm=()=>[{type:Ee.CHAR,value:95},{type:Ee.RANGE,from:97,to:122},{type:Ee.RANGE,from:65,to:90}].concat(ap()),cm=()=>[{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}],X5=()=>[{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:fm(),not:!1});Ua.notWords=()=>({type:Ee.SET,set:fm(),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:cm(),not:!1});Ua.notWhitespace=()=>({type:Ee.SET,set:cm(),not:!0});Ua.anyChar=()=>({type:Ee.SET,set:X5(),not:!0})});var hm=ae(Ns=>{var mm=Ps(),Rr=ip(),Z5="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?",eb={0:0,t:9,n:10,v:11,f:12,r:13};Ns.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 f=a?8:r?parseInt(r,16):s?parseInt(s,16):o?parseInt(o,8):l?Z5.indexOf(l):eb[p],x=String.fromCharCode(f);return/[[\]{}^$.|?*+()]/.test(x)&&(x="\\"+x),x}),n};Ns.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(Rr.words());else if(i[2])t.push(Rr.ints());else if(i[3])t.push(Rr.whitespace());else if(i[4])t.push(Rr.notWords());else if(i[5])t.push(Rr.notInts());else if(i[6])t.push(Rr.notWhitespace());else if(i[7])t.push({type:mm.RANGE,from:(i[8]||i[9]).charCodeAt(0),to:i[10].charCodeAt(0)});else if(r=i[12])t.push({type:mm.CHAR,value:r.charCodeAt(0)});else return[t,a.lastIndex];Ns.error(e,"Unterminated character class")};Ns.error=(n,e)=>{throw new SyntaxError("Invalid regular expression: /"+n+"/: "+e)}});var xm=ae(Ds=>{var hu=Ps();Ds.wordBoundary=()=>({type:hu.POSITION,value:"b"});Ds.nonWordBoundary=()=>({type:hu.POSITION,value:"B"});Ds.begin=()=>({type:hu.POSITION,value:"^"});Ds.end=()=>({type:hu.POSITION,value:"$"})});var bm=ae((UA,rp)=>{var Pr=hm(),bn=Ps(),ki=ip(),xu=xm();rp.exports=n=>{var e=0,t,a,i={type:bn.ROOT,stack:[]},r=i,s=i.stack,o=[],l=O=>{Pr.error(n,`Nothing to repeat at column ${O-1}`)},p=Pr.strToChars(n);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 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}))}};gm.exports=Va});var wm=ae((jA,vm)=>{var bu=bm(),Os=Tm(),Ai=bu.types;vm.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=bu(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 a,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),a=e.options?this._randSelect(e.options):e.stack,i="",s=0,o=a.length;s{"use strict";var tb=Ei&&Ei.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ei,"__esModule",{value:!0});Ei.RandomGenerator=void 0;var nb=tb(wm()),ab;(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 nb.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()}})(ab=Ei.RandomGenerator||(Ei.RandomGenerator={}))});var Fs=ae(Nr=>{"use strict";var ib=Nr&&Nr.__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(Nr,"__esModule",{value:!0});Nr.TypeGuardError=void 0;var rb=function(n){ib(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);Nr.TypeGuardError=rb});var km=ae(gu=>{"use strict";Object.defineProperty(gu,"__esModule",{value:!0});gu.$any=void 0;var sb=function(n){return n!==void 0?JSON.parse(JSON.stringify(n)):void 0};gu.$any=sb});var Am=ae(Tu=>{"use strict";Object.defineProperty(Tu,"__esModule",{value:!0});Tu.$every=void 0;var ob=function(n,e){for(var t=null,a=0;a{"use strict";Object.defineProperty(vu,"__esModule",{value:!0});vu.$guard=void 0;var ub=Fs(),db=function(n){return function(e,t){if(e===!0)throw new ub.TypeGuardError({method:n,path:t.path,expected:t.expected,value:t.value});return!1}};vu.$guard=db});var Mm=ae(wu=>{"use strict";Object.defineProperty(wu,"__esModule",{value:!0});wu.$is_between=void 0;var lb=function(n,e,t){return e<=n&&n<=t};wu.$is_between=lb});var Cm=ae(_u=>{"use strict";Object.defineProperty(_u,"__esModule",{value:!0});_u.$is_custom=void 0;var pb=np(),yb=function(n,e,t,a){var i,r=(i=pb.$dictionary.get(n))===null||i===void 0?void 0:i.get(e);return r===void 0?!0:r(t)(a)};_u.$is_custom=yb});var Im=ae(ku=>{"use strict";Object.defineProperty(ku,"__esModule",{value:!0});ku.$is_date=void 0;var fb=function(n){return cb.test(n)};ku.$is_date=fb;var cb=/^(\d{4})-(\d{2})-(\d{2})$/});var Sm=ae(Au=>{"use strict";Object.defineProperty(Au,"__esModule",{value:!0});Au.$is_datetime=void 0;var mb=function(n){return!isNaN(new Date(n).getTime())};Au.$is_datetime=mb});var Rm=ae(Eu=>{"use strict";Object.defineProperty(Eu,"__esModule",{value:!0});Eu.$is_email=void 0;var hb=function(n){return xb.test(n)};Eu.$is_email=hb;var xb=/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i});var Pm=ae(Mu=>{"use strict";Object.defineProperty(Mu,"__esModule",{value:!0});Mu.$is_ipv4=void 0;var bb=function(n){return gb.test(n)};Mu.$is_ipv4=bb;var gb=/^(?: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 Nm=ae(Cu=>{"use strict";Object.defineProperty(Cu,"__esModule",{value:!0});Cu.$is_ipv6=void 0;var Tb=function(n){return vb.test(n)};Cu.$is_ipv6=Tb;var vb=/^(([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 Dm=ae(Iu=>{"use strict";Object.defineProperty(Iu,"__esModule",{value:!0});Iu.$is_url=void 0;var wb=function(n){return _b.test(n)};Iu.$is_url=wb;var _b=/^[a-zA-Z0-9]+:\/\/(?:www.)?[-a-zA-Z0-9@:%._+~#=]{1,256}.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/});var Om=ae(Su=>{"use strict";Object.defineProperty(Su,"__esModule",{value:!0});Su.$is_uuid=void 0;var kb=function(n){return Ab.test(n)};Su.$is_uuid=kb;var Ab=/^(?:[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 Bm=ae(Ru=>{"use strict";Object.defineProperty(Ru,"__esModule",{value:!0});Ru.$join=void 0;var Eb=function(n){return Mb(n)?".".concat(n):"[".concat(JSON.stringify(n),"]")};Ru.$join=Eb;var Mb=function(n){return Cb(n)===!1&&/^[a-zA-Z_$][a-zA-Z_$0-9]*$/g.test(n)},Cb=function(n){return Ib.has(n)},Ib=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 Fm=ae(Pu=>{"use strict";Object.defineProperty(Pu,"__esModule",{value:!0});Pu.$number=void 0;var Sb=Fs(),Rb=function(n){if(isFinite(n)===!1)throw new Sb.TypeGuardError({method:"typia.stringify",expected:"number",value:n,message:"Error on typia.stringify(): infinite or not a number."});return n};Pu.$number=Rb});var Lm=ae(Nu=>{"use strict";Object.defineProperty(Nu,"__esModule",{value:!0});Nu.$report=void 0;var Pb=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}};Nu.$report=Pb});var Um=ae(Du=>{"use strict";Object.defineProperty(Du,"__esModule",{value:!0});Du.$rest=void 0;var Nb=function(n){return n.length===2?"":","+n.substring(1,n.length-1)};Du.$rest=Nb});var Vm=ae(Ou=>{"use strict";Object.defineProperty(Ou,"__esModule",{value:!0});Ou.$string=void 0;var Db=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,'"')};Ou.$string=Db});var jm=ae(Bu=>{"use strict";Object.defineProperty(Bu,"__esModule",{value:!0});Bu.$tail=void 0;var Ob=function(n){return n[n.length-1]===","?n.substring(0,n.length-1):n};Bu.$tail=Ob});var zm=ae(Mi=>{"use strict";var Vt=Mi&&Mi.__assign||function(){return Vt=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 Vt(Vt({},n.is()),{number:Jb.$number,string:Yb.$string,tail:Xb.$tail,rest:Qb.$rest,throws:e(t)})},n.clone=function(t){return Vt(Vt({},n.is()),{throws:e(t),any:Bb.$any})},n.prune=function(t){return Vt(Vt({},n.is()),{throws:e(t)})},n.random=function(){return{generator:Hm.RandomGenerator,pick:Hm.RandomGenerator.pick}};var e=function(t){return function(a){throw new qm.TypeGuardError(Vt(Vt({},a),{method:"typia.".concat(t)}))}}})(Zb=Mi.Namespace||(Mi.Namespace={}))});var Wm=ae(Ls=>{"use strict";Object.defineProperty(Ls,"__esModule",{value:!0});Ls.MapUtil=void 0;var e1;(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}}})(e1=Ls.MapUtil||(Ls.MapUtil={}))});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 Xm=ae(Ym=>{"use strict";Object.defineProperty(Ym,"__esModule",{value:!0})});var e6=ae(Zm=>{"use strict";Object.defineProperty(Zm,"__esModule",{value:!0})});var n6=ae(t6=>{"use strict";Object.defineProperty(t6,"__esModule",{value:!0})});var i6=ae(a6=>{"use strict";Object.defineProperty(a6,"__esModule",{value:!0})});var bp=ae(z=>{"use strict";var t1=z&&z.__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]}),Ci=z&&z.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&t1(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 Dr=np(),Me=zm(),n1=Wm();Ci(Jm(),z);Ci(Qm(),z);Ci(Xm(),z);Ci(e6(),z);Ci(n6(),z);Ci(i6(),z);Ci(Fs(),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 Fu(){re("is")}z.is=Fu;Object.assign(Fu,Me.Namespace.assert("is"));function Lu(){re("validate")}z.validate=Lu;Object.assign(Lu,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(n){var e,t;return n?(t=(e=Dr.$dictionary.get(n))===null||e===void 0?void 0:e.size)!==null&&t!==void 0?t:0:Dr.$dictionary.size},has:function(n){return function(e){var t,a;return(a=(t=Dr.$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=Dr.$dictionary.get(n))===null||t===void 0?void 0:t.get(e)}},insert:function(n){return function(e){return function(t){var a=n1.MapUtil.take(Dr.$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=Dr.$dictionary.get(n))===null||t===void 0?void 0:t.delete(e))!==null&&a!==void 0?a:!1}}};function a1(){re("application")}z.application=a1;function pp(){re("assertParse")}z.assertParse=pp;Object.assign(pp,Me.Namespace.assert("assertParse"));function yp(){re("isParse")}z.isParse=yp;Object.assign(yp,Fu);function fp(){re("validateParse")}z.validateParse=fp;Object.assign(fp,Lu);function cp(){re("stringify")}z.stringify=cp;Object.assign(cp,Me.Namespace.stringify("stringify"));function Uu(){re("assertStringify")}z.assertStringify=Uu;Object.assign(Uu,Me.Namespace.assert("assertStringify"));Object.assign(Uu,Me.Namespace.stringify("assertStringify"));function Vu(){re("isStringify")}z.isStringify=Vu;Object.assign(Vu,Me.Namespace.is());Object.assign(Vu,Me.Namespace.stringify("isStringify"));function ju(){re("validateStringify")}z.validateStringify=ju;Object.assign(ju,Me.Namespace.validate());Object.assign(ju,Me.Namespace.stringify("validateStringify"));function i1(){re("metadata")}z.metadata=i1;function mp(){re("random")}z.random=mp;Object.assign(mp,Me.Namespace.random());function r1(){re("literals")}z.literals=r1;function hp(){re("clone")}z.clone=hp;Object.assign(hp,Me.Namespace.clone("clone"));function Hu(){re("assertClone")}z.assertClone=Hu;Object.assign(Hu,Me.Namespace.assert("assertClone"));Object.assign(Hu,Me.Namespace.clone("assertClone"));function qu(){re("isClone")}z.isClone=qu;Object.assign(qu,Me.Namespace.is());Object.assign(qu,Me.Namespace.clone("isClone"));function Gu(){re("validateClone")}z.validateClone=Gu;Object.assign(Gu,Me.Namespace.validate());Object.assign(Gu,Me.Namespace.clone("validateClone"));function xp(){re("prune")}z.prune=xp;Object.assign(xp,Me.Namespace.prune("prune"));function zu(){re("assertPrune")}z.assertPrune=zu;Object.assign(zu,Me.Namespace.assert("assertPrune"));Object.assign(zu,Me.Namespace.prune("assertPrune"));function Wu(){re("isPrune")}z.isPrune=Wu;Object.assign(Wu,Me.Namespace.is());Object.assign(Wu,Me.Namespace.prune("isPrune"));function Ku(){re("validatePrune")}z.validatePrune=Ku;Object.assign(Ku,Me.Namespace.prune("validatePrune"));Object.assign(Ku,Me.Namespace.validate());function r6(){re("createAssert")}z.createAssert=r6;Object.assign(r6,sp);function s6(){re("createAssertType")}z.createAssertType=s6;Object.assign(s6,op);function o6(){re("createIs")}z.createIs=o6;Object.assign(o6,Fu);function u6(){re("createValidate")}z.createValidate=u6;Object.assign(u6,Lu);function d6(){re("createAssertEquals")}z.createAssertEquals=d6;Object.assign(d6,up);function l6(){re("createEquals")}z.createEquals=l6;Object.assign(l6,dp);function p6(){re("createValidateEquals")}z.createValidateEquals=p6;Object.assign(p6,lp);function y6(){re("createIsParse")}z.createIsParse=y6;Object.assign(y6,yp);function f6(){re("createAssertParse")}z.createAssertParse=f6;Object.assign(f6,pp);function c6(){re("createValidateParse")}z.createValidateParse=c6;Object.assign(c6,fp);function m6(){re("createStringify")}z.createStringify=m6;Object.assign(m6,cp);function h6(){re("createAssertStringify")}z.createAssertStringify=h6;Object.assign(h6,Uu);function x6(){re("createIsStringify")}z.createIsStringify=x6;Object.assign(x6,Vu);function b6(){re("createValidateStringify")}z.createValidateStringify=b6;Object.assign(b6,ju);function g6(){re("createRandom")}z.createRandom=g6;Object.assign(g6,mp);function T6(){re("createClone")}z.createClone=T6;Object.assign(T6,hp);function v6(){re("createAssertClone")}z.createAssertClone=v6;Object.assign(v6,Hu);function w6(){re("createIsClone")}z.createIsClone=w6;Object.assign(w6,qu);function _6(){re("createValidateClone")}z.createValidateClone=_6;Object.assign(_6,Gu);function k6(){re("createPrune")}z.createPrune=k6;Object.assign(k6,xp);function A6(){re("createAssertPrune")}z.createAssertPrune=A6;Object.assign(A6,zu);function E6(){re("createIsPrune")}z.createIsPrune=E6;Object.assign(E6,Wu);function M6(){re("createValidatePrune")}z.createValidatePrune=M6;Object.assign(M6,Ku);function re(n){throw new Error("Error on typia.".concat(n,'(): no transform has been configured. Run "npx typia setup" command.'))}});var I6=ae(Tn=>{"use strict";var C6=Tn&&Tn.__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]}),s1=Tn&&Tn.__setModuleDefault||(Object.create?function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}:function(n,e){n.default=e}),o1=Tn&&Tn.__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)&&C6(e,n,t);return s1(e,n),e},u1=Tn&&Tn.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&C6(e,n,t)};Object.defineProperty(Tn,"__esModule",{value:!0});var d1=o1(bp());Tn.default=d1;u1(bp(),Tn)});var Hl={};qi(Hl,{BaseContract:()=>yr,BigNumber:()=>F,Contract:()=>oe,ContractFactory:()=>hi,FixedNumber:()=>ct,Signer:()=>St,VoidSigner:()=>da,Wallet:()=>on,Wordlist:()=>xn,constants:()=>xt,errors:()=>Wt,getDefaultProvider:()=>ru,logger:()=>Nc,providers:()=>ta,utils:()=>te,version:()=>ou,wordlists:()=>bi});var uy=_n(hd());var Yp="logger/5.7.0";var Xp=!1,Zp=!1,$s={debug:1,default:2,info:2,warning:3,error:4,off:5},ey=$s.default,xd=null;function X6(){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 ty=X6(),bd;(function(n){n.DEBUG="DEBUG",n.INFO="INFO",n.WARNING="WARNING",n.ERROR="ERROR",n.OFF="OFF"})(bd||(bd={}));var Wt;(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"})(Wt||(Wt={}));var ny="0123456789abcdef",E=class{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){let a=e.toLowerCase();$s[a]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(ey>$s[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(Zp)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 f="";for(let x=0;x>4],f+=ny[p[x]&15];i.push(l+"=Uint8Array(0x"+f+")")}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 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(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"),ty&&this.throwError("platform missing String.prototype.normalize",E.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:ty})}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(Yp)),xd}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"})}Zp=!!e,Xp=!!t}static setLogLevel(e){let t=$s[e.toLowerCase()];if(t==null){E.globalLogger().warn("invalid log level - "+e);return}ey=t}static from(e){return new E(e)}};E.errors=Wt;E.levels=bd;var ay="bytes/5.7.0";var wt=new E(ay);function ry(n){return!!n.toHexString}function Gi(n){return n.slice||(n.slice=function(){let e=Array.prototype.slice.call(arguments);return Gi(new Uint8Array(Array.prototype.slice.apply(n,e)))}),n}function ia(n){return ie(n)&&!(n.length%2)||un(n)}function iy(n){return typeof n=="number"&&n==n&&n%1===0}function un(n){if(n==null)return!1;if(n.constructor===Uint8Array)return!0;if(typeof n=="string"||!iy(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"){wt.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),Gi(new Uint8Array(t))}if(e.allowMissingPrefix&&typeof n=="string"&&n.substring(0,2)!=="0x"&&(n="0x"+n),ry(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":wt.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),Gi(a)}function Zt(n){let e=j(n);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(n,e-n.length),Gi(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"){wt.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),ry(n))return n.toHexString();if(ie(n))return n.length%2&&(e.hexPad==="left"?n="0x0"+n.substring(2):e.hexPad==="right"?n+="0":wt.throwArgumentError("hex data is odd-length","value",n)),n.toLowerCase();if(un(n)){let t="0x";for(let a=0;a>4]+gd[i&15]}return t}return wt.throwArgumentError("invalid hexlify value","value",n)}function Nt(n){if(typeof n!="string")n=W(n);else if(!ie(n)||n.length%2)return null;return(n.length-2)/2}function Ce(n,e,t){return typeof n!="string"?n=W(n):(!ie(n)||n.length%2)&&wt.throwArgumentError("invalid hexData","value",n),e=2+2*e,t!=null?"0x"+n.substring(e,2+2*t):"0x"+n.substring(e)}function _t(n){let e="0x";return n.forEach(t=>{e+=W(t).substring(2)}),e}function Un(n){let e=Td(W(n,{hexPad:"left"}));return e==="0x"?"0x0":e}function Td(n){typeof n!="string"&&(n=W(n)),ie(n)||wt.throwArgumentError("invalid hex string","value",n),n=n.substring(2);let e=0;for(;e2*e+2&&wt.throwArgumentError("value out of range","value",arguments[1]);n.length<2*e+2;)n="0x0"+n.substring(2);return n}function Vn(n){let e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(ia(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]):wt.throwArgumentError("invalid signature string","signature",n),e.v<27&&(e.v===0||e.v===1?e.v+=27:wt.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=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",n),i[0]&=127;let s=W(i);e.s==null?e.s=s:e.s!==s&&wt.throwArgumentError("signature v mismatch _vs","signature",n)}if(e.recoveryParam==null)e.v==null?wt.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&&wt.throwArgumentError("signature recoveryParam mismatch v","signature",n)}e.r==null||!ie(e.r)?wt.throwArgumentError("signature missing or invalid r","signature",n):e.r=me(e.r,32),e.s==null||!ie(e.s)?wt.throwArgumentError("signature missing or invalid s","signature",n):e.s=me(e.s,32);let t=j(e.s);t[0]>=128&&wt.throwArgumentError("signature s out of range","signature",n),e.recoveryParam&&(t[0]|=128);let a=W(t);e._vs&&(ie(e._vs)||wt.throwArgumentError("signature invalid _vs","signature",n),e._vs=me(e._vs,32)),e._vs==null?e._vs=a:e._vs!==a&&wt.throwArgumentError("signature _vs mismatch v and s","signature",n)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function Ur(n){return n=Vn(n),W(ye([n.r,n.s,n.recoveryParam?"0x1c":"0x1b"]))}var Qs="bignumber/5.7.0";var Vr=uy.default.BN,ra=new E(Qs),vd={},sy=9007199254740991;function dy(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"||un(n))}var oy=!1,F=class{constructor(e,t){e!==vd&&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()&&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 ra.throwError("this platform does not support BigInt",E.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?oy||(oy=!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(vd,jr(e)):e.match(/^-?[0-9]+$/)?new F(vd,jr(new Vr(e))):ra.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&dn("underflow","BigNumber.from",e),(e>=sy||e<=-sy)&&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 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 ra.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]==="-"&&ra.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 Kt(n){return F.from(jr(n))}function be(n){let e=F.from(n).toHexString();return e[0]==="-"?new Vr("-"+e.substring(3),16):new Vr(e.substring(2),16)}function dn(n,e,t){let a={fault:n,operation:e};return t!=null&&(a.value=t),ra.throwError(n,E.errors.NUMERIC_FAULT,a)}function wd(n){return new Vr(n,36).toString(16)}function _d(n){return new Vr(n,16).toString(36)}var jt=new E(Qs),Hr={},py=F.from(0),yy=F.from(-1);function fy(n,e,t,a){let i={fault:e,operation:t};return a!==void 0&&(i.value=a),jt.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):jt.throwArgumentError("invalid decimal size","decimals",n)}function zi(n,e){e==null&&(e=0);let t=kd(e);n=F.from(n);let a=n.lt(py);a&&(n=n.mul(yy));let i=n.mod(t).toString();for(;i.length2&&jt.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&&fy("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),a=r("width","number",a),i=r("decimals","number",i)}return a%8&&jt.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",a),i>80&&jt.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new sa(Hr,t,a,i)}},ct=class{constructor(e,t,a,i){e!==Hr&&jt.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&&jt.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);let t=ln(this._value,this.format.decimals),a=ln(e._value,e.format.decimals);return ct.fromValue(t.add(a),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);let t=ln(this._value,this.format.decimals),a=ln(e._value,e.format.decimals);return ct.fromValue(t.sub(a),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);let t=ln(this._value,this.format.decimals),a=ln(e._value,e.format.decimals);return ct.fromValue(t.mul(a).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);let t=ln(this._value,this.format.decimals),a=ln(e._value,e.format.decimals);return ct.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=ct.from(e[0],this.format),a=!e[1].match(/^(0*)$/);return this.isNegative()&&a&&(t=t.subUnsafe(ly.toFormat(t.format))),t}ceiling(){let e=this.toString().split(".");e.length===1&&e.push("0");let t=ct.from(e[0],this.format),a=!e[1].match(/^(0*)$/);return!this.isNegative()&&a&&(t=t.addUnsafe(ly.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 a=ct.from("1"+qr.substring(0,e),this.format),i=Z6.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&&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,a){return a==null&&t!=null&&!dy(t)&&(a=t,t=null),t==null&&(t=0),a==null&&(a="fixed"),ct.fromString(zi(e,t),sa.from(a))}static fromString(e,t){t==null&&(t="fixed");let a=sa.from(t),i=ln(e,a.decimals);!a.signed&&i.lt(py)&&fy("unsigned value cannot be negative","overflow","value",e);let r=null;a.signed?r=i.toTwos(a.width).toHexString():(r=i.toHexString(),r=me(r,a.width/8));let s=zi(i,a.decimals);return new ct(Hr,r,s,a)}static fromBytes(e,t){t==null&&(t="fixed");let a=sa.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=zi(i,a.decimals);return new ct(Hr,r,s,a)}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(a){if(a.code!==E.errors.INVALID_ARGUMENT)throw a}return jt.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}},ly=ct.from(1),Z6=ct.from("0.5");var cy="properties/5.7.0";var eh=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Ys=new E(cy);function B(n,e,t){Object.defineProperty(n,e,{enumerable:!0,value:t,writable:!1})}function ht(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 Ie(n){return eh(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 Wi(n,e){(!n||typeof n!="object")&&Ys.throwArgumentError("invalid object","object",n),Object.keys(n).forEach(t=>{e[t]||Ys.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 th={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function my(n){if(n==null||th[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;tmt(e)));if(typeof n=="object"){let e={};for(let t in n){let a=n[t];a!==void 0&&B(e,t,mt(a))}return e}return Ys.throwArgumentError(`Cannot deepCopy ${typeof n}`,"object",n)}function mt(n){return nh(n)}var en=class{constructor(e){for(let t in e)this[t]=mt(e[t])}};var jn="abi/5.7.0";var Te=new E(jn),oi={},hy={calldata:!0,memory:!0,storage:!0},ah={calldata:!0,memory:!0};function Xs(n,e){if(n==="bytes"||n==="string"){if(hy[e])return!0}else if(n==="address"){if(e==="payable")return!0}else if((n.indexOf("[")>=0||n==="tuple")&&ah[e])return!0;return(hy[e]||e==="payable")&&Te.throwArgumentError("invalid modifier","name",e),!1}function ih(n,e){let t=n;function a(o){Te.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!==ge.sighash&&(t+=this.type),t+="("+this.components.map(a=>a.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(oi,{name:e.name||null,type:Ki(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(yt.fromObject):null})}static fromString(e,t){function a(i){return yt.fromObject({name:i.name,type:i.type,indexed:i.indexed,components:i.components})}return a(ih(e,!!t))}static isParamType(e){return!!(e!=null&&e._isParamType)}};function Gr(n,e){return oh(n).map(t=>yt.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()"}),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 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(a=>JSON.parse(a.format(e)))});let t="";return e!==ge.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map(a=>a.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:zr(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(yt.fromObject):[],type:"event"};return new Ht(oi,t)}static fromString(e){let t=e.match(Wr);t||Te.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:Te.warn("unknown modifier: "+i)}}),Ht.fromObject({name:t[1].trim(),anonymous:a,inputs:Gr(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}};function by(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 gy(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 Ty(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 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(a=>JSON.parse(a.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(a=>a.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=Ty(e);t.constant&&Te.throwArgumentError("constructor cannot be constant","value",e);let a={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(oi,a)}static fromString(e){let t={type:"constructor"};e=by(e,t);let a=e.match(Wr);return(!a||a[1].trim()!=="constructor")&&Te.throwArgumentError("invalid constructor string","value",e),t.inputs=Gr(a[2].trim(),!1),gy(a[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(a=>JSON.parse(a.format(e))),outputs:this.outputs.map(a=>JSON.parse(a.format(e)))});let t="";return e!==ge.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map(a=>a.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(a=>a.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=Ty(e),a={type:e.type,name:zr(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(oi,a)}static fromString(e){let t={type:"function"};e=by(e,t);let a=e.split(" returns ");a.length>2&&Te.throwArgumentError("invalid function string","value",e);let i=a[0].match(Wr);if(i||Te.throwArgumentError("invalid function signature","value",e),t.name=i[1].trim(),t.name&&zr(t.name),t.inputs=Gr(i[2],!1),gy(i[3].trim(),t),a.length>1){let r=a[1].match(Wr);(r[1].trim()!=""||r[3].trim()!="")&&Te.throwArgumentError("unexpected tokens","value",e),t.outputs=Gr(r[2],!1)}else t.outputs=[];return Ot.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}};function xy(n){let e=n.format();return(e==="Error(string)"||e==="Panic(uint256)")&&Te.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",n),n}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(a=>JSON.parse(a.format(e)))});let t="";return e!==ge.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map(a=>a.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:zr(e.name),inputs:e.inputs?e.inputs.map(yt.fromObject):[]};return xy(new tn(oi,t))}static fromString(e){let t={type:"error"},a=e.match(Wr);return a||Te.throwArgumentError("invalid error signature","value",e),t.name=a[1].trim(),t.name&&zr(t.name),t.inputs=Gr(a[2],!1),xy(tn.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}};function Ki(n){return n.match(/^uint($|[^1-9])/)?n="uint256"+n.substring(4):n.match(/^int($|[^1-9])/)&&(n="int256"+n.substring(3)),n}var sh=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function zr(n){return(!n||!n.match(sh))&&Te.throwArgumentError(`invalid identifier "${n}"`,"value",n),n}var Wr=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function oh(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=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,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):di.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 di(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 wy=_n(vy());function fe(n){return"0x"+wy.default.keccak_256(j(n))}var to={};qi(to,{decode:()=>Kr,encode:()=>oa});var _y="rlp/5.7.0";var Hn=new E(_y);function ky(n){let e=[];for(;n;)e.unshift(n&255),n>>=8;return e}function Ay(n,e,t){let a=0;for(let i=0;ie+1+a&&Hn.throwError("child data too short",E.errors.BUFFER_OVERRUN,{})}return{consumed:1+a,result:i}}function Cy(n,e){if(n.length===0&&Hn.throwError("data too short",E.errors.BUFFER_OVERRUN,{}),n[e]>=248){let t=n[e]-247;e+1+t>n.length&&Hn.throwError("data short segment too short",E.errors.BUFFER_OVERRUN,{});let a=Ay(n,e+1,t);return e+1+t+a>n.length&&Hn.throwError("data long segment too short",E.errors.BUFFER_OVERRUN,{}),Ey(n,e,e+1+t,t+a)}else if(n[e]>=192){let t=n[e]-192;return e+1+t>n.length&&Hn.throwError("data array too short",E.errors.BUFFER_OVERRUN,{}),Ey(n,e,e+1,t)}else if(n[e]>=184){let t=n[e]-183;e+1+t>n.length&&Hn.throwError("data array too short",E.errors.BUFFER_OVERRUN,{});let a=Ay(n,e+1,t);e+1+t+a>n.length&&Hn.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&&Hn.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 Kr(n){let e=j(n),t=Cy(e,0);return t.consumed!==e.length&&Hn.throwArgumentError("invalid rlp data","data",n),t.result}var Iy="address/5.7.0";var Ca=new E(Iy);function Sy(n){ie(n,20)||Ca.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 uh=9007199254740991;function dh(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 Ry=Math.floor(dh(uh));function Py(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>=Ry;){let a=e.substring(0,Ry);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 ce(n){let e=null;if(typeof n!="string"&&Ca.throwArgumentError("invalid address","address",n),n.match(/^(0x)?[0-9a-fA-F]{40}$/))n.substring(0,2)!=="0x"&&(n="0x"+n),e=Sy(n),n.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==n&&Ca.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)!==Py(n)&&Ca.throwArgumentError("bad icap checksum","address",n),e=wd(n.substring(4));e.length<40;)e="0"+e;e=Sy("0x"+e)}else Ca.throwArgumentError("invalid address","address",n);return e}function Ny(n){try{return ce(n),!0}catch{}return!1}function Dy(n){let e=_d(ce(n).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+Py("XE00"+e)+e}function li(n){let e=null;try{e=ce(n.from)}catch{Ca.throwArgumentError("missing from address","transaction",n)}let t=Zt(j(F.from(n.nonce).toHexString()));return ce(Ce(fe(oa([e,t])),12))}function Oy(n,e,t){return Nt(e)!==32&&Ca.throwArgumentError("salt must be 32 bytes","salt",e),Nt(t)!==32&&Ca.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",t),ce(Ce(fe(ye(["0xff",ce(n),e,t])),12))}var no=class extends kt{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=ce(t)}catch(a){this._throwError(a.message,t)}return e.writeValue(t)}decode(e){return ce(me(e.readValue().toHexString(),20))}};var ao=class extends kt{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 $i=new E(jn);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 f=p.localName;return f||$i.throwError("cannot encode object for signature with missing names",E.errors.INVALID_ARGUMENT,{argument:"values",coder:p,value:t}),l[f]&&$i.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 $i.throwArgumentError("invalid tuple value","tuple",t);e.length!==a.length&&$i.throwArgumentError("types/value length mismatch","tuple",t);let i=new ui(n.wordSize),r=new ui(n.wordSize),s=[];e.forEach((l,p)=>{let f=a[p];if(l.dynamic){let x=r.length;l.encode(r,f);let I=i.writeUpdatableValue();s.push(_=>{I(_+x)})}else l.encode(i,f)}),s.forEach(l=>{l(i.length)});let o=n.appendWriter(i);return o+=n.appendWriter(r),o}function Cd(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 io=class extends kt{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&&$i.throwError("insufficient data length",E.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let a=[];for(let i=0;ilo,EtherSymbol:()=>Vy,HashZero:()=>Yi,MaxInt256:()=>Uy,MaxUint256:()=>fo,MinInt256:()=>Ly,NegativeOne:()=>po,One:()=>yo,Two:()=>By,WeiPerEther:()=>Fy,Zero:()=>Qi});var lo="0x0000000000000000000000000000000000000000";var po=F.from(-1),Qi=F.from(0),yo=F.from(1),By=F.from(2),Fy=F.from("1000000000000000000"),fo=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),Ly=F.from("-0x8000000000000000000000000000000000000000000000000000000000000000"),Uy=F.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");var Yi="0x0000000000000000000000000000000000000000000000000000000000000000";var Vy="\u039E";var co=class extends kt{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=fo.mask(e.wordSize*8);if(this.signed){let r=i.mask(this.size*8-1);(a.gt(r)||a.lt(r.add(yo).mul(po)))&&this._throwError("value out-of-bounds",t)}else(a.lt(Qi)||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 jy="strings/5.7.0";var Hy=new E(jy),Gt;(function(n){n.current="",n.NFC="NFC",n.NFD="NFD",n.NFKC="NFKC",n.NFKD="NFKD"})(Gt||(Gt={}));var Bt;(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"})(Bt||(Bt={}));function lh(n,e,t,a,i){return Hy.throwArgumentError(`invalid codepoint at offset ${e}; ${n}`,"bytes",t)}function qy(n,e,t,a,i){if(n===Bt.BAD_PREFIX||n===Bt.UNEXPECTED_CONTINUE){let r=0;for(let s=e+1;s>6===2;s++)r++;return r}return n===Bt.OVERRUN?t.length-e-1:0}function ph(n,e,t,a,i){return n===Bt.OVERLONG?(a.push(i),0):(a.push(65533),qy(n,e,t,a,i))}var mo=Object.freeze({error:lh,ignore:qy,replace:ph});function Sd(n,e){e==null&&(e=mo.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(Bt.UNEXPECTED_CONTINUE,a-1,n,t):a+=e(Bt.BAD_PREFIX,a-1,n,t);continue}if(a-1+r>=n.length){a+=e(Bt.OVERRUN,a-1,n,t);continue}let o=i&(1<<8-r-1)-1;for(let l=0;l1114111){a+=e(Bt.OUT_OF_RANGE,a-1-r,n,t,o);continue}if(o>=55296&&o<=57343){a+=e(Bt.UTF16_SURROGATE,a-1-r,n,t,o);continue}if(o<=s){a+=e(Bt.OVERLONG,a-1-r,n,t,o);continue}t.push(o)}}return t}function ve(n,e=Gt.current){e!=Gt.current&&(Hy.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 Id(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?Id(t):(t-=65536,Id((t>>10&1023)+55296)+Id((t&1023)+56320))}).join("")+'"'}function ho(n){return n.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function Jt(n,e){return ho(Sd(n,e))}function Ia(n,e=Gt.current){return Sd(ve(n,e))}function Pd(n){let e=ve(n);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return W(ye([e,Yi]).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 Jt(e.slice(0,t))}function yh(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 Gy(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 fh=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"),ch="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(n=>parseInt(n,16)),mh=[{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}],hh=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"),xh=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"),bh=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",yh),gh=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 Th(n){return n.reduce((e,t)=>(t.forEach(a=>{e.push(a)}),e),[])}function vh(n){return!!Od(n,fh)}function wh(n){let e=Od(n,mh);if(e)return[n+e.s];let t=hh[n];if(t)return t;let a=xh[n];if(a)return[n+a[0]];let i=bh[n];return i||null}function _h(n){return!!Od(n,gh)}function Bd(n){if(n.match(/^[a-z0-9-]*$/i)&&n.length<=59)return n.toLowerCase();let e=Ia(n);e=Th(e.map(a=>{if(ch.indexOf(a)>=0)return[];if(a>=65024&&a<=65039)return[];let i=wh(a);return i||[a]})),e=Ia(ho(e),Gt.NFKC),e.forEach(a=>{if(_h(a))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(a=>{if(vh(a))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 Jr{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 kt{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,Cd(e,this.coders))}};var bo=new E(jn),kh=new RegExp(/^bytes([0-9]*)$/),Ah=new RegExp(/^(u?int)([0-9]*)$/),Xi=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 pi((e.components||[]).map(a=>this._getCoder(a)),e.name);case"":return new uo(e.name)}let t=e.type.match(Ah);if(t){let a=parseInt(t[2]||"256");return(a===0||a>256||a%8!==0)&&bo.throwArgumentError("invalid "+t[1]+" bit length","param",e),new co(a/8,t[1]==="int",e.name)}if(t=e.type.match(kh),t){let a=parseInt(t[1]);return(a===0||a>32)&&bo.throwArgumentError("invalid bytes length","param",e),new oo(a,e.name)}return bo.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(yt.from(i)));return new pi(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 a=e.map(s=>this._getCoder(yt.from(s))),i=new pi(a,"_"),r=this._getWriter();return i.encode(r,t),r.data}decode(e,t,a){let i=e.map(s=>this._getCoder(yt.from(s)));return new pi(i,"_").decode(this._getReader(j(t),a))}},$r=new Xi;function nn(n){return fe(ve(n))}var go="hash/5.7.0";var Fd={};qi(Fd,{decode:()=>Zi,encode:()=>er});function Zi(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 Eh(n){let e={};for(let t=0;t>--l&1}let x=31,I=Math.pow(2,x),_=I>>>1,v=_>>1,S=I-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=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 Ch(n){let e=0;return()=>n[e++]}function Ky(n){return Ch(Mh(n))}function Ih(n){return n&1?~n>>1:n>>1}function Sh(n,e){let t=Array(n);for(let a=0;ae[s]):t}function Jy(n){let e=[];for(;;){let t=n();if(t==0)break;e.push(Nh(t,n))}for(;;){let t=n()-1;if(t<0)break;e.push(Dh(t,n))}return Eh(Wy(e))}function Ph(n){let e=[];for(;;){let t=n();if(t==0)break;e.push(t)}return e}function $y(n,e,t){let a=Array(n).fill(void 0).map(()=>[]);for(let i=0;ia[s].push(r));return a}function Nh(n,e){let t=1+e(),a=e(),i=Ph(e),r=$y(i.length,1+n,e);return Wy(r.map((s,o)=>{let l=s[0],p=s.slice(1);return Array(i[o]).fill(void 0).map((f,x)=>{let I=x*a;return[l+x*t,p.map(_=>_+I)]})}))}function Dh(n,e){let t=1+e();return $y(t,1+n,e).map(i=>[i[0],i.slice(1)])}function Qy(n){let e=Qr(n).sort((a,i)=>a-i);return t();function t(){let a=[];for(;;){let p=Qr(n,e);if(p.length==0)break;a.push({set:new Set(p),node:t()})}a.sort((p,f)=>f.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 Yy(){return Ky(Zi("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(),Oh=new Set(Qr(To)),Bh=new Set(Qr(To)),Fh=Jy(To),Lh=Qy(To),Xy=45,Zy=95;function e0(n){return Ia(n)}function Uh(n){return n.filter(e=>e!=65039)}function t0(n){for(let e of n.split(".")){let t=e0(e);try{for(let a=t.lastIndexOf(Zy)-1;a>=0;a--)if(t[a]!==Zy)throw new Error("underscore only allowed at start");if(t.length>=4&&t.every(a=>a<128)&&t[2]===Xy&&t[3]===Xy)throw new Error("invalid label extension")}catch(a){throw new Error(`Invalid label "${e}": ${a.message}`)}}return n}function n0(n){return t0(Vh(n,Uh))}function Vh(n,e){let t=e0(n).reverse(),a=[];for(;t.length;){let i=Hh(t);if(i){a.push(...e(i));continue}let r=t.pop();if(Oh.has(r)){a.push(r);continue}if(Bh.has(r))continue;let s=Fh[r];if(s){a.push(...s);continue}throw new Error(`Disallowed codepoint: 0x${r.toString(16).toUpperCase()}`)}return t0(jh(String.fromCodePoint(...a)))}function jh(n){return n.normalize("NFC")}function Hh(n,e){var t;let a=Lh,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 qh=new E(go),i0=new Uint8Array(32);i0.fill(0);function a0(n){if(n.length===0)throw new Error("invalid ENS name; empty component");return n}function Ld(n){let e=ve(n0(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(a0(e.slice(a))),t}function Ud(n){try{return Ld(n).length!==0}catch{}return!1}function Sa(n){typeof n!="string"&&qh.throwArgumentError("invalid ENS name; not a string","name",n);let e=i0,t=Ld(n);for(;t.length;)e=fe(ye([e,fe(t.pop())]));return W(e)}function Yr(n){return W(ye(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 r0=`Ethereum Signed Message: +`;function tr(n){return typeof n=="string"&&(n=ve(n)),fe(ye([ve(r0),ve(String(n.length)),n]))}var Gh=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},bt=new E(go),d0=new Uint8Array(32);d0.fill(0);var zh=F.from(-1),l0=F.from(0),p0=F.from(1),Wh=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function Kh(n){let e=j(n),t=e.length%32;return t?_t([e,d0.slice(t)]):W(e)}var Jh=me(p0.toHexString(),32),$h=me(l0.toHexString(),32),s0={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Vd=["name","version","chainId","verifyingContract","salt"];function o0(n){return function(e){return typeof e!="string"&&bt.throwArgumentError(`invalid domain value for ${JSON.stringify(n)}`,`domain.${n}`,e),e}}var Qh={name:o0("name"),version:o0("version"),chainId:function(n){try{return F.from(n).toString()}catch{}return bt.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",n)},verifyingContract:function(n){try{return ce(n).toLowerCase()}catch{}return bt.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 bt.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))&&bt.throwArgumentError("invalid numeric width","type",n);let i=Wh.mask(t?a-1:a),r=t?i.add(p0).mul(zh):l0;return function(s){let o=F.from(s);return(o.lt(r)||o.gt(i))&&bt.throwArgumentError(`value out-of-bounds for ${n}`,"value",s),me(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))&&bt.throwArgumentError("invalid bytes width","type",n),function(a){return j(a).length!==t&&bt.throwArgumentError(`invalid length for ${n}`,"value",a),Kh(a)}}}switch(n){case"address":return function(e){return me(ce(e),32)};case"bool":return function(e){return e?Jh:$h};case"bytes":return function(e){return fe(e)};case"string":return function(e){return nn(e)}}return null}function u0(n,e){return`${n}(${e.map(({name:t,type:a})=>a+" "+t).join(",")})`}var gt=class{constructor(e){B(this,"types",Object.freeze(mt(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]&&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),!jd(f)&&(a[f]||bt.throwArgumentError(`unknown type ${JSON.stringify(f)}`,"types",e),a[f].push(o),t[o][f]=!0)})}let r=Object.keys(a).filter(o=>a[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=>{!a[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]=u0(o,e[o])+l.map(p=>u0(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&&bt.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",o);let l=o.map(r);return this._types[i]&&(l=l.map(fe)),fe(_t(l))}}let a=this.types[e];if(a){let i=nn(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),_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 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&&bt.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),{}):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,a){return gt.from(t).hashStruct(e,a)}static hashDomain(e){let t=[];for(let a in e){let i=s0[a];i||bt.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)),gt.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,a){return _t(["0x1901",gt.hashDomain(e),gt.from(t).hash(a)])}static hash(e,t,a){return fe(gt.encode(e,t,a))}static resolveNames(e,t,a,i){return Gh(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(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){gt.hashDomain(e);let i={},r=[];Vd.forEach(l=>{let p=e[l];p!=null&&(i[l]=Qh[l](p),r.push({name:l,type:s0[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(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"&&bt.throwArgumentError("invalid string","value",p),p}return bt.throwArgumentError("unsupported type","type",l)})}}};var Tt=new E(jn);var nr=class extends en{},ar=class extends en{},Hd=class extends en{},ua=class extends en{static isIndexed(e){return!!(e&&e._isIndexed)}},Yh={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function y0(n,e){let t=new Error(`deferred error during ABI decoding triggered accessing ${n}`);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(a=>qt.from(a)).filter(a=>a!=null)),B(this,"_abiCoder",ht(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){Tt.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]){Tt.warn("duplicate definition - "+r);return}i[r]=a}),this.deploy||B(this,"deploy",Dt.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(a=>a.format(e));return e===ge.json?JSON.stringify(t.map(a=>JSON.parse(a))):t}static getAbiCoder(){return $r}static getAddress(e){return ce(e)}static getSighash(e){return Ce(nn(e.format()),0,4)}static getEventTopic(e){return nn(e.format())}getFunction(e){if(ie(e)){for(let a in this.functions)if(e===this.getSighash(a))return this.functions[a];Tt.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?Tt.throwArgumentError("no matching function","name",a):i.length>1&&Tt.throwArgumentError("multiple matching functions","name",a),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 a=e.toLowerCase();for(let i in this.events)if(a===this.getEventTopic(i))return this.events[i];Tt.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?Tt.throwArgumentError("no matching event","name",a):i.length>1&&Tt.throwArgumentError("multiple matching events","name",a),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 a=ht(this.constructor,"getSighash");for(let i in this.errors){let r=this.errors[i];if(e===a(r))return this.errors[i]}Tt.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?Tt.throwArgumentError("no matching error","name",a):i.length>1&&Tt.throwArgumentError("multiple matching errors","name",a),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 a=j(t);return W(a.slice(0,4))!==this.getSighash(e)&&Tt.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(ye([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)&&Tt.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(ye([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)),f=Yh[p];if(f)s=this._abiCoder.decode(f.inputs,a.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,a.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 a=[];e.anonymous||a.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&&Tt.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"?Tt.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&&Tt.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(nn(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 I=this.getEventTopic(e);(!ie(a[0],32)||a[0].toLowerCase()!==I)&&Tt.throwError("fragment/topic mismatch",E.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:I,value:a[0]}),a=a.slice(1)}let i=[],r=[],s=[];e.inputs.forEach((I,_)=>{I.indexed?I.type==="string"||I.type==="bytes"||I.baseType==="tuple"||I.baseType==="array"?(i.push(yt.fromObject({type:"bytes32",name:I.name})),s.push(!0)):(i.push(I),s.push(!1)):(r.push(I),s.push(!1))});let o=a!=null?this._abiCoder.decode(i,ye(a)):null,l=this._abiCoder.decode(r,t,!0),p=[],f=0,x=0;e.inputs.forEach((I,_)=>{if(I.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(I.name&&p[I.name]==null){let v=p[_];v instanceof Error?Object.defineProperty(p,I.name,{enumerable:!0,get:()=>{throw y0(`property ${JSON.stringify(I.name)}`,v)}}):p[I.name]=v}});for(let I=0;I{throw y0(`index ${I}`,_)}})}return Object.freeze(p)}parseTransaction(e){let t=this.getFunction(e.data.substring(0,10).toLowerCase());return t?new ar({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 nr({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 f0="abstract-provider/5.7.0";var Xh=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Zh=new E(f0),vo=class extends en{static isForkEvent(e){return!!(e&&e._isForkEvent)}};var $t=class{constructor(){Zh.checkAbstract(new.target,$t),B(this,"_isProvider",!0)}getFeeData(){return Xh(this,void 0,void 0,function*(){let{block:e,gasPrice:t}=yield Ie({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 c0="abstract-signer/5.7.0";var kn=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},pn=new E(c0),e2=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],t2=[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 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 a=yield Ie(this.checkTransaction(e));return yield this.provider.call(a,t)})}sendTransaction(e){return kn(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 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 a in e)e2.indexOf(a)===-1&&pn.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()&&pn.throwArgumentError("from address mismatch","transaction",e),a[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&&pn.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)?pn.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(t.type===0||t.type===1)&&a&&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?(a&&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(t2.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 Ie(t)})}_checkProvider(e){this.provider||pn.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(()=>{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,a){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new da(this.address,e)}};var pe=_n(hd()),$n=_n(Xd());function pr(n,e,t){return t={path:e,exports:{},require:function(a,i){return kx(a,i??t.path)}},n(t,t.exports),t.exports}function kx(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var nl=X0;function X0(n,e){if(!n)throw new Error(e||"Assertion failed")}X0.equal=function(e,t,a){if(e!=t)throw new Error(a||"Assertion failed: "+e+" != "+t)};var Cn=pr(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,I=f&255;x?l.push(x,I):l.push(I)}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(I>>1)-1?S=(I>>1)-L:S=L,_.isubn(S)):S=0,x[v]=S,_.iushrn(1)}return x}t.getNAF=a;function i(l,p){var f=[[],[]];l=l.clone(),p=p.clone();for(var x=0,I=0,_;l.cmpn(-x)>0||p.cmpn(-I)>0;){var v=l.andln(3)+x&3,S=p.andln(3)+I&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)+I&7,(_===3||_===5)&&v===2?O=-S:O=S),f[1].push(O),2*x===L+1&&(x=1-x),2*I===O+1&&(I=1-I),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,Ax=an.getJSF,Mo=an.assert;function Da(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 fi=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 a=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),I=r;I>0;I--){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,a,i,r){var s=this._wnafT1,o=this._wnafT2,l=this._wnafT3,p=0,f,x,I;for(f=0;f=1;f-=2){var v=f-1,S=f;if(s[v]!==1||s[S]!==1){l[v]=Eo(a[v],s[v],this._bitLength),l[S]=Eo(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=Ax(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;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?I=o[x][R-1>>1]:R<0&&(I=o[x][-R-1>>1].neg()),I.type==="affine"?J=J.mixedAdd(I):J=J.add(I))}}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 a=[this],i=this,r=0;r=0&&(_=p,v=f),x.negative&&(x=x.neg(),I=I.neg()),_.negative&&(_=_.neg(),v=v.neg()),[{a:x,b:I},{a:_,b:v}]};cn.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),f=s.mul(i.b),x=e.sub(o).sub(l),I=p.add(f).neg();return{k1:x,k2:I}};cn.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)};cn.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};cn.prototype._endoWnafMulAdd=function(e,t,a){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 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)};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,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)};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,a){var i=[this,t],r=[e,a];return this.curve.endo?this.curve._endoWnafMulAdd(i,r):this.curve._wnafMulAdd(1,i,r,2)};Mt.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)};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 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};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(n,e,t,a){fi.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(Pt,fi.BasePoint);cn.prototype.jpoint=function(e,t,a){return new Pt(this,e,t,a)};Pt.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)};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(),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 f=l.redSqr(),x=f.redMul(l),I=i.redMul(f),_=p.redSqr().redIAdd(x).redISub(I).redISub(I),v=p.redMul(I.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(),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(),f=p.redMul(o),x=a.redMul(p),I=l.redSqr().redIAdd(f).redISub(x).redISub(x),_=l.redMul(x.redISub(I)).redISub(r.redMul(f)),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 a=this;for(t=0;t=0)return!1;if(a.redIAdd(r),this.x.cmp(a)===0)return!0}};Pt.prototype.inspect=function(){return this.isInfinity()?"":""};Pt.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var ko=pr(function(n,e){"use strict";var t=e;t.base=fi,t.short=Mx,t.mont=null,t.edwards=null}),Ao=pr(function(n,e){"use strict";var t=e,a=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,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:$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(n){if(!(this instanceof Na))return new Na(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=Cn.toArray(n.entropy,n.entropyEnc||"hex"),t=Cn.toArray(n.nonce,n.nonceEnc||"hex"),a=Cn.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 Z0=Na;Na.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};Na.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=Cn.toArray(a,i||"hex"),this._update(a));for(var r=[];r.length"};var Cx=an.assert;function Co(n,e){if(n instanceof Co)return n;this._importDER(n,e)||(Cx(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 Io=Co;function Ix(){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 Y0(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)}Co.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=Y0(t),a=Y0(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),an.encode(s,e)};var Sx=function(){throw new Error("unsupported")},ef=an.assert;function yn(n){if(!(this instanceof yn))return new yn(n);typeof n=="string"&&(ef(Object.prototype.hasOwnProperty.call(Ao,n),"Unknown curve "+n),n=Ao[n]),n instanceof Ao.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 Rx=yn;yn.prototype.keyPair=function(e){return new il(this,e)};yn.prototype.keyFromPrivate=function(e,t){return il.fromPrivate(this,e,t)};yn.prototype.keyFromPublic=function(e,t){return il.fromPublic(this,e,t)};yn.prototype.genKeyPair=function(e){e||(e={});for(var t=new Z0({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||Sx(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)}};yn.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};yn.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 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 I=this.g.mul(x);if(!I.isInfinity()){var _=I.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=(I.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 Io({r:v,s:S,recoveryParam:L})}}}}}};yn.prototype.verify=function(e,t,a,i){e=this._truncateToN(new pe.default(e,16)),a=this.keyFromPublic(a,i),t=new Io(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,a.getPublic(),p),f.isInfinity()?!1:f.eqXToP(r)):(f=this.g.mulAdd(l,a.getPublic(),p),f.isInfinity()?!1:f.getX().umod(this.n).cmp(r)===0)};yn.prototype.recoverPubKey=function(n,e,t,a){ef((3&t)===t,"The recovery param is more than two bits"),e=new Io(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 f=e.r.invm(i),x=i.sub(r).mul(f).umod(i),I=o.mul(f).umod(i);return this.g.mulAdd(x,s,I)};yn.prototype.getKeyRecoveryParam=function(n,e,t,a){if(e=new Io(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 Px=pr(function(n,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=Rx,t.eddsa=null}),tf=Px.ec;var nf="signing-key/5.7.0";var sl=new E(nf),rl=null;function Qn(){return rl||(rl=new tf("secp256k1")),rl}var mn=class{constructor(e){B(this,"curve","secp256k1"),B(this,"privateKey",W(e)),Nt(this.privateKey)!==32&&sl.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)),a=Qn().keyFromPublic(j(e));return"0x"+t.pub.add(a.pub).encodeCompressed("hex")}signDigest(e){let t=Qn().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 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)),a=Qn().keyFromPublic(j(es(e)));return me("0x"+t.derive(a.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}};function So(n,e){let t=Vn(e),a={r:j(t.r),s:j(t.s)};return"0x"+Qn().recoverPubKey(j(n),a,t.recoveryParam).encode("hex",!1)}function es(n,e){let t=j(n);if(t.length===32){let a=new mn(t);return e?"0x"+Qn().keyFromPrivate(t).getPublic(!0,"hex"):a.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 sl.throwArgumentError("invalid public or private key","key","[REDACTED]")}var af="transactions/5.7.0";var Ut=new E(af),Ro;(function(n){n[n.legacy=0]="legacy",n[n.eip2930=1]="eip2930",n[n.eip1559=2]="eip1559"})(Ro||(Ro={}));function ul(n){return n==="0x"?null:ce(n)}function Lt(n){return n==="0x"?Qi:F.from(n)}var Nx=[{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"}],Dx={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function hn(n){let e=es(n);return ce(Ce(fe(Ce(e,1)),12))}function ci(n,e){return hn(So(j(n),e))}function rn(n,e){let t=Zt(F.from(n).toHexString());return t.length>32&&Ut.throwArgumentError("invalid length for "+e,"transaction:"+e,n),t}function ol(n,e){return{address:ce(n),storageKeys:(e||[]).map((t,a)=>(Nt(t)!==32&&Ut.throwArgumentError("invalid access list storageKey",`accessList[${n}:${a}]`,t),t.toLowerCase()))}}function sn(n){if(Array.isArray(n))return n.map((t,a)=>Array.isArray(t)?(t.length>2&&Ut.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 rf(n){return sn(n).map(e=>[e.address,e.storageKeys])}function sf(n,e){if(n.gasPrice!=null){let a=F.from(n.gasPrice),i=F.from(n.maxFeePerGas||0);a.eq(i)||Ut.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:a,maxFeePerGas:i})}let t=[rn(n.chainId||0,"chainId"),rn(n.nonce||0,"nonce"),rn(n.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),rn(n.maxFeePerGas||0,"maxFeePerGas"),rn(n.gasLimit||0,"gasLimit"),n.to!=null?ce(n.to):"0x",rn(n.value||0,"value"),n.data||"0x",rf(n.accessList||[])];if(e){let a=Vn(e);t.push(rn(a.recoveryParam,"recoveryParam")),t.push(Zt(a.r)),t.push(Zt(a.s))}return _t(["0x02",oa(t)])}function of(n,e){let t=[rn(n.chainId||0,"chainId"),rn(n.nonce||0,"nonce"),rn(n.gasPrice||0,"gasPrice"),rn(n.gasLimit||0,"gasLimit"),n.to!=null?ce(n.to):"0x",rn(n.value||0,"value"),n.data||"0x",rf(n.accessList||[])];if(e){let a=Vn(e);t.push(rn(a.recoveryParam,"recoveryParam")),t.push(Zt(a.r)),t.push(Zt(a.s))}return _t(["0x01",oa(t)])}function Ox(n,e){Wi(n,Dx);let t=[];Nx.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&&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 a=0;if(n.chainId!=null?(a=n.chainId,typeof a!="number"&&Ut.throwArgumentError("invalid transaction.chainId","transaction",n)):e&&!ia(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 oa(t);let i=Vn(e),r=27+i.recoveryParam;return a!==0?(t.pop(),t.pop(),t.pop(),r+=a*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 ts(n,e){if(n.type==null||n.type===0)return n.accessList!=null&&Ut.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",n),Ox(n,e);switch(n.type){case 1:return of(n,e);case 2:return sf(n,e);default:break}return Ut.throwError(`unsupported transaction type: ${n.type}`,E.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:n.type})}function uf(n,e,t){try{let a=Lt(e[0]).toNumber();if(a!==0&&a!==1)throw new Error("bad recid");n.v=a}catch{Ut.throwArgumentError("invalid v for transaction type: 1","v",e[0])}n.r=me(e[1],32),n.s=me(e[2],32);try{let a=fe(t(n));n.from=ci(a,{r:n.r,s:n.s,recoveryParam:n.v})}catch{}}function Bx(n){let e=Kr(n.slice(1));e.length!==9&&e.length!==12&&Ut.throwArgumentError("invalid component count for transaction type: 2","payload",W(n));let t=Lt(e[2]),a=Lt(e[3]),i={type:2,chainId:Lt(e[0]).toNumber(),nonce:Lt(e[1]).toNumber(),maxPriorityFeePerGas:t,maxFeePerGas:a,gasPrice:null,gasLimit:Lt(e[4]),to:ul(e[5]),value:Lt(e[6]),data:e[7],accessList:sn(e[8])};return e.length===9||(i.hash=fe(n),uf(i,e.slice(9),sf)),i}function Fx(n){let e=Kr(n.slice(1));e.length!==8&&e.length!==11&&Ut.throwArgumentError("invalid component count for transaction type: 1","payload",W(n));let t={type:1,chainId:Lt(e[0]).toNumber(),nonce:Lt(e[1]).toNumber(),gasPrice:Lt(e[2]),gasLimit:Lt(e[3]),to:ul(e[4]),value:Lt(e[5]),data:e[6],accessList:sn(e[7])};return e.length===8||(t.hash=fe(n),uf(t,e.slice(8),of)),t}function Lx(n){let e=Kr(n);e.length!==9&&e.length!==6&&Ut.throwArgumentError("invalid raw transaction","rawTransaction",n);let t={nonce:Lt(e[0]).toNumber(),gasPrice:Lt(e[1]),gasLimit:Lt(e[2]),to:ul(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 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(oa(i));try{t.from=ci(r,{r:W(t.r),s:W(t.s),recoveryParam:a})}catch{}t.hash=fe(n)}return t.type=null,t}function Po(n){let e=j(n);if(e[0]>127)return Lx(e);switch(e[0]){case 1:return Fx(e);case 2:return Bx(e);default:break}return Ut.throwError(`unsupported transaction type: ${e[0]}`,E.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}var df="contracts/5.7.0";var Oa=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Se=new E(df),Ux={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(n,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{}n||Se.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&&Se.throwArgumentError("resolver or addr is not configured for ENS name","name",t),a})}function ns(n,e,t){return Oa(this,void 0,void 0,function*(){return Array.isArray(t)?yield Promise.all(t.map((a,i)=>ns(n,Array.isArray(e)?e[i]:e[a.name],a))):t.type==="address"?yield No(n,e):t.type==="tuple"?yield ns(n,e,t.components):t.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(a=>ns(n,a,t.arrayChildren))):Promise.reject(Se.makeError("invalid value for array",E.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function Bo(n,e,t){return Oa(this,void 0,void 0,function*(){let a={};t.length===e.inputs.length+1&&typeof t[t.length-1]=="object"&&(a=_e(t.pop())),Se.checkArgumentCount(t.length,e.inputs.length,"passed to contract"),n.signer?a.from?a.from=Ie({override:No(n.signer,a.from),signer:n.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})):a.from=n.signer.getAddress():a.from&&(a.from=No(n.provider,a.from));let i=yield Ie({args:ns(n.signer||n.provider,t,e.inputs),address:n.resolvedAddress,overrides:Ie(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=sn(o.accessList)),s.gasLimit==null&&e.gas!=null){let p=21e3,f=j(r);for(let x=0;xa[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 Vx(n,e){return function(...t){return Bo(n,e,t)}}function jx(n,e){let t=n.signer||n.provider;return function(...a){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(n,e,a);return yield t.estimateGas(i)})}}function pf(n,e){let t=e.wait.bind(e);e.wait=a=>t(a).then(i=>(i.events=i.logs.map(r=>{let s=mt(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 yf(n,e,t){let a=n.signer||n.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)}n.deployTransaction!=null&&(yield n._deployed(r));let s=yield Bo(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 Hx(n,e){return function(...t){return Oa(this,void 0,void 0,function*(){n.signer||Se.throwError("sending a transaction requires a signer",E.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),n.deployTransaction!=null&&(yield n._deployed());let a=yield Bo(n,e,t),i=yield n.signer.sendTransaction(a);return pf(n,i),i})}}function lf(n,e,t){return e.constant?yf(n,e,t):Hx(n,e)}function ff(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 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(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 mi{constructor(){super("error",null)}},Do=class extends mi{constructor(e,t,a,i){let r={address:e},s=t.getEventTopic(a);i?(s!==i[0]&&Se.throwArgumentError("topic mismatch","topics",i),r.topics=i.slice()):r.topics=[s],super(ff(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=Ji(e.args);if(t.length)throw t[0].error;let a=(e.args||[]).slice();return a.push(e),a}},Oo=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=(a,i)=>this.interface.decodeEventLog(t.eventFragment,a,i),e.args=t.args}catch{}}},yr=class{constructor(e,t,a){B(this,"interface",ht(new.target,"getInterface")(t)),a==null?(B(this,"provider",null),B(this,"signer",null)):St.isSigner(a)?(B(this,"provider",a.provider||null),B(this,"signer",a)):$t.isProvider(a)?(B(this,"provider",a),B(this,"signer",null)):Se.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]]):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,lf(this,o,!0)),this.functions[s]==null&&B(this.functions,s,lf(this,o,!1)),this.callStatic[s]==null&&B(this.callStatic,s,yf(this,o,!0)),this.populateTransaction[s]==null&&B(this.populateTransaction,s,Vx(this,o)),this.estimateGas[s]==null&&B(this.estimateGas,s,jx(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 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(a){t[a]!=null&&Se.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 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 dl);if(e==="event")return this._normalizeRunningEvent(new mi("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 a=e.topics[0];if(typeof a!="string")throw new Error("invalid topic");let i=this.interface.getEvent(a);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 mi(ff(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,a){let i=mt(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||Se.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&&Se.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 yr{},hi=class{constructor(e,t,a){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),a&&!St.isSigner(a)&&Se.throwArgumentError("invalid signer","signer",a),B(this,"bytecode",i),B(this,"interface",ht(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(!Ux[a])throw new Error("unknown transaction override "+a)}return["data","from","to"].forEach(a=>{t[a]!=null&&Se.throwError("cannot override "+a,E.errors.UNSUPPORTED_OPERATION,{operation:a})}),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 a=yield ns(this.signer,e,this.interface.deploy.inputs);a.push(t);let i=this.getDeployTransaction(...a),r=yield this.signer.sendTransaction(i),s=ht(this.constructor,"getContractAddress")(r),o=ht(this.constructor,"getContract")(s,this.interface,this.signer);return pf(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 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 li(e)}static getContract(e,t,a){return new oe(e,t,a)}};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;)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 I=j(ca(i,n,l));r||(r=I.length,f=new Uint8Array(r),s=Math.ceil(a/r),p=a-(s-1)*r),f.set(I);for(let S=1;S=256)throw new Error("Depth too large!");return gf(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(cr,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&~mr));let a=new Uint8Array(37);if(e&mr){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(ca(Yn.sha512,this.chainCode,a)),r=i.slice(0,32),s=i.slice(32),o=null,l=null;this.privateKey?o=Lo(F.from(r).add(this.privateKey).mod(Wx)):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 Ct(cr,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 a=this;for(let i=0;i=mr)throw new Error("invalid path index - "+r);a=a._derive(mr+s)}else if(r.match(/^[0-9]+$/)){let s=parseInt(r);if(s>=mr)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(ca(Yn.sha512,Kx,a));return new Ct(cr,Lo(i.slice(0,32)),null,"0x00000000",Lo(i.slice(32)),0,0,t)}static fromMnemonic(e,t,a){return a=yl(a),e=gi(hr(e,a),a),Ct._fromSeed(fl(e,t),{phrase:e,path:"m",locale:a.locale})}static fromSeed(e){return Ct._fromSeed(e,null)}static fromExtendedKey(e){let t=fa.decode(e);(t.length!==82||gf(t.slice(0,78))!==e)&&rs.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 Ct(cr,null,W(o),i,s,r,a,null);case"0x0488ade4":case"0x04358394 ":if(o[0]!==0)break;return new Ct(cr,W(o.slice(1)),null,i,s,r,a,null)}return rs.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}};function fl(n,e){e||(e="");let t=ve("mnemonic"+e,Gt.NFKD);return xi(ve(n,Gt.NFKD),t,2048,64,"sha512")}function hr(n,e){e=yl(e),rs.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=Tf(s);if((j(Yt(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 gi(n,e){if(e=yl(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]&Jx(8-a)),a+=3);let i=n.length/4,r=j(Yt(n))[0]&Tf(i);return t[t.length-1]<<=i,t[t.length-1]|=r>>8-i,e.join(t.map(s=>e.getWord(s)))}function vf(n,e){try{return hr(n,e),!0}catch{}return!1}function wf(n){return(typeof n!="number"||n<0||n>=mr||n%1)&&rs.throwArgumentError("invalid account index","index",n),`m/44'/60'/${n}'/0/0`}var _f="random/5.7.0";var cl=new E(_f);function $x(){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 kf=$x(),Uo=kf.crypto||kf.msCrypto;(!Uo||!Uo.getRandomValues)&&(cl.warn("WARNING: Missing strong random number source"),Uo={getRandomValues:function(n){return cl.throwError("no secure random source avaialble",E.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function Xn(n){(n<=0||n>1024||n%1||n!=n)&&cl.throwArgumentError("invalid length","length",n);let e=new Uint8Array(n);return Uo.getRandomValues(e),j(e)}function ss(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 xl=_n(hl());var Vo="json-wallets/5.7.0";function ha(n){return typeof n=="string"&&n.substring(0,2)!=="0x"&&(n="0x"+n),j(n)}function xr(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 xa.default.Counter(x),J=new xa.default.ModeOfOperation.ctr(O,M),$=j(J.encrypt(i)),de=fe(ye([U,$])),T={address:n.address.substring(2).toLowerCase(),id:Ef(I),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 xa.default.Counter(R),q=new xa.default.ModeOfOperation.ctr(H,N),se=j(q.encrypt(s)),C=new Date,u=C.getUTCFullYear()+"-"+xr(C.getUTCMonth()+1,2)+"-"+xr(C.getUTCDate(),2)+"T"+xr(C.getUTCHours(),2)+"-"+xr(C.getUTCMinutes(),2)+"-"+xr(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:l,version:"0.1"}}return JSON.stringify(T)})}function Of(n,e,t){if(jo(n)){t&&t(0);let a=gl(n,e);return t&&t(1),Promise.resolve(a)}return Ho(n)?Df(n,e,t):Promise.reject(new Error("invalid JSON wallet"))}function Bf(n,e){if(jo(n))return gl(n,e);if(Ho(n))return Nf(n,e);throw new Error("invalid JSON wallet")}var Ff="wallet/5.7.0";var Lf=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},br=new E(Ff);function e5(n){return n!=null&&ie(n.privateKey,32)&&n.address!=null}function t5(n){let e=n.mnemonic;return e&&e.phrase}var on=class extends St{constructor(e,t){if(super(),e5(e)){let a=new mn(e.privateKey);if(B(this,"_signingKey",()=>a),B(this,"address",hn(this.publicKey)),this.address!==ce(e.address)&&br.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),t5(e)){let i=e.mnemonic;B(this,"_mnemonic",()=>({phrase:i.phrase,path:i.path||ma,locale:i.locale||"en"}));let r=this.mnemonic,s=Ct.fromMnemonic(r.phrase,null,r.locale).derivePath(r.path);hn(s.privateKey)!==this.address&&br.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else B(this,"_mnemonic",()=>null)}else{if(mn.isSigningKey(e))e.curve!=="secp256k1"&&br.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 mn(e);B(this,"_signingKey",()=>a)}B(this,"_mnemonic",()=>null),B(this,"address",hn(this.publicKey))}t&&!$t.isProvider(t)&&br.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 Ie(e).then(t=>{t.from!=null&&(ce(t.from)!==this.address&&br.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete t.from);let a=this._signingKey().signDigest(fe(ts(t)));return ts(t,a)})}signMessage(e){return Lf(this,void 0,void 0,function*(){return Ur(this._signingKey().signDigest(tr(e)))})}_signTypedData(e,t,a){return Lf(this,void 0,void 0,function*(){let i=yield gt.resolveNames(e,t,a,r=>(this.provider==null&&br.throwError("cannot resolve ENS names without a provider",E.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:r}),this.provider.resolveName(r)));return Ur(this._signingKey().signDigest(gt.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={}),kl(this,e,t,a)}static createRandom(e){let t=Xn(16);e||(e={}),e.extraEntropy&&(t=j(Ce(fe(ye([t,e.extraEntropy])),0,16)));let a=gi(t,e.locale);return on.fromMnemonic(a,e.path,e.locale)}static fromEncryptedJson(e,t,a){return Of(e,t,a).then(i=>new on(i))}static fromEncryptedJsonSync(e,t){return new on(Bf(e,t))}static fromMnemonic(e,t,a){return t||(t=ma),new on(Ct.fromMnemonic(e,null,a).derivePath(t))}};function Uf(n,e){return ci(tr(n),e)}function Vf(n,e,t,a){return ci(gt.hash(n,e,t),a)}var ta={};qi(ta,{AlchemyProvider:()=>kr,AlchemyWebSocketProvider:()=>bs,AnkrProvider:()=>gs,BaseProvider:()=>ea,CloudflareProvider:()=>Ts,EtherscanProvider:()=>vs,FallbackProvider:()=>_s,Formatter:()=>X,InfuraProvider:()=>Er,InfuraWebSocketProvider:()=>As,IpcProvider:()=>Fl,JsonRpcBatchProvider:()=>iu,JsonRpcProvider:()=>Xt,JsonRpcSigner:()=>wr,NodesmithProvider:()=>Es,PocketProvider:()=>Ms,Provider:()=>$t,Resolver:()=>vr,StaticJsonRpcProvider:()=>xs,UrlJsonRpcProvider:()=>It,Web3Provider:()=>Cs,WebSocketProvider:()=>Ta,getDefaultProvider:()=>ru,getNetwork:()=>us,isCommunityResourcable:()=>Ml,isCommunityResource:()=>ps,showThrottleMessage:()=>Zn});var jf="networks/5.7.1";var Hf=new E(jf);function n5(n){return n&&typeof n.renetwork=="function"}function ba(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 ba(t)},e}function zo(n,e){let t=function(a,i){return a.JsonRpcProvider?new a.JsonRpcProvider(n,e):null};return t.renetwork=function(a){return zo(n,a)},t}var qf={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:ba("homestead")},Gf={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:ba("ropsten")},zf={chainId:63,name:"classicMordor",_defaultProvider:zo("https://www.ethercluster.com/mordor","classicMordor")},Go={unspecified:{chainId:0,name:"unspecified"},homestead:qf,mainnet:qf,morden:{chainId:2,name:"morden"},ropsten:Gf,testnet:Gf,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:zo("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:zf,classicTestnet:zf,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:zo("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 us(n){if(n==null)return null;if(typeof n=="number"){for(let a in Go){let i=Go[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=Go[n];return a==null?null:{name:a.name,chainId:a.chainId,ensAddress:a.ensAddress,_defaultProvider:a._defaultProvider||null}}let e=Go[n.name];if(!e)return typeof n.chainId!="number"&&Hf.throwArgumentError("invalid network chainId","network",n),n;n.chainId!==0&&n.chainId!==e.chainId&&Hf.throwArgumentError("network chainId mismatch","network",n);let t=n._defaultProvider||null;return t==null&&e._defaultProvider&&(n5(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 Wf="web/5.7.1";var a5=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})};function Kf(n,e){return a5(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 i5=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},In=new E(Wf);function Jf(n){return new Promise(e=>{setTimeout(e,n)})}function Ba(n,e){if(n==null)return null;if(typeof n=="string")return n;if(ia(n)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return Jt(n)}catch{}return W(n)}return n}function r5(n){return ve(n.replace(/%([0-9a-f][0-9a-f])/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))}function Al(n,e,t){let a=typeof n=="object"&&n.throttleLimit!=null?n.throttleLimit:12;In.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;In.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"},f=!1,x=2*60*1e3;if(typeof n=="string")l=n;else if(typeof n=="object"){if((n==null||n.url==null)&&In.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&&(f=!0);if(p.allowGzip=!!n.allowGzip,n.user!=null&&n.password!=null){l.substring(0,6)!=="https:"&&n.allowInsecureAuthentication!==!0&&In.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 "+er(ve(O))}}n.skipFetchSetup!=null&&(p.skipFetchSetup=!!n.skipFetchSetup),n.fetchOptions!=null&&(p.fetchOptions=_e(n.fetchOptions))}let I=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),_=l?l.match(I):null;if(_)try{let O={statusCode:200,statusMessage:"OK",headers:{"content-type":_[1]||"text/plain"},body:_[2]?Zi(_[3]):r5(_[3])},U=O.body;return t&&(U=t(O.body,O)),Promise.resolve(U)}catch(O){In.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(In.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 i5(this,void 0,void 0,function*(){for(let O=0;O=300)&&(S.cancel(),In.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){In.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 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 Al(n,i,a)}function Rn(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(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()&&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(f){s()&&a(f)})}p()})}var Rl=_n(Xf());var Ae="providers/5.7.2";var ls=new E(Ae),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),f=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(f),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 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():ls.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 ce(e)}callAddress(e){if(!ie(e,32))return null;let t=ce(Ce(e,12));return t===lo?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 a=this.hex(e,t);return Nt(a)!==32?ls.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 me(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 Po(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&&ls.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=a,delete t.root):ls.throwArgumentError("invalid alt-root-status","value.root",t.root)}else t.root.length!==66&&ls.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 Ml(n){return n&&typeof n.isCommunityResource=="function"}function ps(n){return Ml(n)&&n.isCommunityResource()}var Zf=!1;function Zn(){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(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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},he=new E(Ae),f5=10;function ec(n){return n==null?"null":(Nt(n)!==32&&he.throwArgumentError("invalid topic","topic",n),n.toLowerCase())}function tc(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[ec(i)]=!0});let a=Object.keys(t);return a.sort(),a.join("|")}else return ec(e)}).join("&")}function c5(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 Tr(n){if(typeof n=="string"){if(n=n.toLowerCase(),Nt(n)===32)return"tx:"+n;if(n.indexOf(":")===-1)return n}else{if(Array.isArray(n))return"filter:*:"+tc(n);if(vo.isForkEvent(n))throw he.warn("not implemented"),new Error("not implemented");if(n&&typeof n=="object")return"filter:"+(n.address||"*")+":"+tc(n.topics||[])}throw new Error("invalid event - "+n)}function ys(){return new Date().getTime()}function nc(n){return new Promise(e=>{setTimeout(e,n)})}var m5=["block","network","pending","poll"],Pl=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=c5(e[2]),i={};return a.length>0&&(i.topics=a),t&&t!=="*"&&(i.address=t),i}pollable(){return this.tag.indexOf(":")>=0||m5.indexOf(this.tag)>=0}},h5={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 me(F.from(n).toHexString(),32)}function ac(n){return fa.encode(ye([n,Ce(Yt(Yt(n)),0,4)]))}var sc=new RegExp("^(ipfs)://(.*)$","i"),ic=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),sc,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function $o(n,e){try{return Jt(fs(n,e))}catch{}return null}function fs(n,e){if(n==="0x")return null;let t=F.from(Ce(n,e,e+32)).toNumber(),a=F.from(Ce(n,t,t+32)).toNumber();return Ce(n,t+32,t+32+a)}function Il(n){return n.match(/^ipfs:\/\/ipfs\//i)?n=n.substring(12):n.match(/^ipfs:\/\//i)?n=n.substring(7):he.throwArgumentError("unsupported IPFS format","link",n),`https://gateway.ipfs.io/ipfs/${n}`}function rc(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 x5(n){if(n.length%32===0)return n;let e=new Uint8Array(Math.ceil(n.length/32)*32);return e.set(n),e}function oc(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:_t([e,Sa(this.name),t||"0x"])},i=!1;(yield this.supportsWildcard())&&(i=!0,a.data=_t(["0x9061b923",oc([Yr(this.name),a.data])]));try{let r=yield this.provider.call(a);return j(r).length%32===4&&he.throwError("resolver threw error",E.errors.CALL_EXCEPTION,{transaction:a,data:r}),i&&(r=fs(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?fs(a,0):null})}_getAddress(e,t){let a=h5[String(e)];if(a==null&&he.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 ac(ye([[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 ac(ye([[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=Rl.default.toWords(i.slice(2));return o.unshift(s),Rl.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===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",Cl(e));if(t==null||t==="0x")return null;let a=this._getAddress(e,t);return a==null&&he.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 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([Cl(64),Cl(t.length),t]),t.length%32!==0&&(t=ye([t,me("0x",32-e.length%32)]));let a=yield this._fetchBytes("0x59d1d43c",W(t));return a==null||a==="0x"?null:Jt(a)})}},Sl=null,b5=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)):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 Rn(()=>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 X),Sl}static getNetwork(e){return us(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 Sn({url:p,errorPassThrough:!0},f,(_,v)=>(_.status=v.statusCode,_));if(x.data)return x.data;let I=x.message||"unknown error";if(x.status>=400&&x.status<500)return he.throwError(`response not found during CCIP fetch: ${I}`,E.errors.SERVER_ERROR,{url:l,errorMessage:I});s.push(I)}return he.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(ys()-r.respTime<=e)return r.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}let t=ys(),a=Ie({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=ys();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=b5++,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)he.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${a})`),this.emit("error",he.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 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 nc(0),this._network;let a=he.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=ys();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,f=function(){return p?!0:(p=!0,l.forEach(I=>{I()}),!1)},x=I=>{I.confirmations{this.removeListener(e,x)}),i){let I=i.startBlock,_=null,v=S=>ue(this,void 0,void 0,function*(){p||(yield nc(1e3),this.getTransactionCount(i.from).then(L=>ue(this,void 0,void 0,function*(){if(!p){if(L<=i.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),l.push(()=>{this.removeListener("block",v)})}if(typeof a=="number"&&a>0){let I=setTimeout(()=>{f()||o(he.makeError("timeout exceeded",E.errors.TIMEOUT,{timeout:a}))},a);I.unref&&I.unref(),l.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",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 Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getBalance",a);try{return F.from(i)}catch(r){return he.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 Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getTransactionCount",a);try{return F.from(i).toNumber()}catch(r){return he.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 Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getCode",a);try{return W(i)}catch(r){return he.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 Ie({address:this._getAddress(e),blockTag:this._getBlockTag(a),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,a){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&&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&&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)),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 Ie(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 Ie(t))})}_call(e,t,a){return ue(this,void 0,void 0,function*(){a>=f5&&he.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"&&Nt(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(),f=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&&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 Rn(()=>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 Rn(()=>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 Ie({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&&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 a=yield this._getResolver(t,"getResolver");if(a!=null){let i=new vr(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||he.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"+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(a){if(ie(e))throw a}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",a=yield this._getResolver(t,"lookupAddress");if(a==null)return null;let i=$o(yield this.call({to:a,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 vr(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 a=yield t.getAvatar();return a==null?null:a.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,a){let i=new Pl(Tr(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=Tr(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=Tr(e);return this._events.filter(a=>a.tag===t).length}listeners(e){if(e==null)return this._events.map(a=>a.listener);let t=Tr(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=Tr(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=Tr(e);this._events=this._events.filter(i=>i.tag!==a?!0:(t.push(i),!1))}return t.forEach(a=>{this._stopEvent(a)}),this}};var ga=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},At=new E(Ae),g5=["call","estimateGas"];function ms(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=ms(n[t],e);if(a)return a}return null}if(typeof n=="string")try{return ms(JSON.parse(n),e)}catch{}return null}function dc(n,e,t){let a=t.transaction||t.signedTransaction;if(n==="call"){let r=ms(e,!0);if(r)return r.data;At.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=ms(e.body,!1);r==null&&(r=ms(e,!1)),r&&At.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)&&At.throwError("insufficient funds for intrinsic transaction cost",E.errors.INSUFFICIENT_FUNDS,{error:e,method:n,transaction:a}),i.match(/nonce (is )?too low/i)&&At.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)&&At.throwError("replacement fee too low",E.errors.REPLACEMENT_UNDERPRICED,{error:e,method:n,transaction:a}),i.match(/only replay-protected/i)&&At.throwError("legacy pre-eip-155 transactions not supported",E.errors.UNSUPPORTED_OPERATION,{error:e,method:n,transaction:a}),g5.indexOf(n)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&At.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 uc(n){return new Promise(function(e){setTimeout(e,n)})}function T5(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 cs(n){return n&&n.toLowerCase()}var Nl={},wr=class extends St{constructor(e,t,a){if(super(),e!==Nl)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)):At.throwArgumentError("invalid address or index","addressOrIndex",a)}connect(e){return At.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&&At.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=>ga(this,void 0,void 0,function*(){if(a==null)return null;let i=yield this.provider.resolveName(a);return i==null&&At.throwArgumentError("provided ENS name resolves to null","tx.to",a),i}))),Ie({tx:Ie(e),sender:t}).then(({tx:a,sender:i})=>{a.from!=null?a.from.toLowerCase()!==i&&At.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)&&At.throwError("user rejected transaction",E.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:a}),dc("sendTransaction",s,r)))})}signTransaction(e){return At.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),a=yield this.sendUncheckedTransaction(e);try{return yield Rn(()=>ga(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 ga(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(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)&&At.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"signMessage",from:a,messageData:e}),i}})}_legacySignMessage(e){return ga(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(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)&&At.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:a,messageData:e}),i}})}_signTypedData(e,t,a){return ga(this,void 0,void 0,function*(){let i=yield gt.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(gt.getPayload(i.domain,t,i.value))])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&At.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,a=yield this.getAddress();return t.send("personal_unlockAccount",[a.toLowerCase(),e,null])})}},Dl=class extends wr{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)}))}},v5={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0},Xt=class extends ea{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=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 ga(this,void 0,void 0,function*(){yield uc(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(a){return At.throwError("could not detect network",E.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:a})}}return At.throwError("could not detect network",E.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new wr(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 a={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:mt(a),provider:this});let i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];let r=Sn(this.connection,JSON.stringify(a),T5).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",[cs(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[cs(t.address),t.blockTag]];case"getCode":return["eth_getCode",[cs(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[cs(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 a=ht(this.constructor,"hexlifyTransaction");return["eth_call",[a(t.transaction,{from:!0}),t.blockTag]]}case"estimateGas":{let a=ht(this.constructor,"hexlifyTransaction");return["eth_estimateGas",[a(t.transaction,{from:!0})]]}case"getLogs":return t.filter&&t.filter.address!=null&&(t.filter.address=cs(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 a=this.prepareRequest(e,t);a==null&&At.throwError(e+" not implemented",E.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(a[0],a[1])}catch(i){return dc(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 uc(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(v5);if(t)for(let r in t)t[r]&&(a[r]=!0);Wi(e,a);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 _r=null;try{if(_r=WebSocket,_r==null)throw new Error("inject please")}catch{let e=new E(Ae);_r=function(){e.throwError("WebSockets not supported in this environment",E.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var Ol=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Qo=new E(Ae),w5=1,Ta=class extends Xt{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 _r(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){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 a=w5++;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 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: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 Ol(this,void 0,void 0,function*(){this.websocket.readyState===_r.CONNECTING&&(yield new Promise(e=>{this.websocket.onopen=function(){e(!0)},this.websocket.onerror=function(){e(!1)}})),this.websocket.close(1e3)})}};var _5=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},hs=new E(Ae),xs=class extends Xt{detectNetwork(){let e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return _5(this,void 0,void 0,function*(){let t=this.network;return t==null&&(t=yield e.detectNetwork.call(this),t||hs.throwError("no network detected",E.errors.UNKNOWN_ERROR,{}),this._network==null&&(B(this,"_network",t),this.emit("network",t,null))),t})}},It=class extends xs{constructor(e,t){hs.checkAbstract(new.target,It),e=ht(new.target,"getNetwork")(e),t=ht(new.target,"getApiKey")(t);let a=ht(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(){hs.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(e){return hs.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 hs.throwError("not implemented; sub-classes must override getUrl",E.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}};var lc=new E(Ae),Yo="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC",bs=class extends Ta{constructor(e,t){let a=new kr(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===Yo}},kr=class extends It{static getWebSocketProvider(e,t){return new bs(e,t)}static getApiKey(e){return e==null?Yo:(e&&typeof e!="string"&&lc.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:lc.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+a+t,throttleCallback:(i,r)=>(t===Yo&&Zn(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===Yo}};var k5=new E(Ae),Xo="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function A5(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 k5.throwArgumentError("unsupported network","name",n)}var gs=class extends It{isCommunityResource(){return this.apiKey===Xo}static getApiKey(e){return e??Xo}static getUrl(e,t){t==null&&(t=Xo);let a={allowGzip:!0,url:"https://"+A5(e.name)+t,throttleCallback:(i,r)=>(t.apiKey===Xo&&Zn(),Promise.resolve(!0))};return t.projectSecret!=null&&(a.user="",a.password=t.projectSecret),a}};var E5=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},pc=new E(Ae),Ts=class extends It{static getApiKey(e){return e!=null&&pc.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:pc.throwArgumentError("unsupported network","network",arguments[0])}return a}perform(e,t){let a=Object.create(null,{perform:{get:()=>super.perform}});return E5(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 Zo=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Fa=new E(Ae);function yc(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=Un(W(a)):t==="accessList"?a="["+sn(a).map(i=>`{address:"${i.address}",storageKeys:["${i.storageKeys.join('","')}"]}`).join(",")+"]":a=W(a),e[t]=a)}return e}function M5(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 fc(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 cc(n){if(n==="pending")throw new Error("pending not supported");return n==="latest"?n:parseInt(n.substring(2),16)}function Bl(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;Fa.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/)&&Fa.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/)&&Fa.throwError("nonce has already been used",E.errors.NONCE_EXPIRED,{error:e,method:n,transaction:t}),a.match(/another transaction with same nonce/)&&Fa.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/)&&Fa.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 vs=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 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 Zo(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"?fc:M5;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 Sn(o,l,s||fc);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 a=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=yc(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=yc(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=cc(t.filter.fromBlock)),t.filter.toBlock&&(i.toBlock=cc(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(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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Ti=new E(Ae);function eu(){return new Date().getTime()}function mc(n){let e=null;for(let t=0;te?null:(a+i)/2}function Ar(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=>Ar(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=Ar(a),JSON.stringify(t)+":"+a}).join(",")+"}"}throw new Error("unknown value type: "+typeof n)}var C5=1;function xc(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 I5=[E.errors.CALL_EXCEPTION,E.errors.INSUFFICIENT_FUNDS,E.errors.NONCE_EXPIRED,E.errors.REPLACEMENT_UNDERPRICED,E.errors.UNPREDICTABLE_GAS_LIMIT],S5=["address","args","errorArgs","errorSignature","method","transaction"];function tu(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 R5(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 P5(n,e,t){let a=Ar;switch(e){case"getBlockNumber":return function(i){let r=i.map(o=>o.result),s=hc(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 hc(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,Ar(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)),Ar(i))}:a=function(i){return i==null?null:Ar(i)};break;default:throw new Error("unknown method: "+e)}return R5(a,n.quorum)}function ws(n,e){return nu(this,void 0,void 0,function*(){let t=n.provider;return t.blockNumber!=null&&t.blockNumber>=e||e===-1?t:Rn(()=>new Promise((a,i)=>{setTimeout(function(){return t.blockNumber>=e?a(t):n.cancelled?a(null):a(void 0)},0)}),{oncePoll:t})})}function N5(n,e,t,a){return nu(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 ws(n,e)),i[t](a.address,a.blockTag||"latest");case"getStorageAt":return a.blockTag&&ie(a.blockTag)&&(i=yield ws(n,e)),i.getStorageAt(a.address,a.position,a.blockTag||"latest");case"getBlock":return a.blockTag&&ie(a.blockTag)&&(i=yield ws(n,e)),i[a.includeTransactions?"getBlockWithTransactions":"getBlock"](a.blockTag||a.blockHash);case"call":case"estimateGas":return a.blockTag&&ie(a.blockTag)&&(i=yield ws(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 ws(n,e)),i.getLogs(r)}}return Ti.throwError("unknown method error",E.errors.UNKNOWN_ERROR,{method:t,params:a})})}var _s=class extends ea{constructor(e,t){e.length===0&&Ti.throwArgumentError("missing providers","providers",e);let a=e.map((s,o)=>{if($t.isProvider(s)){let f=ps(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=ps(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=a.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=mc(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 nu(this,void 0,void 0,function*(){let e=yield Promise.all(this.providerConfigs.map(t=>t.provider.getNetwork()));return mc(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=N5(_,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 _=a(x);if(_!==void 0)return i.forEach(v=>{v.staller&&v.staller.cancel(),v.cancelled=!0}),_;o||(yield xc(100).getPromise()),o=!1}let I=i.reduce((_,v)=>{if(!v.done||v.error==null)return _;let S=v.error.code;return I5.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={};S5.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=>tu(l)),provider:this})})}};var Fl=null;var au=new E(Ae),ks="84842078b09946638c03157f83405213",As=class extends Ta{constructor(e,t){let a=new Er(e,t),i=a.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",a.projectId),B(this,"projectId",a.projectId),B(this,"projectSecret",a.projectSecret)}isCommunityResource(){return this.projectId===ks}},Er=class extends It{static getWebSocketProvider(e,t){return new As(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?(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 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:au.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===ks&&Zn(),Promise.resolve(!0))};return t.projectSecret!=null&&(i.user="",i.password=t.projectSecret),i}isCommunityResource(){return this.projectId===ks}};var iu=class extends Xt{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:mt(o),provider:this}),Sn(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 I=new Error(x.error.message);I.code=x.error.code,I.data=x.error.data,p.reject(I)}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),D5="ETHERS_JS_SHARED",Es=class extends It{static getApiKey(e){return e&&typeof e!="string"&&Ll.throwArgumentError("invalid apiKey","apiKey",e),e||D5}static getUrl(e,t){Ll.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:Ll.throwArgumentError("unsupported network","network",arguments[0])}return a+"?apiKey="+t}};var bc=new E(Ae),gc="62e1ad51b37b8e00394bda3b",Ms=class extends It{static getApiKey(e){let t={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return e==null?t.applicationId=gc:typeof e=="string"?t.applicationId=e:e.applicationSecretKey!=null?(t.applicationId=e.applicationId,t.applicationSecretKey=e.applicationSecretKey):e.applicationId?t.applicationId=e.applicationId:bc.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:bc.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===gc}};var Tc=new E(Ae),O5=1;function vc(n,e){let t="Web3LegacyFetcher";return function(a,i){let r={method:a,params:i,id:O5++,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 B5(n){return function(e,t){t==null&&(t=[]);let a={method:e,params:t};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:mt(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 Cs=class extends Xt{constructor(e,t){e==null&&Tc.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=B5(e)):e.sendAsync?i=vc(e,e.sendAsync.bind(e)):e.send?i=vc(e,e.send.bind(e)):Tc.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 wc=new E(Ae);function ru(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 Xt(n);case"ws":case"wss":return new Ta(n);default:wc.throwArgumentError("unsupported URL scheme","network",n)}}let t=us(n);return(!t||!t._defaultProvider)&&wc.throwError("unsupported getDefaultProvider network",E.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:n}),t._defaultProvider({FallbackProvider:_s,AlchemyProvider:kr,AnkrProvider:gs,CloudflareProvider:Ts,EtherscanProvider:vs,InfuraProvider:Er,JsonRpcProvider:Xt,NodesmithProvider:Es,PocketProvider:Ms,Web3Provider:Cs,IpcProvider:null},e)}var te={};qi(te,{AbiCoder:()=>Xi,ConstructorFragment:()=>Dt,ErrorFragment:()=>tn,EventFragment:()=>Ht,FormatTypes:()=>ge,Fragment:()=>qt,FunctionFragment:()=>Ot,HDNode:()=>Ct,Indexed:()=>ua,Interface:()=>Ra,LogDescription:()=>nr,Logger:()=>E,ParamType:()=>yt,RLP:()=>to,SigningKey:()=>mn,SupportedAlgorithm:()=>Yn,TransactionDescription:()=>ar,TransactionTypes:()=>Ro,UnicodeNormalizationForm:()=>Gt,Utf8ErrorFuncs:()=>mo,Utf8ErrorReason:()=>Bt,_TypedDataEncoder:()=>gt,_fetchData:()=>Al,_toEscapedUtf8String:()=>Sd,accessListify:()=>sn,arrayify:()=>j,base58:()=>fa,base64:()=>Bd,checkProperties:()=>Wi,checkResultErrors:()=>Ji,commify:()=>Sc,computeAddress:()=>hn,computeHmac:()=>ca,computePublicKey:()=>es,concat:()=>ye,deepCopy:()=>mt,defaultAbiCoder:()=>$r,defaultPath:()=>ma,defineReadOnly:()=>B,dnsEncode:()=>Yr,entropyToMnemonic:()=>gi,fetchJson:()=>Sn,formatBytes32String:()=>Rd,formatEther:()=>Rc,formatUnits:()=>Ul,getAccountPath:()=>wf,getAddress:()=>ce,getContractAddress:()=>li,getCreate2Address:()=>Oy,getIcapAddress:()=>Dy,getJsonWalletAddress:()=>Tl,getStatic:()=>ht,hashMessage:()=>tr,hexConcat:()=>_t,hexDataLength:()=>Nt,hexDataSlice:()=>Ce,hexStripZeros:()=>gd,hexValue:()=>Un,hexZeroPad:()=>me,hexlify:()=>W,id:()=>nn,isAddress:()=>Ny,isBytes:()=>un,isBytesLike:()=>ia,isHexString:()=>ie,isValidMnemonic:()=>vf,isValidName:()=>Ld,joinSignature:()=>Ur,keccak256:()=>fe,mnemonicToEntropy:()=>hr,mnemonicToSeed:()=>fl,namehash:()=>Sa,nameprep:()=>Od,parseBytes32String:()=>Pd,parseEther:()=>Pc,parseTransaction:()=>Po,parseUnits:()=>Vl,poll:()=>Rn,randomBytes:()=>Xn,recoverAddress:()=>ci,recoverPublicKey:()=>So,resolveProperties:()=>Ie,ripemd160:()=>as,serializeTransaction:()=>ts,sha256:()=>Yt,sha512:()=>dl,shallowCopy:()=>_e,shuffled:()=>ss,solidityKeccak256:()=>Ac,solidityPack:()=>su,soliditySha256:()=>Ec,splitSignature:()=>Vn,stripZeros:()=>Zt,toUtf8Bytes:()=>ve,toUtf8CodePoints:()=>Ia,toUtf8String:()=>Jt,verifyMessage:()=>Uf,verifyTypedData:()=>Vf,zeroPad:()=>si});var _c="solidity/5.7.0";var F5=new RegExp("^bytes([0-9]+)$"),L5=new RegExp("^(u?int)([0-9]*)$"),U5=new RegExp("^(.*)\\[([0-9]*)\\]$"),V5="0000000000000000000000000000000000000000000000000000000000000000",Mr=new E(_c);function kc(n,e,t){switch(n){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 a=n.match(L5);if(a){let i=parseInt(a[2]||"256");return(a[2]&&String(i)!==a[2]||i%8!==0||i===0||i>256)&&Mr.throwArgumentError("invalid number type","type",n),t&&(i=256),e=F.from(e).toTwos(i),si(e,i/8)}if(a=n.match(F5),a){let i=parseInt(a[1]);return(String(i)!==a[1]||i===0||i>32)&&Mr.throwArgumentError("invalid bytes type","type",n),j(e).byteLength!==i&&Mr.throwArgumentError(`invalid value for ${n}`,"value",e),t?j((e+V5).substring(0,66)):e}if(a=n.match(U5),a&&Array.isArray(e)){let i=a[1];parseInt(a[2]||String(e.length))!=e.length&&Mr.throwArgumentError(`invalid array length for ${n}`,"value",e);let s=[];return e.forEach(function(o){s.push(kc(i,o,!0))}),ye(s)}return Mr.throwArgumentError("invalid type","type",n)}function su(n,e){n.length!=e.length&&Mr.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);let t=[];return n.forEach(function(a,i){t.push(kc(a,e[i]))}),W(ye(t))}function Ac(n,e){return fe(su(n,e))}function Ec(n,e){return Yt(su(n,e))}var Mc="units/5.7.0";var Cc=new E(Mc),Ic=["wei","kwei","mwei","gwei","szabo","finney","ether"];function Sc(n){let e=String(n).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||n==="."||n==="-.")&&Cc.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 Ul(n,e){if(typeof e=="string"){let t=Ic.indexOf(e);t!==-1&&(e=3*t)}return zi(n,e??18)}function Vl(n,e){if(typeof n!="string"&&Cc.throwArgumentError("value must be a string","value",n),typeof e=="string"){let t=Ic.indexOf(e);t!==-1&&(e=3*t)}return ln(n,e??18)}function Rc(n){return Ul(n,18)}function Pc(n){return Vl(n,18)}var ou="ethers/5.7.2";var Nc=new E(ou);try{let n=window;n._ethers==null&&(n._ethers=jl)}catch{}var Pn;(function(n){n.Mainnet="Mainnet",n.Custom="Custom",n.Gnosis="Xdai",n.Goerli="Goerli",n.Xdai="Xdai",n.XdaiQa="XdaiQa",n.ArbitrumOne="ArbitrumOne",n.ArbitrumSepolia="ArbitrumSepolia"})(Pn||(Pn={}));var Dc;(function(n){n[n.Custom=0]="Custom",n[n.Mainnet=1]="Mainnet",n[n.Goerli=5]="Goerli",n[n.Gnosis=100]="Gnosis",n[n.Xdai=100]="Xdai",n[n.XdaiQa=100]="XdaiQa",n[n.ArbitrumSepolia=421614]="ArbitrumSepolia",n[n.ArbitrumOne=42161]="ArbitrumOne"})(Dc||(Dc={}));var uu;(function(n){n.Mainnet="0x5346D0f80e2816FaD329F2c140c870ffc3c3E2Ef",n.Goerli="0x79073fc2117dD054FCEdaCad1E7018C9CbE3ec0B",n.Xdai="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.XdaiQa="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.Custom="",n.ArbitrumOne="0xcccccdcc0ccf6c708d860e19353c5f9a49accccc",n.ArbitrumSepolia="0x7777494e3d8cce0D3570E21FEf820F9Fee077777"})(uu||(uu={}));var Cr;(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",n.ArbitrumOne="https://app.colony.io/reputation/arbitrum-one",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/reputation/arbitrum-sepolia"})(Cr||(Cr={}));var du;(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="",n.ArbitrumOne="https://app.colony.io/metatransaction/arbitrum-one",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/metatransaction/arbitrum-sepolia"})(du||(du={}));var Hl;(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="",n.ArbitrumOne="https://app.colony.io/public-rpc/",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/public-rpc/"})(Hl||(Hl={}));var Is;(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",n.ArbitrumOne=".colony.joincolony.arbitrum",n.ArbitrumSepolia=".colony.joincolony.sepolia"})(Is||(Is={}));var Ss;(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",n.ArbitrumOne=".user.joincolony.arbitrum",n.ArbitrumSepolia=".user.joincolony.sepolia"})(Ss||(Ss={}));var ql;(function(n){let e;(function(i){i.ETH="0x0000000000000000000000000000000000000000",i.CLNY="0x3E828ac5C480069D4765654Fb4b8733b910b13b2",i.USDC="0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"})(e=n.Mainnet||(n.Mainnet={}));let t;(function(i){i.XDAI="0x0000000000000000000000000000000000000000",i.CLNY="0xc9B6218AffE8Aba68a13899Cbf7cF7f14DDd304C",i.USDC="0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83"})(t=n.Gnosis||(n.Gnosis={}));let a;(function(i){i.ETH="0x0000000000000000000000000000000000000000",i.CLNY="0xcccccdcc0ccf6c708d860e19353c5f9a49accccc",i.USDC="0xaf88d065e77c8cC2239327C5EDb3A432268e5831"})(a=n.ArbitrumOne||(n.ArbitrumOne={}))})(ql||(ql={}));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 zt;(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"})(zt||(zt={}));var zl="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 Ne;(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"})(Ne||(Ne={}));var we;(function(n){n.FundingQueue="FundingQueue",n.IVotingReputation="IVotingReputation",n.MultisigPermissions="MultisigPermissions",n.OneTxPayment="OneTxPayment",n.ReputationBootstrapper="ReputationBootstrapper",n.StagedExpenditure="StagedExpenditure",n.StakedExpenditure="StakedExpenditure",n.StreamingPayments="StreamingPayments",n.TokenSupplier="TokenSupplier",n.VotingReputation="VotingReputation"})(we||(we={}));var Wl=[{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(Wl)}static connect(e,t){return new oe(e,Wl,t)}};xe(vi,"abi",Wl);var Kl=[{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"}],wi=class{static createInterface(){return new te.Interface(Kl)}static connect(e,t){return new oe(e,Kl,t)}};xe(wi,"abi",Kl);var Oc=(n,e)=>{throw new Error(`${e}: ${n}`)},Jl=n=>n!=null;var{keccak256:H5,toUtf8Bytes:q5}=te,{MaxUint256:G5}=xt;var Ir=n=>te.formatEther(n),lu=n=>te.parseEther(n),pu=n=>lu(n[0]),$l=n=>{let e=n.reduce((t,a)=>t|1<{let e=F.from(n);return[...Array(Ne.LAST_ROLE).keys()].map(t=>e.shr(t).mask(1).eq(1)?t:null).filter(Jl)},_i=async(n,e,t,a)=>{if(F.from(t).eq(F.from(a)))return G5;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)},La=n=>H5(q5(n));var Sr=async(n,e)=>(await wi.connect(n,e).version()).toNumber(),Ql=(n,e)=>n.map(t=>{try{return e.parseLog(t)}catch{return null}}).filter(Jl);var{hexDataSlice:Yl}=te,{MaxUint256:z5}=xt,Bc=n=>{let e=Yl(n,0,3),t=F.from(Yl(n,4,35)),a=F.from(Yl(n,36,67));return{sig:e,permissionDomainId:t,childSkillIndex:a}},Fc=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),z5,r];let o=F.from(ke.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 _i(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]},W5=async(n,e,t,a,i)=>{let r=await Promise.all(a.map(s=>Fc(n,e,t,s,i)));for(let s=0;sArray.isArray(a)?a.length===1?na(n,e,t,a[0],i):W5(n,e,t,a,i):Fc(n,e,t,a,i);var{MaxUint256:Lc}=xt,{AddressZero:K5}=xt;async function J5(n,e){let t;try{return t=await n.getCapabilityRoles(te.hexZeroPad(e,4)),yu(t)}catch{return[]}}async function Rs(n,e,t,a,i,r,s){let o,{skillId:l}=await e.getDomain(i),{sig:p,permissionDomainId:f,childSkillIndex:x}=Bc(s),I=vi.connect(r,a.signer||a.provider),_=await J5(I,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 n.getChildSkillId(U,x);if(H.eq(l))o=Lc;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,K5);return{actionCid:o,key:v,value:S,branchMask:L,siblings:O}}var{AddressZero:$5}=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,a){this.colony=t,this.network=e;let i=a?.network||Pn.ArbitrumOne;this.endpointUrl=a?.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,a){let i=await this.getBaseEndpoint(a),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,a){let i=await this.getBaseEndpoint(a),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 a=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${a}/${i}`;return aa.fetchReputation(r)}async getTotalReputation(e,t){let a=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${a}/${i}/${$5}/noProof`,s=await aa.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 Et=n=>Array.from(Array(n-1)).map((e,t)=>t+1);var Uc=10,Ck=Et(Uc),Vc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},jc=Uc-1;var Hc=3,Rk=Et(Hc),qc={1:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],2:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]},Gc=Hc-1;var zc=10,Dk=Et(zc),Wc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Kc=zc-1;var Jc=7,Fk=Et(Jc),$c={1:[],2:[],3:[],4:[],5:[],6:[]},Qc=Jc-1;var Yc=8,Vk=Et(Yc),Xc={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3],6:[1,2,3],7:[1,2,3]},Zc=Yc-1;var em=5,qk=Et(em),tm={1:[1,2,3,4,5,6,7,8,9,10,11,12,13],2:[1,2,3,4,5,6,7,8,9,10,11,12,13],3:[1,2,3,4,5,6,7,8,9,10,11,12,13],4:[1,2,3,4,5,6,7,8,9,10,11,12,13]},nm=em-1;var am=7,Wk=Et(am),im={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3],6:[1,2,3]},rm=am-1;var sm=10,$k=Et(sm),om={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},um=sm-1;var dm=14,Xk=Et(dm),Xl={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],11:[1,2,3,4,5,6],12:[1,2,3,4,5,6],13:[1,2,3,4,5,6]},Zl=dm-1;var lm=18,Q5=Et(lm),tA=lm-1;var Y5=(n,e)=>{switch(n){case we.FundingQueue:return Vc[e];case we.IVotingReputation:return Xl[e];case we.MultisigPermissions:return qc[e];case we.OneTxPayment:return Wc[e];case we.ReputationBootstrapper:return $c[e];case we.StagedExpenditure:return tm[e];case we.StakedExpenditure:return Xc[e];case we.StreamingPayments:return im[e];case we.TokenSupplier:return om[e];case we.VotingReputation:return Xl[e];default:return Oc(n,"Could not find extension with name")}},va=(n,e,t)=>{let a=Y5(n,e);return!!a&&!a.includes(t)};var fu={[we.FundingQueue]:jc,[we.IVotingReputation]:Zl,[we.MultisigPermissions]:Gc,[we.OneTxPayment]:Kc,[we.ReputationBootstrapper]:Qc,[we.StagedExpenditure]:nm,[we.StakedExpenditure]:Zc,[we.StreamingPayments]:rm,[we.TokenSupplier]:um,[we.VotingReputation]:Zl};var P6=_n(pm(),1);var vp=_n(I6(),1);var Re;(function(n){n.DEFAULT="default",n.Annotation="annotation",n.Colony="colony",n.Decision="decision",n.Domain="domain",n.Misc="misc"})(Re||(Re={}));var Tp=2,gp;(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"})(gp||(gp={}));var S6=n=>`Validation error(s): +`)}static register(e,t){if(t||(t=e.locale),Gx)try{let a=window;a._ethers&&a._ethers.wordlists&&(a._ethers.wordlists[t]||B(a._ethers.wordlists,t,e))}catch{}}};var zx="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo",is=null;function xf(n){if(is==null&&(is=zx.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),xn.check(n)!=="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"))throw is=null,new Error("BIP39 Wordlist for en (English) FAILED")}var pl=class extends xn{constructor(){super("en")}getWord(e){return xf(this),is[e]}getWordIndex(e){return xf(this),is.indexOf(e)}},yl=new pl;xn.register(yl);var bi={en:yl};var bf="hdnode/5.7.0";var rs=new E(bf),Wx=F.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),Kx=ve("Bitcoin seed"),mr=2147483648;function Tf(n){return(1<=256)throw new Error("Depth too large!");return gf(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(cr,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&~mr));let a=new Uint8Array(37);if(e&mr){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(ca(Yn.sha512,this.chainCode,a)),r=i.slice(0,32),s=i.slice(32),o=null,l=null;this.privateKey?o=Lo(F.from(r).add(this.privateKey).mod(Wx)):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 Ct(cr,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 a=this;for(let i=0;i=mr)throw new Error("invalid path index - "+r);a=a._derive(mr+s)}else if(r.match(/^[0-9]+$/)){let s=parseInt(r);if(s>=mr)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(ca(Yn.sha512,Kx,a));return new Ct(cr,Lo(i.slice(0,32)),null,"0x00000000",Lo(i.slice(32)),0,0,t)}static fromMnemonic(e,t,a){return a=fl(a),e=gi(hr(e,a),a),Ct._fromSeed(cl(e,t),{phrase:e,path:"m",locale:a.locale})}static fromSeed(e){return Ct._fromSeed(e,null)}static fromExtendedKey(e){let t=fa.decode(e);(t.length!==82||gf(t.slice(0,78))!==e)&&rs.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 Ct(cr,null,W(o),i,s,r,a,null);case"0x0488ade4":case"0x04358394 ":if(o[0]!==0)break;return new Ct(cr,W(o.slice(1)),null,i,s,r,a,null)}return rs.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}};function cl(n,e){e||(e="");let t=ve("mnemonic"+e,Gt.NFKD);return xi(ve(n,Gt.NFKD),t,2048,64,"sha512")}function hr(n,e){e=fl(e),rs.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=Tf(s);if((j(Yt(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 gi(n,e){if(e=fl(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]&Jx(8-a)),a+=3);let i=n.length/4,r=j(Yt(n))[0]&Tf(i);return t[t.length-1]<<=i,t[t.length-1]|=r>>8-i,e.join(t.map(s=>e.getWord(s)))}function vf(n,e){try{return hr(n,e),!0}catch{}return!1}function wf(n){return(typeof n!="number"||n<0||n>=mr||n%1)&&rs.throwArgumentError("invalid account index","index",n),`m/44'/60'/${n}'/0/0`}var _f="random/5.7.0";var ml=new E(_f);function $x(){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 kf=$x(),Uo=kf.crypto||kf.msCrypto;(!Uo||!Uo.getRandomValues)&&(ml.warn("WARNING: Missing strong random number source"),Uo={getRandomValues:function(n){return ml.throwError("no secure random source avaialble",E.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function Xn(n){(n<=0||n>1024||n%1||n!=n)&&ml.throwArgumentError("invalid length","length",n);let e=new Uint8Array(n);return Uo.getRandomValues(e),j(e)}function ss(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=_n(xl());var Vo="json-wallets/5.7.0";function ha(n){return typeof n=="string"&&n.substring(0,2)!=="0x"&&(n="0x"+n),j(n)}function xr(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 xa.default.Counter(x),J=new xa.default.ModeOfOperation.ctr(O,M),$=j(J.encrypt(i)),de=fe(ye([U,$])),T={address:n.address.substring(2).toLowerCase(),id:Ef(I),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 xa.default.Counter(R),q=new xa.default.ModeOfOperation.ctr(H,N),se=j(q.encrypt(s)),C=new Date,u=C.getUTCFullYear()+"-"+xr(C.getUTCMonth()+1,2)+"-"+xr(C.getUTCDate(),2)+"T"+xr(C.getUTCHours(),2)+"-"+xr(C.getUTCMinutes(),2)+"-"+xr(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:l,version:"0.1"}}return JSON.stringify(T)})}function Of(n,e,t){if(jo(n)){t&&t(0);let a=Tl(n,e);return t&&t(1),Promise.resolve(a)}return Ho(n)?Df(n,e,t):Promise.reject(new Error("invalid JSON wallet"))}function Bf(n,e){if(jo(n))return Tl(n,e);if(Ho(n))return Nf(n,e);throw new Error("invalid JSON wallet")}var Ff="wallet/5.7.0";var Lf=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},br=new E(Ff);function e5(n){return n!=null&&ie(n.privateKey,32)&&n.address!=null}function t5(n){let e=n.mnemonic;return e&&e.phrase}var on=class extends St{constructor(e,t){if(super(),e5(e)){let a=new mn(e.privateKey);if(B(this,"_signingKey",()=>a),B(this,"address",hn(this.publicKey)),this.address!==ce(e.address)&&br.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),t5(e)){let i=e.mnemonic;B(this,"_mnemonic",()=>({phrase:i.phrase,path:i.path||ma,locale:i.locale||"en"}));let r=this.mnemonic,s=Ct.fromMnemonic(r.phrase,null,r.locale).derivePath(r.path);hn(s.privateKey)!==this.address&&br.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else B(this,"_mnemonic",()=>null)}else{if(mn.isSigningKey(e))e.curve!=="secp256k1"&&br.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 mn(e);B(this,"_signingKey",()=>a)}B(this,"_mnemonic",()=>null),B(this,"address",hn(this.publicKey))}t&&!$t.isProvider(t)&&br.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 Ie(e).then(t=>{t.from!=null&&(ce(t.from)!==this.address&&br.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete t.from);let a=this._signingKey().signDigest(fe(ts(t)));return ts(t,a)})}signMessage(e){return Lf(this,void 0,void 0,function*(){return Ur(this._signingKey().signDigest(tr(e)))})}_signTypedData(e,t,a){return Lf(this,void 0,void 0,function*(){let i=yield gt.resolveNames(e,t,a,r=>(this.provider==null&&br.throwError("cannot resolve ENS names without a provider",E.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:r}),this.provider.resolveName(r)));return Ur(this._signingKey().signDigest(gt.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=Xn(16);e||(e={}),e.extraEntropy&&(t=j(Ce(fe(ye([t,e.extraEntropy])),0,16)));let a=gi(t,e.locale);return on.fromMnemonic(a,e.path,e.locale)}static fromEncryptedJson(e,t,a){return Of(e,t,a).then(i=>new on(i))}static fromEncryptedJsonSync(e,t){return new on(Bf(e,t))}static fromMnemonic(e,t,a){return t||(t=ma),new on(Ct.fromMnemonic(e,null,a).derivePath(t))}};function Uf(n,e){return ci(tr(n),e)}function Vf(n,e,t,a){return ci(gt.hash(n,e,t),a)}var ta={};qi(ta,{AlchemyProvider:()=>kr,AlchemyWebSocketProvider:()=>bs,AnkrProvider:()=>gs,BaseProvider:()=>ea,CloudflareProvider:()=>Ts,EtherscanProvider:()=>vs,FallbackProvider:()=>_s,Formatter:()=>X,InfuraProvider:()=>Er,InfuraWebSocketProvider:()=>As,IpcProvider:()=>Ll,JsonRpcBatchProvider:()=>iu,JsonRpcProvider:()=>Xt,JsonRpcSigner:()=>wr,NodesmithProvider:()=>Es,PocketProvider:()=>Ms,Provider:()=>$t,Resolver:()=>vr,StaticJsonRpcProvider:()=>xs,UrlJsonRpcProvider:()=>It,Web3Provider:()=>Cs,WebSocketProvider:()=>Ta,getDefaultProvider:()=>ru,getNetwork:()=>us,isCommunityResourcable:()=>Cl,isCommunityResource:()=>ps,showThrottleMessage:()=>Zn});var jf="networks/5.7.1";var Hf=new E(jf);function n5(n){return n&&typeof n.renetwork=="function"}function ba(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 ba(t)},e}function zo(n,e){let t=function(a,i){return a.JsonRpcProvider?new a.JsonRpcProvider(n,e):null};return t.renetwork=function(a){return zo(n,a)},t}var qf={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:ba("homestead")},Gf={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:ba("ropsten")},zf={chainId:63,name:"classicMordor",_defaultProvider:zo("https://www.ethercluster.com/mordor","classicMordor")},Go={unspecified:{chainId:0,name:"unspecified"},homestead:qf,mainnet:qf,morden:{chainId:2,name:"morden"},ropsten:Gf,testnet:Gf,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:zo("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:zf,classicTestnet:zf,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:zo("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 us(n){if(n==null)return null;if(typeof n=="number"){for(let a in Go){let i=Go[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=Go[n];return a==null?null:{name:a.name,chainId:a.chainId,ensAddress:a.ensAddress,_defaultProvider:a._defaultProvider||null}}let e=Go[n.name];if(!e)return typeof n.chainId!="number"&&Hf.throwArgumentError("invalid network chainId","network",n),n;n.chainId!==0&&n.chainId!==e.chainId&&Hf.throwArgumentError("network chainId mismatch","network",n);let t=n._defaultProvider||null;return t==null&&e._defaultProvider&&(n5(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 Wf="web/5.7.1";var a5=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})};function Kf(n,e){return a5(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 i5=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},In=new E(Wf);function Jf(n){return new Promise(e=>{setTimeout(e,n)})}function Ba(n,e){if(n==null)return null;if(typeof n=="string")return n;if(ia(n)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return Jt(n)}catch{}return W(n)}return n}function r5(n){return ve(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;In.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;In.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"},f=!1,x=2*60*1e3;if(typeof n=="string")l=n;else if(typeof n=="object"){if((n==null||n.url==null)&&In.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&&(f=!0);if(p.allowGzip=!!n.allowGzip,n.user!=null&&n.password!=null){l.substring(0,6)!=="https:"&&n.allowInsecureAuthentication!==!0&&In.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 "+er(ve(O))}}n.skipFetchSetup!=null&&(p.skipFetchSetup=!!n.skipFetchSetup),n.fetchOptions!=null&&(p.fetchOptions=_e(n.fetchOptions))}let I=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),_=l?l.match(I):null;if(_)try{let O={statusCode:200,statusMessage:"OK",headers:{"content-type":_[1]||"text/plain"},body:_[2]?Zi(_[3]):r5(_[3])},U=O.body;return t&&(U=t(O.body,O)),Promise.resolve(U)}catch(O){In.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(In.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 i5(this,void 0,void 0,function*(){for(let O=0;O=300)&&(S.cancel(),In.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){In.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 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 Rn(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(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()&&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(f){s()&&a(f)})}p()})}var Pl=_n(Xf());var Ae="providers/5.7.2";var ls=new E(Ae),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),f=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(f),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 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():ls.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 ce(e)}callAddress(e){if(!ie(e,32))return null;let t=ce(Ce(e,12));return t===lo?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 a=this.hex(e,t);return Nt(a)!==32?ls.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 me(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 Po(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&&ls.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=a,delete t.root):ls.throwArgumentError("invalid alt-root-status","value.root",t.root)}else t.root.length!==66&&ls.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 Cl(n){return n&&typeof n.isCommunityResource=="function"}function ps(n){return Cl(n)&&n.isCommunityResource()}var Zf=!1;function Zn(){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(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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},he=new E(Ae),f5=10;function ec(n){return n==null?"null":(Nt(n)!==32&&he.throwArgumentError("invalid topic","topic",n),n.toLowerCase())}function tc(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[ec(i)]=!0});let a=Object.keys(t);return a.sort(),a.join("|")}else return ec(e)}).join("&")}function c5(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 Tr(n){if(typeof n=="string"){if(n=n.toLowerCase(),Nt(n)===32)return"tx:"+n;if(n.indexOf(":")===-1)return n}else{if(Array.isArray(n))return"filter:*:"+tc(n);if(vo.isForkEvent(n))throw he.warn("not implemented"),new Error("not implemented");if(n&&typeof n=="object")return"filter:"+(n.address||"*")+":"+tc(n.topics||[])}throw new Error("invalid event - "+n)}function ys(){return new Date().getTime()}function nc(n){return new Promise(e=>{setTimeout(e,n)})}var m5=["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=c5(e[2]),i={};return a.length>0&&(i.topics=a),t&&t!=="*"&&(i.address=t),i}pollable(){return this.tag.indexOf(":")>=0||m5.indexOf(this.tag)>=0}},h5={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(n){return me(F.from(n).toHexString(),32)}function ac(n){return fa.encode(ye([n,Ce(Yt(Yt(n)),0,4)]))}var sc=new RegExp("^(ipfs)://(.*)$","i"),ic=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),sc,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function $o(n,e){try{return Jt(fs(n,e))}catch{}return null}function fs(n,e){if(n==="0x")return null;let t=F.from(Ce(n,e,e+32)).toNumber(),a=F.from(Ce(n,t,t+32)).toNumber();return Ce(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):he.throwArgumentError("unsupported IPFS format","link",n),`https://gateway.ipfs.io/ipfs/${n}`}function rc(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 x5(n){if(n.length%32===0)return n;let e=new Uint8Array(Math.ceil(n.length/32)*32);return e.set(n),e}function oc(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:_t([e,Sa(this.name),t||"0x"])},i=!1;(yield this.supportsWildcard())&&(i=!0,a.data=_t(["0x9061b923",oc([Yr(this.name),a.data])]));try{let r=yield this.provider.call(a);return j(r).length%32===4&&he.throwError("resolver threw error",E.errors.CALL_EXCEPTION,{transaction:a,data:r}),i&&(r=fs(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?fs(a,0):null})}_getAddress(e,t){let a=h5[String(e)];if(a==null&&he.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 ac(ye([[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 ac(ye([[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===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 a=this._getAddress(e,t);return a==null&&he.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 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([Il(64),Il(t.length),t]),t.length%32!==0&&(t=ye([t,me("0x",32-e.length%32)]));let a=yield this._fetchBytes("0x59d1d43c",W(t));return a==null||a==="0x"?null:Jt(a)})}},Rl=null,b5=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)):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 Rn(()=>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 us(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 Sn({url:p,errorPassThrough:!0},f,(_,v)=>(_.status=v.statusCode,_));if(x.data)return x.data;let I=x.message||"unknown error";if(x.status>=400&&x.status<500)return he.throwError(`response not found during CCIP fetch: ${I}`,E.errors.SERVER_ERROR,{url:l,errorMessage:I});s.push(I)}return he.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(ys()-r.respTime<=e)return r.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}let t=ys(),a=Ie({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=ys();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=b5++,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)he.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${a})`),this.emit("error",he.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 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 nc(0),this._network;let a=he.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=ys();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,f=function(){return p?!0:(p=!0,l.forEach(I=>{I()}),!1)},x=I=>{I.confirmations{this.removeListener(e,x)}),i){let I=i.startBlock,_=null,v=S=>ue(this,void 0,void 0,function*(){p||(yield nc(1e3),this.getTransactionCount(i.from).then(L=>ue(this,void 0,void 0,function*(){if(!p){if(L<=i.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),l.push(()=>{this.removeListener("block",v)})}if(typeof a=="number"&&a>0){let I=setTimeout(()=>{f()||o(he.makeError("timeout exceeded",E.errors.TIMEOUT,{timeout:a}))},a);I.unref&&I.unref(),l.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",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 Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getBalance",a);try{return F.from(i)}catch(r){return he.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 Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getTransactionCount",a);try{return F.from(i).toNumber()}catch(r){return he.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 Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getCode",a);try{return W(i)}catch(r){return he.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 Ie({address:this._getAddress(e),blockTag:this._getBlockTag(a),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,a){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&&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&&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)),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 Ie(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 Ie(t))})}_call(e,t,a){return ue(this,void 0,void 0,function*(){a>=f5&&he.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"&&Nt(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(),f=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&&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 Rn(()=>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 Rn(()=>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 Ie({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&&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 a=yield this._getResolver(t,"getResolver");if(a!=null){let i=new vr(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||he.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"+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(a){if(ie(e))throw a}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",a=yield this._getResolver(t,"lookupAddress");if(a==null)return null;let i=$o(yield this.call({to:a,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 vr(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 a=yield t.getAvatar();return a==null?null:a.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,a){let i=new Nl(Tr(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=Tr(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=Tr(e);return this._events.filter(a=>a.tag===t).length}listeners(e){if(e==null)return this._events.map(a=>a.listener);let t=Tr(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=Tr(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=Tr(e);this._events=this._events.filter(i=>i.tag!==a?!0:(t.push(i),!1))}return t.forEach(a=>{this._stopEvent(a)}),this}};var ga=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},At=new E(Ae),g5=["call","estimateGas"];function ms(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=ms(n[t],e);if(a)return a}return null}if(typeof n=="string")try{return ms(JSON.parse(n),e)}catch{}return null}function dc(n,e,t){let a=t.transaction||t.signedTransaction;if(n==="call"){let r=ms(e,!0);if(r)return r.data;At.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=ms(e.body,!1);r==null&&(r=ms(e,!1)),r&&At.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)&&At.throwError("insufficient funds for intrinsic transaction cost",E.errors.INSUFFICIENT_FUNDS,{error:e,method:n,transaction:a}),i.match(/nonce (is )?too low/i)&&At.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)&&At.throwError("replacement fee too low",E.errors.REPLACEMENT_UNDERPRICED,{error:e,method:n,transaction:a}),i.match(/only replay-protected/i)&&At.throwError("legacy pre-eip-155 transactions not supported",E.errors.UNSUPPORTED_OPERATION,{error:e,method:n,transaction:a}),g5.indexOf(n)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&At.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 uc(n){return new Promise(function(e){setTimeout(e,n)})}function T5(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 cs(n){return n&&n.toLowerCase()}var Dl={},wr=class extends St{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)):At.throwArgumentError("invalid address or index","addressOrIndex",a)}connect(e){return At.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&&At.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=>ga(this,void 0,void 0,function*(){if(a==null)return null;let i=yield this.provider.resolveName(a);return i==null&&At.throwArgumentError("provided ENS name resolves to null","tx.to",a),i}))),Ie({tx:Ie(e),sender:t}).then(({tx:a,sender:i})=>{a.from!=null?a.from.toLowerCase()!==i&&At.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)&&At.throwError("user rejected transaction",E.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:a}),dc("sendTransaction",s,r)))})}signTransaction(e){return At.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),a=yield this.sendUncheckedTransaction(e);try{return yield Rn(()=>ga(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 ga(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(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)&&At.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"signMessage",from:a,messageData:e}),i}})}_legacySignMessage(e){return ga(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(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)&&At.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:a,messageData:e}),i}})}_signTypedData(e,t,a){return ga(this,void 0,void 0,function*(){let i=yield gt.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(gt.getPayload(i.domain,t,i.value))])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&At.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,a=yield this.getAddress();return t.send("personal_unlockAccount",[a.toLowerCase(),e,null])})}},Ol=class extends wr{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)}))}},v5={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0},Xt=class extends ea{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=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 ga(this,void 0,void 0,function*(){yield uc(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(a){return At.throwError("could not detect network",E.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:a})}}return At.throwError("could not detect network",E.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new wr(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:mt(a),provider:this});let i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];let r=Sn(this.connection,JSON.stringify(a),T5).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",[cs(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[cs(t.address),t.blockTag]];case"getCode":return["eth_getCode",[cs(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[cs(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 a=ht(this.constructor,"hexlifyTransaction");return["eth_call",[a(t.transaction,{from:!0}),t.blockTag]]}case"estimateGas":{let a=ht(this.constructor,"hexlifyTransaction");return["eth_estimateGas",[a(t.transaction,{from:!0})]]}case"getLogs":return t.filter&&t.filter.address!=null&&(t.filter.address=cs(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 a=this.prepareRequest(e,t);a==null&&At.throwError(e+" not implemented",E.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(a[0],a[1])}catch(i){return dc(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 uc(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(v5);if(t)for(let r in t)t[r]&&(a[r]=!0);Wi(e,a);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 _r=null;try{if(_r=WebSocket,_r==null)throw new Error("inject please")}catch{let e=new E(Ae);_r=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Qo=new E(Ae),w5=1,Ta=class extends Xt{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 _r(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){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 Bl(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 a=w5++;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===_r.CONNECTING&&(yield new Promise(e=>{this.websocket.onopen=function(){e(!0)},this.websocket.onerror=function(){e(!1)}})),this.websocket.close(1e3)})}};var _5=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},hs=new E(Ae),xs=class extends Xt{detectNetwork(){let e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return _5(this,void 0,void 0,function*(){let t=this.network;return t==null&&(t=yield e.detectNetwork.call(this),t||hs.throwError("no network detected",E.errors.UNKNOWN_ERROR,{}),this._network==null&&(B(this,"_network",t),this.emit("network",t,null))),t})}},It=class extends xs{constructor(e,t){hs.checkAbstract(new.target,It),e=ht(new.target,"getNetwork")(e),t=ht(new.target,"getApiKey")(t);let a=ht(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(){hs.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(e){return hs.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 hs.throwError("not implemented; sub-classes must override getUrl",E.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}};var lc=new E(Ae),Yo="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC",bs=class extends Ta{constructor(e,t){let a=new kr(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===Yo}},kr=class extends It{static getWebSocketProvider(e,t){return new bs(e,t)}static getApiKey(e){return e==null?Yo:(e&&typeof e!="string"&&lc.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:lc.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+a+t,throttleCallback:(i,r)=>(t===Yo&&Zn(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===Yo}};var k5=new E(Ae),Xo="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function A5(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 k5.throwArgumentError("unsupported network","name",n)}var gs=class extends It{isCommunityResource(){return this.apiKey===Xo}static getApiKey(e){return e??Xo}static getUrl(e,t){t==null&&(t=Xo);let a={allowGzip:!0,url:"https://"+A5(e.name)+t,throttleCallback:(i,r)=>(t.apiKey===Xo&&Zn(),Promise.resolve(!0))};return t.projectSecret!=null&&(a.user="",a.password=t.projectSecret),a}};var E5=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},pc=new E(Ae),Ts=class extends It{static getApiKey(e){return e!=null&&pc.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:pc.throwArgumentError("unsupported network","network",arguments[0])}return a}perform(e,t){let a=Object.create(null,{perform:{get:()=>super.perform}});return E5(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 Zo=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Fa=new E(Ae);function yc(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=Un(W(a)):t==="accessList"?a="["+sn(a).map(i=>`{address:"${i.address}",storageKeys:["${i.storageKeys.join('","')}"]}`).join(",")+"]":a=W(a),e[t]=a)}return e}function M5(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 fc(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 cc(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;Fa.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/)&&Fa.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/)&&Fa.throwError("nonce has already been used",E.errors.NONCE_EXPIRED,{error:e,method:n,transaction:t}),a.match(/another transaction with same nonce/)&&Fa.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/)&&Fa.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 vs=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 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 Zo(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"?fc:M5;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 Sn(o,l,s||fc);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 a=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=>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=yc(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=yc(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=cc(t.filter.fromBlock)),t.filter.toBlock&&(i.toBlock=cc(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(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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Ti=new E(Ae);function eu(){return new Date().getTime()}function mc(n){let e=null;for(let t=0;te?null:(a+i)/2}function Ar(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=>Ar(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=Ar(a),JSON.stringify(t)+":"+a}).join(",")+"}"}throw new Error("unknown value type: "+typeof n)}var C5=1;function xc(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 I5=[E.errors.CALL_EXCEPTION,E.errors.INSUFFICIENT_FUNDS,E.errors.NONCE_EXPIRED,E.errors.REPLACEMENT_UNDERPRICED,E.errors.UNPREDICTABLE_GAS_LIMIT],S5=["address","args","errorArgs","errorSignature","method","transaction"];function tu(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 R5(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 P5(n,e,t){let a=Ar;switch(e){case"getBlockNumber":return function(i){let r=i.map(o=>o.result),s=hc(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 hc(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,Ar(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)),Ar(i))}:a=function(i){return i==null?null:Ar(i)};break;default:throw new Error("unknown method: "+e)}return R5(a,n.quorum)}function ws(n,e){return nu(this,void 0,void 0,function*(){let t=n.provider;return t.blockNumber!=null&&t.blockNumber>=e||e===-1?t:Rn(()=>new Promise((a,i)=>{setTimeout(function(){return t.blockNumber>=e?a(t):n.cancelled?a(null):a(void 0)},0)}),{oncePoll:t})})}function N5(n,e,t,a){return nu(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 ws(n,e)),i[t](a.address,a.blockTag||"latest");case"getStorageAt":return a.blockTag&&ie(a.blockTag)&&(i=yield ws(n,e)),i.getStorageAt(a.address,a.position,a.blockTag||"latest");case"getBlock":return a.blockTag&&ie(a.blockTag)&&(i=yield ws(n,e)),i[a.includeTransactions?"getBlockWithTransactions":"getBlock"](a.blockTag||a.blockHash);case"call":case"estimateGas":return a.blockTag&&ie(a.blockTag)&&(i=yield ws(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 ws(n,e)),i.getLogs(r)}}return Ti.throwError("unknown method error",E.errors.UNKNOWN_ERROR,{method:t,params:a})})}var _s=class extends ea{constructor(e,t){e.length===0&&Ti.throwArgumentError("missing providers","providers",e);let a=e.map((s,o)=>{if($t.isProvider(s)){let f=ps(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=ps(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=a.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=mc(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 nu(this,void 0,void 0,function*(){let e=yield Promise.all(this.providerConfigs.map(t=>t.provider.getNetwork()));return mc(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=N5(_,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 _=a(x);if(_!==void 0)return i.forEach(v=>{v.staller&&v.staller.cancel(),v.cancelled=!0}),_;o||(yield xc(100).getPromise()),o=!1}let I=i.reduce((_,v)=>{if(!v.done||v.error==null)return _;let S=v.error.code;return I5.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={};S5.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=>tu(l)),provider:this})})}};var Ll=null;var au=new E(Ae),ks="84842078b09946638c03157f83405213",As=class extends Ta{constructor(e,t){let a=new Er(e,t),i=a.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",a.projectId),B(this,"projectId",a.projectId),B(this,"projectSecret",a.projectSecret)}isCommunityResource(){return this.projectId===ks}},Er=class extends It{static getWebSocketProvider(e,t){return new As(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?(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 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:au.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===ks&&Zn(),Promise.resolve(!0))};return t.projectSecret!=null&&(i.user="",i.password=t.projectSecret),i}isCommunityResource(){return this.projectId===ks}};var iu=class extends Xt{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:mt(o),provider:this}),Sn(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 I=new Error(x.error.message);I.code=x.error.code,I.data=x.error.data,p.reject(I)}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(Ae),D5="ETHERS_JS_SHARED",Es=class extends It{static getApiKey(e){return e&&typeof e!="string"&&Ul.throwArgumentError("invalid apiKey","apiKey",e),e||D5}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 bc=new E(Ae),gc="62e1ad51b37b8e00394bda3b",Ms=class extends It{static getApiKey(e){let t={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return e==null?t.applicationId=gc:typeof e=="string"?t.applicationId=e:e.applicationSecretKey!=null?(t.applicationId=e.applicationId,t.applicationSecretKey=e.applicationSecretKey):e.applicationId?t.applicationId=e.applicationId:bc.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:bc.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===gc}};var Tc=new E(Ae),O5=1;function vc(n,e){let t="Web3LegacyFetcher";return function(a,i){let r={method:a,params:i,id:O5++,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 B5(n){return function(e,t){t==null&&(t=[]);let a={method:e,params:t};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:mt(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 Cs=class extends Xt{constructor(e,t){e==null&&Tc.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=B5(e)):e.sendAsync?i=vc(e,e.sendAsync.bind(e)):e.send?i=vc(e,e.send.bind(e)):Tc.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 wc=new E(Ae);function ru(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 Xt(n);case"ws":case"wss":return new Ta(n);default:wc.throwArgumentError("unsupported URL scheme","network",n)}}let t=us(n);return(!t||!t._defaultProvider)&&wc.throwError("unsupported getDefaultProvider network",E.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:n}),t._defaultProvider({FallbackProvider:_s,AlchemyProvider:kr,AnkrProvider:gs,CloudflareProvider:Ts,EtherscanProvider:vs,InfuraProvider:Er,JsonRpcProvider:Xt,NodesmithProvider:Es,PocketProvider:Ms,Web3Provider:Cs,IpcProvider:null},e)}var te={};qi(te,{AbiCoder:()=>Xi,ConstructorFragment:()=>Dt,ErrorFragment:()=>tn,EventFragment:()=>Ht,FormatTypes:()=>ge,Fragment:()=>qt,FunctionFragment:()=>Ot,HDNode:()=>Ct,Indexed:()=>ua,Interface:()=>Ra,LogDescription:()=>nr,Logger:()=>E,ParamType:()=>yt,RLP:()=>to,SigningKey:()=>mn,SupportedAlgorithm:()=>Yn,TransactionDescription:()=>ar,TransactionTypes:()=>Ro,UnicodeNormalizationForm:()=>Gt,Utf8ErrorFuncs:()=>mo,Utf8ErrorReason:()=>Bt,_TypedDataEncoder:()=>gt,_fetchData:()=>El,_toEscapedUtf8String:()=>Rd,accessListify:()=>sn,arrayify:()=>j,base58:()=>fa,base64:()=>Fd,checkProperties:()=>Wi,checkResultErrors:()=>Ji,commify:()=>Sc,computeAddress:()=>hn,computeHmac:()=>ca,computePublicKey:()=>es,concat:()=>ye,deepCopy:()=>mt,defaultAbiCoder:()=>$r,defaultPath:()=>ma,defineReadOnly:()=>B,dnsEncode:()=>Yr,entropyToMnemonic:()=>gi,fetchJson:()=>Sn,formatBytes32String:()=>Pd,formatEther:()=>Rc,formatUnits:()=>Vl,getAccountPath:()=>wf,getAddress:()=>ce,getContractAddress:()=>li,getCreate2Address:()=>Oy,getIcapAddress:()=>Dy,getJsonWalletAddress:()=>vl,getStatic:()=>ht,hashMessage:()=>tr,hexConcat:()=>_t,hexDataLength:()=>Nt,hexDataSlice:()=>Ce,hexStripZeros:()=>Td,hexValue:()=>Un,hexZeroPad:()=>me,hexlify:()=>W,id:()=>nn,isAddress:()=>Ny,isBytes:()=>un,isBytesLike:()=>ia,isHexString:()=>ie,isValidMnemonic:()=>vf,isValidName:()=>Ud,joinSignature:()=>Ur,keccak256:()=>fe,mnemonicToEntropy:()=>hr,mnemonicToSeed:()=>cl,namehash:()=>Sa,nameprep:()=>Bd,parseBytes32String:()=>Nd,parseEther:()=>Pc,parseTransaction:()=>Po,parseUnits:()=>jl,poll:()=>Rn,randomBytes:()=>Xn,recoverAddress:()=>ci,recoverPublicKey:()=>So,resolveProperties:()=>Ie,ripemd160:()=>as,serializeTransaction:()=>ts,sha256:()=>Yt,sha512:()=>ll,shallowCopy:()=>_e,shuffled:()=>ss,solidityKeccak256:()=>Ac,solidityPack:()=>su,soliditySha256:()=>Ec,splitSignature:()=>Vn,stripZeros:()=>Zt,toUtf8Bytes:()=>ve,toUtf8CodePoints:()=>Ia,toUtf8String:()=>Jt,verifyMessage:()=>Uf,verifyTypedData:()=>Vf,zeroPad:()=>si});var _c="solidity/5.7.0";var F5=new RegExp("^bytes([0-9]+)$"),L5=new RegExp("^(u?int)([0-9]*)$"),U5=new RegExp("^(.*)\\[([0-9]*)\\]$"),V5="0000000000000000000000000000000000000000000000000000000000000000",Mr=new E(_c);function kc(n,e,t){switch(n){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 a=n.match(L5);if(a){let i=parseInt(a[2]||"256");return(a[2]&&String(i)!==a[2]||i%8!==0||i===0||i>256)&&Mr.throwArgumentError("invalid number type","type",n),t&&(i=256),e=F.from(e).toTwos(i),si(e,i/8)}if(a=n.match(F5),a){let i=parseInt(a[1]);return(String(i)!==a[1]||i===0||i>32)&&Mr.throwArgumentError("invalid bytes type","type",n),j(e).byteLength!==i&&Mr.throwArgumentError(`invalid value for ${n}`,"value",e),t?j((e+V5).substring(0,66)):e}if(a=n.match(U5),a&&Array.isArray(e)){let i=a[1];parseInt(a[2]||String(e.length))!=e.length&&Mr.throwArgumentError(`invalid array length for ${n}`,"value",e);let s=[];return e.forEach(function(o){s.push(kc(i,o,!0))}),ye(s)}return Mr.throwArgumentError("invalid type","type",n)}function su(n,e){n.length!=e.length&&Mr.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);let t=[];return n.forEach(function(a,i){t.push(kc(a,e[i]))}),W(ye(t))}function Ac(n,e){return fe(su(n,e))}function Ec(n,e){return Yt(su(n,e))}var Mc="units/5.7.0";var Cc=new E(Mc),Ic=["wei","kwei","mwei","gwei","szabo","finney","ether"];function Sc(n){let e=String(n).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||n==="."||n==="-.")&&Cc.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=Ic.indexOf(e);t!==-1&&(e=3*t)}return zi(n,e??18)}function jl(n,e){if(typeof n!="string"&&Cc.throwArgumentError("value must be a string","value",n),typeof e=="string"){let t=Ic.indexOf(e);t!==-1&&(e=3*t)}return ln(n,e??18)}function Rc(n){return Vl(n,18)}function Pc(n){return jl(n,18)}var ou="ethers/5.7.2";var Nc=new E(ou);try{let n=window;n._ethers==null&&(n._ethers=Hl)}catch{}var Pn;(function(n){n.Mainnet="Mainnet",n.Custom="Custom",n.Gnosis="Xdai",n.Goerli="Goerli",n.Xdai="Xdai",n.XdaiQa="XdaiQa",n.ArbitrumOne="ArbitrumOne",n.ArbitrumSepolia="ArbitrumSepolia"})(Pn||(Pn={}));var Dc;(function(n){n[n.Custom=0]="Custom",n[n.Mainnet=1]="Mainnet",n[n.Goerli=5]="Goerli",n[n.Gnosis=100]="Gnosis",n[n.Xdai=100]="Xdai",n[n.XdaiQa=100]="XdaiQa",n[n.ArbitrumSepolia=421614]="ArbitrumSepolia",n[n.ArbitrumOne=42161]="ArbitrumOne"})(Dc||(Dc={}));var uu;(function(n){n.Mainnet="0x5346D0f80e2816FaD329F2c140c870ffc3c3E2Ef",n.Goerli="0x79073fc2117dD054FCEdaCad1E7018C9CbE3ec0B",n.Xdai="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.XdaiQa="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.Custom="",n.ArbitrumOne="0xcccccdcc0ccf6c708d860e19353c5f9a49accccc",n.ArbitrumSepolia="0x7777494e3d8cce0D3570E21FEf820F9Fee077777"})(uu||(uu={}));var Cr;(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",n.ArbitrumOne="https://app.colony.io/reputation/arbitrum-one",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/reputation/arbitrum-sepolia"})(Cr||(Cr={}));var du;(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="",n.ArbitrumOne="https://app.colony.io/metatransaction/arbitrum-one",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/metatransaction/arbitrum-sepolia"})(du||(du={}));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="",n.ArbitrumOne="https://app.colony.io/public-rpc/",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/public-rpc/"})(ql||(ql={}));var Is;(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",n.ArbitrumOne=".colony.joincolony.arbitrum",n.ArbitrumSepolia=".colony.joincolony.sepolia"})(Is||(Is={}));var Ss;(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",n.ArbitrumOne=".user.joincolony.arbitrum",n.ArbitrumSepolia=".user.joincolony.sepolia"})(Ss||(Ss={}));var Gl;(function(n){let e;(function(i){i.ETH="0x0000000000000000000000000000000000000000",i.CLNY="0x3E828ac5C480069D4765654Fb4b8733b910b13b2",i.USDC="0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"})(e=n.Mainnet||(n.Mainnet={}));let t;(function(i){i.XDAI="0x0000000000000000000000000000000000000000",i.CLNY="0xc9B6218AffE8Aba68a13899Cbf7cF7f14DDd304C",i.USDC="0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83"})(t=n.Gnosis||(n.Gnosis={}));let a;(function(i){i.ETH="0x0000000000000000000000000000000000000000",i.CLNY="0xcccccdcc0ccf6c708d860e19353c5f9a49accccc",i.USDC="0xaf88d065e77c8cC2239327C5EDb3A432268e5831"})(a=n.ArbitrumOne||(n.ArbitrumOne={}))})(Gl||(Gl={}));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 zt;(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"})(zt||(zt={}));var Wl="0x12345678",zl;(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"})(zl||(zl={}));var Ne;(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"})(Ne||(Ne={}));var we;(function(n){n.FundingQueue="FundingQueue",n.IVotingReputation="IVotingReputation",n.MultisigPermissions="MultisigPermissions",n.OneTxPayment="OneTxPayment",n.ReputationBootstrapper="ReputationBootstrapper",n.StagedExpenditure="StagedExpenditure",n.StakedExpenditure="StakedExpenditure",n.StreamingPayments="StreamingPayments",n.TokenSupplier="TokenSupplier",n.VotingReputation="VotingReputation"})(we||(we={}));var Kl=[{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(Kl)}static connect(e,t){return new oe(e,Kl,t)}};xe(vi,"abi",Kl);var Jl=[{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"}],wi=class{static createInterface(){return new te.Interface(Jl)}static connect(e,t){return new oe(e,Jl,t)}};xe(wi,"abi",Jl);var Oc=(n,e)=>{throw new Error(`${e}: ${n}`)},lu=n=>n!=null;var{keccak256:H5,toUtf8Bytes:q5}=te,{MaxUint256:G5}=xt;var Ir=n=>te.formatEther(n),pu=n=>te.parseEther(n),yu=n=>pu(n[0]),$l=n=>{let e=n.reduce((t,a)=>t|1<{let e=F.from(n);return[...Array(Ne.LAST_ROLE).keys()].map(t=>e.shr(t).mask(1).eq(1)?t:null).filter(lu)},_i=async(n,e,t,a)=>{if(F.from(t).eq(F.from(a)))return G5;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)},La=n=>H5(q5(n));var Sr=async(n,e)=>(await wi.connect(n,e).version()).toNumber(),Ql=(n,e)=>n.map(t=>{try{return e.parseLog(t)}catch{return null}}).filter(lu);var{hexDataSlice:Yl}=te,{MaxUint256:z5}=xt,Bc=n=>{let e=Yl(n,0,3),t=F.from(Yl(n,4,35)),a=F.from(Yl(n,36,67));return{sig:e,permissionDomainId:t,childSkillIndex:a}},Fc=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),z5,r];let o=F.from(ke.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 _i(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]},W5=async(n,e,t,a,i)=>{let r=await Promise.all(a.map(s=>Fc(n,e,t,s,i)));for(let s=0;sArray.isArray(a)?a.length===1?na(n,e,t,a[0],i):W5(n,e,t,a,i):Fc(n,e,t,a,i);var{MaxUint256:Lc}=xt,{AddressZero:K5}=xt;async function J5(n,e){let t;try{return t=await n.getCapabilityRoles(te.hexZeroPad(e,4)),fu(t)}catch{return[]}}async function Rs(n,e,t,a,i,r,s){let o,{skillId:l}=await e.getDomain(i),{sig:p,permissionDomainId:f,childSkillIndex:x}=Bc(s),I=vi.connect(r,a.signer||a.provider),_=await J5(I,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 n.getChildSkillId(U,x);if(H.eq(l))o=Lc;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,K5);return{actionCid:o,key:v,value:S,branchMask:L,siblings:O}}var{AddressZero:$5}=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,a){this.colony=t,this.network=e;let i=a?.network||Pn.ArbitrumOne;this.endpointUrl=a?.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,a){let i=await this.getBaseEndpoint(a),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,a){let i=await this.getBaseEndpoint(a),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 a=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${a}/${i}`;return aa.fetchReputation(r)}async getTotalReputation(e,t){let a=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${a}/${i}/${$5}/noProof`,s=await aa.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 Et=n=>Array.from(Array(n-1)).map((e,t)=>t+1);var Uc=10,Ck=Et(Uc),Vc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},jc=Uc-1;var Hc=3,Rk=Et(Hc),qc={1:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],2:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]},Gc=Hc-1;var zc=10,Dk=Et(zc),Wc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Kc=zc-1;var Jc=7,Fk=Et(Jc),$c={1:[],2:[],3:[],4:[],5:[],6:[]},Qc=Jc-1;var Yc=8,Vk=Et(Yc),Xc={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3],6:[1,2,3],7:[1,2,3]},Zc=Yc-1;var em=5,qk=Et(em),tm={1:[1,2,3,4,5,6,7,8,9,10,11,12,13],2:[1,2,3,4,5,6,7,8,9,10,11,12,13],3:[1,2,3,4,5,6,7,8,9,10,11,12,13],4:[1,2,3,4,5,6,7,8,9,10,11,12,13]},nm=em-1;var am=7,Wk=Et(am),im={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3],6:[1,2,3]},rm=am-1;var sm=10,$k=Et(sm),om={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},um=sm-1;var dm=14,Xk=Et(dm),Xl={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],11:[1,2,3,4,5,6],12:[1,2,3,4,5,6],13:[1,2,3,4,5,6]},Zl=dm-1;var lm=18,Q5=Et(lm),tA=lm-1;var Y5=(n,e)=>{switch(n){case we.FundingQueue:return Vc[e];case we.IVotingReputation:return Xl[e];case we.MultisigPermissions:return qc[e];case we.OneTxPayment:return Wc[e];case we.ReputationBootstrapper:return $c[e];case we.StagedExpenditure:return tm[e];case we.StakedExpenditure:return Xc[e];case we.StreamingPayments:return im[e];case we.TokenSupplier:return om[e];case we.VotingReputation:return Xl[e];default:return Oc(n,"Could not find extension with name")}},va=(n,e,t)=>{let a=Y5(n,e);return!!a&&!a.includes(t)};var cu={[we.FundingQueue]:jc,[we.IVotingReputation]:Zl,[we.MultisigPermissions]:Gc,[we.OneTxPayment]:Kc,[we.ReputationBootstrapper]:Qc,[we.StagedExpenditure]:nm,[we.StakedExpenditure]:Zc,[we.StreamingPayments]:rm,[we.TokenSupplier]:um,[we.VotingReputation]:Zl};var P6=_n(pm(),1);var vp=_n(I6(),1);var Re;(function(n){n.DEFAULT="default",n.Annotation="annotation",n.Colony="colony",n.Decision="decision",n.Domain="domain",n.Misc="misc"})(Re||(Re={}));var Tp=2,gp;(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"})(gp||(gp={}));var S6=n=>`Validation error(s): ${n.map(t=>`Error in ${t.path}. Seen: ${t.value}, expected: ${t.expected}`).join(` -`)}`,l1=n=>({...n,isWhitelistActivated:n.isWhitelistActivated||!1,colonySafes:n.colonySafes||[],colonyTokens:n.colonyTokens||[],verifiedAddresses:n.verifiedAddresses||[]}),wp=(n,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&&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"?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 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}))&&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"?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: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}})(n);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 a=S6(t.errors);throw new Error(a)};var R6=(n,e)=>{let t=n===Re.Colony?l1(e):e,a=(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&&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"?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 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}))&&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"?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: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}})({name:n,data:t,version:Tp});if(!a.success){let i=S6(a.errors);throw new Error(i)}return a.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,P6.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]:""},Or=class{adapter;constructor(e){this.adapter=e||new kp}static eventSupportsMetadata(e){return!!Object.keys(Us).includes(e)}async getMetadata(e,t){let a=this.adapter.getIpfsUrl(e),r=await(await Ap(a)).json();return wp(r,t)}async getMetadataForEvent(e,t){let a=this.adapter.getIpfsUrl(t),r=await(await Ap(a)).json(),s=Object.entries(Us).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),a=await Ap(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=R6(e,t),i=JSON.stringify(a);return this.adapter.uploadJson(i)}};var AE=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)}};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:"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)}};xe(wn,"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:"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(Cp)}static connect(e,t){return new oe(e,Cp,t)}};xe(Ii,"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:"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:"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:[{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:"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:"returnData",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",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:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],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:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"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:[],name:"unlock",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"}],N6="0x60c060405234801561001057600080fd5b5060405161205738038061205783398101604081905261002f91610307565b60008060018161003d6101ab565b6001600160a01b031681526020810191909152604001600090812091909155556100656101ab565b600480546001600160a01b0319166001600160a01b039290921691909117905561008d6101ab565b6001600160a01b03167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a260066100ce8482610413565b5060056100db8382610413565b5060ff81166080526007805460ff1916600117905560405146907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f90610123906006906104d1565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051601f19818403018152919052805160209091012060a0525061054692505050565b60003633301480156101be575060348110155b1561024757600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e881146102365733935050505090565b5001516001600160a01b0316919050565b3391505090565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261027557600080fd5b81516001600160401b0381111561028e5761028e61024e565b604051601f8201601f19908116603f011681016001600160401b03811182821017156102bc576102bc61024e565b6040528181528382016020018510156102d457600080fd5b60005b828110156102f3576020818601810151838301820152016102d7565b506000918101602001919091529392505050565b60008060006060848603121561031c57600080fd5b83516001600160401b0381111561033257600080fd5b61033e86828701610264565b602086015190945090506001600160401b0381111561035c57600080fd5b61036886828701610264565b925050604084015160ff8116811461037f57600080fd5b809150509250925092565b600181811c9082168061039e57607f821691505b6020821081036103be57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561040e57806000526020600020601f840160051c810160208510156103eb5750805b601f840160051c820191505b8181101561040b57600081556001016103f7565b50505b505050565b81516001600160401b0381111561042c5761042c61024e565b6104408161043a845461038a565b846103c4565b6020601f821160018114610474576000831561045c5750848201515b600019600385901b1c1916600184901b17845561040b565b600084815260208120601f198516915b828110156104a45787850151825560209485019460019092019101610484565b50848210156104c25786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b60008083546104df8161038a565b6001821680156104f6576001811461050b5761053b565b60ff198316865281151582028601935061053b565b86600052602060002060005b8381101561053357815488820152600190910190602001610517565b505081860193505b509195945050505050565b60805160a051611ae5610572600039600081816102e10152610f870152600061029b0152611ae56000f3fe6080604052600436106101815760003560e01c80637a9e5e4b116100d1578063a69df4b51161008a578063bf7e214f11610064578063bf7e214f146104b1578063cf309012146104d1578063d505accf146104eb578063dd62ed3e1461050b57600080fd5b8063a69df4b51461047c578063a9059cbb14610491578063b3eac1d8146103b957600080fd5b80637a9e5e4b146103995780637ecebe00146103b95780638da5cb5b146103ef57806395d89b41146104275780639dc29fac1461043c578063a0712d681461045c57600080fd5b806330adf81f1161013e57806340c10f191161011857806340c10f191461030357806342966c68146103235780636281133d1461034357806370a082311461036357600080fd5b806330adf81f14610255578063313ce567146102895780633644e515146102cf57600080fd5b806306fdde0314610186578063095ea7b3146101b15780630c53c51c146101e157806313af4035146101f457806318160ddd1461021657806323b872dd14610235575b600080fd5b34801561019257600080fd5b5061019b610551565b6040516101a891906115b0565b60405180910390f35b3480156101bd57600080fd5b506101d16101cc3660046115d8565b6105df565b60405190151581526020016101a8565b61019b6101ef3660046116bf565b610672565b34801561020057600080fd5b5061021461020f366004611733565b610859565b005b34801561022257600080fd5b506000545b6040519081526020016101a8565b34801561024157600080fd5b506101d1610250366004611750565b6108dc565b34801561026157600080fd5b506102277f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b34801561029557600080fd5b506102bd7f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101a8565b3480156102db57600080fd5b506102277f000000000000000000000000000000000000000000000000000000000000000081565b34801561030f57600080fd5b5061021461031e3660046115d8565b610950565b34801561032f57600080fd5b5061021461033e366004611791565b610a3f565b34801561034f57600080fd5b506101d161035e3660046117aa565b610a53565b34801561036f57600080fd5b5061022761037e366004611733565b6001600160a01b031660009081526001602052604090205490565b3480156103a557600080fd5b506102146103b4366004611733565b610ba7565b3480156103c557600080fd5b506102276103d4366004611733565b6001600160a01b031660009081526008602052604090205490565b3480156103fb57600080fd5b5060045461040f906001600160a01b031681565b6040516001600160a01b0390911681526020016101a8565b34801561043357600080fd5b5061019b610c18565b34801561044857600080fd5b506102146104573660046115d8565b610c25565b34801561046857600080fd5b50610214610477366004611791565b610e1c565b34801561048857600080fd5b50610214610e54565b34801561049d57600080fd5b506101d16104ac3660046115d8565b610e87565b3480156104bd57600080fd5b5060035461040f906001600160a01b031681565b3480156104dd57600080fd5b506007546101d19060ff1681565b3480156104f757600080fd5b50610214610506366004611831565b610ea2565b34801561051757600080fd5b506102276105263660046118a0565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6006805461055e906118d9565b80601f016020809104026020016040519081016040528092919081815260200182805461058a906118d9565b80156105d75780601f106105ac576101008083540402835291602001916105d7565b820191906000526020600020905b8154815290600101906020018083116105ba57829003601f168201915b505050505081565b600081600260006105ee611191565b6001600160a01b0390811682526020808301939093526040918201600090812091881680825291909352912091909155610626611191565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161066091815260200190565b60405180910390a35060015b92915050565b60606106a186610697886001600160a01b031660009081526008602052604090205490565b4688888888610a53565b6107045760405162461bcd60e51b815260206004820152602960248201527f6d6574617472616e73616374696f6e2d7369676e65722d7369676e617475726560448201526805adad2e6dac2e8c6d60bb1b60648201526084015b60405180910390fd5b61070d86611234565b6000306001600160a01b0316867f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e88960405160200161074e93929190611913565b60408051601f19818403018152908290526107689161194c565b6000604051808303816000865af19150503d80600081146107a5576040519150601f19603f3d011682016040523d82523d6000602084013e6107aa565b606091505b50925090508061080d5760405162461bcd60e51b815260206004820152602860248201527f636f6c6f6e792d6d65746174782d66756e6374696f6e2d63616c6c2d756e737560448201526718d8d95cdcd99d5b60c21b60648201526084016106fb565b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b87610837611191565b8860405161084793929190611968565b60405180910390a15095945050505050565b610876610864611191565b6000356001600160e01b031916611260565b6108925760405162461bcd60e51b81526004016106fb9061199d565b600480546001600160a01b0319166001600160a01b0383169081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60075460009060ff161561093d576108f5610864611191565b61093d5760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b61094884848461133b565b949350505050565b61095b610864611191565b6109775760405162461bcd60e51b81526004016106fb9061199d565b6001600160a01b0382166000908152600160205260408120805483929061099f9084906119e1565b92505081905550806000808282546109b791906119e1565b90915550506040518181526001600160a01b038316907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a26040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b610a50610a4a611191565b82610c25565b50565b600080610ad088308989604051602001610a7094939291906119f4565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b6040805160008082526020820180845284905260ff87169282019290925260608101889052608081018790529192509060019060a0016020604051602081039080840390855afa158015610b28573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610b8b5760405162461bcd60e51b815260206004820152601f60248201527f636f6c6f6e792d6d65746174782d696e76616c69642d7369676e61747572650060448201526064016106fb565b6001600160a01b038a8116911614915050979650505050505050565b610bb2610864611191565b610bce5760405162461bcd60e51b81526004016106fb9061199d565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6005805461055e906118d9565b610c2d611191565b6001600160a01b0316826001600160a01b031614610d2d576001600160a01b03821660009081526002602052604081208291610c67611191565b6001600160a01b03166001600160a01b03168152602001908152602001600020541015610cd65760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03821660009081526002602052604081208291610cf8611191565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610d279190611a3a565b90915550505b6001600160a01b038216600090815260016020526040902054811115610d955760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b03821660009081526001602052604081208054839290610dbd908490611a3a565b9250508190555080600080828254610dd59190611a3a565b90915550506040518181526001600160a01b038316907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59060200160405180910390a25050565b610e27610864611191565b610e435760405162461bcd60e51b81526004016106fb9061199d565b610a50610e4e611191565b82610950565b610e5f610864611191565b610e7b5760405162461bcd60e51b81526004016106fb9061199d565b6007805460ff19169055565b6000610e9b610e94611191565b84846108dc565b9392505050565b60075460ff1615610f0057610eb8610864611191565b610f005760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b42841015610f505760405162461bcd60e51b815260206004820152601d60248201527f636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e6500000060448201526064016106fb565b6040805180820182526002815261190160f01b6020808301919091526001600160a01b038a166000908152600890915291822080547f0000000000000000000000000000000000000000000000000000000000000000917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c9188610fd983611a4d565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161103d93929190611a66565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa1580156110a8573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906110de5750886001600160a01b0316816001600160a01b0316145b61112a5760405162461bcd60e51b815260206004820152601e60248201527f636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e6174757265000060448201526064016106fb565b6001600160a01b038981166000818152600260209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b60003633301480156111a4575060348110155b1561122d57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e8811461121c5733935050505090565b5001516001600160a01b0316919050565b3391505090565b6001600160a01b038116600090815260086020526040812080549161125883611a4d565b919050555050565b6000306001600160a01b0384160361127a5750600161066c565b6004546001600160a01b03908116908416036112985750600161066c565b6003546001600160a01b03166112b05750600061066c565b60035460405163b700961360e01b81526001600160a01b0385811660048301523060248301526001600160e01b0319851660448301529091169063b700961390606401602060405180830381865afa158015611310573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113349190611a8d565b905061066c565b6000611345611191565b6001600160a01b0316846001600160a01b031614611445576001600160a01b0384166000908152600260205260408120839161137f611191565b6001600160a01b03166001600160a01b031681526020019081526020016000205410156113ee5760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03841660009081526002602052604081208391611410611191565b6001600160a01b03166001600160a01b03168152602001908152602001600020600082825461143f9190611a3a565b90915550505b6001600160a01b0384166000908152600160205260409020548211156114ad5760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b038416600090815260016020526040812080548492906114d5908490611a3a565b90915550506001600160a01b038316600090815260016020526040812080548492906115029084906119e1565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161154e91815260200190565b60405180910390a35060019392505050565b60005b8381101561157b578181015183820152602001611563565b50506000910152565b6000815180845261159c816020860160208601611560565b601f01601f19169290920160200192915050565b602081526000610e9b6020830184611584565b6001600160a01b0381168114610a5057600080fd5b600080604083850312156115eb57600080fd5b82356115f6816115c3565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261162b57600080fd5b813567ffffffffffffffff81111561164557611645611604565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561167457611674611604565b60405281815283820160200185101561168c57600080fd5b816020850160208301376000918101602001919091529392505050565b803560ff811681146116ba57600080fd5b919050565b600080600080600060a086880312156116d757600080fd5b85356116e2816115c3565b9450602086013567ffffffffffffffff8111156116fe57600080fd5b61170a8882890161161a565b9450506040860135925060608601359150611727608087016116a9565b90509295509295909350565b60006020828403121561174557600080fd5b8135610e9b816115c3565b60008060006060848603121561176557600080fd5b8335611770816115c3565b92506020840135611780816115c3565b929592945050506040919091013590565b6000602082840312156117a357600080fd5b5035919050565b600080600080600080600060e0888a0312156117c557600080fd5b87356117d0816115c3565b96506020880135955060408801359450606088013567ffffffffffffffff8111156117fa57600080fd5b6118068a828b0161161a565b9450506080880135925060a0880135915061182360c089016116a9565b905092959891949750929550565b600080600080600080600060e0888a03121561184c57600080fd5b8735611857816115c3565b96506020880135611867816115c3565b95506040880135945060608801359350611883608089016116a9565b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156118b357600080fd5b82356118be816115c3565b915060208301356118ce816115c3565b809150509250929050565b600181811c908216806118ed57607f821691505b60208210810361190d57634e487b7160e01b600052602260045260246000fd5b50919050565b60008451611925818460208901611560565b919091019283525060601b6bffffffffffffffffffffffff19166020820152603401919050565b6000825161195e818460208701611560565b9190910192915050565b6001600160a01b0384811682528316602082015260606040820181905260009061199490830184611584565b95945050505050565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561066c5761066c6119cb565b8481526bffffffffffffffffffffffff198460601b16602082015282603482015260008251611a2a816054850160208701611560565b9190910160540195945050505050565b8181038181111561066c5761066c6119cb565b600060018201611a5f57611a5f6119cb565b5060010190565b60008451611a78818460208901611560565b91909101928352506020820152604001919050565b600060208284031215611a9f57600080fd5b81518015158114610e9b57600080fdfea264697066735822122090928a66070125904780390eb49d45fe12c136aec641b1db69316e0ffefc6da764736f6c634300081b0033",c1=n=>n.length>1,Nn=class extends hi{constructor(...e){c1(e)?super(...e):super(Ku,N6,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(Ku)}static connect(e,t){return new oe(e,Ku,t)}};xe(Nn,"bytecode",N6),xe(Nn,"abi",Ku);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:"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:"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:[{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:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",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:"_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:"_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:"returnData",type:"bytes"}],stateMutability:"payable",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:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"",type:"address"}],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"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",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:"_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:"_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:"_token",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"incrementLockCounterTo",outputs:[],stateMutability:"nonpayable",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:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"pure",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetwork",type:"address"}],name:"setColonyNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",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:"_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:"_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:"_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:"_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"}],Si=class{static createInterface(){return new te.Interface(Ip)}static connect(e,t){return new oe(e,Ip,t)}};xe(Si,"abi",Ip);var Ri;(function(n){n.TokenClient="TokenClient",n.TokenLockingClient="TokenLockingClient"})(Ri||(Ri={}));var Dn;(function(n){n.Colony="Colony",n.ColonyLegacy="ColonyLegacy",n.Erc20="Erc20",n.Erc2612="Erc2612",n.Sai="Sai"})(Dn||(Dn={}));var{AddressZero:b1}=xt;async function g1(n){try{await n.authority();return}catch{throw new Error("Token can not be assigned a TokenAuthority")}}var T1=async(n,e)=>{let t,a=!0,i=!0;t=Nn.connect(n,e);try{await t.totalSupply()}catch(r){throw new Error(`Token is probably not a valid ERC20 token, got ${r.message}`)}try{await t.locked(),await g1(t)}catch{a=!1}try{await t.nonces(b1)}catch{i=!1}return a?t.tokenClientType=Dn.Colony:i?(t=wn.connect(n,e),t.tokenClientType=Dn.Erc2612):(t=vn.connect(n,e),t.tokenClientType=Dn.Erc20),t.clientType=Ri.TokenClient,t},Sp=T1;var v1=(n,e)=>{let t=Si.connect(n,e);return t.clientType=Ri.TokenLockingClient,t},Rp=v1;var{AddressZero:Pp}=xt,w1=vn.connect(Pp,new ta.BaseProvider(3656691)).interface,_1=Ii.connect(Pp,new ta.BaseProvider(3656691)).interface,k1=wn.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"},{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:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{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:"returnData",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:"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:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"}],Vs=class{static createInterface(){return new te.Interface(Np)}static connect(e,t){return new oe(e,Np,t)}};Vs.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:"returnData",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(Dp)}static connect(e,t){return new oe(e,Dp,t)}};js.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:!1,internalType:"address",name:"bridgeAddress",type:"address"}],name:"BridgeSet",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:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateSentToBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateStoredFromBridge",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:"uint256",name:"skillId",type:"uint256"}],name:"SkillAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillCreationStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillStoredFromBridge",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:[{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"address",name:"_resolver",type:"address"}],name:"addColonyVersion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_resolver",type:"address"}],name:"addExtensionToNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"addPendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPendingSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"addReputationUpdateLogFromBridge",outputs:[],stateMutability:"nonpayable",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:"_parentSkillId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"addSkillFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",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:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"chainId",type:"uint256"}],name:"bridgeCurrentRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"bridgePendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"skillId",type:"uint256"}],name:"bridgeSkillIfNotMiningChain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"burnUnneededRewards",outputs:[],stateMutability:"nonpayable",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:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"}],name:"claimMiningReward",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:"address",name:"_tokenAddress",type:"address"}],name:"createMetaColony",outputs:[],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:"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:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateExtension",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:"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:"returnData",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"getBridgedReputationUpdateCount",outputs:[{internalType:"uint256",name:"bridgedReputationCount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"}],name:"getBridgedSkillCounts",outputs:[{internalType:"uint256",name:"skillCount",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:"uint256",name:"_id",type:"uint256"}],name:"getColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyBridgeAddress",outputs:[{internalType:"address",name:"bridge",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCreationSalt",outputs:[{internalType:"bytes32",name:"salt",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"}],name:"getColonyVersionResolver",outputs:[{internalType:"address",name:"_resolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentColonyVersion",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getENSRegistrar",outputs:[{internalType:"address",name:"_address",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:[{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:[],name:"getFeeInverse",outputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMetaColony",outputs:[{internalType:"address payable",name:"_colonyAddress",type:"address"}],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:"getMiningChainId",outputs:[{internalType:"uint256",name:"reputationMiningChainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"}],name:"getMiningDelegator",outputs:[{internalType:"address",name:"_delegator",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiningResolver",outputs:[{internalType:"address",name:"miningResolverAddress",type:"address"}],stateMutability:"view",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:"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:"address",name:"_token",type:"address"}],name:"getPayoutWhitelist",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"getPendingReputationUpdate",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:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.PendingReputationUpdate",name:"update",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"getPendingSkillAddition",outputs:[{internalType:"uint256",name:"parentId",type:"uint256"}],stateMutability:"view",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:"_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:[{internalType:"bool",name:"_active",type:"bool"}],name:"getReputationMiningCycle",outputs:[{internalType:"address",name:"_repMiningCycleAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningCycleReward",outputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningSkillId",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"view",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:"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_deprecated",type:"bool"}],internalType:"struct ColonyNetworkDataTypes.Skill",name:"_skill",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSkillCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTokenLocking",outputs:[{internalType:"address",name:"_lockingAddress",type:"address"}],stateMutability:"view",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:"miningChainId",type:"uint256"},{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"}],name:"initialiseReputationMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[{internalType:"uint256",name:"_rootLocalSkillId",type:"uint256"}],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:"address",name:"_colony",type:"address"}],name:"isColony",outputs:[{internalType:"bool",name:"_addressIsColony",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],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:"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:"_stakers",type:"address[]"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"punishStakers",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:"_username",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerUserLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_bridgeAddress",type:"address"}],name:"setColonyBridgeAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],name:"setFeeInverse",outputs:[],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:"_miningResolverAddress",type:"address"}],name:"setMiningResolver",outputs:[],stateMutability:"nonpayable",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:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",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:"uint256",name:"_amount",type:"uint256"}],name:"setReputationMiningCycleReward",outputs:[],stateMutability:"nonpayable",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:[{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"},{internalType:"uint256",name:"nonce",type:"uint256"}],name:"setReputationRootHashFromBridge",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:"address",name:"_tokenLockingAddress",type:"address"}],name:"setTokenLocking",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:"uint256",name:"_amount",type:"uint256"}],name:"stakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"startNextCycle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"startTokenAuction",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:"bytes32",name:"_extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"unstakeForMining",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:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"}],Pi=class{static createInterface(){return new te.Interface(Op)}static connect(e,t){return new oe(e,Op,t)}};Pi.abi=Op;var wa=class{constructor({contract:e,config:t,method:a,args:i,eventData:r,txConfig:s}){this.config=t,this.contract=e,this.method=a,this.args=i,this.eventData=r,this.txConfig=s}async getArgs(e){let t=[];return typeof this.args=="function"?t=await this.args():t=this.args,e&&t.push(e),t}async getTx(e){let t=await this.getArgs(e);return await this.contract.functions[this.method].apply(this.contract,t)}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.config.ipfs.getMetadataForEvent.bind(this.config.ipfs,Us[this.txConfig.metadataType],t.metadata);return[t,e,a]}return[t,e]}return[{},e]}async broadcastMetaTx(e){let{provider:t}=this.config.getSigner();if(!t)throw new Error("No provider found");let i=await(await fetch(`${this.config.metaTxBroadcasterEndpoint}/broadcast`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();if(i.status!=="success")throw new Error(`Could not send Metatransaction. Reason given: ${i.data.reason}`);if(!i.data?.txHash)throw new Error("Could not get transaction hash from broadcaster response");return t.getTransaction(i.data.txHash)}async waitForMetaTx(e){let t=await e.wait();return t.parsedLogs=Ql(t.logs,this.contract.interface),t}tx(){return{send:async e=>{let t=await this.getTx(e);return[t,this.getMined.bind(this,t)]},mined:async e=>{let t=await this.getTx(e);return this.getMined(t)},encode:async()=>{let e=await this.getArgs();return this.contract.interface.encodeFunctionData(this.method,e)}}}};var{arrayify:E1,solidityKeccak256:M1,splitSignature:C1}=te,ja=class extends wa{async sendMetaTransaction(e,t){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let a=this.config.getSigner(),{provider:i}=a;if(!i)throw new Error("No provider found");let r;this.config.network===Pn.Custom?r=1:r=(await i.getNetwork()).chainId;let s=await a.getAddress(),o=await this.contract.functions.getMetatransactionNonce(s),l=M1(["uint256","address","uint256","bytes"],[o.toString(),t,r,e]),p=E1(l),f=await a.signMessage(p),{r:x,s:I,v:_}=C1(f),v={target:t,payload:e,userAddress:s,r:x,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(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}},Ju=(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=ke.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 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"}],Ni=class{static createInterface(){return new te.Interface(Bp)}static connect(e,t){return new oe(e,Bp,t)}};Ni.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"}],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:[],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(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:[{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(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{AddressZero:O1}=xt,On=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(La(On.extensionType),e.address);if(t===O1)throw new Error(`${On.extensionType} extension is not installed for this Colony`);let a=await Sr(t,e.config.signerOrProvider);if(!va(On.extensionType,a,e.version))throw new Error(`Version ${a} of the ${On.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=On.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${On.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new On(e,r,a)}static getLatestSupportedVersion(){return On.supportedVersions[On.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||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[_]),I=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,I,x,s,ke.SkillIgnore]},async _=>({...ne("OneTxPaymentMade",_)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[La(we.OneTxPayment),t],async a=>({...ne("ExtensionUpgraded",a)}))}},Ha=On;Ha.supportedVersions=[{version:3,factory:Bi},{version:4,factory:Fi},{version:5,factory:Li}],Ha.extensionType=we.OneTxPayment;var Bn=class{constructor(e,t){typeof t=="string"?this.tokenClient=vn.connect(t,e.config.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 Hs=class extends Bn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=Nn.connect(a,t.config.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 Bn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=wn.connect(a,t.config.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 D6=async(n,e)=>{let t=await Sp(e,n.config.signerOrProvider);switch(t.tokenClientType){case Dn.Colony:return new Hs(n,t);case Dn.Erc20:return new Bn(n,t);case Dn.Erc2612:return new qs(n,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"}],Ui=class{static createInterface(){return new te.Interface(Hp)}static connect(e,t){return new oe(e,Hp,t)}};Ui.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"}],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{AddressZero:zp}=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===zp)throw new Error(`${Fn.extensionType} extension is not installed for this Colony`);let a=await Sr(t,e.config.signerOrProvider);if(!va(Fn.extensionType,a,e.version))throw new Error(`Version ${a} of the ${Fn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Fn.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${Fn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new Fn(e,r,a)}static getLatestSupportedVersion(){return Fn.supportedVersions[Fn.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 Rs(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),this.colony.reputation,this.votingReputationContract,e,zp,zl);return[e,t,zp,zl,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.config.ipfs.uploadMetadata(Re.Decision,t),[e,a]},async a=>({...ne("Annotation",a)}),{metadataType:Re.Decision})}approveStake(e,t=ke.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{...Ju("UserTokenApproved",a,i.getInternalTokenLockingContract().interface)}})}stakeMotion(e,t,a){let i=async()=>{let r=await this.colony.config.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(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 I=await this.getMinStake(o,t);if(F.from(a).lt(I))throw new Error(`The staked amount is too small. Please stake at least ${Ir(I)}`);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),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!==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.config.getSigner().getAddress(),{key:p,value:f,branchMask:x,siblings:I}=await this.colony.reputation.getReputationWithProofs(o,l,s),_=await this.createMotionSalt(e),v=te.solidityKeccak256(["bytes","uint256"],[_,t]);return[e,v,p,f,x,I]};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!==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.config.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:I,value:_,branchMask:v,siblings:S}=p;return[e,f,F.from(x),I,_,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!==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.config.getSigner().getAddress(),p=await _i(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),t,r),{key:f,value:x,branchMask:I,siblings:_}=await this.colony.reputation.getReputationWithProofs(o,l,s);return[e,t,p,f,x,I,_]};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!==zt.Finalizable)throw new Error(`Motion cannot be finalized. It's currently in "${zt[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",[La(we.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}}},qa=Fn;qa.supportedVersions=[{version:7,factory:Ui},{version:8,factory:Vi},{version:9,factory:ji}],qa.extensionType=we.VotingReputation;var U1={["motion"]:qa,["oneTx"]:Ha},Fr=class{static async connect(e,t){let a=await Sr(t,e.config.signerOrProvider),i=Fr.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.config.signerOrProvider),s=await r.getToken(),o=await D6(e,s),l=new Fr(e,r,o,a);return await l.updateExtensions(),l}static getLatestSupportedVersion(){return Fr.supportedVersions[Fr.supportedVersions.length-1].version}constructor(e,t,a,i){this.colony=t,this.colonyNetwork=e,this.config=e.config,this.address=t.address,this.ext={},this.reputation=new aa(e.getInternalNetworkContract(),t,{customEndpointUrl:e.config.reputationOracleEndpoint}),this.token=a,this.version=i}createColonyTxCreator(e,t,a,i,r){return new Br({colony:this,config:this.colonyNetwork.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createPermissionedColonyTxCreator(e,t,a,i,r,s){return new Br({colony:this,config:this.colonyNetwork.config,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 qa.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}if(!this.ext.oneTx)try{this.ext.oneTx=await Ha.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.config.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.config.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.config.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 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=ke.RootDomain,s=a||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(),I=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,I,_,v,S,e,o]},async l=>({...ne("ColonyFundsMovedBetweenFundingPots",l)}))}async getReputation(e,t=ke.RootDomain,a=3){let{skillId:i}=await this.colony.getDomain(t);return this.reputation.getReputationFraction(i,e,void 0,a)}async getReputationPoints(e,t=ke.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(address,address,bytes,bool)",a)}))}annotateTransaction(e,t){return this.createColonyTxCreator(this.colony,"annotateTransaction",async()=>{let a;return typeof t=="string"?a=t:a=await this.config.ipfs.uploadMetadata(Re.Annotation,t),[e,a]},async a=>({...ne("Annotation",a)}),{metadataType:Re.Annotation})}installExtension(e){let t=U1[e],a=t.getLatestSupportedVersion(),{extensionType:i}=t;if(!va(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",[La(i),t.getLatestSupportedVersion()],async s=>({...Ju("ExtensionInstalled",s,r.interface)}))}async getRoles(e,t=ke.RootDomain){let a=await this.colony.getUserRoles(e,t);return yu(a)}setRoles(e,t,a=ke.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let i=await this.getRoles(e,a),r=Array.from(new Set([...i,...[].concat(t)])),s=$l(r);return[e,a,s]},{roles:Ne.Architecture,domain:a},async i=>({...ne("ColonyRoleSet",i),...ne("RecoveryRoleSet",i)}))}unsetRoles(e,t,a=ke.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let r=(await this.getRoles(e,a)).filter(o=>![].concat(t).includes(o)),s=$l(r);return[e,a,s]},{roles:Ne.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=ke.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=ke.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:Ne.Arbitration},async i=>({...ne("ArbitraryReputationUpdate",i)}))}},Lr=Fr;Lr.supportedVersions=[{version:11,factory:Ni},{version:12,factory:Di},{version:13,factory:Oi}];var{splitSignature:V1}=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,a]){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let i=this.contract.signer,{provider:r}=i;if(!r)throw new Error("No provider found");let s;this.config.network===Pn.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:a,nonce:l.toString(),deadline:f}),{r:I,s:_,v}=V1(x),S={target:e,owner:o,spender:t,value:a.toString(),deadline:f,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=Rp(this.address,e.config.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 zs=class{constructor(e,t){let a=t?.network||Pn.ArbitrumOne;this.metaTxBroadcasterEndpoint=t?.metaTxBroadcasterEndpoint||du[a],this.ipfs=new Or(t?.ipfsAdapter),this.network=a,this.reputationOracleEndpoint=t?.reputationOracleEndpoint||Cr[a],this.signerOrProvider=e}getSigner(){if(!(this.signerOrProvider instanceof St))throw new Error("Need a signer to create a transaction");return this.signerOrProvider}};var{namehash:O6}=te,{AddressZero:Wp}=xt,Ws=class{constructor(e,t){this.config=new zs(e,t),this.contract=Pi.connect(t?.customNetworkAddress||uu[this.config.network],e)}async getTokenLocking(){if(!this.locking){let e=await this.contract.getTokenLocking();this.locking=new Gs(this,e)}return this.locking}getInternalNetworkContract(){return this.contract}createTxCreator(e,t,a,i,r){return new wa({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createMetaTxCreator(e,t,a,i,r){return new ja({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createEip2612TxCreator(e,t,a,i,r){return new Qu({config:this.config,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[Wp,e.name,e.symbol,e.decimals||18,0,t,""]}return[e,"","",0,0,t,""]};return a?this.createMetaTxCreator(this.contract,"createColonyForFrontend",async()=>{let r=await i();return typeof a=="string"?r[6]=a:r[6]=await this.config.ipfs.uploadMetadata(Re.Colony,a),r},async r=>({...ne("TokenDeployed",r),...ne("ColonyAdded",r),...ne("TokenAuthorityDeployed",r)}),{metadataType:Re.Colony}):this.createMetaTxCreator(this.contract,"createColonyForFrontend",i,async r=>({...ne("TokenDeployed",r),...ne("ColonyAdded",r),...ne("TokenAuthorityDeployed",r)}))}async getColony(e){return Lr.connect(this,e)}async getMetaColony(){let e=await this.contract.getMetaColony();return this.getColony(e)}async getColonyLabel(e){let t=await this.contract.lookupRegisteredENSDomain(e);return t?t.replace(Is[this.config.network],""):null}async getColonyAddress(e){let t=O6(`${e}${Is[this.config.network]}`),a=await this.contract.addr(t);return a!==Wp?a:null}async getUsername(e){let t=await this.contract.lookupRegisteredENSDomain(e);return t?t.replace(Ss[this.config.network],""):null}async getUserAddress(e){let t=O6(`${e}${Ss[this.config.network]}`),a=await this.contract.addr(t);return a!==Wp?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.contract,"registerUserLabel",t,async a=>({...ne("UserLabelRegistered",a)}))}deployToken(e,t,a=18){return this.createMetaTxCreator(this.contract,"deployTokenViaNetwork",[e,t,a],async i=>({...ne("TokenDeployed",i)}))}};var B6=async n=>{if(!n.ext.oneTx){if(!va(we.OneTxPayment,fu[we.OneTxPayment],n.version))throw new Error(`OneTxPayment extension of version ${fu[we.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,[Ne.Administration,Ne.Funding]).tx().mined()}};var{isAddress:H1}=te,Yu=new ta.JsonRpcProvider("http://127.0.0.1:8545"),Hi,Ks,q1=()=>new on("0x0355596cdb5e5242ad082c4fe3f8bbe48c9dba843fe1f99dd8272f487e70efae",Yu),G1=async n=>{let e=q1(),a=await new Ws(e,{customNetworkAddress:n,reputationOracleEndpoint:"http://localhost:3000"}).getMetaColony();return await B6(a),a},z1=async n=>{await Hi.mint(lu(n)).tx().mined(),await Hi.claimFunds().tx().mined();let e=await Hi.getBalance();return Ir(e)},W1=async n=>{if(!Hi.ext.oneTx)throw new Error("OneTxPayment extension not installed");return Hi.ext.oneTx.pay(n,pu`10`).tx()},K1=async()=>{await Yu.send("evm_increaseTime",[3600]),await Yu.send("evm_mine",[]),await Yu.send("evm_mine",[])},J1=async n=>(await Hi.getReputation(n)).toString(),Xu=document.querySelector("#address"),F6=document.querySelector("#button_connect"),Kp=document.querySelector("#funding_amount"),L6=document.querySelector("#button_fund"),U6=document.querySelector("#recipient"),V6=document.querySelector("#button_pay"),j6=document.querySelector("#button_jump"),H6=document.querySelector("#button_get_reputation"),Jp=document.querySelector("#error"),q6=document.querySelector("#result");if(!Xu||!Kp||!U6||!Jp||!q6||!F6||!L6||!V6||!j6||!H6)throw new Error("Could not find all required HTML elements");var Zu=n=>{Jp.innerText=`Found an error: ${n.message}`,console.error(n)},G6=()=>{Jp.innerText=""},Ln=n=>{q6.innerText=n};F6.addEventListener("click",async()=>{G6();let n=Xu.value;if(!H1(n))return Zu(new Error("This is not a valid address"));Ln("Processing...");try{let e=await G1(Xu.value);Hi=e,Ln(` +`)}`,l1=n=>({...n,isWhitelistActivated:n.isWhitelistActivated||!1,colonySafes:n.colonySafes||[],colonyTokens:n.colonyTokens||[],verifiedAddresses:n.verifiedAddresses||[]}),wp=(n,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&&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"?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 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}))&&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"?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: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}})(n);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 a=S6(t.errors);throw new Error(a)};var R6=(n,e)=>{let t=n===Re.Colony?l1(e):e,a=(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&&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"?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 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}))&&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"?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: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}})({name:n,data:t,version:Tp});if(!a.success){let i=S6(a.errors);throw new Error(i)}return a.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,P6.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]:""},Or=class{adapter;constructor(e){this.adapter=e||new kp}static eventSupportsMetadata(e){return!!Object.keys(Us).includes(e)}async getMetadata(e,t){let a=this.adapter.getIpfsUrl(e),r=await(await Ap(a)).json();return wp(r,t)}async getMetadataForEvent(e,t){let a=this.adapter.getIpfsUrl(t),r=await(await Ap(a)).json(),s=Object.entries(Us).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),a=await Ap(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=R6(e,t),i=JSON.stringify(a);return this.adapter.uploadJson(i)}};var EE=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)}};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:"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)}};xe(wn,"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:"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(Cp)}static connect(e,t){return new oe(e,Cp,t)}};xe(Ii,"abi",Cp);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:"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:"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:[{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:"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:"returnData",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",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:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],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:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"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:[],name:"unlock",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"}],N6="0x60c060405234801561001057600080fd5b5060405161205738038061205783398101604081905261002f91610307565b60008060018161003d6101ab565b6001600160a01b031681526020810191909152604001600090812091909155556100656101ab565b600480546001600160a01b0319166001600160a01b039290921691909117905561008d6101ab565b6001600160a01b03167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a260066100ce8482610413565b5060056100db8382610413565b5060ff81166080526007805460ff1916600117905560405146907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f90610123906006906104d1565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051601f19818403018152919052805160209091012060a0525061054692505050565b60003633301480156101be575060348110155b1561024757600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e881146102365733935050505090565b5001516001600160a01b0316919050565b3391505090565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261027557600080fd5b81516001600160401b0381111561028e5761028e61024e565b604051601f8201601f19908116603f011681016001600160401b03811182821017156102bc576102bc61024e565b6040528181528382016020018510156102d457600080fd5b60005b828110156102f3576020818601810151838301820152016102d7565b506000918101602001919091529392505050565b60008060006060848603121561031c57600080fd5b83516001600160401b0381111561033257600080fd5b61033e86828701610264565b602086015190945090506001600160401b0381111561035c57600080fd5b61036886828701610264565b925050604084015160ff8116811461037f57600080fd5b809150509250925092565b600181811c9082168061039e57607f821691505b6020821081036103be57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561040e57806000526020600020601f840160051c810160208510156103eb5750805b601f840160051c820191505b8181101561040b57600081556001016103f7565b50505b505050565b81516001600160401b0381111561042c5761042c61024e565b6104408161043a845461038a565b846103c4565b6020601f821160018114610474576000831561045c5750848201515b600019600385901b1c1916600184901b17845561040b565b600084815260208120601f198516915b828110156104a45787850151825560209485019460019092019101610484565b50848210156104c25786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b60008083546104df8161038a565b6001821680156104f6576001811461050b5761053b565b60ff198316865281151582028601935061053b565b86600052602060002060005b8381101561053357815488820152600190910190602001610517565b505081860193505b509195945050505050565b60805160a051611ae5610572600039600081816102e10152610f870152600061029b0152611ae56000f3fe6080604052600436106101815760003560e01c80637a9e5e4b116100d1578063a69df4b51161008a578063bf7e214f11610064578063bf7e214f146104b1578063cf309012146104d1578063d505accf146104eb578063dd62ed3e1461050b57600080fd5b8063a69df4b51461047c578063a9059cbb14610491578063b3eac1d8146103b957600080fd5b80637a9e5e4b146103995780637ecebe00146103b95780638da5cb5b146103ef57806395d89b41146104275780639dc29fac1461043c578063a0712d681461045c57600080fd5b806330adf81f1161013e57806340c10f191161011857806340c10f191461030357806342966c68146103235780636281133d1461034357806370a082311461036357600080fd5b806330adf81f14610255578063313ce567146102895780633644e515146102cf57600080fd5b806306fdde0314610186578063095ea7b3146101b15780630c53c51c146101e157806313af4035146101f457806318160ddd1461021657806323b872dd14610235575b600080fd5b34801561019257600080fd5b5061019b610551565b6040516101a891906115b0565b60405180910390f35b3480156101bd57600080fd5b506101d16101cc3660046115d8565b6105df565b60405190151581526020016101a8565b61019b6101ef3660046116bf565b610672565b34801561020057600080fd5b5061021461020f366004611733565b610859565b005b34801561022257600080fd5b506000545b6040519081526020016101a8565b34801561024157600080fd5b506101d1610250366004611750565b6108dc565b34801561026157600080fd5b506102277f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b34801561029557600080fd5b506102bd7f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101a8565b3480156102db57600080fd5b506102277f000000000000000000000000000000000000000000000000000000000000000081565b34801561030f57600080fd5b5061021461031e3660046115d8565b610950565b34801561032f57600080fd5b5061021461033e366004611791565b610a3f565b34801561034f57600080fd5b506101d161035e3660046117aa565b610a53565b34801561036f57600080fd5b5061022761037e366004611733565b6001600160a01b031660009081526001602052604090205490565b3480156103a557600080fd5b506102146103b4366004611733565b610ba7565b3480156103c557600080fd5b506102276103d4366004611733565b6001600160a01b031660009081526008602052604090205490565b3480156103fb57600080fd5b5060045461040f906001600160a01b031681565b6040516001600160a01b0390911681526020016101a8565b34801561043357600080fd5b5061019b610c18565b34801561044857600080fd5b506102146104573660046115d8565b610c25565b34801561046857600080fd5b50610214610477366004611791565b610e1c565b34801561048857600080fd5b50610214610e54565b34801561049d57600080fd5b506101d16104ac3660046115d8565b610e87565b3480156104bd57600080fd5b5060035461040f906001600160a01b031681565b3480156104dd57600080fd5b506007546101d19060ff1681565b3480156104f757600080fd5b50610214610506366004611831565b610ea2565b34801561051757600080fd5b506102276105263660046118a0565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6006805461055e906118d9565b80601f016020809104026020016040519081016040528092919081815260200182805461058a906118d9565b80156105d75780601f106105ac576101008083540402835291602001916105d7565b820191906000526020600020905b8154815290600101906020018083116105ba57829003601f168201915b505050505081565b600081600260006105ee611191565b6001600160a01b0390811682526020808301939093526040918201600090812091881680825291909352912091909155610626611191565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161066091815260200190565b60405180910390a35060015b92915050565b60606106a186610697886001600160a01b031660009081526008602052604090205490565b4688888888610a53565b6107045760405162461bcd60e51b815260206004820152602960248201527f6d6574617472616e73616374696f6e2d7369676e65722d7369676e617475726560448201526805adad2e6dac2e8c6d60bb1b60648201526084015b60405180910390fd5b61070d86611234565b6000306001600160a01b0316867f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e88960405160200161074e93929190611913565b60408051601f19818403018152908290526107689161194c565b6000604051808303816000865af19150503d80600081146107a5576040519150601f19603f3d011682016040523d82523d6000602084013e6107aa565b606091505b50925090508061080d5760405162461bcd60e51b815260206004820152602860248201527f636f6c6f6e792d6d65746174782d66756e6374696f6e2d63616c6c2d756e737560448201526718d8d95cdcd99d5b60c21b60648201526084016106fb565b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b87610837611191565b8860405161084793929190611968565b60405180910390a15095945050505050565b610876610864611191565b6000356001600160e01b031916611260565b6108925760405162461bcd60e51b81526004016106fb9061199d565b600480546001600160a01b0319166001600160a01b0383169081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60075460009060ff161561093d576108f5610864611191565b61093d5760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b61094884848461133b565b949350505050565b61095b610864611191565b6109775760405162461bcd60e51b81526004016106fb9061199d565b6001600160a01b0382166000908152600160205260408120805483929061099f9084906119e1565b92505081905550806000808282546109b791906119e1565b90915550506040518181526001600160a01b038316907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a26040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b610a50610a4a611191565b82610c25565b50565b600080610ad088308989604051602001610a7094939291906119f4565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b6040805160008082526020820180845284905260ff87169282019290925260608101889052608081018790529192509060019060a0016020604051602081039080840390855afa158015610b28573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610b8b5760405162461bcd60e51b815260206004820152601f60248201527f636f6c6f6e792d6d65746174782d696e76616c69642d7369676e61747572650060448201526064016106fb565b6001600160a01b038a8116911614915050979650505050505050565b610bb2610864611191565b610bce5760405162461bcd60e51b81526004016106fb9061199d565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6005805461055e906118d9565b610c2d611191565b6001600160a01b0316826001600160a01b031614610d2d576001600160a01b03821660009081526002602052604081208291610c67611191565b6001600160a01b03166001600160a01b03168152602001908152602001600020541015610cd65760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03821660009081526002602052604081208291610cf8611191565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610d279190611a3a565b90915550505b6001600160a01b038216600090815260016020526040902054811115610d955760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b03821660009081526001602052604081208054839290610dbd908490611a3a565b9250508190555080600080828254610dd59190611a3a565b90915550506040518181526001600160a01b038316907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59060200160405180910390a25050565b610e27610864611191565b610e435760405162461bcd60e51b81526004016106fb9061199d565b610a50610e4e611191565b82610950565b610e5f610864611191565b610e7b5760405162461bcd60e51b81526004016106fb9061199d565b6007805460ff19169055565b6000610e9b610e94611191565b84846108dc565b9392505050565b60075460ff1615610f0057610eb8610864611191565b610f005760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b42841015610f505760405162461bcd60e51b815260206004820152601d60248201527f636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e6500000060448201526064016106fb565b6040805180820182526002815261190160f01b6020808301919091526001600160a01b038a166000908152600890915291822080547f0000000000000000000000000000000000000000000000000000000000000000917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c9188610fd983611a4d565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161103d93929190611a66565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa1580156110a8573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906110de5750886001600160a01b0316816001600160a01b0316145b61112a5760405162461bcd60e51b815260206004820152601e60248201527f636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e6174757265000060448201526064016106fb565b6001600160a01b038981166000818152600260209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b60003633301480156111a4575060348110155b1561122d57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e8811461121c5733935050505090565b5001516001600160a01b0316919050565b3391505090565b6001600160a01b038116600090815260086020526040812080549161125883611a4d565b919050555050565b6000306001600160a01b0384160361127a5750600161066c565b6004546001600160a01b03908116908416036112985750600161066c565b6003546001600160a01b03166112b05750600061066c565b60035460405163b700961360e01b81526001600160a01b0385811660048301523060248301526001600160e01b0319851660448301529091169063b700961390606401602060405180830381865afa158015611310573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113349190611a8d565b905061066c565b6000611345611191565b6001600160a01b0316846001600160a01b031614611445576001600160a01b0384166000908152600260205260408120839161137f611191565b6001600160a01b03166001600160a01b031681526020019081526020016000205410156113ee5760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03841660009081526002602052604081208391611410611191565b6001600160a01b03166001600160a01b03168152602001908152602001600020600082825461143f9190611a3a565b90915550505b6001600160a01b0384166000908152600160205260409020548211156114ad5760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b038416600090815260016020526040812080548492906114d5908490611a3a565b90915550506001600160a01b038316600090815260016020526040812080548492906115029084906119e1565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161154e91815260200190565b60405180910390a35060019392505050565b60005b8381101561157b578181015183820152602001611563565b50506000910152565b6000815180845261159c816020860160208601611560565b601f01601f19169290920160200192915050565b602081526000610e9b6020830184611584565b6001600160a01b0381168114610a5057600080fd5b600080604083850312156115eb57600080fd5b82356115f6816115c3565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261162b57600080fd5b813567ffffffffffffffff81111561164557611645611604565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561167457611674611604565b60405281815283820160200185101561168c57600080fd5b816020850160208301376000918101602001919091529392505050565b803560ff811681146116ba57600080fd5b919050565b600080600080600060a086880312156116d757600080fd5b85356116e2816115c3565b9450602086013567ffffffffffffffff8111156116fe57600080fd5b61170a8882890161161a565b9450506040860135925060608601359150611727608087016116a9565b90509295509295909350565b60006020828403121561174557600080fd5b8135610e9b816115c3565b60008060006060848603121561176557600080fd5b8335611770816115c3565b92506020840135611780816115c3565b929592945050506040919091013590565b6000602082840312156117a357600080fd5b5035919050565b600080600080600080600060e0888a0312156117c557600080fd5b87356117d0816115c3565b96506020880135955060408801359450606088013567ffffffffffffffff8111156117fa57600080fd5b6118068a828b0161161a565b9450506080880135925060a0880135915061182360c089016116a9565b905092959891949750929550565b600080600080600080600060e0888a03121561184c57600080fd5b8735611857816115c3565b96506020880135611867816115c3565b95506040880135945060608801359350611883608089016116a9565b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156118b357600080fd5b82356118be816115c3565b915060208301356118ce816115c3565b809150509250929050565b600181811c908216806118ed57607f821691505b60208210810361190d57634e487b7160e01b600052602260045260246000fd5b50919050565b60008451611925818460208901611560565b919091019283525060601b6bffffffffffffffffffffffff19166020820152603401919050565b6000825161195e818460208701611560565b9190910192915050565b6001600160a01b0384811682528316602082015260606040820181905260009061199490830184611584565b95945050505050565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561066c5761066c6119cb565b8481526bffffffffffffffffffffffff198460601b16602082015282603482015260008251611a2a816054850160208701611560565b9190910160540195945050505050565b8181038181111561066c5761066c6119cb565b600060018201611a5f57611a5f6119cb565b5060010190565b60008451611a78818460208901611560565b91909101928352506020820152604001919050565b600060208284031215611a9f57600080fd5b81518015158114610e9b57600080fdfea264697066735822122090928a66070125904780390eb49d45fe12c136aec641b1db69316e0ffefc6da764736f6c634300081b0033",c1=n=>n.length>1,Nn=class extends hi{constructor(...e){c1(e)?super(...e):super(Ju,N6,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(Ju)}static connect(e,t){return new oe(e,Ju,t)}};xe(Nn,"bytecode",N6),xe(Nn,"abi",Ju);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:"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:"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:[{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:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",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:"_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:"_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:"returnData",type:"bytes"}],stateMutability:"payable",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:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"",type:"address"}],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"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",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:"_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:"_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:"_token",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"incrementLockCounterTo",outputs:[],stateMutability:"nonpayable",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:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"pure",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetwork",type:"address"}],name:"setColonyNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",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:"_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:"_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:"_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:"_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"}],Si=class{static createInterface(){return new te.Interface(Ip)}static connect(e,t){return new oe(e,Ip,t)}};xe(Si,"abi",Ip);var Ri;(function(n){n.TokenClient="TokenClient",n.TokenLockingClient="TokenLockingClient"})(Ri||(Ri={}));var Dn;(function(n){n.Colony="Colony",n.ColonyLegacy="ColonyLegacy",n.Erc20="Erc20",n.Erc2612="Erc2612",n.Sai="Sai"})(Dn||(Dn={}));var{AddressZero:b1}=xt;async function g1(n){try{await n.authority();return}catch{throw new Error("Token can not be assigned a TokenAuthority")}}var T1=async(n,e)=>{let t,a=!0,i=!0;t=Nn.connect(n,e);try{await t.totalSupply()}catch(r){throw new Error(`Token is probably not a valid ERC20 token, got ${r.message}`)}try{await t.locked(),await g1(t)}catch{a=!1}try{await t.nonces(b1)}catch{i=!1}return a?t.tokenClientType=Dn.Colony:i?(t=wn.connect(n,e),t.tokenClientType=Dn.Erc2612):(t=vn.connect(n,e),t.tokenClientType=Dn.Erc20),t.clientType=Ri.TokenClient,t},Sp=T1;var v1=(n,e)=>{let t=Si.connect(n,e);return t.clientType=Ri.TokenLockingClient,t},Rp=v1;var{AddressZero:Pp}=xt,w1=vn.connect(Pp,new ta.BaseProvider(3656691)).interface,_1=Ii.connect(Pp,new ta.BaseProvider(3656691)).interface,k1=wn.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"},{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:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{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:"returnData",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:"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:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"}],Vs=class{static createInterface(){return new te.Interface(Np)}static connect(e,t){return new oe(e,Np,t)}};Vs.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:"returnData",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(Dp)}static connect(e,t){return new oe(e,Dp,t)}};js.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:!1,internalType:"address",name:"bridgeAddress",type:"address"}],name:"BridgeSet",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:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateSentToBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateStoredFromBridge",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:"uint256",name:"skillId",type:"uint256"}],name:"SkillAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillCreationStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillStoredFromBridge",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:[{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"address",name:"_resolver",type:"address"}],name:"addColonyVersion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_resolver",type:"address"}],name:"addExtensionToNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"addPendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPendingSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"addReputationUpdateLogFromBridge",outputs:[],stateMutability:"nonpayable",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:"_parentSkillId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"addSkillFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",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:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"chainId",type:"uint256"}],name:"bridgeCurrentRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"bridgePendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"skillId",type:"uint256"}],name:"bridgeSkillIfNotMiningChain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"burnUnneededRewards",outputs:[],stateMutability:"nonpayable",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:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"}],name:"claimMiningReward",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:"address",name:"_tokenAddress",type:"address"}],name:"createMetaColony",outputs:[],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:"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:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateExtension",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:"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:"returnData",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"getBridgedReputationUpdateCount",outputs:[{internalType:"uint256",name:"bridgedReputationCount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"}],name:"getBridgedSkillCounts",outputs:[{internalType:"uint256",name:"skillCount",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:"uint256",name:"_id",type:"uint256"}],name:"getColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyBridgeAddress",outputs:[{internalType:"address",name:"bridge",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCreationSalt",outputs:[{internalType:"bytes32",name:"salt",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"}],name:"getColonyVersionResolver",outputs:[{internalType:"address",name:"_resolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentColonyVersion",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getENSRegistrar",outputs:[{internalType:"address",name:"_address",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:[{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:[],name:"getFeeInverse",outputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMetaColony",outputs:[{internalType:"address payable",name:"_colonyAddress",type:"address"}],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:"getMiningChainId",outputs:[{internalType:"uint256",name:"reputationMiningChainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"}],name:"getMiningDelegator",outputs:[{internalType:"address",name:"_delegator",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiningResolver",outputs:[{internalType:"address",name:"miningResolverAddress",type:"address"}],stateMutability:"view",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:"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:"address",name:"_token",type:"address"}],name:"getPayoutWhitelist",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"getPendingReputationUpdate",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:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.PendingReputationUpdate",name:"update",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"getPendingSkillAddition",outputs:[{internalType:"uint256",name:"parentId",type:"uint256"}],stateMutability:"view",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:"_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:[{internalType:"bool",name:"_active",type:"bool"}],name:"getReputationMiningCycle",outputs:[{internalType:"address",name:"_repMiningCycleAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningCycleReward",outputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningSkillId",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"view",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:"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_deprecated",type:"bool"}],internalType:"struct ColonyNetworkDataTypes.Skill",name:"_skill",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSkillCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTokenLocking",outputs:[{internalType:"address",name:"_lockingAddress",type:"address"}],stateMutability:"view",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:"miningChainId",type:"uint256"},{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"}],name:"initialiseReputationMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[{internalType:"uint256",name:"_rootLocalSkillId",type:"uint256"}],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:"address",name:"_colony",type:"address"}],name:"isColony",outputs:[{internalType:"bool",name:"_addressIsColony",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],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:"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:"_stakers",type:"address[]"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"punishStakers",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:"_username",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerUserLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_bridgeAddress",type:"address"}],name:"setColonyBridgeAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],name:"setFeeInverse",outputs:[],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:"_miningResolverAddress",type:"address"}],name:"setMiningResolver",outputs:[],stateMutability:"nonpayable",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:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",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:"uint256",name:"_amount",type:"uint256"}],name:"setReputationMiningCycleReward",outputs:[],stateMutability:"nonpayable",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:[{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"},{internalType:"uint256",name:"nonce",type:"uint256"}],name:"setReputationRootHashFromBridge",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:"address",name:"_tokenLockingAddress",type:"address"}],name:"setTokenLocking",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:"uint256",name:"_amount",type:"uint256"}],name:"stakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"startNextCycle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"startTokenAuction",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:"bytes32",name:"_extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"unstakeForMining",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:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"}],Pi=class{static createInterface(){return new te.Interface(Op)}static connect(e,t){return new oe(e,Op,t)}};Pi.abi=Op;var wa=class{constructor({contract:e,config:t,method:a,args:i,eventData:r,txConfig:s}){this.config=t,this.contract=e,this.method=a,this.args=i,this.eventData=r,this.txConfig=s}async getArgs(e){let t=[];return typeof this.args=="function"?t=await this.args():t=this.args,e&&t.push(e),t}async getTx(e){let t=await this.getArgs(e);return await this.contract.functions[this.method].apply(this.contract,t)}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.config.ipfs.getMetadataForEvent.bind(this.config.ipfs,Us[this.txConfig.metadataType],t.metadata);return[t,e,a]}return[t,e]}return[{},e]}async broadcastMetaTx(e){let{provider:t}=this.config.getSigner();if(!t)throw new Error("No provider found");let i=await(await fetch(`${this.config.metaTxBroadcasterEndpoint}/broadcast`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();if(i.status!=="success")throw new Error(`Could not send Metatransaction. Reason given: ${i.data.reason}`);if(!i.data?.txHash)throw new Error("Could not get transaction hash from broadcaster response");return t.getTransaction(i.data.txHash)}async waitForMetaTx(e){let t=await e.wait();return t.parsedLogs=Ql(t.logs,this.contract.interface),t}tx(){return{send:async e=>{let t=await this.getTx(e);return[t,this.getMined.bind(this,t)]},mined:async e=>{let t=await this.getTx(e);return this.getMined(t)},encode:async()=>{let e=await this.getArgs();return this.contract.interface.encodeFunctionData(this.method,e)}}}};var{arrayify:E1,solidityKeccak256:M1,splitSignature:C1}=te,ja=class extends wa{async sendMetaTransaction(e,t){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let a=this.config.getSigner(),{provider:i}=a;if(!i)throw new Error("No provider found");let r;this.config.network===Pn.Custom?r=1:r=(await i.getNetwork()).chainId;let s=await a.getAddress(),o=await this.contract.functions.getMetatransactionNonce(s),l=M1(["uint256","address","uint256","bytes"],[o.toString(),t,r,e]),p=E1(l),f=await a.signMessage(p),{r:x,s:I,v:_}=C1(f),v={target:t,payload:e,userAddress:s,r:x,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(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}},$u=(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=ke.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 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"}],Ni=class{static createInterface(){return new te.Interface(Bp)}static connect(e,t){return new oe(e,Bp,t)}};Ni.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"}],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:[],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(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:[{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(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{AddressZero:O1}=xt,On=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(La(On.extensionType),e.address);if(t===O1)throw new Error(`${On.extensionType} extension is not installed for this Colony`);let a=await Sr(t,e.config.signerOrProvider);if(!va(On.extensionType,a,e.version))throw new Error(`Version ${a} of the ${On.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=On.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${On.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new On(e,r,a)}static getLatestSupportedVersion(){return On.supportedVersions[On.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||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[_]),I=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,I,x,s,ke.SkillIgnore]},async _=>({...ne("OneTxPaymentMade",_)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[La(we.OneTxPayment),t],async a=>({...ne("ExtensionUpgraded",a)}))}},Ha=On;Ha.supportedVersions=[{version:3,factory:Bi},{version:4,factory:Fi},{version:5,factory:Li}],Ha.extensionType=we.OneTxPayment;var Bn=class{constructor(e,t){typeof t=="string"?this.tokenClient=vn.connect(t,e.config.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 Hs=class extends Bn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=Nn.connect(a,t.config.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 Bn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=wn.connect(a,t.config.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 D6=async(n,e)=>{let t=await Sp(e,n.config.signerOrProvider);switch(t.tokenClientType){case Dn.Colony:return new Hs(n,t);case Dn.Erc20:return new Bn(n,t);case Dn.Erc2612:return new qs(n,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"}],Ui=class{static createInterface(){return new te.Interface(Hp)}static connect(e,t){return new oe(e,Hp,t)}};Ui.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"}],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{AddressZero:zp}=xt;var Qu=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===zp)throw new Error(`${Fn.extensionType} extension is not installed for this Colony`);let a=await Sr(t,e.config.signerOrProvider);if(!va(Fn.extensionType,a,e.version))throw new Error(`Version ${a} of the ${Fn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Fn.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${Fn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new Fn(e,r,a)}static getLatestSupportedVersion(){return Fn.supportedVersions[Fn.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 Rs(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),this.colony.reputation,this.votingReputationContract,e,zp,Wl);return[e,t,zp,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.config.ipfs.uploadMetadata(Re.Decision,t),[e,a]},async a=>({...ne("Annotation",a)}),{metadataType:Re.Decision})}approveStake(e,t=ke.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{...$u("UserTokenApproved",a,i.getInternalTokenLockingContract().interface)}})}stakeMotion(e,t,a){let i=async()=>{let r=await this.colony.config.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(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 I=await this.getMinStake(o,t);if(F.from(a).lt(I))throw new Error(`The staked amount is too small. Please stake at least ${Ir(I)}`);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),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!==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.config.getSigner().getAddress(),{key:p,value:f,branchMask:x,siblings:I}=await this.colony.reputation.getReputationWithProofs(o,l,s),_=await this.createMotionSalt(e),v=te.solidityKeccak256(["bytes","uint256"],[_,t]);return[e,v,p,f,x,I]};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!==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.config.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:I,value:_,branchMask:v,siblings:S}=p;return[e,f,F.from(x),I,_,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!==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.config.getSigner().getAddress(),p=await _i(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),t,r),{key:f,value:x,branchMask:I,siblings:_}=await this.colony.reputation.getReputationWithProofs(o,l,s);return[e,t,p,f,x,I,_]};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!==zt.Finalizable)throw new Error(`Motion cannot be finalized. It's currently in "${zt[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",[La(we.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}}},qa=Fn;qa.supportedVersions=[{version:7,factory:Ui},{version:8,factory:Vi},{version:9,factory:ji}],qa.extensionType=we.VotingReputation;var U1={["motion"]:qa,["oneTx"]:Ha},Fr=class{static async connect(e,t){let a=await Sr(t,e.config.signerOrProvider),i=Fr.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.config.signerOrProvider),s=await r.getToken(),o=await D6(e,s),l=new Fr(e,r,o,a);return await l.updateExtensions(),l}static getLatestSupportedVersion(){return Fr.supportedVersions[Fr.supportedVersions.length-1].version}constructor(e,t,a,i){this.colony=t,this.colonyNetwork=e,this.config=e.config,this.address=t.address,this.ext={},this.reputation=new aa(e.getInternalNetworkContract(),t,{customEndpointUrl:e.config.reputationOracleEndpoint}),this.token=a,this.version=i}createColonyTxCreator(e,t,a,i,r){return new Br({colony:this,config:this.colonyNetwork.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createPermissionedColonyTxCreator(e,t,a,i,r,s){return new Br({colony:this,config:this.colonyNetwork.config,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 qa.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}if(!this.ext.oneTx)try{this.ext.oneTx=await Ha.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.config.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.config.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.config.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 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=ke.RootDomain,s=a||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(),I=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,I,_,v,S,e,o]},async l=>({...ne("ColonyFundsMovedBetweenFundingPots",l)}))}async getReputation(e,t=ke.RootDomain,a=3){let{skillId:i}=await this.colony.getDomain(t);return this.reputation.getReputationFraction(i,e,void 0,a)}async getReputationPoints(e,t=ke.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(address,address,bytes,bool)",a)}))}annotateTransaction(e,t){return this.createColonyTxCreator(this.colony,"annotateTransaction",async()=>{let a;return typeof t=="string"?a=t:a=await this.config.ipfs.uploadMetadata(Re.Annotation,t),[e,a]},async a=>({...ne("Annotation",a)}),{metadataType:Re.Annotation})}installExtension(e){let t=U1[e],a=t.getLatestSupportedVersion(),{extensionType:i}=t;if(!va(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",[La(i),t.getLatestSupportedVersion()],async s=>({...$u("ExtensionInstalled",s,r.interface)}))}async getRoles(e,t=ke.RootDomain){let a=await this.colony.getUserRoles(e,t);return fu(a)}setRoles(e,t,a=ke.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let i=await this.getRoles(e,a),r=Array.from(new Set([...i,...[].concat(t)])),s=$l(r);return[e,a,s]},{roles:Ne.Architecture,domain:a},async i=>({...ne("ColonyRoleSet",i),...ne("RecoveryRoleSet",i)}))}unsetRoles(e,t,a=ke.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let r=(await this.getRoles(e,a)).filter(o=>![].concat(t).includes(o)),s=$l(r);return[e,a,s]},{roles:Ne.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=ke.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=ke.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:Ne.Arbitration},async i=>({...ne("ArbitraryReputationUpdate",i)}))}},Lr=Fr;Lr.supportedVersions=[{version:11,factory:Ni},{version:12,factory:Di},{version:13,factory:Oi}];var{splitSignature:V1}=te,Yu=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,a]){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let i=this.contract.signer,{provider:r}=i;if(!r)throw new Error("No provider found");let s;this.config.network===Pn.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:a,nonce:l.toString(),deadline:f}),{r:I,s:_,v}=V1(x),S={target:e,owner:o,spender:t,value:a.toString(),deadline:f,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=Rp(this.address,e.config.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 zs=class{constructor(e,t){let a=t?.network||Pn.ArbitrumOne;this.metaTxBroadcasterEndpoint=t?.metaTxBroadcasterEndpoint||du[a],this.ipfs=new Or(t?.ipfsAdapter),this.network=a,this.reputationOracleEndpoint=t?.reputationOracleEndpoint||Cr[a],this.signerOrProvider=e}getSigner(){if(!(this.signerOrProvider instanceof St))throw new Error("Need a signer to create a transaction");return this.signerOrProvider}};var{namehash:O6}=te,{AddressZero:Wp}=xt,Ws=class{constructor(e,t){this.config=new zs(e,t),this.contract=Pi.connect(t?.customNetworkAddress||uu[this.config.network],e)}async getTokenLocking(){if(!this.locking){let e=await this.contract.getTokenLocking();this.locking=new Gs(this,e)}return this.locking}getInternalNetworkContract(){return this.contract}createTxCreator(e,t,a,i,r){return new wa({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createMetaTxCreator(e,t,a,i,r){return new ja({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createEip2612TxCreator(e,t,a,i,r){return new Yu({config:this.config,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[Wp,e.name,e.symbol,e.decimals||18,0,t,""]}return[e,"","",0,0,t,""]};return a?this.createMetaTxCreator(this.contract,"createColonyForFrontend",async()=>{let r=await i();return typeof a=="string"?r[6]=a:r[6]=await this.config.ipfs.uploadMetadata(Re.Colony,a),r},async r=>({...ne("TokenDeployed",r),...ne("ColonyAdded",r),...ne("TokenAuthorityDeployed",r)}),{metadataType:Re.Colony}):this.createMetaTxCreator(this.contract,"createColonyForFrontend",i,async r=>({...ne("TokenDeployed",r),...ne("ColonyAdded",r),...ne("TokenAuthorityDeployed",r)}))}async getColony(e){return Lr.connect(this,e)}async getMetaColony(){let e=await this.contract.getMetaColony();return this.getColony(e)}async getColonyLabel(e){let t=await this.contract.lookupRegisteredENSDomain(e);return t?t.replace(Is[this.config.network],""):null}async getColonyAddress(e){let t=O6(`${e}${Is[this.config.network]}`),a=await this.contract.addr(t);return a!==Wp?a:null}async getUsername(e){let t=await this.contract.lookupRegisteredENSDomain(e);return t?t.replace(Ss[this.config.network],""):null}async getUserAddress(e){let t=O6(`${e}${Ss[this.config.network]}`),a=await this.contract.addr(t);return a!==Wp?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.contract,"registerUserLabel",t,async a=>({...ne("UserLabelRegistered",a)}))}deployToken(e,t,a=18){return this.createMetaTxCreator(this.contract,"deployTokenViaNetwork",[e,t,a],async i=>({...ne("TokenDeployed",i)}))}};var B6=async n=>{if(!n.ext.oneTx){if(!va(we.OneTxPayment,cu[we.OneTxPayment],n.version))throw new Error(`OneTxPayment extension of version ${cu[we.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,[Ne.Administration,Ne.Funding]).tx().mined()}};var{isAddress:H1}=te,Xu=new ta.JsonRpcProvider("http://127.0.0.1:8545"),Hi,Ks,q1=()=>new on("0x0355596cdb5e5242ad082c4fe3f8bbe48c9dba843fe1f99dd8272f487e70efae",Xu),G1=async n=>{let e=q1(),a=await new Ws(e,{customNetworkAddress:n,reputationOracleEndpoint:"http://localhost:3000"}).getMetaColony();return await B6(a),a},z1=async n=>{await Hi.mint(pu(n)).tx().mined(),await Hi.claimFunds().tx().mined();let e=await Hi.getBalance();return Ir(e)},W1=async n=>{if(!Hi.ext.oneTx)throw new Error("OneTxPayment extension not installed");return Hi.ext.oneTx.pay(n,yu`10`).tx()},K1=async()=>{await Xu.send("evm_increaseTime",[3600]),await Xu.send("evm_mine",[]),await Xu.send("evm_mine",[])},J1=async n=>(await Hi.getReputation(n)).toString(),Zu=document.querySelector("#address"),F6=document.querySelector("#button_connect"),Kp=document.querySelector("#funding_amount"),L6=document.querySelector("#button_fund"),U6=document.querySelector("#recipient"),V6=document.querySelector("#button_pay"),j6=document.querySelector("#button_jump"),H6=document.querySelector("#button_get_reputation"),Jp=document.querySelector("#error"),q6=document.querySelector("#result");if(!Zu||!Kp||!U6||!Jp||!q6||!F6||!L6||!V6||!j6||!H6)throw new Error("Could not find all required HTML elements");var ed=n=>{Jp.innerText=`Found an error: ${n.message}`,console.error(n)},G6=()=>{Jp.innerText=""},Ln=n=>{q6.innerText=n};F6.addEventListener("click",async()=>{G6();let n=Zu.value;if(!H1(n))return ed(new Error("This is not a valid address"));Ln("Processing...");try{let e=await G1(Zu.value);Hi=e,Ln(` Connected to Colony with address: ${e.address}. Colony version: ${e.version}. - `)}catch(e){Zu(e),Ln("")}finally{Xu.value=""}return null});L6.addEventListener("click",async()=>{G6(),Ln("Processing...");try{let n=Kp.value,e=await z1(n);Ln(`Funded MetaColony! Current funding: ${e} CLNY`)}catch(n){Zu(n),Ln("")}finally{Kp.value=""}return null});V6.addEventListener("click",async()=>{Ks=U6.value,Ln("Processing...");try{await W1(Ks)}catch(n){Zu(n),Ln("")}Ln(`Successfully paid 10 CLNY to ${Ks}`)});j6.addEventListener("click",async()=>{await K1(),Ln("Whooo that was a hell of a ride. Welcome to the future")});H6.addEventListener("click",async()=>{let n=await J1(Ks);Ln(`User ${Ks} has ${Ir(n)} reputation points`)});})(); + `)}catch(e){ed(e),Ln("")}finally{Zu.value=""}return null});L6.addEventListener("click",async()=>{G6(),Ln("Processing...");try{let n=Kp.value,e=await z1(n);Ln(`Funded MetaColony! Current funding: ${e} CLNY`)}catch(n){ed(n),Ln("")}finally{Kp.value=""}return null});V6.addEventListener("click",async()=>{Ks=U6.value,Ln("Processing...");try{await W1(Ks)}catch(n){ed(n),Ln("")}Ln(`Successfully paid 10 CLNY to ${Ks}`)});j6.addEventListener("click",async()=>{await K1(),Ln("Whooo that was a hell of a ride. Welcome to the future")});H6.addEventListener("click",async()=>{let n=await J1(Ks);Ln(`User ${Ks} has ${Ir(n)} reputation points`)});})(); /** * [js-sha3]{@link https://github.com/emn178/js-sha3} * diff --git a/metamask.js b/metamask.js index 9dd2ee78a..285013c3f 100644 --- a/metamask.js +++ b/metamask.js @@ -1,9 +1,9 @@ -"use strict";(()=>{var S6=Object.create;var Gs=Object.defineProperty;var R6=Object.getOwnPropertyDescriptor;var P6=Object.getOwnPropertyNames;var N6=Object.getPrototypeOf,D6=Object.prototype.hasOwnProperty;var O6=(n,e,t)=>e in n?Gs(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var ne=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),ji=(n,e)=>{for(var t in e)Gs(n,t,{get:e[t],enumerable:!0})},B6=(n,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of P6(e))!D6.call(n,i)&&i!==t&&Gs(n,i,{get:()=>e[i],enumerable:!(a=R6(e,i))||a.enumerable});return n};var wn=(n,e,t)=>(t=n!=null?S6(N6(n)):{},B6(e||!n||!n.__esModule?Gs(t,"default",{value:n,enumerable:!0}):t,n));var xe=(n,e,t)=>(O6(n,typeof e!="symbol"?e+"":e,t),t);var Vp=ne(()=>{});var rd=ne((jp,id)=>{(function(n,e){"use strict";function t(C,u){if(!C)throw new Error(u||"Assertion failed")}function a(C,u){C.super_=u;var y=function(){};y.prototype=u.prototype,C.prototype=new y,C.prototype.constructor=C}function i(C,u,y){if(i.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=i:e.BN=i,i.BN=i,i.wordSize=26;var r;try{typeof window<"u"&&typeof window.Buffer<"u"?r=window.Buffer:r=Vp().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(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 b=s(C,y);return y-1>=u&&(b|=s(C,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(C,u,y,b){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()},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"],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];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=I[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(C){for(var u=new Array(C.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-C.length+1);P<=c;P++){var D=d-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[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,W=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,Ka=w[8]|0,je=Ka&8191,He=Ka>>>13,Wa=w[9]|0,qe=Wa&8191,Ge=Wa>>>13,Ja=A[0]|0,ze=Ja&8191,Ke=Ja>>>13,$a=A[1]|0,We=$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,Ke),d=d+Math.imul(P,ze)|0,m=Math.imul(P,Ke);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,Ke),d=d+Math.imul(W,ze)|0,m=Math.imul(W,Ke),g=g+Math.imul(c,We)|0,d=d+Math.imul(c,Je)|0,d=d+Math.imul(P,We)|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,Ke),d=d+Math.imul(Q,ze)|0,m=Math.imul(Q,Ke),g=g+Math.imul(V,We)|0,d=d+Math.imul(V,Je)|0,d=d+Math.imul(W,We)|0,m=m+Math.imul(W,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,Ke),d=d+Math.imul(le,ze)|0,m=Math.imul(le,Ke),g=g+Math.imul(X,We)|0,d=d+Math.imul(X,Je)|0,d=d+Math.imul(Q,We)|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(W,$e)|0,m=m+Math.imul(W,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,Ke),d=d+Math.imul(De,ze)|0,m=Math.imul(De,Ke),g=g+Math.imul(Z,We)|0,d=d+Math.imul(Z,Je)|0,d=d+Math.imul(le,We)|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(W,Xe)|0,m=m+Math.imul(W,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,Ke),d=d+Math.imul(Be,ze)|0,m=Math.imul(Be,Ke),g=g+Math.imul(Ne,We)|0,d=d+Math.imul(Ne,Je)|0,d=d+Math.imul(De,We)|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(W,Ze)|0,m=m+Math.imul(W,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,Ke),d=d+Math.imul(Le,ze)|0,m=Math.imul(Le,Ke),g=g+Math.imul(Oe,We)|0,d=d+Math.imul(Oe,Je)|0,d=d+Math.imul(Be,We)|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(W,tt)|0,m=m+Math.imul(W,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,Ke),d=d+Math.imul(Ve,ze)|0,m=Math.imul(Ve,Ke),g=g+Math.imul(Fe,We)|0,d=d+Math.imul(Fe,Je)|0,d=d+Math.imul(Le,We)|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(W,at)|0,m=m+Math.imul(W,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 Ku=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Ku>>>26)|0,Ku&=67108863,g=Math.imul(je,ze),d=Math.imul(je,Ke),d=d+Math.imul(He,ze)|0,m=Math.imul(He,Ke),g=g+Math.imul(Ue,We)|0,d=d+Math.imul(Ue,Je)|0,d=d+Math.imul(Ve,We)|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(W,rt)|0,m=m+Math.imul(W,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 Wu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Wu>>>26)|0,Wu&=67108863,g=Math.imul(qe,ze),d=Math.imul(qe,Ke),d=d+Math.imul(Ge,ze)|0,m=Math.imul(Ge,Ke),g=g+Math.imul(je,We)|0,d=d+Math.imul(je,Je)|0,d=d+Math.imul(He,We)|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(W,ot)|0,m=m+Math.imul(W,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,We),d=Math.imul(qe,Je),d=d+Math.imul(Ge,We)|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(W,dt)|0,m=m+Math.imul(W,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]=Ku,h[8]=Wu,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(C,u,y){y.negative=u.negative^C.negative,y.length=C.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(C,u,y){return U(C,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(C,u){this.x=C,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 $(C,u){this.name=C,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(C){if(typeof C=="string"){var u=i._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 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(C){q.call(this,C),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 id>"u"||id,jp)});var yy=ne((xg,Qs)=>{(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 Qs=="object"&&Qs.exports,o=typeof define=="function"&&define.amd,l=!a.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",p="0123456789abcdef".split(""),f=[31,7936,2031616,520093696],x=[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};(a.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(c){return Object.prototype.toString.call(c)==="[object Array]"}),l&&(a.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,W){return new d(c,P,W).update(V)[D]()}},$=function(c,P,D){return function(V,W,ee,X){return u["cshake"+c].update(V,W,ee,X)[D]()}},de=function(c,P,D){return function(V,W,ee,X){return u["kmac"+c].update(V,W,ee,X)[D]()}},T=function(c,P,D,V){for(var W=0;W>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(n);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(n)}else throw new Error(n);P=!0}for(var V=this.blocks,W=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)<=W){for(this.start=Z-W,this.block=V[X],Z=0;Z>8,D=c&255;D>0;)W.unshift(D),c=c>>8,D=c&255,++V;return P?W.push(V):W.unshift(V),this.update(W),W.length},d.prototype.encodeString=function(c){var P,D=typeof c;if(D!=="string"){if(D==="object"){if(c===null)throw new Error(n);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(n)}else throw new Error(n);P=!0}var V=0,W=c.length;if(P)V=W;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),W=0)}return V&&(Q=P[W],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,W=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[W],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,W,ee,X,Q,yt,Z,le,Ha,Ne,De,qa,Oe,Be,Ga,Fe,Le,za,Ue,Ve,Ka,je,He,Wa,qe,Ge,Ja,ze,Ke,$a,We,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)W=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=W^(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^(W<<1|ee>>>31),D=Ha^(ee<<1|W>>>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,Ke=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,We=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,Wa=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,Ka=c[49]<<14|c[48]>>>18,c[0]=qa^~Be&Fe,c[1]=Oe^~Ga&Le,c[10]=je^~Wa&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]=Wa^~Ge&ze,c[13]=qe^~Ja&Ke,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&Ka,c[14]=Ge^~ze&$a,c[15]=Ja^~Ke&We,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^~Ka&Oe,c[16]=ze^~$a&je,c[17]=Ke^~We&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]=Ka^~Oe&Ga,c[18]=$a^~je&Wa,c[19]=We^~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{o0.exports=s0;function s0(n,e){if(!n)throw new Error(e||"Assertion failed")}s0.equal=function(e,t,a){if(e!=t)throw new Error(a||"Assertion failed: "+e+" != "+t)}});var u0=ne((d3,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 a=function(){};a.prototype=t.prototype,e.prototype=new a,e.prototype.constructor=e}}});var kn=ne(Pe=>{"use strict";var j2=nr(),H2=u0();Pe.inherits=H2;function q2(n,e){return(n.charCodeAt(e)&64512)!==55296||e<0||e+1>=n.length?!1:(n.charCodeAt(e+1)&64512)===56320}function G2(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):q2(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}Pe.htonl=d0;function K2(n,e){for(var t="",a=0;a>>0}return r}Pe.join32=W2;function J2(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}Pe.split32=J2;function $2(n,e){return n>>>e|n<<32-e}Pe.rotr32=$2;function Q2(n,e){return n<>>32-e}Pe.rotl32=Q2;function X2(n,e){return n+e>>>0}Pe.sum32=X2;function Y2(n,e,t){return n+e+t>>>0}Pe.sum32_3=Y2;function Z2(n,e,t,a){return n+e+t+a>>>0}Pe.sum32_4=Z2;function eh(n,e,t,a,i){return n+e+t+a+i>>>0}Pe.sum32_5=eh;function th(n,e,t,a){var i=n[e],r=n[e+1],s=a+r>>>0,o=(s>>0,n[e+1]=s}Pe.sum64=th;function nh(n,e,t,a){var i=e+a>>>0,r=(i>>0}Pe.sum64_hi=nh;function ah(n,e,t,a){var i=e+a;return i>>>0}Pe.sum64_lo=ah;function ih(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}Pe.sum64_4_hi=ih;function rh(n,e,t,a,i,r,s,o){var l=e+a+r+o;return l>>>0}Pe.sum64_4_lo=rh;function sh(n,e,t,a,i,r,s,o,l,p){var f=0,x=e;x=x+a>>>0,f+=x>>0,f+=x>>0,f+=x>>0,f+=x>>0}Pe.sum64_5_hi=sh;function oh(n,e,t,a,i,r,s,o,l,p){var f=e+a+r+o+p;return f>>>0}Pe.sum64_5_lo=oh;function uh(n,e,t){var a=e<<32-t|n>>>t;return a>>>0}Pe.rotr64_hi=uh;function dh(n,e,t){var a=n<<32-t|e>>>t;return a>>>0}Pe.rotr64_lo=dh;function lh(n,e,t){return n>>>t}Pe.shr64_hi=lh;function ph(n,e,t){var a=n<<32-t|e>>>t;return a>>>0}Pe.shr64_lo=ph});var ar=ne(f0=>{"use strict";var y0=kn(),yh=nr();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}f0.BlockHash=bo;bo.prototype.update=function(e,t){if(e=y0.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=y0.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 fh=kn(),Hn=fh.rotr32;function ch(n,e,t,a){if(n===0)return c0(e,t,a);if(n===1||n===3)return h0(e,t,a);if(n===2)return m0(e,t,a)}da.ft_1=ch;function c0(n,e,t){return n&e^~n&t}da.ch32=c0;function m0(n,e,t){return n&e^n&t^e&t}da.maj32=m0;function h0(n,e,t){return n^e^t}da.p32=h0;function mh(n){return Hn(n,2)^Hn(n,13)^Hn(n,22)}da.s0_256=mh;function hh(n){return Hn(n,6)^Hn(n,11)^Hn(n,25)}da.s1_256=hh;function xh(n){return Hn(n,7)^Hn(n,18)^n>>>3}da.g0_256=xh;function bh(n){return Hn(n,17)^Hn(n,19)^n>>>10}da.g1_256=bh});var g0=ne((f3,b0)=>{"use strict";var ir=kn(),gh=ar(),Th=Nd(),Dd=ir.rotl32,$r=ir.sum32,vh=ir.sum32_5,wh=Th.ft_1,x0=gh.BlockHash,_h=[1518500249,1859775393,2400959708,3395469782];function qn(){if(!(this instanceof qn))return new qn;x0.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}ir.inherits(qn,x0);b0.exports=qn;qn.blockSize=512;qn.outSize=160;qn.hmacStrength=80;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 rr=kn(),kh=ar(),sr=Nd(),Ah=nr(),An=rr.sum32,Mh=rr.sum32_4,Eh=rr.sum32_5,Ch=sr.ch32,Ih=sr.maj32,Sh=sr.s0_256,Rh=sr.s1_256,Ph=sr.g0_256,Nh=sr.g1_256,T0=kh.BlockHash,Dh=[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;T0.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=Dh,this.W=new Array(64)}rr.inherits(Gn,T0);v0.exports=Gn;Gn.blockSize=512;Gn.outSize=256;Gn.hmacStrength=192;Gn.padLength=64;Gn.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 Bd=kn(),w0=Od();function la(){if(!(this instanceof la))return new la;w0.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}Bd.inherits(la,w0);_0.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=ne((h3,C0)=>{"use strict";var Qt=kn(),Oh=ar(),Bh=nr(),zn=Qt.rotr64_hi,Kn=Qt.rotr64_lo,A0=Qt.shr64_hi,M0=Qt.shr64_lo,Sa=Qt.sum64,Fd=Qt.sum64_hi,Ld=Qt.sum64_lo,Fh=Qt.sum64_4_hi,Lh=Qt.sum64_4_lo,Uh=Qt.sum64_5_hi,Vh=Qt.sum64_5_lo,E0=Oh.BlockHash,jh=[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 Mn(){if(!(this instanceof Mn))return new Mn;E0.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=jh,this.W=new Array(160)}Qt.inherits(Mn,E0);C0.exports=Mn;Mn.blockSize=1024;Mn.outSize=512;Mn.hmacStrength=192;Mn.padLength=128;Mn.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 Vd=kn(),I0=Ud();function pa(){if(!(this instanceof pa))return new pa;I0.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}Vd.inherits(pa,I0);S0.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 P0=ne(or=>{"use strict";or.sha1=g0();or.sha224=k0();or.sha256=Od();or.sha384=R0();or.sha512=Ud()});var L0=ne(F0=>{"use strict";var li=kn(),ex=ar(),go=li.rotl32,N0=li.sum32,Qr=li.sum32_3,D0=li.sum32_4,B0=ex.BlockHash;function Wn(){if(!(this instanceof Wn))return new Wn;B0.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}li.inherits(Wn,B0);F0.ripemd160=Wn;Wn.blockSize=512;Wn.outSize=160;Wn.hmacStrength=192;Wn.padLength=64;Wn.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,f=r,x=s,I=o,_=0;_<80;_++){var v=N0(go(D0(a,O0(_,i,r,s),e[ax[_]+t],tx(_)),rx[_]),o);a=o,o=s,s=go(r,10),r=i,i=v,v=N0(go(D0(l,O0(79-_,p,f,x),e[ix[_]+t],nx(_)),sx[_]),I),l=I,I=x,x=go(f,10),f=p,p=v}v=Qr(this.h[1],r,x),this.h[1]=Qr(this.h[2],s,I),this.h[2]=Qr(this.h[3],o,l),this.h[3]=Qr(this.h[4],a,p),this.h[4]=Qr(this.h[0],i,f),this.h[0]=v};Wn.prototype._digest=function(e){return e==="hex"?li.toHex32(this.h,"little"):li.split32(this.h,"little")};function O0(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 tx(n){return n<=15?0:n<=31?1518500249:n<=47?1859775393:n<=63?2400959708:2840853838}function nx(n){return n<=15?1352829926:n<=31?1548603684:n<=47?1836072691:n<=63?2053994217:0}var ax=[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],ix=[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],rx=[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],sx=[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 V0=ne((T3,U0)=>{"use strict";var ox=kn(),ux=nr();function ur(n,e,t){if(!(this instanceof ur))return new ur(n,e,t);this.Hash=n,this.blockSize=n.blockSize/8,this.outSize=n.outSize/8,this.inner=null,this.outer=null,this._init(ox.toArray(e,t))}U0.exports=ur;ur.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),ux(e.length<=this.blockSize);for(var t=e.length;t{var Rt=j0;Rt.utils=kn();Rt.common=ar();Rt.sha=P0();Rt.ripemd=L0();Rt.hmac=V0();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=ne((rl,hf)=>{"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&&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],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],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,W=P%4,this._Ke[V][W]=m[k],this._Kd[h-V][W]=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=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,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,W,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],W=(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]=(W+de[D-7]|0)+(ee+de[D-16]|0)|0;for(D=0;D<64;D++)W=(((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+W|0,g=k,k=h,h=A,A=W+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,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 a(_,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=a(_,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=a(_,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 I={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"?bf.exports=I:typeof define=="function"&&define.amd?define(I):n&&(n.scrypt&&(n._scrypt=n.scrypt),n.scrypt=I)})(pl)});var qf=ne((d4,Hf)=>{"use strict";var qo="qpzry9x8gf2tvdw0s3jn54khce6mua7l",hl={};for(ss=0;ss>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 Vf(n){for(var e=1,t=0;t126)return"Invalid prefix ("+n+")";e=xr(e)^a>>5}for(e=xr(e),t=0;tt)throw new TypeError("Exceeds length limit");n=n.toLowerCase();var a=Vf(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=xr(a)^s,i+=qo.charAt(s)}for(r=0;r<6;++r)a=xr(a);for(a^=1,r=0;r<6;++r){var o=a>>(5-r)*5&31;i+=qo.charAt(o)}return i}function jf(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=Vf(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=jf.apply(null,arguments);if(typeof n=="object")return n}function Wx(n){var e=jf.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function Go(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 zl=="object"&&typeof Kl<"u"?Kl.exports=e():typeof define=="function"&&define.amd?define(e):(n=typeof globalThis<"u"?globalThis:n||self,n.fetchRetry=e())})(zl,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,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(I,_){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)I(U);else if(typeof x=="function")try{return Promise.resolve(x(L,null,U)).then(function(H){H?S(L,null,U):I(U)}).catch(_)}catch(H){_(H)}else L=0}function t(a){this.name="ArgumentError",this.message=a}return n})});var Wl=ne(ou=>{"use strict";Object.defineProperty(ou,"__esModule",{value:!0});ou.$dictionary=void 0;ou.$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 Is=ne((hA,am)=>{am.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}});var $l=ne(Fa=>{var Me=Is(),Jl=()=>[{type:Me.RANGE,from:48,to:57}],im=()=>[{type:Me.CHAR,value:95},{type:Me.RANGE,from:97,to:122},{type:Me.RANGE,from:65,to:90}].concat(Jl()),rm=()=>[{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}],L5=()=>[{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:im(),not:!1});Fa.notWords=()=>({type:Me.SET,set:im(),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:rm(),not:!1});Fa.notWhitespace=()=>({type:Me.SET,set:rm(),not:!0});Fa.anyChar=()=>({type:Me.SET,set:L5(),not:!0})});var om=ne(Ss=>{var sm=Is(),Cr=$l(),U5="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?",V5={0:0,t:9,n:10,v:11,f:12,r:13};Ss.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 f=a?8:r?parseInt(r,16):s?parseInt(s,16):o?parseInt(o,8):l?U5.indexOf(l):V5[p],x=String.fromCharCode(f);return/[[\]{}^$.|?*+()]/.test(x)&&(x="\\"+x),x}),n};Ss.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(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:sm.RANGE,from:(i[8]||i[9]).charCodeAt(0),to:i[10].charCodeAt(0)});else if(r=i[12])t.push({type:sm.CHAR,value:r.charCodeAt(0)});else return[t,a.lastIndex];Ss.error(e,"Unterminated character class")};Ss.error=(n,e)=>{throw new SyntaxError("Invalid regular expression: /"+n+"/: "+e)}});var um=ne(Rs=>{var uu=Is();Rs.wordBoundary=()=>({type:uu.POSITION,value:"b"});Rs.nonWordBoundary=()=>({type:uu.POSITION,value:"B"});Rs.begin=()=>({type:uu.POSITION,value:"^"});Rs.end=()=>({type:uu.POSITION,value:"$"})});var dm=ne((TA,Ql)=>{var Ir=om(),xn=Is(),_i=$l(),du=um();Ql.exports=n=>{var e=0,t,a,i={type:xn.ROOT,stack:[]},r=i,s=i.stack,o=[],l=O=>{Ir.error(n,`Nothing to repeat at column ${O-1}`)},p=Ir.strToChars(n);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 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}))}};lm.exports=La});var fm=ne((wA,ym)=>{var lu=dm(),Ps=pm(),ki=lu.types;ym.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=lu(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 a,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),a=e.options?this._randSelect(e.options):e.stack,i="",s=0,o=a.length;s{"use strict";var j5=Ai&&Ai.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ai,"__esModule",{value:!0});Ai.RandomGenerator=void 0;var H5=j5(fm()),q5;(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 H5.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()}})(q5=Ai.RandomGenerator||(Ai.RandomGenerator={}))});var Ds=ne(Sr=>{"use strict";var G5=Sr&&Sr.__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(Sr,"__esModule",{value:!0});Sr.TypeGuardError=void 0;var z5=function(n){G5(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);Sr.TypeGuardError=z5});var mm=ne(pu=>{"use strict";Object.defineProperty(pu,"__esModule",{value:!0});pu.$any=void 0;var K5=function(n){return n!==void 0?JSON.parse(JSON.stringify(n)):void 0};pu.$any=K5});var hm=ne(yu=>{"use strict";Object.defineProperty(yu,"__esModule",{value:!0});yu.$every=void 0;var W5=function(n,e){for(var t=null,a=0;a{"use strict";Object.defineProperty(fu,"__esModule",{value:!0});fu.$guard=void 0;var J5=Ds(),$5=function(n){return function(e,t){if(e===!0)throw new J5.TypeGuardError({method:n,path:t.path,expected:t.expected,value:t.value});return!1}};fu.$guard=$5});var bm=ne(cu=>{"use strict";Object.defineProperty(cu,"__esModule",{value:!0});cu.$is_between=void 0;var Q5=function(n,e,t){return e<=n&&n<=t};cu.$is_between=Q5});var gm=ne(mu=>{"use strict";Object.defineProperty(mu,"__esModule",{value:!0});mu.$is_custom=void 0;var X5=Wl(),Y5=function(n,e,t,a){var i,r=(i=X5.$dictionary.get(n))===null||i===void 0?void 0:i.get(e);return r===void 0?!0:r(t)(a)};mu.$is_custom=Y5});var Tm=ne(hu=>{"use strict";Object.defineProperty(hu,"__esModule",{value:!0});hu.$is_date=void 0;var Z5=function(n){return eb.test(n)};hu.$is_date=Z5;var eb=/^(\d{4})-(\d{2})-(\d{2})$/});var vm=ne(xu=>{"use strict";Object.defineProperty(xu,"__esModule",{value:!0});xu.$is_datetime=void 0;var tb=function(n){return!isNaN(new Date(n).getTime())};xu.$is_datetime=tb});var wm=ne(bu=>{"use strict";Object.defineProperty(bu,"__esModule",{value:!0});bu.$is_email=void 0;var nb=function(n){return ab.test(n)};bu.$is_email=nb;var ab=/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i});var _m=ne(gu=>{"use strict";Object.defineProperty(gu,"__esModule",{value:!0});gu.$is_ipv4=void 0;var ib=function(n){return rb.test(n)};gu.$is_ipv4=ib;var rb=/^(?: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 km=ne(Tu=>{"use strict";Object.defineProperty(Tu,"__esModule",{value:!0});Tu.$is_ipv6=void 0;var sb=function(n){return ob.test(n)};Tu.$is_ipv6=sb;var ob=/^(([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 Am=ne(vu=>{"use strict";Object.defineProperty(vu,"__esModule",{value:!0});vu.$is_url=void 0;var ub=function(n){return db.test(n)};vu.$is_url=ub;var db=/^[a-zA-Z0-9]+:\/\/(?:www.)?[-a-zA-Z0-9@:%._+~#=]{1,256}.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/});var Mm=ne(wu=>{"use strict";Object.defineProperty(wu,"__esModule",{value:!0});wu.$is_uuid=void 0;var lb=function(n){return pb.test(n)};wu.$is_uuid=lb;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 Em=ne(_u=>{"use strict";Object.defineProperty(_u,"__esModule",{value:!0});_u.$join=void 0;var yb=function(n){return fb(n)?".".concat(n):"[".concat(JSON.stringify(n),"]")};_u.$join=yb;var fb=function(n){return cb(n)===!1&&/^[a-zA-Z_$][a-zA-Z_$0-9]*$/g.test(n)},cb=function(n){return mb.has(n)},mb=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 Cm=ne(ku=>{"use strict";Object.defineProperty(ku,"__esModule",{value:!0});ku.$number=void 0;var hb=Ds(),xb=function(n){if(isFinite(n)===!1)throw new hb.TypeGuardError({method:"typia.stringify",expected:"number",value:n,message:"Error on typia.stringify(): infinite or not a number."});return n};ku.$number=xb});var Im=ne(Au=>{"use strict";Object.defineProperty(Au,"__esModule",{value:!0});Au.$report=void 0;var bb=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}};Au.$report=bb});var Sm=ne(Mu=>{"use strict";Object.defineProperty(Mu,"__esModule",{value:!0});Mu.$rest=void 0;var gb=function(n){return n.length===2?"":","+n.substring(1,n.length-1)};Mu.$rest=gb});var Rm=ne(Eu=>{"use strict";Object.defineProperty(Eu,"__esModule",{value:!0});Eu.$string=void 0;var Tb=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,'"')};Eu.$string=Tb});var Pm=ne(Cu=>{"use strict";Object.defineProperty(Cu,"__esModule",{value:!0});Cu.$tail=void 0;var vb=function(n){return n[n.length-1]===","?n.substring(0,n.length-1):n};Cu.$tail=vb});var Bm=ne(Mi=>{"use strict";var Vt=Mi&&Mi.__assign||function(){return Vt=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 Vt(Vt({},n.is()),{number:Db.$number,string:Fb.$string,tail:Lb.$tail,rest:Bb.$rest,throws:e(t)})},n.clone=function(t){return Vt(Vt({},n.is()),{throws:e(t),any:wb.$any})},n.prune=function(t){return Vt(Vt({},n.is()),{throws:e(t)})},n.random=function(){return{generator:Nm.RandomGenerator,pick:Nm.RandomGenerator.pick}};var e=function(t){return function(a){throw new Dm.TypeGuardError(Vt(Vt({},a),{method:"typia.".concat(t)}))}}})(Ub=Mi.Namespace||(Mi.Namespace={}))});var Fm=ne(Os=>{"use strict";Object.defineProperty(Os,"__esModule",{value:!0});Os.MapUtil=void 0;var Vb;(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}}})(Vb=Os.MapUtil||(Os.MapUtil={}))});var Um=ne(Lm=>{"use strict";Object.defineProperty(Lm,"__esModule",{value:!0})});var jm=ne(Vm=>{"use strict";Object.defineProperty(Vm,"__esModule",{value:!0})});var qm=ne(Hm=>{"use strict";Object.defineProperty(Hm,"__esModule",{value:!0})});var zm=ne(Gm=>{"use strict";Object.defineProperty(Gm,"__esModule",{value:!0})});var Wm=ne(Km=>{"use strict";Object.defineProperty(Km,"__esModule",{value:!0})});var $m=ne(Jm=>{"use strict";Object.defineProperty(Jm,"__esModule",{value:!0})});var dp=ne(z=>{"use strict";var jb=z&&z.__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]}),Ei=z&&z.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&jb(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 Rr=Wl(),Ee=Bm(),Hb=Fm();Ei(Um(),z);Ei(jm(),z);Ei(qm(),z);Ei(zm(),z);Ei(Wm(),z);Ei($m(),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 Iu(){re("is")}z.is=Iu;Object.assign(Iu,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(n){var e,t;return n?(t=(e=Rr.$dictionary.get(n))===null||e===void 0?void 0:e.size)!==null&&t!==void 0?t:0:Rr.$dictionary.size},has:function(n){return function(e){var t,a;return(a=(t=Rr.$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=Rr.$dictionary.get(n))===null||t===void 0?void 0:t.get(e)}},insert:function(n){return function(e){return function(t){var a=Hb.MapUtil.take(Rr.$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=Rr.$dictionary.get(n))===null||t===void 0?void 0:t.delete(e))!==null&&a!==void 0?a:!1}}};function qb(){re("application")}z.application=qb;function np(){re("assertParse")}z.assertParse=np;Object.assign(np,Ee.Namespace.assert("assertParse"));function ap(){re("isParse")}z.isParse=ap;Object.assign(ap,Iu);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 Gb(){re("metadata")}z.metadata=Gb;function sp(){re("random")}z.random=sp;Object.assign(sp,Ee.Namespace.random());function zb(){re("literals")}z.literals=zb;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 Qm(){re("createAssert")}z.createAssert=Qm;Object.assign(Qm,Xl);function Xm(){re("createAssertType")}z.createAssertType=Xm;Object.assign(Xm,Yl);function Ym(){re("createIs")}z.createIs=Ym;Object.assign(Ym,Iu);function Zm(){re("createValidate")}z.createValidate=Zm;Object.assign(Zm,Su);function e6(){re("createAssertEquals")}z.createAssertEquals=e6;Object.assign(e6,Zl);function t6(){re("createEquals")}z.createEquals=t6;Object.assign(t6,ep);function n6(){re("createValidateEquals")}z.createValidateEquals=n6;Object.assign(n6,tp);function a6(){re("createIsParse")}z.createIsParse=a6;Object.assign(a6,ap);function i6(){re("createAssertParse")}z.createAssertParse=i6;Object.assign(i6,np);function r6(){re("createValidateParse")}z.createValidateParse=r6;Object.assign(r6,ip);function s6(){re("createStringify")}z.createStringify=s6;Object.assign(s6,rp);function o6(){re("createAssertStringify")}z.createAssertStringify=o6;Object.assign(o6,Ru);function u6(){re("createIsStringify")}z.createIsStringify=u6;Object.assign(u6,Pu);function d6(){re("createValidateStringify")}z.createValidateStringify=d6;Object.assign(d6,Nu);function l6(){re("createRandom")}z.createRandom=l6;Object.assign(l6,sp);function p6(){re("createClone")}z.createClone=p6;Object.assign(p6,op);function y6(){re("createAssertClone")}z.createAssertClone=y6;Object.assign(y6,Du);function f6(){re("createIsClone")}z.createIsClone=f6;Object.assign(f6,Ou);function c6(){re("createValidateClone")}z.createValidateClone=c6;Object.assign(c6,Bu);function m6(){re("createPrune")}z.createPrune=m6;Object.assign(m6,up);function h6(){re("createAssertPrune")}z.createAssertPrune=h6;Object.assign(h6,Fu);function x6(){re("createIsPrune")}z.createIsPrune=x6;Object.assign(x6,Lu);function b6(){re("createValidatePrune")}z.createValidatePrune=b6;Object.assign(b6,Uu);function re(n){throw new Error("Error on typia.".concat(n,'(): no transform has been configured. Run "npx typia setup" command.'))}});var T6=ne(gn=>{"use strict";var g6=gn&&gn.__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]}),Kb=gn&&gn.__setModuleDefault||(Object.create?function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}:function(n,e){n.default=e}),Wb=gn&&gn.__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)&&g6(e,n,t);return Kb(e,n),e},Jb=gn&&gn.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&g6(e,n,t)};Object.defineProperty(gn,"__esModule",{value:!0});var $b=Wb(dp());gn.default=$b;Jb(dp(),gn)});var Rl={};ji(Rl,{BaseContract:()=>lr,BigNumber:()=>F,Contract:()=>oe,ContractFactory:()=>ci,FixedNumber:()=>ft,Signer:()=>St,VoidSigner:()=>ua,Wallet:()=>Cn,Wordlist:()=>hn,constants:()=>ht,errors:()=>Kt,getDefaultProvider:()=>tu,logger:()=>kc,providers:()=>ea,utils:()=>ae,version:()=>au,wordlists:()=>hi});var Zp=wn(rd());var Hp="logger/5.7.0";var qp=!1,Gp=!1,zs={debug:1,default:2,info:2,warning:3,error:4,off:5},zp=zs.default,sd=null;function F6(){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 Kp=F6(),od;(function(n){n.DEBUG="DEBUG",n.INFO="INFO",n.WARNING="WARNING",n.ERROR="ERROR",n.OFF="OFF"})(od||(od={}));var Kt;(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"})(Kt||(Kt={}));var Wp="0123456789abcdef",M=class{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){let a=e.toLowerCase();zs[a]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(zp>zs[a])&&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,a){if(Gp)return this.makeError("censored error",t,{});t||(t=M.errors.UNKNOWN_ERROR),a||(a={});let i=[];Object.keys(a).forEach(l=>{let p=a[l];try{if(p instanceof Uint8Array){let f="";for(let x=0;x>4],f+=Wp[p[x]&15];i.push(l+"=Uint8Array(0x"+f+")")}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 Kt.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 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+" ]"),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,M.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"),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,a){a?a=": "+a:a="",et&&this.throwError("too many arguments"+a,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(Hp)),sd}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",M.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),qp){if(!e)return;this.globalLogger().throwError("error censorship permanent",M.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}Gp=!!e,qp=!!t}static setLogLevel(e){let t=zs[e.toLowerCase()];if(t==null){M.globalLogger().warn("invalid log level - "+e);return}zp=t}static from(e){return new M(e)}};M.errors=Kt;M.levels=od;var Jp="bytes/5.7.0";var wt=new M(Jp);function Qp(n){return!!n.toHexString}function Hi(n){return n.slice||(n.slice=function(){let e=Array.prototype.slice.call(arguments);return Hi(new Uint8Array(Array.prototype.slice.apply(n,e)))}),n}function aa(n){return ie(n)&&!(n.length%2)||on(n)}function $p(n){return typeof n=="number"&&n==n&&n%1===0}function on(n){if(n==null)return!1;if(n.constructor===Uint8Array)return!0;if(typeof n=="string"||!$p(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"){wt.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),Hi(new Uint8Array(t))}if(e.allowMissingPrefix&&typeof n=="string"&&n.substring(0,2)!=="0x"&&(n="0x"+n),Qp(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":wt.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),Hi(a)}function Zt(n){let e=j(n);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(n,e-n.length),Hi(t)}function ie(n,e){return!(typeof n!="string"||!n.match(/^0x[0-9A-Fa-f]*$/)||e&&n.length!==2+2*e)}var ud="0123456789abcdef";function K(n,e){if(e||(e={}),typeof n=="number"){wt.checkSafeUint53(n,"invalid hexlify value");let t="";for(;n;)t=ud[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),Qp(n))return n.toHexString();if(ie(n))return n.length%2&&(e.hexPad==="left"?n="0x0"+n.substring(2):e.hexPad==="right"?n+="0":wt.throwArgumentError("hex data is odd-length","value",n)),n.toLowerCase();if(on(n)){let t="0x";for(let a=0;a>4]+ud[i&15]}return t}return wt.throwArgumentError("invalid hexlify value","value",n)}function Nt(n){if(typeof n!="string")n=K(n);else if(!ie(n)||n.length%2)return null;return(n.length-2)/2}function Ce(n,e,t){return typeof n!="string"?n=K(n):(!ie(n)||n.length%2)&&wt.throwArgumentError("invalid hexData","value",n),e=2+2*e,t!=null?"0x"+n.substring(e,2+2*t):"0x"+n.substring(e)}function _t(n){let e="0x";return n.forEach(t=>{e+=K(t).substring(2)}),e}function Ln(n){let e=dd(K(n,{hexPad:"left"}));return e==="0x"?"0x0":e}function dd(n){typeof n!="string"&&(n=K(n)),ie(n)||wt.throwArgumentError("invalid hex string","value",n),n=n.substring(2);let e=0;for(;e2*e+2&&wt.throwArgumentError("value out of range","value",arguments[1]);n.length<2*e+2;)n="0x0"+n.substring(2);return n}function Un(n){let e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(aa(n)){let t=j(n);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]):wt.throwArgumentError("invalid signature string","signature",n),e.v<27&&(e.v===0||e.v===1?e.v+=27:wt.throwArgumentError("signature invalid v byte","signature",n)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(t[32]|=128),e._vs=K(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=ii(j(e._vs),32);e._vs=K(i);let r=i[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=r:e.recoveryParam!==r&&wt.throwArgumentError("signature recoveryParam mismatch _vs","signature",n),i[0]&=127;let s=K(i);e.s==null?e.s=s:e.s!==s&&wt.throwArgumentError("signature v mismatch _vs","signature",n)}if(e.recoveryParam==null)e.v==null?wt.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&&wt.throwArgumentError("signature recoveryParam mismatch v","signature",n)}e.r==null||!ie(e.r)?wt.throwArgumentError("signature missing or invalid r","signature",n):e.r=me(e.r,32),e.s==null||!ie(e.s)?wt.throwArgumentError("signature missing or invalid s","signature",n):e.s=me(e.s,32);let t=j(e.s);t[0]>=128&&wt.throwArgumentError("signature s out of range","signature",n),e.recoveryParam&&(t[0]|=128);let a=K(t);e._vs&&(ie(e._vs)||wt.throwArgumentError("signature invalid _vs","signature",n),e._vs=me(e._vs,32)),e._vs==null?e._vs=a:e._vs!==a&&wt.throwArgumentError("signature _vs mismatch v and s","signature",n)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function Br(n){return n=Un(n),K(ye([n.r,n.s,n.recoveryParam?"0x1c":"0x1b"]))}var Ks="bignumber/5.7.0";var Fr=Zp.default.BN,ia=new M(Ks),ld={},Xp=9007199254740991;function ey(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"||on(n))}var Yp=!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 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 ia.throwError("this platform does not support BigInt",M.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?Yp||(Yp=!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,Lr(e)):e.match(/^-?[0-9]+$/)?new F(ld,Lr(new Fr(e))):ia.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&un("underflow","BigNumber.from",e),(e>=Xp||e<=-Xp)&&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 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 ia.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}};function Lr(n){if(typeof n!="string")return Lr(n.toString(16));if(n[0]==="-")return n=n.substring(1),n[0]==="-"&&ia.throwArgumentError("invalid hex","value",n),n=Lr(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 Wt(n){return F.from(Lr(n))}function be(n){let e=F.from(n).toHexString();return e[0]==="-"?new Fr("-"+e.substring(3),16):new Fr(e.substring(2),16)}function un(n,e,t){let a={fault:n,operation:e};return t!=null&&(a.value=t),ia.throwError(n,M.errors.NUMERIC_FAULT,a)}function pd(n){return new Fr(n,36).toString(16)}function yd(n){return new Fr(n,16).toString(36)}var jt=new M(Ks),Ur={},ny=F.from(0),ay=F.from(-1);function iy(n,e,t,a){let i={fault:e,operation:t};return a!==void 0&&(i.value=a),jt.throwError(n,M.errors.NUMERIC_FAULT,i)}var Vr="0";for(;Vr.length<256;)Vr+=Vr;function fd(n){if(typeof n!="number")try{n=F.from(n).toNumber()}catch{}return typeof n=="number"&&n>=0&&n<=256&&!(n%1)?"1"+Vr.substring(0,n):jt.throwArgumentError("invalid decimal size","decimals",n)}function qi(n,e){e==null&&(e=0);let t=fd(e);n=F.from(n);let a=n.lt(ny);a&&(n=n.mul(ay));let i=n.mod(t).toString();for(;i.length2&&jt.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&&iy("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),a=r("width","number",a),i=r("decimals","number",i)}return a%8&&jt.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",a),i>80&&jt.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new ra(Ur,t,a,i)}},ft=class{constructor(e,t,a,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=a,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),a=dn(e._value,e.format.decimals);return ft.fromValue(t.add(a),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),a=dn(e._value,e.format.decimals);return ft.fromValue(t.sub(a),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),a=dn(e._value,e.format.decimals);return ft.fromValue(t.mul(a).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),a=dn(e._value,e.format.decimals);return ft.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=ft.from(e[0],this.format),a=!e[1].match(/^(0*)$/);return this.isNegative()&&a&&(t=t.subUnsafe(ty.toFormat(t.format))),t}ceiling(){let e=this.toString().split(".");e.length===1&&e.push("0");let t=ft.from(e[0],this.format),a=!e[1].match(/^(0*)$/);return!this.isNegative()&&a&&(t=t.addUnsafe(ty.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 a=ft.from("1"+Vr.substring(0,e),this.format),i=L6.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&&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,a){return a==null&&t!=null&&!ey(t)&&(a=t,t=null),t==null&&(t=0),a==null&&(a="fixed"),ft.fromString(qi(e,t),ra.from(a))}static fromString(e,t){t==null&&(t="fixed");let a=ra.from(t),i=dn(e,a.decimals);!a.signed&&i.lt(ny)&&iy("unsigned value cannot be negative","overflow","value",e);let r=null;a.signed?r=i.toTwos(a.width).toHexString():(r=i.toHexString(),r=me(r,a.width/8));let s=qi(i,a.decimals);return new ft(Ur,r,s,a)}static fromBytes(e,t){t==null&&(t="fixed");let a=ra.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 ft(Ur,r,s,a)}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(a){if(a.code!==M.errors.INVALID_ARGUMENT)throw a}return jt.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}},ty=ft.from(1),L6=ft.from("0.5");var ry="properties/5.7.0";var U6=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Ws=new M(ry);function B(n,e,t){Object.defineProperty(n,e,{enumerable:!0,value:t,writable:!1})}function mt(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 Ie(n){return U6(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 Gi(n,e){(!n||typeof n!="object")&&Ws.throwArgumentError("invalid object","object",n),Object.keys(n).forEach(t=>{e[t]||Ws.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 V6={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function sy(n){if(n==null||V6[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;tct(e)));if(typeof n=="object"){let e={};for(let t in n){let a=n[t];a!==void 0&&B(e,t,ct(a))}return e}return Ws.throwArgumentError(`Cannot deepCopy ${typeof n}`,"object",n)}function ct(n){return j6(n)}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={},oy={calldata:!0,memory:!0,storage:!0},H6={calldata:!0,memory:!0};function Js(n,e){if(n==="bytes"||n==="string"){if(oy[e])return!0}else if(n==="address"){if(e==="payable")return!0}else if((n.indexOf("[")>=0||n==="tuple")&&H6[e])return!0;return(oy[e]||e==="payable")&&Te.throwArgumentError("invalid modifier","name",e),!1}function q6(n,e){let t=n;function a(o){Te.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!==ge.sighash&&(t+=this.type),t+="("+this.components.map(a=>a.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:zi(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(pt.fromObject):null})}static fromString(e,t){function a(i){return pt.fromObject({name:i.name,type:i.type,indexed:i.indexed,components:i.components})}return a(q6(e,!!t))}static isParamType(e){return!!(e!=null&&e._isParamType)}};function jr(n,e){return K6(n).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(a=>JSON.parse(a.format(e)))});let t="";return e!==ge.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map(a=>a.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(ri,t)}static fromString(e){let t=e.match(qr);t||Te.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:Te.warn("unknown modifier: "+i)}}),Ht.fromObject({name:t[1].trim(),anonymous:a,inputs:jr(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}};function dy(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 ly(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 py(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 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(a=>JSON.parse(a.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(a=>a.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=py(e);t.constant&&Te.throwArgumentError("constructor cannot be constant","value",e);let a={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,a)}static fromString(e){let t={type:"constructor"};e=dy(e,t);let a=e.match(qr);return(!a||a[1].trim()!=="constructor")&&Te.throwArgumentError("invalid constructor string","value",e),t.inputs=jr(a[2].trim(),!1),ly(a[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(a=>JSON.parse(a.format(e))),outputs:this.outputs.map(a=>JSON.parse(a.format(e)))});let t="";return e!==ge.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map(a=>a.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(a=>a.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=py(e),a={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 Ot(ri,a)}static fromString(e){let t={type:"function"};e=dy(e,t);let a=e.split(" returns ");a.length>2&&Te.throwArgumentError("invalid function string","value",e);let i=a[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),ly(i[3].trim(),t),a.length>1){let r=a[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 Ot.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}};function uy(n){let e=n.format();return(e==="Error(string)"||e==="Panic(uint256)")&&Te.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",n),n}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(a=>JSON.parse(a.format(e)))});let t="";return e!==ge.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map(a=>a.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 uy(new tn(ri,t))}static fromString(e){let t={type:"error"},a=e.match(qr);return a||Te.throwArgumentError("invalid error signature","value",e),t.name=a[1].trim(),t.name&&Hr(t.name),t.inputs=jr(a[2],!1),uy(tn.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}};function zi(n){return n.match(/^uint($|[^1-9])/)?n="uint256"+n.substring(4):n.match(/^int($|[^1-9])/)&&(n="int256"+n.substring(3)),n}var z6=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function Hr(n){return(!n||!n.match(z6))&&Te.throwArgumentError(`invalid identifier "${n}"`,"value",n),n}var qr=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function K6(n){n=n.trim();let e=[],t="",a=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,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 K(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):oi.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: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 a=this._peekBytes(0,e,!!t);return this._offset+=a.length,a.slice(0,e)}readValue(){return F.from(this.readBytes(this.wordSize))}};var fy=wn(yy());function fe(n){return"0x"+fy.default.keccak_256(j(n))}var Xs={};ji(Xs,{decode:()=>Gr,encode:()=>sa});var cy="rlp/5.7.0";var jn=new M(cy);function my(n){let e=[];for(;n;)e.unshift(n&255),n>>=8;return e}function hy(n,e,t){let a=0;for(let i=0;ie+1+a&&jn.throwError("child data too short",M.errors.BUFFER_OVERRUN,{})}return{consumed:1+a,result:i}}function gy(n,e){if(n.length===0&&jn.throwError("data too short",M.errors.BUFFER_OVERRUN,{}),n[e]>=248){let t=n[e]-247;e+1+t>n.length&&jn.throwError("data short segment too short",M.errors.BUFFER_OVERRUN,{});let a=hy(n,e+1,t);return e+1+t+a>n.length&&jn.throwError("data long segment too short",M.errors.BUFFER_OVERRUN,{}),xy(n,e,e+1+t,t+a)}else if(n[e]>=192){let t=n[e]-192;return e+1+t>n.length&&jn.throwError("data array too short",M.errors.BUFFER_OVERRUN,{}),xy(n,e,e+1,t)}else if(n[e]>=184){let t=n[e]-183;e+1+t>n.length&&jn.throwError("data array too short",M.errors.BUFFER_OVERRUN,{});let a=hy(n,e+1,t);e+1+t+a>n.length&&jn.throwError("data array too short",M.errors.BUFFER_OVERRUN,{});let i=K(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&&jn.throwError("data too short",M.errors.BUFFER_OVERRUN,{});let a=K(n.slice(e+1,e+1+t));return{consumed:1+t,result:a}}return{consumed:1,result:K(n[e])}}function Gr(n){let e=j(n),t=gy(e,0);return t.consumed!==e.length&&jn.throwArgumentError("invalid rlp data","data",n),t.result}var Ty="address/5.7.0";var Ma=new M(Ty);function vy(n){ie(n,20)||Ma.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 W6=9007199254740991;function J6(n){return Math.log10?Math.log10(n):Math.log(n)/Math.LN10}var md={};for(let n=0;n<10;n++)md[String(n)]=String(n);for(let n=0;n<26;n++)md[String.fromCharCode(65+n)]=String(10+n);var wy=Math.floor(J6(W6));function _y(n){n=n.toUpperCase(),n=n.substring(4)+n.substring(0,2)+"00";let e=n.split("").map(a=>md[a]).join("");for(;e.length>=wy;){let a=e.substring(0,wy);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 ce(n){let e=null;if(typeof n!="string"&&Ma.throwArgumentError("invalid address","address",n),n.match(/^(0x)?[0-9a-fA-F]{40}$/))n.substring(0,2)!=="0x"&&(n="0x"+n),e=vy(n),n.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==n&&Ma.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)!==_y(n)&&Ma.throwArgumentError("bad icap checksum","address",n),e=pd(n.substring(4));e.length<40;)e="0"+e;e=vy("0x"+e)}else Ma.throwArgumentError("invalid address","address",n);return e}function ky(n){try{return ce(n),!0}catch{}return!1}function Ay(n){let e=yd(ce(n).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+_y("XE00"+e)+e}function ui(n){let e=null;try{e=ce(n.from)}catch{Ma.throwArgumentError("missing from address","transaction",n)}let t=Zt(j(F.from(n.nonce).toHexString()));return ce(Ce(fe(sa([e,t])),12))}function My(n,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(Ce(fe(ye(["0xff",ce(n),e,t])),12))}var Ys=class extends kt{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=ce(t)}catch(a){this._throwError(a.message,t)}return e.writeValue(t)}decode(e){return ce(me(e.readValue().toHexString(),20))}};var Zs=class extends kt{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 Wi=new M(Vn);function hd(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 f=p.localName;return f||Wi.throwError("cannot encode object for signature with missing names",M.errors.INVALID_ARGUMENT,{argument:"values",coder:p,value:t}),l[f]&&Wi.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 Wi.throwArgumentError("invalid tuple value","tuple",t);e.length!==a.length&&Wi.throwArgumentError("types/value length mismatch","tuple",t);let i=new si(n.wordSize),r=new si(n.wordSize),s=[];e.forEach((l,p)=>{let f=a[p];if(l.dynamic){let x=r.length;l.encode(r,f);let I=i.writeUpdatableValue();s.push(_=>{I(_+x)})}else l.encode(i,f)}),s.forEach(l=>{l(i.length)});let o=n.appendWriter(i);return o+=n.appendWriter(r),o}function xd(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===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(n)}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 kt{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&&Wi.throwError("insufficient data length",M.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let a=[];for(let i=0;iro,EtherSymbol:()=>Ry,HashZero:()=>$i,MaxInt256:()=>Sy,MaxUint256:()=>uo,MinInt256:()=>Iy,NegativeOne:()=>so,One:()=>oo,Two:()=>Ey,WeiPerEther:()=>Cy,Zero:()=>Ji});var ro="0x0000000000000000000000000000000000000000";var so=F.from(-1),Ji=F.from(0),oo=F.from(1),Ey=F.from(2),Cy=F.from("1000000000000000000"),uo=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),Iy=F.from("-0x8000000000000000000000000000000000000000000000000000000000000000"),Sy=F.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");var $i="0x0000000000000000000000000000000000000000000000000000000000000000";var Ry="\u039E";var lo=class extends kt{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=uo.mask(e.wordSize*8);if(this.signed){let r=i.mask(this.size*8-1);(a.gt(r)||a.lt(r.add(oo).mul(so)))&&this._throwError("value out-of-bounds",t)}else(a.lt(Ji)||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 Py="strings/5.7.0";var Ny=new M(Py),Gt;(function(n){n.current="",n.NFC="NFC",n.NFD="NFD",n.NFKC="NFKC",n.NFKD="NFKD"})(Gt||(Gt={}));var Bt;(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"})(Bt||(Bt={}));function $6(n,e,t,a,i){return Ny.throwArgumentError(`invalid codepoint at offset ${e}; ${n}`,"bytes",t)}function Dy(n,e,t,a,i){if(n===Bt.BAD_PREFIX||n===Bt.UNEXPECTED_CONTINUE){let r=0;for(let s=e+1;s>6===2;s++)r++;return r}return n===Bt.OVERRUN?t.length-e-1:0}function Q6(n,e,t,a,i){return n===Bt.OVERLONG?(a.push(i),0):(a.push(65533),Dy(n,e,t,a,i))}var po=Object.freeze({error:$6,ignore:Dy,replace:Q6});function gd(n,e){e==null&&(e=po.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(Bt.UNEXPECTED_CONTINUE,a-1,n,t):a+=e(Bt.BAD_PREFIX,a-1,n,t);continue}if(a-1+r>=n.length){a+=e(Bt.OVERRUN,a-1,n,t);continue}let o=i&(1<<8-r-1)-1;for(let l=0;l1114111){a+=e(Bt.OUT_OF_RANGE,a-1-r,n,t,o);continue}if(o>=55296&&o<=57343){a+=e(Bt.UTF16_SURROGATE,a-1-r,n,t,o);continue}if(o<=s){a+=e(Bt.OVERLONG,a-1-r,n,t,o);continue}t.push(o)}}return t}function ve(n,e=Gt.current){e!=Gt.current&&(Ny.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 bd(n){let e="0000"+n.toString(16);return"\\u"+e.substring(e.length-4)}function Td(n,e){return'"'+gd(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?bd(t):(t-=65536,bd((t>>10&1023)+55296)+bd((t&1023)+56320))}).join("")+'"'}function yo(n){return n.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function Jt(n,e){return yo(gd(n,e))}function Ea(n,e=Gt.current){return gd(ve(n,e))}function vd(n){let e=ve(n);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return K(ye([e,$i]).slice(0,32))}function wd(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 Jt(e.slice(0,t))}function X6(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 Oy(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 kd(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 Y6=Oy("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"),Z6="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(n=>parseInt(n,16)),e2=[{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}],t2=_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"),n2=_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"),a2=_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",X6),i2=Oy("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 r2(n){return n.reduce((e,t)=>(t.forEach(a=>{e.push(a)}),e),[])}function s2(n){return!!kd(n,Y6)}function o2(n){let e=kd(n,e2);if(e)return[n+e.s];let t=t2[n];if(t)return t;let a=n2[n];if(a)return[n+a[0]];let i=a2[n];return i||null}function u2(n){return!!kd(n,i2)}function Ad(n){if(n.match(/^[a-z0-9-]*$/i)&&n.length<=59)return n.toLowerCase();let e=Ea(n);e=r2(e.map(a=>{if(Z6.indexOf(a)>=0)return[];if(a>=65024&&a<=65039)return[];let i=o2(a);return i||[a]})),e=Ea(yo(e),Gt.NFKC),e.forEach(a=>{if(u2(a))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(a=>{if(s2(a))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 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 di=class extends kt{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 hd(e,this.coders,t)}decode(e){return e.coerce(this.name,xd(e,this.coders))}};var co=new M(Vn),d2=new RegExp(/^bytes([0-9]*)$/),l2=new RegExp(/^(u?int)([0-9]*)$/),Qi=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(a=>this._getCoder(a)),e.name);case"":return new io(e.name)}let t=e.type.match(l2);if(t){let a=parseInt(t[2]||"256");return(a===0||a>256||a%8!==0)&&co.throwArgumentError("invalid "+t[1]+" bit length","param",e),new lo(a/8,t[1]==="int",e.name)}if(t=e.type.match(d2),t){let a=parseInt(t[1]);return(a===0||a>32)&&co.throwArgumentError("invalid bytes length","param",e),new ao(a,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 a=e.map(s=>this._getCoder(pt.from(s))),i=new di(a,"_"),r=this._getWriter();return i.encode(r,t),r.data}decode(e,t,a){let i=e.map(s=>this._getCoder(pt.from(s)));return new di(i,"_").decode(this._getReader(j(t),a))}},Kr=new Qi;function nn(n){return fe(ve(n))}var mo="hash/5.7.0";var Md={};ji(Md,{decode:()=>Xi,encode:()=>Yi});function Xi(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 p2(n){let e={};for(let t=0;t>--l&1}let x=31,I=Math.pow(2,x),_=I>>>1,v=_>>1,S=I-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=a-4;return O.map(J=>{switch(J-E){case 3:return E+65792+(n[o++]<<16|n[o++]<<8|n[o++]);case 2:return E+256+(n[o++]<<8|n[o++]);case 1:return E+n[o++];default:return J-1}})}function f2(n){let e=0;return()=>n[e++]}function Ly(n){return f2(y2(n))}function c2(n){return n&1?~n>>1:n>>1}function m2(n,e){let t=Array(n);for(let a=0;ae[s]):t}function Uy(n){let e=[];for(;;){let t=n();if(t==0)break;e.push(b2(t,n))}for(;;){let t=n()-1;if(t<0)break;e.push(g2(t,n))}return p2(Fy(e))}function x2(n){let e=[];for(;;){let t=n();if(t==0)break;e.push(t)}return e}function Vy(n,e,t){let a=Array(n).fill(void 0).map(()=>[]);for(let i=0;ia[s].push(r));return a}function b2(n,e){let t=1+e(),a=e(),i=x2(e),r=Vy(i.length,1+n,e);return Fy(r.map((s,o)=>{let l=s[0],p=s.slice(1);return Array(i[o]).fill(void 0).map((f,x)=>{let I=x*a;return[l+x*t,p.map(_=>_+I)]})}))}function g2(n,e){let t=1+e();return Vy(t,1+n,e).map(i=>[i[0],i.slice(1)])}function jy(n){let e=Wr(n).sort((a,i)=>a-i);return t();function t(){let a=[];for(;;){let p=Wr(n,e);if(p.length==0)break;a.push({set:new Set(p),node:t()})}a.sort((p,f)=>f.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 Hy(){return Ly(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 ho=Hy(),T2=new Set(Wr(ho)),v2=new Set(Wr(ho)),w2=Uy(ho),_2=jy(ho),qy=45,Gy=95;function zy(n){return Ea(n)}function k2(n){return n.filter(e=>e!=65039)}function Ky(n){for(let e of n.split(".")){let t=zy(e);try{for(let a=t.lastIndexOf(Gy)-1;a>=0;a--)if(t[a]!==Gy)throw new Error("underscore only allowed at start");if(t.length>=4&&t.every(a=>a<128)&&t[2]===qy&&t[3]===qy)throw new Error("invalid label extension")}catch(a){throw new Error(`Invalid label "${e}": ${a.message}`)}}return n}function Wy(n){return Ky(A2(n,k2))}function A2(n,e){let t=zy(n).reverse(),a=[];for(;t.length;){let i=E2(t);if(i){a.push(...e(i));continue}let r=t.pop();if(T2.has(r)){a.push(r);continue}if(v2.has(r))continue;let s=w2[r];if(s){a.push(...s);continue}throw new Error(`Disallowed codepoint: 0x${r.toString(16).toUpperCase()}`)}return Ky(M2(String.fromCodePoint(...a)))}function M2(n){return n.normalize("NFC")}function E2(n,e){var t;let a=_2,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 C2=new M(mo),$y=new Uint8Array(32);$y.fill(0);function Jy(n){if(n.length===0)throw new Error("invalid ENS name; empty component");return n}function Ed(n){let e=ve(Wy(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(Jy(e.slice(a))),t}function Cd(n){try{return Ed(n).length!==0}catch{}return!1}function Ca(n){typeof n!="string"&&C2.throwArgumentError("invalid ENS name; not a string","name",n);let e=$y,t=Ed(n);for(;t.length;)e=fe(ye([e,fe(t.pop())]));return K(e)}function Jr(n){return K(ye(Ed(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 Qy=`Ethereum Signed Message: -`;function Zi(n){return typeof n=="string"&&(n=ve(n)),fe(ye([ve(Qy),ve(String(n.length)),n]))}var I2=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},xt=new M(mo),e0=new Uint8Array(32);e0.fill(0);var S2=F.from(-1),t0=F.from(0),n0=F.from(1),R2=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function P2(n){let e=j(n),t=e.length%32;return t?_t([e,e0.slice(t)]):K(e)}var N2=me(n0.toHexString(),32),D2=me(t0.toHexString(),32),Xy={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Id=["name","version","chainId","verifyingContract","salt"];function Yy(n){return function(e){return typeof e!="string"&&xt.throwArgumentError(`invalid domain value for ${JSON.stringify(n)}`,`domain.${n}`,e),e}}var O2={name:Yy("name"),version:Yy("version"),chainId:function(n){try{return F.from(n).toString()}catch{}return xt.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",n)},verifyingContract:function(n){try{return ce(n).toLowerCase()}catch{}return xt.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 K(e)}catch{}return xt.throwArgumentError('invalid domain value "salt"',"domain.salt",n)}};function Sd(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))&&xt.throwArgumentError("invalid numeric width","type",n);let i=R2.mask(t?a-1:a),r=t?i.add(n0).mul(S2):t0;return function(s){let o=F.from(s);return(o.lt(r)||o.gt(i))&&xt.throwArgumentError(`value out-of-bounds for ${n}`,"value",s),me(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))&&xt.throwArgumentError("invalid bytes width","type",n),function(a){return j(a).length!==t&&xt.throwArgumentError(`invalid length for ${n}`,"value",a),P2(a)}}}switch(n){case"address":return function(e){return me(ce(e),32)};case"bool":return function(e){return e?N2:D2};case"bytes":return function(e){return fe(e)};case"string":return function(e){return nn(e)}}return null}function Zy(n,e){return`${n}(${e.map(({name:t,type:a})=>a+" "+t).join(",")})`}var bt=class{constructor(e){B(this,"types",Object.freeze(ct(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]&&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)&&(a[f]||xt.throwArgumentError(`unknown type ${JSON.stringify(f)}`,"types",e),a[f].push(o),t[o][f]=!0)})}let r=Object.keys(a).filter(o=>a[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=>{!a[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]=Zy(o,e[o])+l.map(p=>Zy(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(_t(l))}}let a=this.types[e];if(a){let i=nn(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),_t(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,a){if(Sd(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&&xt.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),{}):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,a){return bt.from(t).hashStruct(e,a)}static hashDomain(e){let t=[];for(let a in e){let i=Xy[a];i||xt.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(a)}`,"domain",e),t.push({name:a,type:i})}return t.sort((a,i)=>Id.indexOf(a.name)-Id.indexOf(i.name)),bt.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,a){return _t(["0x1901",bt.hashDomain(e),bt.from(t).hash(a)])}static hash(e,t,a){return fe(bt.encode(e,t,a))}static resolveNames(e,t,a,i){return I2(this,void 0,void 0,function*(){e=we(e);let r={};e.verifyingContract&&!ie(e.verifyingContract,20)&&(r[e.verifyingContract]="0x");let s=bt.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){bt.hashDomain(e);let i={},r=[];Id.forEach(l=>{let p=e[l];p!=null&&(i[l]=O2[l](p),r.push({name:l,type:Xy[l]}))});let s=bt.from(t),o=we(t);return o.EIP712Domain?xt.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 K(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 er=class extends en{},tr=class extends en{},Rd=class extends en{},oa=class extends en{static isIndexed(e){return!!(e&&e._isIndexed)}},B2={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function a0(n,e){let t=new Error(`deferred error during ABI decoding triggered accessing ${n}`);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(a=>qt.from(a)).filter(a=>a!=null)),B(this,"_abiCoder",mt(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){gt.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]){gt.warn("duplicate definition - "+r);return}i[r]=a}),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(a=>a.format(e));return e===ge.json?JSON.stringify(t.map(a=>JSON.parse(a))):t}static getAbiCoder(){return Kr}static getAddress(e){return ce(e)}static getSighash(e){return Ce(nn(e.format()),0,4)}static getEventTopic(e){return nn(e.format())}getFunction(e){if(ie(e)){for(let a in this.functions)if(e===this.getSighash(a))return this.functions[a];gt.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?gt.throwArgumentError("no matching function","name",a):i.length>1&>.throwArgumentError("multiple matching functions","name",a),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 a=e.toLowerCase();for(let i in this.events)if(a===this.getEventTopic(i))return this.events[i];gt.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?gt.throwArgumentError("no matching event","name",a):i.length>1&>.throwArgumentError("multiple matching events","name",a),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 a=mt(this.constructor,"getSighash");for(let i in this.errors){let r=this.errors[i];if(e===a(r))return this.errors[i]}gt.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?gt.throwArgumentError("no matching error","name",a):i.length>1&>.throwArgumentError("multiple matching errors","name",a),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 a=j(t);return K(a.slice(0,4))!==this.getSighash(e)&>.throwArgumentError(`data signature does not match error ${e.name}.`,"data",K(a)),this._decodeParams(e.inputs,a.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 a=j(t);return K(a.slice(0,4))!==this.getSighash(e)&>.throwArgumentError(`data signature does not match function ${e.name}.`,"data",K(a)),this._decodeParams(e.inputs,a.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 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=K(a.slice(0,4)),f=B2[p];if(f)s=this._abiCoder.decode(f.inputs,a.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,a.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:K(t),errorArgs:s,errorName:o,errorSignature:l,reason:i})}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&>.throwError("too many arguments for "+e.format(),M.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});let a=[];e.anonymous||a.push(this.getEventTopic(e));let i=(r,s)=>r.type==="string"?nn(s):r.type==="bytes"?fe(K(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(K(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?a.push(null):o.baseType==="array"||o.baseType==="tuple"?gt.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&>.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(nn(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 I=this.getEventTopic(e);(!ie(a[0],32)||a[0].toLowerCase()!==I)&>.throwError("fragment/topic mismatch",M.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:I,value:a[0]}),a=a.slice(1)}let i=[],r=[],s=[];e.inputs.forEach((I,_)=>{I.indexed?I.type==="string"||I.type==="bytes"||I.baseType==="tuple"||I.baseType==="array"?(i.push(pt.fromObject({type:"bytes32",name:I.name})),s.push(!0)):(i.push(I),s.push(!1)):(r.push(I),s.push(!1))});let o=a!=null?this._abiCoder.decode(i,ye(a)):null,l=this._abiCoder.decode(r,t,!0),p=[],f=0,x=0;e.inputs.forEach((I,_)=>{if(I.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(I.name&&p[I.name]==null){let v=p[_];v instanceof Error?Object.defineProperty(p,I.name,{enumerable:!0,get:()=>{throw a0(`property ${JSON.stringify(I.name)}`,v)}}):p[I.name]=v}});for(let I=0;I{throw a0(`index ${I}`,_)}})}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=K(e),a=this.getError(t.substring(0,10).toLowerCase());return a?new Rd({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 i0="abstract-provider/5.7.0";var F2=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},L2=new M(i0),xo=class extends en{static isForkEvent(e){return!!(e&&e._isForkEvent)}};var $t=class{constructor(){L2.checkAbstract(new.target,$t),B(this,"_isProvider",!0)}getFeeData(){return F2(this,void 0,void 0,function*(){let{block:e,gasPrice:t}=yield Ie({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 r0="abstract-signer/5.7.0";var _n=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},ln=new M(r0),U2=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],V2=[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 _n(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return _n(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return _n(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 _n(this,void 0,void 0,function*(){this._checkProvider("call");let a=yield Ie(this.checkTransaction(e));return yield this.provider.call(a,t)})}sendTransaction(e){return _n(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 _n(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return _n(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return _n(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return _n(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(let a in e)U2.indexOf(a)===-1&&ln.throwArgumentError("invalid transaction key: "+a,"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(a=>(a[0].toLowerCase()!==a[1].toLowerCase()&&ln.throwArgumentError("from address mismatch","transaction",e),a[0])),t}populateTransaction(e){return _n(this,void 0,void 0,function*(){let t=yield Ie(this.checkTransaction(e));t.to!=null&&(t.to=Promise.resolve(t.to).then(i=>_n(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 a=t.maxFeePerGas!=null||t.maxPriorityFeePerGas!=null;if(t.gasPrice!=null&&(t.type===2||a)?ln.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(t.type===0||t.type===1)&&a&&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?(a&&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(V2.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 Ie(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,a){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new ua(this.address,e)}};var pe=wn(rd()),Jn=wn(jd());function dr(n,e,t){return t={path:e,exports:{},require:function(a,i){return dx(a,i??t.path)}},n(t,t.exports),t.exports}function dx(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var zd=q0;function q0(n,e){if(!n)throw new Error(e||"Assertion failed")}q0.equal=function(e,t,a){if(e!=t)throw new Error(a||"Assertion failed: "+e+" != "+t)};var En=dr(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,I=f&255;x?l.push(x,I):l.push(I)}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(I>>1)-1?S=(I>>1)-L:S=L,_.isubn(S)):S=0,x[v]=S,_.iushrn(1)}return x}t.getNAF=a;function i(l,p){var f=[[],[]];l=l.clone(),p=p.clone();for(var x=0,I=0,_;l.cmpn(-x)>0||p.cmpn(-I)>0;){var v=l.andln(3)+x&3,S=p.andln(3)+I&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)+I&7,(_===3||_===5)&&v===2?O=-S:O=S),f[1].push(O),2*x===L+1&&(x=1-x),2*I===O+1&&(I=1-I),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,lx=an.getJSF,_o=an.assert;function Pa(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 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 a=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),I=r;I>0;I--){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,a,i,r){var s=this._wnafT1,o=this._wnafT2,l=this._wnafT3,p=0,f,x,I;for(f=0;f=1;f-=2){var v=f-1,S=f;if(s[v]!==1||s[S]!==1){l[v]=wo(a[v],s[v],this._bitLength),l[S]=wo(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=lx(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;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?I=o[x][R-1>>1]:R<0&&(I=o[x][-R-1>>1].neg()),I.type==="affine"?J=J.mixedAdd(I):J=J.add(I))}}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 a=[this],i=this,r=0;r=0&&(_=p,v=f),x.negative&&(x=x.neg(),I=I.neg()),_.negative&&(_=_.neg(),v=v.neg()),[{a:x,b:I},{a:_,b:v}]};fn.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),f=s.mul(i.b),x=e.sub(o).sub(l),I=p.add(f).neg();return{k1:x,k2:I}};fn.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)};fn.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};fn.prototype._endoWnafMulAdd=function(e,t,a){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 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)};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,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)};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,a){var i=[this,t],r=[e,a];return this.curve.endo?this.curve._endoWnafMulAdd(i,r):this.curve._wnafMulAdd(1,i,r,2)};Et.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)};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 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};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(n,e,t,a){pi.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}Kd(Pt,pi.BasePoint);fn.prototype.jpoint=function(e,t,a){return new Pt(this,e,t,a)};Pt.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)};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(),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 f=l.redSqr(),x=f.redMul(l),I=i.redMul(f),_=p.redSqr().redIAdd(x).redISub(I).redISub(I),v=p.redMul(I.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(),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(),f=p.redMul(o),x=a.redMul(p),I=l.redSqr().redIAdd(f).redISub(x).redISub(x),_=l.redMul(x.redISub(I)).redISub(r.redMul(f)),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 a=this;for(t=0;t=0)return!1;if(a.redIAdd(r),this.x.cmp(a)===0)return!0}};Pt.prototype.inspect=function(){return this.isInfinity()?"":""};Pt.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var To=dr(function(n,e){"use strict";var t=e;t.base=pi,t.short=yx,t.mont=null,t.edwards=null}),vo=dr(function(n,e){"use strict";var t=e,a=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,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: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(n){if(!(this instanceof Ra))return new Ra(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=En.toArray(n.entropy,n.entropyEnc||"hex"),t=En.toArray(n.nonce,n.nonceEnc||"hex"),a=En.toArray(n.pers,n.persEnc||"hex");zd(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,t,a)}var G0=Ra;Ra.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};Ra.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=En.toArray(a,i||"hex"),this._update(a));for(var r=[];r.length"};var fx=an.assert;function ko(n,e){if(n instanceof ko)return n;this._importDER(n,e)||(fx(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 Ao=ko;function cx(){this.place=0}function Hd(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 H0(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)}ko.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=H0(t),a=H0(a);!a[0]&&!(a[1]&128);)a=a.slice(1);var i=[2];qd(i,t.length),i=i.concat(t),i.push(2),qd(i,a.length);var r=i.concat(a),s=[48];return qd(s,r.length),s=s.concat(r),an.encode(s,e)};var mx=function(){throw new Error("unsupported")},z0=an.assert;function pn(n){if(!(this instanceof pn))return new pn(n);typeof n=="string"&&(z0(Object.prototype.hasOwnProperty.call(vo,n),"Unknown curve "+n),n=vo[n]),n instanceof vo.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 hx=pn;pn.prototype.keyPair=function(e){return new Wd(this,e)};pn.prototype.keyFromPrivate=function(e,t){return Wd.fromPrivate(this,e,t)};pn.prototype.keyFromPublic=function(e,t){return Wd.fromPublic(this,e,t)};pn.prototype.genKeyPair=function(e){e||(e={});for(var t=new G0({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||mx(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)}};pn.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};pn.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 G0({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 I=this.g.mul(x);if(!I.isInfinity()){var _=I.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=(I.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,a,i){e=this._truncateToN(new pe.default(e,16)),a=this.keyFromPublic(a,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,a.getPublic(),p),f.isInfinity()?!1:f.eqXToP(r)):(f=this.g.mulAdd(l,a.getPublic(),p),f.isInfinity()?!1:f.getX().umod(this.n).cmp(r)===0)};pn.prototype.recoverPubKey=function(n,e,t,a){z0((3&t)===t,"The recovery param is more than two bits"),e=new Ao(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 f=e.r.invm(i),x=i.sub(r).mul(f).umod(i),I=o.mul(f).umod(i);return this.g.mulAdd(x,s,I)};pn.prototype.getKeyRecoveryParam=function(n,e,t,a){if(e=new Ao(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 xx=dr(function(n,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=hx,t.eddsa=null}),K0=xx.ec;var W0="signing-key/5.7.0";var $d=new M(W0),Jd=null;function $n(){return Jd||(Jd=new K0("secp256k1")),Jd}var cn=class{constructor(e){B(this,"curve","secp256k1"),B(this,"privateKey",K(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)),a=$n().keyFromPublic(j(e));return"0x"+t.pub.add(a.pub).encodeCompressed("hex")}signDigest(e){let t=$n().keyFromPrivate(j(this.privateKey)),a=j(e);a.length!==32&&$d.throwArgumentError("bad digest length","digest",e);let i=t.sign(a,{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)),a=$n().keyFromPublic(j(Xr(e)));return me("0x"+t.derive(a.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}};function Mo(n,e){let t=Un(e),a={r:j(t.r),s:j(t.s)};return"0x"+$n().recoverPubKey(j(n),a,t.recoveryParam).encode("hex",!1)}function Xr(n,e){let t=j(n);if(t.length===32){let a=new cn(t);return e?"0x"+$n().keyFromPrivate(t).getPublic(!0,"hex"):a.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 $d.throwArgumentError("invalid public or private key","key","[REDACTED]")}var J0="transactions/5.7.0";var Ut=new M(J0),Eo;(function(n){n[n.legacy=0]="legacy",n[n.eip2930=1]="eip2930",n[n.eip1559=2]="eip1559"})(Eo||(Eo={}));function Xd(n){return n==="0x"?null:ce(n)}function Lt(n){return n==="0x"?Ji:F.from(n)}var bx=[{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"}],gx={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function mn(n){let e=Xr(n);return ce(Ce(fe(Ce(e,1)),12))}function yi(n,e){return mn(Mo(j(n),e))}function rn(n,e){let t=Zt(F.from(n).toHexString());return t.length>32&&Ut.throwArgumentError("invalid length for "+e,"transaction:"+e,n),t}function Qd(n,e){return{address:ce(n),storageKeys:(e||[]).map((t,a)=>(Nt(t)!==32&&Ut.throwArgumentError("invalid access list storageKey",`accessList[${n}:${a}]`,t),t.toLowerCase()))}}function sn(n){if(Array.isArray(n))return n.map((t,a)=>Array.isArray(t)?(t.length>2&&Ut.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${a}]`,t),Qd(t[0],t[1])):Qd(t.address,t.storageKeys));let e=Object.keys(n).map(t=>{let a=n[t].reduce((i,r)=>(i[r]=!0,i),{});return Qd(t,Object.keys(a).sort())});return e.sort((t,a)=>t.address.localeCompare(a.address)),e}function $0(n){return sn(n).map(e=>[e.address,e.storageKeys])}function Q0(n,e){if(n.gasPrice!=null){let a=F.from(n.gasPrice),i=F.from(n.maxFeePerGas||0);a.eq(i)||Ut.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:a,maxFeePerGas:i})}let t=[rn(n.chainId||0,"chainId"),rn(n.nonce||0,"nonce"),rn(n.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),rn(n.maxFeePerGas||0,"maxFeePerGas"),rn(n.gasLimit||0,"gasLimit"),n.to!=null?ce(n.to):"0x",rn(n.value||0,"value"),n.data||"0x",$0(n.accessList||[])];if(e){let a=Un(e);t.push(rn(a.recoveryParam,"recoveryParam")),t.push(Zt(a.r)),t.push(Zt(a.s))}return _t(["0x02",sa(t)])}function X0(n,e){let t=[rn(n.chainId||0,"chainId"),rn(n.nonce||0,"nonce"),rn(n.gasPrice||0,"gasPrice"),rn(n.gasLimit||0,"gasLimit"),n.to!=null?ce(n.to):"0x",rn(n.value||0,"value"),n.data||"0x",$0(n.accessList||[])];if(e){let a=Un(e);t.push(rn(a.recoveryParam,"recoveryParam")),t.push(Zt(a.r)),t.push(Zt(a.s))}return _t(["0x01",sa(t)])}function Tx(n,e){Gi(n,gx);let t=[];bx.forEach(function(s){let o=n[s.name]||[],l={};s.numeric&&(l.hexPad="left"),o=j(K(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(K(o))});let a=0;if(n.chainId!=null?(a=n.chainId,typeof a!="number"&&Ut.throwArgumentError("invalid transaction.chainId","transaction",n)):e&&!aa(e)&&e.v>28&&(a=Math.floor((e.v-35)/2)),a!==0&&(t.push(K(a)),t.push("0x"),t.push("0x")),!e)return sa(t);let i=Un(e),r=27+i.recoveryParam;return a!==0?(t.pop(),t.pop(),t.pop(),r+=a*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(K(r)),t.push(Zt(j(i.r))),t.push(Zt(j(i.s))),sa(t)}function Yr(n,e){if(n.type==null||n.type===0)return n.accessList!=null&&Ut.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",n),Tx(n,e);switch(n.type){case 1:return X0(n,e);case 2:return Q0(n,e);default:break}return Ut.throwError(`unsupported transaction type: ${n.type}`,M.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:n.type})}function Y0(n,e,t){try{let a=Lt(e[0]).toNumber();if(a!==0&&a!==1)throw new Error("bad recid");n.v=a}catch{Ut.throwArgumentError("invalid v for transaction type: 1","v",e[0])}n.r=me(e[1],32),n.s=me(e[2],32);try{let a=fe(t(n));n.from=yi(a,{r:n.r,s:n.s,recoveryParam:n.v})}catch{}}function vx(n){let e=Gr(n.slice(1));e.length!==9&&e.length!==12&&Ut.throwArgumentError("invalid component count for transaction type: 2","payload",K(n));let t=Lt(e[2]),a=Lt(e[3]),i={type:2,chainId:Lt(e[0]).toNumber(),nonce:Lt(e[1]).toNumber(),maxPriorityFeePerGas:t,maxFeePerGas:a,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(n),Y0(i,e.slice(9),Q0)),i}function wx(n){let e=Gr(n.slice(1));e.length!==8&&e.length!==11&&Ut.throwArgumentError("invalid component count for transaction type: 1","payload",K(n));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(n),Y0(t,e.slice(8),X0)),t}function _x(n){let e=Gr(n);e.length!==9&&e.length!==6&&Ut.throwArgumentError("invalid raw transaction","rawTransaction",n);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 a=t.v-27,i=e.slice(0,6);t.chainId!==0&&(i.push(K(t.chainId)),i.push("0x"),i.push("0x"),a-=t.chainId*2+8);let r=fe(sa(i));try{t.from=yi(r,{r:K(t.r),s:K(t.s),recoveryParam:a})}catch{}t.hash=fe(n)}return t.type=null,t}function Co(n){let e=j(n);if(e[0]>127)return _x(e);switch(e[0]){case 1:return wx(e);case 2:return vx(e);default:break}return Ut.throwError(`unsupported transaction type: ${e[0]}`,M.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}var Z0="contracts/5.7.0";var Na=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Se=new M(Z0),kx={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(n,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{}n||Se.throwError("a provider or signer is needed to resolve ENS names",M.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});let a=yield n.resolveName(t);return a==null&&Se.throwArgumentError("resolver or addr is not configured for ENS name","name",t),a})}function Zr(n,e,t){return Na(this,void 0,void 0,function*(){return Array.isArray(t)?yield Promise.all(t.map((a,i)=>Zr(n,Array.isArray(e)?e[i]:e[a.name],a))):t.type==="address"?yield Io(n,e):t.type==="tuple"?yield Zr(n,e,t.components):t.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(a=>Zr(n,a,t.arrayChildren))):Promise.reject(Se.makeError("invalid value for array",M.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function Po(n,e,t){return Na(this,void 0,void 0,function*(){let a={};t.length===e.inputs.length+1&&typeof t[t.length-1]=="object"&&(a=we(t.pop())),Se.checkArgumentCount(t.length,e.inputs.length,"passed to contract"),n.signer?a.from?a.from=Ie({override:Io(n.signer,a.from),signer:n.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})):a.from=n.signer.getAddress():a.from&&(a.from=Io(n.provider,a.from));let i=yield Ie({args:Zr(n.signer||n.provider,t,e.inputs),address:n.resolvedAddress,overrides:Ie(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=sn(o.accessList)),s.gasLimit==null&&e.gas!=null){let p=21e3,f=j(r);for(let x=0;xa[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 Ax(n,e){return function(...t){return Po(n,e,t)}}function Mx(n,e){let t=n.signer||n.provider;return function(...a){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(n,e,a);return yield t.estimateGas(i)})}}function tf(n,e){let t=e.wait.bind(e);e.wait=a=>t(a).then(i=>(i.events=i.logs.map(r=>{let s=ct(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 nf(n,e,t){let a=n.signer||n.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=we(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 Po(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===M.errors.CALL_EXCEPTION&&(l.address=n.address,l.args=i,l.transaction=s),l}})}}function Ex(n,e){return function(...t){return Na(this,void 0,void 0,function*(){n.signer||Se.throwError("sending a transaction requires a signer",M.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),n.deployTransaction!=null&&(yield n._deployed());let a=yield Po(n,e,t),i=yield n.signer.sendTransaction(a);return tf(n,i),i})}}function ef(n,e,t){return e.constant?nf(n,e,t):Ex(n,e)}function af(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 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(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]}},Yd=class extends fi{constructor(){super("error",null)}},So=class extends fi{constructor(e,t,a,i){let r={address:e},s=t.getEventTopic(a);i?(s!==i[0]&&Se.throwArgumentError("topic mismatch","topics",i),r.topics=i.slice()):r.topics=[s],super(af(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=Ki(e.args);if(t.length)throw t[0].error;let a=(e.args||[]).slice();return a.push(e),a}},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=(a,i)=>this.interface.decodeEventLog(t.eventFragment,a,i),e.args=t.args}catch{}}},lr=class{constructor(e,t,a){B(this,"interface",mt(new.target,"getInterface")(t)),a==null?(B(this,"provider",null),B(this,"signer",null)):St.isSigner(a)?(B(this,"provider",a.provider||null),B(this,"signer",a)):$t.isProvider(a)?(B(this,"provider",a),B(this,"signer",null)):Se.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]]):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,ef(this,o,!0)),this.functions[s]==null&&B(this.functions,s,ef(this,o,!1)),this.callStatic[s]==null&&B(this.callStatic,s,nf(this,o,!0)),this.populateTransaction[s]==null&&B(this.populateTransaction,s,Ax(this,o)),this.estimateGas[s]==null&&B(this.estimateGas,s,Mx(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 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=we(e||{});return["from","to"].forEach(function(a){t[a]!=null&&Se.throwError("cannot override "+a,M.errors.UNSUPPORTED_OPERATION,{operation:a})}),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 a=e.topics[0];if(typeof a!="string")throw new Error("invalid topic");let i=this.interface.getEvent(a);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(af(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,a){let i=ct(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||Se.throwError("events require a provider or a signer with a provider",M.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=we(i.filter);return typeof t=="string"&&ie(t,32)?(a!=null&&Se.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 lr{},ci=class{constructor(e,t,a){let i=null;typeof t=="string"?i=t:on(t)?i=K(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),a&&!St.isSigner(a)&&Se.throwArgumentError("invalid signer","signer",a),B(this,"bytecode",i),B(this,"interface",mt(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=we(e.pop());for(let a in t)if(!kx[a])throw new Error("unknown transaction override "+a)}return["data","from","to"].forEach(a=>{t[a]!=null&&Se.throwError("cannot override "+a,M.errors.UNSUPPORTED_OPERATION,{operation:a})}),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=K(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 a=yield Zr(this.signer,e,this.interface.deploy.inputs);a.push(t);let i=this.getDeployTransaction(...a),r=yield this.signer.sendTransaction(i),s=mt(this.constructor,"getContractAddress")(r),o=mt(this.constructor,"getContract")(s,this.interface,this.signer);return tf(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 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 ui(e)}static getContract(e,t,a){return new oe(e,t,a)}};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;)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 I=j(fa(i,n,l));r||(r=I.length,f=new Uint8Array(r),s=Math.ceil(a/r),p=a-(s-1)*r),f.set(I);for(let S=1;S{var S6=Object.create;var Gs=Object.defineProperty;var R6=Object.getOwnPropertyDescriptor;var P6=Object.getOwnPropertyNames;var N6=Object.getPrototypeOf,D6=Object.prototype.hasOwnProperty;var O6=(n,e,t)=>e in n?Gs(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var ne=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),ji=(n,e)=>{for(var t in e)Gs(n,t,{get:e[t],enumerable:!0})},B6=(n,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of P6(e))!D6.call(n,i)&&i!==t&&Gs(n,i,{get:()=>e[i],enumerable:!(a=R6(e,i))||a.enumerable});return n};var wn=(n,e,t)=>(t=n!=null?S6(N6(n)):{},B6(e||!n||!n.__esModule?Gs(t,"default",{value:n,enumerable:!0}):t,n));var xe=(n,e,t)=>(O6(n,typeof e!="symbol"?e+"":e,t),t);var Vp=ne(()=>{});var sd=ne((jp,rd)=>{(function(n,e){"use strict";function t(C,u){if(!C)throw new Error(u||"Assertion failed")}function a(C,u){C.super_=u;var y=function(){};y.prototype=u.prototype,C.prototype=new y,C.prototype.constructor=C}function i(C,u,y){if(i.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=i:e.BN=i,i.BN=i,i.wordSize=26;var r;try{typeof window<"u"&&typeof window.Buffer<"u"?r=window.Buffer:r=Vp().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(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 b=s(C,y);return y-1>=u&&(b|=s(C,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(C,u,y,b){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()},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"],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];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=I[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(C){for(var u=new Array(C.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-C.length+1);P<=c;P++){var D=d-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[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,W=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,Ka=w[8]|0,je=Ka&8191,He=Ka>>>13,Wa=w[9]|0,qe=Wa&8191,Ge=Wa>>>13,Ja=A[0]|0,ze=Ja&8191,Ke=Ja>>>13,$a=A[1]|0,We=$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,Ke),d=d+Math.imul(P,ze)|0,m=Math.imul(P,Ke);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,Ke),d=d+Math.imul(W,ze)|0,m=Math.imul(W,Ke),g=g+Math.imul(c,We)|0,d=d+Math.imul(c,Je)|0,d=d+Math.imul(P,We)|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,Ke),d=d+Math.imul(Q,ze)|0,m=Math.imul(Q,Ke),g=g+Math.imul(V,We)|0,d=d+Math.imul(V,Je)|0,d=d+Math.imul(W,We)|0,m=m+Math.imul(W,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,Ke),d=d+Math.imul(le,ze)|0,m=Math.imul(le,Ke),g=g+Math.imul(X,We)|0,d=d+Math.imul(X,Je)|0,d=d+Math.imul(Q,We)|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(W,$e)|0,m=m+Math.imul(W,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,Ke),d=d+Math.imul(De,ze)|0,m=Math.imul(De,Ke),g=g+Math.imul(Z,We)|0,d=d+Math.imul(Z,Je)|0,d=d+Math.imul(le,We)|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(W,Xe)|0,m=m+Math.imul(W,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,Ke),d=d+Math.imul(Be,ze)|0,m=Math.imul(Be,Ke),g=g+Math.imul(Ne,We)|0,d=d+Math.imul(Ne,Je)|0,d=d+Math.imul(De,We)|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(W,Ze)|0,m=m+Math.imul(W,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 zu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(zu>>>26)|0,zu&=67108863,g=Math.imul(Fe,ze),d=Math.imul(Fe,Ke),d=d+Math.imul(Le,ze)|0,m=Math.imul(Le,Ke),g=g+Math.imul(Oe,We)|0,d=d+Math.imul(Oe,Je)|0,d=d+Math.imul(Be,We)|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(W,tt)|0,m=m+Math.imul(W,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,Ke),d=d+Math.imul(Ve,ze)|0,m=Math.imul(Ve,Ke),g=g+Math.imul(Fe,We)|0,d=d+Math.imul(Fe,Je)|0,d=d+Math.imul(Le,We)|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(W,at)|0,m=m+Math.imul(W,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,Ke),d=d+Math.imul(He,ze)|0,m=Math.imul(He,Ke),g=g+Math.imul(Ue,We)|0,d=d+Math.imul(Ue,Je)|0,d=d+Math.imul(Ve,We)|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(W,rt)|0,m=m+Math.imul(W,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 Ju=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Ju>>>26)|0,Ju&=67108863,g=Math.imul(qe,ze),d=Math.imul(qe,Ke),d=d+Math.imul(Ge,ze)|0,m=Math.imul(Ge,Ke),g=g+Math.imul(je,We)|0,d=d+Math.imul(je,Je)|0,d=d+Math.imul(He,We)|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(W,ot)|0,m=m+Math.imul(W,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 $u=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+($u>>>26)|0,$u&=67108863,g=Math.imul(qe,We),d=Math.imul(qe,Je),d=d+Math.imul(Ge,We)|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(W,dt)|0,m=m+Math.imul(W,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,$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 Xu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Xu>>>26)|0,Xu&=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 Yu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Yu>>>26)|0,Yu&=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 Zu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Zu>>>26)|0,Zu&=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 ed=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(ed>>>26)|0,ed&=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 td=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(td>>>26)|0,td&=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 nd=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(nd>>>26)|0,nd&=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 ad=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(ad>>>26)|0,ad&=67108863,g=Math.imul(qe,dt),d=Math.imul(qe,lt),d=d+Math.imul(Ge,dt)|0,m=Math.imul(Ge,lt);var id=(k+g|0)+((d&8191)<<13)|0;return k=(m+(d>>>13)|0)+(id>>>26)|0,id&=67108863,h[0]=va,h[1]=wa,h[2]=_a,h[3]=ka,h[4]=Aa,h[5]=zu,h[6]=Ku,h[7]=Wu,h[8]=Ju,h[9]=$u,h[10]=Qu,h[11]=Xu,h[12]=Yu,h[13]=Zu,h[14]=ed,h[15]=td,h[16]=nd,h[17]=ad,h[18]=id,k!==0&&(h[19]=k,b.length++),b};Math.imul||(O=L);function U(C,u,y){y.negative=u.negative^C.negative,y.length=C.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(C,u,y){return U(C,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(C,u){this.x=C,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 $(C,u){this.name=C,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(C){if(typeof C=="string"){var u=i._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 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(C){q.call(this,C),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 rd>"u"||rd,jp)});var yy=ne((xg,Qs)=>{(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 Qs=="object"&&Qs.exports,o=typeof define=="function"&&define.amd,l=!a.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",p="0123456789abcdef".split(""),f=[31,7936,2031616,520093696],x=[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};(a.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(c){return Object.prototype.toString.call(c)==="[object Array]"}),l&&(a.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,W){return new d(c,P,W).update(V)[D]()}},$=function(c,P,D){return function(V,W,ee,X){return u["cshake"+c].update(V,W,ee,X)[D]()}},de=function(c,P,D){return function(V,W,ee,X){return u["kmac"+c].update(V,W,ee,X)[D]()}},T=function(c,P,D,V){for(var W=0;W>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(n);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(n)}else throw new Error(n);P=!0}for(var V=this.blocks,W=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)<=W){for(this.start=Z-W,this.block=V[X],Z=0;Z>8,D=c&255;D>0;)W.unshift(D),c=c>>8,D=c&255,++V;return P?W.push(V):W.unshift(V),this.update(W),W.length},d.prototype.encodeString=function(c){var P,D=typeof c;if(D!=="string"){if(D==="object"){if(c===null)throw new Error(n);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(n)}else throw new Error(n);P=!0}var V=0,W=c.length;if(P)V=W;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),W=0)}return V&&(Q=P[W],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,W=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[W],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,W,ee,X,Q,yt,Z,le,Ha,Ne,De,qa,Oe,Be,Ga,Fe,Le,za,Ue,Ve,Ka,je,He,Wa,qe,Ge,Ja,ze,Ke,$a,We,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)W=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=W^(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^(W<<1|ee>>>31),D=Ha^(ee<<1|W>>>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,Ke=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,We=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,Wa=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,Ka=c[49]<<14|c[48]>>>18,c[0]=qa^~Be&Fe,c[1]=Oe^~Ga&Le,c[10]=je^~Wa&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]=Wa^~Ge&ze,c[13]=qe^~Ja&Ke,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&Ka,c[14]=Ge^~ze&$a,c[15]=Ja^~Ke&We,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^~Ka&Oe,c[16]=ze^~$a&je,c[17]=Ke^~We&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]=Ka^~Oe&Ga,c[18]=$a^~je&Wa,c[19]=We^~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{o0.exports=s0;function s0(n,e){if(!n)throw new Error(e||"Assertion failed")}s0.equal=function(e,t,a){if(e!=t)throw new Error(a||"Assertion failed: "+e+" != "+t)}});var u0=ne((d3,Nd)=>{typeof Object.create=="function"?Nd.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Nd.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 kn=ne(Pe=>{"use strict";var j2=nr(),H2=u0();Pe.inherits=H2;function q2(n,e){return(n.charCodeAt(e)&64512)!==55296||e<0||e+1>=n.length?!1:(n.charCodeAt(e+1)&64512)===56320}function G2(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):q2(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}Pe.htonl=d0;function K2(n,e){for(var t="",a=0;a>>0}return r}Pe.join32=W2;function J2(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}Pe.split32=J2;function $2(n,e){return n>>>e|n<<32-e}Pe.rotr32=$2;function Q2(n,e){return n<>>32-e}Pe.rotl32=Q2;function X2(n,e){return n+e>>>0}Pe.sum32=X2;function Y2(n,e,t){return n+e+t>>>0}Pe.sum32_3=Y2;function Z2(n,e,t,a){return n+e+t+a>>>0}Pe.sum32_4=Z2;function eh(n,e,t,a,i){return n+e+t+a+i>>>0}Pe.sum32_5=eh;function th(n,e,t,a){var i=n[e],r=n[e+1],s=a+r>>>0,o=(s>>0,n[e+1]=s}Pe.sum64=th;function nh(n,e,t,a){var i=e+a>>>0,r=(i>>0}Pe.sum64_hi=nh;function ah(n,e,t,a){var i=e+a;return i>>>0}Pe.sum64_lo=ah;function ih(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}Pe.sum64_4_hi=ih;function rh(n,e,t,a,i,r,s,o){var l=e+a+r+o;return l>>>0}Pe.sum64_4_lo=rh;function sh(n,e,t,a,i,r,s,o,l,p){var f=0,x=e;x=x+a>>>0,f+=x>>0,f+=x>>0,f+=x>>0,f+=x>>0}Pe.sum64_5_hi=sh;function oh(n,e,t,a,i,r,s,o,l,p){var f=e+a+r+o+p;return f>>>0}Pe.sum64_5_lo=oh;function uh(n,e,t){var a=e<<32-t|n>>>t;return a>>>0}Pe.rotr64_hi=uh;function dh(n,e,t){var a=n<<32-t|e>>>t;return a>>>0}Pe.rotr64_lo=dh;function lh(n,e,t){return n>>>t}Pe.shr64_hi=lh;function ph(n,e,t){var a=n<<32-t|e>>>t;return a>>>0}Pe.shr64_lo=ph});var ar=ne(f0=>{"use strict";var y0=kn(),yh=nr();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}f0.BlockHash=bo;bo.prototype.update=function(e,t){if(e=y0.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=y0.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 fh=kn(),Hn=fh.rotr32;function ch(n,e,t,a){if(n===0)return c0(e,t,a);if(n===1||n===3)return h0(e,t,a);if(n===2)return m0(e,t,a)}da.ft_1=ch;function c0(n,e,t){return n&e^~n&t}da.ch32=c0;function m0(n,e,t){return n&e^n&t^e&t}da.maj32=m0;function h0(n,e,t){return n^e^t}da.p32=h0;function mh(n){return Hn(n,2)^Hn(n,13)^Hn(n,22)}da.s0_256=mh;function hh(n){return Hn(n,6)^Hn(n,11)^Hn(n,25)}da.s1_256=hh;function xh(n){return Hn(n,7)^Hn(n,18)^n>>>3}da.g0_256=xh;function bh(n){return Hn(n,17)^Hn(n,19)^n>>>10}da.g1_256=bh});var g0=ne((f3,b0)=>{"use strict";var ir=kn(),gh=ar(),Th=Dd(),Od=ir.rotl32,$r=ir.sum32,vh=ir.sum32_5,wh=Th.ft_1,x0=gh.BlockHash,_h=[1518500249,1859775393,2400959708,3395469782];function qn(){if(!(this instanceof qn))return new qn;x0.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}ir.inherits(qn,x0);b0.exports=qn;qn.blockSize=512;qn.outSize=160;qn.hmacStrength=80;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 rr=kn(),kh=ar(),sr=Dd(),Ah=nr(),An=rr.sum32,Mh=rr.sum32_4,Eh=rr.sum32_5,Ch=sr.ch32,Ih=sr.maj32,Sh=sr.s0_256,Rh=sr.s1_256,Ph=sr.g0_256,Nh=sr.g1_256,T0=kh.BlockHash,Dh=[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;T0.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=Dh,this.W=new Array(64)}rr.inherits(Gn,T0);v0.exports=Gn;Gn.blockSize=512;Gn.outSize=256;Gn.hmacStrength=192;Gn.padLength=64;Gn.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 Fd=kn(),w0=Bd();function la(){if(!(this instanceof la))return new la;w0.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}Fd.inherits(la,w0);_0.exports=la;la.blockSize=512;la.outSize=224;la.hmacStrength=192;la.padLength=64;la.prototype._digest=function(e){return e==="hex"?Fd.toHex32(this.h.slice(0,7),"big"):Fd.split32(this.h.slice(0,7),"big")}});var Vd=ne((h3,C0)=>{"use strict";var Qt=kn(),Oh=ar(),Bh=nr(),zn=Qt.rotr64_hi,Kn=Qt.rotr64_lo,A0=Qt.shr64_hi,M0=Qt.shr64_lo,Sa=Qt.sum64,Ld=Qt.sum64_hi,Ud=Qt.sum64_lo,Fh=Qt.sum64_4_hi,Lh=Qt.sum64_4_lo,Uh=Qt.sum64_5_hi,Vh=Qt.sum64_5_lo,E0=Oh.BlockHash,jh=[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 Mn(){if(!(this instanceof Mn))return new Mn;E0.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=jh,this.W=new Array(160)}Qt.inherits(Mn,E0);C0.exports=Mn;Mn.blockSize=1024;Mn.outSize=512;Mn.hmacStrength=192;Mn.padLength=128;Mn.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 jd=kn(),I0=Vd();function pa(){if(!(this instanceof pa))return new pa;I0.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}jd.inherits(pa,I0);S0.exports=pa;pa.blockSize=1024;pa.outSize=384;pa.hmacStrength=192;pa.padLength=128;pa.prototype._digest=function(e){return e==="hex"?jd.toHex32(this.h.slice(0,12),"big"):jd.split32(this.h.slice(0,12),"big")}});var P0=ne(or=>{"use strict";or.sha1=g0();or.sha224=k0();or.sha256=Bd();or.sha384=R0();or.sha512=Vd()});var L0=ne(F0=>{"use strict";var li=kn(),ex=ar(),go=li.rotl32,N0=li.sum32,Qr=li.sum32_3,D0=li.sum32_4,B0=ex.BlockHash;function Wn(){if(!(this instanceof Wn))return new Wn;B0.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}li.inherits(Wn,B0);F0.ripemd160=Wn;Wn.blockSize=512;Wn.outSize=160;Wn.hmacStrength=192;Wn.padLength=64;Wn.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,f=r,x=s,I=o,_=0;_<80;_++){var v=N0(go(D0(a,O0(_,i,r,s),e[ax[_]+t],tx(_)),rx[_]),o);a=o,o=s,s=go(r,10),r=i,i=v,v=N0(go(D0(l,O0(79-_,p,f,x),e[ix[_]+t],nx(_)),sx[_]),I),l=I,I=x,x=go(f,10),f=p,p=v}v=Qr(this.h[1],r,x),this.h[1]=Qr(this.h[2],s,I),this.h[2]=Qr(this.h[3],o,l),this.h[3]=Qr(this.h[4],a,p),this.h[4]=Qr(this.h[0],i,f),this.h[0]=v};Wn.prototype._digest=function(e){return e==="hex"?li.toHex32(this.h,"little"):li.split32(this.h,"little")};function O0(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 tx(n){return n<=15?0:n<=31?1518500249:n<=47?1859775393:n<=63?2400959708:2840853838}function nx(n){return n<=15?1352829926:n<=31?1548603684:n<=47?1836072691:n<=63?2053994217:0}var ax=[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],ix=[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],rx=[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],sx=[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 V0=ne((T3,U0)=>{"use strict";var ox=kn(),ux=nr();function ur(n,e,t){if(!(this instanceof ur))return new ur(n,e,t);this.Hash=n,this.blockSize=n.blockSize/8,this.outSize=n.outSize/8,this.inner=null,this.outer=null,this._init(ox.toArray(e,t))}U0.exports=ur;ur.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),ux(e.length<=this.blockSize);for(var t=e.length;t{var Rt=j0;Rt.utils=kn();Rt.common=ar();Rt.sha=P0();Rt.ripemd=L0();Rt.hmac=V0();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 ol=ne((sl,hf)=>{"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&&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],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],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,W=P%4,this._Ke[V][W]=m[k],this._Kd[h-V][W]=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=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,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,W,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],W=(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]=(W+de[D-7]|0)+(ee+de[D-16]|0)|0;for(D=0;D<64;D++)W=(((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+W|0,g=k,k=h,h=A,A=W+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,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 a(_,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=a(_,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=a(_,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 I={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 yl<"u"?bf.exports=I:typeof define=="function"&&define.amd?define(I):n&&(n.scrypt&&(n._scrypt=n.scrypt),n.scrypt=I)})(yl)});var qf=ne((d4,Hf)=>{"use strict";var qo="qpzry9x8gf2tvdw0s3jn54khce6mua7l",xl={};for(ss=0;ss>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 Vf(n){for(var e=1,t=0;t126)return"Invalid prefix ("+n+")";e=xr(e)^a>>5}for(e=xr(e),t=0;tt)throw new TypeError("Exceeds length limit");n=n.toLowerCase();var a=Vf(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=xr(a)^s,i+=qo.charAt(s)}for(r=0;r<6;++r)a=xr(a);for(a^=1,r=0;r<6;++r){var o=a>>(5-r)*5&31;i+=qo.charAt(o)}return i}function jf(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=Vf(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=jf.apply(null,arguments);if(typeof n=="object")return n}function Wx(n){var e=jf.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function Go(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 zl=="object"&&typeof Kl<"u"?Kl.exports=e():typeof define=="function"&&define.amd?define(e):(n=typeof globalThis<"u"?globalThis:n||self,n.fetchRetry=e())})(zl,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,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(I,_){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)I(U);else if(typeof x=="function")try{return Promise.resolve(x(L,null,U)).then(function(H){H?S(L,null,U):I(U)}).catch(_)}catch(H){_(H)}else L=0}function t(a){this.name="ArgumentError",this.message=a}return n})});var Wl=ne(uu=>{"use strict";Object.defineProperty(uu,"__esModule",{value:!0});uu.$dictionary=void 0;uu.$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 Is=ne((xA,am)=>{am.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}});var $l=ne(Fa=>{var Me=Is(),Jl=()=>[{type:Me.RANGE,from:48,to:57}],im=()=>[{type:Me.CHAR,value:95},{type:Me.RANGE,from:97,to:122},{type:Me.RANGE,from:65,to:90}].concat(Jl()),rm=()=>[{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}],L5=()=>[{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:im(),not:!1});Fa.notWords=()=>({type:Me.SET,set:im(),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:rm(),not:!1});Fa.notWhitespace=()=>({type:Me.SET,set:rm(),not:!0});Fa.anyChar=()=>({type:Me.SET,set:L5(),not:!0})});var om=ne(Ss=>{var sm=Is(),Cr=$l(),U5="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?",V5={0:0,t:9,n:10,v:11,f:12,r:13};Ss.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 f=a?8:r?parseInt(r,16):s?parseInt(s,16):o?parseInt(o,8):l?U5.indexOf(l):V5[p],x=String.fromCharCode(f);return/[[\]{}^$.|?*+()]/.test(x)&&(x="\\"+x),x}),n};Ss.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(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:sm.RANGE,from:(i[8]||i[9]).charCodeAt(0),to:i[10].charCodeAt(0)});else if(r=i[12])t.push({type:sm.CHAR,value:r.charCodeAt(0)});else return[t,a.lastIndex];Ss.error(e,"Unterminated character class")};Ss.error=(n,e)=>{throw new SyntaxError("Invalid regular expression: /"+n+"/: "+e)}});var um=ne(Rs=>{var du=Is();Rs.wordBoundary=()=>({type:du.POSITION,value:"b"});Rs.nonWordBoundary=()=>({type:du.POSITION,value:"B"});Rs.begin=()=>({type:du.POSITION,value:"^"});Rs.end=()=>({type:du.POSITION,value:"$"})});var dm=ne((vA,Ql)=>{var Ir=om(),xn=Is(),_i=$l(),lu=um();Ql.exports=n=>{var e=0,t,a,i={type:xn.ROOT,stack:[]},r=i,s=i.stack,o=[],l=O=>{Ir.error(n,`Nothing to repeat at column ${O-1}`)},p=Ir.strToChars(n);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 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}))}};lm.exports=La});var fm=ne((_A,ym)=>{var pu=dm(),Ps=pm(),ki=pu.types;ym.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=pu(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 a,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),a=e.options?this._randSelect(e.options):e.stack,i="",s=0,o=a.length;s{"use strict";var j5=Ai&&Ai.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ai,"__esModule",{value:!0});Ai.RandomGenerator=void 0;var H5=j5(fm()),q5;(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 H5.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()}})(q5=Ai.RandomGenerator||(Ai.RandomGenerator={}))});var Ds=ne(Sr=>{"use strict";var G5=Sr&&Sr.__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(Sr,"__esModule",{value:!0});Sr.TypeGuardError=void 0;var z5=function(n){G5(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);Sr.TypeGuardError=z5});var mm=ne(yu=>{"use strict";Object.defineProperty(yu,"__esModule",{value:!0});yu.$any=void 0;var K5=function(n){return n!==void 0?JSON.parse(JSON.stringify(n)):void 0};yu.$any=K5});var hm=ne(fu=>{"use strict";Object.defineProperty(fu,"__esModule",{value:!0});fu.$every=void 0;var W5=function(n,e){for(var t=null,a=0;a{"use strict";Object.defineProperty(cu,"__esModule",{value:!0});cu.$guard=void 0;var J5=Ds(),$5=function(n){return function(e,t){if(e===!0)throw new J5.TypeGuardError({method:n,path:t.path,expected:t.expected,value:t.value});return!1}};cu.$guard=$5});var bm=ne(mu=>{"use strict";Object.defineProperty(mu,"__esModule",{value:!0});mu.$is_between=void 0;var Q5=function(n,e,t){return e<=n&&n<=t};mu.$is_between=Q5});var gm=ne(hu=>{"use strict";Object.defineProperty(hu,"__esModule",{value:!0});hu.$is_custom=void 0;var X5=Wl(),Y5=function(n,e,t,a){var i,r=(i=X5.$dictionary.get(n))===null||i===void 0?void 0:i.get(e);return r===void 0?!0:r(t)(a)};hu.$is_custom=Y5});var Tm=ne(xu=>{"use strict";Object.defineProperty(xu,"__esModule",{value:!0});xu.$is_date=void 0;var Z5=function(n){return eb.test(n)};xu.$is_date=Z5;var eb=/^(\d{4})-(\d{2})-(\d{2})$/});var vm=ne(bu=>{"use strict";Object.defineProperty(bu,"__esModule",{value:!0});bu.$is_datetime=void 0;var tb=function(n){return!isNaN(new Date(n).getTime())};bu.$is_datetime=tb});var wm=ne(gu=>{"use strict";Object.defineProperty(gu,"__esModule",{value:!0});gu.$is_email=void 0;var nb=function(n){return ab.test(n)};gu.$is_email=nb;var ab=/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i});var _m=ne(Tu=>{"use strict";Object.defineProperty(Tu,"__esModule",{value:!0});Tu.$is_ipv4=void 0;var ib=function(n){return rb.test(n)};Tu.$is_ipv4=ib;var rb=/^(?: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 km=ne(vu=>{"use strict";Object.defineProperty(vu,"__esModule",{value:!0});vu.$is_ipv6=void 0;var sb=function(n){return ob.test(n)};vu.$is_ipv6=sb;var ob=/^(([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 Am=ne(wu=>{"use strict";Object.defineProperty(wu,"__esModule",{value:!0});wu.$is_url=void 0;var ub=function(n){return db.test(n)};wu.$is_url=ub;var db=/^[a-zA-Z0-9]+:\/\/(?:www.)?[-a-zA-Z0-9@:%._+~#=]{1,256}.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/});var Mm=ne(_u=>{"use strict";Object.defineProperty(_u,"__esModule",{value:!0});_u.$is_uuid=void 0;var lb=function(n){return pb.test(n)};_u.$is_uuid=lb;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 Em=ne(ku=>{"use strict";Object.defineProperty(ku,"__esModule",{value:!0});ku.$join=void 0;var yb=function(n){return fb(n)?".".concat(n):"[".concat(JSON.stringify(n),"]")};ku.$join=yb;var fb=function(n){return cb(n)===!1&&/^[a-zA-Z_$][a-zA-Z_$0-9]*$/g.test(n)},cb=function(n){return mb.has(n)},mb=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 Cm=ne(Au=>{"use strict";Object.defineProperty(Au,"__esModule",{value:!0});Au.$number=void 0;var hb=Ds(),xb=function(n){if(isFinite(n)===!1)throw new hb.TypeGuardError({method:"typia.stringify",expected:"number",value:n,message:"Error on typia.stringify(): infinite or not a number."});return n};Au.$number=xb});var Im=ne(Mu=>{"use strict";Object.defineProperty(Mu,"__esModule",{value:!0});Mu.$report=void 0;var bb=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}};Mu.$report=bb});var Sm=ne(Eu=>{"use strict";Object.defineProperty(Eu,"__esModule",{value:!0});Eu.$rest=void 0;var gb=function(n){return n.length===2?"":","+n.substring(1,n.length-1)};Eu.$rest=gb});var Rm=ne(Cu=>{"use strict";Object.defineProperty(Cu,"__esModule",{value:!0});Cu.$string=void 0;var Tb=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,'"')};Cu.$string=Tb});var Pm=ne(Iu=>{"use strict";Object.defineProperty(Iu,"__esModule",{value:!0});Iu.$tail=void 0;var vb=function(n){return n[n.length-1]===","?n.substring(0,n.length-1):n};Iu.$tail=vb});var Bm=ne(Mi=>{"use strict";var Vt=Mi&&Mi.__assign||function(){return Vt=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 Vt(Vt({},n.is()),{number:Db.$number,string:Fb.$string,tail:Lb.$tail,rest:Bb.$rest,throws:e(t)})},n.clone=function(t){return Vt(Vt({},n.is()),{throws:e(t),any:wb.$any})},n.prune=function(t){return Vt(Vt({},n.is()),{throws:e(t)})},n.random=function(){return{generator:Nm.RandomGenerator,pick:Nm.RandomGenerator.pick}};var e=function(t){return function(a){throw new Dm.TypeGuardError(Vt(Vt({},a),{method:"typia.".concat(t)}))}}})(Ub=Mi.Namespace||(Mi.Namespace={}))});var Fm=ne(Os=>{"use strict";Object.defineProperty(Os,"__esModule",{value:!0});Os.MapUtil=void 0;var Vb;(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}}})(Vb=Os.MapUtil||(Os.MapUtil={}))});var Um=ne(Lm=>{"use strict";Object.defineProperty(Lm,"__esModule",{value:!0})});var jm=ne(Vm=>{"use strict";Object.defineProperty(Vm,"__esModule",{value:!0})});var qm=ne(Hm=>{"use strict";Object.defineProperty(Hm,"__esModule",{value:!0})});var zm=ne(Gm=>{"use strict";Object.defineProperty(Gm,"__esModule",{value:!0})});var Wm=ne(Km=>{"use strict";Object.defineProperty(Km,"__esModule",{value:!0})});var $m=ne(Jm=>{"use strict";Object.defineProperty(Jm,"__esModule",{value:!0})});var dp=ne(z=>{"use strict";var jb=z&&z.__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]}),Ei=z&&z.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&jb(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 Rr=Wl(),Ee=Bm(),Hb=Fm();Ei(Um(),z);Ei(jm(),z);Ei(qm(),z);Ei(zm(),z);Ei(Wm(),z);Ei($m(),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 Su(){re("is")}z.is=Su;Object.assign(Su,Ee.Namespace.assert("is"));function Ru(){re("validate")}z.validate=Ru;Object.assign(Ru,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(n){var e,t;return n?(t=(e=Rr.$dictionary.get(n))===null||e===void 0?void 0:e.size)!==null&&t!==void 0?t:0:Rr.$dictionary.size},has:function(n){return function(e){var t,a;return(a=(t=Rr.$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=Rr.$dictionary.get(n))===null||t===void 0?void 0:t.get(e)}},insert:function(n){return function(e){return function(t){var a=Hb.MapUtil.take(Rr.$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=Rr.$dictionary.get(n))===null||t===void 0?void 0:t.delete(e))!==null&&a!==void 0?a:!1}}};function qb(){re("application")}z.application=qb;function np(){re("assertParse")}z.assertParse=np;Object.assign(np,Ee.Namespace.assert("assertParse"));function ap(){re("isParse")}z.isParse=ap;Object.assign(ap,Su);function ip(){re("validateParse")}z.validateParse=ip;Object.assign(ip,Ru);function rp(){re("stringify")}z.stringify=rp;Object.assign(rp,Ee.Namespace.stringify("stringify"));function Pu(){re("assertStringify")}z.assertStringify=Pu;Object.assign(Pu,Ee.Namespace.assert("assertStringify"));Object.assign(Pu,Ee.Namespace.stringify("assertStringify"));function Nu(){re("isStringify")}z.isStringify=Nu;Object.assign(Nu,Ee.Namespace.is());Object.assign(Nu,Ee.Namespace.stringify("isStringify"));function Du(){re("validateStringify")}z.validateStringify=Du;Object.assign(Du,Ee.Namespace.validate());Object.assign(Du,Ee.Namespace.stringify("validateStringify"));function Gb(){re("metadata")}z.metadata=Gb;function sp(){re("random")}z.random=sp;Object.assign(sp,Ee.Namespace.random());function zb(){re("literals")}z.literals=zb;function op(){re("clone")}z.clone=op;Object.assign(op,Ee.Namespace.clone("clone"));function Ou(){re("assertClone")}z.assertClone=Ou;Object.assign(Ou,Ee.Namespace.assert("assertClone"));Object.assign(Ou,Ee.Namespace.clone("assertClone"));function Bu(){re("isClone")}z.isClone=Bu;Object.assign(Bu,Ee.Namespace.is());Object.assign(Bu,Ee.Namespace.clone("isClone"));function Fu(){re("validateClone")}z.validateClone=Fu;Object.assign(Fu,Ee.Namespace.validate());Object.assign(Fu,Ee.Namespace.clone("validateClone"));function up(){re("prune")}z.prune=up;Object.assign(up,Ee.Namespace.prune("prune"));function Lu(){re("assertPrune")}z.assertPrune=Lu;Object.assign(Lu,Ee.Namespace.assert("assertPrune"));Object.assign(Lu,Ee.Namespace.prune("assertPrune"));function Uu(){re("isPrune")}z.isPrune=Uu;Object.assign(Uu,Ee.Namespace.is());Object.assign(Uu,Ee.Namespace.prune("isPrune"));function Vu(){re("validatePrune")}z.validatePrune=Vu;Object.assign(Vu,Ee.Namespace.prune("validatePrune"));Object.assign(Vu,Ee.Namespace.validate());function Qm(){re("createAssert")}z.createAssert=Qm;Object.assign(Qm,Xl);function Xm(){re("createAssertType")}z.createAssertType=Xm;Object.assign(Xm,Yl);function Ym(){re("createIs")}z.createIs=Ym;Object.assign(Ym,Su);function Zm(){re("createValidate")}z.createValidate=Zm;Object.assign(Zm,Ru);function e6(){re("createAssertEquals")}z.createAssertEquals=e6;Object.assign(e6,Zl);function t6(){re("createEquals")}z.createEquals=t6;Object.assign(t6,ep);function n6(){re("createValidateEquals")}z.createValidateEquals=n6;Object.assign(n6,tp);function a6(){re("createIsParse")}z.createIsParse=a6;Object.assign(a6,ap);function i6(){re("createAssertParse")}z.createAssertParse=i6;Object.assign(i6,np);function r6(){re("createValidateParse")}z.createValidateParse=r6;Object.assign(r6,ip);function s6(){re("createStringify")}z.createStringify=s6;Object.assign(s6,rp);function o6(){re("createAssertStringify")}z.createAssertStringify=o6;Object.assign(o6,Pu);function u6(){re("createIsStringify")}z.createIsStringify=u6;Object.assign(u6,Nu);function d6(){re("createValidateStringify")}z.createValidateStringify=d6;Object.assign(d6,Du);function l6(){re("createRandom")}z.createRandom=l6;Object.assign(l6,sp);function p6(){re("createClone")}z.createClone=p6;Object.assign(p6,op);function y6(){re("createAssertClone")}z.createAssertClone=y6;Object.assign(y6,Ou);function f6(){re("createIsClone")}z.createIsClone=f6;Object.assign(f6,Bu);function c6(){re("createValidateClone")}z.createValidateClone=c6;Object.assign(c6,Fu);function m6(){re("createPrune")}z.createPrune=m6;Object.assign(m6,up);function h6(){re("createAssertPrune")}z.createAssertPrune=h6;Object.assign(h6,Lu);function x6(){re("createIsPrune")}z.createIsPrune=x6;Object.assign(x6,Uu);function b6(){re("createValidatePrune")}z.createValidatePrune=b6;Object.assign(b6,Vu);function re(n){throw new Error("Error on typia.".concat(n,'(): no transform has been configured. Run "npx typia setup" command.'))}});var T6=ne(gn=>{"use strict";var g6=gn&&gn.__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]}),Kb=gn&&gn.__setModuleDefault||(Object.create?function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}:function(n,e){n.default=e}),Wb=gn&&gn.__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)&&g6(e,n,t);return Kb(e,n),e},Jb=gn&&gn.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&g6(e,n,t)};Object.defineProperty(gn,"__esModule",{value:!0});var $b=Wb(dp());gn.default=$b;Jb(dp(),gn)});var Pl={};ji(Pl,{BaseContract:()=>lr,BigNumber:()=>F,Contract:()=>oe,ContractFactory:()=>ci,FixedNumber:()=>ft,Signer:()=>St,VoidSigner:()=>ua,Wallet:()=>Cn,Wordlist:()=>hn,constants:()=>ht,errors:()=>Kt,getDefaultProvider:()=>tu,logger:()=>kc,providers:()=>ea,utils:()=>ae,version:()=>au,wordlists:()=>hi});var Zp=wn(sd());var Hp="logger/5.7.0";var qp=!1,Gp=!1,zs={debug:1,default:2,info:2,warning:3,error:4,off:5},zp=zs.default,od=null;function F6(){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 Kp=F6(),ud;(function(n){n.DEBUG="DEBUG",n.INFO="INFO",n.WARNING="WARNING",n.ERROR="ERROR",n.OFF="OFF"})(ud||(ud={}));var Kt;(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"})(Kt||(Kt={}));var Wp="0123456789abcdef",M=class{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){let a=e.toLowerCase();zs[a]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(zp>zs[a])&&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,a){if(Gp)return this.makeError("censored error",t,{});t||(t=M.errors.UNKNOWN_ERROR),a||(a={});let i=[];Object.keys(a).forEach(l=>{let p=a[l];try{if(p instanceof Uint8Array){let f="";for(let x=0;x>4],f+=Wp[p[x]&15];i.push(l+"=Uint8Array(0x"+f+")")}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 Kt.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 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+" ]"),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,M.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"),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,a){a?a=": "+a:a="",et&&this.throwError("too many arguments"+a,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 od||(od=new M(Hp)),od}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",M.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),qp){if(!e)return;this.globalLogger().throwError("error censorship permanent",M.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}Gp=!!e,qp=!!t}static setLogLevel(e){let t=zs[e.toLowerCase()];if(t==null){M.globalLogger().warn("invalid log level - "+e);return}zp=t}static from(e){return new M(e)}};M.errors=Kt;M.levels=ud;var Jp="bytes/5.7.0";var wt=new M(Jp);function Qp(n){return!!n.toHexString}function Hi(n){return n.slice||(n.slice=function(){let e=Array.prototype.slice.call(arguments);return Hi(new Uint8Array(Array.prototype.slice.apply(n,e)))}),n}function aa(n){return ie(n)&&!(n.length%2)||on(n)}function $p(n){return typeof n=="number"&&n==n&&n%1===0}function on(n){if(n==null)return!1;if(n.constructor===Uint8Array)return!0;if(typeof n=="string"||!$p(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"){wt.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),Hi(new Uint8Array(t))}if(e.allowMissingPrefix&&typeof n=="string"&&n.substring(0,2)!=="0x"&&(n="0x"+n),Qp(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":wt.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),Hi(a)}function Zt(n){let e=j(n);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(n,e-n.length),Hi(t)}function ie(n,e){return!(typeof n!="string"||!n.match(/^0x[0-9A-Fa-f]*$/)||e&&n.length!==2+2*e)}var dd="0123456789abcdef";function K(n,e){if(e||(e={}),typeof n=="number"){wt.checkSafeUint53(n,"invalid hexlify value");let t="";for(;n;)t=dd[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),Qp(n))return n.toHexString();if(ie(n))return n.length%2&&(e.hexPad==="left"?n="0x0"+n.substring(2):e.hexPad==="right"?n+="0":wt.throwArgumentError("hex data is odd-length","value",n)),n.toLowerCase();if(on(n)){let t="0x";for(let a=0;a>4]+dd[i&15]}return t}return wt.throwArgumentError("invalid hexlify value","value",n)}function Nt(n){if(typeof n!="string")n=K(n);else if(!ie(n)||n.length%2)return null;return(n.length-2)/2}function Ce(n,e,t){return typeof n!="string"?n=K(n):(!ie(n)||n.length%2)&&wt.throwArgumentError("invalid hexData","value",n),e=2+2*e,t!=null?"0x"+n.substring(e,2+2*t):"0x"+n.substring(e)}function _t(n){let e="0x";return n.forEach(t=>{e+=K(t).substring(2)}),e}function Ln(n){let e=ld(K(n,{hexPad:"left"}));return e==="0x"?"0x0":e}function ld(n){typeof n!="string"&&(n=K(n)),ie(n)||wt.throwArgumentError("invalid hex string","value",n),n=n.substring(2);let e=0;for(;e2*e+2&&wt.throwArgumentError("value out of range","value",arguments[1]);n.length<2*e+2;)n="0x0"+n.substring(2);return n}function Un(n){let e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(aa(n)){let t=j(n);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]):wt.throwArgumentError("invalid signature string","signature",n),e.v<27&&(e.v===0||e.v===1?e.v+=27:wt.throwArgumentError("signature invalid v byte","signature",n)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(t[32]|=128),e._vs=K(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=ii(j(e._vs),32);e._vs=K(i);let r=i[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=r:e.recoveryParam!==r&&wt.throwArgumentError("signature recoveryParam mismatch _vs","signature",n),i[0]&=127;let s=K(i);e.s==null?e.s=s:e.s!==s&&wt.throwArgumentError("signature v mismatch _vs","signature",n)}if(e.recoveryParam==null)e.v==null?wt.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&&wt.throwArgumentError("signature recoveryParam mismatch v","signature",n)}e.r==null||!ie(e.r)?wt.throwArgumentError("signature missing or invalid r","signature",n):e.r=me(e.r,32),e.s==null||!ie(e.s)?wt.throwArgumentError("signature missing or invalid s","signature",n):e.s=me(e.s,32);let t=j(e.s);t[0]>=128&&wt.throwArgumentError("signature s out of range","signature",n),e.recoveryParam&&(t[0]|=128);let a=K(t);e._vs&&(ie(e._vs)||wt.throwArgumentError("signature invalid _vs","signature",n),e._vs=me(e._vs,32)),e._vs==null?e._vs=a:e._vs!==a&&wt.throwArgumentError("signature _vs mismatch v and s","signature",n)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}function Br(n){return n=Un(n),K(ye([n.r,n.s,n.recoveryParam?"0x1c":"0x1b"]))}var Ks="bignumber/5.7.0";var Fr=Zp.default.BN,ia=new M(Ks),pd={},Xp=9007199254740991;function ey(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"||on(n))}var Yp=!1,F=class{constructor(e,t){e!==pd&&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 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 ia.throwError("this platform does not support BigInt",M.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?Yp||(Yp=!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(pd,Lr(e)):e.match(/^-?[0-9]+$/)?new F(pd,Lr(new Fr(e))):ia.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&un("underflow","BigNumber.from",e),(e>=Xp||e<=-Xp)&&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 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 ia.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}};function Lr(n){if(typeof n!="string")return Lr(n.toString(16));if(n[0]==="-")return n=n.substring(1),n[0]==="-"&&ia.throwArgumentError("invalid hex","value",n),n=Lr(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 Wt(n){return F.from(Lr(n))}function be(n){let e=F.from(n).toHexString();return e[0]==="-"?new Fr("-"+e.substring(3),16):new Fr(e.substring(2),16)}function un(n,e,t){let a={fault:n,operation:e};return t!=null&&(a.value=t),ia.throwError(n,M.errors.NUMERIC_FAULT,a)}function yd(n){return new Fr(n,36).toString(16)}function fd(n){return new Fr(n,16).toString(36)}var jt=new M(Ks),Ur={},ny=F.from(0),ay=F.from(-1);function iy(n,e,t,a){let i={fault:e,operation:t};return a!==void 0&&(i.value=a),jt.throwError(n,M.errors.NUMERIC_FAULT,i)}var Vr="0";for(;Vr.length<256;)Vr+=Vr;function cd(n){if(typeof n!="number")try{n=F.from(n).toNumber()}catch{}return typeof n=="number"&&n>=0&&n<=256&&!(n%1)?"1"+Vr.substring(0,n):jt.throwArgumentError("invalid decimal size","decimals",n)}function qi(n,e){e==null&&(e=0);let t=cd(e);n=F.from(n);let a=n.lt(ny);a&&(n=n.mul(ay));let i=n.mod(t).toString();for(;i.length2&&jt.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&&iy("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),a=r("width","number",a),i=r("decimals","number",i)}return a%8&&jt.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",a),i>80&&jt.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new ra(Ur,t,a,i)}},ft=class{constructor(e,t,a,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=a,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),a=dn(e._value,e.format.decimals);return ft.fromValue(t.add(a),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),a=dn(e._value,e.format.decimals);return ft.fromValue(t.sub(a),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),a=dn(e._value,e.format.decimals);return ft.fromValue(t.mul(a).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);let t=dn(this._value,this.format.decimals),a=dn(e._value,e.format.decimals);return ft.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=ft.from(e[0],this.format),a=!e[1].match(/^(0*)$/);return this.isNegative()&&a&&(t=t.subUnsafe(ty.toFormat(t.format))),t}ceiling(){let e=this.toString().split(".");e.length===1&&e.push("0");let t=ft.from(e[0],this.format),a=!e[1].match(/^(0*)$/);return!this.isNegative()&&a&&(t=t.addUnsafe(ty.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 a=ft.from("1"+Vr.substring(0,e),this.format),i=L6.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&&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,a){return a==null&&t!=null&&!ey(t)&&(a=t,t=null),t==null&&(t=0),a==null&&(a="fixed"),ft.fromString(qi(e,t),ra.from(a))}static fromString(e,t){t==null&&(t="fixed");let a=ra.from(t),i=dn(e,a.decimals);!a.signed&&i.lt(ny)&&iy("unsigned value cannot be negative","overflow","value",e);let r=null;a.signed?r=i.toTwos(a.width).toHexString():(r=i.toHexString(),r=me(r,a.width/8));let s=qi(i,a.decimals);return new ft(Ur,r,s,a)}static fromBytes(e,t){t==null&&(t="fixed");let a=ra.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 ft(Ur,r,s,a)}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(a){if(a.code!==M.errors.INVALID_ARGUMENT)throw a}return jt.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}},ty=ft.from(1),L6=ft.from("0.5");var ry="properties/5.7.0";var U6=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Ws=new M(ry);function B(n,e,t){Object.defineProperty(n,e,{enumerable:!0,value:t,writable:!1})}function mt(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 Ie(n){return U6(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 Gi(n,e){(!n||typeof n!="object")&&Ws.throwArgumentError("invalid object","object",n),Object.keys(n).forEach(t=>{e[t]||Ws.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 V6={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function sy(n){if(n==null||V6[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;tct(e)));if(typeof n=="object"){let e={};for(let t in n){let a=n[t];a!==void 0&&B(e,t,ct(a))}return e}return Ws.throwArgumentError(`Cannot deepCopy ${typeof n}`,"object",n)}function ct(n){return j6(n)}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={},oy={calldata:!0,memory:!0,storage:!0},H6={calldata:!0,memory:!0};function Js(n,e){if(n==="bytes"||n==="string"){if(oy[e])return!0}else if(n==="address"){if(e==="payable")return!0}else if((n.indexOf("[")>=0||n==="tuple")&&H6[e])return!0;return(oy[e]||e==="payable")&&Te.throwArgumentError("invalid modifier","name",e),!1}function q6(n,e){let t=n;function a(o){Te.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!==ge.sighash&&(t+=this.type),t+="("+this.components.map(a=>a.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:zi(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(pt.fromObject):null})}static fromString(e,t){function a(i){return pt.fromObject({name:i.name,type:i.type,indexed:i.indexed,components:i.components})}return a(q6(e,!!t))}static isParamType(e){return!!(e!=null&&e._isParamType)}};function jr(n,e){return K6(n).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(a=>JSON.parse(a.format(e)))});let t="";return e!==ge.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map(a=>a.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(ri,t)}static fromString(e){let t=e.match(qr);t||Te.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:Te.warn("unknown modifier: "+i)}}),Ht.fromObject({name:t[1].trim(),anonymous:a,inputs:jr(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}};function dy(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 ly(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 py(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 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(a=>JSON.parse(a.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(a=>a.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=py(e);t.constant&&Te.throwArgumentError("constructor cannot be constant","value",e);let a={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,a)}static fromString(e){let t={type:"constructor"};e=dy(e,t);let a=e.match(qr);return(!a||a[1].trim()!=="constructor")&&Te.throwArgumentError("invalid constructor string","value",e),t.inputs=jr(a[2].trim(),!1),ly(a[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(a=>JSON.parse(a.format(e))),outputs:this.outputs.map(a=>JSON.parse(a.format(e)))});let t="";return e!==ge.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map(a=>a.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(a=>a.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=py(e),a={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 Ot(ri,a)}static fromString(e){let t={type:"function"};e=dy(e,t);let a=e.split(" returns ");a.length>2&&Te.throwArgumentError("invalid function string","value",e);let i=a[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),ly(i[3].trim(),t),a.length>1){let r=a[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 Ot.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}};function uy(n){let e=n.format();return(e==="Error(string)"||e==="Panic(uint256)")&&Te.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",n),n}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(a=>JSON.parse(a.format(e)))});let t="";return e!==ge.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map(a=>a.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 uy(new tn(ri,t))}static fromString(e){let t={type:"error"},a=e.match(qr);return a||Te.throwArgumentError("invalid error signature","value",e),t.name=a[1].trim(),t.name&&Hr(t.name),t.inputs=jr(a[2],!1),uy(tn.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}};function zi(n){return n.match(/^uint($|[^1-9])/)?n="uint256"+n.substring(4):n.match(/^int($|[^1-9])/)&&(n="int256"+n.substring(3)),n}var z6=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function Hr(n){return(!n||!n.match(z6))&&Te.throwArgumentError(`invalid identifier "${n}"`,"value",n),n}var qr=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function K6(n){n=n.trim();let e=[],t="",a=0;for(let i=0;ithis.wordSize&&md.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,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 K(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):oi.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:md.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 a=this._peekBytes(0,e,!!t);return this._offset+=a.length,a.slice(0,e)}readValue(){return F.from(this.readBytes(this.wordSize))}};var fy=wn(yy());function fe(n){return"0x"+fy.default.keccak_256(j(n))}var Xs={};ji(Xs,{decode:()=>Gr,encode:()=>sa});var cy="rlp/5.7.0";var jn=new M(cy);function my(n){let e=[];for(;n;)e.unshift(n&255),n>>=8;return e}function hy(n,e,t){let a=0;for(let i=0;ie+1+a&&jn.throwError("child data too short",M.errors.BUFFER_OVERRUN,{})}return{consumed:1+a,result:i}}function gy(n,e){if(n.length===0&&jn.throwError("data too short",M.errors.BUFFER_OVERRUN,{}),n[e]>=248){let t=n[e]-247;e+1+t>n.length&&jn.throwError("data short segment too short",M.errors.BUFFER_OVERRUN,{});let a=hy(n,e+1,t);return e+1+t+a>n.length&&jn.throwError("data long segment too short",M.errors.BUFFER_OVERRUN,{}),xy(n,e,e+1+t,t+a)}else if(n[e]>=192){let t=n[e]-192;return e+1+t>n.length&&jn.throwError("data array too short",M.errors.BUFFER_OVERRUN,{}),xy(n,e,e+1,t)}else if(n[e]>=184){let t=n[e]-183;e+1+t>n.length&&jn.throwError("data array too short",M.errors.BUFFER_OVERRUN,{});let a=hy(n,e+1,t);e+1+t+a>n.length&&jn.throwError("data array too short",M.errors.BUFFER_OVERRUN,{});let i=K(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&&jn.throwError("data too short",M.errors.BUFFER_OVERRUN,{});let a=K(n.slice(e+1,e+1+t));return{consumed:1+t,result:a}}return{consumed:1,result:K(n[e])}}function Gr(n){let e=j(n),t=gy(e,0);return t.consumed!==e.length&&jn.throwArgumentError("invalid rlp data","data",n),t.result}var Ty="address/5.7.0";var Ma=new M(Ty);function vy(n){ie(n,20)||Ma.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 W6=9007199254740991;function J6(n){return Math.log10?Math.log10(n):Math.log(n)/Math.LN10}var hd={};for(let n=0;n<10;n++)hd[String(n)]=String(n);for(let n=0;n<26;n++)hd[String.fromCharCode(65+n)]=String(10+n);var wy=Math.floor(J6(W6));function _y(n){n=n.toUpperCase(),n=n.substring(4)+n.substring(0,2)+"00";let e=n.split("").map(a=>hd[a]).join("");for(;e.length>=wy;){let a=e.substring(0,wy);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 ce(n){let e=null;if(typeof n!="string"&&Ma.throwArgumentError("invalid address","address",n),n.match(/^(0x)?[0-9a-fA-F]{40}$/))n.substring(0,2)!=="0x"&&(n="0x"+n),e=vy(n),n.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==n&&Ma.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)!==_y(n)&&Ma.throwArgumentError("bad icap checksum","address",n),e=yd(n.substring(4));e.length<40;)e="0"+e;e=vy("0x"+e)}else Ma.throwArgumentError("invalid address","address",n);return e}function ky(n){try{return ce(n),!0}catch{}return!1}function Ay(n){let e=fd(ce(n).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+_y("XE00"+e)+e}function ui(n){let e=null;try{e=ce(n.from)}catch{Ma.throwArgumentError("missing from address","transaction",n)}let t=Zt(j(F.from(n.nonce).toHexString()));return ce(Ce(fe(sa([e,t])),12))}function My(n,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(Ce(fe(ye(["0xff",ce(n),e,t])),12))}var Ys=class extends kt{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=ce(t)}catch(a){this._throwError(a.message,t)}return e.writeValue(t)}decode(e){return ce(me(e.readValue().toHexString(),20))}};var Zs=class extends kt{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 Wi=new M(Vn);function xd(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 f=p.localName;return f||Wi.throwError("cannot encode object for signature with missing names",M.errors.INVALID_ARGUMENT,{argument:"values",coder:p,value:t}),l[f]&&Wi.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 Wi.throwArgumentError("invalid tuple value","tuple",t);e.length!==a.length&&Wi.throwArgumentError("types/value length mismatch","tuple",t);let i=new si(n.wordSize),r=new si(n.wordSize),s=[];e.forEach((l,p)=>{let f=a[p];if(l.dynamic){let x=r.length;l.encode(r,f);let I=i.writeUpdatableValue();s.push(_=>{I(_+x)})}else l.encode(i,f)}),s.forEach(l=>{l(i.length)});let o=n.appendWriter(i);return o+=n.appendWriter(r),o}function bd(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===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(n)}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 kt{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&&Wi.throwError("insufficient data length",M.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let a=[];for(let i=0;iro,EtherSymbol:()=>Ry,HashZero:()=>$i,MaxInt256:()=>Sy,MaxUint256:()=>uo,MinInt256:()=>Iy,NegativeOne:()=>so,One:()=>oo,Two:()=>Ey,WeiPerEther:()=>Cy,Zero:()=>Ji});var ro="0x0000000000000000000000000000000000000000";var so=F.from(-1),Ji=F.from(0),oo=F.from(1),Ey=F.from(2),Cy=F.from("1000000000000000000"),uo=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),Iy=F.from("-0x8000000000000000000000000000000000000000000000000000000000000000"),Sy=F.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");var $i="0x0000000000000000000000000000000000000000000000000000000000000000";var Ry="\u039E";var lo=class extends kt{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=uo.mask(e.wordSize*8);if(this.signed){let r=i.mask(this.size*8-1);(a.gt(r)||a.lt(r.add(oo).mul(so)))&&this._throwError("value out-of-bounds",t)}else(a.lt(Ji)||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 Py="strings/5.7.0";var Ny=new M(Py),Gt;(function(n){n.current="",n.NFC="NFC",n.NFD="NFD",n.NFKC="NFKC",n.NFKD="NFKD"})(Gt||(Gt={}));var Bt;(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"})(Bt||(Bt={}));function $6(n,e,t,a,i){return Ny.throwArgumentError(`invalid codepoint at offset ${e}; ${n}`,"bytes",t)}function Dy(n,e,t,a,i){if(n===Bt.BAD_PREFIX||n===Bt.UNEXPECTED_CONTINUE){let r=0;for(let s=e+1;s>6===2;s++)r++;return r}return n===Bt.OVERRUN?t.length-e-1:0}function Q6(n,e,t,a,i){return n===Bt.OVERLONG?(a.push(i),0):(a.push(65533),Dy(n,e,t,a,i))}var po=Object.freeze({error:$6,ignore:Dy,replace:Q6});function Td(n,e){e==null&&(e=po.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(Bt.UNEXPECTED_CONTINUE,a-1,n,t):a+=e(Bt.BAD_PREFIX,a-1,n,t);continue}if(a-1+r>=n.length){a+=e(Bt.OVERRUN,a-1,n,t);continue}let o=i&(1<<8-r-1)-1;for(let l=0;l1114111){a+=e(Bt.OUT_OF_RANGE,a-1-r,n,t,o);continue}if(o>=55296&&o<=57343){a+=e(Bt.UTF16_SURROGATE,a-1-r,n,t,o);continue}if(o<=s){a+=e(Bt.OVERLONG,a-1-r,n,t,o);continue}t.push(o)}}return t}function ve(n,e=Gt.current){e!=Gt.current&&(Ny.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 gd(n){let e="0000"+n.toString(16);return"\\u"+e.substring(e.length-4)}function vd(n,e){return'"'+Td(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?gd(t):(t-=65536,gd((t>>10&1023)+55296)+gd((t&1023)+56320))}).join("")+'"'}function yo(n){return n.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function Jt(n,e){return yo(Td(n,e))}function Ea(n,e=Gt.current){return Td(ve(n,e))}function wd(n){let e=ve(n);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return K(ye([e,$i]).slice(0,32))}function _d(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 Jt(e.slice(0,t))}function X6(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 Oy(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 Ad(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 Y6=Oy("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"),Z6="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(n=>parseInt(n,16)),e2=[{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}],t2=kd("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"),n2=kd("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"),a2=kd("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),i2=Oy("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 r2(n){return n.reduce((e,t)=>(t.forEach(a=>{e.push(a)}),e),[])}function s2(n){return!!Ad(n,Y6)}function o2(n){let e=Ad(n,e2);if(e)return[n+e.s];let t=t2[n];if(t)return t;let a=n2[n];if(a)return[n+a[0]];let i=a2[n];return i||null}function u2(n){return!!Ad(n,i2)}function Md(n){if(n.match(/^[a-z0-9-]*$/i)&&n.length<=59)return n.toLowerCase();let e=Ea(n);e=r2(e.map(a=>{if(Z6.indexOf(a)>=0)return[];if(a>=65024&&a<=65039)return[];let i=o2(a);return i||[a]})),e=Ea(yo(e),Gt.NFKC),e.forEach(a=>{if(u2(a))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(a=>{if(s2(a))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 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 di=class extends kt{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 xd(e,this.coders,t)}decode(e){return e.coerce(this.name,bd(e,this.coders))}};var co=new M(Vn),d2=new RegExp(/^bytes([0-9]*)$/),l2=new RegExp(/^(u?int)([0-9]*)$/),Qi=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(a=>this._getCoder(a)),e.name);case"":return new io(e.name)}let t=e.type.match(l2);if(t){let a=parseInt(t[2]||"256");return(a===0||a>256||a%8!==0)&&co.throwArgumentError("invalid "+t[1]+" bit length","param",e),new lo(a/8,t[1]==="int",e.name)}if(t=e.type.match(d2),t){let a=parseInt(t[1]);return(a===0||a>32)&&co.throwArgumentError("invalid bytes length","param",e),new ao(a,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 a=e.map(s=>this._getCoder(pt.from(s))),i=new di(a,"_"),r=this._getWriter();return i.encode(r,t),r.data}decode(e,t,a){let i=e.map(s=>this._getCoder(pt.from(s)));return new di(i,"_").decode(this._getReader(j(t),a))}},Kr=new Qi;function nn(n){return fe(ve(n))}var mo="hash/5.7.0";var Ed={};ji(Ed,{decode:()=>Xi,encode:()=>Yi});function Xi(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 p2(n){let e={};for(let t=0;t>--l&1}let x=31,I=Math.pow(2,x),_=I>>>1,v=_>>1,S=I-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=a-4;return O.map(J=>{switch(J-E){case 3:return E+65792+(n[o++]<<16|n[o++]<<8|n[o++]);case 2:return E+256+(n[o++]<<8|n[o++]);case 1:return E+n[o++];default:return J-1}})}function f2(n){let e=0;return()=>n[e++]}function Ly(n){return f2(y2(n))}function c2(n){return n&1?~n>>1:n>>1}function m2(n,e){let t=Array(n);for(let a=0;ae[s]):t}function Uy(n){let e=[];for(;;){let t=n();if(t==0)break;e.push(b2(t,n))}for(;;){let t=n()-1;if(t<0)break;e.push(g2(t,n))}return p2(Fy(e))}function x2(n){let e=[];for(;;){let t=n();if(t==0)break;e.push(t)}return e}function Vy(n,e,t){let a=Array(n).fill(void 0).map(()=>[]);for(let i=0;ia[s].push(r));return a}function b2(n,e){let t=1+e(),a=e(),i=x2(e),r=Vy(i.length,1+n,e);return Fy(r.map((s,o)=>{let l=s[0],p=s.slice(1);return Array(i[o]).fill(void 0).map((f,x)=>{let I=x*a;return[l+x*t,p.map(_=>_+I)]})}))}function g2(n,e){let t=1+e();return Vy(t,1+n,e).map(i=>[i[0],i.slice(1)])}function jy(n){let e=Wr(n).sort((a,i)=>a-i);return t();function t(){let a=[];for(;;){let p=Wr(n,e);if(p.length==0)break;a.push({set:new Set(p),node:t()})}a.sort((p,f)=>f.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 Hy(){return Ly(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 ho=Hy(),T2=new Set(Wr(ho)),v2=new Set(Wr(ho)),w2=Uy(ho),_2=jy(ho),qy=45,Gy=95;function zy(n){return Ea(n)}function k2(n){return n.filter(e=>e!=65039)}function Ky(n){for(let e of n.split(".")){let t=zy(e);try{for(let a=t.lastIndexOf(Gy)-1;a>=0;a--)if(t[a]!==Gy)throw new Error("underscore only allowed at start");if(t.length>=4&&t.every(a=>a<128)&&t[2]===qy&&t[3]===qy)throw new Error("invalid label extension")}catch(a){throw new Error(`Invalid label "${e}": ${a.message}`)}}return n}function Wy(n){return Ky(A2(n,k2))}function A2(n,e){let t=zy(n).reverse(),a=[];for(;t.length;){let i=E2(t);if(i){a.push(...e(i));continue}let r=t.pop();if(T2.has(r)){a.push(r);continue}if(v2.has(r))continue;let s=w2[r];if(s){a.push(...s);continue}throw new Error(`Disallowed codepoint: 0x${r.toString(16).toUpperCase()}`)}return Ky(M2(String.fromCodePoint(...a)))}function M2(n){return n.normalize("NFC")}function E2(n,e){var t;let a=_2,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 C2=new M(mo),$y=new Uint8Array(32);$y.fill(0);function Jy(n){if(n.length===0)throw new Error("invalid ENS name; empty component");return n}function Cd(n){let e=ve(Wy(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(Jy(e.slice(a))),t}function Id(n){try{return Cd(n).length!==0}catch{}return!1}function Ca(n){typeof n!="string"&&C2.throwArgumentError("invalid ENS name; not a string","name",n);let e=$y,t=Cd(n);for(;t.length;)e=fe(ye([e,fe(t.pop())]));return K(e)}function Jr(n){return K(ye(Cd(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 Qy=`Ethereum Signed Message: +`;function Zi(n){return typeof n=="string"&&(n=ve(n)),fe(ye([ve(Qy),ve(String(n.length)),n]))}var I2=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},xt=new M(mo),e0=new Uint8Array(32);e0.fill(0);var S2=F.from(-1),t0=F.from(0),n0=F.from(1),R2=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function P2(n){let e=j(n),t=e.length%32;return t?_t([e,e0.slice(t)]):K(e)}var N2=me(n0.toHexString(),32),D2=me(t0.toHexString(),32),Xy={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Sd=["name","version","chainId","verifyingContract","salt"];function Yy(n){return function(e){return typeof e!="string"&&xt.throwArgumentError(`invalid domain value for ${JSON.stringify(n)}`,`domain.${n}`,e),e}}var O2={name:Yy("name"),version:Yy("version"),chainId:function(n){try{return F.from(n).toString()}catch{}return xt.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",n)},verifyingContract:function(n){try{return ce(n).toLowerCase()}catch{}return xt.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 K(e)}catch{}return xt.throwArgumentError('invalid domain value "salt"',"domain.salt",n)}};function Rd(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))&&xt.throwArgumentError("invalid numeric width","type",n);let i=R2.mask(t?a-1:a),r=t?i.add(n0).mul(S2):t0;return function(s){let o=F.from(s);return(o.lt(r)||o.gt(i))&&xt.throwArgumentError(`value out-of-bounds for ${n}`,"value",s),me(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))&&xt.throwArgumentError("invalid bytes width","type",n),function(a){return j(a).length!==t&&xt.throwArgumentError(`invalid length for ${n}`,"value",a),P2(a)}}}switch(n){case"address":return function(e){return me(ce(e),32)};case"bool":return function(e){return e?N2:D2};case"bytes":return function(e){return fe(e)};case"string":return function(e){return nn(e)}}return null}function Zy(n,e){return`${n}(${e.map(({name:t,type:a})=>a+" "+t).join(",")})`}var bt=class{constructor(e){B(this,"types",Object.freeze(ct(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]&&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),!Rd(f)&&(a[f]||xt.throwArgumentError(`unknown type ${JSON.stringify(f)}`,"types",e),a[f].push(o),t[o][f]=!0)})}let r=Object.keys(a).filter(o=>a[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=>{!a[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]=Zy(o,e[o])+l.map(p=>Zy(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=Rd(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(_t(l))}}let a=this.types[e];if(a){let i=nn(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),_t(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,a){if(Rd(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&&xt.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),{}):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,a){return bt.from(t).hashStruct(e,a)}static hashDomain(e){let t=[];for(let a in e){let i=Xy[a];i||xt.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(a)}`,"domain",e),t.push({name:a,type:i})}return t.sort((a,i)=>Sd.indexOf(a.name)-Sd.indexOf(i.name)),bt.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,a){return _t(["0x1901",bt.hashDomain(e),bt.from(t).hash(a)])}static hash(e,t,a){return fe(bt.encode(e,t,a))}static resolveNames(e,t,a,i){return I2(this,void 0,void 0,function*(){e=we(e);let r={};e.verifyingContract&&!ie(e.verifyingContract,20)&&(r[e.verifyingContract]="0x");let s=bt.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){bt.hashDomain(e);let i={},r=[];Sd.forEach(l=>{let p=e[l];p!=null&&(i[l]=O2[l](p),r.push({name:l,type:Xy[l]}))});let s=bt.from(t),o=we(t);return o.EIP712Domain?xt.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 K(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 er=class extends en{},tr=class extends en{},Pd=class extends en{},oa=class extends en{static isIndexed(e){return!!(e&&e._isIndexed)}},B2={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function a0(n,e){let t=new Error(`deferred error during ABI decoding triggered accessing ${n}`);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(a=>qt.from(a)).filter(a=>a!=null)),B(this,"_abiCoder",mt(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){gt.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]){gt.warn("duplicate definition - "+r);return}i[r]=a}),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(a=>a.format(e));return e===ge.json?JSON.stringify(t.map(a=>JSON.parse(a))):t}static getAbiCoder(){return Kr}static getAddress(e){return ce(e)}static getSighash(e){return Ce(nn(e.format()),0,4)}static getEventTopic(e){return nn(e.format())}getFunction(e){if(ie(e)){for(let a in this.functions)if(e===this.getSighash(a))return this.functions[a];gt.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?gt.throwArgumentError("no matching function","name",a):i.length>1&>.throwArgumentError("multiple matching functions","name",a),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 a=e.toLowerCase();for(let i in this.events)if(a===this.getEventTopic(i))return this.events[i];gt.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?gt.throwArgumentError("no matching event","name",a):i.length>1&>.throwArgumentError("multiple matching events","name",a),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 a=mt(this.constructor,"getSighash");for(let i in this.errors){let r=this.errors[i];if(e===a(r))return this.errors[i]}gt.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?gt.throwArgumentError("no matching error","name",a):i.length>1&>.throwArgumentError("multiple matching errors","name",a),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 a=j(t);return K(a.slice(0,4))!==this.getSighash(e)&>.throwArgumentError(`data signature does not match error ${e.name}.`,"data",K(a)),this._decodeParams(e.inputs,a.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 a=j(t);return K(a.slice(0,4))!==this.getSighash(e)&>.throwArgumentError(`data signature does not match function ${e.name}.`,"data",K(a)),this._decodeParams(e.inputs,a.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 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=K(a.slice(0,4)),f=B2[p];if(f)s=this._abiCoder.decode(f.inputs,a.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,a.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:K(t),errorArgs:s,errorName:o,errorSignature:l,reason:i})}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&>.throwError("too many arguments for "+e.format(),M.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});let a=[];e.anonymous||a.push(this.getEventTopic(e));let i=(r,s)=>r.type==="string"?nn(s):r.type==="bytes"?fe(K(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(K(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?a.push(null):o.baseType==="array"||o.baseType==="tuple"?gt.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&>.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(nn(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 I=this.getEventTopic(e);(!ie(a[0],32)||a[0].toLowerCase()!==I)&>.throwError("fragment/topic mismatch",M.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:I,value:a[0]}),a=a.slice(1)}let i=[],r=[],s=[];e.inputs.forEach((I,_)=>{I.indexed?I.type==="string"||I.type==="bytes"||I.baseType==="tuple"||I.baseType==="array"?(i.push(pt.fromObject({type:"bytes32",name:I.name})),s.push(!0)):(i.push(I),s.push(!1)):(r.push(I),s.push(!1))});let o=a!=null?this._abiCoder.decode(i,ye(a)):null,l=this._abiCoder.decode(r,t,!0),p=[],f=0,x=0;e.inputs.forEach((I,_)=>{if(I.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(I.name&&p[I.name]==null){let v=p[_];v instanceof Error?Object.defineProperty(p,I.name,{enumerable:!0,get:()=>{throw a0(`property ${JSON.stringify(I.name)}`,v)}}):p[I.name]=v}});for(let I=0;I{throw a0(`index ${I}`,_)}})}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=K(e),a=this.getError(t.substring(0,10).toLowerCase());return a?new Pd({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 i0="abstract-provider/5.7.0";var F2=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},L2=new M(i0),xo=class extends en{static isForkEvent(e){return!!(e&&e._isForkEvent)}};var $t=class{constructor(){L2.checkAbstract(new.target,$t),B(this,"_isProvider",!0)}getFeeData(){return F2(this,void 0,void 0,function*(){let{block:e,gasPrice:t}=yield Ie({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 r0="abstract-signer/5.7.0";var _n=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},ln=new M(r0),U2=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],V2=[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 _n(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return _n(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return _n(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 _n(this,void 0,void 0,function*(){this._checkProvider("call");let a=yield Ie(this.checkTransaction(e));return yield this.provider.call(a,t)})}sendTransaction(e){return _n(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 _n(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return _n(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return _n(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return _n(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(let a in e)U2.indexOf(a)===-1&&ln.throwArgumentError("invalid transaction key: "+a,"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(a=>(a[0].toLowerCase()!==a[1].toLowerCase()&&ln.throwArgumentError("from address mismatch","transaction",e),a[0])),t}populateTransaction(e){return _n(this,void 0,void 0,function*(){let t=yield Ie(this.checkTransaction(e));t.to!=null&&(t.to=Promise.resolve(t.to).then(i=>_n(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 a=t.maxFeePerGas!=null||t.maxPriorityFeePerGas!=null;if(t.gasPrice!=null&&(t.type===2||a)?ln.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(t.type===0||t.type===1)&&a&&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?(a&&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(V2.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 Ie(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,a){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new ua(this.address,e)}};var pe=wn(sd()),Jn=wn(Hd());function dr(n,e,t){return t={path:e,exports:{},require:function(a,i){return dx(a,i??t.path)}},n(t,t.exports),t.exports}function dx(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var Kd=q0;function q0(n,e){if(!n)throw new Error(e||"Assertion failed")}q0.equal=function(e,t,a){if(e!=t)throw new Error(a||"Assertion failed: "+e+" != "+t)};var En=dr(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,I=f&255;x?l.push(x,I):l.push(I)}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(I>>1)-1?S=(I>>1)-L:S=L,_.isubn(S)):S=0,x[v]=S,_.iushrn(1)}return x}t.getNAF=a;function i(l,p){var f=[[],[]];l=l.clone(),p=p.clone();for(var x=0,I=0,_;l.cmpn(-x)>0||p.cmpn(-I)>0;){var v=l.andln(3)+x&3,S=p.andln(3)+I&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)+I&7,(_===3||_===5)&&v===2?O=-S:O=S),f[1].push(O),2*x===L+1&&(x=1-x),2*I===O+1&&(I=1-I),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,lx=an.getJSF,_o=an.assert;function Pa(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 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 a=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),I=r;I>0;I--){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,a,i,r){var s=this._wnafT1,o=this._wnafT2,l=this._wnafT3,p=0,f,x,I;for(f=0;f=1;f-=2){var v=f-1,S=f;if(s[v]!==1||s[S]!==1){l[v]=wo(a[v],s[v],this._bitLength),l[S]=wo(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=lx(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;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?I=o[x][R-1>>1]:R<0&&(I=o[x][-R-1>>1].neg()),I.type==="affine"?J=J.mixedAdd(I):J=J.add(I))}}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 a=[this],i=this,r=0;r=0&&(_=p,v=f),x.negative&&(x=x.neg(),I=I.neg()),_.negative&&(_=_.neg(),v=v.neg()),[{a:x,b:I},{a:_,b:v}]};fn.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),f=s.mul(i.b),x=e.sub(o).sub(l),I=p.add(f).neg();return{k1:x,k2:I}};fn.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)};fn.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};fn.prototype._endoWnafMulAdd=function(e,t,a){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 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)};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,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)};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,a){var i=[this,t],r=[e,a];return this.curve.endo?this.curve._endoWnafMulAdd(i,r):this.curve._wnafMulAdd(1,i,r,2)};Et.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)};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 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};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(n,e,t,a){pi.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}Wd(Pt,pi.BasePoint);fn.prototype.jpoint=function(e,t,a){return new Pt(this,e,t,a)};Pt.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)};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(),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 f=l.redSqr(),x=f.redMul(l),I=i.redMul(f),_=p.redSqr().redIAdd(x).redISub(I).redISub(I),v=p.redMul(I.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(),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(),f=p.redMul(o),x=a.redMul(p),I=l.redSqr().redIAdd(f).redISub(x).redISub(x),_=l.redMul(x.redISub(I)).redISub(r.redMul(f)),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 a=this;for(t=0;t=0)return!1;if(a.redIAdd(r),this.x.cmp(a)===0)return!0}};Pt.prototype.inspect=function(){return this.isInfinity()?"":""};Pt.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var To=dr(function(n,e){"use strict";var t=e;t.base=pi,t.short=yx,t.mont=null,t.edwards=null}),vo=dr(function(n,e){"use strict";var t=e,a=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,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: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(n){if(!(this instanceof Ra))return new Ra(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=En.toArray(n.entropy,n.entropyEnc||"hex"),t=En.toArray(n.nonce,n.nonceEnc||"hex"),a=En.toArray(n.pers,n.persEnc||"hex");Kd(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,t,a)}var G0=Ra;Ra.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};Ra.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=En.toArray(a,i||"hex"),this._update(a));for(var r=[];r.length"};var fx=an.assert;function ko(n,e){if(n instanceof ko)return n;this._importDER(n,e)||(fx(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 Ao=ko;function cx(){this.place=0}function qd(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 H0(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)}ko.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=H0(t),a=H0(a);!a[0]&&!(a[1]&128);)a=a.slice(1);var i=[2];Gd(i,t.length),i=i.concat(t),i.push(2),Gd(i,a.length);var r=i.concat(a),s=[48];return Gd(s,r.length),s=s.concat(r),an.encode(s,e)};var mx=function(){throw new Error("unsupported")},z0=an.assert;function pn(n){if(!(this instanceof pn))return new pn(n);typeof n=="string"&&(z0(Object.prototype.hasOwnProperty.call(vo,n),"Unknown curve "+n),n=vo[n]),n instanceof vo.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 hx=pn;pn.prototype.keyPair=function(e){return new Jd(this,e)};pn.prototype.keyFromPrivate=function(e,t){return Jd.fromPrivate(this,e,t)};pn.prototype.keyFromPublic=function(e,t){return Jd.fromPublic(this,e,t)};pn.prototype.genKeyPair=function(e){e||(e={});for(var t=new G0({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||mx(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)}};pn.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};pn.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 G0({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 I=this.g.mul(x);if(!I.isInfinity()){var _=I.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=(I.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,a,i){e=this._truncateToN(new pe.default(e,16)),a=this.keyFromPublic(a,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,a.getPublic(),p),f.isInfinity()?!1:f.eqXToP(r)):(f=this.g.mulAdd(l,a.getPublic(),p),f.isInfinity()?!1:f.getX().umod(this.n).cmp(r)===0)};pn.prototype.recoverPubKey=function(n,e,t,a){z0((3&t)===t,"The recovery param is more than two bits"),e=new Ao(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 f=e.r.invm(i),x=i.sub(r).mul(f).umod(i),I=o.mul(f).umod(i);return this.g.mulAdd(x,s,I)};pn.prototype.getKeyRecoveryParam=function(n,e,t,a){if(e=new Ao(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 xx=dr(function(n,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=hx,t.eddsa=null}),K0=xx.ec;var W0="signing-key/5.7.0";var Qd=new M(W0),$d=null;function $n(){return $d||($d=new K0("secp256k1")),$d}var cn=class{constructor(e){B(this,"curve","secp256k1"),B(this,"privateKey",K(e)),Nt(this.privateKey)!==32&&Qd.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)),a=$n().keyFromPublic(j(e));return"0x"+t.pub.add(a.pub).encodeCompressed("hex")}signDigest(e){let t=$n().keyFromPrivate(j(this.privateKey)),a=j(e);a.length!==32&&Qd.throwArgumentError("bad digest length","digest",e);let i=t.sign(a,{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)),a=$n().keyFromPublic(j(Xr(e)));return me("0x"+t.derive(a.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}};function Mo(n,e){let t=Un(e),a={r:j(t.r),s:j(t.s)};return"0x"+$n().recoverPubKey(j(n),a,t.recoveryParam).encode("hex",!1)}function Xr(n,e){let t=j(n);if(t.length===32){let a=new cn(t);return e?"0x"+$n().keyFromPrivate(t).getPublic(!0,"hex"):a.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 Qd.throwArgumentError("invalid public or private key","key","[REDACTED]")}var J0="transactions/5.7.0";var Ut=new M(J0),Eo;(function(n){n[n.legacy=0]="legacy",n[n.eip2930=1]="eip2930",n[n.eip1559=2]="eip1559"})(Eo||(Eo={}));function Yd(n){return n==="0x"?null:ce(n)}function Lt(n){return n==="0x"?Ji:F.from(n)}var bx=[{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"}],gx={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function mn(n){let e=Xr(n);return ce(Ce(fe(Ce(e,1)),12))}function yi(n,e){return mn(Mo(j(n),e))}function rn(n,e){let t=Zt(F.from(n).toHexString());return t.length>32&&Ut.throwArgumentError("invalid length for "+e,"transaction:"+e,n),t}function Xd(n,e){return{address:ce(n),storageKeys:(e||[]).map((t,a)=>(Nt(t)!==32&&Ut.throwArgumentError("invalid access list storageKey",`accessList[${n}:${a}]`,t),t.toLowerCase()))}}function sn(n){if(Array.isArray(n))return n.map((t,a)=>Array.isArray(t)?(t.length>2&&Ut.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${a}]`,t),Xd(t[0],t[1])):Xd(t.address,t.storageKeys));let e=Object.keys(n).map(t=>{let a=n[t].reduce((i,r)=>(i[r]=!0,i),{});return Xd(t,Object.keys(a).sort())});return e.sort((t,a)=>t.address.localeCompare(a.address)),e}function $0(n){return sn(n).map(e=>[e.address,e.storageKeys])}function Q0(n,e){if(n.gasPrice!=null){let a=F.from(n.gasPrice),i=F.from(n.maxFeePerGas||0);a.eq(i)||Ut.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:a,maxFeePerGas:i})}let t=[rn(n.chainId||0,"chainId"),rn(n.nonce||0,"nonce"),rn(n.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),rn(n.maxFeePerGas||0,"maxFeePerGas"),rn(n.gasLimit||0,"gasLimit"),n.to!=null?ce(n.to):"0x",rn(n.value||0,"value"),n.data||"0x",$0(n.accessList||[])];if(e){let a=Un(e);t.push(rn(a.recoveryParam,"recoveryParam")),t.push(Zt(a.r)),t.push(Zt(a.s))}return _t(["0x02",sa(t)])}function X0(n,e){let t=[rn(n.chainId||0,"chainId"),rn(n.nonce||0,"nonce"),rn(n.gasPrice||0,"gasPrice"),rn(n.gasLimit||0,"gasLimit"),n.to!=null?ce(n.to):"0x",rn(n.value||0,"value"),n.data||"0x",$0(n.accessList||[])];if(e){let a=Un(e);t.push(rn(a.recoveryParam,"recoveryParam")),t.push(Zt(a.r)),t.push(Zt(a.s))}return _t(["0x01",sa(t)])}function Tx(n,e){Gi(n,gx);let t=[];bx.forEach(function(s){let o=n[s.name]||[],l={};s.numeric&&(l.hexPad="left"),o=j(K(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(K(o))});let a=0;if(n.chainId!=null?(a=n.chainId,typeof a!="number"&&Ut.throwArgumentError("invalid transaction.chainId","transaction",n)):e&&!aa(e)&&e.v>28&&(a=Math.floor((e.v-35)/2)),a!==0&&(t.push(K(a)),t.push("0x"),t.push("0x")),!e)return sa(t);let i=Un(e),r=27+i.recoveryParam;return a!==0?(t.pop(),t.pop(),t.pop(),r+=a*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(K(r)),t.push(Zt(j(i.r))),t.push(Zt(j(i.s))),sa(t)}function Yr(n,e){if(n.type==null||n.type===0)return n.accessList!=null&&Ut.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",n),Tx(n,e);switch(n.type){case 1:return X0(n,e);case 2:return Q0(n,e);default:break}return Ut.throwError(`unsupported transaction type: ${n.type}`,M.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:n.type})}function Y0(n,e,t){try{let a=Lt(e[0]).toNumber();if(a!==0&&a!==1)throw new Error("bad recid");n.v=a}catch{Ut.throwArgumentError("invalid v for transaction type: 1","v",e[0])}n.r=me(e[1],32),n.s=me(e[2],32);try{let a=fe(t(n));n.from=yi(a,{r:n.r,s:n.s,recoveryParam:n.v})}catch{}}function vx(n){let e=Gr(n.slice(1));e.length!==9&&e.length!==12&&Ut.throwArgumentError("invalid component count for transaction type: 2","payload",K(n));let t=Lt(e[2]),a=Lt(e[3]),i={type:2,chainId:Lt(e[0]).toNumber(),nonce:Lt(e[1]).toNumber(),maxPriorityFeePerGas:t,maxFeePerGas:a,gasPrice:null,gasLimit:Lt(e[4]),to:Yd(e[5]),value:Lt(e[6]),data:e[7],accessList:sn(e[8])};return e.length===9||(i.hash=fe(n),Y0(i,e.slice(9),Q0)),i}function wx(n){let e=Gr(n.slice(1));e.length!==8&&e.length!==11&&Ut.throwArgumentError("invalid component count for transaction type: 1","payload",K(n));let t={type:1,chainId:Lt(e[0]).toNumber(),nonce:Lt(e[1]).toNumber(),gasPrice:Lt(e[2]),gasLimit:Lt(e[3]),to:Yd(e[4]),value:Lt(e[5]),data:e[6],accessList:sn(e[7])};return e.length===8||(t.hash=fe(n),Y0(t,e.slice(8),X0)),t}function _x(n){let e=Gr(n);e.length!==9&&e.length!==6&&Ut.throwArgumentError("invalid raw transaction","rawTransaction",n);let t={nonce:Lt(e[0]).toNumber(),gasPrice:Lt(e[1]),gasLimit:Lt(e[2]),to:Yd(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 a=t.v-27,i=e.slice(0,6);t.chainId!==0&&(i.push(K(t.chainId)),i.push("0x"),i.push("0x"),a-=t.chainId*2+8);let r=fe(sa(i));try{t.from=yi(r,{r:K(t.r),s:K(t.s),recoveryParam:a})}catch{}t.hash=fe(n)}return t.type=null,t}function Co(n){let e=j(n);if(e[0]>127)return _x(e);switch(e[0]){case 1:return wx(e);case 2:return vx(e);default:break}return Ut.throwError(`unsupported transaction type: ${e[0]}`,M.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}var Z0="contracts/5.7.0";var Na=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Se=new M(Z0),kx={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(n,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{}n||Se.throwError("a provider or signer is needed to resolve ENS names",M.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});let a=yield n.resolveName(t);return a==null&&Se.throwArgumentError("resolver or addr is not configured for ENS name","name",t),a})}function Zr(n,e,t){return Na(this,void 0,void 0,function*(){return Array.isArray(t)?yield Promise.all(t.map((a,i)=>Zr(n,Array.isArray(e)?e[i]:e[a.name],a))):t.type==="address"?yield Io(n,e):t.type==="tuple"?yield Zr(n,e,t.components):t.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(a=>Zr(n,a,t.arrayChildren))):Promise.reject(Se.makeError("invalid value for array",M.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function Po(n,e,t){return Na(this,void 0,void 0,function*(){let a={};t.length===e.inputs.length+1&&typeof t[t.length-1]=="object"&&(a=we(t.pop())),Se.checkArgumentCount(t.length,e.inputs.length,"passed to contract"),n.signer?a.from?a.from=Ie({override:Io(n.signer,a.from),signer:n.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})):a.from=n.signer.getAddress():a.from&&(a.from=Io(n.provider,a.from));let i=yield Ie({args:Zr(n.signer||n.provider,t,e.inputs),address:n.resolvedAddress,overrides:Ie(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=sn(o.accessList)),s.gasLimit==null&&e.gas!=null){let p=21e3,f=j(r);for(let x=0;xa[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 Ax(n,e){return function(...t){return Po(n,e,t)}}function Mx(n,e){let t=n.signer||n.provider;return function(...a){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(n,e,a);return yield t.estimateGas(i)})}}function tf(n,e){let t=e.wait.bind(e);e.wait=a=>t(a).then(i=>(i.events=i.logs.map(r=>{let s=ct(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 nf(n,e,t){let a=n.signer||n.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=we(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 Po(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===M.errors.CALL_EXCEPTION&&(l.address=n.address,l.args=i,l.transaction=s),l}})}}function Ex(n,e){return function(...t){return Na(this,void 0,void 0,function*(){n.signer||Se.throwError("sending a transaction requires a signer",M.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),n.deployTransaction!=null&&(yield n._deployed());let a=yield Po(n,e,t),i=yield n.signer.sendTransaction(a);return tf(n,i),i})}}function ef(n,e,t){return e.constant?nf(n,e,t):Ex(n,e)}function af(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 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(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]}},Zd=class extends fi{constructor(){super("error",null)}},So=class extends fi{constructor(e,t,a,i){let r={address:e},s=t.getEventTopic(a);i?(s!==i[0]&&Se.throwArgumentError("topic mismatch","topics",i),r.topics=i.slice()):r.topics=[s],super(af(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=Ki(e.args);if(t.length)throw t[0].error;let a=(e.args||[]).slice();return a.push(e),a}},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=(a,i)=>this.interface.decodeEventLog(t.eventFragment,a,i),e.args=t.args}catch{}}},lr=class{constructor(e,t,a){B(this,"interface",mt(new.target,"getInterface")(t)),a==null?(B(this,"provider",null),B(this,"signer",null)):St.isSigner(a)?(B(this,"provider",a.provider||null),B(this,"signer",a)):$t.isProvider(a)?(B(this,"provider",a),B(this,"signer",null)):Se.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]]):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,ef(this,o,!0)),this.functions[s]==null&&B(this.functions,s,ef(this,o,!1)),this.callStatic[s]==null&&B(this.callStatic,s,nf(this,o,!0)),this.populateTransaction[s]==null&&B(this.populateTransaction,s,Ax(this,o)),this.estimateGas[s]==null&&B(this.estimateGas,s,Mx(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 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=we(e||{});return["from","to"].forEach(function(a){t[a]!=null&&Se.throwError("cannot override "+a,M.errors.UNSUPPORTED_OPERATION,{operation:a})}),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 Zd);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 a=e.topics[0];if(typeof a!="string")throw new Error("invalid topic");let i=this.interface.getEvent(a);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(af(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,a){let i=ct(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||Se.throwError("events require a provider or a signer with a provider",M.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=we(i.filter);return typeof t=="string"&&ie(t,32)?(a!=null&&Se.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 lr{},ci=class{constructor(e,t,a){let i=null;typeof t=="string"?i=t:on(t)?i=K(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),a&&!St.isSigner(a)&&Se.throwArgumentError("invalid signer","signer",a),B(this,"bytecode",i),B(this,"interface",mt(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=we(e.pop());for(let a in t)if(!kx[a])throw new Error("unknown transaction override "+a)}return["data","from","to"].forEach(a=>{t[a]!=null&&Se.throwError("cannot override "+a,M.errors.UNSUPPORTED_OPERATION,{operation:a})}),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=K(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 a=yield Zr(this.signer,e,this.interface.deploy.inputs);a.push(t);let i=this.getDeployTransaction(...a),r=yield this.signer.sendTransaction(i),s=mt(this.constructor,"getContractAddress")(r),o=mt(this.constructor,"getContract")(s,this.interface,this.signer);return tf(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 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 ui(e)}static getContract(e,t,a){return new oe(e,t,a)}};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;)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 I=j(fa(i,n,l));r||(r=I.length,f=new Uint8Array(r),s=Math.ceil(a/r),p=a-(s-1)*r),f.set(I);for(let S=1;S=256)throw new Error("Depth too large!");return lf(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(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 a=new Uint8Array(37);if(e&fr){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(fa(Qn.sha512,this.chainCode,a)),r=i.slice(0,32),s=i.slice(32),o=null,l=null;this.privateKey?o=Do(F.from(r).add(this.privateKey).mod(Rx)):l=new cn(K(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 Ct(yr,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 a=this;for(let i=0;i=fr)throw new Error("invalid path index - "+r);a=a._derive(fr+s)}else if(r.match(/^[0-9]+$/)){let s=parseInt(r);if(s>=fr)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(fa(Qn.sha512,Px,a));return new Ct(yr,Do(i.slice(0,32)),null,"0x00000000",Do(i.slice(32)),0,0,t)}static fromMnemonic(e,t,a){return a=nl(a),e=xi(cr(e,a),a),Ct._fromSeed(al(e,t),{phrase:e,path:"m",locale:a.locale})}static fromSeed(e){return Ct._fromSeed(e,null)}static fromExtendedKey(e){let t=ya.decode(e);(t.length!==82||lf(t.slice(0,78))!==e)&&ns.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");let a=t[4],i=K(t.slice(5,9)),r=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(yr,null,K(o),i,s,r,a,null);case"0x0488ade4":case"0x04358394 ":if(o[0]!==0)break;return new Ct(yr,K(o.slice(1)),null,i,s,r,a,null)}return ns.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}};function al(n,e){e||(e="");let t=ve("mnemonic"+e,Gt.NFKD);return mi(ve(n,Gt.NFKD),t,2048,64,"sha512")}function cr(n,e){e=nl(e),ns.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=pf(s);if((j(Xt(a.slice(0,r/8)))[0]&o)!==(a[a.length-1]&o))throw new Error("invalid checksum");return K(a.slice(0,r/8))}function xi(n,e){if(e=nl(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]&Nx(8-a)),a+=3);let i=n.length/4,r=j(Xt(n))[0]&pf(i);return t[t.length-1]<<=i,t[t.length-1]|=r>>8-i,e.join(t.map(s=>e.getWord(s)))}function yf(n,e){try{return cr(n,e),!0}catch{}return!1}function ff(n){return(typeof n!="number"||n<0||n>=fr||n%1)&&ns.throwArgumentError("invalid account index","index",n),`m/44'/60'/${n}'/0/0`}var cf="random/5.7.0";var il=new M(cf);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 mf=Dx(),Oo=mf.crypto||mf.msCrypto;(!Oo||!Oo.getRandomValues)&&(il.warn("WARNING: Missing strong random number source"),Oo={getRandomValues:function(n){return il.throwError("no secure random source avaialble",M.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function Xn(n){(n<=0||n>1024||n%1||n!=n)&&il.throwArgumentError("invalid length","length",n);let e=new Uint8Array(n);return Oo.getRandomValues(e),j(e)}function as(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 ol=wn(sl());var Bo="json-wallets/5.7.0";function ma(n){return typeof n=="string"&&n.substring(0,2)!=="0x"&&(n="0x"+n),j(n)}function mr(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),E=new ha.default.Counter(x),J=new ha.default.ModeOfOperation.ctr(O,E),$=j(J.encrypt(i)),de=fe(ye([U,$])),T={address:n.address.substring(2).toLowerCase(),id:xf(I),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:K(x).substring(2)},ciphertext:K($).substring(2),kdf:"scrypt",kdfparams:{salt:K(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)),C=new Date,u=C.getUTCFullYear()+"-"+mr(C.getUTCMonth()+1,2)+"-"+mr(C.getUTCDate(),2)+"T"+mr(C.getUTCHours(),2)+"-"+mr(C.getUTCMinutes(),2)+"-"+mr(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:l,version:"0.1"}}return JSON.stringify(T)})}function Mf(n,e,t){if(Fo(n)){t&&t(0);let a=dl(n,e);return t&&t(1),Promise.resolve(a)}return Lo(n)?Af(n,e,t):Promise.reject(new Error("invalid JSON wallet"))}function Ef(n,e){if(Fo(n))return dl(n,e);if(Lo(n))return kf(n,e);throw new Error("invalid JSON wallet")}var Cf="wallet/5.7.0";var If=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},hr=new M(Cf);function Ux(n){return n!=null&&ie(n.privateKey,32)&&n.address!=null}function Vx(n){let e=n.mnemonic;return e&&e.phrase}var Cn=class extends St{constructor(e,t){if(super(),Ux(e)){let a=new cn(e.privateKey);if(B(this,"_signingKey",()=>a),B(this,"address",mn(this.publicKey)),this.address!==ce(e.address)&&hr.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),Vx(e)){let i=e.mnemonic;B(this,"_mnemonic",()=>({phrase:i.phrase,path:i.path||ca,locale:i.locale||"en"}));let r=this.mnemonic,s=Ct.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 a=new cn(e);B(this,"_signingKey",()=>a)}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 Ie(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 a=this._signingKey().signDigest(fe(Yr(t)));return Yr(t,a)})}signMessage(e){return If(this,void 0,void 0,function*(){return Br(this._signingKey().signDigest(Zi(e)))})}_signTypedData(e,t,a){return If(this,void 0,void 0,function*(){let i=yield bt.resolveNames(e,t,a,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,a){if(typeof t=="function"&&!a&&(a=t,t={}),a&&typeof a!="function")throw new Error("invalid callback");return t||(t={}),cl(this,e,t,a)}static createRandom(e){let t=Xn(16);e||(e={}),e.extraEntropy&&(t=j(Ce(fe(ye([t,e.extraEntropy])),0,16)));let a=xi(t,e.locale);return Cn.fromMnemonic(a,e.path,e.locale)}static fromEncryptedJson(e,t,a){return Mf(e,t,a).then(i=>new Cn(i))}static fromEncryptedJsonSync(e,t){return new Cn(Ef(e,t))}static fromMnemonic(e,t,a){return t||(t=ca),new Cn(Ct.fromMnemonic(e,null,a).derivePath(t))}};function Sf(n,e){return yi(Zi(n),e)}function Rf(n,e,t,a){return yi(bt.hash(n,e,t),a)}var ea={};ji(ea,{AlchemyProvider:()=>wr,AlchemyWebSocketProvider:()=>ms,AnkrProvider:()=>hs,BaseProvider:()=>Zn,CloudflareProvider:()=>xs,EtherscanProvider:()=>bs,FallbackProvider:()=>Ts,Formatter:()=>Y,InfuraProvider:()=>kr,InfuraWebSocketProvider:()=>ws,IpcProvider:()=>El,JsonRpcBatchProvider:()=>eu,JsonRpcProvider:()=>Yt,JsonRpcSigner:()=>Tr,NodesmithProvider:()=>_s,PocketProvider:()=>ks,Provider:()=>$t,Resolver:()=>gr,StaticJsonRpcProvider:()=>cs,UrlJsonRpcProvider:()=>It,Web3Provider:()=>As,WebSocketProvider:()=>ga,getDefaultProvider:()=>tu,getNetwork:()=>rs,isCommunityResourcable:()=>xl,isCommunityResource:()=>us,showThrottleMessage:()=>Yn});var Pf="networks/5.7.1";var Nf=new M(Pf);function jx(n){return n&&typeof n.renetwork=="function"}function xa(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 xa(t)},e}function jo(n,e){let t=function(a,i){return a.JsonRpcProvider?new a.JsonRpcProvider(n,e):null};return t.renetwork=function(a){return jo(n,a)},t}var Df={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:xa("homestead")},Of={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:xa("ropsten")},Bf={chainId:63,name:"classicMordor",_defaultProvider:jo("https://www.ethercluster.com/mordor","classicMordor")},Vo={unspecified:{chainId:0,name:"unspecified"},homestead:Df,mainnet:Df,morden:{chainId:2,name:"morden"},ropsten:Of,testnet:Of,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:Bf,classicTestnet:Bf,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 rs(n){if(n==null)return null;if(typeof n=="number"){for(let a in Vo){let i=Vo[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=Vo[n];return a==null?null:{name:a.name,chainId:a.chainId,ensAddress:a.ensAddress,_defaultProvider:a._defaultProvider||null}}let e=Vo[n.name];if(!e)return typeof n.chainId!="number"&&Nf.throwArgumentError("invalid network chainId","network",n),n;n.chainId!==0&&n.chainId!==e.chainId&&Nf.throwArgumentError("network chainId mismatch","network",n);let t=n._defaultProvider||null;return t==null&&e._defaultProvider&&(jx(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 Ff="web/5.7.1";var Hx=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})};function Lf(n,e){return Hx(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 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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},In=new M(Ff);function Uf(n){return new Promise(e=>{setTimeout(e,n)})}function Da(n,e){if(n==null)return null;if(typeof n=="string")return n;if(aa(n)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return Jt(n)}catch{}return K(n)}return n}function Gx(n){return ve(n.replace(/%([0-9a-f][0-9a-f])/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))}function ml(n,e,t){let a=typeof n=="object"&&n.throttleLimit!=null?n.throttleLimit:12;In.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;In.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"},f=!1,x=2*60*1e3;if(typeof n=="string")l=n;else if(typeof n=="object"){if((n==null||n.url==null)&&In.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&&(f=!0);if(p.allowGzip=!!n.allowGzip,n.user!=null&&n.password!=null){l.substring(0,6)!=="https:"&&n.allowInsecureAuthentication!==!0&&In.throwError("basic authentication requires a secure https url",M.errors.INVALID_ARGUMENT,{argument:"url",url:l,user:n.user,password:"[REDACTED]"});let O=n.user+":"+n.password;o.authorization={key:"Authorization",value:"Basic "+Yi(ve(O))}}n.skipFetchSetup!=null&&(p.skipFetchSetup=!!n.skipFetchSetup),n.fetchOptions!=null&&(p.fetchOptions=we(n.fetchOptions))}let I=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),_=l?l.match(I):null;if(_)try{let O={statusCode:200,statusMessage:"OK",headers:{"content-type":_[1]||"text/plain"},body:_[2]?Xi(_[3]):Gx(_[3])},U=O.body;return t&&(U=t(O.body,O)),Promise.resolve(U)}catch(O){In.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(In.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 qx(this,void 0,void 0,function*(){for(let O=0;O=300)&&(S.cancel(),In.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){In.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 n=="string"?{url:n}:we(n);r.headers?Object.keys(r.headers).filter(o=>o.toLowerCase()==="content-type").length!==0||(r.headers=we(r.headers),r.headers["content-type"]="application/json"):r.headers={"content-type":"application/json"},n=r}return ml(n,i,a)}function Rn(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,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(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()&&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(f){s()&&a(f)})}p()})}var vl=wn(qf());var ke="providers/5.7.2";var os=new M(ke),Y=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),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(a),maxPriorityFeePerGas:Y.allowNull(a),maxFeePerGas:Y.allowNull(a),gasLimit:a,to:Y.allowNull(t,null),value:a,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(a),gasPrice:Y.allowNull(a),maxPriorityFeePerGas:Y.allowNull(a),maxFeePerGas:Y.allowNull(a),to:Y.allowNull(t),value:Y.allowNull(a),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:a,logsBloom:Y.allowNull(r),blockHash:s,transactionHash:s,logs:Y.arrayOf(this.receiptLog.bind(this)),blockNumber:l,confirmations:Y.allowNull(l,null),cumulativeGasUsed:a,effectiveGasPrice:Y.allowNull(a),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:a,gasUsed:a,miner:Y.allowNull(t),extraData:r,transactions:Y.allowNull(Y.arrayOf(s)),baseFeePerGas:Y.allowNull(a)},e.blockWithTransactions=we(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():os.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 ce(e)}callAddress(e){if(!ie(e,32))return null;let t=ce(Ce(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 a=this.hex(e,t);return Nt(a)!==32?os.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 me(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=Y.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 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 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 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 a=F.from(t.root).toNumber();a===0||a===1?(t.status!=null&&t.status!==a&&os.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=a,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 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 xl(n){return n&&typeof n.isCommunityResource=="function"}function us(n){return xl(n)&&n.isCommunityResource()}var Gf=!1;function Yn(){Gf||(Gf=!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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},he=new M(ke),Yx=10;function zf(n){return n==null?"null":(Nt(n)!==32&&he.throwArgumentError("invalid topic","topic",n),n.toLowerCase())}function Kf(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[zf(i)]=!0});let a=Object.keys(t);return a.sort(),a.join("|")}else return zf(e)}).join("&")}function Zx(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 br(n){if(typeof n=="string"){if(n=n.toLowerCase(),Nt(n)===32)return"tx:"+n;if(n.indexOf(":")===-1)return n}else{if(Array.isArray(n))return"filter:*:"+Kf(n);if(xo.isForkEvent(n))throw he.warn("not implemented"),new Error("not implemented");if(n&&typeof n=="object")return"filter:"+(n.address||"*")+":"+Kf(n.topics||[])}throw new Error("invalid event - "+n)}function ds(){return new Date().getTime()}function Wf(n){return new Promise(e=>{setTimeout(e,n)})}var e5=["block","network","pending","poll"],wl=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=Zx(e[2]),i={};return a.length>0&&(i.topics=a),t&&t!=="*"&&(i.address=t),i}pollable(){return this.tag.indexOf(":")>=0||e5.indexOf(this.tag)>=0}},t5={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(n){return me(F.from(n).toHexString(),32)}function Jf(n){return ya.encode(ye([n,Ce(Xt(Xt(n)),0,4)]))}var Xf=new RegExp("^(ipfs)://(.*)$","i"),$f=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),Xf,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function zo(n,e){try{return Jt(ls(n,e))}catch{}return null}function ls(n,e){if(n==="0x")return null;let t=F.from(Ce(n,e,e+32)).toNumber(),a=F.from(Ce(n,t,t+32)).toNumber();return Ce(n,t+32,t+32+a)}function gl(n){return n.match(/^ipfs:\/\/ipfs\//i)?n=n.substring(12):n.match(/^ipfs:\/\//i)?n=n.substring(7):he.throwArgumentError("unsupported IPFS format","link",n),`https://gateway.ipfs.io/ipfs/${n}`}function Qf(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 n5(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===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 a={to:this.address,ccipReadEnabled:!0,data:_t([e,Ca(this.name),t||"0x"])},i=!1;(yield this.supportsWildcard())&&(i=!0,a.data=_t(["0x9061b923",Yf([Jr(this.name),a.data])]));try{let r=yield this.provider.call(a);return j(r).length%32===4&&he.throwError("resolver threw error",M.errors.CALL_EXCEPTION,{transaction:a,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 a=yield this._fetch(e,t);return a!=null?ls(a,0):null})}_getAddress(e,t){let a=t5[String(e)];if(a==null&&he.throwError(`unsupported coin type: ${e}`,M.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 Jf(ye([[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 Jf(ye([[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=vl.default.toWords(i.slice(2));return o.unshift(s),vl.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===$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",bl(e));if(t==null||t==="0x")return null;let a=this._getAddress(e,t);return a==null&&he.throwError("invalid or unsupported coin data",M.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;a<$f.length;a++){let i=t.match($f[a]);if(i==null)continue;let r=i[1].toLowerCase();switch(r){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:gl(t)};case"erc721":case"erc1155":{let s=r==="erc721"?"0xc87b56dd":"0x0e89341c";e.push({type:r,content:t});let o=this._resolvedAddress||(yield this.getAddress()),l=(i[2]||"").split("/");if(l.length!==2)return null;let p=yield this.provider.formatter.address(l[0]),f=me(F.from(l[1]).toHexString(),32);if(r==="erc721"){let S=this.provider.formatter.callAddress(yield this.provider.call({to:p,data:_t(["0x6352211e",f])}));if(o!==S)return null;e.push({type:"owner",content:S})}else if(r==="erc1155"){let S=F.from(yield this.provider.call({to:p,data:_t(["0x00fdd58e",me(o,32),f])}));if(S.isZero())return null;e.push({type:"balance",content:S.toString()})}let x={to:this.provider.formatter.address(l[0]),data:_t([s,f])},I=zo(yield this.provider.call(x),0);if(I==null)return null;e.push({type:"metadata-url-base",content:I}),r==="erc1155"&&(I=I.replace("{id}",f.substring(2)),e.push({type:"metadata-url-expanded",content:I})),I.match(/^ipfs:/i)&&(I=gl(I)),e.push({type:"metadata-url",content:I});let _=yield Sn(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(Xf)==null)return null;e.push({type:"url-ipfs",content:v}),v=gl(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://"+ya.encode("0x"+t[1])}let a=e.match(/^0xe5010172(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(a){let s=parseInt(a[3],16);if(a[4].length===s*2)return"ipns://"+ya.encode("0x"+a[1])}let i=e.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(i&&i[1].length===32*2)return"bzz://"+i[1];let r=e.match(/^0x90b2c605([0-9a-f]*)$/);if(r&&r[1].length===34*2){let s={"=":"","+":"-","/":"_"},o=Yi("0x"+r[1]).replace(/[=+\/]/g,l=>s[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 a=yield this._fetchBytes("0x59d1d43c",K(t));return a==null||a==="0x"?null:Jt(a)})}},Tl=null,a5=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 Rn(()=>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 rs(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 Sn({url:p,errorPassThrough:!0},f,(_,v)=>(_.status=v.statusCode,_));if(x.data)return x.data;let I=x.message||"unknown error";if(x.status>=400&&x.status<500)return he.throwError(`response not found during CCIP fetch: ${I}`,M.errors.SERVER_ERROR,{url:l,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: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(ds()-r.respTime<=e)return r.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}let t=ds(),a=Ie({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=ds();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=a5++,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)he.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${a})`),this.emit("error",he.makeError("network block skew detected",M.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 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 Wf(0),this._network;let a=he.makeError("underlying network changed",M.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=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,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,f=function(){return p?!0:(p=!0,l.forEach(I=>{I()}),!1)},x=I=>{I.confirmations{this.removeListener(e,x)}),i){let I=i.startBlock,_=null,v=S=>ue(this,void 0,void 0,function*(){p||(yield Wf(1e3),this.getTransactionCount(i.from).then(L=>ue(this,void 0,void 0,function*(){if(!p){if(L<=i.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),l.push(()=>{this.removeListener("block",v)})}if(typeof a=="number"&&a>0){let I=setTimeout(()=>{f()||o(he.makeError("timeout exceeded",M.errors.TIMEOUT,{timeout:a}))},a);I.unref&&I.unref(),l.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 a=yield Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getBalance",a);try{return F.from(i)}catch(r){return he.throwError("bad result from backend",M.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 Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getTransactionCount",a);try{return F.from(i).toNumber()}catch(r){return he.throwError("bad result from backend",M.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 Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getCode",a);try{return K(i)}catch(r){return he.throwError("bad result from backend",M.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 Ie({address:this._getAddress(e),blockTag:this._getBlockTag(a),position:Promise.resolve(t).then(s=>Ln(s))}),r=yield this.perform("getStorageAt",i);try{return K(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,a){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&&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&&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=>K(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?K(r):null))}),this.formatter.transactionRequest(yield Ie(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 Ie(t))})}_call(e,t,a){return ue(this,void 0,void 0,function*(){a>=Yx&&he.throwError("CCIP read exceeded maximum redirections",M.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"&&Nt(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",M.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(),f=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&&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 Rn(()=>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 Rn(()=>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 Ie({filter:this._getFilter(e)}),a=yield this.perform("getLogs",t);return a.forEach(i=>{i.removed==null&&(i.removed=!1)}),Y.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&&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 a=yield this._getResolver(t,"getResolver");if(a!=null){let i=new gr(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||he.throwError("network does not support ENS",M.errors.UNSUPPORTED_OPERATION,{operation:t,network:a.name});try{let i=yield this.call({to:a.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(a){if(ie(e))throw a}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",a=yield this._getResolver(t,"lookupAddress");if(a==null)return null;let i=zo(yield this.call({to:a,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 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=zo(yield this.call({to:s,data:"0x691f3431"+Ca(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 a=yield t.getAvatar();return a==null?null:a.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,a){let i=new wl(br(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=br(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=br(e);return this._events.filter(a=>a.tag===t).length}listeners(e){if(e==null)return this._events.map(a=>a.listener);let t=br(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=br(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=br(e);this._events=this._events.filter(i=>i.tag!==a?!0:(t.push(i),!1))}return t.forEach(a=>{this._stopEvent(a)}),this}};var ba=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},At=new M(ke),i5=["call","estimateGas"];function ys(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=ys(n[t],e);if(a)return a}return null}if(typeof n=="string")try{return ys(JSON.parse(n),e)}catch{}return null}function ec(n,e,t){let a=t.transaction||t.signedTransaction;if(n==="call"){let r=ys(e,!0);if(r)return r.data;At.throwError("missing revert data in call exception; Transaction reverted without a reason string",M.errors.CALL_EXCEPTION,{data:"0x",transaction:a,error:e})}if(n==="estimateGas"){let r=ys(e.body,!1);r==null&&(r=ys(e,!1)),r&&At.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",M.errors.UNPREDICTABLE_GAS_LIMIT,{reason:r.message,method:n,transaction:a,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)&&At.throwError("insufficient funds for intrinsic transaction cost",M.errors.INSUFFICIENT_FUNDS,{error:e,method:n,transaction:a}),i.match(/nonce (is )?too low/i)&&At.throwError("nonce has already been used",M.errors.NONCE_EXPIRED,{error:e,method:n,transaction:a}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&At.throwError("replacement fee too low",M.errors.REPLACEMENT_UNDERPRICED,{error:e,method:n,transaction:a}),i.match(/only replay-protected/i)&&At.throwError("legacy pre-eip-155 transactions not supported",M.errors.UNSUPPORTED_OPERATION,{error:e,method:n,transaction:a}),i5.indexOf(n)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&At.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",M.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:n,transaction:a}),e}function Zf(n){return new Promise(function(e){setTimeout(e,n)})}function r5(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 ps(n){return n&&n.toLowerCase()}var _l={},Tr=class extends St{constructor(e,t,a){if(super(),e!==_l)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)):At.throwArgumentError("invalid address or index","addressOrIndex",a)}connect(e){return At.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&&At.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(a=>(a&&(a=a.toLowerCase()),a));if(e.gasLimit==null){let a=we(e);a.from=t,e.gasLimit=this.provider.estimateGas(a)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(a=>ba(this,void 0,void 0,function*(){if(a==null)return null;let i=yield this.provider.resolveName(a);return i==null&&At.throwArgumentError("provided ENS name resolves to null","tx.to",a),i}))),Ie({tx:Ie(e),sender:t}).then(({tx:a,sender:i})=>{a.from!=null?a.from.toLowerCase()!==i&&At.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)&&At.throwError("user rejected transaction",M.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:a}),ec("sendTransaction",s,r)))})}signTransaction(e){return At.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),a=yield this.sendUncheckedTransaction(e);try{return yield Rn(()=>ba(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 ba(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(e):e,a=yield this.getAddress();try{return yield this.provider.send("personal_sign",[K(t),a.toLowerCase()])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&At.throwError("user rejected signing",M.errors.ACTION_REJECTED,{action:"signMessage",from:a,messageData:e}),i}})}_legacySignMessage(e){return ba(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(e):e,a=yield this.getAddress();try{return yield this.provider.send("eth_sign",[a.toLowerCase(),K(t)])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&At.throwError("user rejected signing",M.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:a,messageData:e}),i}})}_signTypedData(e,t,a){return ba(this,void 0,void 0,function*(){let i=yield bt.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(bt.getPayload(i.domain,t,i.value))])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&At.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,a=yield this.getAddress();return t.send("personal_unlockAccount",[a.toLowerCase(),e,null])})}},kl=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:a=>this.provider.waitForTransaction(t,a)}))}},s5={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 a=t;a==null&&(a=new Promise((i,r)=>{setTimeout(()=>{this.detectNetwork().then(s=>{i(s)},s=>{r(s)})},0)})),super(a),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 ba(this,void 0,void 0,function*(){yield Zf(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(a){return At.throwError("could not detect network",M.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:a})}}return At.throwError("could not detect network",M.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new Tr(_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 a={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:ct(a),provider:this});let i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];let r=Sn(this.connection,JSON.stringify(a),r5).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",[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 a=mt(this.constructor,"hexlifyTransaction");return["eth_call",[a(t.transaction,{from:!0}),t.blockTag]]}case"estimateGas":{let a=mt(this.constructor,"hexlifyTransaction");return["eth_estimateGas",[a(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 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=we(t),t.transaction=we(i),delete t.transaction.type)}}let a=this.prepareRequest(e,t);a==null&&At.throwError(e+" not implemented",M.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(a[0],a[1])}catch(i){return ec(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 Zf(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=we(s5);if(t)for(let r in t)t[r]&&(a[r]=!0);Gi(e,a);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]=K(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(ke);vr=function(){e.throwError("WebSockets not supported in this environment",M.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var Al=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Ko=new M(ke),o5=1,ga=class extends Yt{constructor(e,t){t==="any"&&Ko.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 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){Ko.throwError("cannot reset events block on WebSocketProvider",M.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(e){Ko.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||Ko.throwError("cannot set polling on WebSocketProvider",M.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(e,t){let a=o5++;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 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: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 Al(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 u5=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},fs=new M(ke),cs=class extends Yt{detectNetwork(){let e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return u5(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 cs{constructor(e,t){fs.checkAbstract(new.target,It),e=mt(new.target,"getNetwork")(e),t=mt(new.target,"getApiKey")(t);let a=mt(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(){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 tc=new M(ke),Wo="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC",ms=class extends ga{constructor(e,t){let a=new wr(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===Wo}},wr=class extends It{static getWebSocketProvider(e,t){return new ms(e,t)}static getApiKey(e){return e==null?Wo:(e&&typeof e!="string"&&tc.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:tc.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+a+t,throttleCallback:(i,r)=>(t===Wo&&Yn(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===Wo}};var d5=new M(ke),Jo="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function l5(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 d5.throwArgumentError("unsupported network","name",n)}var hs=class extends It{isCommunityResource(){return this.apiKey===Jo}static getApiKey(e){return e??Jo}static getUrl(e,t){t==null&&(t=Jo);let a={allowGzip:!0,url:"https://"+l5(e.name)+t,throttleCallback:(i,r)=>(t.apiKey===Jo&&Yn(),Promise.resolve(!0))};return t.projectSecret!=null&&(a.user="",a.password=t.projectSecret),a}};var p5=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},nc=new M(ke),xs=class extends It{static getApiKey(e){return e!=null&&nc.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:nc.throwArgumentError("unsupported network","network",arguments[0])}return a}perform(e,t){let a=Object.create(null,{perform:{get:()=>super.perform}});return p5(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 $o=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Oa=new M(ke);function ac(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=Ln(K(a)):t==="accessList"?a="["+sn(a).map(i=>`{address:"${i.address}",storageKeys:["${i.storageKeys.join('","')}"]}`).join(",")+"]":a=K(a),e[t]=a)}return e}function y5(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 ic(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 rc(n){if(n==="pending")throw new Error("pending not supported");return n==="latest"?n:parseInt(n.substring(2),16)}function Ml(n,e,t){if(n==="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 a=e.message;throw e.code===M.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/)&&Oa.throwError("insufficient funds for intrinsic transaction cost",M.errors.INSUFFICIENT_FUNDS,{error:e,method:n,transaction:t}),a.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:n,transaction:t}),a.match(/another transaction with same nonce/)&&Oa.throwError("replacement fee too low",M.errors.REPLACEMENT_UNDERPRICED,{error:e,method:n,transaction:t}),a.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:n,transaction:t}),e}var bs=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 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 $o(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"?ic:y5;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 Sn(o,l,s||ic);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 a=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=ac(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=ac(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=rc(t.filter.fromBlock)),t.filter.toBlock&&(i.toBlock=rc(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(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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},bi=new M(ke);function Qo(){return new Date().getTime()}function sc(n){let e=null;for(let t=0;te?null:(a+i)/2}function _r(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=>_r(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=_r(a),JSON.stringify(t)+":"+a}).join(",")+"}"}throw new Error("unknown value type: "+typeof n)}var f5=1;function uc(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 c5=[M.errors.CALL_EXCEPTION,M.errors.INSUFFICIENT_FUNDS,M.errors.NONCE_EXPIRED,M.errors.REPLACEMENT_UNDERPRICED,M.errors.UNPREDICTABLE_GAS_LIMIT],m5=["address","args","errorArgs","errorSignature","method","transaction"];function Xo(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 h5(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 x5(n,e,t){let a=_r;switch(e){case"getBlockNumber":return function(i){let r=i.map(o=>o.result),s=oc(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 oc(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=we(i),i.confirmations=-1,_r(i))};break;case"getBlock":t.includeTransactions?a=function(i){return i==null?null:(i=we(i),i.transactions=i.transactions.map(r=>(r=we(r),r.confirmations=-1,r)),_r(i))}:a=function(i){return i==null?null:_r(i)};break;default:throw new Error("unknown method: "+e)}return h5(a,n.quorum)}function gs(n,e){return Yo(this,void 0,void 0,function*(){let t=n.provider;return t.blockNumber!=null&&t.blockNumber>=e||e===-1?t:Rn(()=>new Promise((a,i)=>{setTimeout(function(){return t.blockNumber>=e?a(t):n.cancelled?a(null):a(void 0)},0)}),{oncePoll:t})})}function b5(n,e,t,a){return Yo(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 gs(n,e)),i[t](a.address,a.blockTag||"latest");case"getStorageAt":return a.blockTag&&ie(a.blockTag)&&(i=yield gs(n,e)),i.getStorageAt(a.address,a.position,a.blockTag||"latest");case"getBlock":return a.blockTag&&ie(a.blockTag)&&(i=yield gs(n,e)),i[a.includeTransactions?"getBlockWithTransactions":"getBlock"](a.blockTag||a.blockHash);case"call":case"estimateGas":return a.blockTag&&ie(a.blockTag)&&(i=yield gs(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 gs(n,e)),i.getLogs(r)}}return bi.throwError("unknown method error",M.errors.UNKNOWN_ERROR,{method:t,params:a})})}var Ts=class extends Zn{constructor(e,t){e.length===0&&bi.throwArgumentError("missing providers","providers",e);let a=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=we(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)&&bi.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&&bi.throwArgumentError("quorum will always fail; larger than total weight","quorum",t);let r=sc(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 Yo(this,void 0,void 0,function*(){let e=yield Promise.all(this.providerConfigs.map(t=>t.provider.getNetwork()));return sc(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=b5(_,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 _=a(x);if(_!==void 0)return i.forEach(v=>{v.staller&&v.staller.cancel(),v.cancelled=!0}),_;o||(yield uc(100).getPromise()),o=!1}let I=i.reduce((_,v)=>{if(!v.done||v.error==null)return _;let S=v.error.code;return c5.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={};m5.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(ke),vs="84842078b09946638c03157f83405213",ws=class extends ga{constructor(e,t){let a=new kr(e,t),i=a.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",a.projectId),B(this,"projectId",a.projectId),B(this,"projectSecret",a.projectSecret)}isCommunityResource(){return this.projectId===vs}},kr=class extends It{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?(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 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:Zo.throwError("unsupported network",M.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let i={allowGzip:!0,url:"https://"+a+"/v3/"+t.projectId,throttleCallback:(r,s)=>(t.projectId===vs&&Yn(),Promise.resolve(!0))};return t.projectSecret!=null&&(i.user="",i.password=t.projectSecret),i}isCommunityResource(){return this.projectId===vs}};var eu=class extends Yt{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:ct(o),provider:this}),Sn(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 I=new Error(x.error.message);I.code=x.error.code,I.data=x.error.data,p.reject(I)}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 Cl=new M(ke),g5="ETHERS_JS_SHARED",_s=class extends It{static getApiKey(e){return e&&typeof e!="string"&&Cl.throwArgumentError("invalid apiKey","apiKey",e),e||g5}static getUrl(e,t){Cl.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:Cl.throwArgumentError("unsupported network","network",arguments[0])}return a+"?apiKey="+t}};var dc=new M(ke),lc="62e1ad51b37b8e00394bda3b",ks=class extends It{static getApiKey(e){let t={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return e==null?t.applicationId=lc:typeof e=="string"?t.applicationId=e:e.applicationSecretKey!=null?(t.applicationId=e.applicationId,t.applicationSecretKey=e.applicationSecretKey):e.applicationId?t.applicationId=e.applicationId:dc.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:dc.throwError("unsupported network",M.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===lc}};var pc=new M(ke),T5=1;function yc(n,e){let t="Web3LegacyFetcher";return function(a,i){let r={method:a,params:i,id:T5++,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 v5(n){return function(e,t){t==null&&(t=[]);let a={method:e,params:t};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:ct(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 As=class extends Yt{constructor(e,t){e==null&&pc.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=v5(e)):e.sendAsync?i=yc(e,e.sendAsync.bind(e)):e.send?i=yc(e,e.send.bind(e)):pc.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 fc=new M(ke);function tu(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 Yt(n);case"ws":case"wss":return new ga(n);default:fc.throwArgumentError("unsupported URL scheme","network",n)}}let t=rs(n);return(!t||!t._defaultProvider)&&fc.throwError("unsupported getDefaultProvider network",M.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:n}),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 ae={};ji(ae,{AbiCoder:()=>Qi,ConstructorFragment:()=>Dt,ErrorFragment:()=>tn,EventFragment:()=>Ht,FormatTypes:()=>ge,Fragment:()=>qt,FunctionFragment:()=>Ot,HDNode:()=>Ct,Indexed:()=>oa,Interface:()=>Ia,LogDescription:()=>er,Logger:()=>M,ParamType:()=>pt,RLP:()=>Xs,SigningKey:()=>cn,SupportedAlgorithm:()=>Qn,TransactionDescription:()=>tr,TransactionTypes:()=>Eo,UnicodeNormalizationForm:()=>Gt,Utf8ErrorFuncs:()=>po,Utf8ErrorReason:()=>Bt,_TypedDataEncoder:()=>bt,_fetchData:()=>ml,_toEscapedUtf8String:()=>Td,accessListify:()=>sn,arrayify:()=>j,base58:()=>ya,base64:()=>Md,checkProperties:()=>Gi,checkResultErrors:()=>Ki,commify:()=>vc,computeAddress:()=>mn,computeHmac:()=>fa,computePublicKey:()=>Xr,concat:()=>ye,deepCopy:()=>ct,defaultAbiCoder:()=>Kr,defaultPath:()=>ca,defineReadOnly:()=>B,dnsEncode:()=>Jr,entropyToMnemonic:()=>xi,fetchJson:()=>Sn,formatBytes32String:()=>vd,formatEther:()=>wc,formatUnits:()=>Il,getAccountPath:()=>ff,getAddress:()=>ce,getContractAddress:()=>ui,getCreate2Address:()=>My,getIcapAddress:()=>Ay,getJsonWalletAddress:()=>ll,getStatic:()=>mt,hashMessage:()=>Zi,hexConcat:()=>_t,hexDataLength:()=>Nt,hexDataSlice:()=>Ce,hexStripZeros:()=>dd,hexValue:()=>Ln,hexZeroPad:()=>me,hexlify:()=>K,id:()=>nn,isAddress:()=>ky,isBytes:()=>on,isBytesLike:()=>aa,isHexString:()=>ie,isValidMnemonic:()=>yf,isValidName:()=>Cd,joinSignature:()=>Br,keccak256:()=>fe,mnemonicToEntropy:()=>cr,mnemonicToSeed:()=>al,namehash:()=>Ca,nameprep:()=>Ad,parseBytes32String:()=>wd,parseEther:()=>_c,parseTransaction:()=>Co,parseUnits:()=>Sl,poll:()=>Rn,randomBytes:()=>Xn,recoverAddress:()=>yi,recoverPublicKey:()=>Mo,resolveProperties:()=>Ie,ripemd160:()=>es,serializeTransaction:()=>Yr,sha256:()=>Xt,sha512:()=>Zd,shallowCopy:()=>we,shuffled:()=>as,solidityKeccak256:()=>hc,solidityPack:()=>nu,soliditySha256:()=>xc,splitSignature:()=>Un,stripZeros:()=>Zt,toUtf8Bytes:()=>ve,toUtf8CodePoints:()=>Ea,toUtf8String:()=>Jt,verifyMessage:()=>Sf,verifyTypedData:()=>Rf,zeroPad:()=>ii});var cc="solidity/5.7.0";var w5=new RegExp("^bytes([0-9]+)$"),_5=new RegExp("^(u?int)([0-9]*)$"),k5=new RegExp("^(.*)\\[([0-9]*)\\]$"),A5="0000000000000000000000000000000000000000000000000000000000000000",Ar=new M(cc);function mc(n,e,t){switch(n){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 a=n.match(_5);if(a){let i=parseInt(a[2]||"256");return(a[2]&&String(i)!==a[2]||i%8!==0||i===0||i>256)&&Ar.throwArgumentError("invalid number type","type",n),t&&(i=256),e=F.from(e).toTwos(i),ii(e,i/8)}if(a=n.match(w5),a){let i=parseInt(a[1]);return(String(i)!==a[1]||i===0||i>32)&&Ar.throwArgumentError("invalid bytes type","type",n),j(e).byteLength!==i&&Ar.throwArgumentError(`invalid value for ${n}`,"value",e),t?j((e+A5).substring(0,66)):e}if(a=n.match(k5),a&&Array.isArray(e)){let i=a[1];parseInt(a[2]||String(e.length))!=e.length&&Ar.throwArgumentError(`invalid array length for ${n}`,"value",e);let s=[];return e.forEach(function(o){s.push(mc(i,o,!0))}),ye(s)}return Ar.throwArgumentError("invalid type","type",n)}function nu(n,e){n.length!=e.length&&Ar.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);let t=[];return n.forEach(function(a,i){t.push(mc(a,e[i]))}),K(ye(t))}function hc(n,e){return fe(nu(n,e))}function xc(n,e){return Xt(nu(n,e))}var bc="units/5.7.0";var gc=new M(bc),Tc=["wei","kwei","mwei","gwei","szabo","finney","ether"];function vc(n){let e=String(n).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||n==="."||n==="-.")&&gc.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 Il(n,e){if(typeof e=="string"){let t=Tc.indexOf(e);t!==-1&&(e=3*t)}return qi(n,e??18)}function Sl(n,e){if(typeof n!="string"&&gc.throwArgumentError("value must be a string","value",n),typeof e=="string"){let t=Tc.indexOf(e);t!==-1&&(e=3*t)}return dn(n,e??18)}function wc(n){return Il(n,18)}function _c(n){return Sl(n,18)}var au="ethers/5.7.2";var kc=new M(au);try{let n=window;n._ethers==null&&(n._ethers=Rl)}catch{}var Pn;(function(n){n.Mainnet="Mainnet",n.Custom="Custom",n.Gnosis="Xdai",n.Goerli="Goerli",n.Xdai="Xdai",n.XdaiQa="XdaiQa",n.ArbitrumOne="ArbitrumOne",n.ArbitrumSepolia="ArbitrumSepolia"})(Pn||(Pn={}));var Ac;(function(n){n[n.Custom=0]="Custom",n[n.Mainnet=1]="Mainnet",n[n.Goerli=5]="Goerli",n[n.Gnosis=100]="Gnosis",n[n.Xdai=100]="Xdai",n[n.XdaiQa=100]="XdaiQa",n[n.ArbitrumSepolia=421614]="ArbitrumSepolia",n[n.ArbitrumOne=42161]="ArbitrumOne"})(Ac||(Ac={}));var iu;(function(n){n.Mainnet="0x5346D0f80e2816FaD329F2c140c870ffc3c3E2Ef",n.Goerli="0x79073fc2117dD054FCEdaCad1E7018C9CbE3ec0B",n.Xdai="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.XdaiQa="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.Custom="",n.ArbitrumOne="0xcccccdcc0ccf6c708d860e19353c5f9a49accccc",n.ArbitrumSepolia="0x7777494e3d8cce0D3570E21FEf820F9Fee077777"})(iu||(iu={}));var Mr;(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",n.ArbitrumOne="https://app.colony.io/reputation/arbitrum-one",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/reputation/arbitrum-sepolia"})(Mr||(Mr={}));var ru;(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="",n.ArbitrumOne="https://app.colony.io/metatransaction/arbitrum-one",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/metatransaction/arbitrum-sepolia"})(ru||(ru={}));var Pl;(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="",n.ArbitrumOne="https://app.colony.io/public-rpc/",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/public-rpc/"})(Pl||(Pl={}));var Ms;(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",n.ArbitrumOne=".colony.joincolony.arbitrum",n.ArbitrumSepolia=".colony.joincolony.sepolia"})(Ms||(Ms={}));var Es;(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",n.ArbitrumOne=".user.joincolony.arbitrum",n.ArbitrumSepolia=".user.joincolony.sepolia"})(Es||(Es={}));var Nl;(function(n){let e;(function(i){i.ETH="0x0000000000000000000000000000000000000000",i.CLNY="0x3E828ac5C480069D4765654Fb4b8733b910b13b2",i.USDC="0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"})(e=n.Mainnet||(n.Mainnet={}));let t;(function(i){i.XDAI="0x0000000000000000000000000000000000000000",i.CLNY="0xc9B6218AffE8Aba68a13899Cbf7cF7f14DDd304C",i.USDC="0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83"})(t=n.Gnosis||(n.Gnosis={}));let a;(function(i){i.ETH="0x0000000000000000000000000000000000000000",i.CLNY="0xcccccdcc0ccf6c708d860e19353c5f9a49accccc",i.USDC="0xaf88d065e77c8cC2239327C5EDb3A432268e5831"})(a=n.ArbitrumOne||(n.ArbitrumOne={}))})(Nl||(Nl={}));var _e;(function(n){n[n.RootDomain=1]="RootDomain",n[n.RootTeam=1]="RootTeam",n[n.RootPot=1]="RootPot",n[n.SkillIgnore=0]="SkillIgnore"})(_e||(_e={}));var zt;(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"})(zt||(zt={}));var Ol="0x12345678",Dl;(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"})(Dl||(Dl={}));var vt;(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"})(vt||(vt={}));var Ae;(function(n){n.FundingQueue="FundingQueue",n.IVotingReputation="IVotingReputation",n.MultisigPermissions="MultisigPermissions",n.OneTxPayment="OneTxPayment",n.ReputationBootstrapper="ReputationBootstrapper",n.StagedExpenditure="StagedExpenditure",n.StakedExpenditure="StakedExpenditure",n.StreamingPayments="StreamingPayments",n.TokenSupplier="TokenSupplier",n.VotingReputation="VotingReputation"})(Ae||(Ae={}));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 ae.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 ae.Interface(Fl)}static connect(e,t){return new oe(e,Fl,t)}};xe(Ti,"abi",Fl);var Mc=(n,e)=>{throw new Error(`${e}: ${n}`)},Ll=n=>n!=null;var{keccak256:E5,toUtf8Bytes:C5}=ae,{MaxUint256:I5}=ht;var Ul=n=>ae.formatEther(n);var Vl=n=>{let e=n.reduce((t,a)=>t|1<{let e=F.from(n);return[...Array(vt.LAST_ROLE).keys()].map(t=>e.shr(t).mask(1).eq(1)?t:null).filter(Ll)},vi=async(n,e,t,a)=>{if(F.from(t).eq(F.from(a)))return I5;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)},Ba=n=>E5(C5(n));var Er=async(n,e)=>(await Ti.connect(n,e).version()).toNumber(),jl=(n,e)=>n.map(t=>{try{return e.parseLog(t)}catch{return null}}).filter(Ll);var{hexDataSlice:Hl}=ae,{MaxUint256:S5}=ht,Ec=n=>{let e=Hl(n,0,3),t=F.from(Hl(n,4,35)),a=F.from(Hl(n,36,67));return{sig:e,permissionDomainId:t,childSkillIndex:a}},Cc=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),S5,r];let o=F.from(_e.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 vi(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]},R5=async(n,e,t,a,i)=>{let r=await Promise.all(a.map(s=>Cc(n,e,t,s,i)));for(let s=0;sArray.isArray(a)?a.length===1?ta(n,e,t,a[0],i):R5(n,e,t,a,i):Cc(n,e,t,a,i);var{MaxUint256:Ic}=ht,{AddressZero:P5}=ht;async function N5(n,e){let t;try{return t=await n.getCapabilityRoles(ae.hexZeroPad(e,4)),su(t)}catch{return[]}}async function Cs(n,e,t,a,i,r,s){let o,{skillId:l}=await e.getDomain(i),{sig:p,permissionDomainId:f,childSkillIndex:x}=Ec(s),I=gi.connect(r,a.signer||a.provider),_=await N5(I,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 ${_e.RootDomain}`);o=Ic}else{let{skillId:U}=await e.getDomain(f),H=await n.getChildSkillId(U,x);if(H.eq(l))o=Ic;else{let{children:E}=await n.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,P5);return{actionCid:o,key:v,value:S,branchMask:L,siblings:O}}var{AddressZero:D5}=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,a){this.colony=t,this.network=e;let i=a?.network||Pn.ArbitrumOne;this.endpointUrl=a?.customEndpointUrl||Mr[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 na.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 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 a=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${a}/${i}`;return na.fetchReputation(r)}async getTotalReputation(e,t){let a=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${a}/${i}/${D5}/noProof`,s=await na.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 Mt=n=>Array.from(Array(n-1)).map((e,t)=>t+1);var Sc=10,lk=Mt(Sc),Rc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Pc=Sc-1;var Nc=3,fk=Mt(Nc),Dc={1:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],2:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]},Oc=Nc-1;var Bc=10,hk=Mt(Bc),Fc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Lc=Bc-1;var Uc=7,gk=Mt(Uc),Vc={1:[],2:[],3:[],4:[],5:[],6:[]},jc=Uc-1;var Hc=8,wk=Mt(Hc),qc={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3],6:[1,2,3],7:[1,2,3]},Gc=Hc-1;var zc=5,Ak=Mt(zc),Kc={1:[1,2,3,4,5,6,7,8,9,10,11,12,13],2:[1,2,3,4,5,6,7,8,9,10,11,12,13],3:[1,2,3,4,5,6,7,8,9,10,11,12,13],4:[1,2,3,4,5,6,7,8,9,10,11,12,13]},Wc=zc-1;var Jc=7,Ck=Mt(Jc),$c={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3],6:[1,2,3]},Qc=Jc-1;var Xc=10,Rk=Mt(Xc),Yc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Zc=Xc-1;var em=14,Dk=Mt(em),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],11:[1,2,3,4,5,6],12:[1,2,3,4,5,6],13:[1,2,3,4,5,6]},Gl=em-1;var tm=18,O5=Mt(tm),Fk=tm-1;var B5=(n,e)=>{switch(n){case Ae.FundingQueue:return Rc[e];case Ae.IVotingReputation:return ql[e];case Ae.MultisigPermissions:return Dc[e];case Ae.OneTxPayment:return Fc[e];case Ae.ReputationBootstrapper:return Vc[e];case Ae.StagedExpenditure:return Kc[e];case Ae.StakedExpenditure:return qc[e];case Ae.StreamingPayments:return $c[e];case Ae.TokenSupplier:return Yc[e];case Ae.VotingReputation:return ql[e];default:return Mc(n,"Could not find extension with name")}},wi=(n,e,t)=>{let a=B5(n,e);return!!a&&!a.includes(t)};var F5={[Ae.FundingQueue]:Pc,[Ae.IVotingReputation]:Gl,[Ae.MultisigPermissions]:Oc,[Ae.OneTxPayment]:Lc,[Ae.ReputationBootstrapper]:jc,[Ae.StagedExpenditure]:Wc,[Ae.StakedExpenditure]:Gc,[Ae.StreamingPayments]:Qc,[Ae.TokenSupplier]:Zc,[Ae.VotingReputation]:Gl};var _6=wn(nm(),1);var yp=wn(T6(),1);var Re;(function(n){n.DEFAULT="default",n.Annotation="annotation",n.Colony="colony",n.Decision="decision",n.Domain="domain",n.Misc="misc"})(Re||(Re={}));var pp=2,lp;(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"})(lp||(lp={}));var v6=n=>`Validation error(s): +`)}static register(e,t){if(t||(t=e.locale),Ix)try{let a=window;a._ethers&&a._ethers.wordlists&&(a._ethers.wordlists[t]||B(a._ethers.wordlists,t,e))}catch{}}};var Sx="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo",ts=null;function uf(n){if(ts==null&&(ts=Sx.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),hn.check(n)!=="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"))throw ts=null,new Error("BIP39 Wordlist for en (English) FAILED")}var tl=class extends hn{constructor(){super("en")}getWord(e){return uf(this),ts[e]}getWordIndex(e){return uf(this),ts.indexOf(e)}},nl=new tl;hn.register(nl);var hi={en:nl};var df="hdnode/5.7.0";var ns=new M(df),Rx=F.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),Px=ve("Bitcoin seed"),fr=2147483648;function pf(n){return(1<=256)throw new Error("Depth too large!");return lf(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(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 a=new Uint8Array(37);if(e&fr){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(fa(Qn.sha512,this.chainCode,a)),r=i.slice(0,32),s=i.slice(32),o=null,l=null;this.privateKey?o=Do(F.from(r).add(this.privateKey).mod(Rx)):l=new cn(K(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 Ct(yr,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 a=this;for(let i=0;i=fr)throw new Error("invalid path index - "+r);a=a._derive(fr+s)}else if(r.match(/^[0-9]+$/)){let s=parseInt(r);if(s>=fr)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(fa(Qn.sha512,Px,a));return new Ct(yr,Do(i.slice(0,32)),null,"0x00000000",Do(i.slice(32)),0,0,t)}static fromMnemonic(e,t,a){return a=al(a),e=xi(cr(e,a),a),Ct._fromSeed(il(e,t),{phrase:e,path:"m",locale:a.locale})}static fromSeed(e){return Ct._fromSeed(e,null)}static fromExtendedKey(e){let t=ya.decode(e);(t.length!==82||lf(t.slice(0,78))!==e)&&ns.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");let a=t[4],i=K(t.slice(5,9)),r=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(yr,null,K(o),i,s,r,a,null);case"0x0488ade4":case"0x04358394 ":if(o[0]!==0)break;return new Ct(yr,K(o.slice(1)),null,i,s,r,a,null)}return ns.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}};function il(n,e){e||(e="");let t=ve("mnemonic"+e,Gt.NFKD);return mi(ve(n,Gt.NFKD),t,2048,64,"sha512")}function cr(n,e){e=al(e),ns.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=pf(s);if((j(Xt(a.slice(0,r/8)))[0]&o)!==(a[a.length-1]&o))throw new Error("invalid checksum");return K(a.slice(0,r/8))}function xi(n,e){if(e=al(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]&Nx(8-a)),a+=3);let i=n.length/4,r=j(Xt(n))[0]&pf(i);return t[t.length-1]<<=i,t[t.length-1]|=r>>8-i,e.join(t.map(s=>e.getWord(s)))}function yf(n,e){try{return cr(n,e),!0}catch{}return!1}function ff(n){return(typeof n!="number"||n<0||n>=fr||n%1)&&ns.throwArgumentError("invalid account index","index",n),`m/44'/60'/${n}'/0/0`}var cf="random/5.7.0";var rl=new M(cf);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 mf=Dx(),Oo=mf.crypto||mf.msCrypto;(!Oo||!Oo.getRandomValues)&&(rl.warn("WARNING: Missing strong random number source"),Oo={getRandomValues:function(n){return rl.throwError("no secure random source avaialble",M.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function Xn(n){(n<=0||n>1024||n%1||n!=n)&&rl.throwArgumentError("invalid length","length",n);let e=new Uint8Array(n);return Oo.getRandomValues(e),j(e)}function as(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 ul=wn(ol());var Bo="json-wallets/5.7.0";function ma(n){return typeof n=="string"&&n.substring(0,2)!=="0x"&&(n="0x"+n),j(n)}function mr(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),E=new ha.default.Counter(x),J=new ha.default.ModeOfOperation.ctr(O,E),$=j(J.encrypt(i)),de=fe(ye([U,$])),T={address:n.address.substring(2).toLowerCase(),id:xf(I),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:K(x).substring(2)},ciphertext:K($).substring(2),kdf:"scrypt",kdfparams:{salt:K(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)),C=new Date,u=C.getUTCFullYear()+"-"+mr(C.getUTCMonth()+1,2)+"-"+mr(C.getUTCDate(),2)+"T"+mr(C.getUTCHours(),2)+"-"+mr(C.getUTCMinutes(),2)+"-"+mr(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:l,version:"0.1"}}return JSON.stringify(T)})}function Mf(n,e,t){if(Fo(n)){t&&t(0);let a=ll(n,e);return t&&t(1),Promise.resolve(a)}return Lo(n)?Af(n,e,t):Promise.reject(new Error("invalid JSON wallet"))}function Ef(n,e){if(Fo(n))return ll(n,e);if(Lo(n))return kf(n,e);throw new Error("invalid JSON wallet")}var Cf="wallet/5.7.0";var If=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},hr=new M(Cf);function Ux(n){return n!=null&&ie(n.privateKey,32)&&n.address!=null}function Vx(n){let e=n.mnemonic;return e&&e.phrase}var Cn=class extends St{constructor(e,t){if(super(),Ux(e)){let a=new cn(e.privateKey);if(B(this,"_signingKey",()=>a),B(this,"address",mn(this.publicKey)),this.address!==ce(e.address)&&hr.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),Vx(e)){let i=e.mnemonic;B(this,"_mnemonic",()=>({phrase:i.phrase,path:i.path||ca,locale:i.locale||"en"}));let r=this.mnemonic,s=Ct.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 a=new cn(e);B(this,"_signingKey",()=>a)}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 Ie(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 a=this._signingKey().signDigest(fe(Yr(t)));return Yr(t,a)})}signMessage(e){return If(this,void 0,void 0,function*(){return Br(this._signingKey().signDigest(Zi(e)))})}_signTypedData(e,t,a){return If(this,void 0,void 0,function*(){let i=yield bt.resolveNames(e,t,a,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,a){if(typeof t=="function"&&!a&&(a=t,t={}),a&&typeof a!="function")throw new Error("invalid callback");return t||(t={}),ml(this,e,t,a)}static createRandom(e){let t=Xn(16);e||(e={}),e.extraEntropy&&(t=j(Ce(fe(ye([t,e.extraEntropy])),0,16)));let a=xi(t,e.locale);return Cn.fromMnemonic(a,e.path,e.locale)}static fromEncryptedJson(e,t,a){return Mf(e,t,a).then(i=>new Cn(i))}static fromEncryptedJsonSync(e,t){return new Cn(Ef(e,t))}static fromMnemonic(e,t,a){return t||(t=ca),new Cn(Ct.fromMnemonic(e,null,a).derivePath(t))}};function Sf(n,e){return yi(Zi(n),e)}function Rf(n,e,t,a){return yi(bt.hash(n,e,t),a)}var ea={};ji(ea,{AlchemyProvider:()=>wr,AlchemyWebSocketProvider:()=>ms,AnkrProvider:()=>hs,BaseProvider:()=>Zn,CloudflareProvider:()=>xs,EtherscanProvider:()=>bs,FallbackProvider:()=>Ts,Formatter:()=>Y,InfuraProvider:()=>kr,InfuraWebSocketProvider:()=>ws,IpcProvider:()=>Cl,JsonRpcBatchProvider:()=>eu,JsonRpcProvider:()=>Yt,JsonRpcSigner:()=>Tr,NodesmithProvider:()=>_s,PocketProvider:()=>ks,Provider:()=>$t,Resolver:()=>gr,StaticJsonRpcProvider:()=>cs,UrlJsonRpcProvider:()=>It,Web3Provider:()=>As,WebSocketProvider:()=>ga,getDefaultProvider:()=>tu,getNetwork:()=>rs,isCommunityResourcable:()=>bl,isCommunityResource:()=>us,showThrottleMessage:()=>Yn});var Pf="networks/5.7.1";var Nf=new M(Pf);function jx(n){return n&&typeof n.renetwork=="function"}function xa(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 xa(t)},e}function jo(n,e){let t=function(a,i){return a.JsonRpcProvider?new a.JsonRpcProvider(n,e):null};return t.renetwork=function(a){return jo(n,a)},t}var Df={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:xa("homestead")},Of={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:xa("ropsten")},Bf={chainId:63,name:"classicMordor",_defaultProvider:jo("https://www.ethercluster.com/mordor","classicMordor")},Vo={unspecified:{chainId:0,name:"unspecified"},homestead:Df,mainnet:Df,morden:{chainId:2,name:"morden"},ropsten:Of,testnet:Of,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:Bf,classicTestnet:Bf,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 rs(n){if(n==null)return null;if(typeof n=="number"){for(let a in Vo){let i=Vo[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=Vo[n];return a==null?null:{name:a.name,chainId:a.chainId,ensAddress:a.ensAddress,_defaultProvider:a._defaultProvider||null}}let e=Vo[n.name];if(!e)return typeof n.chainId!="number"&&Nf.throwArgumentError("invalid network chainId","network",n),n;n.chainId!==0&&n.chainId!==e.chainId&&Nf.throwArgumentError("network chainId mismatch","network",n);let t=n._defaultProvider||null;return t==null&&e._defaultProvider&&(jx(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 Ff="web/5.7.1";var Hx=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})};function Lf(n,e){return Hx(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 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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},In=new M(Ff);function Uf(n){return new Promise(e=>{setTimeout(e,n)})}function Da(n,e){if(n==null)return null;if(typeof n=="string")return n;if(aa(n)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return Jt(n)}catch{}return K(n)}return n}function Gx(n){return ve(n.replace(/%([0-9a-f][0-9a-f])/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))}function hl(n,e,t){let a=typeof n=="object"&&n.throttleLimit!=null?n.throttleLimit:12;In.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;In.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"},f=!1,x=2*60*1e3;if(typeof n=="string")l=n;else if(typeof n=="object"){if((n==null||n.url==null)&&In.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&&(f=!0);if(p.allowGzip=!!n.allowGzip,n.user!=null&&n.password!=null){l.substring(0,6)!=="https:"&&n.allowInsecureAuthentication!==!0&&In.throwError("basic authentication requires a secure https url",M.errors.INVALID_ARGUMENT,{argument:"url",url:l,user:n.user,password:"[REDACTED]"});let O=n.user+":"+n.password;o.authorization={key:"Authorization",value:"Basic "+Yi(ve(O))}}n.skipFetchSetup!=null&&(p.skipFetchSetup=!!n.skipFetchSetup),n.fetchOptions!=null&&(p.fetchOptions=we(n.fetchOptions))}let I=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),_=l?l.match(I):null;if(_)try{let O={statusCode:200,statusMessage:"OK",headers:{"content-type":_[1]||"text/plain"},body:_[2]?Xi(_[3]):Gx(_[3])},U=O.body;return t&&(U=t(O.body,O)),Promise.resolve(U)}catch(O){In.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(In.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 qx(this,void 0,void 0,function*(){for(let O=0;O=300)&&(S.cancel(),In.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){In.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 n=="string"?{url:n}:we(n);r.headers?Object.keys(r.headers).filter(o=>o.toLowerCase()==="content-type").length!==0||(r.headers=we(r.headers),r.headers["content-type"]="application/json"):r.headers={"content-type":"application/json"},n=r}return hl(n,i,a)}function Rn(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,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(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()&&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(f){s()&&a(f)})}p()})}var wl=wn(qf());var ke="providers/5.7.2";var os=new M(ke),Y=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),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(a),maxPriorityFeePerGas:Y.allowNull(a),maxFeePerGas:Y.allowNull(a),gasLimit:a,to:Y.allowNull(t,null),value:a,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(a),gasPrice:Y.allowNull(a),maxPriorityFeePerGas:Y.allowNull(a),maxFeePerGas:Y.allowNull(a),to:Y.allowNull(t),value:Y.allowNull(a),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:a,logsBloom:Y.allowNull(r),blockHash:s,transactionHash:s,logs:Y.arrayOf(this.receiptLog.bind(this)),blockNumber:l,confirmations:Y.allowNull(l,null),cumulativeGasUsed:a,effectiveGasPrice:Y.allowNull(a),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:a,gasUsed:a,miner:Y.allowNull(t),extraData:r,transactions:Y.allowNull(Y.arrayOf(s)),baseFeePerGas:Y.allowNull(a)},e.blockWithTransactions=we(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():os.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 ce(e)}callAddress(e){if(!ie(e,32))return null;let t=ce(Ce(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 a=this.hex(e,t);return Nt(a)!==32?os.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 me(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=Y.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 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 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 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 a=F.from(t.root).toNumber();a===0||a===1?(t.status!=null&&t.status!==a&&os.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=a,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 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 bl(n){return n&&typeof n.isCommunityResource=="function"}function us(n){return bl(n)&&n.isCommunityResource()}var Gf=!1;function Yn(){Gf||(Gf=!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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},he=new M(ke),Yx=10;function zf(n){return n==null?"null":(Nt(n)!==32&&he.throwArgumentError("invalid topic","topic",n),n.toLowerCase())}function Kf(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[zf(i)]=!0});let a=Object.keys(t);return a.sort(),a.join("|")}else return zf(e)}).join("&")}function Zx(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 br(n){if(typeof n=="string"){if(n=n.toLowerCase(),Nt(n)===32)return"tx:"+n;if(n.indexOf(":")===-1)return n}else{if(Array.isArray(n))return"filter:*:"+Kf(n);if(xo.isForkEvent(n))throw he.warn("not implemented"),new Error("not implemented");if(n&&typeof n=="object")return"filter:"+(n.address||"*")+":"+Kf(n.topics||[])}throw new Error("invalid event - "+n)}function ds(){return new Date().getTime()}function Wf(n){return new Promise(e=>{setTimeout(e,n)})}var e5=["block","network","pending","poll"],_l=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=Zx(e[2]),i={};return a.length>0&&(i.topics=a),t&&t!=="*"&&(i.address=t),i}pollable(){return this.tag.indexOf(":")>=0||e5.indexOf(this.tag)>=0}},t5={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 gl(n){return me(F.from(n).toHexString(),32)}function Jf(n){return ya.encode(ye([n,Ce(Xt(Xt(n)),0,4)]))}var Xf=new RegExp("^(ipfs)://(.*)$","i"),$f=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),Xf,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function zo(n,e){try{return Jt(ls(n,e))}catch{}return null}function ls(n,e){if(n==="0x")return null;let t=F.from(Ce(n,e,e+32)).toNumber(),a=F.from(Ce(n,t,t+32)).toNumber();return Ce(n,t+32,t+32+a)}function Tl(n){return n.match(/^ipfs:\/\/ipfs\//i)?n=n.substring(12):n.match(/^ipfs:\/\//i)?n=n.substring(7):he.throwArgumentError("unsupported IPFS format","link",n),`https://gateway.ipfs.io/ipfs/${n}`}function Qf(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 n5(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===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 a={to:this.address,ccipReadEnabled:!0,data:_t([e,Ca(this.name),t||"0x"])},i=!1;(yield this.supportsWildcard())&&(i=!0,a.data=_t(["0x9061b923",Yf([Jr(this.name),a.data])]));try{let r=yield this.provider.call(a);return j(r).length%32===4&&he.throwError("resolver threw error",M.errors.CALL_EXCEPTION,{transaction:a,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 a=yield this._fetch(e,t);return a!=null?ls(a,0):null})}_getAddress(e,t){let a=t5[String(e)];if(a==null&&he.throwError(`unsupported coin type: ${e}`,M.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 Jf(ye([[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 Jf(ye([[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=wl.default.toWords(i.slice(2));return o.unshift(s),wl.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===$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",gl(e));if(t==null||t==="0x")return null;let a=this._getAddress(e,t);return a==null&&he.throwError("invalid or unsupported coin data",M.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;a<$f.length;a++){let i=t.match($f[a]);if(i==null)continue;let r=i[1].toLowerCase();switch(r){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:Tl(t)};case"erc721":case"erc1155":{let s=r==="erc721"?"0xc87b56dd":"0x0e89341c";e.push({type:r,content:t});let o=this._resolvedAddress||(yield this.getAddress()),l=(i[2]||"").split("/");if(l.length!==2)return null;let p=yield this.provider.formatter.address(l[0]),f=me(F.from(l[1]).toHexString(),32);if(r==="erc721"){let S=this.provider.formatter.callAddress(yield this.provider.call({to:p,data:_t(["0x6352211e",f])}));if(o!==S)return null;e.push({type:"owner",content:S})}else if(r==="erc1155"){let S=F.from(yield this.provider.call({to:p,data:_t(["0x00fdd58e",me(o,32),f])}));if(S.isZero())return null;e.push({type:"balance",content:S.toString()})}let x={to:this.provider.formatter.address(l[0]),data:_t([s,f])},I=zo(yield this.provider.call(x),0);if(I==null)return null;e.push({type:"metadata-url-base",content:I}),r==="erc1155"&&(I=I.replace("{id}",f.substring(2)),e.push({type:"metadata-url-expanded",content:I})),I.match(/^ipfs:/i)&&(I=Tl(I)),e.push({type:"metadata-url",content:I});let _=yield Sn(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(Xf)==null)return null;e.push({type:"url-ipfs",content:v}),v=Tl(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://"+ya.encode("0x"+t[1])}let a=e.match(/^0xe5010172(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(a){let s=parseInt(a[3],16);if(a[4].length===s*2)return"ipns://"+ya.encode("0x"+a[1])}let i=e.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(i&&i[1].length===32*2)return"bzz://"+i[1];let r=e.match(/^0x90b2c605([0-9a-f]*)$/);if(r&&r[1].length===34*2){let s={"=":"","+":"-","/":"_"},o=Yi("0x"+r[1]).replace(/[=+\/]/g,l=>s[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([gl(64),gl(t.length),t]),t.length%32!==0&&(t=ye([t,me("0x",32-e.length%32)]));let a=yield this._fetchBytes("0x59d1d43c",K(t));return a==null||a==="0x"?null:Jt(a)})}},vl=null,a5=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 Rn(()=>this._ready().then(e=>e,e=>{if(!(e.code===M.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return vl==null&&(vl=new Y),vl}static getNetwork(e){return rs(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 Sn({url:p,errorPassThrough:!0},f,(_,v)=>(_.status=v.statusCode,_));if(x.data)return x.data;let I=x.message||"unknown error";if(x.status>=400&&x.status<500)return he.throwError(`response not found during CCIP fetch: ${I}`,M.errors.SERVER_ERROR,{url:l,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: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(ds()-r.respTime<=e)return r.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}let t=ds(),a=Ie({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=ds();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=a5++,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)he.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${a})`),this.emit("error",he.makeError("network block skew detected",M.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 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 Wf(0),this._network;let a=he.makeError("underlying network changed",M.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=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,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,f=function(){return p?!0:(p=!0,l.forEach(I=>{I()}),!1)},x=I=>{I.confirmations{this.removeListener(e,x)}),i){let I=i.startBlock,_=null,v=S=>ue(this,void 0,void 0,function*(){p||(yield Wf(1e3),this.getTransactionCount(i.from).then(L=>ue(this,void 0,void 0,function*(){if(!p){if(L<=i.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),l.push(()=>{this.removeListener("block",v)})}if(typeof a=="number"&&a>0){let I=setTimeout(()=>{f()||o(he.makeError("timeout exceeded",M.errors.TIMEOUT,{timeout:a}))},a);I.unref&&I.unref(),l.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 a=yield Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getBalance",a);try{return F.from(i)}catch(r){return he.throwError("bad result from backend",M.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 Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getTransactionCount",a);try{return F.from(i).toNumber()}catch(r){return he.throwError("bad result from backend",M.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 Ie({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getCode",a);try{return K(i)}catch(r){return he.throwError("bad result from backend",M.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 Ie({address:this._getAddress(e),blockTag:this._getBlockTag(a),position:Promise.resolve(t).then(s=>Ln(s))}),r=yield this.perform("getStorageAt",i);try{return K(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,a){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&&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&&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=>K(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?K(r):null))}),this.formatter.transactionRequest(yield Ie(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 Ie(t))})}_call(e,t,a){return ue(this,void 0,void 0,function*(){a>=Yx&&he.throwError("CCIP read exceeded maximum redirections",M.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"&&Nt(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",M.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(),f=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&&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 Rn(()=>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 Rn(()=>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 Ie({filter:this._getFilter(e)}),a=yield this.perform("getLogs",t);return a.forEach(i=>{i.removed==null&&(i.removed=!1)}),Y.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&&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 a=yield this._getResolver(t,"getResolver");if(a!=null){let i=new gr(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||he.throwError("network does not support ENS",M.errors.UNSUPPORTED_OPERATION,{operation:t,network:a.name});try{let i=yield this.call({to:a.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(a){if(ie(e))throw a}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",a=yield this._getResolver(t,"lookupAddress");if(a==null)return null;let i=zo(yield this.call({to:a,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 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=zo(yield this.call({to:s,data:"0x691f3431"+Ca(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 a=yield t.getAvatar();return a==null?null:a.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,a){let i=new _l(br(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=br(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=br(e);return this._events.filter(a=>a.tag===t).length}listeners(e){if(e==null)return this._events.map(a=>a.listener);let t=br(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=br(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=br(e);this._events=this._events.filter(i=>i.tag!==a?!0:(t.push(i),!1))}return t.forEach(a=>{this._stopEvent(a)}),this}};var ba=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},At=new M(ke),i5=["call","estimateGas"];function ys(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=ys(n[t],e);if(a)return a}return null}if(typeof n=="string")try{return ys(JSON.parse(n),e)}catch{}return null}function ec(n,e,t){let a=t.transaction||t.signedTransaction;if(n==="call"){let r=ys(e,!0);if(r)return r.data;At.throwError("missing revert data in call exception; Transaction reverted without a reason string",M.errors.CALL_EXCEPTION,{data:"0x",transaction:a,error:e})}if(n==="estimateGas"){let r=ys(e.body,!1);r==null&&(r=ys(e,!1)),r&&At.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",M.errors.UNPREDICTABLE_GAS_LIMIT,{reason:r.message,method:n,transaction:a,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)&&At.throwError("insufficient funds for intrinsic transaction cost",M.errors.INSUFFICIENT_FUNDS,{error:e,method:n,transaction:a}),i.match(/nonce (is )?too low/i)&&At.throwError("nonce has already been used",M.errors.NONCE_EXPIRED,{error:e,method:n,transaction:a}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&At.throwError("replacement fee too low",M.errors.REPLACEMENT_UNDERPRICED,{error:e,method:n,transaction:a}),i.match(/only replay-protected/i)&&At.throwError("legacy pre-eip-155 transactions not supported",M.errors.UNSUPPORTED_OPERATION,{error:e,method:n,transaction:a}),i5.indexOf(n)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&At.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",M.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,method:n,transaction:a}),e}function Zf(n){return new Promise(function(e){setTimeout(e,n)})}function r5(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 ps(n){return n&&n.toLowerCase()}var kl={},Tr=class extends St{constructor(e,t,a){if(super(),e!==kl)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)):At.throwArgumentError("invalid address or index","addressOrIndex",a)}connect(e){return At.throwError("cannot alter JSON-RPC Signer connection",M.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new Al(kl,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&&At.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(a=>(a&&(a=a.toLowerCase()),a));if(e.gasLimit==null){let a=we(e);a.from=t,e.gasLimit=this.provider.estimateGas(a)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(a=>ba(this,void 0,void 0,function*(){if(a==null)return null;let i=yield this.provider.resolveName(a);return i==null&&At.throwArgumentError("provided ENS name resolves to null","tx.to",a),i}))),Ie({tx:Ie(e),sender:t}).then(({tx:a,sender:i})=>{a.from!=null?a.from.toLowerCase()!==i&&At.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)&&At.throwError("user rejected transaction",M.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:a}),ec("sendTransaction",s,r)))})}signTransaction(e){return At.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),a=yield this.sendUncheckedTransaction(e);try{return yield Rn(()=>ba(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 ba(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(e):e,a=yield this.getAddress();try{return yield this.provider.send("personal_sign",[K(t),a.toLowerCase()])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&At.throwError("user rejected signing",M.errors.ACTION_REJECTED,{action:"signMessage",from:a,messageData:e}),i}})}_legacySignMessage(e){return ba(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(e):e,a=yield this.getAddress();try{return yield this.provider.send("eth_sign",[a.toLowerCase(),K(t)])}catch(i){throw typeof i.message=="string"&&i.message.match(/user denied/i)&&At.throwError("user rejected signing",M.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:a,messageData:e}),i}})}_signTypedData(e,t,a){return ba(this,void 0,void 0,function*(){let i=yield bt.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(bt.getPayload(i.domain,t,i.value))])}catch(s){throw typeof s.message=="string"&&s.message.match(/user denied/i)&&At.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,a=yield this.getAddress();return t.send("personal_unlockAccount",[a.toLowerCase(),e,null])})}},Al=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:a=>this.provider.waitForTransaction(t,a)}))}},s5={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 a=t;a==null&&(a=new Promise((i,r)=>{setTimeout(()=>{this.detectNetwork().then(s=>{i(s)},s=>{r(s)})},0)})),super(a),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 ba(this,void 0,void 0,function*(){yield Zf(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(a){return At.throwError("could not detect network",M.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:a})}}return At.throwError("could not detect network",M.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new Tr(kl,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:ct(a),provider:this});let i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];let r=Sn(this.connection,JSON.stringify(a),r5).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",[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 a=mt(this.constructor,"hexlifyTransaction");return["eth_call",[a(t.transaction,{from:!0}),t.blockTag]]}case"estimateGas":{let a=mt(this.constructor,"hexlifyTransaction");return["eth_estimateGas",[a(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 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=we(t),t.transaction=we(i),delete t.transaction.type)}}let a=this.prepareRequest(e,t);a==null&&At.throwError(e+" not implemented",M.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(a[0],a[1])}catch(i){return ec(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 Zf(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=we(s5);if(t)for(let r in t)t[r]&&(a[r]=!0);Gi(e,a);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]=K(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(ke);vr=function(){e.throwError("WebSockets not supported in this environment",M.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var Ml=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Ko=new M(ke),o5=1,ga=class extends Yt{constructor(e,t){t==="any"&&Ko.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 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){Ko.throwError("cannot reset events block on WebSocketProvider",M.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(e){Ko.throwError("cannot set polling interval on WebSocketProvider",M.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return Ml(this,void 0,void 0,function*(){return null})}set polling(e){!e||Ko.throwError("cannot set polling on WebSocketProvider",M.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(e,t){let a=o5++;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 Ml(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 Ml(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 u5=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},fs=new M(ke),cs=class extends Yt{detectNetwork(){let e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return u5(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 cs{constructor(e,t){fs.checkAbstract(new.target,It),e=mt(new.target,"getNetwork")(e),t=mt(new.target,"getApiKey")(t);let a=mt(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(){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 tc=new M(ke),Wo="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC",ms=class extends ga{constructor(e,t){let a=new wr(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===Wo}},wr=class extends It{static getWebSocketProvider(e,t){return new ms(e,t)}static getApiKey(e){return e==null?Wo:(e&&typeof e!="string"&&tc.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:tc.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+a+t,throttleCallback:(i,r)=>(t===Wo&&Yn(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===Wo}};var d5=new M(ke),Jo="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function l5(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 d5.throwArgumentError("unsupported network","name",n)}var hs=class extends It{isCommunityResource(){return this.apiKey===Jo}static getApiKey(e){return e??Jo}static getUrl(e,t){t==null&&(t=Jo);let a={allowGzip:!0,url:"https://"+l5(e.name)+t,throttleCallback:(i,r)=>(t.apiKey===Jo&&Yn(),Promise.resolve(!0))};return t.projectSecret!=null&&(a.user="",a.password=t.projectSecret),a}};var p5=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},nc=new M(ke),xs=class extends It{static getApiKey(e){return e!=null&&nc.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:nc.throwArgumentError("unsupported network","network",arguments[0])}return a}perform(e,t){let a=Object.create(null,{perform:{get:()=>super.perform}});return p5(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 $o=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Oa=new M(ke);function ac(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=Ln(K(a)):t==="accessList"?a="["+sn(a).map(i=>`{address:"${i.address}",storageKeys:["${i.storageKeys.join('","')}"]}`).join(",")+"]":a=K(a),e[t]=a)}return e}function y5(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 ic(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 rc(n){if(n==="pending")throw new Error("pending not supported");return n==="latest"?n:parseInt(n.substring(2),16)}function El(n,e,t){if(n==="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 a=e.message;throw e.code===M.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/)&&Oa.throwError("insufficient funds for intrinsic transaction cost",M.errors.INSUFFICIENT_FUNDS,{error:e,method:n,transaction:t}),a.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:n,transaction:t}),a.match(/another transaction with same nonce/)&&Oa.throwError("replacement fee too low",M.errors.REPLACEMENT_UNDERPRICED,{error:e,method:n,transaction:t}),a.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:n,transaction:t}),e}var bs=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 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 $o(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"?ic:y5;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 Sn(o,l,s||ic);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 a=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=>El("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=ac(t.transaction);i.module="proxy",i.action="eth_call";try{return yield this.fetch("proxy",i,!0)}catch(r){return El("call",r,t.transaction)}}case"estimateGas":{let i=ac(t.transaction);i.module="proxy",i.action="eth_estimateGas";try{return yield this.fetch("proxy",i,!0)}catch(r){return El("estimateGas",r,t.transaction)}}case"getLogs":{let i={action:"getLogs"};if(t.filter.fromBlock&&(i.fromBlock=rc(t.filter.fromBlock)),t.filter.toBlock&&(i.toBlock=rc(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(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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},bi=new M(ke);function Qo(){return new Date().getTime()}function sc(n){let e=null;for(let t=0;te?null:(a+i)/2}function _r(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=>_r(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=_r(a),JSON.stringify(t)+":"+a}).join(",")+"}"}throw new Error("unknown value type: "+typeof n)}var f5=1;function uc(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 c5=[M.errors.CALL_EXCEPTION,M.errors.INSUFFICIENT_FUNDS,M.errors.NONCE_EXPIRED,M.errors.REPLACEMENT_UNDERPRICED,M.errors.UNPREDICTABLE_GAS_LIMIT],m5=["address","args","errorArgs","errorSignature","method","transaction"];function Xo(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 h5(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 x5(n,e,t){let a=_r;switch(e){case"getBlockNumber":return function(i){let r=i.map(o=>o.result),s=oc(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 oc(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=we(i),i.confirmations=-1,_r(i))};break;case"getBlock":t.includeTransactions?a=function(i){return i==null?null:(i=we(i),i.transactions=i.transactions.map(r=>(r=we(r),r.confirmations=-1,r)),_r(i))}:a=function(i){return i==null?null:_r(i)};break;default:throw new Error("unknown method: "+e)}return h5(a,n.quorum)}function gs(n,e){return Yo(this,void 0,void 0,function*(){let t=n.provider;return t.blockNumber!=null&&t.blockNumber>=e||e===-1?t:Rn(()=>new Promise((a,i)=>{setTimeout(function(){return t.blockNumber>=e?a(t):n.cancelled?a(null):a(void 0)},0)}),{oncePoll:t})})}function b5(n,e,t,a){return Yo(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 gs(n,e)),i[t](a.address,a.blockTag||"latest");case"getStorageAt":return a.blockTag&&ie(a.blockTag)&&(i=yield gs(n,e)),i.getStorageAt(a.address,a.position,a.blockTag||"latest");case"getBlock":return a.blockTag&&ie(a.blockTag)&&(i=yield gs(n,e)),i[a.includeTransactions?"getBlockWithTransactions":"getBlock"](a.blockTag||a.blockHash);case"call":case"estimateGas":return a.blockTag&&ie(a.blockTag)&&(i=yield gs(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 gs(n,e)),i.getLogs(r)}}return bi.throwError("unknown method error",M.errors.UNKNOWN_ERROR,{method:t,params:a})})}var Ts=class extends Zn{constructor(e,t){e.length===0&&bi.throwArgumentError("missing providers","providers",e);let a=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=we(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)&&bi.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&&bi.throwArgumentError("quorum will always fail; larger than total weight","quorum",t);let r=sc(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 Yo(this,void 0,void 0,function*(){let e=yield Promise.all(this.providerConfigs.map(t=>t.provider.getNetwork()));return sc(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=b5(_,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 _=a(x);if(_!==void 0)return i.forEach(v=>{v.staller&&v.staller.cancel(),v.cancelled=!0}),_;o||(yield uc(100).getPromise()),o=!1}let I=i.reduce((_,v)=>{if(!v.done||v.error==null)return _;let S=v.error.code;return c5.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={};m5.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 Cl=null;var Zo=new M(ke),vs="84842078b09946638c03157f83405213",ws=class extends ga{constructor(e,t){let a=new kr(e,t),i=a.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",a.projectId),B(this,"projectId",a.projectId),B(this,"projectSecret",a.projectSecret)}isCommunityResource(){return this.projectId===vs}},kr=class extends It{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?(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 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:Zo.throwError("unsupported network",M.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let i={allowGzip:!0,url:"https://"+a+"/v3/"+t.projectId,throttleCallback:(r,s)=>(t.projectId===vs&&Yn(),Promise.resolve(!0))};return t.projectSecret!=null&&(i.user="",i.password=t.projectSecret),i}isCommunityResource(){return this.projectId===vs}};var eu=class extends Yt{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:ct(o),provider:this}),Sn(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 I=new Error(x.error.message);I.code=x.error.code,I.data=x.error.data,p.reject(I)}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(ke),g5="ETHERS_JS_SHARED",_s=class extends It{static getApiKey(e){return e&&typeof e!="string"&&Il.throwArgumentError("invalid apiKey","apiKey",e),e||g5}static getUrl(e,t){Il.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:Il.throwArgumentError("unsupported network","network",arguments[0])}return a+"?apiKey="+t}};var dc=new M(ke),lc="62e1ad51b37b8e00394bda3b",ks=class extends It{static getApiKey(e){let t={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return e==null?t.applicationId=lc:typeof e=="string"?t.applicationId=e:e.applicationSecretKey!=null?(t.applicationId=e.applicationId,t.applicationSecretKey=e.applicationSecretKey):e.applicationId?t.applicationId=e.applicationId:dc.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:dc.throwError("unsupported network",M.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===lc}};var pc=new M(ke),T5=1;function yc(n,e){let t="Web3LegacyFetcher";return function(a,i){let r={method:a,params:i,id:T5++,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 v5(n){return function(e,t){t==null&&(t=[]);let a={method:e,params:t};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:ct(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 As=class extends Yt{constructor(e,t){e==null&&pc.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=v5(e)):e.sendAsync?i=yc(e,e.sendAsync.bind(e)):e.send?i=yc(e,e.send.bind(e)):pc.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 fc=new M(ke);function tu(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 Yt(n);case"ws":case"wss":return new ga(n);default:fc.throwArgumentError("unsupported URL scheme","network",n)}}let t=rs(n);return(!t||!t._defaultProvider)&&fc.throwError("unsupported getDefaultProvider network",M.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:n}),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 ae={};ji(ae,{AbiCoder:()=>Qi,ConstructorFragment:()=>Dt,ErrorFragment:()=>tn,EventFragment:()=>Ht,FormatTypes:()=>ge,Fragment:()=>qt,FunctionFragment:()=>Ot,HDNode:()=>Ct,Indexed:()=>oa,Interface:()=>Ia,LogDescription:()=>er,Logger:()=>M,ParamType:()=>pt,RLP:()=>Xs,SigningKey:()=>cn,SupportedAlgorithm:()=>Qn,TransactionDescription:()=>tr,TransactionTypes:()=>Eo,UnicodeNormalizationForm:()=>Gt,Utf8ErrorFuncs:()=>po,Utf8ErrorReason:()=>Bt,_TypedDataEncoder:()=>bt,_fetchData:()=>hl,_toEscapedUtf8String:()=>vd,accessListify:()=>sn,arrayify:()=>j,base58:()=>ya,base64:()=>Ed,checkProperties:()=>Gi,checkResultErrors:()=>Ki,commify:()=>vc,computeAddress:()=>mn,computeHmac:()=>fa,computePublicKey:()=>Xr,concat:()=>ye,deepCopy:()=>ct,defaultAbiCoder:()=>Kr,defaultPath:()=>ca,defineReadOnly:()=>B,dnsEncode:()=>Jr,entropyToMnemonic:()=>xi,fetchJson:()=>Sn,formatBytes32String:()=>wd,formatEther:()=>wc,formatUnits:()=>Sl,getAccountPath:()=>ff,getAddress:()=>ce,getContractAddress:()=>ui,getCreate2Address:()=>My,getIcapAddress:()=>Ay,getJsonWalletAddress:()=>pl,getStatic:()=>mt,hashMessage:()=>Zi,hexConcat:()=>_t,hexDataLength:()=>Nt,hexDataSlice:()=>Ce,hexStripZeros:()=>ld,hexValue:()=>Ln,hexZeroPad:()=>me,hexlify:()=>K,id:()=>nn,isAddress:()=>ky,isBytes:()=>on,isBytesLike:()=>aa,isHexString:()=>ie,isValidMnemonic:()=>yf,isValidName:()=>Id,joinSignature:()=>Br,keccak256:()=>fe,mnemonicToEntropy:()=>cr,mnemonicToSeed:()=>il,namehash:()=>Ca,nameprep:()=>Md,parseBytes32String:()=>_d,parseEther:()=>_c,parseTransaction:()=>Co,parseUnits:()=>Rl,poll:()=>Rn,randomBytes:()=>Xn,recoverAddress:()=>yi,recoverPublicKey:()=>Mo,resolveProperties:()=>Ie,ripemd160:()=>es,serializeTransaction:()=>Yr,sha256:()=>Xt,sha512:()=>el,shallowCopy:()=>we,shuffled:()=>as,solidityKeccak256:()=>hc,solidityPack:()=>nu,soliditySha256:()=>xc,splitSignature:()=>Un,stripZeros:()=>Zt,toUtf8Bytes:()=>ve,toUtf8CodePoints:()=>Ea,toUtf8String:()=>Jt,verifyMessage:()=>Sf,verifyTypedData:()=>Rf,zeroPad:()=>ii});var cc="solidity/5.7.0";var w5=new RegExp("^bytes([0-9]+)$"),_5=new RegExp("^(u?int)([0-9]*)$"),k5=new RegExp("^(.*)\\[([0-9]*)\\]$"),A5="0000000000000000000000000000000000000000000000000000000000000000",Ar=new M(cc);function mc(n,e,t){switch(n){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 a=n.match(_5);if(a){let i=parseInt(a[2]||"256");return(a[2]&&String(i)!==a[2]||i%8!==0||i===0||i>256)&&Ar.throwArgumentError("invalid number type","type",n),t&&(i=256),e=F.from(e).toTwos(i),ii(e,i/8)}if(a=n.match(w5),a){let i=parseInt(a[1]);return(String(i)!==a[1]||i===0||i>32)&&Ar.throwArgumentError("invalid bytes type","type",n),j(e).byteLength!==i&&Ar.throwArgumentError(`invalid value for ${n}`,"value",e),t?j((e+A5).substring(0,66)):e}if(a=n.match(k5),a&&Array.isArray(e)){let i=a[1];parseInt(a[2]||String(e.length))!=e.length&&Ar.throwArgumentError(`invalid array length for ${n}`,"value",e);let s=[];return e.forEach(function(o){s.push(mc(i,o,!0))}),ye(s)}return Ar.throwArgumentError("invalid type","type",n)}function nu(n,e){n.length!=e.length&&Ar.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);let t=[];return n.forEach(function(a,i){t.push(mc(a,e[i]))}),K(ye(t))}function hc(n,e){return fe(nu(n,e))}function xc(n,e){return Xt(nu(n,e))}var bc="units/5.7.0";var gc=new M(bc),Tc=["wei","kwei","mwei","gwei","szabo","finney","ether"];function vc(n){let e=String(n).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||n==="."||n==="-.")&&gc.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 Sl(n,e){if(typeof e=="string"){let t=Tc.indexOf(e);t!==-1&&(e=3*t)}return qi(n,e??18)}function Rl(n,e){if(typeof n!="string"&&gc.throwArgumentError("value must be a string","value",n),typeof e=="string"){let t=Tc.indexOf(e);t!==-1&&(e=3*t)}return dn(n,e??18)}function wc(n){return Sl(n,18)}function _c(n){return Rl(n,18)}var au="ethers/5.7.2";var kc=new M(au);try{let n=window;n._ethers==null&&(n._ethers=Pl)}catch{}var Pn;(function(n){n.Mainnet="Mainnet",n.Custom="Custom",n.Gnosis="Xdai",n.Goerli="Goerli",n.Xdai="Xdai",n.XdaiQa="XdaiQa",n.ArbitrumOne="ArbitrumOne",n.ArbitrumSepolia="ArbitrumSepolia"})(Pn||(Pn={}));var Ac;(function(n){n[n.Custom=0]="Custom",n[n.Mainnet=1]="Mainnet",n[n.Goerli=5]="Goerli",n[n.Gnosis=100]="Gnosis",n[n.Xdai=100]="Xdai",n[n.XdaiQa=100]="XdaiQa",n[n.ArbitrumSepolia=421614]="ArbitrumSepolia",n[n.ArbitrumOne=42161]="ArbitrumOne"})(Ac||(Ac={}));var iu;(function(n){n.Mainnet="0x5346D0f80e2816FaD329F2c140c870ffc3c3E2Ef",n.Goerli="0x79073fc2117dD054FCEdaCad1E7018C9CbE3ec0B",n.Xdai="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.XdaiQa="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.Custom="",n.ArbitrumOne="0xcccccdcc0ccf6c708d860e19353c5f9a49accccc",n.ArbitrumSepolia="0x7777494e3d8cce0D3570E21FEf820F9Fee077777"})(iu||(iu={}));var Mr;(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",n.ArbitrumOne="https://app.colony.io/reputation/arbitrum-one",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/reputation/arbitrum-sepolia"})(Mr||(Mr={}));var ru;(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="",n.ArbitrumOne="https://app.colony.io/metatransaction/arbitrum-one",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/metatransaction/arbitrum-sepolia"})(ru||(ru={}));var Nl;(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="",n.ArbitrumOne="https://app.colony.io/public-rpc/",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/public-rpc/"})(Nl||(Nl={}));var Ms;(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",n.ArbitrumOne=".colony.joincolony.arbitrum",n.ArbitrumSepolia=".colony.joincolony.sepolia"})(Ms||(Ms={}));var Es;(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",n.ArbitrumOne=".user.joincolony.arbitrum",n.ArbitrumSepolia=".user.joincolony.sepolia"})(Es||(Es={}));var Dl;(function(n){let e;(function(i){i.ETH="0x0000000000000000000000000000000000000000",i.CLNY="0x3E828ac5C480069D4765654Fb4b8733b910b13b2",i.USDC="0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"})(e=n.Mainnet||(n.Mainnet={}));let t;(function(i){i.XDAI="0x0000000000000000000000000000000000000000",i.CLNY="0xc9B6218AffE8Aba68a13899Cbf7cF7f14DDd304C",i.USDC="0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83"})(t=n.Gnosis||(n.Gnosis={}));let a;(function(i){i.ETH="0x0000000000000000000000000000000000000000",i.CLNY="0xcccccdcc0ccf6c708d860e19353c5f9a49accccc",i.USDC="0xaf88d065e77c8cC2239327C5EDb3A432268e5831"})(a=n.ArbitrumOne||(n.ArbitrumOne={}))})(Dl||(Dl={}));var _e;(function(n){n[n.RootDomain=1]="RootDomain",n[n.RootTeam=1]="RootTeam",n[n.RootPot=1]="RootPot",n[n.SkillIgnore=0]="SkillIgnore"})(_e||(_e={}));var zt;(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"})(zt||(zt={}));var Bl="0x12345678",Ol;(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"})(Ol||(Ol={}));var vt;(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"})(vt||(vt={}));var Ae;(function(n){n.FundingQueue="FundingQueue",n.IVotingReputation="IVotingReputation",n.MultisigPermissions="MultisigPermissions",n.OneTxPayment="OneTxPayment",n.ReputationBootstrapper="ReputationBootstrapper",n.StagedExpenditure="StagedExpenditure",n.StakedExpenditure="StakedExpenditure",n.StreamingPayments="StreamingPayments",n.TokenSupplier="TokenSupplier",n.VotingReputation="VotingReputation"})(Ae||(Ae={}));var Fl=[{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 ae.Interface(Fl)}static connect(e,t){return new oe(e,Fl,t)}};xe(gi,"abi",Fl);var Ll=[{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"}],Ti=class{static createInterface(){return new ae.Interface(Ll)}static connect(e,t){return new oe(e,Ll,t)}};xe(Ti,"abi",Ll);var Mc=(n,e)=>{throw new Error(`${e}: ${n}`)},su=n=>n!=null;var{keccak256:E5,toUtf8Bytes:C5}=ae,{MaxUint256:I5}=ht;var Ul=n=>ae.formatEther(n);var Vl=n=>{let e=n.reduce((t,a)=>t|1<{let e=F.from(n);return[...Array(vt.LAST_ROLE).keys()].map(t=>e.shr(t).mask(1).eq(1)?t:null).filter(su)},vi=async(n,e,t,a)=>{if(F.from(t).eq(F.from(a)))return I5;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)},Ba=n=>E5(C5(n));var Er=async(n,e)=>(await Ti.connect(n,e).version()).toNumber(),jl=(n,e)=>n.map(t=>{try{return e.parseLog(t)}catch{return null}}).filter(su);var{hexDataSlice:Hl}=ae,{MaxUint256:S5}=ht,Ec=n=>{let e=Hl(n,0,3),t=F.from(Hl(n,4,35)),a=F.from(Hl(n,36,67));return{sig:e,permissionDomainId:t,childSkillIndex:a}},Cc=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),S5,r];let o=F.from(_e.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 vi(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]},R5=async(n,e,t,a,i)=>{let r=await Promise.all(a.map(s=>Cc(n,e,t,s,i)));for(let s=0;sArray.isArray(a)?a.length===1?ta(n,e,t,a[0],i):R5(n,e,t,a,i):Cc(n,e,t,a,i);var{MaxUint256:Ic}=ht,{AddressZero:P5}=ht;async function N5(n,e){let t;try{return t=await n.getCapabilityRoles(ae.hexZeroPad(e,4)),ou(t)}catch{return[]}}async function Cs(n,e,t,a,i,r,s){let o,{skillId:l}=await e.getDomain(i),{sig:p,permissionDomainId:f,childSkillIndex:x}=Ec(s),I=gi.connect(r,a.signer||a.provider),_=await N5(I,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 ${_e.RootDomain}`);o=Ic}else{let{skillId:U}=await e.getDomain(f),H=await n.getChildSkillId(U,x);if(H.eq(l))o=Ic;else{let{children:E}=await n.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,P5);return{actionCid:o,key:v,value:S,branchMask:L,siblings:O}}var{AddressZero:D5}=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,a){this.colony=t,this.network=e;let i=a?.network||Pn.ArbitrumOne;this.endpointUrl=a?.customEndpointUrl||Mr[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 na.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 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 a=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${a}/${i}`;return na.fetchReputation(r)}async getTotalReputation(e,t){let a=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${a}/${i}/${D5}/noProof`,s=await na.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 Mt=n=>Array.from(Array(n-1)).map((e,t)=>t+1);var Sc=10,lk=Mt(Sc),Rc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Pc=Sc-1;var Nc=3,fk=Mt(Nc),Dc={1:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],2:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]},Oc=Nc-1;var Bc=10,hk=Mt(Bc),Fc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Lc=Bc-1;var Uc=7,gk=Mt(Uc),Vc={1:[],2:[],3:[],4:[],5:[],6:[]},jc=Uc-1;var Hc=8,wk=Mt(Hc),qc={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3],6:[1,2,3],7:[1,2,3]},Gc=Hc-1;var zc=5,Ak=Mt(zc),Kc={1:[1,2,3,4,5,6,7,8,9,10,11,12,13],2:[1,2,3,4,5,6,7,8,9,10,11,12,13],3:[1,2,3,4,5,6,7,8,9,10,11,12,13],4:[1,2,3,4,5,6,7,8,9,10,11,12,13]},Wc=zc-1;var Jc=7,Ck=Mt(Jc),$c={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3],6:[1,2,3]},Qc=Jc-1;var Xc=10,Rk=Mt(Xc),Yc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Zc=Xc-1;var em=14,Dk=Mt(em),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],11:[1,2,3,4,5,6],12:[1,2,3,4,5,6],13:[1,2,3,4,5,6]},Gl=em-1;var tm=18,O5=Mt(tm),Fk=tm-1;var B5=(n,e)=>{switch(n){case Ae.FundingQueue:return Rc[e];case Ae.IVotingReputation:return ql[e];case Ae.MultisigPermissions:return Dc[e];case Ae.OneTxPayment:return Fc[e];case Ae.ReputationBootstrapper:return Vc[e];case Ae.StagedExpenditure:return Kc[e];case Ae.StakedExpenditure:return qc[e];case Ae.StreamingPayments:return $c[e];case Ae.TokenSupplier:return Yc[e];case Ae.VotingReputation:return ql[e];default:return Mc(n,"Could not find extension with name")}},wi=(n,e,t)=>{let a=B5(n,e);return!!a&&!a.includes(t)};var F5={[Ae.FundingQueue]:Pc,[Ae.IVotingReputation]:Gl,[Ae.MultisigPermissions]:Oc,[Ae.OneTxPayment]:Lc,[Ae.ReputationBootstrapper]:jc,[Ae.StagedExpenditure]:Wc,[Ae.StakedExpenditure]:Gc,[Ae.StreamingPayments]:Qc,[Ae.TokenSupplier]:Zc,[Ae.VotingReputation]:Gl};var _6=wn(nm(),1);var yp=wn(T6(),1);var Re;(function(n){n.DEFAULT="default",n.Annotation="annotation",n.Colony="colony",n.Decision="decision",n.Domain="domain",n.Misc="misc"})(Re||(Re={}));var pp=2,lp;(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"})(lp||(lp={}));var v6=n=>`Validation error(s): ${n.map(t=>`Error in ${t.path}. Seen: ${t.value}, expected: ${t.expected}`).join(` -`)}`,Qb=n=>({...n,isWhitelistActivated:n.isWhitelistActivated||!1,colonySafes:n.colonySafes||[],colonyTokens:n.colonyTokens||[],verifiedAddresses:n.verifiedAddresses||[]}),fp=(n,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&&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"?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 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),de=(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: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}})(n);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 a=v6(t.errors);throw new Error(a)};var w6=(n,e)=>{let t=n===Re.Colony?Qb(e):e,a=(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&&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"?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 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),de=(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: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}})({name:n,data:t,version:pp});if(!a.success){let i=v6(a.errors);throw new Error(i)}return a.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,_6.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]:""},Pr=class{adapter;constructor(e){this.adapter=e||new mp}static eventSupportsMetadata(e){return!!Object.keys(Bs).includes(e)}async getMetadata(e,t){let a=this.adapter.getIpfsUrl(e),r=await(await hp(a)).json();return fp(r,t)}async getMetadataForEvent(e,t){let a=this.adapter.getIpfsUrl(t),r=await(await hp(a)).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),a=await hp(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=w6(e,t),i=JSON.stringify(a);return this.adapter.uploadJson(i)}};var oM=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 ae.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 ae.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"}],Ci=class{static createInterface(){return new ae.Interface(gp)}static connect(e,t){return new oe(e,gp,t)}};xe(Ci,"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:"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:"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:[{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:"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:"returnData",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",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:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],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:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"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:[],name:"unlock",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"}],k6="0x60c060405234801561001057600080fd5b5060405161205738038061205783398101604081905261002f91610307565b60008060018161003d6101ab565b6001600160a01b031681526020810191909152604001600090812091909155556100656101ab565b600480546001600160a01b0319166001600160a01b039290921691909117905561008d6101ab565b6001600160a01b03167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a260066100ce8482610413565b5060056100db8382610413565b5060ff81166080526007805460ff1916600117905560405146907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f90610123906006906104d1565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051601f19818403018152919052805160209091012060a0525061054692505050565b60003633301480156101be575060348110155b1561024757600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e881146102365733935050505090565b5001516001600160a01b0316919050565b3391505090565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261027557600080fd5b81516001600160401b0381111561028e5761028e61024e565b604051601f8201601f19908116603f011681016001600160401b03811182821017156102bc576102bc61024e565b6040528181528382016020018510156102d457600080fd5b60005b828110156102f3576020818601810151838301820152016102d7565b506000918101602001919091529392505050565b60008060006060848603121561031c57600080fd5b83516001600160401b0381111561033257600080fd5b61033e86828701610264565b602086015190945090506001600160401b0381111561035c57600080fd5b61036886828701610264565b925050604084015160ff8116811461037f57600080fd5b809150509250925092565b600181811c9082168061039e57607f821691505b6020821081036103be57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561040e57806000526020600020601f840160051c810160208510156103eb5750805b601f840160051c820191505b8181101561040b57600081556001016103f7565b50505b505050565b81516001600160401b0381111561042c5761042c61024e565b6104408161043a845461038a565b846103c4565b6020601f821160018114610474576000831561045c5750848201515b600019600385901b1c1916600184901b17845561040b565b600084815260208120601f198516915b828110156104a45787850151825560209485019460019092019101610484565b50848210156104c25786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b60008083546104df8161038a565b6001821680156104f6576001811461050b5761053b565b60ff198316865281151582028601935061053b565b86600052602060002060005b8381101561053357815488820152600190910190602001610517565b505081860193505b509195945050505050565b60805160a051611ae5610572600039600081816102e10152610f870152600061029b0152611ae56000f3fe6080604052600436106101815760003560e01c80637a9e5e4b116100d1578063a69df4b51161008a578063bf7e214f11610064578063bf7e214f146104b1578063cf309012146104d1578063d505accf146104eb578063dd62ed3e1461050b57600080fd5b8063a69df4b51461047c578063a9059cbb14610491578063b3eac1d8146103b957600080fd5b80637a9e5e4b146103995780637ecebe00146103b95780638da5cb5b146103ef57806395d89b41146104275780639dc29fac1461043c578063a0712d681461045c57600080fd5b806330adf81f1161013e57806340c10f191161011857806340c10f191461030357806342966c68146103235780636281133d1461034357806370a082311461036357600080fd5b806330adf81f14610255578063313ce567146102895780633644e515146102cf57600080fd5b806306fdde0314610186578063095ea7b3146101b15780630c53c51c146101e157806313af4035146101f457806318160ddd1461021657806323b872dd14610235575b600080fd5b34801561019257600080fd5b5061019b610551565b6040516101a891906115b0565b60405180910390f35b3480156101bd57600080fd5b506101d16101cc3660046115d8565b6105df565b60405190151581526020016101a8565b61019b6101ef3660046116bf565b610672565b34801561020057600080fd5b5061021461020f366004611733565b610859565b005b34801561022257600080fd5b506000545b6040519081526020016101a8565b34801561024157600080fd5b506101d1610250366004611750565b6108dc565b34801561026157600080fd5b506102277f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b34801561029557600080fd5b506102bd7f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101a8565b3480156102db57600080fd5b506102277f000000000000000000000000000000000000000000000000000000000000000081565b34801561030f57600080fd5b5061021461031e3660046115d8565b610950565b34801561032f57600080fd5b5061021461033e366004611791565b610a3f565b34801561034f57600080fd5b506101d161035e3660046117aa565b610a53565b34801561036f57600080fd5b5061022761037e366004611733565b6001600160a01b031660009081526001602052604090205490565b3480156103a557600080fd5b506102146103b4366004611733565b610ba7565b3480156103c557600080fd5b506102276103d4366004611733565b6001600160a01b031660009081526008602052604090205490565b3480156103fb57600080fd5b5060045461040f906001600160a01b031681565b6040516001600160a01b0390911681526020016101a8565b34801561043357600080fd5b5061019b610c18565b34801561044857600080fd5b506102146104573660046115d8565b610c25565b34801561046857600080fd5b50610214610477366004611791565b610e1c565b34801561048857600080fd5b50610214610e54565b34801561049d57600080fd5b506101d16104ac3660046115d8565b610e87565b3480156104bd57600080fd5b5060035461040f906001600160a01b031681565b3480156104dd57600080fd5b506007546101d19060ff1681565b3480156104f757600080fd5b50610214610506366004611831565b610ea2565b34801561051757600080fd5b506102276105263660046118a0565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6006805461055e906118d9565b80601f016020809104026020016040519081016040528092919081815260200182805461058a906118d9565b80156105d75780601f106105ac576101008083540402835291602001916105d7565b820191906000526020600020905b8154815290600101906020018083116105ba57829003601f168201915b505050505081565b600081600260006105ee611191565b6001600160a01b0390811682526020808301939093526040918201600090812091881680825291909352912091909155610626611191565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161066091815260200190565b60405180910390a35060015b92915050565b60606106a186610697886001600160a01b031660009081526008602052604090205490565b4688888888610a53565b6107045760405162461bcd60e51b815260206004820152602960248201527f6d6574617472616e73616374696f6e2d7369676e65722d7369676e617475726560448201526805adad2e6dac2e8c6d60bb1b60648201526084015b60405180910390fd5b61070d86611234565b6000306001600160a01b0316867f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e88960405160200161074e93929190611913565b60408051601f19818403018152908290526107689161194c565b6000604051808303816000865af19150503d80600081146107a5576040519150601f19603f3d011682016040523d82523d6000602084013e6107aa565b606091505b50925090508061080d5760405162461bcd60e51b815260206004820152602860248201527f636f6c6f6e792d6d65746174782d66756e6374696f6e2d63616c6c2d756e737560448201526718d8d95cdcd99d5b60c21b60648201526084016106fb565b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b87610837611191565b8860405161084793929190611968565b60405180910390a15095945050505050565b610876610864611191565b6000356001600160e01b031916611260565b6108925760405162461bcd60e51b81526004016106fb9061199d565b600480546001600160a01b0319166001600160a01b0383169081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60075460009060ff161561093d576108f5610864611191565b61093d5760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b61094884848461133b565b949350505050565b61095b610864611191565b6109775760405162461bcd60e51b81526004016106fb9061199d565b6001600160a01b0382166000908152600160205260408120805483929061099f9084906119e1565b92505081905550806000808282546109b791906119e1565b90915550506040518181526001600160a01b038316907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a26040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b610a50610a4a611191565b82610c25565b50565b600080610ad088308989604051602001610a7094939291906119f4565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b6040805160008082526020820180845284905260ff87169282019290925260608101889052608081018790529192509060019060a0016020604051602081039080840390855afa158015610b28573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610b8b5760405162461bcd60e51b815260206004820152601f60248201527f636f6c6f6e792d6d65746174782d696e76616c69642d7369676e61747572650060448201526064016106fb565b6001600160a01b038a8116911614915050979650505050505050565b610bb2610864611191565b610bce5760405162461bcd60e51b81526004016106fb9061199d565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6005805461055e906118d9565b610c2d611191565b6001600160a01b0316826001600160a01b031614610d2d576001600160a01b03821660009081526002602052604081208291610c67611191565b6001600160a01b03166001600160a01b03168152602001908152602001600020541015610cd65760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03821660009081526002602052604081208291610cf8611191565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610d279190611a3a565b90915550505b6001600160a01b038216600090815260016020526040902054811115610d955760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b03821660009081526001602052604081208054839290610dbd908490611a3a565b9250508190555080600080828254610dd59190611a3a565b90915550506040518181526001600160a01b038316907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59060200160405180910390a25050565b610e27610864611191565b610e435760405162461bcd60e51b81526004016106fb9061199d565b610a50610e4e611191565b82610950565b610e5f610864611191565b610e7b5760405162461bcd60e51b81526004016106fb9061199d565b6007805460ff19169055565b6000610e9b610e94611191565b84846108dc565b9392505050565b60075460ff1615610f0057610eb8610864611191565b610f005760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b42841015610f505760405162461bcd60e51b815260206004820152601d60248201527f636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e6500000060448201526064016106fb565b6040805180820182526002815261190160f01b6020808301919091526001600160a01b038a166000908152600890915291822080547f0000000000000000000000000000000000000000000000000000000000000000917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c9188610fd983611a4d565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161103d93929190611a66565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa1580156110a8573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906110de5750886001600160a01b0316816001600160a01b0316145b61112a5760405162461bcd60e51b815260206004820152601e60248201527f636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e6174757265000060448201526064016106fb565b6001600160a01b038981166000818152600260209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b60003633301480156111a4575060348110155b1561122d57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e8811461121c5733935050505090565b5001516001600160a01b0316919050565b3391505090565b6001600160a01b038116600090815260086020526040812080549161125883611a4d565b919050555050565b6000306001600160a01b0384160361127a5750600161066c565b6004546001600160a01b03908116908416036112985750600161066c565b6003546001600160a01b03166112b05750600061066c565b60035460405163b700961360e01b81526001600160a01b0385811660048301523060248301526001600160e01b0319851660448301529091169063b700961390606401602060405180830381865afa158015611310573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113349190611a8d565b905061066c565b6000611345611191565b6001600160a01b0316846001600160a01b031614611445576001600160a01b0384166000908152600260205260408120839161137f611191565b6001600160a01b03166001600160a01b031681526020019081526020016000205410156113ee5760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03841660009081526002602052604081208391611410611191565b6001600160a01b03166001600160a01b03168152602001908152602001600020600082825461143f9190611a3a565b90915550505b6001600160a01b0384166000908152600160205260409020548211156114ad5760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b038416600090815260016020526040812080548492906114d5908490611a3a565b90915550506001600160a01b038316600090815260016020526040812080548492906115029084906119e1565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161154e91815260200190565b60405180910390a35060019392505050565b60005b8381101561157b578181015183820152602001611563565b50506000910152565b6000815180845261159c816020860160208601611560565b601f01601f19169290920160200192915050565b602081526000610e9b6020830184611584565b6001600160a01b0381168114610a5057600080fd5b600080604083850312156115eb57600080fd5b82356115f6816115c3565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261162b57600080fd5b813567ffffffffffffffff81111561164557611645611604565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561167457611674611604565b60405281815283820160200185101561168c57600080fd5b816020850160208301376000918101602001919091529392505050565b803560ff811681146116ba57600080fd5b919050565b600080600080600060a086880312156116d757600080fd5b85356116e2816115c3565b9450602086013567ffffffffffffffff8111156116fe57600080fd5b61170a8882890161161a565b9450506040860135925060608601359150611727608087016116a9565b90509295509295909350565b60006020828403121561174557600080fd5b8135610e9b816115c3565b60008060006060848603121561176557600080fd5b8335611770816115c3565b92506020840135611780816115c3565b929592945050506040919091013590565b6000602082840312156117a357600080fd5b5035919050565b600080600080600080600060e0888a0312156117c557600080fd5b87356117d0816115c3565b96506020880135955060408801359450606088013567ffffffffffffffff8111156117fa57600080fd5b6118068a828b0161161a565b9450506080880135925060a0880135915061182360c089016116a9565b905092959891949750929550565b600080600080600080600060e0888a03121561184c57600080fd5b8735611857816115c3565b96506020880135611867816115c3565b95506040880135945060608801359350611883608089016116a9565b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156118b357600080fd5b82356118be816115c3565b915060208301356118ce816115c3565b809150509250929050565b600181811c908216806118ed57607f821691505b60208210810361190d57634e487b7160e01b600052602260045260246000fd5b50919050565b60008451611925818460208901611560565b919091019283525060601b6bffffffffffffffffffffffff19166020820152603401919050565b6000825161195e818460208701611560565b9190910192915050565b6001600160a01b0384811682528316602082015260606040820181905260009061199490830184611584565b95945050505050565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561066c5761066c6119cb565b8481526bffffffffffffffffffffffff198460601b16602082015282603482015260008251611a2a816054850160208701611560565b9190910160540195945050505050565b8181038181111561066c5761066c6119cb565b600060018201611a5f57611a5f6119cb565b5060010190565b60008451611a78818460208901611560565b91909101928352506020820152604001919050565b600060208284031215611a9f57600080fd5b81518015158114610e9b57600080fdfea264697066735822122090928a66070125904780390eb49d45fe12c136aec641b1db69316e0ffefc6da764736f6c634300081b0033",e1=n=>n.length>1,Nn=class extends ci{constructor(...e){e1(e)?super(...e):super(Vu,k6,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 ae.Interface(Vu)}static connect(e,t){return new oe(e,Vu,t)}};xe(Nn,"bytecode",k6),xe(Nn,"abi",Vu);var Tp=[{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:"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:"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:[{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:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",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:"_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:"_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:"returnData",type:"bytes"}],stateMutability:"payable",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:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"",type:"address"}],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"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",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:"_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:"_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:"_token",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"incrementLockCounterTo",outputs:[],stateMutability:"nonpayable",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:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"pure",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetwork",type:"address"}],name:"setColonyNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",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:"_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:"_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:"_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:"_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"}],Ii=class{static createInterface(){return new ae.Interface(Tp)}static connect(e,t){return new oe(e,Tp,t)}};xe(Ii,"abi",Tp);var Si;(function(n){n.TokenClient="TokenClient",n.TokenLockingClient="TokenLockingClient"})(Si||(Si={}));var Dn;(function(n){n.Colony="Colony",n.ColonyLegacy="ColonyLegacy",n.Erc20="Erc20",n.Erc2612="Erc2612",n.Sai="Sai"})(Dn||(Dn={}));var{AddressZero:i1}=ht;async function r1(n){try{await n.authority();return}catch{throw new Error("Token can not be assigned a TokenAuthority")}}var s1=async(n,e)=>{let t,a=!0,i=!0;t=Nn.connect(n,e);try{await t.totalSupply()}catch(r){throw new Error(`Token is probably not a valid ERC20 token, got ${r.message}`)}try{await t.locked(),await r1(t)}catch{a=!1}try{await t.nonces(i1)}catch{i=!1}return a?t.tokenClientType=Dn.Colony:i?(t=vn.connect(n,e),t.tokenClientType=Dn.Erc2612):(t=Tn.connect(n,e),t.tokenClientType=Dn.Erc20),t.clientType=Si.TokenClient,t},vp=s1;var o1=(n,e)=>{let t=Ii.connect(n,e);return t.clientType=Si.TokenLockingClient,t},wp=o1;var{AddressZero:_p}=ht,u1=Tn.connect(_p,new ea.BaseProvider(3656691)).interface,d1=Ci.connect(_p,new ea.BaseProvider(3656691)).interface,l1=vn.connect(_p,new ea.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"},{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:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{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:"returnData",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:"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:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"}],Fs=class{static createInterface(){return new ae.Interface(kp)}static connect(e,t){return new oe(e,kp,t)}};Fs.abi=kp;var Ap=[{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:"returnData",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"}],Ls=class{static createInterface(){return new ae.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:"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:!1,internalType:"address",name:"bridgeAddress",type:"address"}],name:"BridgeSet",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:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateSentToBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateStoredFromBridge",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:"uint256",name:"skillId",type:"uint256"}],name:"SkillAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillCreationStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillStoredFromBridge",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:[{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"address",name:"_resolver",type:"address"}],name:"addColonyVersion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_resolver",type:"address"}],name:"addExtensionToNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"addPendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPendingSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"addReputationUpdateLogFromBridge",outputs:[],stateMutability:"nonpayable",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:"_parentSkillId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"addSkillFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",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:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"chainId",type:"uint256"}],name:"bridgeCurrentRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"bridgePendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"skillId",type:"uint256"}],name:"bridgeSkillIfNotMiningChain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"burnUnneededRewards",outputs:[],stateMutability:"nonpayable",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:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"}],name:"claimMiningReward",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:"address",name:"_tokenAddress",type:"address"}],name:"createMetaColony",outputs:[],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:"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:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateExtension",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:"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:"returnData",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"getBridgedReputationUpdateCount",outputs:[{internalType:"uint256",name:"bridgedReputationCount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"}],name:"getBridgedSkillCounts",outputs:[{internalType:"uint256",name:"skillCount",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:"uint256",name:"_id",type:"uint256"}],name:"getColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyBridgeAddress",outputs:[{internalType:"address",name:"bridge",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCreationSalt",outputs:[{internalType:"bytes32",name:"salt",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"}],name:"getColonyVersionResolver",outputs:[{internalType:"address",name:"_resolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentColonyVersion",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getENSRegistrar",outputs:[{internalType:"address",name:"_address",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:[{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:[],name:"getFeeInverse",outputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMetaColony",outputs:[{internalType:"address payable",name:"_colonyAddress",type:"address"}],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:"getMiningChainId",outputs:[{internalType:"uint256",name:"reputationMiningChainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"}],name:"getMiningDelegator",outputs:[{internalType:"address",name:"_delegator",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiningResolver",outputs:[{internalType:"address",name:"miningResolverAddress",type:"address"}],stateMutability:"view",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:"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:"address",name:"_token",type:"address"}],name:"getPayoutWhitelist",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"getPendingReputationUpdate",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:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.PendingReputationUpdate",name:"update",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"getPendingSkillAddition",outputs:[{internalType:"uint256",name:"parentId",type:"uint256"}],stateMutability:"view",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:"_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:[{internalType:"bool",name:"_active",type:"bool"}],name:"getReputationMiningCycle",outputs:[{internalType:"address",name:"_repMiningCycleAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningCycleReward",outputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningSkillId",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"view",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:"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_deprecated",type:"bool"}],internalType:"struct ColonyNetworkDataTypes.Skill",name:"_skill",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSkillCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTokenLocking",outputs:[{internalType:"address",name:"_lockingAddress",type:"address"}],stateMutability:"view",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:"miningChainId",type:"uint256"},{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"}],name:"initialiseReputationMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[{internalType:"uint256",name:"_rootLocalSkillId",type:"uint256"}],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:"address",name:"_colony",type:"address"}],name:"isColony",outputs:[{internalType:"bool",name:"_addressIsColony",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],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:"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:"_stakers",type:"address[]"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"punishStakers",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:"_username",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerUserLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_bridgeAddress",type:"address"}],name:"setColonyBridgeAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],name:"setFeeInverse",outputs:[],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:"_miningResolverAddress",type:"address"}],name:"setMiningResolver",outputs:[],stateMutability:"nonpayable",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:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",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:"uint256",name:"_amount",type:"uint256"}],name:"setReputationMiningCycleReward",outputs:[],stateMutability:"nonpayable",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:[{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"},{internalType:"uint256",name:"nonce",type:"uint256"}],name:"setReputationRootHashFromBridge",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:"address",name:"_tokenLockingAddress",type:"address"}],name:"setTokenLocking",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:"uint256",name:"_amount",type:"uint256"}],name:"stakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"startNextCycle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"startTokenAuction",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:"bytes32",name:"_extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"unstakeForMining",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:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"}],Ri=class{static createInterface(){return new ae.Interface(Mp)}static connect(e,t){return new oe(e,Mp,t)}};Ri.abi=Mp;var Ta=class{constructor({contract:e,config:t,method:a,args:i,eventData:r,txConfig:s}){this.config=t,this.contract=e,this.method=a,this.args=i,this.eventData=r,this.txConfig=s}async getArgs(e){let t=[];return typeof this.args=="function"?t=await this.args():t=this.args,e&&t.push(e),t}async getTx(e){let t=await this.getArgs(e);return await this.contract.functions[this.method].apply(this.contract,t)}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.config.ipfs.getMetadataForEvent.bind(this.config.ipfs,Bs[this.txConfig.metadataType],t.metadata);return[t,e,a]}return[t,e]}return[{},e]}async broadcastMetaTx(e){let{provider:t}=this.config.getSigner();if(!t)throw new Error("No provider found");let i=await(await fetch(`${this.config.metaTxBroadcasterEndpoint}/broadcast`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();if(i.status!=="success")throw new Error(`Could not send Metatransaction. Reason given: ${i.data.reason}`);if(!i.data?.txHash)throw new Error("Could not get transaction hash from broadcaster response");return t.getTransaction(i.data.txHash)}async waitForMetaTx(e){let t=await e.wait();return t.parsedLogs=jl(t.logs,this.contract.interface),t}tx(){return{send:async e=>{let t=await this.getTx(e);return[t,this.getMined.bind(this,t)]},mined:async e=>{let t=await this.getTx(e);return this.getMined(t)},encode:async()=>{let e=await this.getArgs();return this.contract.interface.encodeFunctionData(this.method,e)}}}};var{arrayify:y1,solidityKeccak256:f1,splitSignature:c1}=ae,Ua=class extends Ta{async sendMetaTransaction(e,t){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let a=this.config.getSigner(),{provider:i}=a;if(!i)throw new Error("No provider found");let r;this.config.network===Pn.Custom?r=1:r=(await i.getNetwork()).chainId;let s=await a.getAddress(),o=await this.contract.functions.getMetatransactionNonce(s),l=f1(["uint256","address","uint256","bytes"],[o.toString(),t,r,e]),p=y1(l),f=await a.signMessage(p),{r:x,s:I,v:_}=c1(f),v={target:t,payload:e,userAddress:s,r:x,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=(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}},ju=(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=_e.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 Ep=[{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 ae.Interface(Ep)}static connect(e,t){return new oe(e,Ep,t)}};Pi.abi=Ep;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 ae.Interface(Cp)}static connect(e,t){return new oe(e,Cp,t)}};Ni.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"}],Di=class{static createInterface(){return new ae.Interface(Ip)}static connect(e,t){return new oe(e,Ip,t)}};Di.abi=Ip;var Sp=[{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 ae.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:[{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 ae.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 ae.Interface(Pp)}static connect(e,t){return new oe(e,Pp,t)}};Fi.abi=Pp;var{AddressZero:v1}=ht,On=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Ba(On.extensionType),e.address);if(t===v1)throw new Error(`${On.extensionType} extension is not installed for this Colony`);let a=await Er(t,e.config.signerOrProvider);if(!wi(On.extensionType,a,e.version))throw new Error(`Version ${a} of the ${On.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=On.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${On.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new On(e,r,a)}static getLatestSupportedVersion(){return On.supportedVersions[On.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||_e.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[_]),I=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,I,x,s,_e.SkillIgnore]},async _=>({...te("OneTxPaymentMade",_)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Ba(Ae.OneTxPayment),t],async a=>({...te("ExtensionUpgraded",a)}))}},Va=On;Va.supportedVersions=[{version:3,factory:Oi},{version:4,factory:Bi},{version:5,factory:Fi}],Va.extensionType=Ae.OneTxPayment;var Bn=class{constructor(e,t){typeof t=="string"?this.tokenClient=Tn.connect(t,e.config.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=>({...te("Transfer",a)}))}transferFrom(e,t,a){return this.colonyNetwork.createTxCreator(this.tokenClient,"transferFrom",[e,t,a],async i=>({...te("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=>({...te("Approval",a)}))}};var Us=class extends Bn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=Nn.connect(a,t.config.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=>({...te("LogSetAuthority",a)}))}setOwner(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setOwner",[t],async a=>({...te("LogSetOwner",a)}))}};var Vs=class extends Bn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=vn.connect(a,t.config.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=>({...te("Approval",i)}))}};var A6=async(n,e)=>{let t=await vp(e,n.config.signerOrProvider);switch(t.tokenClientType){case Dn.Colony:return new Us(n,t);case Dn.Erc20:return new Bn(n,t);case Dn.Erc2612:return new Vs(n,t);default:throw new Error("Your token is not supported in Colony SDK (yet).")}};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"},{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 ae.Interface(Np)}static connect(e,t){return new oe(e,Np,t)}};Li.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"},{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 ae.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 ae.Interface(Op)}static connect(e,t){return new oe(e,Op,t)}};Vi.abi=Op;var{AddressZero:Bp}=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===Bp)throw new Error(`${Fn.extensionType} extension is not installed for this Colony`);let a=await Er(t,e.config.signerOrProvider);if(!wi(Fn.extensionType,a,e.version))throw new Error(`Version ${a} of the ${Fn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Fn.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${Fn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new Fn(e,r,a)}static getLatestSupportedVersion(){return Fn.supportedVersions[Fn.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 ae.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=>({...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:a,value:i,branchMask:r,siblings:s}=await Cs(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),this.colony.reputation,this.votingReputationContract,e,Bp,Ol);return[e,t,Bp,Ol,a,i,r,s]},async t=>({...te("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.config.ipfs.uploadMetadata(Re.Decision,t),[e,a]},async a=>({...te("Annotation",a)}),{metadataType:Re.Decision})}approveStake(e,t=_e.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{...ju("UserTokenApproved",a,i.getInternalTokenLockingContract().interface)}})}stakeMotion(e,t,a){let i=async()=>{let r=await this.colony.config.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(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 I=await this.getMinStake(o,t);if(F.from(a).lt(I))throw new Error(`The staked amount is too small. Please stake at least ${Ul(I)}`);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),a,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 a=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.config.getSigner().getAddress(),{key:p,value:f,branchMask:x,siblings:I}=await this.colony.reputation.getReputationWithProofs(o,l,s),_=await this.createMotionSalt(e),v=ae.solidityKeccak256(["bytes","uint256"],[_,t]);return[e,v,p,f,x,I]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"submitVote",a,async i=>({...te("MotionVoteSubmitted",i)}))}revealVote(e,t){let a=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.config.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:I,value:_,branchMask:v,siblings:S}=p;return[e,f,F.from(x),I,_,v,S]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"revealVote",a,async i=>({...te("MotionVoteRevealed",i)}))}escalateMotion(e,t){let a=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.config.getSigner().getAddress(),p=await vi(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),t,r),{key:f,value:x,branchMask:I,siblings:_}=await this.colony.reputation.getReputationWithProofs(o,l,s);return[e,t,p,f,x,I,_]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"escalateMotion",a,async i=>({...te("MotionEscalated",i)}))}finalizeMotion(e){let t=async()=>{let a=await this.votingReputationContract.getMotionState(e);if(a!==zt.Finalizable)throw new Error(`Motion cannot be finalized. It's currently in "${zt[a]}" state`);return[e]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"finalizeMotion",t,async a=>({...te("MotionFinalized",a)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Ba(Ae.VotingReputation),t],async a=>({...te("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}}},ja=Fn;ja.supportedVersions=[{version:7,factory:Li},{version:8,factory:Ui},{version:9,factory:Vi}],ja.extensionType=Ae.VotingReputation;var A1={["motion"]:ja,["oneTx"]:Va},Dr=class{static async connect(e,t){let a=await Er(t,e.config.signerOrProvider),i=Dr.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.config.signerOrProvider),s=await r.getToken(),o=await A6(e,s),l=new Dr(e,r,o,a);return await l.updateExtensions(),l}static getLatestSupportedVersion(){return Dr.supportedVersions[Dr.supportedVersions.length-1].version}constructor(e,t,a,i){this.colony=t,this.colonyNetwork=e,this.config=e.config,this.address=t.address,this.ext={},this.reputation=new na(e.getInternalNetworkContract(),t,{customEndpointUrl:e.config.reputationOracleEndpoint}),this.token=a,this.version=i}createColonyTxCreator(e,t,a,i,r){return new Nr({colony:this,config:this.colonyNetwork.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createPermissionedColonyTxCreator(e,t,a,i,r,s){return new Nr({colony:this,config:this.colonyNetwork.config,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 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.config.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.config.ipfs.uploadMetadata(Re.Domain,e),[_e.RootDomain,t]},{roles:vt.Architecture,domain:_e.RootDomain},async t=>({...te("DomainAdded",t),...te("FundingPotAdded",t),...te("DomainMetadata",t)}),{metadataType:Re.Domain}):this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256)",[_e.RootDomain],{roles:vt.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.config.ipfs.uploadMetadata(Re.Domain,e),[_e.RootDomain,t]},{roles:vt.Architecture,domain:_e.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 a=>({...te("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=>({...te("ColonyFundsClaimed",a)}))}moveFundsToTeam(e,t,a,i){let r=_e.RootDomain,s=a||_e.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(),I=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,I,_,v,S,e,o]},async l=>({...te("ColonyFundsMovedBetweenFundingPots",l)}))}async getReputation(e,t=_e.RootDomain,a=3){let{skillId:i}=await this.colony.getDomain(t);return this.reputation.getReputationFraction(i,e,void 0,a)}async getReputationPoints(e,t=_e.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=>({...te("ArbitraryTransaction(address,address,bytes,bool)",a)}))}annotateTransaction(e,t){return this.createColonyTxCreator(this.colony,"annotateTransaction",async()=>{let a;return typeof t=="string"?a=t:a=await this.config.ipfs.uploadMetadata(Re.Annotation,t),[e,a]},async a=>({...te("Annotation",a)}),{metadataType:Re.Annotation})}installExtension(e){let t=A1[e],a=t.getLatestSupportedVersion(),{extensionType:i}=t;if(!wi(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",[Ba(i),t.getLatestSupportedVersion()],async s=>({...ju("ExtensionInstalled",s,r.interface)}))}async getRoles(e,t=_e.RootDomain){let a=await this.colony.getUserRoles(e,t);return su(a)}setRoles(e,t,a=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let i=await this.getRoles(e,a),r=Array.from(new Set([...i,...[].concat(t)])),s=Vl(r);return[e,a,s]},{roles:vt.Architecture,domain:a},async i=>({...te("ColonyRoleSet",i),...te("RecoveryRoleSet",i)}))}unsetRoles(e,t,a=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let r=(await this.getRoles(e,a)).filter(o=>![].concat(t).includes(o)),s=Vl(r);return[e,a,s]},{roles:vt.Architecture,domain:a},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 a=[],i=await t.getTokenLocking();return e?a=[...e,i]:a=[i],[this.token.address,this.address,a]},async a=>({...te("TokenAuthorityDeployed",a)}))}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 a=>({...te("ColonyUpgraded",a)}))}awardReputation(e,t,a=_e.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=>({...te("ArbitraryReputationUpdate",i)}))}smiteReputation(e,t,a=_e.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:vt.Arbitration},async i=>({...te("ArbitraryReputationUpdate",i)}))}},Or=Dr;Or.supportedVersions=[{version:11,factory:Pi},{version:12,factory:Ni},{version:13,factory:Di}];var{splitSignature:M1}=ae,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,a]){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let i=this.contract.signer,{provider:r}=i;if(!r)throw new Error("No provider found");let s;this.config.network===Pn.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:a,nonce:l.toString(),deadline:f}),{r:I,s:_,v}=M1(x),S={target:e,owner:o,spender:t,value:a.toString(),deadline:f,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 js=class{constructor(e,t){this.address=t,this.colonyNetwork=e,this.tokenLockingContract=wp(this.address,e.config.signerOrProvider)}getInternalTokenLockingContract(){return this.tokenLockingContract}deposit(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"deposit(address,uint256,bool)",[e,t,!1],async a=>({...te("UserTokenDeposited",a)}))}withdraw(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"withdraw(address,uint256,bool)",[e,t,!1],async a=>({...te("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 Hs=class{constructor(e,t){let a=t?.network||Pn.ArbitrumOne;this.metaTxBroadcasterEndpoint=t?.metaTxBroadcasterEndpoint||ru[a],this.ipfs=new Pr(t?.ipfsAdapter),this.network=a,this.reputationOracleEndpoint=t?.reputationOracleEndpoint||Mr[a],this.signerOrProvider=e}getSigner(){if(!(this.signerOrProvider instanceof St))throw new Error("Need a signer to create a transaction");return this.signerOrProvider}};var{namehash:M6}=ae,{AddressZero:Fp}=ht,qs=class{constructor(e,t){this.config=new Hs(e,t),this.contract=Ri.connect(t?.customNetworkAddress||iu[this.config.network],e)}async getTokenLocking(){if(!this.locking){let e=await this.contract.getTokenLocking();this.locking=new js(this,e)}return this.locking}getInternalNetworkContract(){return this.contract}createTxCreator(e,t,a,i,r){return new Ta({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createMetaTxCreator(e,t,a,i,r){return new Ua({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createEip2612TxCreator(e,t,a,i,r){return new qu({config:this.config,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[Fp,e.name,e.symbol,e.decimals||18,0,t,""]}return[e,"","",0,0,t,""]};return a?this.createMetaTxCreator(this.contract,"createColonyForFrontend",async()=>{let r=await i();return typeof a=="string"?r[6]=a:r[6]=await this.config.ipfs.uploadMetadata(Re.Colony,a),r},async r=>({...te("TokenDeployed",r),...te("ColonyAdded",r),...te("TokenAuthorityDeployed",r)}),{metadataType:Re.Colony}):this.createMetaTxCreator(this.contract,"createColonyForFrontend",i,async r=>({...te("TokenDeployed",r),...te("ColonyAdded",r),...te("TokenAuthorityDeployed",r)}))}async getColony(e){return Or.connect(this,e)}async getMetaColony(){let e=await this.contract.getMetaColony();return this.getColony(e)}async getColonyLabel(e){let t=await this.contract.lookupRegisteredENSDomain(e);return t?t.replace(Ms[this.config.network],""):null}async getColonyAddress(e){let t=M6(`${e}${Ms[this.config.network]}`),a=await this.contract.addr(t);return a!==Fp?a:null}async getUsername(e){let t=await this.contract.lookupRegisteredENSDomain(e);return t?t.replace(Es[this.config.network],""):null}async getUserAddress(e){let t=M6(`${e}${Es[this.config.network]}`),a=await this.contract.addr(t);return a!==Fp?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.contract,"registerUserLabel",t,async a=>({...te("UserLabelRegistered",a)}))}deployToken(e,t,a=18){return this.createMetaTxCreator(this.contract,"deployTokenViaNetwork",[e,t,a],async i=>({...te("TokenDeployed",i)}))}};var E6=new ea.Web3Provider(window.ethereum),E1=async n=>new qs(n).getMetaColony(),C1=async()=>(await E6.send("eth_requestAccounts",[]),E6.getSigner()),C6=document.querySelector("#button"),Up=document.querySelector("#error"),I6=document.querySelector("#result");if(!C6||!Up||!I6)throw new Error("Could not find all required HTML elements");var I1=n=>{Up.innerText=n},S1=()=>{Up.innerText=""},Lp=n=>{I6.innerText=n};C6.addEventListener("click",async()=>{S1(),Lp("Thinking...");try{let n=await C1(),e=await E1(n);Lp(`Connected to metaColonyClient with version ${e.version}`)}catch(n){I1(`Found an error: ${n.message}`),Lp("")}});})(); +`)}`,Qb=n=>({...n,isWhitelistActivated:n.isWhitelistActivated||!1,colonySafes:n.colonySafes||[],colonyTokens:n.colonyTokens||[],verifiedAddresses:n.verifiedAddresses||[]}),fp=(n,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&&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"?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 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),de=(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: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}})(n);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 a=v6(t.errors);throw new Error(a)};var w6=(n,e)=>{let t=n===Re.Colony?Qb(e):e,a=(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&&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"?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 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),de=(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: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}})({name:n,data:t,version:pp});if(!a.success){let i=v6(a.errors);throw new Error(i)}return a.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,_6.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]:""},Pr=class{adapter;constructor(e){this.adapter=e||new mp}static eventSupportsMetadata(e){return!!Object.keys(Bs).includes(e)}async getMetadata(e,t){let a=this.adapter.getIpfsUrl(e),r=await(await hp(a)).json();return fp(r,t)}async getMetadataForEvent(e,t){let a=this.adapter.getIpfsUrl(t),r=await(await hp(a)).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),a=await hp(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=w6(e,t),i=JSON.stringify(a);return this.adapter.uploadJson(i)}};var uM=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 ae.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 ae.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"}],Ci=class{static createInterface(){return new ae.Interface(gp)}static connect(e,t){return new oe(e,gp,t)}};xe(Ci,"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:"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:"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:[{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:"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:"returnData",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",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:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],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:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"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:[],name:"unlock",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"}],k6="0x60c060405234801561001057600080fd5b5060405161205738038061205783398101604081905261002f91610307565b60008060018161003d6101ab565b6001600160a01b031681526020810191909152604001600090812091909155556100656101ab565b600480546001600160a01b0319166001600160a01b039290921691909117905561008d6101ab565b6001600160a01b03167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a260066100ce8482610413565b5060056100db8382610413565b5060ff81166080526007805460ff1916600117905560405146907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f90610123906006906104d1565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051601f19818403018152919052805160209091012060a0525061054692505050565b60003633301480156101be575060348110155b1561024757600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e881146102365733935050505090565b5001516001600160a01b0316919050565b3391505090565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261027557600080fd5b81516001600160401b0381111561028e5761028e61024e565b604051601f8201601f19908116603f011681016001600160401b03811182821017156102bc576102bc61024e565b6040528181528382016020018510156102d457600080fd5b60005b828110156102f3576020818601810151838301820152016102d7565b506000918101602001919091529392505050565b60008060006060848603121561031c57600080fd5b83516001600160401b0381111561033257600080fd5b61033e86828701610264565b602086015190945090506001600160401b0381111561035c57600080fd5b61036886828701610264565b925050604084015160ff8116811461037f57600080fd5b809150509250925092565b600181811c9082168061039e57607f821691505b6020821081036103be57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561040e57806000526020600020601f840160051c810160208510156103eb5750805b601f840160051c820191505b8181101561040b57600081556001016103f7565b50505b505050565b81516001600160401b0381111561042c5761042c61024e565b6104408161043a845461038a565b846103c4565b6020601f821160018114610474576000831561045c5750848201515b600019600385901b1c1916600184901b17845561040b565b600084815260208120601f198516915b828110156104a45787850151825560209485019460019092019101610484565b50848210156104c25786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b60008083546104df8161038a565b6001821680156104f6576001811461050b5761053b565b60ff198316865281151582028601935061053b565b86600052602060002060005b8381101561053357815488820152600190910190602001610517565b505081860193505b509195945050505050565b60805160a051611ae5610572600039600081816102e10152610f870152600061029b0152611ae56000f3fe6080604052600436106101815760003560e01c80637a9e5e4b116100d1578063a69df4b51161008a578063bf7e214f11610064578063bf7e214f146104b1578063cf309012146104d1578063d505accf146104eb578063dd62ed3e1461050b57600080fd5b8063a69df4b51461047c578063a9059cbb14610491578063b3eac1d8146103b957600080fd5b80637a9e5e4b146103995780637ecebe00146103b95780638da5cb5b146103ef57806395d89b41146104275780639dc29fac1461043c578063a0712d681461045c57600080fd5b806330adf81f1161013e57806340c10f191161011857806340c10f191461030357806342966c68146103235780636281133d1461034357806370a082311461036357600080fd5b806330adf81f14610255578063313ce567146102895780633644e515146102cf57600080fd5b806306fdde0314610186578063095ea7b3146101b15780630c53c51c146101e157806313af4035146101f457806318160ddd1461021657806323b872dd14610235575b600080fd5b34801561019257600080fd5b5061019b610551565b6040516101a891906115b0565b60405180910390f35b3480156101bd57600080fd5b506101d16101cc3660046115d8565b6105df565b60405190151581526020016101a8565b61019b6101ef3660046116bf565b610672565b34801561020057600080fd5b5061021461020f366004611733565b610859565b005b34801561022257600080fd5b506000545b6040519081526020016101a8565b34801561024157600080fd5b506101d1610250366004611750565b6108dc565b34801561026157600080fd5b506102277f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b34801561029557600080fd5b506102bd7f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101a8565b3480156102db57600080fd5b506102277f000000000000000000000000000000000000000000000000000000000000000081565b34801561030f57600080fd5b5061021461031e3660046115d8565b610950565b34801561032f57600080fd5b5061021461033e366004611791565b610a3f565b34801561034f57600080fd5b506101d161035e3660046117aa565b610a53565b34801561036f57600080fd5b5061022761037e366004611733565b6001600160a01b031660009081526001602052604090205490565b3480156103a557600080fd5b506102146103b4366004611733565b610ba7565b3480156103c557600080fd5b506102276103d4366004611733565b6001600160a01b031660009081526008602052604090205490565b3480156103fb57600080fd5b5060045461040f906001600160a01b031681565b6040516001600160a01b0390911681526020016101a8565b34801561043357600080fd5b5061019b610c18565b34801561044857600080fd5b506102146104573660046115d8565b610c25565b34801561046857600080fd5b50610214610477366004611791565b610e1c565b34801561048857600080fd5b50610214610e54565b34801561049d57600080fd5b506101d16104ac3660046115d8565b610e87565b3480156104bd57600080fd5b5060035461040f906001600160a01b031681565b3480156104dd57600080fd5b506007546101d19060ff1681565b3480156104f757600080fd5b50610214610506366004611831565b610ea2565b34801561051757600080fd5b506102276105263660046118a0565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6006805461055e906118d9565b80601f016020809104026020016040519081016040528092919081815260200182805461058a906118d9565b80156105d75780601f106105ac576101008083540402835291602001916105d7565b820191906000526020600020905b8154815290600101906020018083116105ba57829003601f168201915b505050505081565b600081600260006105ee611191565b6001600160a01b0390811682526020808301939093526040918201600090812091881680825291909352912091909155610626611191565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161066091815260200190565b60405180910390a35060015b92915050565b60606106a186610697886001600160a01b031660009081526008602052604090205490565b4688888888610a53565b6107045760405162461bcd60e51b815260206004820152602960248201527f6d6574617472616e73616374696f6e2d7369676e65722d7369676e617475726560448201526805adad2e6dac2e8c6d60bb1b60648201526084015b60405180910390fd5b61070d86611234565b6000306001600160a01b0316867f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e88960405160200161074e93929190611913565b60408051601f19818403018152908290526107689161194c565b6000604051808303816000865af19150503d80600081146107a5576040519150601f19603f3d011682016040523d82523d6000602084013e6107aa565b606091505b50925090508061080d5760405162461bcd60e51b815260206004820152602860248201527f636f6c6f6e792d6d65746174782d66756e6374696f6e2d63616c6c2d756e737560448201526718d8d95cdcd99d5b60c21b60648201526084016106fb565b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b87610837611191565b8860405161084793929190611968565b60405180910390a15095945050505050565b610876610864611191565b6000356001600160e01b031916611260565b6108925760405162461bcd60e51b81526004016106fb9061199d565b600480546001600160a01b0319166001600160a01b0383169081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60075460009060ff161561093d576108f5610864611191565b61093d5760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b61094884848461133b565b949350505050565b61095b610864611191565b6109775760405162461bcd60e51b81526004016106fb9061199d565b6001600160a01b0382166000908152600160205260408120805483929061099f9084906119e1565b92505081905550806000808282546109b791906119e1565b90915550506040518181526001600160a01b038316907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a26040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b610a50610a4a611191565b82610c25565b50565b600080610ad088308989604051602001610a7094939291906119f4565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b6040805160008082526020820180845284905260ff87169282019290925260608101889052608081018790529192509060019060a0016020604051602081039080840390855afa158015610b28573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610b8b5760405162461bcd60e51b815260206004820152601f60248201527f636f6c6f6e792d6d65746174782d696e76616c69642d7369676e61747572650060448201526064016106fb565b6001600160a01b038a8116911614915050979650505050505050565b610bb2610864611191565b610bce5760405162461bcd60e51b81526004016106fb9061199d565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6005805461055e906118d9565b610c2d611191565b6001600160a01b0316826001600160a01b031614610d2d576001600160a01b03821660009081526002602052604081208291610c67611191565b6001600160a01b03166001600160a01b03168152602001908152602001600020541015610cd65760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03821660009081526002602052604081208291610cf8611191565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610d279190611a3a565b90915550505b6001600160a01b038216600090815260016020526040902054811115610d955760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b03821660009081526001602052604081208054839290610dbd908490611a3a565b9250508190555080600080828254610dd59190611a3a565b90915550506040518181526001600160a01b038316907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59060200160405180910390a25050565b610e27610864611191565b610e435760405162461bcd60e51b81526004016106fb9061199d565b610a50610e4e611191565b82610950565b610e5f610864611191565b610e7b5760405162461bcd60e51b81526004016106fb9061199d565b6007805460ff19169055565b6000610e9b610e94611191565b84846108dc565b9392505050565b60075460ff1615610f0057610eb8610864611191565b610f005760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b42841015610f505760405162461bcd60e51b815260206004820152601d60248201527f636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e6500000060448201526064016106fb565b6040805180820182526002815261190160f01b6020808301919091526001600160a01b038a166000908152600890915291822080547f0000000000000000000000000000000000000000000000000000000000000000917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c9188610fd983611a4d565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161103d93929190611a66565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa1580156110a8573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906110de5750886001600160a01b0316816001600160a01b0316145b61112a5760405162461bcd60e51b815260206004820152601e60248201527f636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e6174757265000060448201526064016106fb565b6001600160a01b038981166000818152600260209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b60003633301480156111a4575060348110155b1561122d57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e8811461121c5733935050505090565b5001516001600160a01b0316919050565b3391505090565b6001600160a01b038116600090815260086020526040812080549161125883611a4d565b919050555050565b6000306001600160a01b0384160361127a5750600161066c565b6004546001600160a01b03908116908416036112985750600161066c565b6003546001600160a01b03166112b05750600061066c565b60035460405163b700961360e01b81526001600160a01b0385811660048301523060248301526001600160e01b0319851660448301529091169063b700961390606401602060405180830381865afa158015611310573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113349190611a8d565b905061066c565b6000611345611191565b6001600160a01b0316846001600160a01b031614611445576001600160a01b0384166000908152600260205260408120839161137f611191565b6001600160a01b03166001600160a01b031681526020019081526020016000205410156113ee5760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03841660009081526002602052604081208391611410611191565b6001600160a01b03166001600160a01b03168152602001908152602001600020600082825461143f9190611a3a565b90915550505b6001600160a01b0384166000908152600160205260409020548211156114ad5760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b038416600090815260016020526040812080548492906114d5908490611a3a565b90915550506001600160a01b038316600090815260016020526040812080548492906115029084906119e1565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161154e91815260200190565b60405180910390a35060019392505050565b60005b8381101561157b578181015183820152602001611563565b50506000910152565b6000815180845261159c816020860160208601611560565b601f01601f19169290920160200192915050565b602081526000610e9b6020830184611584565b6001600160a01b0381168114610a5057600080fd5b600080604083850312156115eb57600080fd5b82356115f6816115c3565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261162b57600080fd5b813567ffffffffffffffff81111561164557611645611604565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561167457611674611604565b60405281815283820160200185101561168c57600080fd5b816020850160208301376000918101602001919091529392505050565b803560ff811681146116ba57600080fd5b919050565b600080600080600060a086880312156116d757600080fd5b85356116e2816115c3565b9450602086013567ffffffffffffffff8111156116fe57600080fd5b61170a8882890161161a565b9450506040860135925060608601359150611727608087016116a9565b90509295509295909350565b60006020828403121561174557600080fd5b8135610e9b816115c3565b60008060006060848603121561176557600080fd5b8335611770816115c3565b92506020840135611780816115c3565b929592945050506040919091013590565b6000602082840312156117a357600080fd5b5035919050565b600080600080600080600060e0888a0312156117c557600080fd5b87356117d0816115c3565b96506020880135955060408801359450606088013567ffffffffffffffff8111156117fa57600080fd5b6118068a828b0161161a565b9450506080880135925060a0880135915061182360c089016116a9565b905092959891949750929550565b600080600080600080600060e0888a03121561184c57600080fd5b8735611857816115c3565b96506020880135611867816115c3565b95506040880135945060608801359350611883608089016116a9565b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156118b357600080fd5b82356118be816115c3565b915060208301356118ce816115c3565b809150509250929050565b600181811c908216806118ed57607f821691505b60208210810361190d57634e487b7160e01b600052602260045260246000fd5b50919050565b60008451611925818460208901611560565b919091019283525060601b6bffffffffffffffffffffffff19166020820152603401919050565b6000825161195e818460208701611560565b9190910192915050565b6001600160a01b0384811682528316602082015260606040820181905260009061199490830184611584565b95945050505050565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561066c5761066c6119cb565b8481526bffffffffffffffffffffffff198460601b16602082015282603482015260008251611a2a816054850160208701611560565b9190910160540195945050505050565b8181038181111561066c5761066c6119cb565b600060018201611a5f57611a5f6119cb565b5060010190565b60008451611a78818460208901611560565b91909101928352506020820152604001919050565b600060208284031215611a9f57600080fd5b81518015158114610e9b57600080fdfea264697066735822122090928a66070125904780390eb49d45fe12c136aec641b1db69316e0ffefc6da764736f6c634300081b0033",e1=n=>n.length>1,Nn=class extends ci{constructor(...e){e1(e)?super(...e):super(ju,k6,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 ae.Interface(ju)}static connect(e,t){return new oe(e,ju,t)}};xe(Nn,"bytecode",k6),xe(Nn,"abi",ju);var Tp=[{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:"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:"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:[{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:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",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:"_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:"_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:"returnData",type:"bytes"}],stateMutability:"payable",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:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"",type:"address"}],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"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",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:"_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:"_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:"_token",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"incrementLockCounterTo",outputs:[],stateMutability:"nonpayable",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:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"pure",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetwork",type:"address"}],name:"setColonyNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",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:"_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:"_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:"_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:"_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"}],Ii=class{static createInterface(){return new ae.Interface(Tp)}static connect(e,t){return new oe(e,Tp,t)}};xe(Ii,"abi",Tp);var Si;(function(n){n.TokenClient="TokenClient",n.TokenLockingClient="TokenLockingClient"})(Si||(Si={}));var Dn;(function(n){n.Colony="Colony",n.ColonyLegacy="ColonyLegacy",n.Erc20="Erc20",n.Erc2612="Erc2612",n.Sai="Sai"})(Dn||(Dn={}));var{AddressZero:i1}=ht;async function r1(n){try{await n.authority();return}catch{throw new Error("Token can not be assigned a TokenAuthority")}}var s1=async(n,e)=>{let t,a=!0,i=!0;t=Nn.connect(n,e);try{await t.totalSupply()}catch(r){throw new Error(`Token is probably not a valid ERC20 token, got ${r.message}`)}try{await t.locked(),await r1(t)}catch{a=!1}try{await t.nonces(i1)}catch{i=!1}return a?t.tokenClientType=Dn.Colony:i?(t=vn.connect(n,e),t.tokenClientType=Dn.Erc2612):(t=Tn.connect(n,e),t.tokenClientType=Dn.Erc20),t.clientType=Si.TokenClient,t},vp=s1;var o1=(n,e)=>{let t=Ii.connect(n,e);return t.clientType=Si.TokenLockingClient,t},wp=o1;var{AddressZero:_p}=ht,u1=Tn.connect(_p,new ea.BaseProvider(3656691)).interface,d1=Ci.connect(_p,new ea.BaseProvider(3656691)).interface,l1=vn.connect(_p,new ea.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"},{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:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{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:"returnData",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:"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:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"}],Fs=class{static createInterface(){return new ae.Interface(kp)}static connect(e,t){return new oe(e,kp,t)}};Fs.abi=kp;var Ap=[{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:"returnData",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"}],Ls=class{static createInterface(){return new ae.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:"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:!1,internalType:"address",name:"bridgeAddress",type:"address"}],name:"BridgeSet",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:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateSentToBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateStoredFromBridge",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:"uint256",name:"skillId",type:"uint256"}],name:"SkillAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillCreationStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillStoredFromBridge",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:[{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"address",name:"_resolver",type:"address"}],name:"addColonyVersion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_resolver",type:"address"}],name:"addExtensionToNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"addPendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPendingSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"addReputationUpdateLogFromBridge",outputs:[],stateMutability:"nonpayable",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:"_parentSkillId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"addSkillFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",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:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"chainId",type:"uint256"}],name:"bridgeCurrentRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"bridgePendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"skillId",type:"uint256"}],name:"bridgeSkillIfNotMiningChain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"burnUnneededRewards",outputs:[],stateMutability:"nonpayable",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:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"}],name:"claimMiningReward",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:"address",name:"_tokenAddress",type:"address"}],name:"createMetaColony",outputs:[],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:"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:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateExtension",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:"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:"returnData",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"getBridgedReputationUpdateCount",outputs:[{internalType:"uint256",name:"bridgedReputationCount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"}],name:"getBridgedSkillCounts",outputs:[{internalType:"uint256",name:"skillCount",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:"uint256",name:"_id",type:"uint256"}],name:"getColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyBridgeAddress",outputs:[{internalType:"address",name:"bridge",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCreationSalt",outputs:[{internalType:"bytes32",name:"salt",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"}],name:"getColonyVersionResolver",outputs:[{internalType:"address",name:"_resolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentColonyVersion",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getENSRegistrar",outputs:[{internalType:"address",name:"_address",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:[{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:[],name:"getFeeInverse",outputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMetaColony",outputs:[{internalType:"address payable",name:"_colonyAddress",type:"address"}],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:"getMiningChainId",outputs:[{internalType:"uint256",name:"reputationMiningChainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"}],name:"getMiningDelegator",outputs:[{internalType:"address",name:"_delegator",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiningResolver",outputs:[{internalType:"address",name:"miningResolverAddress",type:"address"}],stateMutability:"view",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:"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:"address",name:"_token",type:"address"}],name:"getPayoutWhitelist",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"getPendingReputationUpdate",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:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.PendingReputationUpdate",name:"update",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"getPendingSkillAddition",outputs:[{internalType:"uint256",name:"parentId",type:"uint256"}],stateMutability:"view",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:"_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:[{internalType:"bool",name:"_active",type:"bool"}],name:"getReputationMiningCycle",outputs:[{internalType:"address",name:"_repMiningCycleAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningCycleReward",outputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningSkillId",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"view",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:"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_deprecated",type:"bool"}],internalType:"struct ColonyNetworkDataTypes.Skill",name:"_skill",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSkillCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTokenLocking",outputs:[{internalType:"address",name:"_lockingAddress",type:"address"}],stateMutability:"view",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:"miningChainId",type:"uint256"},{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"}],name:"initialiseReputationMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[{internalType:"uint256",name:"_rootLocalSkillId",type:"uint256"}],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:"address",name:"_colony",type:"address"}],name:"isColony",outputs:[{internalType:"bool",name:"_addressIsColony",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],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:"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:"_stakers",type:"address[]"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"punishStakers",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:"_username",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerUserLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_bridgeAddress",type:"address"}],name:"setColonyBridgeAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],name:"setFeeInverse",outputs:[],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:"_miningResolverAddress",type:"address"}],name:"setMiningResolver",outputs:[],stateMutability:"nonpayable",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:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",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:"uint256",name:"_amount",type:"uint256"}],name:"setReputationMiningCycleReward",outputs:[],stateMutability:"nonpayable",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:[{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"},{internalType:"uint256",name:"nonce",type:"uint256"}],name:"setReputationRootHashFromBridge",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:"address",name:"_tokenLockingAddress",type:"address"}],name:"setTokenLocking",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:"uint256",name:"_amount",type:"uint256"}],name:"stakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"startNextCycle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"startTokenAuction",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:"bytes32",name:"_extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"unstakeForMining",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:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"}],Ri=class{static createInterface(){return new ae.Interface(Mp)}static connect(e,t){return new oe(e,Mp,t)}};Ri.abi=Mp;var Ta=class{constructor({contract:e,config:t,method:a,args:i,eventData:r,txConfig:s}){this.config=t,this.contract=e,this.method=a,this.args=i,this.eventData=r,this.txConfig=s}async getArgs(e){let t=[];return typeof this.args=="function"?t=await this.args():t=this.args,e&&t.push(e),t}async getTx(e){let t=await this.getArgs(e);return await this.contract.functions[this.method].apply(this.contract,t)}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.config.ipfs.getMetadataForEvent.bind(this.config.ipfs,Bs[this.txConfig.metadataType],t.metadata);return[t,e,a]}return[t,e]}return[{},e]}async broadcastMetaTx(e){let{provider:t}=this.config.getSigner();if(!t)throw new Error("No provider found");let i=await(await fetch(`${this.config.metaTxBroadcasterEndpoint}/broadcast`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();if(i.status!=="success")throw new Error(`Could not send Metatransaction. Reason given: ${i.data.reason}`);if(!i.data?.txHash)throw new Error("Could not get transaction hash from broadcaster response");return t.getTransaction(i.data.txHash)}async waitForMetaTx(e){let t=await e.wait();return t.parsedLogs=jl(t.logs,this.contract.interface),t}tx(){return{send:async e=>{let t=await this.getTx(e);return[t,this.getMined.bind(this,t)]},mined:async e=>{let t=await this.getTx(e);return this.getMined(t)},encode:async()=>{let e=await this.getArgs();return this.contract.interface.encodeFunctionData(this.method,e)}}}};var{arrayify:y1,solidityKeccak256:f1,splitSignature:c1}=ae,Ua=class extends Ta{async sendMetaTransaction(e,t){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let a=this.config.getSigner(),{provider:i}=a;if(!i)throw new Error("No provider found");let r;this.config.network===Pn.Custom?r=1:r=(await i.getNetwork()).chainId;let s=await a.getAddress(),o=await this.contract.functions.getMetatransactionNonce(s),l=f1(["uint256","address","uint256","bytes"],[o.toString(),t,r,e]),p=y1(l),f=await a.signMessage(p),{r:x,s:I,v:_}=c1(f),v={target:t,payload:e,userAddress:s,r:x,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=(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}},Hu=(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=_e.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 Ep=[{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 ae.Interface(Ep)}static connect(e,t){return new oe(e,Ep,t)}};Pi.abi=Ep;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 ae.Interface(Cp)}static connect(e,t){return new oe(e,Cp,t)}};Ni.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"}],Di=class{static createInterface(){return new ae.Interface(Ip)}static connect(e,t){return new oe(e,Ip,t)}};Di.abi=Ip;var Sp=[{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 ae.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:[{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 ae.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 ae.Interface(Pp)}static connect(e,t){return new oe(e,Pp,t)}};Fi.abi=Pp;var{AddressZero:v1}=ht,On=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(Ba(On.extensionType),e.address);if(t===v1)throw new Error(`${On.extensionType} extension is not installed for this Colony`);let a=await Er(t,e.config.signerOrProvider);if(!wi(On.extensionType,a,e.version))throw new Error(`Version ${a} of the ${On.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=On.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${On.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new On(e,r,a)}static getLatestSupportedVersion(){return On.supportedVersions[On.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||_e.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[_]),I=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,I,x,s,_e.SkillIgnore]},async _=>({...te("OneTxPaymentMade",_)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Ba(Ae.OneTxPayment),t],async a=>({...te("ExtensionUpgraded",a)}))}},Va=On;Va.supportedVersions=[{version:3,factory:Oi},{version:4,factory:Bi},{version:5,factory:Fi}],Va.extensionType=Ae.OneTxPayment;var Bn=class{constructor(e,t){typeof t=="string"?this.tokenClient=Tn.connect(t,e.config.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=>({...te("Transfer",a)}))}transferFrom(e,t,a){return this.colonyNetwork.createTxCreator(this.tokenClient,"transferFrom",[e,t,a],async i=>({...te("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=>({...te("Approval",a)}))}};var Us=class extends Bn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=Nn.connect(a,t.config.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=>({...te("LogSetAuthority",a)}))}setOwner(t){return this.colonyNetwork.createMetaTxCreator(this.tokenClient,"setOwner",[t],async a=>({...te("LogSetOwner",a)}))}};var Vs=class extends Bn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=vn.connect(a,t.config.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=>({...te("Approval",i)}))}};var A6=async(n,e)=>{let t=await vp(e,n.config.signerOrProvider);switch(t.tokenClientType){case Dn.Colony:return new Us(n,t);case Dn.Erc20:return new Bn(n,t);case Dn.Erc2612:return new Vs(n,t);default:throw new Error("Your token is not supported in Colony SDK (yet).")}};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"},{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 ae.Interface(Np)}static connect(e,t){return new oe(e,Np,t)}};Li.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"},{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 ae.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 ae.Interface(Op)}static connect(e,t){return new oe(e,Op,t)}};Vi.abi=Op;var{AddressZero:Bp}=ht;var qu=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===Bp)throw new Error(`${Fn.extensionType} extension is not installed for this Colony`);let a=await Er(t,e.config.signerOrProvider);if(!wi(Fn.extensionType,a,e.version))throw new Error(`Version ${a} of the ${Fn.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Fn.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${Fn.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new Fn(e,r,a)}static getLatestSupportedVersion(){return Fn.supportedVersions[Fn.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 ae.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=>({...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:a,value:i,branchMask:r,siblings:s}=await Cs(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),this.colony.reputation,this.votingReputationContract,e,Bp,Bl);return[e,t,Bp,Bl,a,i,r,s]},async t=>({...te("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.config.ipfs.uploadMetadata(Re.Decision,t),[e,a]},async a=>({...te("Annotation",a)}),{metadataType:Re.Decision})}approveStake(e,t=_e.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{...Hu("UserTokenApproved",a,i.getInternalTokenLockingContract().interface)}})}stakeMotion(e,t,a){let i=async()=>{let r=await this.colony.config.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(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 I=await this.getMinStake(o,t);if(F.from(a).lt(I))throw new Error(`The staked amount is too small. Please stake at least ${Ul(I)}`);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),a,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 a=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.config.getSigner().getAddress(),{key:p,value:f,branchMask:x,siblings:I}=await this.colony.reputation.getReputationWithProofs(o,l,s),_=await this.createMotionSalt(e),v=ae.solidityKeccak256(["bytes","uint256"],[_,t]);return[e,v,p,f,x,I]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"submitVote",a,async i=>({...te("MotionVoteSubmitted",i)}))}revealVote(e,t){let a=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.config.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:I,value:_,branchMask:v,siblings:S}=p;return[e,f,F.from(x),I,_,v,S]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"revealVote",a,async i=>({...te("MotionVoteRevealed",i)}))}escalateMotion(e,t){let a=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.config.getSigner().getAddress(),p=await vi(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),t,r),{key:f,value:x,branchMask:I,siblings:_}=await this.colony.reputation.getReputationWithProofs(o,l,s);return[e,t,p,f,x,I,_]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"escalateMotion",a,async i=>({...te("MotionEscalated",i)}))}finalizeMotion(e){let t=async()=>{let a=await this.votingReputationContract.getMotionState(e);if(a!==zt.Finalizable)throw new Error(`Motion cannot be finalized. It's currently in "${zt[a]}" state`);return[e]};return this.colony.colonyNetwork.createMetaTxCreator(this.votingReputationContract,"finalizeMotion",t,async a=>({...te("MotionFinalized",a)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[Ba(Ae.VotingReputation),t],async a=>({...te("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}}},ja=Fn;ja.supportedVersions=[{version:7,factory:Li},{version:8,factory:Ui},{version:9,factory:Vi}],ja.extensionType=Ae.VotingReputation;var A1={["motion"]:ja,["oneTx"]:Va},Dr=class{static async connect(e,t){let a=await Er(t,e.config.signerOrProvider),i=Dr.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.config.signerOrProvider),s=await r.getToken(),o=await A6(e,s),l=new Dr(e,r,o,a);return await l.updateExtensions(),l}static getLatestSupportedVersion(){return Dr.supportedVersions[Dr.supportedVersions.length-1].version}constructor(e,t,a,i){this.colony=t,this.colonyNetwork=e,this.config=e.config,this.address=t.address,this.ext={},this.reputation=new na(e.getInternalNetworkContract(),t,{customEndpointUrl:e.config.reputationOracleEndpoint}),this.token=a,this.version=i}createColonyTxCreator(e,t,a,i,r){return new Nr({colony:this,config:this.colonyNetwork.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createPermissionedColonyTxCreator(e,t,a,i,r,s){return new Nr({colony:this,config:this.colonyNetwork.config,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 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.config.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.config.ipfs.uploadMetadata(Re.Domain,e),[_e.RootDomain,t]},{roles:vt.Architecture,domain:_e.RootDomain},async t=>({...te("DomainAdded",t),...te("FundingPotAdded",t),...te("DomainMetadata",t)}),{metadataType:Re.Domain}):this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256)",[_e.RootDomain],{roles:vt.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.config.ipfs.uploadMetadata(Re.Domain,e),[_e.RootDomain,t]},{roles:vt.Architecture,domain:_e.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 a=>({...te("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=>({...te("ColonyFundsClaimed",a)}))}moveFundsToTeam(e,t,a,i){let r=_e.RootDomain,s=a||_e.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(),I=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,I,_,v,S,e,o]},async l=>({...te("ColonyFundsMovedBetweenFundingPots",l)}))}async getReputation(e,t=_e.RootDomain,a=3){let{skillId:i}=await this.colony.getDomain(t);return this.reputation.getReputationFraction(i,e,void 0,a)}async getReputationPoints(e,t=_e.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=>({...te("ArbitraryTransaction(address,address,bytes,bool)",a)}))}annotateTransaction(e,t){return this.createColonyTxCreator(this.colony,"annotateTransaction",async()=>{let a;return typeof t=="string"?a=t:a=await this.config.ipfs.uploadMetadata(Re.Annotation,t),[e,a]},async a=>({...te("Annotation",a)}),{metadataType:Re.Annotation})}installExtension(e){let t=A1[e],a=t.getLatestSupportedVersion(),{extensionType:i}=t;if(!wi(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",[Ba(i),t.getLatestSupportedVersion()],async s=>({...Hu("ExtensionInstalled",s,r.interface)}))}async getRoles(e,t=_e.RootDomain){let a=await this.colony.getUserRoles(e,t);return ou(a)}setRoles(e,t,a=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let i=await this.getRoles(e,a),r=Array.from(new Set([...i,...[].concat(t)])),s=Vl(r);return[e,a,s]},{roles:vt.Architecture,domain:a},async i=>({...te("ColonyRoleSet",i),...te("RecoveryRoleSet",i)}))}unsetRoles(e,t,a=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let r=(await this.getRoles(e,a)).filter(o=>![].concat(t).includes(o)),s=Vl(r);return[e,a,s]},{roles:vt.Architecture,domain:a},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 a=[],i=await t.getTokenLocking();return e?a=[...e,i]:a=[i],[this.token.address,this.address,a]},async a=>({...te("TokenAuthorityDeployed",a)}))}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 a=>({...te("ColonyUpgraded",a)}))}awardReputation(e,t,a=_e.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=>({...te("ArbitraryReputationUpdate",i)}))}smiteReputation(e,t,a=_e.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:vt.Arbitration},async i=>({...te("ArbitraryReputationUpdate",i)}))}},Or=Dr;Or.supportedVersions=[{version:11,factory:Pi},{version:12,factory:Ni},{version:13,factory:Di}];var{splitSignature:M1}=ae,Gu=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,a]){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let i=this.contract.signer,{provider:r}=i;if(!r)throw new Error("No provider found");let s;this.config.network===Pn.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:a,nonce:l.toString(),deadline:f}),{r:I,s:_,v}=M1(x),S={target:e,owner:o,spender:t,value:a.toString(),deadline:f,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 js=class{constructor(e,t){this.address=t,this.colonyNetwork=e,this.tokenLockingContract=wp(this.address,e.config.signerOrProvider)}getInternalTokenLockingContract(){return this.tokenLockingContract}deposit(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"deposit(address,uint256,bool)",[e,t,!1],async a=>({...te("UserTokenDeposited",a)}))}withdraw(e,t){return this.colonyNetwork.createMetaTxCreator(this.tokenLockingContract,"withdraw(address,uint256,bool)",[e,t,!1],async a=>({...te("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 Hs=class{constructor(e,t){let a=t?.network||Pn.ArbitrumOne;this.metaTxBroadcasterEndpoint=t?.metaTxBroadcasterEndpoint||ru[a],this.ipfs=new Pr(t?.ipfsAdapter),this.network=a,this.reputationOracleEndpoint=t?.reputationOracleEndpoint||Mr[a],this.signerOrProvider=e}getSigner(){if(!(this.signerOrProvider instanceof St))throw new Error("Need a signer to create a transaction");return this.signerOrProvider}};var{namehash:M6}=ae,{AddressZero:Fp}=ht,qs=class{constructor(e,t){this.config=new Hs(e,t),this.contract=Ri.connect(t?.customNetworkAddress||iu[this.config.network],e)}async getTokenLocking(){if(!this.locking){let e=await this.contract.getTokenLocking();this.locking=new js(this,e)}return this.locking}getInternalNetworkContract(){return this.contract}createTxCreator(e,t,a,i,r){return new Ta({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createMetaTxCreator(e,t,a,i,r){return new Ua({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createEip2612TxCreator(e,t,a,i,r){return new Gu({config:this.config,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[Fp,e.name,e.symbol,e.decimals||18,0,t,""]}return[e,"","",0,0,t,""]};return a?this.createMetaTxCreator(this.contract,"createColonyForFrontend",async()=>{let r=await i();return typeof a=="string"?r[6]=a:r[6]=await this.config.ipfs.uploadMetadata(Re.Colony,a),r},async r=>({...te("TokenDeployed",r),...te("ColonyAdded",r),...te("TokenAuthorityDeployed",r)}),{metadataType:Re.Colony}):this.createMetaTxCreator(this.contract,"createColonyForFrontend",i,async r=>({...te("TokenDeployed",r),...te("ColonyAdded",r),...te("TokenAuthorityDeployed",r)}))}async getColony(e){return Or.connect(this,e)}async getMetaColony(){let e=await this.contract.getMetaColony();return this.getColony(e)}async getColonyLabel(e){let t=await this.contract.lookupRegisteredENSDomain(e);return t?t.replace(Ms[this.config.network],""):null}async getColonyAddress(e){let t=M6(`${e}${Ms[this.config.network]}`),a=await this.contract.addr(t);return a!==Fp?a:null}async getUsername(e){let t=await this.contract.lookupRegisteredENSDomain(e);return t?t.replace(Es[this.config.network],""):null}async getUserAddress(e){let t=M6(`${e}${Es[this.config.network]}`),a=await this.contract.addr(t);return a!==Fp?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.contract,"registerUserLabel",t,async a=>({...te("UserLabelRegistered",a)}))}deployToken(e,t,a=18){return this.createMetaTxCreator(this.contract,"deployTokenViaNetwork",[e,t,a],async i=>({...te("TokenDeployed",i)}))}};var E6=new ea.Web3Provider(window.ethereum),E1=async n=>new qs(n).getMetaColony(),C1=async()=>(await E6.send("eth_requestAccounts",[]),E6.getSigner()),C6=document.querySelector("#button"),Up=document.querySelector("#error"),I6=document.querySelector("#result");if(!C6||!Up||!I6)throw new Error("Could not find all required HTML elements");var I1=n=>{Up.innerText=n},S1=()=>{Up.innerText=""},Lp=n=>{I6.innerText=n};C6.addEventListener("click",async()=>{S1(),Lp("Thinking...");try{let n=await C1(),e=await E1(n);Lp(`Connected to metaColonyClient with version ${e.version}`)}catch(n){I1(`Found an error: ${n.message}`),Lp("")}});})(); /** * [js-sha3]{@link https://github.com/emn178/js-sha3} * diff --git a/motions.js b/motions.js index 2eccf0a1b..2b9831dcc 100644 --- a/motions.js +++ b/motions.js @@ -1,13 +1,13 @@ -"use strict";(()=>{var Z6=Object.create;var Ys=Object.defineProperty;var eh=Object.getOwnPropertyDescriptor;var th=Object.getOwnPropertyNames;var nh=Object.getPrototypeOf,ah=Object.prototype.hasOwnProperty;var ih=(n,e,t)=>e in n?Ys(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),Wi=(n,e)=>{for(var t in e)Ys(n,t,{get:e[t],enumerable:!0})},rh=(n,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of th(e))!ah.call(n,i)&&i!==t&&Ys(n,i,{get:()=>e[i],enumerable:!(a=eh(e,i))||a.enumerable});return n};var En=(n,e,t)=>(t=n!=null?Z6(nh(n)):{},rh(e||!n||!n.__esModule?Ys(t,"default",{value:n,enumerable:!0}):t,n));var xe=(n,e,t)=>(ih(n,typeof e!="symbol"?e+"":e,t),t);var $p=ae(()=>{});var fd=ae((Qp,yd)=>{(function(n,e){"use strict";function t(C,u){if(!C)throw new Error(u||"Assertion failed")}function a(C,u){C.super_=u;var y=function(){};y.prototype=u.prototype,C.prototype=new y,C.prototype.constructor=C}function i(C,u,y){if(i.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=i:e.BN=i,i.BN=i,i.wordSize=26;var r;try{typeof window<"u"&&typeof window.Buffer<"u"?r=window.Buffer:r=$p().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(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 b=s(C,y);return y-1>=u&&(b|=s(C,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(C,u,y,b){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()},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"],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];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=I[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(C){for(var u=new Array(C.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-C.length+1);P<=c;P++){var D=d-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[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,Y=ee&8191,Q=ee>>>13,ft=w[3]|0,Z=ft&8191,le=ft>>>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,Ge=Xa&8191,ze=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(c,We),d=Math.imul(c,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(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 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(c,Qe)|0,d=d+Math.imul(c,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(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(c,Xe)|0,d=d+Math.imul(c,Ze)|0,d=d+Math.imul(P,Xe)|0,m=m+Math.imul(P,Ze)|0;var Ia=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Ia>>>26)|0,Ia&=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(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 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(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 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(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 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(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 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(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 td=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(td>>>26)|0,td&=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,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(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 nd=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(nd>>>26)|0,nd&=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,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(Ge,Qe),d=Math.imul(Ge,Ye),d=d+Math.imul(ze,Qe)|0,m=Math.imul(ze,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(Ge,Xe),d=Math.imul(Ge,Ze),d=d+Math.imul(ze,Xe)|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 rd=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(rd>>>26)|0,rd&=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 sd=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(sd>>>26)|0,sd&=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 od=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(od>>>26)|0,od&=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 ud=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(ud>>>26)|0,ud&=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 dd=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(dd>>>26)|0,dd&=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 ld=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(ld>>>26)|0,ld&=67108863,g=Math.imul(Ge,lt),d=Math.imul(Ge,pt),d=d+Math.imul(ze,lt)|0,m=Math.imul(ze,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]=Ca,h[3]=Ia,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(C,u,y){y.negative=u.negative^C.negative,y.length=C.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(C,u,y){return U(C,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(C,u){this.x=C,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 $(C,u){this.name=C,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(C){if(typeof C=="string"){var u=i._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 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(C){q.call(this,C),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 yd>"u"||yd,Qp)});var vy=ae(($g,ao)=>{(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 ao=="object"&&ao.exports,o=typeof define=="function"&&define.amd,l=!a.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",p="0123456789abcdef".split(""),f=[31,7936,2031616,520093696],x=[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};(a.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(c){return Object.prototype.toString.call(c)==="[object Array]"}),l&&(a.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,Y){return u["cshake"+c].update(V,K,ee,Y)[D]()}},de=function(c,P,D){return function(V,K,ee,Y){return u["kmac"+c].update(V,K,ee,Y)[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(n);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(n)}else throw new Error(n);P=!0}for(var V=this.blocks,K=this.byteCount,ee=c.length,Y=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[Y],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(n);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(n)}else throw new Error(n);P=!0}var V=0,K=c.length;if(P)V=K;else for(var ee=0;ee=57344?V+=3:(Y=65536+((Y&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],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 c=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%c===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(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,Y,Q,ft,Z,le,Ka,De,Oe,Ja,Be,Fe,$a,Le,Ue,Qa,Ve,je,Ya,He,qe,Xa,Ge,ze,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,Ca,Ia,Sa;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],Y=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],Ka=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^(Y<<1|Q>>>31),D=Oe^(Q<<1|Y>>>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=Y^(le<<1|Ka>>>31),D=Q^(Ka<<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=Ka^(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,Ja=c[0],Be=c[1],at=c[11]<<4|c[10]>>>28,ri=c[10]<<4|c[11]>>>28,ze=c[20]<<3|c[21]>>>29,Za=c[21]<<3|c[20]>>>29,Ma=c[31]<<9|c[30]>>>23,Ca=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,ti=c[3]<<1|c[2]>>>31,Fe=c[13]<<12|c[12]>>>20,$a=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,Ia=c[42]<<2|c[43]>>>30,Sa=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,Ye=c[15]<<6|c[14]>>>26,Le=c[25]<<11|c[24]>>>21,Ue=c[24]<<11|c[25]>>>21,si=c[34]<<15|c[35]>>>17,st=c[35]<<15|c[34]>>>17,ei=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,ui=c[17]<<23|c[16]>>>9,lt=c[16]<<23|c[17]>>>9,ni=c[26]<<25|c[27]>>>7,Xe=c[27]<<25|c[26]>>>7,Qa=c[36]<<21|c[37]>>>11,Ve=c[37]<<21|c[36]>>>11,ot=c[47]<<24|c[46]>>>8,oi=c[46]<<24|c[47]>>>8,ii=c[8]<<27|c[9]>>>5,nt=c[9]<<27|c[8]>>>5,Xa=c[18]<<20|c[19]>>>12,Ge=c[19]<<20|c[18]>>>12,pt=c[29]<<7|c[28]>>>25,Ea=c[28]<<7|c[29]>>>25,Ze=c[38]<<8|c[39]>>>24,ai=c[39]<<8|c[38]>>>24,je=c[48]<<14|c[49]>>>18,Ya=c[49]<<14|c[48]>>>18,c[0]=Ja^~Fe&Le,c[1]=Be^~$a&Ue,c[10]=He^~Xa&ze,c[11]=qe^~Ge&Za,c[20]=$e^~Qe&ni,c[21]=ti^~Ye&Xe,c[30]=ii^~at&it,c[31]=nt^~ri&rt,c[40]=ut^~ui&pt,c[41]=dt^~lt&Ea,c[2]=Fe^~Le&Qa,c[3]=$a^~Ue&Ve,c[12]=Xa^~ze&We,c[13]=Ge^~Za&Ke,c[22]=Qe^~ni&Ze,c[23]=Ye^~Xe&ai,c[32]=at^~it&si,c[33]=ri^~rt&st,c[42]=ui^~pt&Ma,c[43]=lt^~Ea&Ca,c[4]=Le^~Qa&je,c[5]=Ue^~Ve&Ya,c[14]=ze^~We&ei,c[15]=Za^~Ke&Je,c[24]=ni^~Ze&et,c[25]=Xe^~ai&tt,c[34]=it^~si&ot,c[35]=rt^~st&oi,c[44]=pt^~Ma&Ia,c[45]=Ea^~Ca&Sa,c[6]=Qa^~je&Ja,c[7]=Ve^~Ya&Be,c[16]=We^~ei&He,c[17]=Ke^~Je&qe,c[26]=Ze^~et&$e,c[27]=ai^~tt&ti,c[36]=si^~ot&ii,c[37]=st^~oi&nt,c[46]=Ma^~Ia&ut,c[47]=Ca^~Sa&dt,c[8]=je^~Ja&Fe,c[9]=Ya^~Be&$a,c[18]=ei^~He&Xa,c[19]=Je^~qe&Ge,c[28]=et^~$e&Qe,c[29]=tt^~ti&Ye,c[38]=ot^~ii&at,c[39]=oi^~nt&ri,c[48]=Ia^~ut&ui,c[49]=Sa^~dt<,c[0]^=S[V],c[1]^=S[V+1]};if(s)ao.exports=u;else{for(b=0;b{h0.exports=m0;function m0(n,e){if(!n)throw new Error(e||"Assertion failed")}m0.equal=function(e,t,a){if(e!=t)throw new Error(a||"Assertion failed: "+e+" != "+t)}});var x0=ae((j3,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 a=function(){};a.prototype=t.prototype,e.prototype=new a,e.prototype.constructor=e}}});var Cn=ae(Ne=>{"use strict";var l2=or(),p2=x0();Ne.inherits=p2;function y2(n,e){return(n.charCodeAt(e)&64512)!==55296||e<0||e+1>=n.length?!1:(n.charCodeAt(e+1)&64512)===56320}function f2(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):y2(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}Ne.htonl=b0;function m2(n,e){for(var t="",a=0;a>>0}return r}Ne.join32=h2;function x2(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}Ne.split32=x2;function b2(n,e){return n>>>e|n<<32-e}Ne.rotr32=b2;function g2(n,e){return n<>>32-e}Ne.rotl32=g2;function T2(n,e){return n+e>>>0}Ne.sum32=T2;function v2(n,e,t){return n+e+t>>>0}Ne.sum32_3=v2;function w2(n,e,t,a){return n+e+t+a>>>0}Ne.sum32_4=w2;function _2(n,e,t,a,i){return n+e+t+a+i>>>0}Ne.sum32_5=_2;function k2(n,e,t,a){var i=n[e],r=n[e+1],s=a+r>>>0,o=(s>>0,n[e+1]=s}Ne.sum64=k2;function A2(n,e,t,a){var i=e+a>>>0,r=(i>>0}Ne.sum64_hi=A2;function E2(n,e,t,a){var i=e+a;return i>>>0}Ne.sum64_lo=E2;function M2(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}Ne.sum64_4_hi=M2;function C2(n,e,t,a,i,r,s,o){var l=e+a+r+o;return l>>>0}Ne.sum64_4_lo=C2;function I2(n,e,t,a,i,r,s,o,l,p){var f=0,x=e;x=x+a>>>0,f+=x>>0,f+=x>>0,f+=x>>0,f+=x>>0}Ne.sum64_5_hi=I2;function S2(n,e,t,a,i,r,s,o,l,p){var f=e+a+r+o+p;return f>>>0}Ne.sum64_5_lo=S2;function R2(n,e,t){var a=e<<32-t|n>>>t;return a>>>0}Ne.rotr64_hi=R2;function P2(n,e,t){var a=n<<32-t|e>>>t;return a>>>0}Ne.rotr64_lo=P2;function N2(n,e,t){return n>>>t}Ne.shr64_hi=N2;function D2(n,e,t){var a=n<<32-t|e>>>t;return a>>>0}Ne.shr64_lo=D2});var ur=ae(w0=>{"use strict";var v0=Cn(),O2=or();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}w0.BlockHash=Ao;Ao.prototype.update=function(e,t){if(e=v0.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=v0.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 B2=Cn(),Wn=B2.rotr32;function F2(n,e,t,a){if(n===0)return _0(e,t,a);if(n===1||n===3)return A0(e,t,a);if(n===2)return k0(e,t,a)}fa.ft_1=F2;function _0(n,e,t){return n&e^~n&t}fa.ch32=_0;function k0(n,e,t){return n&e^n&t^e&t}fa.maj32=k0;function A0(n,e,t){return n^e^t}fa.p32=A0;function L2(n){return Wn(n,2)^Wn(n,13)^Wn(n,22)}fa.s0_256=L2;function U2(n){return Wn(n,6)^Wn(n,11)^Wn(n,25)}fa.s1_256=U2;function V2(n){return Wn(n,7)^Wn(n,18)^n>>>3}fa.g0_256=V2;function j2(n){return Wn(n,17)^Wn(n,19)^n>>>10}fa.g1_256=j2});var C0=ae((z3,M0)=>{"use strict";var dr=Cn(),H2=ur(),q2=jd(),Hd=dr.rotl32,ns=dr.sum32,G2=dr.sum32_5,z2=q2.ft_1,E0=H2.BlockHash,W2=[1518500249,1859775393,2400959708,3395469782];function Kn(){if(!(this instanceof Kn))return new Kn;E0.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}dr.inherits(Kn,E0);M0.exports=Kn;Kn.blockSize=512;Kn.outSize=160;Kn.hmacStrength=80;Kn.padLength=64;Kn.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 lr=Cn(),K2=ur(),pr=jd(),J2=or(),In=lr.sum32,$2=lr.sum32_4,Q2=lr.sum32_5,Y2=pr.ch32,X2=pr.maj32,Z2=pr.s0_256,ex=pr.s1_256,tx=pr.g0_256,nx=pr.g1_256,I0=K2.BlockHash,ax=[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;I0.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=ax,this.W=new Array(64)}lr.inherits(Jn,I0);S0.exports=Jn;Jn.blockSize=512;Jn.outSize=256;Jn.hmacStrength=192;Jn.padLength=64;Jn.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 Gd=Cn(),R0=qd();function ca(){if(!(this instanceof ca))return new ca;R0.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}Gd.inherits(ca,R0);P0.exports=ca;ca.blockSize=512;ca.outSize=224;ca.hmacStrength=192;ca.padLength=64;ca.prototype._digest=function(e){return e==="hex"?Gd.toHex32(this.h.slice(0,7),"big"):Gd.split32(this.h.slice(0,7),"big")}});var Kd=ae((J3,F0)=>{"use strict";var Zt=Cn(),ix=ur(),rx=or(),$n=Zt.rotr64_hi,Qn=Zt.rotr64_lo,D0=Zt.shr64_hi,O0=Zt.shr64_lo,Oa=Zt.sum64,zd=Zt.sum64_hi,Wd=Zt.sum64_lo,sx=Zt.sum64_4_hi,ox=Zt.sum64_4_lo,ux=Zt.sum64_5_hi,dx=Zt.sum64_5_lo,B0=ix.BlockHash,lx=[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 Sn(){if(!(this instanceof Sn))return new Sn;B0.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=lx,this.W=new Array(160)}Zt.inherits(Sn,B0);F0.exports=Sn;Sn.blockSize=1024;Sn.outSize=512;Sn.hmacStrength=192;Sn.padLength=128;Sn.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 Jd=Cn(),L0=Kd();function ma(){if(!(this instanceof ma))return new ma;L0.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}Jd.inherits(ma,L0);U0.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 j0=ae(yr=>{"use strict";yr.sha1=C0();yr.sha224=N0();yr.sha256=qd();yr.sha384=V0();yr.sha512=Kd()});var K0=ae(W0=>{"use strict";var mi=Cn(),_x=ur(),Eo=mi.rotl32,H0=mi.sum32,as=mi.sum32_3,q0=mi.sum32_4,z0=_x.BlockHash;function Yn(){if(!(this instanceof Yn))return new Yn;z0.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}mi.inherits(Yn,z0);W0.ripemd160=Yn;Yn.blockSize=512;Yn.outSize=160;Yn.hmacStrength=192;Yn.padLength=64;Yn.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,f=r,x=s,I=o,_=0;_<80;_++){var v=H0(Eo(q0(a,G0(_,i,r,s),e[Ex[_]+t],kx(_)),Cx[_]),o);a=o,o=s,s=Eo(r,10),r=i,i=v,v=H0(Eo(q0(l,G0(79-_,p,f,x),e[Mx[_]+t],Ax(_)),Ix[_]),I),l=I,I=x,x=Eo(f,10),f=p,p=v}v=as(this.h[1],r,x),this.h[1]=as(this.h[2],s,I),this.h[2]=as(this.h[3],o,l),this.h[3]=as(this.h[4],a,p),this.h[4]=as(this.h[0],i,f),this.h[0]=v};Yn.prototype._digest=function(e){return e==="hex"?mi.toHex32(this.h,"little"):mi.split32(this.h,"little")};function G0(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 kx(n){return n<=15?0:n<=31?1518500249:n<=47?1859775393:n<=63?2400959708:2840853838}function Ax(n){return n<=15?1352829926:n<=31?1548603684:n<=47?1836072691:n<=63?2053994217:0}var Ex=[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],Mx=[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],Cx=[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],Ix=[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 $0=ae((X3,J0)=>{"use strict";var Sx=Cn(),Rx=or();function fr(n,e,t){if(!(this instanceof fr))return new fr(n,e,t);this.Hash=n,this.blockSize=n.blockSize/8,this.outSize=n.outSize/8,this.inner=null,this.outer=null,this._init(Sx.toArray(e,t))}J0.exports=fr;fr.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),Rx(e.length<=this.blockSize);for(var t=e.length;t{var Nt=Q0;Nt.utils=Cn();Nt.common=ur();Nt.sha=j0();Nt.ripemd=K0();Nt.hmac=$0();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 cl=ae((fl,Af)=>{"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&&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],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],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=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,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,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,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 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=a(_,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=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 I={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"?Mf.exports=I:typeof define=="function"&&define.amd?define(I):n&&(n.scrypt&&(n._scrypt=n.scrypt),n.scrypt=I)})(gl)});var Xf=ae((j4,Yf)=>{"use strict";var Qo="qpzry9x8gf2tvdw0s3jn54khce6mua7l",kl={};for(fs=0;fs>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 $f(n){for(var e=1,t=0;t126)return"Invalid prefix ("+n+")";e=wr(e)^a>>5}for(e=wr(e),t=0;tt)throw new TypeError("Exceeds length limit");n=n.toLowerCase();var a=$f(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=wr(a)^s,i+=Qo.charAt(s)}for(r=0;r<6;++r)a=wr(a);for(a^=1,r=0;r<6;++r){var o=a>>(5-r)*5&31;i+=Qo.charAt(o)}return i}function Qf(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=$f(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 m5(){var n=Qf.apply(null,arguments);if(typeof n=="object")return n}function h5(n){var e=Qf.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function Yo(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 Xl=="object"&&typeof Zl<"u"?Zl.exports=e():typeof define=="function"&&define.amd?define(e):(n=typeof globalThis<"u"?globalThis:n||self,n.fetchRetry=e())})(Xl,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,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(I,_){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)I(U);else if(typeof x=="function")try{return Promise.resolve(x(L,null,U)).then(function(H){H?S(L,null,U):I(U)}).catch(_)}catch(H){_(H)}else L=0}function t(a){this.name="ArgumentError",this.message=a}return n})});var ep=ae(cu=>{"use strict";Object.defineProperty(cu,"__esModule",{value:!0});cu.$dictionary=void 0;cu.$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 Bs=ae((JA,ym)=>{ym.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}});var np=ae(Ha=>{var Ee=Bs(),tp=()=>[{type:Ee.RANGE,from:48,to:57}],fm=()=>[{type:Ee.CHAR,value:95},{type:Ee.RANGE,from:97,to:122},{type:Ee.RANGE,from:65,to:90}].concat(tp()),cm=()=>[{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}],ob=()=>[{type:Ee.CHAR,value:10},{type:Ee.CHAR,value:13},{type:Ee.CHAR,value:8232},{type:Ee.CHAR,value:8233}];Ha.words=()=>({type:Ee.SET,set:fm(),not:!1});Ha.notWords=()=>({type:Ee.SET,set:fm(),not:!0});Ha.ints=()=>({type:Ee.SET,set:tp(),not:!1});Ha.notInts=()=>({type:Ee.SET,set:tp(),not:!0});Ha.whitespace=()=>({type:Ee.SET,set:cm(),not:!1});Ha.notWhitespace=()=>({type:Ee.SET,set:cm(),not:!0});Ha.anyChar=()=>({type:Ee.SET,set:ob(),not:!0})});var hm=ae(Fs=>{var mm=Bs(),Or=np(),ub="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?",db={0:0,t:9,n:10,v:11,f:12,r:13};Fs.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 f=a?8:r?parseInt(r,16):s?parseInt(s,16):o?parseInt(o,8):l?ub.indexOf(l):db[p],x=String.fromCharCode(f);return/[[\]{}^$.|?*+()]/.test(x)&&(x="\\"+x),x}),n};Fs.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(Or.words());else if(i[2])t.push(Or.ints());else if(i[3])t.push(Or.whitespace());else if(i[4])t.push(Or.notWords());else if(i[5])t.push(Or.notInts());else if(i[6])t.push(Or.notWhitespace());else if(i[7])t.push({type:mm.RANGE,from:(i[8]||i[9]).charCodeAt(0),to:i[10].charCodeAt(0)});else if(r=i[12])t.push({type:mm.CHAR,value:r.charCodeAt(0)});else return[t,a.lastIndex];Fs.error(e,"Unterminated character class")};Fs.error=(n,e)=>{throw new SyntaxError("Invalid regular expression: /"+n+"/: "+e)}});var xm=ae(Ls=>{var mu=Bs();Ls.wordBoundary=()=>({type:mu.POSITION,value:"b"});Ls.nonWordBoundary=()=>({type:mu.POSITION,value:"B"});Ls.begin=()=>({type:mu.POSITION,value:"^"});Ls.end=()=>({type:mu.POSITION,value:"$"})});var bm=ae((XA,ap)=>{var Br=hm(),vn=Bs(),Ci=np(),hu=xm();ap.exports=n=>{var e=0,t,a,i={type:vn.ROOT,stack:[]},r=i,s=i.stack,o=[],l=O=>{Br.error(n,`Nothing to repeat at column ${O-1}`)},p=Br.strToChars(n);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 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}))}};gm.exports=qa});var wm=ae((eE,vm)=>{var xu=bm(),Us=Tm(),Ii=xu.types;vm.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=xu(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 a,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),a=e.options?this._randSelect(e.options):e.stack,i="",s=0,o=a.length;s{"use strict";var lb=Si&&Si.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Si,"__esModule",{value:!0});Si.RandomGenerator=void 0;var pb=lb(wm()),yb;(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 pb.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()}})(yb=Si.RandomGenerator||(Si.RandomGenerator={}))});var js=ae(Fr=>{"use strict";var fb=Fr&&Fr.__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(Fr,"__esModule",{value:!0});Fr.TypeGuardError=void 0;var cb=function(n){fb(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);Fr.TypeGuardError=cb});var km=ae(bu=>{"use strict";Object.defineProperty(bu,"__esModule",{value:!0});bu.$any=void 0;var mb=function(n){return n!==void 0?JSON.parse(JSON.stringify(n)):void 0};bu.$any=mb});var Am=ae(gu=>{"use strict";Object.defineProperty(gu,"__esModule",{value:!0});gu.$every=void 0;var hb=function(n,e){for(var t=null,a=0;a{"use strict";Object.defineProperty(Tu,"__esModule",{value:!0});Tu.$guard=void 0;var xb=js(),bb=function(n){return function(e,t){if(e===!0)throw new xb.TypeGuardError({method:n,path:t.path,expected:t.expected,value:t.value});return!1}};Tu.$guard=bb});var Mm=ae(vu=>{"use strict";Object.defineProperty(vu,"__esModule",{value:!0});vu.$is_between=void 0;var gb=function(n,e,t){return e<=n&&n<=t};vu.$is_between=gb});var Cm=ae(wu=>{"use strict";Object.defineProperty(wu,"__esModule",{value:!0});wu.$is_custom=void 0;var Tb=ep(),vb=function(n,e,t,a){var i,r=(i=Tb.$dictionary.get(n))===null||i===void 0?void 0:i.get(e);return r===void 0?!0:r(t)(a)};wu.$is_custom=vb});var Im=ae(_u=>{"use strict";Object.defineProperty(_u,"__esModule",{value:!0});_u.$is_date=void 0;var wb=function(n){return _b.test(n)};_u.$is_date=wb;var _b=/^(\d{4})-(\d{2})-(\d{2})$/});var Sm=ae(ku=>{"use strict";Object.defineProperty(ku,"__esModule",{value:!0});ku.$is_datetime=void 0;var kb=function(n){return!isNaN(new Date(n).getTime())};ku.$is_datetime=kb});var Rm=ae(Au=>{"use strict";Object.defineProperty(Au,"__esModule",{value:!0});Au.$is_email=void 0;var Ab=function(n){return Eb.test(n)};Au.$is_email=Ab;var Eb=/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i});var Pm=ae(Eu=>{"use strict";Object.defineProperty(Eu,"__esModule",{value:!0});Eu.$is_ipv4=void 0;var Mb=function(n){return Cb.test(n)};Eu.$is_ipv4=Mb;var Cb=/^(?: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 Nm=ae(Mu=>{"use strict";Object.defineProperty(Mu,"__esModule",{value:!0});Mu.$is_ipv6=void 0;var Ib=function(n){return Sb.test(n)};Mu.$is_ipv6=Ib;var Sb=/^(([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 Dm=ae(Cu=>{"use strict";Object.defineProperty(Cu,"__esModule",{value:!0});Cu.$is_url=void 0;var Rb=function(n){return Pb.test(n)};Cu.$is_url=Rb;var Pb=/^[a-zA-Z0-9]+:\/\/(?:www.)?[-a-zA-Z0-9@:%._+~#=]{1,256}.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/});var Om=ae(Iu=>{"use strict";Object.defineProperty(Iu,"__esModule",{value:!0});Iu.$is_uuid=void 0;var Nb=function(n){return Db.test(n)};Iu.$is_uuid=Nb;var Db=/^(?:[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 Bm=ae(Su=>{"use strict";Object.defineProperty(Su,"__esModule",{value:!0});Su.$join=void 0;var Ob=function(n){return Bb(n)?".".concat(n):"[".concat(JSON.stringify(n),"]")};Su.$join=Ob;var Bb=function(n){return Fb(n)===!1&&/^[a-zA-Z_$][a-zA-Z_$0-9]*$/g.test(n)},Fb=function(n){return Lb.has(n)},Lb=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 Fm=ae(Ru=>{"use strict";Object.defineProperty(Ru,"__esModule",{value:!0});Ru.$number=void 0;var Ub=js(),Vb=function(n){if(isFinite(n)===!1)throw new Ub.TypeGuardError({method:"typia.stringify",expected:"number",value:n,message:"Error on typia.stringify(): infinite or not a number."});return n};Ru.$number=Vb});var Lm=ae(Pu=>{"use strict";Object.defineProperty(Pu,"__esModule",{value:!0});Pu.$report=void 0;var jb=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}};Pu.$report=jb});var Um=ae(Nu=>{"use strict";Object.defineProperty(Nu,"__esModule",{value:!0});Nu.$rest=void 0;var Hb=function(n){return n.length===2?"":","+n.substring(1,n.length-1)};Nu.$rest=Hb});var Vm=ae(Du=>{"use strict";Object.defineProperty(Du,"__esModule",{value:!0});Du.$string=void 0;var qb=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,'"')};Du.$string=qb});var jm=ae(Ou=>{"use strict";Object.defineProperty(Ou,"__esModule",{value:!0});Ou.$tail=void 0;var Gb=function(n){return n[n.length-1]===","?n.substring(0,n.length-1):n};Ou.$tail=Gb});var zm=ae(Ri=>{"use strict";var Gt=Ri&&Ri.__assign||function(){return Gt=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 Gt(Gt({},n.is()),{number:a1.$number,string:s1.$string,tail:o1.$tail,rest:r1.$rest,throws:e(t)})},n.clone=function(t){return Gt(Gt({},n.is()),{throws:e(t),any:zb.$any})},n.prune=function(t){return Gt(Gt({},n.is()),{throws:e(t)})},n.random=function(){return{generator:Hm.RandomGenerator,pick:Hm.RandomGenerator.pick}};var e=function(t){return function(a){throw new qm.TypeGuardError(Gt(Gt({},a),{method:"typia.".concat(t)}))}}})(u1=Ri.Namespace||(Ri.Namespace={}))});var Wm=ae(Hs=>{"use strict";Object.defineProperty(Hs,"__esModule",{value:!0});Hs.MapUtil=void 0;var d1;(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}}})(d1=Hs.MapUtil||(Hs.MapUtil={}))});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 Xm=ae(Ym=>{"use strict";Object.defineProperty(Ym,"__esModule",{value:!0})});var e6=ae(Zm=>{"use strict";Object.defineProperty(Zm,"__esModule",{value:!0})});var n6=ae(t6=>{"use strict";Object.defineProperty(t6,"__esModule",{value:!0})});var i6=ae(a6=>{"use strict";Object.defineProperty(a6,"__esModule",{value:!0})});var hp=ae(z=>{"use strict";var l1=z&&z.__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=z&&z.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&l1(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 Lr=ep(),Me=zm(),p1=Wm();Pi(Jm(),z);Pi(Qm(),z);Pi(Xm(),z);Pi(e6(),z);Pi(n6(),z);Pi(i6(),z);Pi(js(),z);function ip(){re("assert")}z.assert=ip;Object.assign(ip,Me.Namespace.assert("assert"));function rp(){re("assertType")}z.assertType=rp;Object.assign(rp,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 sp(){re("assertEquals")}z.assertEquals=sp;Object.assign(sp,Me.Namespace.assert("assertEquals"));function op(){re("equals")}z.equals=op;Object.assign(op,Me.Namespace.is());function up(){re("validateEquals")}z.validateEquals=up;Object.assign(up,Me.Namespace.validate());z.customValidators={size:function(n){var e,t;return n?(t=(e=Lr.$dictionary.get(n))===null||e===void 0?void 0:e.size)!==null&&t!==void 0?t:0:Lr.$dictionary.size},has:function(n){return function(e){var t,a;return(a=(t=Lr.$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=Lr.$dictionary.get(n))===null||t===void 0?void 0:t.get(e)}},insert:function(n){return function(e){return function(t){var a=p1.MapUtil.take(Lr.$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=Lr.$dictionary.get(n))===null||t===void 0?void 0:t.delete(e))!==null&&a!==void 0?a:!1}}};function y1(){re("application")}z.application=y1;function dp(){re("assertParse")}z.assertParse=dp;Object.assign(dp,Me.Namespace.assert("assertParse"));function lp(){re("isParse")}z.isParse=lp;Object.assign(lp,Bu);function pp(){re("validateParse")}z.validateParse=pp;Object.assign(pp,Fu);function yp(){re("stringify")}z.stringify=yp;Object.assign(yp,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 f1(){re("metadata")}z.metadata=f1;function fp(){re("random")}z.random=fp;Object.assign(fp,Me.Namespace.random());function c1(){re("literals")}z.literals=c1;function cp(){re("clone")}z.clone=cp;Object.assign(cp,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 mp(){re("prune")}z.prune=mp;Object.assign(mp,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 r6(){re("createAssert")}z.createAssert=r6;Object.assign(r6,ip);function s6(){re("createAssertType")}z.createAssertType=s6;Object.assign(s6,rp);function o6(){re("createIs")}z.createIs=o6;Object.assign(o6,Bu);function u6(){re("createValidate")}z.createValidate=u6;Object.assign(u6,Fu);function d6(){re("createAssertEquals")}z.createAssertEquals=d6;Object.assign(d6,sp);function l6(){re("createEquals")}z.createEquals=l6;Object.assign(l6,op);function p6(){re("createValidateEquals")}z.createValidateEquals=p6;Object.assign(p6,up);function y6(){re("createIsParse")}z.createIsParse=y6;Object.assign(y6,lp);function f6(){re("createAssertParse")}z.createAssertParse=f6;Object.assign(f6,dp);function c6(){re("createValidateParse")}z.createValidateParse=c6;Object.assign(c6,pp);function m6(){re("createStringify")}z.createStringify=m6;Object.assign(m6,yp);function h6(){re("createAssertStringify")}z.createAssertStringify=h6;Object.assign(h6,Lu);function x6(){re("createIsStringify")}z.createIsStringify=x6;Object.assign(x6,Uu);function b6(){re("createValidateStringify")}z.createValidateStringify=b6;Object.assign(b6,Vu);function g6(){re("createRandom")}z.createRandom=g6;Object.assign(g6,fp);function T6(){re("createClone")}z.createClone=T6;Object.assign(T6,cp);function v6(){re("createAssertClone")}z.createAssertClone=v6;Object.assign(v6,ju);function w6(){re("createIsClone")}z.createIsClone=w6;Object.assign(w6,Hu);function _6(){re("createValidateClone")}z.createValidateClone=_6;Object.assign(_6,qu);function k6(){re("createPrune")}z.createPrune=k6;Object.assign(k6,mp);function A6(){re("createAssertPrune")}z.createAssertPrune=A6;Object.assign(A6,Gu);function E6(){re("createIsPrune")}z.createIsPrune=E6;Object.assign(E6,zu);function M6(){re("createValidatePrune")}z.createValidatePrune=M6;Object.assign(M6,Wu);function re(n){throw new Error("Error on typia.".concat(n,'(): no transform has been configured. Run "npx typia setup" command.'))}});var I6=ae(_n=>{"use strict";var C6=_n&&_n.__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]}),m1=_n&&_n.__setModuleDefault||(Object.create?function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}:function(n,e){n.default=e}),h1=_n&&_n.__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)&&C6(e,n,t);return m1(e,n),e},x1=_n&&_n.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&C6(e,n,t)};Object.defineProperty(_n,"__esModule",{value:!0});var b1=h1(hp());_n.default=b1;x1(hp(),_n)});var Ul={};Wi(Ul,{BaseContract:()=>mr,BigNumber:()=>F,Contract:()=>oe,ContractFactory:()=>gi,FixedNumber:()=>ct,Signer:()=>Pt,VoidSigner:()=>ya,Wallet:()=>Pn,Wordlist:()=>Tn,constants:()=>xt,errors:()=>$t,getDefaultProvider:()=>uu,logger:()=>Nc,providers:()=>ia,utils:()=>te,version:()=>lu,wordlists:()=>vi});var uy=En(fd());var Yp="logger/5.7.0";var Xp=!1,Zp=!1,Xs={debug:1,default:2,info:2,warning:3,error:4,off:5},ey=Xs.default,cd=null;function sh(){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 ty=sh(),md;(function(n){n.DEBUG="DEBUG",n.INFO="INFO",n.WARNING="WARNING",n.ERROR="ERROR",n.OFF="OFF"})(md||(md={}));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 ny="0123456789abcdef",E=class{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){let a=e.toLowerCase();Xs[a]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(ey>Xs[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(Zp)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 f="";for(let x=0;x>4],f+=ny[p[x]&15];i.push(l+"=Uint8Array(0x"+f+")")}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"),ty&&this.throwError("platform missing String.prototype.normalize",E.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:ty})}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 cd||(cd=new E(Yp)),cd}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"})}Zp=!!e,Xp=!!t}static setLogLevel(e){let t=Xs[e.toLowerCase()];if(t==null){E.globalLogger().warn("invalid log level - "+e);return}ey=t}static from(e){return new E(e)}};E.errors=$t;E.levels=md;var ay="bytes/5.7.0";var _t=new E(ay);function ry(n){return!!n.toHexString}function Ki(n){return n.slice||(n.slice=function(){let e=Array.prototype.slice.call(arguments);return Ki(new Uint8Array(Array.prototype.slice.apply(n,e)))}),n}function oa(n){return ie(n)&&!(n.length%2)||pn(n)}function iy(n){return typeof n=="number"&&n==n&&n%1===0}function pn(n){if(n==null)return!1;if(n.constructor===Uint8Array)return!0;if(typeof n=="string"||!iy(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),Ki(new Uint8Array(t))}if(e.allowMissingPrefix&&typeof n=="string"&&n.substring(0,2)!=="0x"&&(n="0x"+n),ry(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":_t.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),Ki(a)}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),Ki(t)}function ie(n,e){return!(typeof n!="string"||!n.match(/^0x[0-9A-Fa-f]*$/)||e&&n.length!==2+2*e)}var hd="0123456789abcdef";function W(n,e){if(e||(e={}),typeof n=="number"){_t.checkSafeUint53(n,"invalid hexlify value");let t="";for(;n;)t=hd[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),ry(n))return n.toHexString();if(ie(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(pn(n)){let t="0x";for(let a=0;a>4]+hd[i&15]}return t}return _t.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 Ie(n,e,t){return typeof n!="string"?n=W(n):(!ie(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 kt(n){let e="0x";return n.forEach(t=>{e+=W(t).substring(2)}),e}function Hn(n){let e=xd(W(n,{hexPad:"left"}));return e==="0x"?"0x0":e}function xd(n){typeof n!="string"&&(n=W(n)),ie(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 qn(n){let e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(oa(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 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",n),i[0]&=127;let s=W(i);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 i=e.v===0||e.v===1?e.v:1-e.v%2;e.recoveryParam!==i&&_t.throwArgumentError("signature recoveryParam mismatch v","signature",n)}e.r==null||!ie(e.r)?_t.throwArgumentError("signature missing or invalid r","signature",n):e.r=me(e.r,32),e.s==null||!ie(e.s)?_t.throwArgumentError("signature missing or invalid s","signature",n):e.s=me(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 a=W(t);e._vs&&(ie(e._vs)||_t.throwArgumentError("signature invalid _vs","signature",n),e._vs=me(e._vs,32)),e._vs==null?e._vs=a:e._vs!==a&&_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 qr(n){return n=qn(n),W(ye([n.r,n.s,n.recoveryParam?"0x1c":"0x1b"]))}var Zs="bignumber/5.7.0";var Gr=uy.default.BN,ua=new E(Zs),bd={},sy=9007199254740991;function dy(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"||pn(n))}var oy=!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?oy||(oy=!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,zr(e)):e.match(/^-?[0-9]+$/)?new F(bd,zr(new Gr(e))):ua.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&yn("underflow","BigNumber.from",e),(e>=sy||e<=-sy)&&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 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 ua.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}};function zr(n){if(typeof n!="string")return zr(n.toString(16));if(n[0]==="-")return n=n.substring(1),n[0]==="-"&&ua.throwArgumentError("invalid hex","value",n),n=zr(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(zr(n))}function be(n){let e=F.from(n).toHexString();return e[0]==="-"?new Gr("-"+e.substring(3),16):new Gr(e.substring(2),16)}function yn(n,e,t){let a={fault:n,operation:e};return t!=null&&(a.value=t),ua.throwError(n,E.errors.NUMERIC_FAULT,a)}function gd(n){return new Gr(n,36).toString(16)}function Td(n){return new Gr(n,16).toString(36)}var zt=new E(Zs),Wr={},py=F.from(0),yy=F.from(-1);function fy(n,e,t,a){let i={fault:e,operation:t};return a!==void 0&&(i.value=a),zt.throwError(n,E.errors.NUMERIC_FAULT,i)}var Kr="0";for(;Kr.length<256;)Kr+=Kr;function vd(n){if(typeof n!="number")try{n=F.from(n).toNumber()}catch{}return typeof n=="number"&&n>=0&&n<=256&&!(n%1)?"1"+Kr.substring(0,n):zt.throwArgumentError("invalid decimal size","decimals",n)}function Ji(n,e){e==null&&(e=0);let t=vd(e);n=F.from(n);let a=n.lt(py);a&&(n=n.mul(yy));let i=n.mod(t).toString();for(;i.length2&&zt.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&&fy("fractional component exceeds decimals","underflow","parseFixed"),s===""&&(s="0");s.lengthe[s]==null?l:(typeof e[s]!==o&&zt.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&&zt.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",a),i>80&&zt.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new da(Wr,t,a,i)}},ct=class{constructor(e,t,a,i){e!==Wr&&zt.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&&zt.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);let t=fn(this._value,this.format.decimals),a=fn(e._value,e.format.decimals);return ct.fromValue(t.add(a),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);let t=fn(this._value,this.format.decimals),a=fn(e._value,e.format.decimals);return ct.fromValue(t.sub(a),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);let t=fn(this._value,this.format.decimals),a=fn(e._value,e.format.decimals);return ct.fromValue(t.mul(a).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);let t=fn(this._value,this.format.decimals),a=fn(e._value,e.format.decimals);return ct.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=ct.from(e[0],this.format),a=!e[1].match(/^(0*)$/);return this.isNegative()&&a&&(t=t.subUnsafe(ly.toFormat(t.format))),t}ceiling(){let e=this.toString().split(".");e.length===1&&e.push("0");let t=ct.from(e[0],this.format),a=!e[1].match(/^(0*)$/);return!this.isNegative()&&a&&(t=t.addUnsafe(ly.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 a=ct.from("1"+Kr.substring(0,e),this.format),i=oh.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&&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,a){return a==null&&t!=null&&!dy(t)&&(a=t,t=null),t==null&&(t=0),a==null&&(a="fixed"),ct.fromString(Ji(e,t),da.from(a))}static fromString(e,t){t==null&&(t="fixed");let a=da.from(t),i=fn(e,a.decimals);!a.signed&&i.lt(py)&&fy("unsigned value cannot be negative","overflow","value",e);let r=null;a.signed?r=i.toTwos(a.width).toHexString():(r=i.toHexString(),r=me(r,a.width/8));let s=Ji(i,a.decimals);return new ct(Wr,r,s,a)}static fromBytes(e,t){t==null&&(t="fixed");let a=da.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=Ji(i,a.decimals);return new ct(Wr,r,s,a)}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(a){if(a.code!==E.errors.INVALID_ARGUMENT)throw a}return zt.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}},ly=ct.from(1),oh=ct.from("0.5");var cy="properties/5.7.0";var uh=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},eo=new E(cy);function B(n,e,t){Object.defineProperty(n,e,{enumerable:!0,value:t,writable:!1})}function ht(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 uh(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 $i(n,e){(!n||typeof n!="object")&&eo.throwArgumentError("invalid object","object",n),Object.keys(n).forEach(t=>{e[t]||eo.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 dh={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function my(n){if(n==null||dh[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;tmt(e)));if(typeof n=="object"){let e={};for(let t in n){let a=n[t];a!==void 0&&B(e,t,mt(a))}return e}return eo.throwArgumentError(`Cannot deepCopy ${typeof n}`,"object",n)}function mt(n){return lh(n)}var an=class{constructor(e){for(let t in e)this[t]=mt(e[t])}};var Gn="abi/5.7.0";var Te=new E(Gn),li={},hy={calldata:!0,memory:!0,storage:!0},ph={calldata:!0,memory:!0};function to(n,e){if(n==="bytes"||n==="string"){if(hy[e])return!0}else if(n==="address"){if(e==="payable")return!0}else if((n.indexOf("[")>=0||n==="tuple")&&ph[e])return!0;return(hy[e]||e==="payable")&&Te.throwArgumentError("invalid modifier","name",e),!1}function yh(n,e){let t=n;function a(o){Te.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!==ge.sighash&&(t+=this.type),t+="("+this.components.map(a=>a.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:Qi(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(yt.fromObject):null})}static fromString(e,t){function a(i){return yt.fromObject({name:i.name,type:i.type,indexed:i.indexed,components:i.components})}return a(yh(e,!!t))}static isParamType(e){return!!(e!=null&&e._isParamType)}};function Jr(n,e){return mh(n).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(a=>JSON.parse(a.format(e)))});let t="";return e!==ge.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map(a=>a.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:$r(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(Qr);t||Te.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:Te.warn("unknown modifier: "+i)}}),Wt.fromObject({name:t[1].trim(),anonymous:a,inputs:Jr(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}};function by(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 gy(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 Ty(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(a=>JSON.parse(a.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(a=>a.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=Ty(e);t.constant&&Te.throwArgumentError("constructor cannot be constant","value",e);let a={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,a)}static fromString(e){let t={type:"constructor"};e=by(e,t);let a=e.match(Qr);return(!a||a[1].trim()!=="constructor")&&Te.throwArgumentError("invalid constructor string","value",e),t.inputs=Jr(a[2].trim(),!1),gy(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=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(a=>JSON.parse(a.format(e))),outputs:this.outputs.map(a=>JSON.parse(a.format(e)))});let t="";return e!==ge.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map(a=>a.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(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"&&Te.throwArgumentError("invalid function object","value",e);let t=Ty(e),a={type:e.type,name:$r(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,a)}static fromString(e){let t={type:"function"};e=by(e,t);let a=e.split(" returns ");a.length>2&&Te.throwArgumentError("invalid function string","value",e);let i=a[0].match(Qr);if(i||Te.throwArgumentError("invalid function signature","value",e),t.name=i[1].trim(),t.name&&$r(t.name),t.inputs=Jr(i[2],!1),gy(i[3].trim(),t),a.length>1){let r=a[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 Ut.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}};function xy(n){let e=n.format();return(e==="Error(string)"||e==="Panic(uint256)")&&Te.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",n),n}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(a=>JSON.parse(a.format(e)))});let t="";return e!==ge.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map(a=>a.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:$r(e.name),inputs:e.inputs?e.inputs.map(yt.fromObject):[]};return xy(new rn(li,t))}static fromString(e){let t={type:"error"},a=e.match(Qr);return a||Te.throwArgumentError("invalid error signature","value",e),t.name=a[1].trim(),t.name&&$r(t.name),t.inputs=Jr(a[2],!1),xy(rn.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}};function Qi(n){return n.match(/^uint($|[^1-9])/)?n="uint256"+n.substring(4):n.match(/^int($|[^1-9])/)&&(n="int256"+n.substring(3)),n}var ch=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function $r(n){return(!n||!n.match(ch))&&Te.throwArgumentError(`invalid identifier "${n}"`,"value",n),n}var Qr=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function mh(n){n=n.trim();let e=[],t="",a=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,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):yi.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: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 a=this._peekBytes(0,e,!!t);return this._offset+=a.length,a.slice(0,e)}readValue(){return F.from(this.readBytes(this.wordSize))}};var wy=En(vy());function fe(n){return"0x"+wy.default.keccak_256(j(n))}var io={};Wi(io,{decode:()=>Yr,encode:()=>la});var _y="rlp/5.7.0";var zn=new E(_y);function ky(n){let e=[];for(;n;)e.unshift(n&255),n>>=8;return e}function Ay(n,e,t){let a=0;for(let i=0;ie+1+a&&zn.throwError("child data too short",E.errors.BUFFER_OVERRUN,{})}return{consumed:1+a,result:i}}function Cy(n,e){if(n.length===0&&zn.throwError("data too short",E.errors.BUFFER_OVERRUN,{}),n[e]>=248){let t=n[e]-247;e+1+t>n.length&&zn.throwError("data short segment too short",E.errors.BUFFER_OVERRUN,{});let a=Ay(n,e+1,t);return e+1+t+a>n.length&&zn.throwError("data long segment too short",E.errors.BUFFER_OVERRUN,{}),Ey(n,e,e+1+t,t+a)}else if(n[e]>=192){let t=n[e]-192;return e+1+t>n.length&&zn.throwError("data array too short",E.errors.BUFFER_OVERRUN,{}),Ey(n,e,e+1,t)}else if(n[e]>=184){let t=n[e]-183;e+1+t>n.length&&zn.throwError("data array too short",E.errors.BUFFER_OVERRUN,{});let a=Ay(n,e+1,t);e+1+t+a>n.length&&zn.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&&zn.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 Yr(n){let e=j(n),t=Cy(e,0);return t.consumed!==e.length&&zn.throwArgumentError("invalid rlp data","data",n),t.result}var Iy="address/5.7.0";var Ra=new E(Iy);function Sy(n){ie(n,20)||Ra.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 hh=9007199254740991;function xh(n){return Math.log10?Math.log10(n):Math.log(n)/Math.LN10}var _d={};for(let n=0;n<10;n++)_d[String(n)]=String(n);for(let n=0;n<26;n++)_d[String.fromCharCode(65+n)]=String(10+n);var Ry=Math.floor(xh(hh));function Py(n){n=n.toUpperCase(),n=n.substring(4)+n.substring(0,2)+"00";let e=n.split("").map(a=>_d[a]).join("");for(;e.length>=Ry;){let a=e.substring(0,Ry);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 ce(n){let e=null;if(typeof n!="string"&&Ra.throwArgumentError("invalid address","address",n),n.match(/^(0x)?[0-9a-fA-F]{40}$/))n.substring(0,2)!=="0x"&&(n="0x"+n),e=Sy(n),n.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==n&&Ra.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)!==Py(n)&&Ra.throwArgumentError("bad icap checksum","address",n),e=gd(n.substring(4));e.length<40;)e="0"+e;e=Sy("0x"+e)}else Ra.throwArgumentError("invalid address","address",n);return e}function Ny(n){try{return ce(n),!0}catch{}return!1}function Dy(n){let e=Td(ce(n).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+Py("XE00"+e)+e}function fi(n){let e=null;try{e=ce(n.from)}catch{Ra.throwArgumentError("missing from address","transaction",n)}let t=nn(j(F.from(n.nonce).toHexString()));return ce(Ie(fe(la([e,t])),12))}function Oy(n,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),ce(Ie(fe(ye(["0xff",ce(n),e,t])),12))}var ro=class extends At{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=ce(t)}catch(a){this._throwError(a.message,t)}return e.writeValue(t)}decode(e){return ce(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 Xi=new E(Gn);function kd(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 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!==a.length&&Xi.throwArgumentError("types/value length mismatch","tuple",t);let i=new pi(n.wordSize),r=new pi(n.wordSize),s=[];e.forEach((l,p)=>{let f=a[p];if(l.dynamic){let x=r.length;l.encode(r,f);let I=i.writeUpdatableValue();s.push(_=>{I(_+x)})}else l.encode(i,f)}),s.forEach(l=>{l(i.length)});let o=n.appendWriter(i);return o+=n.appendWriter(r),o}function Ad(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 oo=class extends At{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&&Xi.throwError("insufficient data length",E.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let a=[];for(let i=0;ifo,EtherSymbol:()=>Vy,HashZero:()=>er,MaxInt256:()=>Uy,MaxUint256:()=>ho,MinInt256:()=>Ly,NegativeOne:()=>co,One:()=>mo,Two:()=>By,WeiPerEther:()=>Fy,Zero:()=>Zi});var fo="0x0000000000000000000000000000000000000000";var co=F.from(-1),Zi=F.from(0),mo=F.from(1),By=F.from(2),Fy=F.from("1000000000000000000"),ho=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),Ly=F.from("-0x8000000000000000000000000000000000000000000000000000000000000000"),Uy=F.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");var er="0x0000000000000000000000000000000000000000000000000000000000000000";var Vy="\u039E";var xo=class extends At{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=ho.mask(e.wordSize*8);if(this.signed){let r=i.mask(this.size*8-1);(a.gt(r)||a.lt(r.add(mo).mul(co)))&&this._throwError("value out-of-bounds",t)}else(a.lt(Zi)||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 jy="strings/5.7.0";var Hy=new E(jy),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 bh(n,e,t,a,i){return Hy.throwArgumentError(`invalid codepoint at offset ${e}; ${n}`,"bytes",t)}function qy(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 gh(n,e,t,a,i){return n===Vt.OVERLONG?(a.push(i),0):(a.push(65533),qy(n,e,t,a,i))}var bo=Object.freeze({error:bh,ignore:qy,replace:gh});function Md(n,e){e==null&&(e=bo.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 ve(n,e=Jt.current){e!=Jt.current&&(Hy.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 Ed(n){let e="0000"+n.toString(16);return"\\u"+e.substring(e.length-4)}function Cd(n,e){return'"'+Md(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?Ed(t):(t-=65536,Ed((t>>10&1023)+55296)+Ed((t&1023)+56320))}).join("")+'"'}function go(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 go(Md(n,e))}function Pa(n,e=Jt.current){return Md(ve(n,e))}function Id(n){let e=ve(n);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return W(ye([e,er]).slice(0,32))}function Sd(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 Th(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 Gy(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 Pd(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 vh=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"),wh="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(n=>parseInt(n,16)),_h=[{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}],kh=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"),Ah=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"),Eh=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",Th),Mh=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 Ch(n){return n.reduce((e,t)=>(t.forEach(a=>{e.push(a)}),e),[])}function Ih(n){return!!Pd(n,vh)}function Sh(n){let e=Pd(n,_h);if(e)return[n+e.s];let t=kh[n];if(t)return t;let a=Ah[n];if(a)return[n+a[0]];let i=Eh[n];return i||null}function Rh(n){return!!Pd(n,Mh)}function Nd(n){if(n.match(/^[a-z0-9-]*$/i)&&n.length<=59)return n.toLowerCase();let e=Pa(n);e=Ch(e.map(a=>{if(wh.indexOf(a)>=0)return[];if(a>=65024&&a<=65039)return[];let i=Sh(a);return i||[a]})),e=Pa(go(e),Jt.NFKC),e.forEach(a=>{if(Rh(a))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(a=>{if(Ih(a))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 Xr{constructor(e){super("string",e)}defaultValue(){return""}encode(e,t){return super.encode(e,ve(t))}decode(e){return Yt(super.decode(e))}};var ci=class extends At{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 kd(e,this.coders,t)}decode(e){return e.coerce(this.name,Ad(e,this.coders))}};var vo=new E(Gn),Ph=new RegExp(/^bytes([0-9]*)$/),Nh=new RegExp(/^(u?int)([0-9]*)$/),tr=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 ci((e.components||[]).map(a=>this._getCoder(a)),e.name);case"":return new yo(e.name)}let t=e.type.match(Nh);if(t){let a=parseInt(t[2]||"256");return(a===0||a>256||a%8!==0)&&vo.throwArgumentError("invalid "+t[1]+" bit length","param",e),new xo(a/8,t[1]==="int",e.name)}if(t=e.type.match(Ph),t){let a=parseInt(t[1]);return(a===0||a>32)&&vo.throwArgumentError("invalid bytes length","param",e),new po(a,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 ci(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 a=e.map(s=>this._getCoder(yt.from(s))),i=new ci(a,"_"),r=this._getWriter();return i.encode(r,t),r.data}decode(e,t,a){let i=e.map(s=>this._getCoder(yt.from(s)));return new ci(i,"_").decode(this._getReader(j(t),a))}},Zr=new tr;function sn(n){return fe(ve(n))}var wo="hash/5.7.0";var Dd={};Wi(Dd,{decode:()=>nr,encode:()=>ar});function nr(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 Dh(n){let e={};for(let t=0;t>--l&1}let x=31,I=Math.pow(2,x),_=I>>>1,v=_>>1,S=I-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=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 Bh(n){let e=0;return()=>n[e++]}function Ky(n){return Bh(Oh(n))}function Fh(n){return n&1?~n>>1:n>>1}function Lh(n,e){let t=Array(n);for(let a=0;ae[s]):t}function Jy(n){let e=[];for(;;){let t=n();if(t==0)break;e.push(jh(t,n))}for(;;){let t=n()-1;if(t<0)break;e.push(Hh(t,n))}return Dh(Wy(e))}function Vh(n){let e=[];for(;;){let t=n();if(t==0)break;e.push(t)}return e}function $y(n,e,t){let a=Array(n).fill(void 0).map(()=>[]);for(let i=0;ia[s].push(r));return a}function jh(n,e){let t=1+e(),a=e(),i=Vh(e),r=$y(i.length,1+n,e);return Wy(r.map((s,o)=>{let l=s[0],p=s.slice(1);return Array(i[o]).fill(void 0).map((f,x)=>{let I=x*a;return[l+x*t,p.map(_=>_+I)]})}))}function Hh(n,e){let t=1+e();return $y(t,1+n,e).map(i=>[i[0],i.slice(1)])}function Qy(n){let e=es(n).sort((a,i)=>a-i);return t();function t(){let a=[];for(;;){let p=es(n,e);if(p.length==0)break;a.push({set:new Set(p),node:t()})}a.sort((p,f)=>f.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 Yy(){return Ky(nr("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=Yy(),qh=new Set(es(_o)),Gh=new Set(es(_o)),zh=Jy(_o),Wh=Qy(_o),Xy=45,Zy=95;function e0(n){return Pa(n)}function Kh(n){return n.filter(e=>e!=65039)}function t0(n){for(let e of n.split(".")){let t=e0(e);try{for(let a=t.lastIndexOf(Zy)-1;a>=0;a--)if(t[a]!==Zy)throw new Error("underscore only allowed at start");if(t.length>=4&&t.every(a=>a<128)&&t[2]===Xy&&t[3]===Xy)throw new Error("invalid label extension")}catch(a){throw new Error(`Invalid label "${e}": ${a.message}`)}}return n}function n0(n){return t0(Jh(n,Kh))}function Jh(n,e){let t=e0(n).reverse(),a=[];for(;t.length;){let i=Qh(t);if(i){a.push(...e(i));continue}let r=t.pop();if(qh.has(r)){a.push(r);continue}if(Gh.has(r))continue;let s=zh[r];if(s){a.push(...s);continue}throw new Error(`Disallowed codepoint: 0x${r.toString(16).toUpperCase()}`)}return t0($h(String.fromCodePoint(...a)))}function $h(n){return n.normalize("NFC")}function Qh(n,e){var t;let a=Wh,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 Yh=new E(wo),i0=new Uint8Array(32);i0.fill(0);function a0(n){if(n.length===0)throw new Error("invalid ENS name; empty component");return n}function Od(n){let e=ve(n0(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(a0(e.slice(a))),t}function Bd(n){try{return Od(n).length!==0}catch{}return!1}function Na(n){typeof n!="string"&&Yh.throwArgumentError("invalid ENS name; not a string","name",n);let e=i0,t=Od(n);for(;t.length;)e=fe(ye([e,fe(t.pop())]));return W(e)}function ts(n){return W(ye(Od(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 r0=`Ethereum Signed Message: -`;function ir(n){return typeof n=="string"&&(n=ve(n)),fe(ye([ve(r0),ve(String(n.length)),n]))}var Xh=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},bt=new E(wo),d0=new Uint8Array(32);d0.fill(0);var Zh=F.from(-1),l0=F.from(0),p0=F.from(1),e2=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function t2(n){let e=j(n),t=e.length%32;return t?kt([e,d0.slice(t)]):W(e)}var n2=me(p0.toHexString(),32),a2=me(l0.toHexString(),32),s0={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Fd=["name","version","chainId","verifyingContract","salt"];function o0(n){return function(e){return typeof e!="string"&&bt.throwArgumentError(`invalid domain value for ${JSON.stringify(n)}`,`domain.${n}`,e),e}}var i2={name:o0("name"),version:o0("version"),chainId:function(n){try{return F.from(n).toString()}catch{}return bt.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",n)},verifyingContract:function(n){try{return ce(n).toLowerCase()}catch{}return bt.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 bt.throwArgumentError('invalid domain value "salt"',"domain.salt",n)}};function Ld(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))&&bt.throwArgumentError("invalid numeric width","type",n);let i=e2.mask(t?a-1:a),r=t?i.add(p0).mul(Zh):l0;return function(s){let o=F.from(s);return(o.lt(r)||o.gt(i))&&bt.throwArgumentError(`value out-of-bounds for ${n}`,"value",s),me(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))&&bt.throwArgumentError("invalid bytes width","type",n),function(a){return j(a).length!==t&&bt.throwArgumentError(`invalid length for ${n}`,"value",a),t2(a)}}}switch(n){case"address":return function(e){return me(ce(e),32)};case"bool":return function(e){return e?n2:a2};case"bytes":return function(e){return fe(e)};case"string":return function(e){return sn(e)}}return null}function u0(n,e){return`${n}(${e.map(({name:t,type:a})=>a+" "+t).join(",")})`}var gt=class{constructor(e){B(this,"types",Object.freeze(mt(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]&&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),!Ld(f)&&(a[f]||bt.throwArgumentError(`unknown type ${JSON.stringify(f)}`,"types",e),a[f].push(o),t[o][f]=!0)})}let r=Object.keys(a).filter(o=>a[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=>{!a[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]=u0(o,e[o])+l.map(p=>u0(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(fe)),fe(kt(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),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,a){if(Ld(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&&bt.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),{}):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,a){return gt.from(t).hashStruct(e,a)}static hashDomain(e){let t=[];for(let a in e){let i=s0[a];i||bt.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(a)}`,"domain",e),t.push({name:a,type:i})}return t.sort((a,i)=>Fd.indexOf(a.name)-Fd.indexOf(i.name)),gt.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,a){return kt(["0x1901",gt.hashDomain(e),gt.from(t).hash(a)])}static hash(e,t,a){return fe(gt.encode(e,t,a))}static resolveNames(e,t,a,i){return Xh(this,void 0,void 0,function*(){e=we(e);let r={};e.verifyingContract&&!ie(e.verifyingContract,20)&&(r[e.verifyingContract]="0x");let s=gt.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){gt.hashDomain(e);let i={},r=[];Fd.forEach(l=>{let p=e[l];p!=null&&(i[l]=i2[l](p),r.push({name:l,type:s0[l]}))});let s=gt.from(t),o=we(t);return o.EIP712Domain?bt.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"&&bt.throwArgumentError("invalid string","value",p),p}return bt.throwArgumentError("unsupported type","type",l)})}}};var Tt=new E(Gn);var rr=class extends an{},sr=class extends an{},Ud=class extends an{},pa=class extends an{static isIndexed(e){return!!(e&&e._isIndexed)}},r2={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function y0(n,e){let t=new Error(`deferred error during ABI decoding triggered accessing ${n}`);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(a=>Kt.from(a)).filter(a=>a!=null)),B(this,"_abiCoder",ht(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){Tt.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]){Tt.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=ge.full),e===ge.sighash&&Tt.throwArgumentError("interface does not support formatting sighash","format",e);let t=this.fragments.map(a=>a.format(e));return e===ge.json?JSON.stringify(t.map(a=>JSON.parse(a))):t}static getAbiCoder(){return Zr}static getAddress(e){return ce(e)}static getSighash(e){return Ie(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];Tt.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?Tt.throwArgumentError("no matching function","name",a):i.length>1&&Tt.throwArgumentError("multiple matching functions","name",a),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 a=e.toLowerCase();for(let i in this.events)if(a===this.getEventTopic(i))return this.events[i];Tt.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?Tt.throwArgumentError("no matching event","name",a):i.length>1&&Tt.throwArgumentError("multiple matching events","name",a),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 a=ht(this.constructor,"getSighash");for(let i in this.errors){let r=this.errors[i];if(e===a(r))return this.errors[i]}Tt.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?Tt.throwArgumentError("no matching error","name",a):i.length>1&&Tt.throwArgumentError("multiple matching errors","name",a),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 a=j(t);return W(a.slice(0,4))!==this.getSighash(e)&&Tt.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(ye([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)&&Tt.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(ye([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)),f=r2[p];if(f)s=this._abiCoder.decode(f.inputs,a.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,a.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 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]),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?a.push(null):o.baseType==="array"||o.baseType==="tuple"?Tt.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&&Tt.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 I=this.getEventTopic(e);(!ie(a[0],32)||a[0].toLowerCase()!==I)&&Tt.throwError("fragment/topic mismatch",E.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:I,value:a[0]}),a=a.slice(1)}let i=[],r=[],s=[];e.inputs.forEach((I,_)=>{I.indexed?I.type==="string"||I.type==="bytes"||I.baseType==="tuple"||I.baseType==="array"?(i.push(yt.fromObject({type:"bytes32",name:I.name})),s.push(!0)):(i.push(I),s.push(!1)):(r.push(I),s.push(!1))});let o=a!=null?this._abiCoder.decode(i,ye(a)):null,l=this._abiCoder.decode(r,t,!0),p=[],f=0,x=0;e.inputs.forEach((I,_)=>{if(I.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[f++]}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 y0(`property ${JSON.stringify(I.name)}`,v)}}):p[I.name]=v}});for(let I=0;I{throw y0(`index ${I}`,_)}})}return Object.freeze(p)}parseTransaction(e){let t=this.getFunction(e.data.substring(0,10).toLowerCase());return t?new sr({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 rr({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 Ud({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 f0="abstract-provider/5.7.0";var s2=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},o2=new E(f0),ko=class extends an{static isForkEvent(e){return!!(e&&e._isForkEvent)}};var Xt=class{constructor(){o2.checkAbstract(new.target,Xt),B(this,"_isProvider",!0)}getFeeData(){return s2(this,void 0,void 0,function*(){let{block:e,gasPrice:t}=yield Se({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 c0="abstract-signer/5.7.0";var Mn=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},cn=new E(c0),u2=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],d2=[E.errors.INSUFFICIENT_FUNDS,E.errors.NONCE_EXPIRED,E.errors.REPLACEMENT_UNDERPRICED],Pt=class{constructor(){cn.checkAbstract(new.target,Pt),B(this,"_isSigner",!0)}getBalance(e){return Mn(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return Mn(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return Mn(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 Mn(this,void 0,void 0,function*(){this._checkProvider("call");let a=yield Se(this.checkTransaction(e));return yield this.provider.call(a,t)})}sendTransaction(e){return Mn(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 Mn(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return Mn(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return Mn(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return Mn(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(let a in e)u2.indexOf(a)===-1&&cn.throwArgumentError("invalid transaction key: "+a,"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(a=>(a[0].toLowerCase()!==a[1].toLowerCase()&&cn.throwArgumentError("from address mismatch","transaction",e),a[0])),t}populateTransaction(e){return Mn(this,void 0,void 0,function*(){let t=yield Se(this.checkTransaction(e));t.to!=null&&(t.to=Promise.resolve(t.to).then(i=>Mn(this,void 0,void 0,function*(){if(i==null)return null;let r=yield this.resolveName(i);return r==null&&cn.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)?cn.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(t.type===0||t.type===1)&&a&&cn.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&&cn.throwError("network does not support EIP-1559",E.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),t.gasPrice==null&&(t.gasPrice=i.gasPrice),t.type=0):cn.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(d2.indexOf(i.code)>=0)throw i;return cn.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]&&cn.throwArgumentError("chainId address mismatch","transaction",e),i[0])),yield Se(t)})}_checkProvider(e){this.provider||cn.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(()=>{cn.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 ya(this.address,e)}};var pe=En(fd()),Xn=En($d());function cr(n,e,t){return t={path:e,exports:{},require:function(a,i){return Px(a,i??t.path)}},n(t,t.exports),t.exports}function Px(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var Zd=X0;function X0(n,e){if(!n)throw new Error(e||"Assertion failed")}X0.equal=function(e,t,a){if(e!=t)throw new Error(a||"Assertion failed: "+e+" != "+t)};var Rn=cr(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,I=f&255;x?l.push(x,I):l.push(I)}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(I>>1)-1?S=(I>>1)-L:S=L,_.isubn(S)):S=0,x[v]=S,_.iushrn(1)}return x}t.getNAF=a;function i(l,p){var f=[[],[]];l=l.clone(),p=p.clone();for(var x=0,I=0,_;l.cmpn(-x)>0||p.cmpn(-I)>0;){var v=l.andln(3)+x&3,S=p.andln(3)+I&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)+I&7,(_===3||_===5)&&v===2?O=-S:O=S),f[1].push(O),2*x===L+1&&(x=1-x),2*I===O+1&&(I=1-I),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}),Io=on.getNAF,Nx=on.getJSF,So=on.assert;function Fa(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 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 a=e._getDoubles(),i=Io(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),I=r;I>0;I--){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];So(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};Fa.prototype._wnafMulAdd=function(e,t,a,i,r){var s=this._wnafT1,o=this._wnafT2,l=this._wnafT3,p=0,f,x,I;for(f=0;f=1;f-=2){var v=f-1,S=f;if(s[v]!==1||s[S]!==1){l[v]=Io(a[v],s[v],this._bitLength),l[S]=Io(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=Nx(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;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?I=o[x][R-1>>1]:R<0&&(I=o[x][-R-1>>1].neg()),I.type==="affine"?J=J.mixedAdd(I):J=J.add(I))}}for(f=0;f=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 a=[this],i=this,r=0;r=0&&(_=p,v=f),x.negative&&(x=x.neg(),I=I.neg()),_.negative&&(_=_.neg(),v=v.neg()),[{a:x,b:I},{a:_,b:v}]};xn.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),f=s.mul(i.b),x=e.sub(o).sub(l),I=p.add(f).neg();return{k1:x,k2:I}};xn.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)};xn.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};xn.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 Dt(n,e,t,a){hi.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}el(Dt,hi.BasePoint);xn.prototype.jpoint=function(e,t,a){return new Dt(this,e,t,a)};Dt.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)};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(),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 f=l.redSqr(),x=f.redMul(l),I=i.redMul(f),_=p.redSqr().redIAdd(x).redISub(I).redISub(I),v=p.redMul(I.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(),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(),f=p.redMul(o),x=a.redMul(p),I=l.redSqr().redIAdd(f).redISub(x).redISub(x),_=l.redMul(x.redISub(I)).redISub(r.redMul(f)),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 a=this;for(t=0;t=0)return!1;if(a.redIAdd(r),this.x.cmp(a)===0)return!0}};Dt.prototype.inspect=function(){return this.isInfinity()?"":""};Dt.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var Mo=cr(function(n,e){"use strict";var t=e;t.base=hi,t.short=Ox,t.mont=null,t.edwards=null}),Co=cr(function(n,e){"use strict";var t=e,a=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,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: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(n){if(!(this instanceof Ba))return new Ba(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=Rn.toArray(n.entropy,n.entropyEnc||"hex"),t=Rn.toArray(n.nonce,n.nonceEnc||"hex"),a=Rn.toArray(n.pers,n.persEnc||"hex");Zd(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,t,a)}var Z0=Ba;Ba.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};Ba.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=Rn.toArray(a,i||"hex"),this._update(a));for(var r=[];r.length"};var Bx=on.assert;function Ro(n,e){if(n instanceof Ro)return n;this._importDER(n,e)||(Bx(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 Po=Ro;function Fx(){this.place=0}function Qd(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 Y0(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)}Ro.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=Y0(t),a=Y0(a);!a[0]&&!(a[1]&128);)a=a.slice(1);var i=[2];Yd(i,t.length),i=i.concat(t),i.push(2),Yd(i,a.length);var r=i.concat(a),s=[48];return Yd(s,r.length),s=s.concat(r),on.encode(s,e)};var Lx=function(){throw new Error("unsupported")},ef=on.assert;function mn(n){if(!(this instanceof mn))return new mn(n);typeof n=="string"&&(ef(Object.prototype.hasOwnProperty.call(Co,n),"Unknown curve "+n),n=Co[n]),n instanceof Co.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 Ux=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 Z0({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||Lx(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)}};mn.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};mn.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 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 I=this.g.mul(x);if(!I.isInfinity()){var _=I.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=(I.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,a,i){e=this._truncateToN(new pe.default(e,16)),a=this.keyFromPublic(a,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),f;return this.curve._maxwellTrick?(f=this.g.jmulAdd(l,a.getPublic(),p),f.isInfinity()?!1:f.eqXToP(r)):(f=this.g.mulAdd(l,a.getPublic(),p),f.isInfinity()?!1:f.getX().umod(this.n).cmp(r)===0)};mn.prototype.recoverPubKey=function(n,e,t,a){ef((3&t)===t,"The recovery param is more than two bits"),e=new Po(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 f=e.r.invm(i),x=i.sub(r).mul(f).umod(i),I=o.mul(f).umod(i);return this.g.mulAdd(x,s,I)};mn.prototype.getKeyRecoveryParam=function(n,e,t,a){if(e=new Po(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 Vx=cr(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=Mo,t.curves=Co,t.ec=Ux,t.eddsa=null}),tf=Vx.ec;var nf="signing-key/5.7.0";var al=new E(nf),nl=null;function Zn(){return nl||(nl=new tf("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)),a=Zn().keyFromPublic(j(e));return"0x"+t.pub.add(a.pub).encodeCompressed("hex")}signDigest(e){let t=Zn().keyFromPrivate(j(this.privateKey)),a=j(e);a.length!==32&&al.throwArgumentError("bad digest length","digest",e);let i=t.sign(a,{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)),a=Zn().keyFromPublic(j(is(e)));return me("0x"+t.derive(a.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}};function No(n,e){let t=qn(e),a={r:j(t.r),s:j(t.s)};return"0x"+Zn().recoverPubKey(j(n),a,t.recoveryParam).encode("hex",!1)}function is(n,e){let t=j(n);if(t.length===32){let a=new bn(t);return e?"0x"+Zn().keyFromPrivate(t).getPublic(!0,"hex"):a.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 af="transactions/5.7.0";var qt=new E(af),Do;(function(n){n[n.legacy=0]="legacy",n[n.eip2930=1]="eip2930",n[n.eip1559=2]="eip1559"})(Do||(Do={}));function rl(n){return n==="0x"?null:ce(n)}function Ht(n){return n==="0x"?Zi:F.from(n)}var jx=[{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"}],Hx={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function gn(n){let e=is(n);return ce(Ie(fe(Ie(e,1)),12))}function xi(n,e){return gn(No(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 il(n,e){return{address:ce(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),il(t[0],t[1])):il(t.address,t.storageKeys));let e=Object.keys(n).map(t=>{let a=n[t].reduce((i,r)=>(i[r]=!0,i),{});return il(t,Object.keys(a).sort())});return e.sort((t,a)=>t.address.localeCompare(a.address)),e}function rf(n){return dn(n).map(e=>[e.address,e.storageKeys])}function sf(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?ce(n.to):"0x",un(n.value||0,"value"),n.data||"0x",rf(n.accessList||[])];if(e){let a=qn(e);t.push(un(a.recoveryParam,"recoveryParam")),t.push(nn(a.r)),t.push(nn(a.s))}return kt(["0x02",la(t)])}function of(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?ce(n.to):"0x",un(n.value||0,"value"),n.data||"0x",rf(n.accessList||[])];if(e){let a=qn(e);t.push(un(a.recoveryParam,"recoveryParam")),t.push(nn(a.r)),t.push(nn(a.s))}return kt(["0x01",la(t)])}function qx(n,e){$i(n,Hx);let t=[];jx.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&&!oa(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 la(t);let i=qn(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))),la(t)}function rs(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),qx(n,e);switch(n.type){case 1:return of(n,e);case 2:return sf(n,e);default:break}return qt.throwError(`unsupported transaction type: ${n.type}`,E.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:n.type})}function uf(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=me(e[1],32),n.s=me(e[2],32);try{let a=fe(t(n));n.from=xi(a,{r:n.r,s:n.s,recoveryParam:n.v})}catch{}}function Gx(n){let e=Yr(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:rl(e[5]),value:Ht(e[6]),data:e[7],accessList:dn(e[8])};return e.length===9||(i.hash=fe(n),uf(i,e.slice(9),sf)),i}function zx(n){let e=Yr(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:rl(e[4]),value:Ht(e[5]),data:e[6],accessList:dn(e[7])};return e.length===8||(t.hash=fe(n),uf(t,e.slice(8),of)),t}function Wx(n){let e=Yr(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: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 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(la(i));try{t.from=xi(r,{r:W(t.r),s:W(t.s),recoveryParam:a})}catch{}t.hash=fe(n)}return t.type=null,t}function Oo(n){let e=j(n);if(e[0]>127)return Wx(e);switch(e[0]){case 1:return zx(e);case 2:return Gx(e);default:break}return qt.throwError(`unsupported transaction type: ${e[0]}`,E.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}var df="contracts/5.7.0";var La=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Re=new E(df),Kx={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(n,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 ce(t)}catch{}n||Re.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&&Re.throwArgumentError("resolver or addr is not configured for ENS name","name",t),a})}function ss(n,e,t){return La(this,void 0,void 0,function*(){return Array.isArray(t)?yield Promise.all(t.map((a,i)=>ss(n,Array.isArray(e)?e[i]:e[a.name],a))):t.type==="address"?yield Bo(n,e):t.type==="tuple"?yield ss(n,e,t.components):t.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(a=>ss(n,a,t.arrayChildren))):Promise.reject(Re.makeError("invalid value for array",E.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function Uo(n,e,t){return La(this,void 0,void 0,function*(){let a={};t.length===e.inputs.length+1&&typeof t[t.length-1]=="object"&&(a=we(t.pop())),Re.checkArgumentCount(t.length,e.inputs.length,"passed to contract"),n.signer?a.from?a.from=Se({override:Bo(n.signer,a.from),signer:n.signer.getAddress()}).then(p=>La(this,void 0,void 0,function*(){return ce(p.signer)!==p.override&&Re.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=Bo(n.provider,a.from));let i=yield Se({args:ss(n.signer||n.provider,t,e.inputs),address:n.resolvedAddress,overrides:Se(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,f=j(r);for(let x=0;xa[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 Jx(n,e){return function(...t){return Uo(n,e,t)}}function $x(n,e){let t=n.signer||n.provider;return function(...a){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(n,e,a);return yield t.estimateGas(i)})}}function pf(n,e){let t=e.wait.bind(e);e.wait=a=>t(a).then(i=>(i.events=i.logs.map(r=>{let s=mt(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 yf(n,e,t){let a=n.signer||n.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=we(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 Uo(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 Qx(n,e){return function(...t){return La(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 a=yield Uo(n,e,t),i=yield n.signer.sendTransaction(a);return pf(n,i),i})}}function lf(n,e,t){return e.constant?yf(n,e,t):Qx(n,e)}function ff(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 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(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]}},sl=class extends bi{constructor(){super("error",null)}},Fo=class extends bi{constructor(e,t,a,i){let r={address:e},s=t.getEventTopic(a);i?(s!==i[0]&&Re.throwArgumentError("topic mismatch","topics",i),r.topics=i.slice()):r.topics=[s],super(ff(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=Yi(e.args);if(t.length)throw t[0].error;let a=(e.args||[]).slice();return a.push(e),a}},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=(a,i)=>this.interface.decodeEventLog(t.eventFragment,a,i),e.args=t.args}catch{}}},mr=class{constructor(e,t,a){B(this,"interface",ht(new.target,"getInterface")(t)),a==null?(B(this,"provider",null),B(this,"signer",null)):Pt.isSigner(a)?(B(this,"provider",a.provider||null),B(this,"signer",a)):Xt.isProvider(a)?(B(this,"provider",a),B(this,"signer",null)):Re.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]]):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(ce(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,lf(this,o,!0)),this.functions[s]==null&&B(this.functions,s,lf(this,o,!1)),this.callStatic[s]==null&&B(this.callStatic,s,yf(this,o,!0)),this.populateTransaction[s]==null&&B(this.populateTransaction,s,Jx(this,o)),this.estimateGas[s]==null&&B(this.estimateGas,s,$x(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 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=we(e||{});return["from","to"].forEach(function(a){t[a]!=null&&Re.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 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 a=e.topics[0];if(typeof a!="string")throw new Error("invalid topic");let i=this.interface.getEvent(a);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(ff(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,a){let i=mt(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||Re.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=we(i.filter);return typeof t=="string"&&ie(t,32)?(a!=null&&Re.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 mr{},gi=class{constructor(e,t,a){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),a&&!Pt.isSigner(a)&&Re.throwArgumentError("invalid signer","signer",a),B(this,"bytecode",i),B(this,"interface",ht(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=we(e.pop());for(let a in t)if(!Kx[a])throw new Error("unknown transaction override "+a)}return["data","from","to"].forEach(a=>{t[a]!=null&&Re.throwError("cannot override "+a,E.errors.UNSUPPORTED_OPERATION,{operation:a})}),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 a=yield ss(this.signer,e,this.interface.deploy.inputs);a.push(t);let i=this.getDeployTransaction(...a),r=yield this.signer.sendTransaction(i),s=ht(this.constructor,"getContractAddress")(r),o=ht(this.constructor,"getContract")(s,this.interface,this.signer);return pf(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 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 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;)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 I=j(xa(i,n,l));r||(r=I.length,f=new Uint8Array(r),s=Math.ceil(a/r),p=a-(s-1)*r),f.set(I);for(let S=1;S{var Z6=Object.create;var Ys=Object.defineProperty;var eh=Object.getOwnPropertyDescriptor;var th=Object.getOwnPropertyNames;var nh=Object.getPrototypeOf,ah=Object.prototype.hasOwnProperty;var ih=(n,e,t)=>e in n?Ys(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),Wi=(n,e)=>{for(var t in e)Ys(n,t,{get:e[t],enumerable:!0})},rh=(n,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of th(e))!ah.call(n,i)&&i!==t&&Ys(n,i,{get:()=>e[i],enumerable:!(a=eh(e,i))||a.enumerable});return n};var En=(n,e,t)=>(t=n!=null?Z6(nh(n)):{},rh(e||!n||!n.__esModule?Ys(t,"default",{value:n,enumerable:!0}):t,n));var xe=(n,e,t)=>(ih(n,typeof e!="symbol"?e+"":e,t),t);var $p=ae(()=>{});var cd=ae((Qp,fd)=>{(function(n,e){"use strict";function t(C,u){if(!C)throw new Error(u||"Assertion failed")}function a(C,u){C.super_=u;var y=function(){};y.prototype=u.prototype,C.prototype=new y,C.prototype.constructor=C}function i(C,u,y){if(i.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=i:e.BN=i,i.BN=i,i.wordSize=26;var r;try{typeof window<"u"&&typeof window.Buffer<"u"?r=window.Buffer:r=$p().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(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 b=s(C,y);return y-1>=u&&(b|=s(C,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(C,u,y,b){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()},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"],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];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=I[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(C){for(var u=new Array(C.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-C.length+1);P<=c;P++){var D=d-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[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,Y=ee&8191,Q=ee>>>13,ft=w[3]|0,Z=ft&8191,le=ft>>>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,Ge=Xa&8191,ze=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(c,We),d=Math.imul(c,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(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 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(c,Qe)|0,d=d+Math.imul(c,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(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(c,Xe)|0,d=d+Math.imul(c,Ze)|0,d=d+Math.imul(P,Xe)|0,m=m+Math.imul(P,Ze)|0;var Ia=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Ia>>>26)|0,Ia&=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(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 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(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 Zu=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(Zu>>>26)|0,Zu&=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(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 ed=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(ed>>>26)|0,ed&=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(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 td=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(td>>>26)|0,td&=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(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 nd=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(nd>>>26)|0,nd&=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,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(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 ad=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(ad>>>26)|0,ad&=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,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 id=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(id>>>26)|0,id&=67108863,g=Math.imul(Ge,Qe),d=Math.imul(Ge,Ye),d=d+Math.imul(ze,Qe)|0,m=Math.imul(ze,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 rd=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(rd>>>26)|0,rd&=67108863,g=Math.imul(Ge,Xe),d=Math.imul(Ge,Ze),d=d+Math.imul(ze,Xe)|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 sd=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(sd>>>26)|0,sd&=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 od=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(od>>>26)|0,od&=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 ud=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(ud>>>26)|0,ud&=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 dd=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(dd>>>26)|0,dd&=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 ld=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(ld>>>26)|0,ld&=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 pd=(k+g|0)+((d&8191)<<13)|0;k=(m+(d>>>13)|0)+(pd>>>26)|0,pd&=67108863,g=Math.imul(Ge,lt),d=Math.imul(Ge,pt),d=d+Math.imul(ze,lt)|0,m=Math.imul(ze,pt);var yd=(k+g|0)+((d&8191)<<13)|0;return k=(m+(d>>>13)|0)+(yd>>>26)|0,yd&=67108863,h[0]=Ea,h[1]=Ma,h[2]=Ca,h[3]=Ia,h[4]=Sa,h[5]=Zu,h[6]=ed,h[7]=td,h[8]=nd,h[9]=ad,h[10]=id,h[11]=rd,h[12]=sd,h[13]=od,h[14]=ud,h[15]=dd,h[16]=ld,h[17]=pd,h[18]=yd,k!==0&&(h[19]=k,b.length++),b};Math.imul||(O=L);function U(C,u,y){y.negative=u.negative^C.negative,y.length=C.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(C,u,y){return U(C,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(C,u){this.x=C,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 $(C,u){this.name=C,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(C){if(typeof C=="string"){var u=i._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 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(C){q.call(this,C),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 fd>"u"||fd,Qp)});var vy=ae(($g,ao)=>{(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 ao=="object"&&ao.exports,o=typeof define=="function"&&define.amd,l=!a.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",p="0123456789abcdef".split(""),f=[31,7936,2031616,520093696],x=[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};(a.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(c){return Object.prototype.toString.call(c)==="[object Array]"}),l&&(a.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,Y){return u["cshake"+c].update(V,K,ee,Y)[D]()}},de=function(c,P,D){return function(V,K,ee,Y){return u["kmac"+c].update(V,K,ee,Y)[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(n);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(n)}else throw new Error(n);P=!0}for(var V=this.blocks,K=this.byteCount,ee=c.length,Y=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[Y],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(n);if(l&&c.constructor===ArrayBuffer)c=new Uint8Array(c);else if(!Array.isArray(c)&&(!l||!ArrayBuffer.isView(c)))throw new Error(n)}else throw new Error(n);P=!0}var V=0,K=c.length;if(P)V=K;else for(var ee=0;ee=57344?V+=3:(Y=65536+((Y&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],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 c=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%c===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(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,Y,Q,ft,Z,le,Ka,De,Oe,Ja,Be,Fe,$a,Le,Ue,Qa,Ve,je,Ya,He,qe,Xa,Ge,ze,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,Ca,Ia,Sa;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],Y=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],Ka=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^(Y<<1|Q>>>31),D=Oe^(Q<<1|Y>>>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=Y^(le<<1|Ka>>>31),D=Q^(Ka<<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=Ka^(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,Ja=c[0],Be=c[1],at=c[11]<<4|c[10]>>>28,ri=c[10]<<4|c[11]>>>28,ze=c[20]<<3|c[21]>>>29,Za=c[21]<<3|c[20]>>>29,Ma=c[31]<<9|c[30]>>>23,Ca=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,ti=c[3]<<1|c[2]>>>31,Fe=c[13]<<12|c[12]>>>20,$a=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,Ia=c[42]<<2|c[43]>>>30,Sa=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,Ye=c[15]<<6|c[14]>>>26,Le=c[25]<<11|c[24]>>>21,Ue=c[24]<<11|c[25]>>>21,si=c[34]<<15|c[35]>>>17,st=c[35]<<15|c[34]>>>17,ei=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,ui=c[17]<<23|c[16]>>>9,lt=c[16]<<23|c[17]>>>9,ni=c[26]<<25|c[27]>>>7,Xe=c[27]<<25|c[26]>>>7,Qa=c[36]<<21|c[37]>>>11,Ve=c[37]<<21|c[36]>>>11,ot=c[47]<<24|c[46]>>>8,oi=c[46]<<24|c[47]>>>8,ii=c[8]<<27|c[9]>>>5,nt=c[9]<<27|c[8]>>>5,Xa=c[18]<<20|c[19]>>>12,Ge=c[19]<<20|c[18]>>>12,pt=c[29]<<7|c[28]>>>25,Ea=c[28]<<7|c[29]>>>25,Ze=c[38]<<8|c[39]>>>24,ai=c[39]<<8|c[38]>>>24,je=c[48]<<14|c[49]>>>18,Ya=c[49]<<14|c[48]>>>18,c[0]=Ja^~Fe&Le,c[1]=Be^~$a&Ue,c[10]=He^~Xa&ze,c[11]=qe^~Ge&Za,c[20]=$e^~Qe&ni,c[21]=ti^~Ye&Xe,c[30]=ii^~at&it,c[31]=nt^~ri&rt,c[40]=ut^~ui&pt,c[41]=dt^~lt&Ea,c[2]=Fe^~Le&Qa,c[3]=$a^~Ue&Ve,c[12]=Xa^~ze&We,c[13]=Ge^~Za&Ke,c[22]=Qe^~ni&Ze,c[23]=Ye^~Xe&ai,c[32]=at^~it&si,c[33]=ri^~rt&st,c[42]=ui^~pt&Ma,c[43]=lt^~Ea&Ca,c[4]=Le^~Qa&je,c[5]=Ue^~Ve&Ya,c[14]=ze^~We&ei,c[15]=Za^~Ke&Je,c[24]=ni^~Ze&et,c[25]=Xe^~ai&tt,c[34]=it^~si&ot,c[35]=rt^~st&oi,c[44]=pt^~Ma&Ia,c[45]=Ea^~Ca&Sa,c[6]=Qa^~je&Ja,c[7]=Ve^~Ya&Be,c[16]=We^~ei&He,c[17]=Ke^~Je&qe,c[26]=Ze^~et&$e,c[27]=ai^~tt&ti,c[36]=si^~ot&ii,c[37]=st^~oi&nt,c[46]=Ma^~Ia&ut,c[47]=Ca^~Sa&dt,c[8]=je^~Ja&Fe,c[9]=Ya^~Be&$a,c[18]=ei^~He&Xa,c[19]=Je^~qe&Ge,c[28]=et^~$e&Qe,c[29]=tt^~ti&Ye,c[38]=ot^~ii&at,c[39]=oi^~nt&ri,c[48]=Ia^~ut&ui,c[49]=Sa^~dt<,c[0]^=S[V],c[1]^=S[V+1]};if(s)ao.exports=u;else{for(b=0;b{h0.exports=m0;function m0(n,e){if(!n)throw new Error(e||"Assertion failed")}m0.equal=function(e,t,a){if(e!=t)throw new Error(a||"Assertion failed: "+e+" != "+t)}});var x0=ae((j3,jd)=>{typeof Object.create=="function"?jd.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:jd.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 Cn=ae(Ne=>{"use strict";var l2=or(),p2=x0();Ne.inherits=p2;function y2(n,e){return(n.charCodeAt(e)&64512)!==55296||e<0||e+1>=n.length?!1:(n.charCodeAt(e+1)&64512)===56320}function f2(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):y2(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}Ne.htonl=b0;function m2(n,e){for(var t="",a=0;a>>0}return r}Ne.join32=h2;function x2(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}Ne.split32=x2;function b2(n,e){return n>>>e|n<<32-e}Ne.rotr32=b2;function g2(n,e){return n<>>32-e}Ne.rotl32=g2;function T2(n,e){return n+e>>>0}Ne.sum32=T2;function v2(n,e,t){return n+e+t>>>0}Ne.sum32_3=v2;function w2(n,e,t,a){return n+e+t+a>>>0}Ne.sum32_4=w2;function _2(n,e,t,a,i){return n+e+t+a+i>>>0}Ne.sum32_5=_2;function k2(n,e,t,a){var i=n[e],r=n[e+1],s=a+r>>>0,o=(s>>0,n[e+1]=s}Ne.sum64=k2;function A2(n,e,t,a){var i=e+a>>>0,r=(i>>0}Ne.sum64_hi=A2;function E2(n,e,t,a){var i=e+a;return i>>>0}Ne.sum64_lo=E2;function M2(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}Ne.sum64_4_hi=M2;function C2(n,e,t,a,i,r,s,o){var l=e+a+r+o;return l>>>0}Ne.sum64_4_lo=C2;function I2(n,e,t,a,i,r,s,o,l,p){var f=0,x=e;x=x+a>>>0,f+=x>>0,f+=x>>0,f+=x>>0,f+=x>>0}Ne.sum64_5_hi=I2;function S2(n,e,t,a,i,r,s,o,l,p){var f=e+a+r+o+p;return f>>>0}Ne.sum64_5_lo=S2;function R2(n,e,t){var a=e<<32-t|n>>>t;return a>>>0}Ne.rotr64_hi=R2;function P2(n,e,t){var a=n<<32-t|e>>>t;return a>>>0}Ne.rotr64_lo=P2;function N2(n,e,t){return n>>>t}Ne.shr64_hi=N2;function D2(n,e,t){var a=n<<32-t|e>>>t;return a>>>0}Ne.shr64_lo=D2});var ur=ae(w0=>{"use strict";var v0=Cn(),O2=or();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}w0.BlockHash=Ao;Ao.prototype.update=function(e,t){if(e=v0.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=v0.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 B2=Cn(),Wn=B2.rotr32;function F2(n,e,t,a){if(n===0)return _0(e,t,a);if(n===1||n===3)return A0(e,t,a);if(n===2)return k0(e,t,a)}fa.ft_1=F2;function _0(n,e,t){return n&e^~n&t}fa.ch32=_0;function k0(n,e,t){return n&e^n&t^e&t}fa.maj32=k0;function A0(n,e,t){return n^e^t}fa.p32=A0;function L2(n){return Wn(n,2)^Wn(n,13)^Wn(n,22)}fa.s0_256=L2;function U2(n){return Wn(n,6)^Wn(n,11)^Wn(n,25)}fa.s1_256=U2;function V2(n){return Wn(n,7)^Wn(n,18)^n>>>3}fa.g0_256=V2;function j2(n){return Wn(n,17)^Wn(n,19)^n>>>10}fa.g1_256=j2});var C0=ae((z3,M0)=>{"use strict";var dr=Cn(),H2=ur(),q2=Hd(),qd=dr.rotl32,ns=dr.sum32,G2=dr.sum32_5,z2=q2.ft_1,E0=H2.BlockHash,W2=[1518500249,1859775393,2400959708,3395469782];function Kn(){if(!(this instanceof Kn))return new Kn;E0.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}dr.inherits(Kn,E0);M0.exports=Kn;Kn.blockSize=512;Kn.outSize=160;Kn.hmacStrength=80;Kn.padLength=64;Kn.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 lr=Cn(),K2=ur(),pr=Hd(),J2=or(),In=lr.sum32,$2=lr.sum32_4,Q2=lr.sum32_5,Y2=pr.ch32,X2=pr.maj32,Z2=pr.s0_256,ex=pr.s1_256,tx=pr.g0_256,nx=pr.g1_256,I0=K2.BlockHash,ax=[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;I0.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=ax,this.W=new Array(64)}lr.inherits(Jn,I0);S0.exports=Jn;Jn.blockSize=512;Jn.outSize=256;Jn.hmacStrength=192;Jn.padLength=64;Jn.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 zd=Cn(),R0=Gd();function ca(){if(!(this instanceof ca))return new ca;R0.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}zd.inherits(ca,R0);P0.exports=ca;ca.blockSize=512;ca.outSize=224;ca.hmacStrength=192;ca.padLength=64;ca.prototype._digest=function(e){return e==="hex"?zd.toHex32(this.h.slice(0,7),"big"):zd.split32(this.h.slice(0,7),"big")}});var Jd=ae((J3,F0)=>{"use strict";var Zt=Cn(),ix=ur(),rx=or(),$n=Zt.rotr64_hi,Qn=Zt.rotr64_lo,D0=Zt.shr64_hi,O0=Zt.shr64_lo,Oa=Zt.sum64,Wd=Zt.sum64_hi,Kd=Zt.sum64_lo,sx=Zt.sum64_4_hi,ox=Zt.sum64_4_lo,ux=Zt.sum64_5_hi,dx=Zt.sum64_5_lo,B0=ix.BlockHash,lx=[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 Sn(){if(!(this instanceof Sn))return new Sn;B0.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=lx,this.W=new Array(160)}Zt.inherits(Sn,B0);F0.exports=Sn;Sn.blockSize=1024;Sn.outSize=512;Sn.hmacStrength=192;Sn.padLength=128;Sn.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 $d=Cn(),L0=Jd();function ma(){if(!(this instanceof ma))return new ma;L0.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}$d.inherits(ma,L0);U0.exports=ma;ma.blockSize=1024;ma.outSize=384;ma.hmacStrength=192;ma.padLength=128;ma.prototype._digest=function(e){return e==="hex"?$d.toHex32(this.h.slice(0,12),"big"):$d.split32(this.h.slice(0,12),"big")}});var j0=ae(yr=>{"use strict";yr.sha1=C0();yr.sha224=N0();yr.sha256=Gd();yr.sha384=V0();yr.sha512=Jd()});var K0=ae(W0=>{"use strict";var mi=Cn(),_x=ur(),Eo=mi.rotl32,H0=mi.sum32,as=mi.sum32_3,q0=mi.sum32_4,z0=_x.BlockHash;function Yn(){if(!(this instanceof Yn))return new Yn;z0.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}mi.inherits(Yn,z0);W0.ripemd160=Yn;Yn.blockSize=512;Yn.outSize=160;Yn.hmacStrength=192;Yn.padLength=64;Yn.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,f=r,x=s,I=o,_=0;_<80;_++){var v=H0(Eo(q0(a,G0(_,i,r,s),e[Ex[_]+t],kx(_)),Cx[_]),o);a=o,o=s,s=Eo(r,10),r=i,i=v,v=H0(Eo(q0(l,G0(79-_,p,f,x),e[Mx[_]+t],Ax(_)),Ix[_]),I),l=I,I=x,x=Eo(f,10),f=p,p=v}v=as(this.h[1],r,x),this.h[1]=as(this.h[2],s,I),this.h[2]=as(this.h[3],o,l),this.h[3]=as(this.h[4],a,p),this.h[4]=as(this.h[0],i,f),this.h[0]=v};Yn.prototype._digest=function(e){return e==="hex"?mi.toHex32(this.h,"little"):mi.split32(this.h,"little")};function G0(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 kx(n){return n<=15?0:n<=31?1518500249:n<=47?1859775393:n<=63?2400959708:2840853838}function Ax(n){return n<=15?1352829926:n<=31?1548603684:n<=47?1836072691:n<=63?2053994217:0}var Ex=[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],Mx=[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],Cx=[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],Ix=[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 $0=ae((X3,J0)=>{"use strict";var Sx=Cn(),Rx=or();function fr(n,e,t){if(!(this instanceof fr))return new fr(n,e,t);this.Hash=n,this.blockSize=n.blockSize/8,this.outSize=n.outSize/8,this.inner=null,this.outer=null,this._init(Sx.toArray(e,t))}J0.exports=fr;fr.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),Rx(e.length<=this.blockSize);for(var t=e.length;t{var Nt=Q0;Nt.utils=Cn();Nt.common=ur();Nt.sha=j0();Nt.ripemd=K0();Nt.hmac=$0();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 ml=ae((cl,Af)=>{"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&&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],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],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=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,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,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,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 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=a(_,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=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 I={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 Tl<"u"?Mf.exports=I:typeof define=="function"&&define.amd?define(I):n&&(n.scrypt&&(n._scrypt=n.scrypt),n.scrypt=I)})(Tl)});var Xf=ae((j4,Yf)=>{"use strict";var Qo="qpzry9x8gf2tvdw0s3jn54khce6mua7l",Al={};for(fs=0;fs>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 $f(n){for(var e=1,t=0;t126)return"Invalid prefix ("+n+")";e=wr(e)^a>>5}for(e=wr(e),t=0;tt)throw new TypeError("Exceeds length limit");n=n.toLowerCase();var a=$f(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=wr(a)^s,i+=Qo.charAt(s)}for(r=0;r<6;++r)a=wr(a);for(a^=1,r=0;r<6;++r){var o=a>>(5-r)*5&31;i+=Qo.charAt(o)}return i}function Qf(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=$f(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 m5(){var n=Qf.apply(null,arguments);if(typeof n=="object")return n}function h5(n){var e=Qf.apply(null,arguments);if(typeof e=="object")return e;throw new Error(e)}function Yo(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 Xl=="object"&&typeof Zl<"u"?Zl.exports=e():typeof define=="function"&&define.amd?define(e):(n=typeof globalThis<"u"?globalThis:n||self,n.fetchRetry=e())})(Xl,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,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(I,_){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)I(U);else if(typeof x=="function")try{return Promise.resolve(x(L,null,U)).then(function(H){H?S(L,null,U):I(U)}).catch(_)}catch(H){_(H)}else L=0}function t(a){this.name="ArgumentError",this.message=a}return n})});var ep=ae(mu=>{"use strict";Object.defineProperty(mu,"__esModule",{value:!0});mu.$dictionary=void 0;mu.$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 Bs=ae(($A,ym)=>{ym.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}});var np=ae(Ha=>{var Ee=Bs(),tp=()=>[{type:Ee.RANGE,from:48,to:57}],fm=()=>[{type:Ee.CHAR,value:95},{type:Ee.RANGE,from:97,to:122},{type:Ee.RANGE,from:65,to:90}].concat(tp()),cm=()=>[{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}],ob=()=>[{type:Ee.CHAR,value:10},{type:Ee.CHAR,value:13},{type:Ee.CHAR,value:8232},{type:Ee.CHAR,value:8233}];Ha.words=()=>({type:Ee.SET,set:fm(),not:!1});Ha.notWords=()=>({type:Ee.SET,set:fm(),not:!0});Ha.ints=()=>({type:Ee.SET,set:tp(),not:!1});Ha.notInts=()=>({type:Ee.SET,set:tp(),not:!0});Ha.whitespace=()=>({type:Ee.SET,set:cm(),not:!1});Ha.notWhitespace=()=>({type:Ee.SET,set:cm(),not:!0});Ha.anyChar=()=>({type:Ee.SET,set:ob(),not:!0})});var hm=ae(Fs=>{var mm=Bs(),Or=np(),ub="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?",db={0:0,t:9,n:10,v:11,f:12,r:13};Fs.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 f=a?8:r?parseInt(r,16):s?parseInt(s,16):o?parseInt(o,8):l?ub.indexOf(l):db[p],x=String.fromCharCode(f);return/[[\]{}^$.|?*+()]/.test(x)&&(x="\\"+x),x}),n};Fs.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(Or.words());else if(i[2])t.push(Or.ints());else if(i[3])t.push(Or.whitespace());else if(i[4])t.push(Or.notWords());else if(i[5])t.push(Or.notInts());else if(i[6])t.push(Or.notWhitespace());else if(i[7])t.push({type:mm.RANGE,from:(i[8]||i[9]).charCodeAt(0),to:i[10].charCodeAt(0)});else if(r=i[12])t.push({type:mm.CHAR,value:r.charCodeAt(0)});else return[t,a.lastIndex];Fs.error(e,"Unterminated character class")};Fs.error=(n,e)=>{throw new SyntaxError("Invalid regular expression: /"+n+"/: "+e)}});var xm=ae(Ls=>{var hu=Bs();Ls.wordBoundary=()=>({type:hu.POSITION,value:"b"});Ls.nonWordBoundary=()=>({type:hu.POSITION,value:"B"});Ls.begin=()=>({type:hu.POSITION,value:"^"});Ls.end=()=>({type:hu.POSITION,value:"$"})});var bm=ae((ZA,ap)=>{var Br=hm(),vn=Bs(),Ci=np(),xu=xm();ap.exports=n=>{var e=0,t,a,i={type:vn.ROOT,stack:[]},r=i,s=i.stack,o=[],l=O=>{Br.error(n,`Nothing to repeat at column ${O-1}`)},p=Br.strToChars(n);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 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}))}};gm.exports=qa});var wm=ae((tE,vm)=>{var bu=bm(),Us=Tm(),Ii=bu.types;vm.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 a,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),a=e.options?this._randSelect(e.options):e.stack,i="",s=0,o=a.length;s{"use strict";var lb=Si&&Si.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Si,"__esModule",{value:!0});Si.RandomGenerator=void 0;var pb=lb(wm()),yb;(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 pb.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()}})(yb=Si.RandomGenerator||(Si.RandomGenerator={}))});var js=ae(Fr=>{"use strict";var fb=Fr&&Fr.__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(Fr,"__esModule",{value:!0});Fr.TypeGuardError=void 0;var cb=function(n){fb(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);Fr.TypeGuardError=cb});var km=ae(gu=>{"use strict";Object.defineProperty(gu,"__esModule",{value:!0});gu.$any=void 0;var mb=function(n){return n!==void 0?JSON.parse(JSON.stringify(n)):void 0};gu.$any=mb});var Am=ae(Tu=>{"use strict";Object.defineProperty(Tu,"__esModule",{value:!0});Tu.$every=void 0;var hb=function(n,e){for(var t=null,a=0;a{"use strict";Object.defineProperty(vu,"__esModule",{value:!0});vu.$guard=void 0;var xb=js(),bb=function(n){return function(e,t){if(e===!0)throw new xb.TypeGuardError({method:n,path:t.path,expected:t.expected,value:t.value});return!1}};vu.$guard=bb});var Mm=ae(wu=>{"use strict";Object.defineProperty(wu,"__esModule",{value:!0});wu.$is_between=void 0;var gb=function(n,e,t){return e<=n&&n<=t};wu.$is_between=gb});var Cm=ae(_u=>{"use strict";Object.defineProperty(_u,"__esModule",{value:!0});_u.$is_custom=void 0;var Tb=ep(),vb=function(n,e,t,a){var i,r=(i=Tb.$dictionary.get(n))===null||i===void 0?void 0:i.get(e);return r===void 0?!0:r(t)(a)};_u.$is_custom=vb});var Im=ae(ku=>{"use strict";Object.defineProperty(ku,"__esModule",{value:!0});ku.$is_date=void 0;var wb=function(n){return _b.test(n)};ku.$is_date=wb;var _b=/^(\d{4})-(\d{2})-(\d{2})$/});var Sm=ae(Au=>{"use strict";Object.defineProperty(Au,"__esModule",{value:!0});Au.$is_datetime=void 0;var kb=function(n){return!isNaN(new Date(n).getTime())};Au.$is_datetime=kb});var Rm=ae(Eu=>{"use strict";Object.defineProperty(Eu,"__esModule",{value:!0});Eu.$is_email=void 0;var Ab=function(n){return Eb.test(n)};Eu.$is_email=Ab;var Eb=/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i});var Pm=ae(Mu=>{"use strict";Object.defineProperty(Mu,"__esModule",{value:!0});Mu.$is_ipv4=void 0;var Mb=function(n){return Cb.test(n)};Mu.$is_ipv4=Mb;var Cb=/^(?: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 Nm=ae(Cu=>{"use strict";Object.defineProperty(Cu,"__esModule",{value:!0});Cu.$is_ipv6=void 0;var Ib=function(n){return Sb.test(n)};Cu.$is_ipv6=Ib;var Sb=/^(([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 Dm=ae(Iu=>{"use strict";Object.defineProperty(Iu,"__esModule",{value:!0});Iu.$is_url=void 0;var Rb=function(n){return Pb.test(n)};Iu.$is_url=Rb;var Pb=/^[a-zA-Z0-9]+:\/\/(?:www.)?[-a-zA-Z0-9@:%._+~#=]{1,256}.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/});var Om=ae(Su=>{"use strict";Object.defineProperty(Su,"__esModule",{value:!0});Su.$is_uuid=void 0;var Nb=function(n){return Db.test(n)};Su.$is_uuid=Nb;var Db=/^(?:[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 Bm=ae(Ru=>{"use strict";Object.defineProperty(Ru,"__esModule",{value:!0});Ru.$join=void 0;var Ob=function(n){return Bb(n)?".".concat(n):"[".concat(JSON.stringify(n),"]")};Ru.$join=Ob;var Bb=function(n){return Fb(n)===!1&&/^[a-zA-Z_$][a-zA-Z_$0-9]*$/g.test(n)},Fb=function(n){return Lb.has(n)},Lb=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 Fm=ae(Pu=>{"use strict";Object.defineProperty(Pu,"__esModule",{value:!0});Pu.$number=void 0;var Ub=js(),Vb=function(n){if(isFinite(n)===!1)throw new Ub.TypeGuardError({method:"typia.stringify",expected:"number",value:n,message:"Error on typia.stringify(): infinite or not a number."});return n};Pu.$number=Vb});var Lm=ae(Nu=>{"use strict";Object.defineProperty(Nu,"__esModule",{value:!0});Nu.$report=void 0;var jb=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}};Nu.$report=jb});var Um=ae(Du=>{"use strict";Object.defineProperty(Du,"__esModule",{value:!0});Du.$rest=void 0;var Hb=function(n){return n.length===2?"":","+n.substring(1,n.length-1)};Du.$rest=Hb});var Vm=ae(Ou=>{"use strict";Object.defineProperty(Ou,"__esModule",{value:!0});Ou.$string=void 0;var qb=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,'"')};Ou.$string=qb});var jm=ae(Bu=>{"use strict";Object.defineProperty(Bu,"__esModule",{value:!0});Bu.$tail=void 0;var Gb=function(n){return n[n.length-1]===","?n.substring(0,n.length-1):n};Bu.$tail=Gb});var zm=ae(Ri=>{"use strict";var Gt=Ri&&Ri.__assign||function(){return Gt=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 Gt(Gt({},n.is()),{number:a1.$number,string:s1.$string,tail:o1.$tail,rest:r1.$rest,throws:e(t)})},n.clone=function(t){return Gt(Gt({},n.is()),{throws:e(t),any:zb.$any})},n.prune=function(t){return Gt(Gt({},n.is()),{throws:e(t)})},n.random=function(){return{generator:Hm.RandomGenerator,pick:Hm.RandomGenerator.pick}};var e=function(t){return function(a){throw new qm.TypeGuardError(Gt(Gt({},a),{method:"typia.".concat(t)}))}}})(u1=Ri.Namespace||(Ri.Namespace={}))});var Wm=ae(Hs=>{"use strict";Object.defineProperty(Hs,"__esModule",{value:!0});Hs.MapUtil=void 0;var d1;(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}}})(d1=Hs.MapUtil||(Hs.MapUtil={}))});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 Xm=ae(Ym=>{"use strict";Object.defineProperty(Ym,"__esModule",{value:!0})});var e6=ae(Zm=>{"use strict";Object.defineProperty(Zm,"__esModule",{value:!0})});var n6=ae(t6=>{"use strict";Object.defineProperty(t6,"__esModule",{value:!0})});var i6=ae(a6=>{"use strict";Object.defineProperty(a6,"__esModule",{value:!0})});var hp=ae(z=>{"use strict";var l1=z&&z.__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=z&&z.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&l1(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 Lr=ep(),Me=zm(),p1=Wm();Pi(Jm(),z);Pi(Qm(),z);Pi(Xm(),z);Pi(e6(),z);Pi(n6(),z);Pi(i6(),z);Pi(js(),z);function ip(){re("assert")}z.assert=ip;Object.assign(ip,Me.Namespace.assert("assert"));function rp(){re("assertType")}z.assertType=rp;Object.assign(rp,Me.Namespace.assert("assertType"));function Fu(){re("is")}z.is=Fu;Object.assign(Fu,Me.Namespace.assert("is"));function Lu(){re("validate")}z.validate=Lu;Object.assign(Lu,Me.Namespace.validate());function sp(){re("assertEquals")}z.assertEquals=sp;Object.assign(sp,Me.Namespace.assert("assertEquals"));function op(){re("equals")}z.equals=op;Object.assign(op,Me.Namespace.is());function up(){re("validateEquals")}z.validateEquals=up;Object.assign(up,Me.Namespace.validate());z.customValidators={size:function(n){var e,t;return n?(t=(e=Lr.$dictionary.get(n))===null||e===void 0?void 0:e.size)!==null&&t!==void 0?t:0:Lr.$dictionary.size},has:function(n){return function(e){var t,a;return(a=(t=Lr.$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=Lr.$dictionary.get(n))===null||t===void 0?void 0:t.get(e)}},insert:function(n){return function(e){return function(t){var a=p1.MapUtil.take(Lr.$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=Lr.$dictionary.get(n))===null||t===void 0?void 0:t.delete(e))!==null&&a!==void 0?a:!1}}};function y1(){re("application")}z.application=y1;function dp(){re("assertParse")}z.assertParse=dp;Object.assign(dp,Me.Namespace.assert("assertParse"));function lp(){re("isParse")}z.isParse=lp;Object.assign(lp,Fu);function pp(){re("validateParse")}z.validateParse=pp;Object.assign(pp,Lu);function yp(){re("stringify")}z.stringify=yp;Object.assign(yp,Me.Namespace.stringify("stringify"));function Uu(){re("assertStringify")}z.assertStringify=Uu;Object.assign(Uu,Me.Namespace.assert("assertStringify"));Object.assign(Uu,Me.Namespace.stringify("assertStringify"));function Vu(){re("isStringify")}z.isStringify=Vu;Object.assign(Vu,Me.Namespace.is());Object.assign(Vu,Me.Namespace.stringify("isStringify"));function ju(){re("validateStringify")}z.validateStringify=ju;Object.assign(ju,Me.Namespace.validate());Object.assign(ju,Me.Namespace.stringify("validateStringify"));function f1(){re("metadata")}z.metadata=f1;function fp(){re("random")}z.random=fp;Object.assign(fp,Me.Namespace.random());function c1(){re("literals")}z.literals=c1;function cp(){re("clone")}z.clone=cp;Object.assign(cp,Me.Namespace.clone("clone"));function Hu(){re("assertClone")}z.assertClone=Hu;Object.assign(Hu,Me.Namespace.assert("assertClone"));Object.assign(Hu,Me.Namespace.clone("assertClone"));function qu(){re("isClone")}z.isClone=qu;Object.assign(qu,Me.Namespace.is());Object.assign(qu,Me.Namespace.clone("isClone"));function Gu(){re("validateClone")}z.validateClone=Gu;Object.assign(Gu,Me.Namespace.validate());Object.assign(Gu,Me.Namespace.clone("validateClone"));function mp(){re("prune")}z.prune=mp;Object.assign(mp,Me.Namespace.prune("prune"));function zu(){re("assertPrune")}z.assertPrune=zu;Object.assign(zu,Me.Namespace.assert("assertPrune"));Object.assign(zu,Me.Namespace.prune("assertPrune"));function Wu(){re("isPrune")}z.isPrune=Wu;Object.assign(Wu,Me.Namespace.is());Object.assign(Wu,Me.Namespace.prune("isPrune"));function Ku(){re("validatePrune")}z.validatePrune=Ku;Object.assign(Ku,Me.Namespace.prune("validatePrune"));Object.assign(Ku,Me.Namespace.validate());function r6(){re("createAssert")}z.createAssert=r6;Object.assign(r6,ip);function s6(){re("createAssertType")}z.createAssertType=s6;Object.assign(s6,rp);function o6(){re("createIs")}z.createIs=o6;Object.assign(o6,Fu);function u6(){re("createValidate")}z.createValidate=u6;Object.assign(u6,Lu);function d6(){re("createAssertEquals")}z.createAssertEquals=d6;Object.assign(d6,sp);function l6(){re("createEquals")}z.createEquals=l6;Object.assign(l6,op);function p6(){re("createValidateEquals")}z.createValidateEquals=p6;Object.assign(p6,up);function y6(){re("createIsParse")}z.createIsParse=y6;Object.assign(y6,lp);function f6(){re("createAssertParse")}z.createAssertParse=f6;Object.assign(f6,dp);function c6(){re("createValidateParse")}z.createValidateParse=c6;Object.assign(c6,pp);function m6(){re("createStringify")}z.createStringify=m6;Object.assign(m6,yp);function h6(){re("createAssertStringify")}z.createAssertStringify=h6;Object.assign(h6,Uu);function x6(){re("createIsStringify")}z.createIsStringify=x6;Object.assign(x6,Vu);function b6(){re("createValidateStringify")}z.createValidateStringify=b6;Object.assign(b6,ju);function g6(){re("createRandom")}z.createRandom=g6;Object.assign(g6,fp);function T6(){re("createClone")}z.createClone=T6;Object.assign(T6,cp);function v6(){re("createAssertClone")}z.createAssertClone=v6;Object.assign(v6,Hu);function w6(){re("createIsClone")}z.createIsClone=w6;Object.assign(w6,qu);function _6(){re("createValidateClone")}z.createValidateClone=_6;Object.assign(_6,Gu);function k6(){re("createPrune")}z.createPrune=k6;Object.assign(k6,mp);function A6(){re("createAssertPrune")}z.createAssertPrune=A6;Object.assign(A6,zu);function E6(){re("createIsPrune")}z.createIsPrune=E6;Object.assign(E6,Wu);function M6(){re("createValidatePrune")}z.createValidatePrune=M6;Object.assign(M6,Ku);function re(n){throw new Error("Error on typia.".concat(n,'(): no transform has been configured. Run "npx typia setup" command.'))}});var I6=ae(_n=>{"use strict";var C6=_n&&_n.__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]}),m1=_n&&_n.__setModuleDefault||(Object.create?function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}:function(n,e){n.default=e}),h1=_n&&_n.__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)&&C6(e,n,t);return m1(e,n),e},x1=_n&&_n.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&C6(e,n,t)};Object.defineProperty(_n,"__esModule",{value:!0});var b1=h1(hp());_n.default=b1;x1(hp(),_n)});var Vl={};Wi(Vl,{BaseContract:()=>mr,BigNumber:()=>F,Contract:()=>oe,ContractFactory:()=>gi,FixedNumber:()=>ct,Signer:()=>Pt,VoidSigner:()=>ya,Wallet:()=>Pn,Wordlist:()=>Tn,constants:()=>xt,errors:()=>$t,getDefaultProvider:()=>uu,logger:()=>Nc,providers:()=>ia,utils:()=>te,version:()=>lu,wordlists:()=>vi});var uy=En(cd());var Yp="logger/5.7.0";var Xp=!1,Zp=!1,Xs={debug:1,default:2,info:2,warning:3,error:4,off:5},ey=Xs.default,md=null;function sh(){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 ty=sh(),hd;(function(n){n.DEBUG="DEBUG",n.INFO="INFO",n.WARNING="WARNING",n.ERROR="ERROR",n.OFF="OFF"})(hd||(hd={}));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 ny="0123456789abcdef",E=class{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){let a=e.toLowerCase();Xs[a]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(ey>Xs[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(Zp)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 f="";for(let x=0;x>4],f+=ny[p[x]&15];i.push(l+"=Uint8Array(0x"+f+")")}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"),ty&&this.throwError("platform missing String.prototype.normalize",E.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:ty})}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 md||(md=new E(Yp)),md}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"})}Zp=!!e,Xp=!!t}static setLogLevel(e){let t=Xs[e.toLowerCase()];if(t==null){E.globalLogger().warn("invalid log level - "+e);return}ey=t}static from(e){return new E(e)}};E.errors=$t;E.levels=hd;var ay="bytes/5.7.0";var _t=new E(ay);function ry(n){return!!n.toHexString}function Ki(n){return n.slice||(n.slice=function(){let e=Array.prototype.slice.call(arguments);return Ki(new Uint8Array(Array.prototype.slice.apply(n,e)))}),n}function oa(n){return ie(n)&&!(n.length%2)||pn(n)}function iy(n){return typeof n=="number"&&n==n&&n%1===0}function pn(n){if(n==null)return!1;if(n.constructor===Uint8Array)return!0;if(typeof n=="string"||!iy(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),Ki(new Uint8Array(t))}if(e.allowMissingPrefix&&typeof n=="string"&&n.substring(0,2)!=="0x"&&(n="0x"+n),ry(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":_t.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),Ki(a)}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),Ki(t)}function ie(n,e){return!(typeof n!="string"||!n.match(/^0x[0-9A-Fa-f]*$/)||e&&n.length!==2+2*e)}var xd="0123456789abcdef";function W(n,e){if(e||(e={}),typeof n=="number"){_t.checkSafeUint53(n,"invalid hexlify value");let t="";for(;n;)t=xd[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),ry(n))return n.toHexString();if(ie(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(pn(n)){let t="0x";for(let a=0;a>4]+xd[i&15]}return t}return _t.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 Ie(n,e,t){return typeof n!="string"?n=W(n):(!ie(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 kt(n){let e="0x";return n.forEach(t=>{e+=W(t).substring(2)}),e}function Hn(n){let e=bd(W(n,{hexPad:"left"}));return e==="0x"?"0x0":e}function bd(n){typeof n!="string"&&(n=W(n)),ie(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 qn(n){let e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(oa(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 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",n),i[0]&=127;let s=W(i);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 i=e.v===0||e.v===1?e.v:1-e.v%2;e.recoveryParam!==i&&_t.throwArgumentError("signature recoveryParam mismatch v","signature",n)}e.r==null||!ie(e.r)?_t.throwArgumentError("signature missing or invalid r","signature",n):e.r=me(e.r,32),e.s==null||!ie(e.s)?_t.throwArgumentError("signature missing or invalid s","signature",n):e.s=me(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 a=W(t);e._vs&&(ie(e._vs)||_t.throwArgumentError("signature invalid _vs","signature",n),e._vs=me(e._vs,32)),e._vs==null?e._vs=a:e._vs!==a&&_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 qr(n){return n=qn(n),W(ye([n.r,n.s,n.recoveryParam?"0x1c":"0x1b"]))}var Zs="bignumber/5.7.0";var Gr=uy.default.BN,ua=new E(Zs),gd={},sy=9007199254740991;function dy(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"||pn(n))}var oy=!1,F=class{constructor(e,t){e!==gd&&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?oy||(oy=!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(gd,zr(e)):e.match(/^-?[0-9]+$/)?new F(gd,zr(new Gr(e))):ua.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&yn("underflow","BigNumber.from",e),(e>=sy||e<=-sy)&&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 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 ua.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!!(e&&e._isBigNumber)}};function zr(n){if(typeof n!="string")return zr(n.toString(16));if(n[0]==="-")return n=n.substring(1),n[0]==="-"&&ua.throwArgumentError("invalid hex","value",n),n=zr(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(zr(n))}function be(n){let e=F.from(n).toHexString();return e[0]==="-"?new Gr("-"+e.substring(3),16):new Gr(e.substring(2),16)}function yn(n,e,t){let a={fault:n,operation:e};return t!=null&&(a.value=t),ua.throwError(n,E.errors.NUMERIC_FAULT,a)}function Td(n){return new Gr(n,36).toString(16)}function vd(n){return new Gr(n,16).toString(36)}var zt=new E(Zs),Wr={},py=F.from(0),yy=F.from(-1);function fy(n,e,t,a){let i={fault:e,operation:t};return a!==void 0&&(i.value=a),zt.throwError(n,E.errors.NUMERIC_FAULT,i)}var Kr="0";for(;Kr.length<256;)Kr+=Kr;function wd(n){if(typeof n!="number")try{n=F.from(n).toNumber()}catch{}return typeof n=="number"&&n>=0&&n<=256&&!(n%1)?"1"+Kr.substring(0,n):zt.throwArgumentError("invalid decimal size","decimals",n)}function Ji(n,e){e==null&&(e=0);let t=wd(e);n=F.from(n);let a=n.lt(py);a&&(n=n.mul(yy));let i=n.mod(t).toString();for(;i.length2&&zt.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&&fy("fractional component exceeds decimals","underflow","parseFixed"),s===""&&(s="0");s.lengthe[s]==null?l:(typeof e[s]!==o&&zt.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&&zt.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",a),i>80&&zt.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new da(Wr,t,a,i)}},ct=class{constructor(e,t,a,i){e!==Wr&&zt.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&&zt.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);let t=fn(this._value,this.format.decimals),a=fn(e._value,e.format.decimals);return ct.fromValue(t.add(a),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);let t=fn(this._value,this.format.decimals),a=fn(e._value,e.format.decimals);return ct.fromValue(t.sub(a),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);let t=fn(this._value,this.format.decimals),a=fn(e._value,e.format.decimals);return ct.fromValue(t.mul(a).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);let t=fn(this._value,this.format.decimals),a=fn(e._value,e.format.decimals);return ct.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=ct.from(e[0],this.format),a=!e[1].match(/^(0*)$/);return this.isNegative()&&a&&(t=t.subUnsafe(ly.toFormat(t.format))),t}ceiling(){let e=this.toString().split(".");e.length===1&&e.push("0");let t=ct.from(e[0],this.format),a=!e[1].match(/^(0*)$/);return!this.isNegative()&&a&&(t=t.addUnsafe(ly.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 a=ct.from("1"+Kr.substring(0,e),this.format),i=oh.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&&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,a){return a==null&&t!=null&&!dy(t)&&(a=t,t=null),t==null&&(t=0),a==null&&(a="fixed"),ct.fromString(Ji(e,t),da.from(a))}static fromString(e,t){t==null&&(t="fixed");let a=da.from(t),i=fn(e,a.decimals);!a.signed&&i.lt(py)&&fy("unsigned value cannot be negative","overflow","value",e);let r=null;a.signed?r=i.toTwos(a.width).toHexString():(r=i.toHexString(),r=me(r,a.width/8));let s=Ji(i,a.decimals);return new ct(Wr,r,s,a)}static fromBytes(e,t){t==null&&(t="fixed");let a=da.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=Ji(i,a.decimals);return new ct(Wr,r,s,a)}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(a){if(a.code!==E.errors.INVALID_ARGUMENT)throw a}return zt.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}},ly=ct.from(1),oh=ct.from("0.5");var cy="properties/5.7.0";var uh=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},eo=new E(cy);function B(n,e,t){Object.defineProperty(n,e,{enumerable:!0,value:t,writable:!1})}function ht(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 uh(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 $i(n,e){(!n||typeof n!="object")&&eo.throwArgumentError("invalid object","object",n),Object.keys(n).forEach(t=>{e[t]||eo.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 dh={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function my(n){if(n==null||dh[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;tmt(e)));if(typeof n=="object"){let e={};for(let t in n){let a=n[t];a!==void 0&&B(e,t,mt(a))}return e}return eo.throwArgumentError(`Cannot deepCopy ${typeof n}`,"object",n)}function mt(n){return lh(n)}var an=class{constructor(e){for(let t in e)this[t]=mt(e[t])}};var Gn="abi/5.7.0";var Te=new E(Gn),li={},hy={calldata:!0,memory:!0,storage:!0},ph={calldata:!0,memory:!0};function to(n,e){if(n==="bytes"||n==="string"){if(hy[e])return!0}else if(n==="address"){if(e==="payable")return!0}else if((n.indexOf("[")>=0||n==="tuple")&&ph[e])return!0;return(hy[e]||e==="payable")&&Te.throwArgumentError("invalid modifier","name",e),!1}function yh(n,e){let t=n;function a(o){Te.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!==ge.sighash&&(t+=this.type),t+="("+this.components.map(a=>a.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:Qi(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(yt.fromObject):null})}static fromString(e,t){function a(i){return yt.fromObject({name:i.name,type:i.type,indexed:i.indexed,components:i.components})}return a(yh(e,!!t))}static isParamType(e){return!!(e!=null&&e._isParamType)}};function Jr(n,e){return mh(n).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(a=>JSON.parse(a.format(e)))});let t="";return e!==ge.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map(a=>a.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:$r(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(Qr);t||Te.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:Te.warn("unknown modifier: "+i)}}),Wt.fromObject({name:t[1].trim(),anonymous:a,inputs:Jr(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}};function by(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 gy(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 Ty(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(a=>JSON.parse(a.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(a=>a.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=Ty(e);t.constant&&Te.throwArgumentError("constructor cannot be constant","value",e);let a={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,a)}static fromString(e){let t={type:"constructor"};e=by(e,t);let a=e.match(Qr);return(!a||a[1].trim()!=="constructor")&&Te.throwArgumentError("invalid constructor string","value",e),t.inputs=Jr(a[2].trim(),!1),gy(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=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(a=>JSON.parse(a.format(e))),outputs:this.outputs.map(a=>JSON.parse(a.format(e)))});let t="";return e!==ge.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map(a=>a.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(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"&&Te.throwArgumentError("invalid function object","value",e);let t=Ty(e),a={type:e.type,name:$r(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,a)}static fromString(e){let t={type:"function"};e=by(e,t);let a=e.split(" returns ");a.length>2&&Te.throwArgumentError("invalid function string","value",e);let i=a[0].match(Qr);if(i||Te.throwArgumentError("invalid function signature","value",e),t.name=i[1].trim(),t.name&&$r(t.name),t.inputs=Jr(i[2],!1),gy(i[3].trim(),t),a.length>1){let r=a[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 Ut.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}};function xy(n){let e=n.format();return(e==="Error(string)"||e==="Panic(uint256)")&&Te.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",n),n}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(a=>JSON.parse(a.format(e)))});let t="";return e!==ge.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map(a=>a.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:$r(e.name),inputs:e.inputs?e.inputs.map(yt.fromObject):[]};return xy(new rn(li,t))}static fromString(e){let t={type:"error"},a=e.match(Qr);return a||Te.throwArgumentError("invalid error signature","value",e),t.name=a[1].trim(),t.name&&$r(t.name),t.inputs=Jr(a[2],!1),xy(rn.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}};function Qi(n){return n.match(/^uint($|[^1-9])/)?n="uint256"+n.substring(4):n.match(/^int($|[^1-9])/)&&(n="int256"+n.substring(3)),n}var ch=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function $r(n){return(!n||!n.match(ch))&&Te.throwArgumentError(`invalid identifier "${n}"`,"value",n),n}var Qr=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function mh(n){n=n.trim();let e=[],t="",a=0;for(let i=0;ithis.wordSize&&_d.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,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):yi.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:_d.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 a=this._peekBytes(0,e,!!t);return this._offset+=a.length,a.slice(0,e)}readValue(){return F.from(this.readBytes(this.wordSize))}};var wy=En(vy());function fe(n){return"0x"+wy.default.keccak_256(j(n))}var io={};Wi(io,{decode:()=>Yr,encode:()=>la});var _y="rlp/5.7.0";var zn=new E(_y);function ky(n){let e=[];for(;n;)e.unshift(n&255),n>>=8;return e}function Ay(n,e,t){let a=0;for(let i=0;ie+1+a&&zn.throwError("child data too short",E.errors.BUFFER_OVERRUN,{})}return{consumed:1+a,result:i}}function Cy(n,e){if(n.length===0&&zn.throwError("data too short",E.errors.BUFFER_OVERRUN,{}),n[e]>=248){let t=n[e]-247;e+1+t>n.length&&zn.throwError("data short segment too short",E.errors.BUFFER_OVERRUN,{});let a=Ay(n,e+1,t);return e+1+t+a>n.length&&zn.throwError("data long segment too short",E.errors.BUFFER_OVERRUN,{}),Ey(n,e,e+1+t,t+a)}else if(n[e]>=192){let t=n[e]-192;return e+1+t>n.length&&zn.throwError("data array too short",E.errors.BUFFER_OVERRUN,{}),Ey(n,e,e+1,t)}else if(n[e]>=184){let t=n[e]-183;e+1+t>n.length&&zn.throwError("data array too short",E.errors.BUFFER_OVERRUN,{});let a=Ay(n,e+1,t);e+1+t+a>n.length&&zn.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&&zn.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 Yr(n){let e=j(n),t=Cy(e,0);return t.consumed!==e.length&&zn.throwArgumentError("invalid rlp data","data",n),t.result}var Iy="address/5.7.0";var Ra=new E(Iy);function Sy(n){ie(n,20)||Ra.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 hh=9007199254740991;function xh(n){return Math.log10?Math.log10(n):Math.log(n)/Math.LN10}var kd={};for(let n=0;n<10;n++)kd[String(n)]=String(n);for(let n=0;n<26;n++)kd[String.fromCharCode(65+n)]=String(10+n);var Ry=Math.floor(xh(hh));function Py(n){n=n.toUpperCase(),n=n.substring(4)+n.substring(0,2)+"00";let e=n.split("").map(a=>kd[a]).join("");for(;e.length>=Ry;){let a=e.substring(0,Ry);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 ce(n){let e=null;if(typeof n!="string"&&Ra.throwArgumentError("invalid address","address",n),n.match(/^(0x)?[0-9a-fA-F]{40}$/))n.substring(0,2)!=="0x"&&(n="0x"+n),e=Sy(n),n.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==n&&Ra.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)!==Py(n)&&Ra.throwArgumentError("bad icap checksum","address",n),e=Td(n.substring(4));e.length<40;)e="0"+e;e=Sy("0x"+e)}else Ra.throwArgumentError("invalid address","address",n);return e}function Ny(n){try{return ce(n),!0}catch{}return!1}function Dy(n){let e=vd(ce(n).substring(2)).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+Py("XE00"+e)+e}function fi(n){let e=null;try{e=ce(n.from)}catch{Ra.throwArgumentError("missing from address","transaction",n)}let t=nn(j(F.from(n.nonce).toHexString()));return ce(Ie(fe(la([e,t])),12))}function Oy(n,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),ce(Ie(fe(ye(["0xff",ce(n),e,t])),12))}var ro=class extends At{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=ce(t)}catch(a){this._throwError(a.message,t)}return e.writeValue(t)}decode(e){return ce(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 Xi=new E(Gn);function Ad(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 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!==a.length&&Xi.throwArgumentError("types/value length mismatch","tuple",t);let i=new pi(n.wordSize),r=new pi(n.wordSize),s=[];e.forEach((l,p)=>{let f=a[p];if(l.dynamic){let x=r.length;l.encode(r,f);let I=i.writeUpdatableValue();s.push(_=>{I(_+x)})}else l.encode(i,f)}),s.forEach(l=>{l(i.length)});let o=n.appendWriter(i);return o+=n.appendWriter(r),o}function Ed(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 oo=class extends At{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&&Xi.throwError("insufficient data length",E.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let a=[];for(let i=0;ifo,EtherSymbol:()=>Vy,HashZero:()=>er,MaxInt256:()=>Uy,MaxUint256:()=>ho,MinInt256:()=>Ly,NegativeOne:()=>co,One:()=>mo,Two:()=>By,WeiPerEther:()=>Fy,Zero:()=>Zi});var fo="0x0000000000000000000000000000000000000000";var co=F.from(-1),Zi=F.from(0),mo=F.from(1),By=F.from(2),Fy=F.from("1000000000000000000"),ho=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),Ly=F.from("-0x8000000000000000000000000000000000000000000000000000000000000000"),Uy=F.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");var er="0x0000000000000000000000000000000000000000000000000000000000000000";var Vy="\u039E";var xo=class extends At{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=ho.mask(e.wordSize*8);if(this.signed){let r=i.mask(this.size*8-1);(a.gt(r)||a.lt(r.add(mo).mul(co)))&&this._throwError("value out-of-bounds",t)}else(a.lt(Zi)||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 jy="strings/5.7.0";var Hy=new E(jy),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 bh(n,e,t,a,i){return Hy.throwArgumentError(`invalid codepoint at offset ${e}; ${n}`,"bytes",t)}function qy(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 gh(n,e,t,a,i){return n===Vt.OVERLONG?(a.push(i),0):(a.push(65533),qy(n,e,t,a,i))}var bo=Object.freeze({error:bh,ignore:qy,replace:gh});function Cd(n,e){e==null&&(e=bo.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 ve(n,e=Jt.current){e!=Jt.current&&(Hy.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 Md(n){let e="0000"+n.toString(16);return"\\u"+e.substring(e.length-4)}function Id(n,e){return'"'+Cd(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?Md(t):(t-=65536,Md((t>>10&1023)+55296)+Md((t&1023)+56320))}).join("")+'"'}function go(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 go(Cd(n,e))}function Pa(n,e=Jt.current){return Cd(ve(n,e))}function Sd(n){let e=ve(n);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return W(ye([e,er]).slice(0,32))}function Rd(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 Th(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 Gy(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 Nd(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 vh=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"),wh="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(n=>parseInt(n,16)),_h=[{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}],kh=Pd("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"),Ah=Pd("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"),Eh=Pd("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",Th),Mh=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 Ch(n){return n.reduce((e,t)=>(t.forEach(a=>{e.push(a)}),e),[])}function Ih(n){return!!Nd(n,vh)}function Sh(n){let e=Nd(n,_h);if(e)return[n+e.s];let t=kh[n];if(t)return t;let a=Ah[n];if(a)return[n+a[0]];let i=Eh[n];return i||null}function Rh(n){return!!Nd(n,Mh)}function Dd(n){if(n.match(/^[a-z0-9-]*$/i)&&n.length<=59)return n.toLowerCase();let e=Pa(n);e=Ch(e.map(a=>{if(wh.indexOf(a)>=0)return[];if(a>=65024&&a<=65039)return[];let i=Sh(a);return i||[a]})),e=Pa(go(e),Jt.NFKC),e.forEach(a=>{if(Rh(a))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(a=>{if(Ih(a))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 Xr{constructor(e){super("string",e)}defaultValue(){return""}encode(e,t){return super.encode(e,ve(t))}decode(e){return Yt(super.decode(e))}};var ci=class extends At{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 Ad(e,this.coders,t)}decode(e){return e.coerce(this.name,Ed(e,this.coders))}};var vo=new E(Gn),Ph=new RegExp(/^bytes([0-9]*)$/),Nh=new RegExp(/^(u?int)([0-9]*)$/),tr=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 ci((e.components||[]).map(a=>this._getCoder(a)),e.name);case"":return new yo(e.name)}let t=e.type.match(Nh);if(t){let a=parseInt(t[2]||"256");return(a===0||a>256||a%8!==0)&&vo.throwArgumentError("invalid "+t[1]+" bit length","param",e),new xo(a/8,t[1]==="int",e.name)}if(t=e.type.match(Ph),t){let a=parseInt(t[1]);return(a===0||a>32)&&vo.throwArgumentError("invalid bytes length","param",e),new po(a,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 ci(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 a=e.map(s=>this._getCoder(yt.from(s))),i=new ci(a,"_"),r=this._getWriter();return i.encode(r,t),r.data}decode(e,t,a){let i=e.map(s=>this._getCoder(yt.from(s)));return new ci(i,"_").decode(this._getReader(j(t),a))}},Zr=new tr;function sn(n){return fe(ve(n))}var wo="hash/5.7.0";var Od={};Wi(Od,{decode:()=>nr,encode:()=>ar});function nr(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 Dh(n){let e={};for(let t=0;t>--l&1}let x=31,I=Math.pow(2,x),_=I>>>1,v=_>>1,S=I-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=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 Bh(n){let e=0;return()=>n[e++]}function Ky(n){return Bh(Oh(n))}function Fh(n){return n&1?~n>>1:n>>1}function Lh(n,e){let t=Array(n);for(let a=0;ae[s]):t}function Jy(n){let e=[];for(;;){let t=n();if(t==0)break;e.push(jh(t,n))}for(;;){let t=n()-1;if(t<0)break;e.push(Hh(t,n))}return Dh(Wy(e))}function Vh(n){let e=[];for(;;){let t=n();if(t==0)break;e.push(t)}return e}function $y(n,e,t){let a=Array(n).fill(void 0).map(()=>[]);for(let i=0;ia[s].push(r));return a}function jh(n,e){let t=1+e(),a=e(),i=Vh(e),r=$y(i.length,1+n,e);return Wy(r.map((s,o)=>{let l=s[0],p=s.slice(1);return Array(i[o]).fill(void 0).map((f,x)=>{let I=x*a;return[l+x*t,p.map(_=>_+I)]})}))}function Hh(n,e){let t=1+e();return $y(t,1+n,e).map(i=>[i[0],i.slice(1)])}function Qy(n){let e=es(n).sort((a,i)=>a-i);return t();function t(){let a=[];for(;;){let p=es(n,e);if(p.length==0)break;a.push({set:new Set(p),node:t()})}a.sort((p,f)=>f.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 Yy(){return Ky(nr("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=Yy(),qh=new Set(es(_o)),Gh=new Set(es(_o)),zh=Jy(_o),Wh=Qy(_o),Xy=45,Zy=95;function e0(n){return Pa(n)}function Kh(n){return n.filter(e=>e!=65039)}function t0(n){for(let e of n.split(".")){let t=e0(e);try{for(let a=t.lastIndexOf(Zy)-1;a>=0;a--)if(t[a]!==Zy)throw new Error("underscore only allowed at start");if(t.length>=4&&t.every(a=>a<128)&&t[2]===Xy&&t[3]===Xy)throw new Error("invalid label extension")}catch(a){throw new Error(`Invalid label "${e}": ${a.message}`)}}return n}function n0(n){return t0(Jh(n,Kh))}function Jh(n,e){let t=e0(n).reverse(),a=[];for(;t.length;){let i=Qh(t);if(i){a.push(...e(i));continue}let r=t.pop();if(qh.has(r)){a.push(r);continue}if(Gh.has(r))continue;let s=zh[r];if(s){a.push(...s);continue}throw new Error(`Disallowed codepoint: 0x${r.toString(16).toUpperCase()}`)}return t0($h(String.fromCodePoint(...a)))}function $h(n){return n.normalize("NFC")}function Qh(n,e){var t;let a=Wh,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 Yh=new E(wo),i0=new Uint8Array(32);i0.fill(0);function a0(n){if(n.length===0)throw new Error("invalid ENS name; empty component");return n}function Bd(n){let e=ve(n0(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(a0(e.slice(a))),t}function Fd(n){try{return Bd(n).length!==0}catch{}return!1}function Na(n){typeof n!="string"&&Yh.throwArgumentError("invalid ENS name; not a string","name",n);let e=i0,t=Bd(n);for(;t.length;)e=fe(ye([e,fe(t.pop())]));return W(e)}function ts(n){return W(ye(Bd(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 r0=`Ethereum Signed Message: +`;function ir(n){return typeof n=="string"&&(n=ve(n)),fe(ye([ve(r0),ve(String(n.length)),n]))}var Xh=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},bt=new E(wo),d0=new Uint8Array(32);d0.fill(0);var Zh=F.from(-1),l0=F.from(0),p0=F.from(1),e2=F.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function t2(n){let e=j(n),t=e.length%32;return t?kt([e,d0.slice(t)]):W(e)}var n2=me(p0.toHexString(),32),a2=me(l0.toHexString(),32),s0={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Ld=["name","version","chainId","verifyingContract","salt"];function o0(n){return function(e){return typeof e!="string"&&bt.throwArgumentError(`invalid domain value for ${JSON.stringify(n)}`,`domain.${n}`,e),e}}var i2={name:o0("name"),version:o0("version"),chainId:function(n){try{return F.from(n).toString()}catch{}return bt.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",n)},verifyingContract:function(n){try{return ce(n).toLowerCase()}catch{}return bt.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 bt.throwArgumentError('invalid domain value "salt"',"domain.salt",n)}};function Ud(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))&&bt.throwArgumentError("invalid numeric width","type",n);let i=e2.mask(t?a-1:a),r=t?i.add(p0).mul(Zh):l0;return function(s){let o=F.from(s);return(o.lt(r)||o.gt(i))&&bt.throwArgumentError(`value out-of-bounds for ${n}`,"value",s),me(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))&&bt.throwArgumentError("invalid bytes width","type",n),function(a){return j(a).length!==t&&bt.throwArgumentError(`invalid length for ${n}`,"value",a),t2(a)}}}switch(n){case"address":return function(e){return me(ce(e),32)};case"bool":return function(e){return e?n2:a2};case"bytes":return function(e){return fe(e)};case"string":return function(e){return sn(e)}}return null}function u0(n,e){return`${n}(${e.map(({name:t,type:a})=>a+" "+t).join(",")})`}var gt=class{constructor(e){B(this,"types",Object.freeze(mt(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]&&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),!Ud(f)&&(a[f]||bt.throwArgumentError(`unknown type ${JSON.stringify(f)}`,"types",e),a[f].push(o),t[o][f]=!0)})}let r=Object.keys(a).filter(o=>a[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=>{!a[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]=u0(o,e[o])+l.map(p=>u0(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=Ud(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 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),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,a){if(Ud(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&&bt.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),{}):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,a){return gt.from(t).hashStruct(e,a)}static hashDomain(e){let t=[];for(let a in e){let i=s0[a];i||bt.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(a)}`,"domain",e),t.push({name:a,type:i})}return t.sort((a,i)=>Ld.indexOf(a.name)-Ld.indexOf(i.name)),gt.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,a){return kt(["0x1901",gt.hashDomain(e),gt.from(t).hash(a)])}static hash(e,t,a){return fe(gt.encode(e,t,a))}static resolveNames(e,t,a,i){return Xh(this,void 0,void 0,function*(){e=we(e);let r={};e.verifyingContract&&!ie(e.verifyingContract,20)&&(r[e.verifyingContract]="0x");let s=gt.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){gt.hashDomain(e);let i={},r=[];Ld.forEach(l=>{let p=e[l];p!=null&&(i[l]=i2[l](p),r.push({name:l,type:s0[l]}))});let s=gt.from(t),o=we(t);return o.EIP712Domain?bt.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"&&bt.throwArgumentError("invalid string","value",p),p}return bt.throwArgumentError("unsupported type","type",l)})}}};var Tt=new E(Gn);var rr=class extends an{},sr=class extends an{},Vd=class extends an{},pa=class extends an{static isIndexed(e){return!!(e&&e._isIndexed)}},r2={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function y0(n,e){let t=new Error(`deferred error during ABI decoding triggered accessing ${n}`);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(a=>Kt.from(a)).filter(a=>a!=null)),B(this,"_abiCoder",ht(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){Tt.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]){Tt.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=ge.full),e===ge.sighash&&Tt.throwArgumentError("interface does not support formatting sighash","format",e);let t=this.fragments.map(a=>a.format(e));return e===ge.json?JSON.stringify(t.map(a=>JSON.parse(a))):t}static getAbiCoder(){return Zr}static getAddress(e){return ce(e)}static getSighash(e){return Ie(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];Tt.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?Tt.throwArgumentError("no matching function","name",a):i.length>1&&Tt.throwArgumentError("multiple matching functions","name",a),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 a=e.toLowerCase();for(let i in this.events)if(a===this.getEventTopic(i))return this.events[i];Tt.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?Tt.throwArgumentError("no matching event","name",a):i.length>1&&Tt.throwArgumentError("multiple matching events","name",a),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 a=ht(this.constructor,"getSighash");for(let i in this.errors){let r=this.errors[i];if(e===a(r))return this.errors[i]}Tt.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?Tt.throwArgumentError("no matching error","name",a):i.length>1&&Tt.throwArgumentError("multiple matching errors","name",a),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 a=j(t);return W(a.slice(0,4))!==this.getSighash(e)&&Tt.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(ye([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)&&Tt.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(ye([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)),f=r2[p];if(f)s=this._abiCoder.decode(f.inputs,a.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,a.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 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]),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?a.push(null):o.baseType==="array"||o.baseType==="tuple"?Tt.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&&Tt.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 I=this.getEventTopic(e);(!ie(a[0],32)||a[0].toLowerCase()!==I)&&Tt.throwError("fragment/topic mismatch",E.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:I,value:a[0]}),a=a.slice(1)}let i=[],r=[],s=[];e.inputs.forEach((I,_)=>{I.indexed?I.type==="string"||I.type==="bytes"||I.baseType==="tuple"||I.baseType==="array"?(i.push(yt.fromObject({type:"bytes32",name:I.name})),s.push(!0)):(i.push(I),s.push(!1)):(r.push(I),s.push(!1))});let o=a!=null?this._abiCoder.decode(i,ye(a)):null,l=this._abiCoder.decode(r,t,!0),p=[],f=0,x=0;e.inputs.forEach((I,_)=>{if(I.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[f++]}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 y0(`property ${JSON.stringify(I.name)}`,v)}}):p[I.name]=v}});for(let I=0;I{throw y0(`index ${I}`,_)}})}return Object.freeze(p)}parseTransaction(e){let t=this.getFunction(e.data.substring(0,10).toLowerCase());return t?new sr({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 rr({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 Vd({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 f0="abstract-provider/5.7.0";var s2=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},o2=new E(f0),ko=class extends an{static isForkEvent(e){return!!(e&&e._isForkEvent)}};var Xt=class{constructor(){o2.checkAbstract(new.target,Xt),B(this,"_isProvider",!0)}getFeeData(){return s2(this,void 0,void 0,function*(){let{block:e,gasPrice:t}=yield Se({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 c0="abstract-signer/5.7.0";var Mn=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},cn=new E(c0),u2=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],d2=[E.errors.INSUFFICIENT_FUNDS,E.errors.NONCE_EXPIRED,E.errors.REPLACEMENT_UNDERPRICED],Pt=class{constructor(){cn.checkAbstract(new.target,Pt),B(this,"_isSigner",!0)}getBalance(e){return Mn(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)})}getTransactionCount(e){return Mn(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)})}estimateGas(e){return Mn(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 Mn(this,void 0,void 0,function*(){this._checkProvider("call");let a=yield Se(this.checkTransaction(e));return yield this.provider.call(a,t)})}sendTransaction(e){return Mn(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 Mn(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return Mn(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return Mn(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(e){return Mn(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)})}checkTransaction(e){for(let a in e)u2.indexOf(a)===-1&&cn.throwArgumentError("invalid transaction key: "+a,"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(a=>(a[0].toLowerCase()!==a[1].toLowerCase()&&cn.throwArgumentError("from address mismatch","transaction",e),a[0])),t}populateTransaction(e){return Mn(this,void 0,void 0,function*(){let t=yield Se(this.checkTransaction(e));t.to!=null&&(t.to=Promise.resolve(t.to).then(i=>Mn(this,void 0,void 0,function*(){if(i==null)return null;let r=yield this.resolveName(i);return r==null&&cn.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)?cn.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(t.type===0||t.type===1)&&a&&cn.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&&cn.throwError("network does not support EIP-1559",E.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),t.gasPrice==null&&(t.gasPrice=i.gasPrice),t.type=0):cn.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(d2.indexOf(i.code)>=0)throw i;return cn.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]&&cn.throwArgumentError("chainId address mismatch","transaction",e),i[0])),yield Se(t)})}_checkProvider(e){this.provider||cn.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(()=>{cn.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 ya(this.address,e)}};var pe=En(cd()),Xn=En(Qd());function cr(n,e,t){return t={path:e,exports:{},require:function(a,i){return Px(a,i??t.path)}},n(t,t.exports),t.exports}function Px(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var el=X0;function X0(n,e){if(!n)throw new Error(e||"Assertion failed")}X0.equal=function(e,t,a){if(e!=t)throw new Error(a||"Assertion failed: "+e+" != "+t)};var Rn=cr(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,I=f&255;x?l.push(x,I):l.push(I)}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(I>>1)-1?S=(I>>1)-L:S=L,_.isubn(S)):S=0,x[v]=S,_.iushrn(1)}return x}t.getNAF=a;function i(l,p){var f=[[],[]];l=l.clone(),p=p.clone();for(var x=0,I=0,_;l.cmpn(-x)>0||p.cmpn(-I)>0;){var v=l.andln(3)+x&3,S=p.andln(3)+I&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)+I&7,(_===3||_===5)&&v===2?O=-S:O=S),f[1].push(O),2*x===L+1&&(x=1-x),2*I===O+1&&(I=1-I),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}),Io=on.getNAF,Nx=on.getJSF,So=on.assert;function Fa(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 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 a=e._getDoubles(),i=Io(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),I=r;I>0;I--){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];So(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};Fa.prototype._wnafMulAdd=function(e,t,a,i,r){var s=this._wnafT1,o=this._wnafT2,l=this._wnafT3,p=0,f,x,I;for(f=0;f=1;f-=2){var v=f-1,S=f;if(s[v]!==1||s[S]!==1){l[v]=Io(a[v],s[v],this._bitLength),l[S]=Io(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=Nx(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;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?I=o[x][R-1>>1]:R<0&&(I=o[x][-R-1>>1].neg()),I.type==="affine"?J=J.mixedAdd(I):J=J.add(I))}}for(f=0;f=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 a=[this],i=this,r=0;r=0&&(_=p,v=f),x.negative&&(x=x.neg(),I=I.neg()),_.negative&&(_=_.neg(),v=v.neg()),[{a:x,b:I},{a:_,b:v}]};xn.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),f=s.mul(i.b),x=e.sub(o).sub(l),I=p.add(f).neg();return{k1:x,k2:I}};xn.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)};xn.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};xn.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 Dt(n,e,t,a){hi.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}tl(Dt,hi.BasePoint);xn.prototype.jpoint=function(e,t,a){return new Dt(this,e,t,a)};Dt.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)};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(),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 f=l.redSqr(),x=f.redMul(l),I=i.redMul(f),_=p.redSqr().redIAdd(x).redISub(I).redISub(I),v=p.redMul(I.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(),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(),f=p.redMul(o),x=a.redMul(p),I=l.redSqr().redIAdd(f).redISub(x).redISub(x),_=l.redMul(x.redISub(I)).redISub(r.redMul(f)),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 a=this;for(t=0;t=0)return!1;if(a.redIAdd(r),this.x.cmp(a)===0)return!0}};Dt.prototype.inspect=function(){return this.isInfinity()?"":""};Dt.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var Mo=cr(function(n,e){"use strict";var t=e;t.base=hi,t.short=Ox,t.mont=null,t.edwards=null}),Co=cr(function(n,e){"use strict";var t=e,a=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,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: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(n){if(!(this instanceof Ba))return new Ba(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=Rn.toArray(n.entropy,n.entropyEnc||"hex"),t=Rn.toArray(n.nonce,n.nonceEnc||"hex"),a=Rn.toArray(n.pers,n.persEnc||"hex");el(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,t,a)}var Z0=Ba;Ba.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};Ba.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=Rn.toArray(a,i||"hex"),this._update(a));for(var r=[];r.length"};var Bx=on.assert;function Ro(n,e){if(n instanceof Ro)return n;this._importDER(n,e)||(Bx(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 Po=Ro;function Fx(){this.place=0}function Yd(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 Y0(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)}Ro.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=Y0(t),a=Y0(a);!a[0]&&!(a[1]&128);)a=a.slice(1);var i=[2];Xd(i,t.length),i=i.concat(t),i.push(2),Xd(i,a.length);var r=i.concat(a),s=[48];return Xd(s,r.length),s=s.concat(r),on.encode(s,e)};var Lx=function(){throw new Error("unsupported")},ef=on.assert;function mn(n){if(!(this instanceof mn))return new mn(n);typeof n=="string"&&(ef(Object.prototype.hasOwnProperty.call(Co,n),"Unknown curve "+n),n=Co[n]),n instanceof Co.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 Ux=mn;mn.prototype.keyPair=function(e){return new nl(this,e)};mn.prototype.keyFromPrivate=function(e,t){return nl.fromPrivate(this,e,t)};mn.prototype.keyFromPublic=function(e,t){return nl.fromPublic(this,e,t)};mn.prototype.genKeyPair=function(e){e||(e={});for(var t=new Z0({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||Lx(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)}};mn.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};mn.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 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 I=this.g.mul(x);if(!I.isInfinity()){var _=I.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=(I.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,a,i){e=this._truncateToN(new pe.default(e,16)),a=this.keyFromPublic(a,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),f;return this.curve._maxwellTrick?(f=this.g.jmulAdd(l,a.getPublic(),p),f.isInfinity()?!1:f.eqXToP(r)):(f=this.g.mulAdd(l,a.getPublic(),p),f.isInfinity()?!1:f.getX().umod(this.n).cmp(r)===0)};mn.prototype.recoverPubKey=function(n,e,t,a){ef((3&t)===t,"The recovery param is more than two bits"),e=new Po(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 f=e.r.invm(i),x=i.sub(r).mul(f).umod(i),I=o.mul(f).umod(i);return this.g.mulAdd(x,s,I)};mn.prototype.getKeyRecoveryParam=function(n,e,t,a){if(e=new Po(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 Vx=cr(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=Mo,t.curves=Co,t.ec=Ux,t.eddsa=null}),tf=Vx.ec;var nf="signing-key/5.7.0";var il=new E(nf),al=null;function Zn(){return al||(al=new tf("secp256k1")),al}var bn=class{constructor(e){B(this,"curve","secp256k1"),B(this,"privateKey",W(e)),Ft(this.privateKey)!==32&&il.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)),a=Zn().keyFromPublic(j(e));return"0x"+t.pub.add(a.pub).encodeCompressed("hex")}signDigest(e){let t=Zn().keyFromPrivate(j(this.privateKey)),a=j(e);a.length!==32&&il.throwArgumentError("bad digest length","digest",e);let i=t.sign(a,{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)),a=Zn().keyFromPublic(j(is(e)));return me("0x"+t.derive(a.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}};function No(n,e){let t=qn(e),a={r:j(t.r),s:j(t.s)};return"0x"+Zn().recoverPubKey(j(n),a,t.recoveryParam).encode("hex",!1)}function is(n,e){let t=j(n);if(t.length===32){let a=new bn(t);return e?"0x"+Zn().keyFromPrivate(t).getPublic(!0,"hex"):a.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 il.throwArgumentError("invalid public or private key","key","[REDACTED]")}var af="transactions/5.7.0";var qt=new E(af),Do;(function(n){n[n.legacy=0]="legacy",n[n.eip2930=1]="eip2930",n[n.eip1559=2]="eip1559"})(Do||(Do={}));function sl(n){return n==="0x"?null:ce(n)}function Ht(n){return n==="0x"?Zi:F.from(n)}var jx=[{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"}],Hx={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function gn(n){let e=is(n);return ce(Ie(fe(Ie(e,1)),12))}function xi(n,e){return gn(No(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 rl(n,e){return{address:ce(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),rl(t[0],t[1])):rl(t.address,t.storageKeys));let e=Object.keys(n).map(t=>{let a=n[t].reduce((i,r)=>(i[r]=!0,i),{});return rl(t,Object.keys(a).sort())});return e.sort((t,a)=>t.address.localeCompare(a.address)),e}function rf(n){return dn(n).map(e=>[e.address,e.storageKeys])}function sf(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?ce(n.to):"0x",un(n.value||0,"value"),n.data||"0x",rf(n.accessList||[])];if(e){let a=qn(e);t.push(un(a.recoveryParam,"recoveryParam")),t.push(nn(a.r)),t.push(nn(a.s))}return kt(["0x02",la(t)])}function of(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?ce(n.to):"0x",un(n.value||0,"value"),n.data||"0x",rf(n.accessList||[])];if(e){let a=qn(e);t.push(un(a.recoveryParam,"recoveryParam")),t.push(nn(a.r)),t.push(nn(a.s))}return kt(["0x01",la(t)])}function qx(n,e){$i(n,Hx);let t=[];jx.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&&!oa(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 la(t);let i=qn(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))),la(t)}function rs(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),qx(n,e);switch(n.type){case 1:return of(n,e);case 2:return sf(n,e);default:break}return qt.throwError(`unsupported transaction type: ${n.type}`,E.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:n.type})}function uf(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=me(e[1],32),n.s=me(e[2],32);try{let a=fe(t(n));n.from=xi(a,{r:n.r,s:n.s,recoveryParam:n.v})}catch{}}function Gx(n){let e=Yr(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:sl(e[5]),value:Ht(e[6]),data:e[7],accessList:dn(e[8])};return e.length===9||(i.hash=fe(n),uf(i,e.slice(9),sf)),i}function zx(n){let e=Yr(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:sl(e[4]),value:Ht(e[5]),data:e[6],accessList:dn(e[7])};return e.length===8||(t.hash=fe(n),uf(t,e.slice(8),of)),t}function Wx(n){let e=Yr(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:sl(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 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(la(i));try{t.from=xi(r,{r:W(t.r),s:W(t.s),recoveryParam:a})}catch{}t.hash=fe(n)}return t.type=null,t}function Oo(n){let e=j(n);if(e[0]>127)return Wx(e);switch(e[0]){case 1:return zx(e);case 2:return Gx(e);default:break}return qt.throwError(`unsupported transaction type: ${e[0]}`,E.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}var df="contracts/5.7.0";var La=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Re=new E(df),Kx={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(n,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 ce(t)}catch{}n||Re.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&&Re.throwArgumentError("resolver or addr is not configured for ENS name","name",t),a})}function ss(n,e,t){return La(this,void 0,void 0,function*(){return Array.isArray(t)?yield Promise.all(t.map((a,i)=>ss(n,Array.isArray(e)?e[i]:e[a.name],a))):t.type==="address"?yield Bo(n,e):t.type==="tuple"?yield ss(n,e,t.components):t.baseType==="array"?Array.isArray(e)?yield Promise.all(e.map(a=>ss(n,a,t.arrayChildren))):Promise.reject(Re.makeError("invalid value for array",E.errors.INVALID_ARGUMENT,{argument:"value",value:e})):e})}function Uo(n,e,t){return La(this,void 0,void 0,function*(){let a={};t.length===e.inputs.length+1&&typeof t[t.length-1]=="object"&&(a=we(t.pop())),Re.checkArgumentCount(t.length,e.inputs.length,"passed to contract"),n.signer?a.from?a.from=Se({override:Bo(n.signer,a.from),signer:n.signer.getAddress()}).then(p=>La(this,void 0,void 0,function*(){return ce(p.signer)!==p.override&&Re.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=Bo(n.provider,a.from));let i=yield Se({args:ss(n.signer||n.provider,t,e.inputs),address:n.resolvedAddress,overrides:Se(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,f=j(r);for(let x=0;xa[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 Jx(n,e){return function(...t){return Uo(n,e,t)}}function $x(n,e){let t=n.signer||n.provider;return function(...a){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(n,e,a);return yield t.estimateGas(i)})}}function pf(n,e){let t=e.wait.bind(e);e.wait=a=>t(a).then(i=>(i.events=i.logs.map(r=>{let s=mt(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 yf(n,e,t){let a=n.signer||n.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=we(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 Uo(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 Qx(n,e){return function(...t){return La(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 a=yield Uo(n,e,t),i=yield n.signer.sendTransaction(a);return pf(n,i),i})}}function lf(n,e,t){return e.constant?yf(n,e,t):Qx(n,e)}function ff(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 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(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]}},ol=class extends bi{constructor(){super("error",null)}},Fo=class extends bi{constructor(e,t,a,i){let r={address:e},s=t.getEventTopic(a);i?(s!==i[0]&&Re.throwArgumentError("topic mismatch","topics",i),r.topics=i.slice()):r.topics=[s],super(ff(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=Yi(e.args);if(t.length)throw t[0].error;let a=(e.args||[]).slice();return a.push(e),a}},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=(a,i)=>this.interface.decodeEventLog(t.eventFragment,a,i),e.args=t.args}catch{}}},mr=class{constructor(e,t,a){B(this,"interface",ht(new.target,"getInterface")(t)),a==null?(B(this,"provider",null),B(this,"signer",null)):Pt.isSigner(a)?(B(this,"provider",a.provider||null),B(this,"signer",a)):Xt.isProvider(a)?(B(this,"provider",a),B(this,"signer",null)):Re.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]]):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(ce(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,lf(this,o,!0)),this.functions[s]==null&&B(this.functions,s,lf(this,o,!1)),this.callStatic[s]==null&&B(this.callStatic,s,yf(this,o,!0)),this.populateTransaction[s]==null&&B(this.populateTransaction,s,Jx(this,o)),this.estimateGas[s]==null&&B(this.estimateGas,s,$x(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 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=we(e||{});return["from","to"].forEach(function(a){t[a]!=null&&Re.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 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 ol);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 a=e.topics[0];if(typeof a!="string")throw new Error("invalid topic");let i=this.interface.getEvent(a);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(ff(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,a){let i=mt(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||Re.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=we(i.filter);return typeof t=="string"&&ie(t,32)?(a!=null&&Re.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 mr{},gi=class{constructor(e,t,a){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),a&&!Pt.isSigner(a)&&Re.throwArgumentError("invalid signer","signer",a),B(this,"bytecode",i),B(this,"interface",ht(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=we(e.pop());for(let a in t)if(!Kx[a])throw new Error("unknown transaction override "+a)}return["data","from","to"].forEach(a=>{t[a]!=null&&Re.throwError("cannot override "+a,E.errors.UNSUPPORTED_OPERATION,{operation:a})}),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 a=yield ss(this.signer,e,this.interface.deploy.inputs);a.push(t);let i=this.getDeployTransaction(...a),r=yield this.signer.sendTransaction(i),s=ht(this.constructor,"getContractAddress")(r),o=ht(this.constructor,"getContract")(s,this.interface,this.signer);return pf(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 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 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;)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 I=j(xa(i,n,l));r||(r=I.length,f=new Uint8Array(r),s=Math.ceil(a/r),p=a-(s-1)*r),f.set(I);for(let S=1;S=256)throw new Error("Depth too large!");return gf(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(xr,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&~br));let a=new Uint8Array(37);if(e&br){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(xa(ea.sha512,this.chainCode,a)),r=i.slice(0,32),s=i.slice(32),o=null,l=null;this.privateKey?o=jo(F.from(r).add(this.privateKey).mod(e5)):l=new bn(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(xr,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 a=this;for(let i=0;i=br)throw new Error("invalid path index - "+r);a=a._derive(br+s)}else if(r.match(/^[0-9]+$/)){let s=parseInt(r);if(s>=br)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(xa(ea.sha512,t5,a));return new It(xr,jo(i.slice(0,32)),null,"0x00000000",jo(i.slice(32)),0,0,t)}static fromMnemonic(e,t,a){return a=ll(a),e=wi(gr(e,a),a),It._fromSeed(pl(e,t),{phrase:e,path:"m",locale:a.locale})}static fromSeed(e){return It._fromSeed(e,null)}static fromExtendedKey(e){let t=ha.decode(e);(t.length!==82||gf(t.slice(0,78))!==e)&&ds.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 It(xr,null,W(o),i,s,r,a,null);case"0x0488ade4":case"0x04358394 ":if(o[0]!==0)break;return new It(xr,W(o.slice(1)),null,i,s,r,a,null)}return ds.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}};function pl(n,e){e||(e="");let t=ve("mnemonic"+e,Jt.NFKD);return Ti(ve(n,Jt.NFKD),t,2048,64,"sha512")}function gr(n,e){e=ll(e),ds.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=Tf(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 wi(n,e){if(e=ll(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]&n5(8-a)),a+=3);let i=n.length/4,r=j(en(n))[0]&Tf(i);return t[t.length-1]<<=i,t[t.length-1]|=r>>8-i,e.join(t.map(s=>e.getWord(s)))}function vf(n,e){try{return gr(n,e),!0}catch{}return!1}function wf(n){return(typeof n!="number"||n<0||n>=br||n%1)&&ds.throwArgumentError("invalid account index","index",n),`m/44'/60'/${n}'/0/0`}var _f="random/5.7.0";var yl=new E(_f);function a5(){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 kf=a5(),Ho=kf.crypto||kf.msCrypto;(!Ho||!Ho.getRandomValues)&&(yl.warn("WARNING: Missing strong random number source"),Ho={getRandomValues:function(n){return yl.throwError("no secure random source avaialble",E.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function ta(n){(n<=0||n>1024||n%1||n!=n)&&yl.throwArgumentError("invalid length","length",n);let e=new Uint8Array(n);return Ho.getRandomValues(e),j(e)}function ls(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 ml=En(cl());var qo="json-wallets/5.7.0";function ga(n){return typeof n=="string"&&n.substring(0,2)!=="0x"&&(n="0x"+n),j(n)}function Tr(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 Ta.default.Counter(x),J=new Ta.default.ModeOfOperation.ctr(O,M),$=j(J.encrypt(i)),de=fe(ye([U,$])),T={address:n.address.substring(2).toLowerCase(),id:Ef(I),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=ta(16),N=new Ta.default.Counter(R),q=new Ta.default.ModeOfOperation.ctr(H,N),se=j(q.encrypt(s)),C=new Date,u=C.getUTCFullYear()+"-"+Tr(C.getUTCMonth()+1,2)+"-"+Tr(C.getUTCDate(),2)+"T"+Tr(C.getUTCHours(),2)+"-"+Tr(C.getUTCMinutes(),2)+"-"+Tr(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:l,version:"0.1"}}return JSON.stringify(T)})}function Of(n,e,t){if(Go(n)){t&&t(0);let a=xl(n,e);return t&&t(1),Promise.resolve(a)}return zo(n)?Df(n,e,t):Promise.reject(new Error("invalid JSON wallet"))}function Bf(n,e){if(Go(n))return xl(n,e);if(zo(n))return Nf(n,e);throw new Error("invalid JSON wallet")}var Ff="wallet/5.7.0";var Lf=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},vr=new E(Ff);function u5(n){return n!=null&&ie(n.privateKey,32)&&n.address!=null}function d5(n){let e=n.mnemonic;return e&&e.phrase}var Pn=class extends Pt{constructor(e,t){if(super(),u5(e)){let a=new bn(e.privateKey);if(B(this,"_signingKey",()=>a),B(this,"address",gn(this.publicKey)),this.address!==ce(e.address)&&vr.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),d5(e)){let i=e.mnemonic;B(this,"_mnemonic",()=>({phrase:i.phrase,path:i.path||ba,locale:i.locale||"en"}));let r=this.mnemonic,s=It.fromMnemonic(r.phrase,null,r.locale).derivePath(r.path);gn(s.privateKey)!==this.address&&vr.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else B(this,"_mnemonic",()=>null)}else{if(bn.isSigningKey(e))e.curve!=="secp256k1"&&vr.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 bn(e);B(this,"_signingKey",()=>a)}B(this,"_mnemonic",()=>null),B(this,"address",gn(this.publicKey))}t&&!Xt.isProvider(t)&&vr.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 Pn(this,e)}signTransaction(e){return Se(e).then(t=>{t.from!=null&&(ce(t.from)!==this.address&&vr.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete t.from);let a=this._signingKey().signDigest(fe(rs(t)));return rs(t,a)})}signMessage(e){return Lf(this,void 0,void 0,function*(){return qr(this._signingKey().signDigest(ir(e)))})}_signTypedData(e,t,a){return Lf(this,void 0,void 0,function*(){let i=yield gt.resolveNames(e,t,a,r=>(this.provider==null&&vr.throwError("cannot resolve ENS names without a provider",E.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:r}),this.provider.resolveName(r)));return qr(this._signingKey().signDigest(gt.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={}),wl(this,e,t,a)}static createRandom(e){let t=ta(16);e||(e={}),e.extraEntropy&&(t=j(Ie(fe(ye([t,e.extraEntropy])),0,16)));let a=wi(t,e.locale);return Pn.fromMnemonic(a,e.path,e.locale)}static fromEncryptedJson(e,t,a){return Of(e,t,a).then(i=>new Pn(i))}static fromEncryptedJsonSync(e,t){return new Pn(Bf(e,t))}static fromMnemonic(e,t,a){return t||(t=ba),new Pn(It.fromMnemonic(e,null,a).derivePath(t))}};function Uf(n,e){return xi(ir(n),e)}function Vf(n,e,t,a){return xi(gt.hash(n,e,t),a)}var ia={};Wi(ia,{AlchemyProvider:()=>Mr,AlchemyWebSocketProvider:()=>ws,AnkrProvider:()=>_s,BaseProvider:()=>aa,CloudflareProvider:()=>ks,EtherscanProvider:()=>As,FallbackProvider:()=>Ms,Formatter:()=>X,InfuraProvider:()=>Ir,InfuraWebSocketProvider:()=>Is,IpcProvider:()=>Ol,JsonRpcBatchProvider:()=>ou,JsonRpcProvider:()=>tn,JsonRpcSigner:()=>Ar,NodesmithProvider:()=>Ss,PocketProvider:()=>Rs,Provider:()=>Xt,Resolver:()=>kr,StaticJsonRpcProvider:()=>vs,UrlJsonRpcProvider:()=>St,Web3Provider:()=>Ps,WebSocketProvider:()=>_a,getDefaultProvider:()=>uu,getNetwork:()=>ys,isCommunityResourcable:()=>Al,isCommunityResource:()=>ms,showThrottleMessage:()=>na});var jf="networks/5.7.1";var Hf=new E(jf);function l5(n){return n&&typeof n.renetwork=="function"}function va(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 va(t)},e}function Jo(n,e){let t=function(a,i){return a.JsonRpcProvider?new a.JsonRpcProvider(n,e):null};return t.renetwork=function(a){return Jo(n,a)},t}var qf={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:va("homestead")},Gf={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:va("ropsten")},zf={chainId:63,name:"classicMordor",_defaultProvider:Jo("https://www.ethercluster.com/mordor","classicMordor")},Ko={unspecified:{chainId:0,name:"unspecified"},homestead:qf,mainnet:qf,morden:{chainId:2,name:"morden"},ropsten:Gf,testnet:Gf,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:zf,classicTestnet:zf,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 ys(n){if(n==null)return null;if(typeof n=="number"){for(let a in Ko){let i=Ko[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=Ko[n];return a==null?null:{name:a.name,chainId:a.chainId,ensAddress:a.ensAddress,_defaultProvider:a._defaultProvider||null}}let e=Ko[n.name];if(!e)return typeof n.chainId!="number"&&Hf.throwArgumentError("invalid network chainId","network",n),n;n.chainId!==0&&n.chainId!==e.chainId&&Hf.throwArgumentError("network chainId mismatch","network",n);let t=n._defaultProvider||null;return t==null&&e._defaultProvider&&(l5(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 Wf="web/5.7.1";var p5=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})};function Kf(n,e){return p5(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 y5=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Nn=new E(Wf);function Jf(n){return new Promise(e=>{setTimeout(e,n)})}function Ua(n,e){if(n==null)return null;if(typeof n=="string")return n;if(oa(n)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return Yt(n)}catch{}return W(n)}return n}function f5(n){return ve(n.replace(/%([0-9a-f][0-9a-f])/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))}function _l(n,e,t){let a=typeof n=="object"&&n.throttleLimit!=null?n.throttleLimit:12;Nn.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;Nn.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"},f=!1,x=2*60*1e3;if(typeof n=="string")l=n;else if(typeof n=="object"){if((n==null||n.url==null)&&Nn.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&&(f=!0);if(p.allowGzip=!!n.allowGzip,n.user!=null&&n.password!=null){l.substring(0,6)!=="https:"&&n.allowInsecureAuthentication!==!0&&Nn.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 "+ar(ve(O))}}n.skipFetchSetup!=null&&(p.skipFetchSetup=!!n.skipFetchSetup),n.fetchOptions!=null&&(p.fetchOptions=we(n.fetchOptions))}let I=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),_=l?l.match(I):null;if(_)try{let O={statusCode:200,statusMessage:"OK",headers:{"content-type":_[1]||"text/plain"},body:_[2]?nr(_[3]):f5(_[3])},U=O.body;return t&&(U=t(O.body,O)),Promise.resolve(U)}catch(O){Nn.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(Nn.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 y5(this,void 0,void 0,function*(){for(let O=0;O=300)&&(S.cancel(),Nn.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){Nn.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 n=="string"?{url:n}:we(n);r.headers?Object.keys(r.headers).filter(o=>o.toLowerCase()==="content-type").length!==0||(r.headers=we(r.headers),r.headers["content-type"]="application/json"):r.headers={"content-type":"application/json"},n=r}return _l(n,i,a)}function On(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,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(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()&&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(f){s()&&a(f)})}p()})}var Il=En(Xf());var ke="providers/5.7.2";var cs=new E(ke),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),f=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(f),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=we(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():cs.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 ce(e)}callAddress(e){if(!ie(e,32))return null;let t=ce(Ie(e,12));return t===fo?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 Hn(e);throw new Error("invalid blockTag")}hash(e,t){let a=this.hex(e,t);return Ft(a)!==32?cs.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 me(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 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 a=F.from(t.root).toNumber();a===0||a===1?(t.status!=null&&t.status!==a&&cs.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=a,delete t.root):cs.throwArgumentError("invalid alt-root-status","value.root",t.root)}else t.root.length!==66&&cs.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 Al(n){return n&&typeof n.isCommunityResource=="function"}function ms(n){return Al(n)&&n.isCommunityResource()}var Zf=!1;function na(){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(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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},he=new E(ke),v5=10;function ec(n){return n==null?"null":(Ft(n)!==32&&he.throwArgumentError("invalid topic","topic",n),n.toLowerCase())}function tc(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[ec(i)]=!0});let a=Object.keys(t);return a.sort(),a.join("|")}else return ec(e)}).join("&")}function w5(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 _r(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:*:"+tc(n);if(ko.isForkEvent(n))throw he.warn("not implemented"),new Error("not implemented");if(n&&typeof n=="object")return"filter:"+(n.address||"*")+":"+tc(n.topics||[])}throw new Error("invalid event - "+n)}function hs(){return new Date().getTime()}function nc(n){return new Promise(e=>{setTimeout(e,n)})}var _5=["block","network","pending","poll"],Sl=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=w5(e[2]),i={};return a.length>0&&(i.topics=a),t&&t!=="*"&&(i.address=t),i}pollable(){return this.tag.indexOf(":")>=0||_5.indexOf(this.tag)>=0}},k5={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(n){return me(F.from(n).toHexString(),32)}function ac(n){return ha.encode(ye([n,Ie(en(en(n)),0,4)]))}var sc=new RegExp("^(ipfs)://(.*)$","i"),ic=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),sc,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Xo(n,e){try{return Yt(xs(n,e))}catch{}return null}function xs(n,e){if(n==="0x")return null;let t=F.from(Ie(n,e,e+32)).toNumber(),a=F.from(Ie(n,t,t+32)).toNumber();return Ie(n,t+32,t+32+a)}function Ml(n){return n.match(/^ipfs:\/\/ipfs\//i)?n=n.substring(12):n.match(/^ipfs:\/\//i)?n=n.substring(7):he.throwArgumentError("unsupported IPFS format","link",n),`https://gateway.ipfs.io/ipfs/${n}`}function rc(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 A5(n){if(n.length%32===0)return n;let e=new Uint8Array(Math.ceil(n.length/32)*32);return e.set(n),e}function oc(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:kt([e,Na(this.name),t||"0x"])},i=!1;(yield this.supportsWildcard())&&(i=!0,a.data=kt(["0x9061b923",oc([ts(this.name),a.data])]));try{let r=yield this.provider.call(a);return j(r).length%32===4&&he.throwError("resolver threw error",E.errors.CALL_EXCEPTION,{transaction:a,data:r}),i&&(r=xs(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?xs(a,0):null})}_getAddress(e,t){let a=k5[String(e)];if(a==null&&he.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 ac(ye([[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 ac(ye([[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=Il.default.toWords(i.slice(2));return o.unshift(s),Il.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===er?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 a=this._getAddress(e,t);return a==null&&he.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 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 a=yield this._fetchBytes("0x59d1d43c",W(t));return a==null||a==="0x"?null:Yt(a)})}},Cl=null,E5=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 On(()=>this._ready().then(e=>e,e=>{if(!(e.code===E.errors.NETWORK_ERROR&&e.event==="noNetwork"))throw e}))}static getFormatter(){return Cl==null&&(Cl=new X),Cl}static getNetwork(e){return ys(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 Dn({url:p,errorPassThrough:!0},f,(_,v)=>(_.status=v.statusCode,_));if(x.data)return x.data;let I=x.message||"unknown error";if(x.status>=400&&x.status<500)return he.throwError(`response not found during CCIP fetch: ${I}`,E.errors.SERVER_ERROR,{url:l,errorMessage:I});s.push(I)}return he.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(hs()-r.respTime<=e)return r.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}let t=hs(),a=Se({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=hs();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=E5++,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)he.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${a})`),this.emit("error",he.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 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 nc(0),this._network;let a=he.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=hs();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,f=function(){return p?!0:(p=!0,l.forEach(I=>{I()}),!1)},x=I=>{I.confirmations{this.removeListener(e,x)}),i){let I=i.startBlock,_=null,v=S=>ue(this,void 0,void 0,function*(){p||(yield nc(1e3),this.getTransactionCount(i.from).then(L=>ue(this,void 0,void 0,function*(){if(!p){if(L<=i.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),l.push(()=>{this.removeListener("block",v)})}if(typeof a=="number"&&a>0){let I=setTimeout(()=>{f()||o(he.makeError("timeout exceeded",E.errors.TIMEOUT,{timeout:a}))},a);I.unref&&I.unref(),l.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",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 Se({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getBalance",a);try{return F.from(i)}catch(r){return he.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 Se({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getTransactionCount",a);try{return F.from(i).toNumber()}catch(r){return he.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 Se({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getCode",a);try{return W(i)}catch(r){return he.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 Se({address:this._getAddress(e),blockTag:this._getBlockTag(a),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,a){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&&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&&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)),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 Se(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 Se(t))})}_call(e,t,a){return ue(this,void 0,void 0,function*(){a>=v5&&he.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=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&&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 On(()=>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 On(()=>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 Se({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&&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 a=yield this._getResolver(t,"getResolver");if(a!=null){let i=new kr(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||he.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"+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(a){if(ie(e))throw a}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",a=yield this._getResolver(t,"lookupAddress");if(a==null)return null;let i=Xo(yield this.call({to:a,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 kr(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 a=yield t.getAvatar();return a==null?null:a.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,a){let i=new Sl(_r(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=_r(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=_r(e);return this._events.filter(a=>a.tag===t).length}listeners(e){if(e==null)return this._events.map(a=>a.listener);let t=_r(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=_r(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=_r(e);this._events=this._events.filter(i=>i.tag!==a?!0:(t.push(i),!1))}return t.forEach(a=>{this._stopEvent(a)}),this}};var wa=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Et=new E(ke),M5=["call","estimateGas"];function gs(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=gs(n[t],e);if(a)return a}return null}if(typeof n=="string")try{return gs(JSON.parse(n),e)}catch{}return null}function dc(n,e,t){let a=t.transaction||t.signedTransaction;if(n==="call"){let r=gs(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:a,error:e})}if(n==="estimateGas"){let r=gs(e.body,!1);r==null&&(r=gs(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: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)&&Et.throwError("insufficient funds for intrinsic transaction cost",E.errors.INSUFFICIENT_FUNDS,{error:e,method:n,transaction:a}),i.match(/nonce (is )?too low/i)&&Et.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)&&Et.throwError("replacement fee too low",E.errors.REPLACEMENT_UNDERPRICED,{error:e,method:n,transaction:a}),i.match(/only replay-protected/i)&&Et.throwError("legacy pre-eip-155 transactions not supported",E.errors.UNSUPPORTED_OPERATION,{error:e,method:n,transaction:a}),M5.indexOf(n)>=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:n,transaction:a}),e}function uc(n){return new Promise(function(e){setTimeout(e,n)})}function C5(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 bs(n){return n&&n.toLowerCase()}var Rl={},Ar=class extends Pt{constructor(e,t,a){if(super(),e!==Rl)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)):Et.throwArgumentError("invalid address or index","addressOrIndex",a)}connect(e){return Et.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&&Et.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(a=>(a&&(a=a.toLowerCase()),a));if(e.gasLimit==null){let a=we(e);a.from=t,e.gasLimit=this.provider.estimateGas(a)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(a=>wa(this,void 0,void 0,function*(){if(a==null)return null;let i=yield this.provider.resolveName(a);return i==null&&Et.throwArgumentError("provided ENS name resolves to null","tx.to",a),i}))),Se({tx:Se(e),sender:t}).then(({tx:a,sender:i})=>{a.from!=null?a.from.toLowerCase()!==i&&Et.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)&&Et.throwError("user rejected transaction",E.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:a}),dc("sendTransaction",s,r)))})}signTransaction(e){return Et.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),a=yield this.sendUncheckedTransaction(e);try{return yield On(()=>wa(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 wa(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(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)&&Et.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"signMessage",from:a,messageData:e}),i}})}_legacySignMessage(e){return wa(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(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)&&Et.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:a,messageData:e}),i}})}_signTypedData(e,t,a){return wa(this,void 0,void 0,function*(){let i=yield gt.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(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 wa(this,void 0,void 0,function*(){let t=this.provider,a=yield this.getAddress();return t.send("personal_unlockAccount",[a.toLowerCase(),e,null])})}},Pl=class extends Ar{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)}))}},I5={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 a=t;a==null&&(a=new Promise((i,r)=>{setTimeout(()=>{this.detectNetwork().then(s=>{i(s)},s=>{r(s)})},0)})),super(a),e||(e=ht(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 wa(this,void 0,void 0,function*(){yield uc(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(a){return Et.throwError("could not detect network",E.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:a})}}return Et.throwError("could not detect network",E.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new Ar(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 a={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:mt(a),provider:this});let i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];let r=Dn(this.connection,JSON.stringify(a),C5).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",[bs(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[bs(t.address),t.blockTag]];case"getCode":return["eth_getCode",[bs(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[bs(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 a=ht(this.constructor,"hexlifyTransaction");return["eth_call",[a(t.transaction,{from:!0}),t.blockTag]]}case"estimateGas":{let a=ht(this.constructor,"hexlifyTransaction");return["eth_estimateGas",[a(t.transaction,{from:!0})]]}case"getLogs":return t.filter&&t.filter.address!=null&&(t.filter.address=bs(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=we(t),t.transaction=we(i),delete t.transaction.type)}}let a=this.prepareRequest(e,t);a==null&&Et.throwError(e+" not implemented",E.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(a[0],a[1])}catch(i){return dc(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 uc(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=we(I5);if(t)for(let r in t)t[r]&&(a[r]=!0);$i(e,a);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 Er=null;try{if(Er=WebSocket,Er==null)throw new Error("inject please")}catch{let e=new E(ke);Er=function(){e.throwError("WebSockets not supported in this environment",E.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var Nl=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Zo=new E(ke),S5=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 Er(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){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 a=S5++;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 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: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 Nl(this,void 0,void 0,function*(){this.websocket.readyState===Er.CONNECTING&&(yield new Promise(e=>{this.websocket.onopen=function(){e(!0)},this.websocket.onerror=function(){e(!1)}})),this.websocket.close(1e3)})}};var R5=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Ts=new E(ke),vs=class extends tn{detectNetwork(){let e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return R5(this,void 0,void 0,function*(){let t=this.network;return t==null&&(t=yield e.detectNetwork.call(this),t||Ts.throwError("no network detected",E.errors.UNKNOWN_ERROR,{}),this._network==null&&(B(this,"_network",t),this.emit("network",t,null))),t})}},St=class extends vs{constructor(e,t){Ts.checkAbstract(new.target,St),e=ht(new.target,"getNetwork")(e),t=ht(new.target,"getApiKey")(t);let a=ht(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(){Ts.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(e){return Ts.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 Ts.throwError("not implemented; sub-classes must override getUrl",E.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}};var lc=new E(ke),eu="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC",ws=class extends _a{constructor(e,t){let a=new Mr(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===eu}},Mr=class extends St{static getWebSocketProvider(e,t){return new ws(e,t)}static getApiKey(e){return e==null?eu:(e&&typeof e!="string"&&lc.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:lc.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+a+t,throttleCallback:(i,r)=>(t===eu&&na(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===eu}};var P5=new E(ke),tu="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function N5(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 P5.throwArgumentError("unsupported network","name",n)}var _s=class extends St{isCommunityResource(){return this.apiKey===tu}static getApiKey(e){return e??tu}static getUrl(e,t){t==null&&(t=tu);let a={allowGzip:!0,url:"https://"+N5(e.name)+t,throttleCallback:(i,r)=>(t.apiKey===tu&&na(),Promise.resolve(!0))};return t.projectSecret!=null&&(a.user="",a.password=t.projectSecret),a}};var D5=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},pc=new E(ke),ks=class extends St{static getApiKey(e){return e!=null&&pc.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:pc.throwArgumentError("unsupported network","network",arguments[0])}return a}perform(e,t){let a=Object.create(null,{perform:{get:()=>super.perform}});return D5(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 nu=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Va=new E(ke);function yc(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=Hn(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 O5(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 fc(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 cc(n){if(n==="pending")throw new Error("pending not supported");return n==="latest"?n:parseInt(n.substring(2),16)}function Dl(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;Va.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/)&&Va.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/)&&Va.throwError("nonce has already been used",E.errors.NONCE_EXPIRED,{error:e,method:n,transaction:t}),a.match(/another transaction with same nonce/)&&Va.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/)&&Va.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 As=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 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 nu(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"?fc:O5;this.emit("debug",{action:"request",request:i,provider:this});let o={url:i,throttleSlotInterval:1e3,throttleCallback:(f,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(f=>`${f}=${r[f]}`).join("&"));let p=yield Dn(o,l,s||fc);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 a=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=yc(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=yc(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=cc(t.filter.fromBlock)),t.filter.toBlock&&(i.toBlock=cc(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(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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},_i=new E(ke);function au(){return new Date().getTime()}function mc(n){let e=null;for(let t=0;te?null:(a+i)/2}function Cr(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=>Cr(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=Cr(a),JSON.stringify(t)+":"+a}).join(",")+"}"}throw new Error("unknown value type: "+typeof n)}var B5=1;function xc(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 F5=[E.errors.CALL_EXCEPTION,E.errors.INSUFFICIENT_FUNDS,E.errors.NONCE_EXPIRED,E.errors.REPLACEMENT_UNDERPRICED,E.errors.UNPREDICTABLE_GAS_LIMIT],L5=["address","args","errorArgs","errorSignature","method","transaction"];function iu(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 U5(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 V5(n,e,t){let a=Cr;switch(e){case"getBlockNumber":return function(i){let r=i.map(o=>o.result),s=hc(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 hc(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=we(i),i.confirmations=-1,Cr(i))};break;case"getBlock":t.includeTransactions?a=function(i){return i==null?null:(i=we(i),i.transactions=i.transactions.map(r=>(r=we(r),r.confirmations=-1,r)),Cr(i))}:a=function(i){return i==null?null:Cr(i)};break;default:throw new Error("unknown method: "+e)}return U5(a,n.quorum)}function Es(n,e){return ru(this,void 0,void 0,function*(){let t=n.provider;return t.blockNumber!=null&&t.blockNumber>=e||e===-1?t:On(()=>new Promise((a,i)=>{setTimeout(function(){return t.blockNumber>=e?a(t):n.cancelled?a(null):a(void 0)},0)}),{oncePoll:t})})}function j5(n,e,t,a){return ru(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 Es(n,e)),i[t](a.address,a.blockTag||"latest");case"getStorageAt":return a.blockTag&&ie(a.blockTag)&&(i=yield Es(n,e)),i.getStorageAt(a.address,a.position,a.blockTag||"latest");case"getBlock":return a.blockTag&&ie(a.blockTag)&&(i=yield Es(n,e)),i[a.includeTransactions?"getBlockWithTransactions":"getBlock"](a.blockTag||a.blockHash);case"call":case"estimateGas":return a.blockTag&&ie(a.blockTag)&&(i=yield Es(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 Es(n,e)),i.getLogs(r)}}return _i.throwError("unknown method error",E.errors.UNKNOWN_ERROR,{method:t,params:a})})}var Ms=class extends aa{constructor(e,t){e.length===0&&_i.throwArgumentError("missing providers","providers",e);let a=e.map((s,o)=>{if(Xt.isProvider(s)){let f=ms(s)?2e3:750;return Object.freeze({provider:s,weight:1,stallTimeout:f,priority:1})}let l=we(s);l.priority==null&&(l.priority=1),l.stallTimeout==null&&(l.stallTimeout=ms(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=a.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=mc(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 ru(this,void 0,void 0,function*(){let e=yield Promise.all(this.providerConfigs.map(t=>t.provider.getNetwork()));return mc(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(f=>f.hash,f=>f)));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=j5(_,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 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 _=a(x);if(_!==void 0)return i.forEach(v=>{v.staller&&v.staller.cancel(),v.cancelled=!0}),_;o||(yield xc(100).getPromise()),o=!1}let I=i.reduce((_,v)=>{if(!v.done||v.error==null)return _;let S=v.error.code;return F5.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={};L5.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(ke),Cs="84842078b09946638c03157f83405213",Is=class extends _a{constructor(e,t){let a=new Ir(e,t),i=a.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",a.projectId),B(this,"projectId",a.projectId),B(this,"projectSecret",a.projectSecret)}isCommunityResource(){return this.projectId===Cs}},Ir=class extends St{static getWebSocketProvider(e,t){return new Is(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 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:su.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===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 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:mt(o),provider:this}),Dn(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 I=new Error(x.error.message);I.code=x.error.code,I.data=x.error.data,p.reject(I)}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(ke),H5="ETHERS_JS_SHARED",Ss=class extends St{static getApiKey(e){return e&&typeof e!="string"&&Bl.throwArgumentError("invalid apiKey","apiKey",e),e||H5}static getUrl(e,t){Bl.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:Bl.throwArgumentError("unsupported network","network",arguments[0])}return a+"?apiKey="+t}};var bc=new E(ke),gc="62e1ad51b37b8e00394bda3b",Rs=class extends St{static getApiKey(e){let t={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return e==null?t.applicationId=gc:typeof e=="string"?t.applicationId=e:e.applicationSecretKey!=null?(t.applicationId=e.applicationId,t.applicationSecretKey=e.applicationSecretKey):e.applicationId?t.applicationId=e.applicationId:bc.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:bc.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===gc}};var Tc=new E(ke),q5=1;function vc(n,e){let t="Web3LegacyFetcher";return function(a,i){let r={method:a,params:i,id:q5++,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 G5(n){return function(e,t){t==null&&(t=[]);let a={method:e,params:t};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:mt(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 Ps=class extends tn{constructor(e,t){e==null&&Tc.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=G5(e)):e.sendAsync?i=vc(e,e.sendAsync.bind(e)):e.send?i=vc(e,e.send.bind(e)):Tc.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 wc=new E(ke);function uu(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 _a(n);default:wc.throwArgumentError("unsupported URL scheme","network",n)}}let t=ys(n);return(!t||!t._defaultProvider)&&wc.throwError("unsupported getDefaultProvider network",E.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:n}),t._defaultProvider({FallbackProvider:Ms,AlchemyProvider:Mr,AnkrProvider:_s,CloudflareProvider:ks,EtherscanProvider:As,InfuraProvider:Ir,JsonRpcProvider:tn,NodesmithProvider:Ss,PocketProvider:Rs,Web3Provider:Ps,IpcProvider:null},e)}var te={};Wi(te,{AbiCoder:()=>tr,ConstructorFragment:()=>Lt,ErrorFragment:()=>rn,EventFragment:()=>Wt,FormatTypes:()=>ge,Fragment:()=>Kt,FunctionFragment:()=>Ut,HDNode:()=>It,Indexed:()=>pa,Interface:()=>Da,LogDescription:()=>rr,Logger:()=>E,ParamType:()=>yt,RLP:()=>io,SigningKey:()=>bn,SupportedAlgorithm:()=>ea,TransactionDescription:()=>sr,TransactionTypes:()=>Do,UnicodeNormalizationForm:()=>Jt,Utf8ErrorFuncs:()=>bo,Utf8ErrorReason:()=>Vt,_TypedDataEncoder:()=>gt,_fetchData:()=>_l,_toEscapedUtf8String:()=>Cd,accessListify:()=>dn,arrayify:()=>j,base58:()=>ha,base64:()=>Dd,checkProperties:()=>$i,checkResultErrors:()=>Yi,commify:()=>Sc,computeAddress:()=>gn,computeHmac:()=>xa,computePublicKey:()=>is,concat:()=>ye,deepCopy:()=>mt,defaultAbiCoder:()=>Zr,defaultPath:()=>ba,defineReadOnly:()=>B,dnsEncode:()=>ts,entropyToMnemonic:()=>wi,fetchJson:()=>Dn,formatBytes32String:()=>Id,formatEther:()=>Rc,formatUnits:()=>Fl,getAccountPath:()=>wf,getAddress:()=>ce,getContractAddress:()=>fi,getCreate2Address:()=>Oy,getIcapAddress:()=>Dy,getJsonWalletAddress:()=>bl,getStatic:()=>ht,hashMessage:()=>ir,hexConcat:()=>kt,hexDataLength:()=>Ft,hexDataSlice:()=>Ie,hexStripZeros:()=>xd,hexValue:()=>Hn,hexZeroPad:()=>me,hexlify:()=>W,id:()=>sn,isAddress:()=>Ny,isBytes:()=>pn,isBytesLike:()=>oa,isHexString:()=>ie,isValidMnemonic:()=>vf,isValidName:()=>Bd,joinSignature:()=>qr,keccak256:()=>fe,mnemonicToEntropy:()=>gr,mnemonicToSeed:()=>pl,namehash:()=>Na,nameprep:()=>Nd,parseBytes32String:()=>Sd,parseEther:()=>Pc,parseTransaction:()=>Oo,parseUnits:()=>Ll,poll:()=>On,randomBytes:()=>ta,recoverAddress:()=>xi,recoverPublicKey:()=>No,resolveProperties:()=>Se,ripemd160:()=>os,serializeTransaction:()=>rs,sha256:()=>en,sha512:()=>ol,shallowCopy:()=>we,shuffled:()=>ls,solidityKeccak256:()=>Ac,solidityPack:()=>du,soliditySha256:()=>Ec,splitSignature:()=>qn,stripZeros:()=>nn,toUtf8Bytes:()=>ve,toUtf8CodePoints:()=>Pa,toUtf8String:()=>Yt,verifyMessage:()=>Uf,verifyTypedData:()=>Vf,zeroPad:()=>di});var _c="solidity/5.7.0";var z5=new RegExp("^bytes([0-9]+)$"),W5=new RegExp("^(u?int)([0-9]*)$"),K5=new RegExp("^(.*)\\[([0-9]*)\\]$"),J5="0000000000000000000000000000000000000000000000000000000000000000",Sr=new E(_c);function kc(n,e,t){switch(n){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 a=n.match(W5);if(a){let i=parseInt(a[2]||"256");return(a[2]&&String(i)!==a[2]||i%8!==0||i===0||i>256)&&Sr.throwArgumentError("invalid number type","type",n),t&&(i=256),e=F.from(e).toTwos(i),di(e,i/8)}if(a=n.match(z5),a){let i=parseInt(a[1]);return(String(i)!==a[1]||i===0||i>32)&&Sr.throwArgumentError("invalid bytes type","type",n),j(e).byteLength!==i&&Sr.throwArgumentError(`invalid value for ${n}`,"value",e),t?j((e+J5).substring(0,66)):e}if(a=n.match(K5),a&&Array.isArray(e)){let i=a[1];parseInt(a[2]||String(e.length))!=e.length&&Sr.throwArgumentError(`invalid array length for ${n}`,"value",e);let s=[];return e.forEach(function(o){s.push(kc(i,o,!0))}),ye(s)}return Sr.throwArgumentError("invalid type","type",n)}function du(n,e){n.length!=e.length&&Sr.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);let t=[];return n.forEach(function(a,i){t.push(kc(a,e[i]))}),W(ye(t))}function Ac(n,e){return fe(du(n,e))}function Ec(n,e){return en(du(n,e))}var Mc="units/5.7.0";var Cc=new E(Mc),Ic=["wei","kwei","mwei","gwei","szabo","finney","ether"];function Sc(n){let e=String(n).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||n==="."||n==="-.")&&Cc.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 Fl(n,e){if(typeof e=="string"){let t=Ic.indexOf(e);t!==-1&&(e=3*t)}return Ji(n,e??18)}function Ll(n,e){if(typeof n!="string"&&Cc.throwArgumentError("value must be a string","value",n),typeof e=="string"){let t=Ic.indexOf(e);t!==-1&&(e=3*t)}return fn(n,e??18)}function Rc(n){return Fl(n,18)}function Pc(n){return Ll(n,18)}var lu="ethers/5.7.2";var Nc=new E(lu);try{let n=window;n._ethers==null&&(n._ethers=Ul)}catch{}var Bn;(function(n){n.Mainnet="Mainnet",n.Custom="Custom",n.Gnosis="Xdai",n.Goerli="Goerli",n.Xdai="Xdai",n.XdaiQa="XdaiQa",n.ArbitrumOne="ArbitrumOne",n.ArbitrumSepolia="ArbitrumSepolia"})(Bn||(Bn={}));var Dc;(function(n){n[n.Custom=0]="Custom",n[n.Mainnet=1]="Mainnet",n[n.Goerli=5]="Goerli",n[n.Gnosis=100]="Gnosis",n[n.Xdai=100]="Xdai",n[n.XdaiQa=100]="XdaiQa",n[n.ArbitrumSepolia=421614]="ArbitrumSepolia",n[n.ArbitrumOne=42161]="ArbitrumOne"})(Dc||(Dc={}));var pu;(function(n){n.Mainnet="0x5346D0f80e2816FaD329F2c140c870ffc3c3E2Ef",n.Goerli="0x79073fc2117dD054FCEdaCad1E7018C9CbE3ec0B",n.Xdai="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.XdaiQa="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.Custom="",n.ArbitrumOne="0xcccccdcc0ccf6c708d860e19353c5f9a49accccc",n.ArbitrumSepolia="0x7777494e3d8cce0D3570E21FEf820F9Fee077777"})(pu||(pu={}));var Rr;(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",n.ArbitrumOne="https://app.colony.io/reputation/arbitrum-one",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/reputation/arbitrum-sepolia"})(Rr||(Rr={}));var yu;(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="",n.ArbitrumOne="https://app.colony.io/metatransaction/arbitrum-one",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/metatransaction/arbitrum-sepolia"})(yu||(yu={}));var Vl;(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="",n.ArbitrumOne="https://app.colony.io/public-rpc/",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/public-rpc/"})(Vl||(Vl={}));var Ns;(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",n.ArbitrumOne=".colony.joincolony.arbitrum",n.ArbitrumSepolia=".colony.joincolony.sepolia"})(Ns||(Ns={}));var Ds;(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",n.ArbitrumOne=".user.joincolony.arbitrum",n.ArbitrumSepolia=".user.joincolony.sepolia"})(Ds||(Ds={}));var jl;(function(n){let e;(function(i){i.ETH="0x0000000000000000000000000000000000000000",i.CLNY="0x3E828ac5C480069D4765654Fb4b8733b910b13b2",i.USDC="0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"})(e=n.Mainnet||(n.Mainnet={}));let t;(function(i){i.XDAI="0x0000000000000000000000000000000000000000",i.CLNY="0xc9B6218AffE8Aba68a13899Cbf7cF7f14DDd304C",i.USDC="0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83"})(t=n.Gnosis||(n.Gnosis={}));let a;(function(i){i.ETH="0x0000000000000000000000000000000000000000",i.CLNY="0xcccccdcc0ccf6c708d860e19353c5f9a49accccc",i.USDC="0xaf88d065e77c8cC2239327C5EDb3A432268e5831"})(a=n.ArbitrumOne||(n.ArbitrumOne={}))})(jl||(jl={}));var _e;(function(n){n[n.RootDomain=1]="RootDomain",n[n.RootTeam=1]="RootTeam",n[n.RootPot=1]="RootPot",n[n.SkillIgnore=0]="SkillIgnore"})(_e||(_e={}));var Ot;(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"})(Ot||(Ot={}));var ql="0x12345678",Hl;(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"})(Hl||(Hl={}));var wt;(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"})(wt||(wt={}));var Ae;(function(n){n.FundingQueue="FundingQueue",n.IVotingReputation="IVotingReputation",n.MultisigPermissions="MultisigPermissions",n.OneTxPayment="OneTxPayment",n.ReputationBootstrapper="ReputationBootstrapper",n.StagedExpenditure="StagedExpenditure",n.StakedExpenditure="StakedExpenditure",n.StreamingPayments="StreamingPayments",n.TokenSupplier="TokenSupplier",n.VotingReputation="VotingReputation"})(Ae||(Ae={}));var Gl=[{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(Gl)}static connect(e,t){return new oe(e,Gl,t)}};xe(ki,"abi",Gl);var zl=[{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"}],Ai=class{static createInterface(){return new te.Interface(zl)}static connect(e,t){return new oe(e,zl,t)}};xe(Ai,"abi",zl);var Oc=(n,e)=>{throw new Error(`${e}: ${n}`)},Wl=n=>n!=null;var{keccak256:Q5,toUtf8Bytes:Y5}=te,{MaxUint256:X5}=xt;var Pr=n=>te.formatEther(n),Nr=n=>te.parseEther(n);var Kl=n=>{let e=n.reduce((t,a)=>t|1<{let e=F.from(n);return[...Array(wt.LAST_ROLE).keys()].map(t=>e.shr(t).mask(1).eq(1)?t:null).filter(Wl)},Ei=async(n,e,t,a)=>{if(F.from(t).eq(F.from(a)))return X5;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)},ja=n=>Q5(Y5(n));var Dr=async(n,e)=>(await Ai.connect(n,e).version()).toNumber(),Jl=(n,e)=>n.map(t=>{try{return e.parseLog(t)}catch{return null}}).filter(Wl);var{hexDataSlice:$l}=te,{MaxUint256:Z5}=xt,Bc=n=>{let e=$l(n,0,3),t=F.from($l(n,4,35)),a=F.from($l(n,36,67));return{sig:e,permissionDomainId:t,childSkillIndex:a}},Fc=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),Z5,r];let o=F.from(_e.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 Ei(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]},eb=async(n,e,t,a,i)=>{let r=await Promise.all(a.map(s=>Fc(n,e,t,s,i)));for(let s=0;sArray.isArray(a)?a.length===1?ra(n,e,t,a[0],i):eb(n,e,t,a,i):Fc(n,e,t,a,i);var{MaxUint256:Lc}=xt,{AddressZero:tb}=xt;async function nb(n,e){let t;try{return t=await n.getCapabilityRoles(te.hexZeroPad(e,4)),fu(t)}catch{return[]}}async function Os(n,e,t,a,i,r,s){let o,{skillId:l}=await e.getDomain(i),{sig:p,permissionDomainId:f,childSkillIndex:x}=Bc(s),I=ki.connect(r,a.signer||a.provider),_=await nb(I,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 ${_e.RootDomain}`);o=Lc}else{let{skillId:U}=await e.getDomain(f),H=await n.getChildSkillId(U,x);if(H.eq(l))o=Lc;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,tb);return{actionCid:o,key:v,value:S,branchMask:L,siblings:O}}var{AddressZero:ab}=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,a){this.colony=t,this.network=e;let i=a?.network||Bn.ArbitrumOne;this.endpointUrl=a?.customEndpointUrl||Rr[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 sa.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 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 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 a=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${a}/${i}`;return sa.fetchReputation(r)}async getTotalReputation(e,t){let a=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${a}/${i}/${ab}/noProof`,s=await sa.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 Mt=n=>Array.from(Array(n-1)).map((e,t)=>t+1);var Uc=10,Hk=Mt(Uc),Vc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},jc=Uc-1;var Hc=3,zk=Mt(Hc),qc={1:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],2:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]},Gc=Hc-1;var zc=10,Jk=Mt(zc),Wc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Kc=zc-1;var Jc=7,Yk=Mt(Jc),$c={1:[],2:[],3:[],4:[],5:[],6:[]},Qc=Jc-1;var Yc=8,eA=Mt(Yc),Xc={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3],6:[1,2,3],7:[1,2,3]},Zc=Yc-1;var em=5,aA=Mt(em),tm={1:[1,2,3,4,5,6,7,8,9,10,11,12,13],2:[1,2,3,4,5,6,7,8,9,10,11,12,13],3:[1,2,3,4,5,6,7,8,9,10,11,12,13],4:[1,2,3,4,5,6,7,8,9,10,11,12,13]},nm=em-1;var am=7,sA=Mt(am),im={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3],6:[1,2,3]},rm=am-1;var sm=10,dA=Mt(sm),om={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},um=sm-1;var dm=14,yA=Mt(dm),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],11:[1,2,3,4,5,6],12:[1,2,3,4,5,6],13:[1,2,3,4,5,6]},Yl=dm-1;var lm=18,ib=Mt(lm),mA=lm-1;var rb=(n,e)=>{switch(n){case Ae.FundingQueue:return Vc[e];case Ae.IVotingReputation:return Ql[e];case Ae.MultisigPermissions:return qc[e];case Ae.OneTxPayment:return Wc[e];case Ae.ReputationBootstrapper:return $c[e];case Ae.StagedExpenditure:return tm[e];case Ae.StakedExpenditure:return Xc[e];case Ae.StreamingPayments:return im[e];case Ae.TokenSupplier:return om[e];case Ae.VotingReputation:return Ql[e];default:return Oc(n,"Could not find extension with name")}},Mi=(n,e,t)=>{let a=rb(n,e);return!!a&&!a.includes(t)};var sb={[Ae.FundingQueue]:jc,[Ae.IVotingReputation]:Yl,[Ae.MultisigPermissions]:Gc,[Ae.OneTxPayment]:Kc,[Ae.ReputationBootstrapper]:Qc,[Ae.StagedExpenditure]:nm,[Ae.StakedExpenditure]:Zc,[Ae.StreamingPayments]:rm,[Ae.TokenSupplier]:um,[Ae.VotingReputation]:Yl};var P6=En(pm(),1);var gp=En(I6(),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 bp=2,xp;(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"})(xp||(xp={}));var S6=n=>`Validation error(s): +`)}static register(e,t){if(t||(t=e.locale),Xx)try{let a=window;a._ethers&&a._ethers.wordlists&&(a._ethers.wordlists[t]||B(a._ethers.wordlists,t,e))}catch{}}};var Zx="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo",us=null;function xf(n){if(us==null&&(us=Zx.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),Tn.check(n)!=="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"))throw us=null,new Error("BIP39 Wordlist for en (English) FAILED")}var dl=class extends Tn{constructor(){super("en")}getWord(e){return xf(this),us[e]}getWordIndex(e){return xf(this),us.indexOf(e)}},ll=new dl;Tn.register(ll);var vi={en:ll};var bf="hdnode/5.7.0";var ds=new E(bf),e5=F.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),t5=ve("Bitcoin seed"),br=2147483648;function Tf(n){return(1<=256)throw new Error("Depth too large!");return gf(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(xr,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&~br));let a=new Uint8Array(37);if(e&br){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(xa(ea.sha512,this.chainCode,a)),r=i.slice(0,32),s=i.slice(32),o=null,l=null;this.privateKey?o=jo(F.from(r).add(this.privateKey).mod(e5)):l=new bn(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(xr,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 a=this;for(let i=0;i=br)throw new Error("invalid path index - "+r);a=a._derive(br+s)}else if(r.match(/^[0-9]+$/)){let s=parseInt(r);if(s>=br)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(xa(ea.sha512,t5,a));return new It(xr,jo(i.slice(0,32)),null,"0x00000000",jo(i.slice(32)),0,0,t)}static fromMnemonic(e,t,a){return a=pl(a),e=wi(gr(e,a),a),It._fromSeed(yl(e,t),{phrase:e,path:"m",locale:a.locale})}static fromSeed(e){return It._fromSeed(e,null)}static fromExtendedKey(e){let t=ha.decode(e);(t.length!==82||gf(t.slice(0,78))!==e)&&ds.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 It(xr,null,W(o),i,s,r,a,null);case"0x0488ade4":case"0x04358394 ":if(o[0]!==0)break;return new It(xr,W(o.slice(1)),null,i,s,r,a,null)}return ds.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}};function yl(n,e){e||(e="");let t=ve("mnemonic"+e,Jt.NFKD);return Ti(ve(n,Jt.NFKD),t,2048,64,"sha512")}function gr(n,e){e=pl(e),ds.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=Tf(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 wi(n,e){if(e=pl(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]&n5(8-a)),a+=3);let i=n.length/4,r=j(en(n))[0]&Tf(i);return t[t.length-1]<<=i,t[t.length-1]|=r>>8-i,e.join(t.map(s=>e.getWord(s)))}function vf(n,e){try{return gr(n,e),!0}catch{}return!1}function wf(n){return(typeof n!="number"||n<0||n>=br||n%1)&&ds.throwArgumentError("invalid account index","index",n),`m/44'/60'/${n}'/0/0`}var _f="random/5.7.0";var fl=new E(_f);function a5(){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 kf=a5(),Ho=kf.crypto||kf.msCrypto;(!Ho||!Ho.getRandomValues)&&(fl.warn("WARNING: Missing strong random number source"),Ho={getRandomValues:function(n){return fl.throwError("no secure random source avaialble",E.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function ta(n){(n<=0||n>1024||n%1||n!=n)&&fl.throwArgumentError("invalid length","length",n);let e=new Uint8Array(n);return Ho.getRandomValues(e),j(e)}function ls(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 hl=En(ml());var qo="json-wallets/5.7.0";function ga(n){return typeof n=="string"&&n.substring(0,2)!=="0x"&&(n="0x"+n),j(n)}function Tr(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 Ta.default.Counter(x),J=new Ta.default.ModeOfOperation.ctr(O,M),$=j(J.encrypt(i)),de=fe(ye([U,$])),T={address:n.address.substring(2).toLowerCase(),id:Ef(I),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=ta(16),N=new Ta.default.Counter(R),q=new Ta.default.ModeOfOperation.ctr(H,N),se=j(q.encrypt(s)),C=new Date,u=C.getUTCFullYear()+"-"+Tr(C.getUTCMonth()+1,2)+"-"+Tr(C.getUTCDate(),2)+"T"+Tr(C.getUTCHours(),2)+"-"+Tr(C.getUTCMinutes(),2)+"-"+Tr(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:l,version:"0.1"}}return JSON.stringify(T)})}function Of(n,e,t){if(Go(n)){t&&t(0);let a=bl(n,e);return t&&t(1),Promise.resolve(a)}return zo(n)?Df(n,e,t):Promise.reject(new Error("invalid JSON wallet"))}function Bf(n,e){if(Go(n))return bl(n,e);if(zo(n))return Nf(n,e);throw new Error("invalid JSON wallet")}var Ff="wallet/5.7.0";var Lf=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},vr=new E(Ff);function u5(n){return n!=null&&ie(n.privateKey,32)&&n.address!=null}function d5(n){let e=n.mnemonic;return e&&e.phrase}var Pn=class extends Pt{constructor(e,t){if(super(),u5(e)){let a=new bn(e.privateKey);if(B(this,"_signingKey",()=>a),B(this,"address",gn(this.publicKey)),this.address!==ce(e.address)&&vr.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),d5(e)){let i=e.mnemonic;B(this,"_mnemonic",()=>({phrase:i.phrase,path:i.path||ba,locale:i.locale||"en"}));let r=this.mnemonic,s=It.fromMnemonic(r.phrase,null,r.locale).derivePath(r.path);gn(s.privateKey)!==this.address&&vr.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else B(this,"_mnemonic",()=>null)}else{if(bn.isSigningKey(e))e.curve!=="secp256k1"&&vr.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 bn(e);B(this,"_signingKey",()=>a)}B(this,"_mnemonic",()=>null),B(this,"address",gn(this.publicKey))}t&&!Xt.isProvider(t)&&vr.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 Pn(this,e)}signTransaction(e){return Se(e).then(t=>{t.from!=null&&(ce(t.from)!==this.address&&vr.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete t.from);let a=this._signingKey().signDigest(fe(rs(t)));return rs(t,a)})}signMessage(e){return Lf(this,void 0,void 0,function*(){return qr(this._signingKey().signDigest(ir(e)))})}_signTypedData(e,t,a){return Lf(this,void 0,void 0,function*(){let i=yield gt.resolveNames(e,t,a,r=>(this.provider==null&&vr.throwError("cannot resolve ENS names without a provider",E.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:r}),this.provider.resolveName(r)));return qr(this._signingKey().signDigest(gt.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={}),_l(this,e,t,a)}static createRandom(e){let t=ta(16);e||(e={}),e.extraEntropy&&(t=j(Ie(fe(ye([t,e.extraEntropy])),0,16)));let a=wi(t,e.locale);return Pn.fromMnemonic(a,e.path,e.locale)}static fromEncryptedJson(e,t,a){return Of(e,t,a).then(i=>new Pn(i))}static fromEncryptedJsonSync(e,t){return new Pn(Bf(e,t))}static fromMnemonic(e,t,a){return t||(t=ba),new Pn(It.fromMnemonic(e,null,a).derivePath(t))}};function Uf(n,e){return xi(ir(n),e)}function Vf(n,e,t,a){return xi(gt.hash(n,e,t),a)}var ia={};Wi(ia,{AlchemyProvider:()=>Mr,AlchemyWebSocketProvider:()=>ws,AnkrProvider:()=>_s,BaseProvider:()=>aa,CloudflareProvider:()=>ks,EtherscanProvider:()=>As,FallbackProvider:()=>Ms,Formatter:()=>X,InfuraProvider:()=>Ir,InfuraWebSocketProvider:()=>Is,IpcProvider:()=>Bl,JsonRpcBatchProvider:()=>ou,JsonRpcProvider:()=>tn,JsonRpcSigner:()=>Ar,NodesmithProvider:()=>Ss,PocketProvider:()=>Rs,Provider:()=>Xt,Resolver:()=>kr,StaticJsonRpcProvider:()=>vs,UrlJsonRpcProvider:()=>St,Web3Provider:()=>Ps,WebSocketProvider:()=>_a,getDefaultProvider:()=>uu,getNetwork:()=>ys,isCommunityResourcable:()=>El,isCommunityResource:()=>ms,showThrottleMessage:()=>na});var jf="networks/5.7.1";var Hf=new E(jf);function l5(n){return n&&typeof n.renetwork=="function"}function va(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 va(t)},e}function Jo(n,e){let t=function(a,i){return a.JsonRpcProvider?new a.JsonRpcProvider(n,e):null};return t.renetwork=function(a){return Jo(n,a)},t}var qf={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:va("homestead")},Gf={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:va("ropsten")},zf={chainId:63,name:"classicMordor",_defaultProvider:Jo("https://www.ethercluster.com/mordor","classicMordor")},Ko={unspecified:{chainId:0,name:"unspecified"},homestead:qf,mainnet:qf,morden:{chainId:2,name:"morden"},ropsten:Gf,testnet:Gf,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:zf,classicTestnet:zf,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 ys(n){if(n==null)return null;if(typeof n=="number"){for(let a in Ko){let i=Ko[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=Ko[n];return a==null?null:{name:a.name,chainId:a.chainId,ensAddress:a.ensAddress,_defaultProvider:a._defaultProvider||null}}let e=Ko[n.name];if(!e)return typeof n.chainId!="number"&&Hf.throwArgumentError("invalid network chainId","network",n),n;n.chainId!==0&&n.chainId!==e.chainId&&Hf.throwArgumentError("network chainId mismatch","network",n);let t=n._defaultProvider||null;return t==null&&e._defaultProvider&&(l5(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 Wf="web/5.7.1";var p5=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})};function Kf(n,e){return p5(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 y5=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Nn=new E(Wf);function Jf(n){return new Promise(e=>{setTimeout(e,n)})}function Ua(n,e){if(n==null)return null;if(typeof n=="string")return n;if(oa(n)){if(e&&(e.split("/")[0]==="text"||e.split(";")[0].trim()==="application/json"))try{return Yt(n)}catch{}return W(n)}return n}function f5(n){return ve(n.replace(/%([0-9a-f][0-9a-f])/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))}function kl(n,e,t){let a=typeof n=="object"&&n.throttleLimit!=null?n.throttleLimit:12;Nn.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;Nn.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"},f=!1,x=2*60*1e3;if(typeof n=="string")l=n;else if(typeof n=="object"){if((n==null||n.url==null)&&Nn.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&&(f=!0);if(p.allowGzip=!!n.allowGzip,n.user!=null&&n.password!=null){l.substring(0,6)!=="https:"&&n.allowInsecureAuthentication!==!0&&Nn.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 "+ar(ve(O))}}n.skipFetchSetup!=null&&(p.skipFetchSetup=!!n.skipFetchSetup),n.fetchOptions!=null&&(p.fetchOptions=we(n.fetchOptions))}let I=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),_=l?l.match(I):null;if(_)try{let O={statusCode:200,statusMessage:"OK",headers:{"content-type":_[1]||"text/plain"},body:_[2]?nr(_[3]):f5(_[3])},U=O.body;return t&&(U=t(O.body,O)),Promise.resolve(U)}catch(O){Nn.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(Nn.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 y5(this,void 0,void 0,function*(){for(let O=0;O=300)&&(S.cancel(),Nn.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){Nn.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 n=="string"?{url:n}:we(n);r.headers?Object.keys(r.headers).filter(o=>o.toLowerCase()==="content-type").length!==0||(r.headers=we(r.headers),r.headers["content-type"]="application/json"):r.headers={"content-type":"application/json"},n=r}return kl(n,i,a)}function On(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,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(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()&&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(f){s()&&a(f)})}p()})}var Sl=En(Xf());var ke="providers/5.7.2";var cs=new E(ke),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),f=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(f),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=we(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():cs.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 ce(e)}callAddress(e){if(!ie(e,32))return null;let t=ce(Ie(e,12));return t===fo?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 Hn(e);throw new Error("invalid blockTag")}hash(e,t){let a=this.hex(e,t);return Ft(a)!==32?cs.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 me(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 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 a=F.from(t.root).toNumber();a===0||a===1?(t.status!=null&&t.status!==a&&cs.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=a,delete t.root):cs.throwArgumentError("invalid alt-root-status","value.root",t.root)}else t.root.length!==66&&cs.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 El(n){return n&&typeof n.isCommunityResource=="function"}function ms(n){return El(n)&&n.isCommunityResource()}var Zf=!1;function na(){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(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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},he=new E(ke),v5=10;function ec(n){return n==null?"null":(Ft(n)!==32&&he.throwArgumentError("invalid topic","topic",n),n.toLowerCase())}function tc(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[ec(i)]=!0});let a=Object.keys(t);return a.sort(),a.join("|")}else return ec(e)}).join("&")}function w5(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 _r(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:*:"+tc(n);if(ko.isForkEvent(n))throw he.warn("not implemented"),new Error("not implemented");if(n&&typeof n=="object")return"filter:"+(n.address||"*")+":"+tc(n.topics||[])}throw new Error("invalid event - "+n)}function hs(){return new Date().getTime()}function nc(n){return new Promise(e=>{setTimeout(e,n)})}var _5=["block","network","pending","poll"],Rl=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=w5(e[2]),i={};return a.length>0&&(i.topics=a),t&&t!=="*"&&(i.address=t),i}pollable(){return this.tag.indexOf(":")>=0||_5.indexOf(this.tag)>=0}},k5={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 Ml(n){return me(F.from(n).toHexString(),32)}function ac(n){return ha.encode(ye([n,Ie(en(en(n)),0,4)]))}var sc=new RegExp("^(ipfs)://(.*)$","i"),ic=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),sc,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Xo(n,e){try{return Yt(xs(n,e))}catch{}return null}function xs(n,e){if(n==="0x")return null;let t=F.from(Ie(n,e,e+32)).toNumber(),a=F.from(Ie(n,t,t+32)).toNumber();return Ie(n,t+32,t+32+a)}function Cl(n){return n.match(/^ipfs:\/\/ipfs\//i)?n=n.substring(12):n.match(/^ipfs:\/\//i)?n=n.substring(7):he.throwArgumentError("unsupported IPFS format","link",n),`https://gateway.ipfs.io/ipfs/${n}`}function rc(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 A5(n){if(n.length%32===0)return n;let e=new Uint8Array(Math.ceil(n.length/32)*32);return e.set(n),e}function oc(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:kt([e,Na(this.name),t||"0x"])},i=!1;(yield this.supportsWildcard())&&(i=!0,a.data=kt(["0x9061b923",oc([ts(this.name),a.data])]));try{let r=yield this.provider.call(a);return j(r).length%32===4&&he.throwError("resolver threw error",E.errors.CALL_EXCEPTION,{transaction:a,data:r}),i&&(r=xs(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?xs(a,0):null})}_getAddress(e,t){let a=k5[String(e)];if(a==null&&he.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 ac(ye([[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 ac(ye([[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=Sl.default.toWords(i.slice(2));return o.unshift(s),Sl.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===er?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",Ml(e));if(t==null||t==="0x")return null;let a=this._getAddress(e,t);return a==null&&he.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 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([Ml(64),Ml(t.length),t]),t.length%32!==0&&(t=ye([t,me("0x",32-e.length%32)]));let a=yield this._fetchBytes("0x59d1d43c",W(t));return a==null||a==="0x"?null:Yt(a)})}},Il=null,E5=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 On(()=>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 ys(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 Dn({url:p,errorPassThrough:!0},f,(_,v)=>(_.status=v.statusCode,_));if(x.data)return x.data;let I=x.message||"unknown error";if(x.status>=400&&x.status<500)return he.throwError(`response not found during CCIP fetch: ${I}`,E.errors.SERVER_ERROR,{url:l,errorMessage:I});s.push(I)}return he.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(hs()-r.respTime<=e)return r.blockNumber;break}catch{if(this._internalBlockNumber===i)break}}let t=hs(),a=Se({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=hs();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=E5++,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)he.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${a})`),this.emit("error",he.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 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 nc(0),this._network;let a=he.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=hs();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,f=function(){return p?!0:(p=!0,l.forEach(I=>{I()}),!1)},x=I=>{I.confirmations{this.removeListener(e,x)}),i){let I=i.startBlock,_=null,v=S=>ue(this,void 0,void 0,function*(){p||(yield nc(1e3),this.getTransactionCount(i.from).then(L=>ue(this,void 0,void 0,function*(){if(!p){if(L<=i.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),l.push(()=>{this.removeListener("block",v)})}if(typeof a=="number"&&a>0){let I=setTimeout(()=>{f()||o(he.makeError("timeout exceeded",E.errors.TIMEOUT,{timeout:a}))},a);I.unref&&I.unref(),l.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",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 Se({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getBalance",a);try{return F.from(i)}catch(r){return he.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 Se({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getTransactionCount",a);try{return F.from(i).toNumber()}catch(r){return he.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 Se({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),i=yield this.perform("getCode",a);try{return W(i)}catch(r){return he.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 Se({address:this._getAddress(e),blockTag:this._getBlockTag(a),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,a){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&&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&&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)),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 Se(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 Se(t))})}_call(e,t,a){return ue(this,void 0,void 0,function*(){a>=v5&&he.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=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&&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 On(()=>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 On(()=>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 Se({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&&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 a=yield this._getResolver(t,"getResolver");if(a!=null){let i=new kr(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||he.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"+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(a){if(ie(e))throw a}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",a=yield this._getResolver(t,"lookupAddress");if(a==null)return null;let i=Xo(yield this.call({to:a,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 kr(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 a=yield t.getAvatar();return a==null?null:a.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,a){let i=new Rl(_r(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=_r(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=_r(e);return this._events.filter(a=>a.tag===t).length}listeners(e){if(e==null)return this._events.map(a=>a.listener);let t=_r(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=_r(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=_r(e);this._events=this._events.filter(i=>i.tag!==a?!0:(t.push(i),!1))}return t.forEach(a=>{this._stopEvent(a)}),this}};var wa=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Et=new E(ke),M5=["call","estimateGas"];function gs(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=gs(n[t],e);if(a)return a}return null}if(typeof n=="string")try{return gs(JSON.parse(n),e)}catch{}return null}function dc(n,e,t){let a=t.transaction||t.signedTransaction;if(n==="call"){let r=gs(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:a,error:e})}if(n==="estimateGas"){let r=gs(e.body,!1);r==null&&(r=gs(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: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)&&Et.throwError("insufficient funds for intrinsic transaction cost",E.errors.INSUFFICIENT_FUNDS,{error:e,method:n,transaction:a}),i.match(/nonce (is )?too low/i)&&Et.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)&&Et.throwError("replacement fee too low",E.errors.REPLACEMENT_UNDERPRICED,{error:e,method:n,transaction:a}),i.match(/only replay-protected/i)&&Et.throwError("legacy pre-eip-155 transactions not supported",E.errors.UNSUPPORTED_OPERATION,{error:e,method:n,transaction:a}),M5.indexOf(n)>=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:n,transaction:a}),e}function uc(n){return new Promise(function(e){setTimeout(e,n)})}function C5(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 bs(n){return n&&n.toLowerCase()}var Pl={},Ar=class extends Pt{constructor(e,t,a){if(super(),e!==Pl)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)):Et.throwArgumentError("invalid address or index","addressOrIndex",a)}connect(e){return Et.throwError("cannot alter JSON-RPC Signer connection",E.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new Nl(Pl,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=we(e);let t=this.getAddress().then(a=>(a&&(a=a.toLowerCase()),a));if(e.gasLimit==null){let a=we(e);a.from=t,e.gasLimit=this.provider.estimateGas(a)}return e.to!=null&&(e.to=Promise.resolve(e.to).then(a=>wa(this,void 0,void 0,function*(){if(a==null)return null;let i=yield this.provider.resolveName(a);return i==null&&Et.throwArgumentError("provided ENS name resolves to null","tx.to",a),i}))),Se({tx:Se(e),sender:t}).then(({tx:a,sender:i})=>{a.from!=null?a.from.toLowerCase()!==i&&Et.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)&&Et.throwError("user rejected transaction",E.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:a}),dc("sendTransaction",s,r)))})}signTransaction(e){return Et.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),a=yield this.sendUncheckedTransaction(e);try{return yield On(()=>wa(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 wa(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(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)&&Et.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"signMessage",from:a,messageData:e}),i}})}_legacySignMessage(e){return wa(this,void 0,void 0,function*(){let t=typeof e=="string"?ve(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)&&Et.throwError("user rejected signing",E.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:a,messageData:e}),i}})}_signTypedData(e,t,a){return wa(this,void 0,void 0,function*(){let i=yield gt.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(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 wa(this,void 0,void 0,function*(){let t=this.provider,a=yield this.getAddress();return t.send("personal_unlockAccount",[a.toLowerCase(),e,null])})}},Nl=class extends Ar{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)}))}},I5={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 a=t;a==null&&(a=new Promise((i,r)=>{setTimeout(()=>{this.detectNetwork().then(s=>{i(s)},s=>{r(s)})},0)})),super(a),e||(e=ht(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 wa(this,void 0,void 0,function*(){yield uc(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(a){return Et.throwError("could not detect network",E.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:a})}}return Et.throwError("could not detect network",E.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new Ar(Pl,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:mt(a),provider:this});let i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];let r=Dn(this.connection,JSON.stringify(a),C5).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",[bs(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[bs(t.address),t.blockTag]];case"getCode":return["eth_getCode",[bs(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[bs(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 a=ht(this.constructor,"hexlifyTransaction");return["eth_call",[a(t.transaction,{from:!0}),t.blockTag]]}case"estimateGas":{let a=ht(this.constructor,"hexlifyTransaction");return["eth_estimateGas",[a(t.transaction,{from:!0})]]}case"getLogs":return t.filter&&t.filter.address!=null&&(t.filter.address=bs(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=we(t),t.transaction=we(i),delete t.transaction.type)}}let a=this.prepareRequest(e,t);a==null&&Et.throwError(e+" not implemented",E.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(a[0],a[1])}catch(i){return dc(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 uc(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=we(I5);if(t)for(let r in t)t[r]&&(a[r]=!0);$i(e,a);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 Er=null;try{if(Er=WebSocket,Er==null)throw new Error("inject please")}catch{let e=new E(ke);Er=function(){e.throwError("WebSockets not supported in this environment",E.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var Dl=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Zo=new E(ke),S5=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 Er(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){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 Dl(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 a=S5++;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 Dl(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 Dl(this,void 0,void 0,function*(){this.websocket.readyState===Er.CONNECTING&&(yield new Promise(e=>{this.websocket.onopen=function(){e(!0)},this.websocket.onerror=function(){e(!1)}})),this.websocket.close(1e3)})}};var R5=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Ts=new E(ke),vs=class extends tn{detectNetwork(){let e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return R5(this,void 0,void 0,function*(){let t=this.network;return t==null&&(t=yield e.detectNetwork.call(this),t||Ts.throwError("no network detected",E.errors.UNKNOWN_ERROR,{}),this._network==null&&(B(this,"_network",t),this.emit("network",t,null))),t})}},St=class extends vs{constructor(e,t){Ts.checkAbstract(new.target,St),e=ht(new.target,"getNetwork")(e),t=ht(new.target,"getApiKey")(t);let a=ht(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(){Ts.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(e){return Ts.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 Ts.throwError("not implemented; sub-classes must override getUrl",E.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}};var lc=new E(ke),eu="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC",ws=class extends _a{constructor(e,t){let a=new Mr(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===eu}},Mr=class extends St{static getWebSocketProvider(e,t){return new ws(e,t)}static getApiKey(e){return e==null?eu:(e&&typeof e!="string"&&lc.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:lc.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+a+t,throttleCallback:(i,r)=>(t===eu&&na(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===eu}};var P5=new E(ke),tu="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function N5(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 P5.throwArgumentError("unsupported network","name",n)}var _s=class extends St{isCommunityResource(){return this.apiKey===tu}static getApiKey(e){return e??tu}static getUrl(e,t){t==null&&(t=tu);let a={allowGzip:!0,url:"https://"+N5(e.name)+t,throttleCallback:(i,r)=>(t.apiKey===tu&&na(),Promise.resolve(!0))};return t.projectSecret!=null&&(a.user="",a.password=t.projectSecret),a}};var D5=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},pc=new E(ke),ks=class extends St{static getApiKey(e){return e!=null&&pc.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:pc.throwArgumentError("unsupported network","network",arguments[0])}return a}perform(e,t){let a=Object.create(null,{perform:{get:()=>super.perform}});return D5(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 nu=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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},Va=new E(ke);function yc(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=Hn(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 O5(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 fc(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 cc(n){if(n==="pending")throw new Error("pending not supported");return n==="latest"?n:parseInt(n.substring(2),16)}function Ol(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;Va.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/)&&Va.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/)&&Va.throwError("nonce has already been used",E.errors.NONCE_EXPIRED,{error:e,method:n,transaction:t}),a.match(/another transaction with same nonce/)&&Va.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/)&&Va.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 As=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 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 nu(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"?fc:O5;this.emit("debug",{action:"request",request:i,provider:this});let o={url:i,throttleSlotInterval:1e3,throttleCallback:(f,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(f=>`${f}=${r[f]}`).join("&"));let p=yield Dn(o,l,s||fc);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 a=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=>Ol("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=yc(t.transaction);i.module="proxy",i.action="eth_call";try{return yield this.fetch("proxy",i,!0)}catch(r){return Ol("call",r,t.transaction)}}case"estimateGas":{let i=yc(t.transaction);i.module="proxy",i.action="eth_estimateGas";try{return yield this.fetch("proxy",i,!0)}catch(r){return Ol("estimateGas",r,t.transaction)}}case"getLogs":{let i={action:"getLogs"};if(t.filter.fromBlock&&(i.fromBlock=cc(t.filter.fromBlock)),t.filter.toBlock&&(i.toBlock=cc(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(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(f){try{p(a.next(f))}catch(x){s(x)}}function l(f){try{p(a.throw(f))}catch(x){s(x)}}function p(f){f.done?r(f.value):i(f.value).then(o,l)}p((a=a.apply(n,e||[])).next())})},_i=new E(ke);function au(){return new Date().getTime()}function mc(n){let e=null;for(let t=0;te?null:(a+i)/2}function Cr(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=>Cr(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=Cr(a),JSON.stringify(t)+":"+a}).join(",")+"}"}throw new Error("unknown value type: "+typeof n)}var B5=1;function xc(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 F5=[E.errors.CALL_EXCEPTION,E.errors.INSUFFICIENT_FUNDS,E.errors.NONCE_EXPIRED,E.errors.REPLACEMENT_UNDERPRICED,E.errors.UNPREDICTABLE_GAS_LIMIT],L5=["address","args","errorArgs","errorSignature","method","transaction"];function iu(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 U5(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 V5(n,e,t){let a=Cr;switch(e){case"getBlockNumber":return function(i){let r=i.map(o=>o.result),s=hc(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 hc(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=we(i),i.confirmations=-1,Cr(i))};break;case"getBlock":t.includeTransactions?a=function(i){return i==null?null:(i=we(i),i.transactions=i.transactions.map(r=>(r=we(r),r.confirmations=-1,r)),Cr(i))}:a=function(i){return i==null?null:Cr(i)};break;default:throw new Error("unknown method: "+e)}return U5(a,n.quorum)}function Es(n,e){return ru(this,void 0,void 0,function*(){let t=n.provider;return t.blockNumber!=null&&t.blockNumber>=e||e===-1?t:On(()=>new Promise((a,i)=>{setTimeout(function(){return t.blockNumber>=e?a(t):n.cancelled?a(null):a(void 0)},0)}),{oncePoll:t})})}function j5(n,e,t,a){return ru(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 Es(n,e)),i[t](a.address,a.blockTag||"latest");case"getStorageAt":return a.blockTag&&ie(a.blockTag)&&(i=yield Es(n,e)),i.getStorageAt(a.address,a.position,a.blockTag||"latest");case"getBlock":return a.blockTag&&ie(a.blockTag)&&(i=yield Es(n,e)),i[a.includeTransactions?"getBlockWithTransactions":"getBlock"](a.blockTag||a.blockHash);case"call":case"estimateGas":return a.blockTag&&ie(a.blockTag)&&(i=yield Es(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 Es(n,e)),i.getLogs(r)}}return _i.throwError("unknown method error",E.errors.UNKNOWN_ERROR,{method:t,params:a})})}var Ms=class extends aa{constructor(e,t){e.length===0&&_i.throwArgumentError("missing providers","providers",e);let a=e.map((s,o)=>{if(Xt.isProvider(s)){let f=ms(s)?2e3:750;return Object.freeze({provider:s,weight:1,stallTimeout:f,priority:1})}let l=we(s);l.priority==null&&(l.priority=1),l.stallTimeout==null&&(l.stallTimeout=ms(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=a.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=mc(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 ru(this,void 0,void 0,function*(){let e=yield Promise.all(this.providerConfigs.map(t=>t.provider.getNetwork()));return mc(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(f=>f.hash,f=>f)));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=j5(_,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 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 _=a(x);if(_!==void 0)return i.forEach(v=>{v.staller&&v.staller.cancel(),v.cancelled=!0}),_;o||(yield xc(100).getPromise()),o=!1}let I=i.reduce((_,v)=>{if(!v.done||v.error==null)return _;let S=v.error.code;return F5.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={};L5.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 Bl=null;var su=new E(ke),Cs="84842078b09946638c03157f83405213",Is=class extends _a{constructor(e,t){let a=new Ir(e,t),i=a.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",a.projectId),B(this,"projectId",a.projectId),B(this,"projectSecret",a.projectSecret)}isCommunityResource(){return this.projectId===Cs}},Ir=class extends St{static getWebSocketProvider(e,t){return new Is(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 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:su.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===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 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:mt(o),provider:this}),Dn(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 I=new Error(x.error.message);I.code=x.error.code,I.data=x.error.data,p.reject(I)}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 Fl=new E(ke),H5="ETHERS_JS_SHARED",Ss=class extends St{static getApiKey(e){return e&&typeof e!="string"&&Fl.throwArgumentError("invalid apiKey","apiKey",e),e||H5}static getUrl(e,t){Fl.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:Fl.throwArgumentError("unsupported network","network",arguments[0])}return a+"?apiKey="+t}};var bc=new E(ke),gc="62e1ad51b37b8e00394bda3b",Rs=class extends St{static getApiKey(e){let t={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return e==null?t.applicationId=gc:typeof e=="string"?t.applicationId=e:e.applicationSecretKey!=null?(t.applicationId=e.applicationId,t.applicationSecretKey=e.applicationSecretKey):e.applicationId?t.applicationId=e.applicationId:bc.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:bc.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===gc}};var Tc=new E(ke),q5=1;function vc(n,e){let t="Web3LegacyFetcher";return function(a,i){let r={method:a,params:i,id:q5++,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 G5(n){return function(e,t){t==null&&(t=[]);let a={method:e,params:t};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:mt(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 Ps=class extends tn{constructor(e,t){e==null&&Tc.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=G5(e)):e.sendAsync?i=vc(e,e.sendAsync.bind(e)):e.send?i=vc(e,e.send.bind(e)):Tc.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 wc=new E(ke);function uu(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 _a(n);default:wc.throwArgumentError("unsupported URL scheme","network",n)}}let t=ys(n);return(!t||!t._defaultProvider)&&wc.throwError("unsupported getDefaultProvider network",E.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:n}),t._defaultProvider({FallbackProvider:Ms,AlchemyProvider:Mr,AnkrProvider:_s,CloudflareProvider:ks,EtherscanProvider:As,InfuraProvider:Ir,JsonRpcProvider:tn,NodesmithProvider:Ss,PocketProvider:Rs,Web3Provider:Ps,IpcProvider:null},e)}var te={};Wi(te,{AbiCoder:()=>tr,ConstructorFragment:()=>Lt,ErrorFragment:()=>rn,EventFragment:()=>Wt,FormatTypes:()=>ge,Fragment:()=>Kt,FunctionFragment:()=>Ut,HDNode:()=>It,Indexed:()=>pa,Interface:()=>Da,LogDescription:()=>rr,Logger:()=>E,ParamType:()=>yt,RLP:()=>io,SigningKey:()=>bn,SupportedAlgorithm:()=>ea,TransactionDescription:()=>sr,TransactionTypes:()=>Do,UnicodeNormalizationForm:()=>Jt,Utf8ErrorFuncs:()=>bo,Utf8ErrorReason:()=>Vt,_TypedDataEncoder:()=>gt,_fetchData:()=>kl,_toEscapedUtf8String:()=>Id,accessListify:()=>dn,arrayify:()=>j,base58:()=>ha,base64:()=>Od,checkProperties:()=>$i,checkResultErrors:()=>Yi,commify:()=>Sc,computeAddress:()=>gn,computeHmac:()=>xa,computePublicKey:()=>is,concat:()=>ye,deepCopy:()=>mt,defaultAbiCoder:()=>Zr,defaultPath:()=>ba,defineReadOnly:()=>B,dnsEncode:()=>ts,entropyToMnemonic:()=>wi,fetchJson:()=>Dn,formatBytes32String:()=>Sd,formatEther:()=>Rc,formatUnits:()=>Ll,getAccountPath:()=>wf,getAddress:()=>ce,getContractAddress:()=>fi,getCreate2Address:()=>Oy,getIcapAddress:()=>Dy,getJsonWalletAddress:()=>gl,getStatic:()=>ht,hashMessage:()=>ir,hexConcat:()=>kt,hexDataLength:()=>Ft,hexDataSlice:()=>Ie,hexStripZeros:()=>bd,hexValue:()=>Hn,hexZeroPad:()=>me,hexlify:()=>W,id:()=>sn,isAddress:()=>Ny,isBytes:()=>pn,isBytesLike:()=>oa,isHexString:()=>ie,isValidMnemonic:()=>vf,isValidName:()=>Fd,joinSignature:()=>qr,keccak256:()=>fe,mnemonicToEntropy:()=>gr,mnemonicToSeed:()=>yl,namehash:()=>Na,nameprep:()=>Dd,parseBytes32String:()=>Rd,parseEther:()=>Pc,parseTransaction:()=>Oo,parseUnits:()=>Ul,poll:()=>On,randomBytes:()=>ta,recoverAddress:()=>xi,recoverPublicKey:()=>No,resolveProperties:()=>Se,ripemd160:()=>os,serializeTransaction:()=>rs,sha256:()=>en,sha512:()=>ul,shallowCopy:()=>we,shuffled:()=>ls,solidityKeccak256:()=>Ac,solidityPack:()=>du,soliditySha256:()=>Ec,splitSignature:()=>qn,stripZeros:()=>nn,toUtf8Bytes:()=>ve,toUtf8CodePoints:()=>Pa,toUtf8String:()=>Yt,verifyMessage:()=>Uf,verifyTypedData:()=>Vf,zeroPad:()=>di});var _c="solidity/5.7.0";var z5=new RegExp("^bytes([0-9]+)$"),W5=new RegExp("^(u?int)([0-9]*)$"),K5=new RegExp("^(.*)\\[([0-9]*)\\]$"),J5="0000000000000000000000000000000000000000000000000000000000000000",Sr=new E(_c);function kc(n,e,t){switch(n){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 a=n.match(W5);if(a){let i=parseInt(a[2]||"256");return(a[2]&&String(i)!==a[2]||i%8!==0||i===0||i>256)&&Sr.throwArgumentError("invalid number type","type",n),t&&(i=256),e=F.from(e).toTwos(i),di(e,i/8)}if(a=n.match(z5),a){let i=parseInt(a[1]);return(String(i)!==a[1]||i===0||i>32)&&Sr.throwArgumentError("invalid bytes type","type",n),j(e).byteLength!==i&&Sr.throwArgumentError(`invalid value for ${n}`,"value",e),t?j((e+J5).substring(0,66)):e}if(a=n.match(K5),a&&Array.isArray(e)){let i=a[1];parseInt(a[2]||String(e.length))!=e.length&&Sr.throwArgumentError(`invalid array length for ${n}`,"value",e);let s=[];return e.forEach(function(o){s.push(kc(i,o,!0))}),ye(s)}return Sr.throwArgumentError("invalid type","type",n)}function du(n,e){n.length!=e.length&&Sr.throwArgumentError("wrong number of values; expected ${ types.length }","values",e);let t=[];return n.forEach(function(a,i){t.push(kc(a,e[i]))}),W(ye(t))}function Ac(n,e){return fe(du(n,e))}function Ec(n,e){return en(du(n,e))}var Mc="units/5.7.0";var Cc=new E(Mc),Ic=["wei","kwei","mwei","gwei","szabo","finney","ether"];function Sc(n){let e=String(n).split(".");(e.length>2||!e[0].match(/^-?[0-9]*$/)||e[1]&&!e[1].match(/^[0-9]*$/)||n==="."||n==="-.")&&Cc.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 Ll(n,e){if(typeof e=="string"){let t=Ic.indexOf(e);t!==-1&&(e=3*t)}return Ji(n,e??18)}function Ul(n,e){if(typeof n!="string"&&Cc.throwArgumentError("value must be a string","value",n),typeof e=="string"){let t=Ic.indexOf(e);t!==-1&&(e=3*t)}return fn(n,e??18)}function Rc(n){return Ll(n,18)}function Pc(n){return Ul(n,18)}var lu="ethers/5.7.2";var Nc=new E(lu);try{let n=window;n._ethers==null&&(n._ethers=Vl)}catch{}var Bn;(function(n){n.Mainnet="Mainnet",n.Custom="Custom",n.Gnosis="Xdai",n.Goerli="Goerli",n.Xdai="Xdai",n.XdaiQa="XdaiQa",n.ArbitrumOne="ArbitrumOne",n.ArbitrumSepolia="ArbitrumSepolia"})(Bn||(Bn={}));var Dc;(function(n){n[n.Custom=0]="Custom",n[n.Mainnet=1]="Mainnet",n[n.Goerli=5]="Goerli",n[n.Gnosis=100]="Gnosis",n[n.Xdai=100]="Xdai",n[n.XdaiQa=100]="XdaiQa",n[n.ArbitrumSepolia=421614]="ArbitrumSepolia",n[n.ArbitrumOne=42161]="ArbitrumOne"})(Dc||(Dc={}));var pu;(function(n){n.Mainnet="0x5346D0f80e2816FaD329F2c140c870ffc3c3E2Ef",n.Goerli="0x79073fc2117dD054FCEdaCad1E7018C9CbE3ec0B",n.Xdai="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.XdaiQa="0x78163f593D1Fa151B4B7cacD146586aD2b686294",n.Custom="",n.ArbitrumOne="0xcccccdcc0ccf6c708d860e19353c5f9a49accccc",n.ArbitrumSepolia="0x7777494e3d8cce0D3570E21FEf820F9Fee077777"})(pu||(pu={}));var Rr;(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",n.ArbitrumOne="https://app.colony.io/reputation/arbitrum-one",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/reputation/arbitrum-sepolia"})(Rr||(Rr={}));var yu;(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="",n.ArbitrumOne="https://app.colony.io/metatransaction/arbitrum-one",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/metatransaction/arbitrum-sepolia"})(yu||(yu={}));var jl;(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="",n.ArbitrumOne="https://app.colony.io/public-rpc/",n.ArbitrumSepolia="https://arbitrum-sepolia.colony.io/public-rpc/"})(jl||(jl={}));var Ns;(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",n.ArbitrumOne=".colony.joincolony.arbitrum",n.ArbitrumSepolia=".colony.joincolony.sepolia"})(Ns||(Ns={}));var Ds;(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",n.ArbitrumOne=".user.joincolony.arbitrum",n.ArbitrumSepolia=".user.joincolony.sepolia"})(Ds||(Ds={}));var Hl;(function(n){let e;(function(i){i.ETH="0x0000000000000000000000000000000000000000",i.CLNY="0x3E828ac5C480069D4765654Fb4b8733b910b13b2",i.USDC="0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"})(e=n.Mainnet||(n.Mainnet={}));let t;(function(i){i.XDAI="0x0000000000000000000000000000000000000000",i.CLNY="0xc9B6218AffE8Aba68a13899Cbf7cF7f14DDd304C",i.USDC="0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83"})(t=n.Gnosis||(n.Gnosis={}));let a;(function(i){i.ETH="0x0000000000000000000000000000000000000000",i.CLNY="0xcccccdcc0ccf6c708d860e19353c5f9a49accccc",i.USDC="0xaf88d065e77c8cC2239327C5EDb3A432268e5831"})(a=n.ArbitrumOne||(n.ArbitrumOne={}))})(Hl||(Hl={}));var _e;(function(n){n[n.RootDomain=1]="RootDomain",n[n.RootTeam=1]="RootTeam",n[n.RootPot=1]="RootPot",n[n.SkillIgnore=0]="SkillIgnore"})(_e||(_e={}));var Ot;(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"})(Ot||(Ot={}));var Gl="0x12345678",ql;(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"})(ql||(ql={}));var wt;(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"})(wt||(wt={}));var Ae;(function(n){n.FundingQueue="FundingQueue",n.IVotingReputation="IVotingReputation",n.MultisigPermissions="MultisigPermissions",n.OneTxPayment="OneTxPayment",n.ReputationBootstrapper="ReputationBootstrapper",n.StagedExpenditure="StagedExpenditure",n.StakedExpenditure="StakedExpenditure",n.StreamingPayments="StreamingPayments",n.TokenSupplier="TokenSupplier",n.VotingReputation="VotingReputation"})(Ae||(Ae={}));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 Wl=[{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"pure",type:"function"}],Ai=class{static createInterface(){return new te.Interface(Wl)}static connect(e,t){return new oe(e,Wl,t)}};xe(Ai,"abi",Wl);var Oc=(n,e)=>{throw new Error(`${e}: ${n}`)},fu=n=>n!=null;var{keccak256:Q5,toUtf8Bytes:Y5}=te,{MaxUint256:X5}=xt;var Pr=n=>te.formatEther(n),Nr=n=>te.parseEther(n);var Kl=n=>{let e=n.reduce((t,a)=>t|1<{let e=F.from(n);return[...Array(wt.LAST_ROLE).keys()].map(t=>e.shr(t).mask(1).eq(1)?t:null).filter(fu)},Ei=async(n,e,t,a)=>{if(F.from(t).eq(F.from(a)))return X5;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)},ja=n=>Q5(Y5(n));var Dr=async(n,e)=>(await Ai.connect(n,e).version()).toNumber(),Jl=(n,e)=>n.map(t=>{try{return e.parseLog(t)}catch{return null}}).filter(fu);var{hexDataSlice:$l}=te,{MaxUint256:Z5}=xt,Bc=n=>{let e=$l(n,0,3),t=F.from($l(n,4,35)),a=F.from($l(n,36,67));return{sig:e,permissionDomainId:t,childSkillIndex:a}},Fc=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),Z5,r];let o=F.from(_e.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 Ei(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]},eb=async(n,e,t,a,i)=>{let r=await Promise.all(a.map(s=>Fc(n,e,t,s,i)));for(let s=0;sArray.isArray(a)?a.length===1?ra(n,e,t,a[0],i):eb(n,e,t,a,i):Fc(n,e,t,a,i);var{MaxUint256:Lc}=xt,{AddressZero:tb}=xt;async function nb(n,e){let t;try{return t=await n.getCapabilityRoles(te.hexZeroPad(e,4)),cu(t)}catch{return[]}}async function Os(n,e,t,a,i,r,s){let o,{skillId:l}=await e.getDomain(i),{sig:p,permissionDomainId:f,childSkillIndex:x}=Bc(s),I=ki.connect(r,a.signer||a.provider),_=await nb(I,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 ${_e.RootDomain}`);o=Lc}else{let{skillId:U}=await e.getDomain(f),H=await n.getChildSkillId(U,x);if(H.eq(l))o=Lc;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,tb);return{actionCid:o,key:v,value:S,branchMask:L,siblings:O}}var{AddressZero:ab}=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,a){this.colony=t,this.network=e;let i=a?.network||Bn.ArbitrumOne;this.endpointUrl=a?.customEndpointUrl||Rr[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 sa.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 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 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 a=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${a}/${i}`;return sa.fetchReputation(r)}async getTotalReputation(e,t){let a=await this.getBaseEndpoint(t),i=F.from(e||0).toString(),r=`${a}/${i}/${ab}/noProof`,s=await sa.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 Mt=n=>Array.from(Array(n-1)).map((e,t)=>t+1);var Uc=10,Hk=Mt(Uc),Vc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},jc=Uc-1;var Hc=3,zk=Mt(Hc),qc={1:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],2:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]},Gc=Hc-1;var zc=10,Jk=Mt(zc),Wc={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},Kc=zc-1;var Jc=7,Yk=Mt(Jc),$c={1:[],2:[],3:[],4:[],5:[],6:[]},Qc=Jc-1;var Yc=8,eA=Mt(Yc),Xc={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3],6:[1,2,3],7:[1,2,3]},Zc=Yc-1;var em=5,aA=Mt(em),tm={1:[1,2,3,4,5,6,7,8,9,10,11,12,13],2:[1,2,3,4,5,6,7,8,9,10,11,12,13],3:[1,2,3,4,5,6,7,8,9,10,11,12,13],4:[1,2,3,4,5,6,7,8,9,10,11,12,13]},nm=em-1;var am=7,sA=Mt(am),im={1:[1,2,3],2:[1,2,3],3:[1,2,3],4:[1,2,3],5:[1,2,3],6:[1,2,3]},rm=am-1;var sm=10,dA=Mt(sm),om={1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[]},um=sm-1;var dm=14,yA=Mt(dm),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],11:[1,2,3,4,5,6],12:[1,2,3,4,5,6],13:[1,2,3,4,5,6]},Yl=dm-1;var lm=18,ib=Mt(lm),mA=lm-1;var rb=(n,e)=>{switch(n){case Ae.FundingQueue:return Vc[e];case Ae.IVotingReputation:return Ql[e];case Ae.MultisigPermissions:return qc[e];case Ae.OneTxPayment:return Wc[e];case Ae.ReputationBootstrapper:return $c[e];case Ae.StagedExpenditure:return tm[e];case Ae.StakedExpenditure:return Xc[e];case Ae.StreamingPayments:return im[e];case Ae.TokenSupplier:return om[e];case Ae.VotingReputation:return Ql[e];default:return Oc(n,"Could not find extension with name")}},Mi=(n,e,t)=>{let a=rb(n,e);return!!a&&!a.includes(t)};var sb={[Ae.FundingQueue]:jc,[Ae.IVotingReputation]:Yl,[Ae.MultisigPermissions]:Gc,[Ae.OneTxPayment]:Kc,[Ae.ReputationBootstrapper]:Qc,[Ae.StagedExpenditure]:nm,[Ae.StakedExpenditure]:Zc,[Ae.StreamingPayments]:rm,[Ae.TokenSupplier]:um,[Ae.VotingReputation]:Yl};var P6=En(pm(),1);var gp=En(I6(),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 bp=2,xp;(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"})(xp||(xp={}));var S6=n=>`Validation error(s): ${n.map(t=>`Error in ${t.path}. Seen: ${t.value}, expected: ${t.expected}`).join(` -`)}`,g1=n=>({...n,isWhitelistActivated:n.isWhitelistActivated||!1,colonySafes:n.colonySafes||[],colonyTokens:n.colonyTokens||[],verifiedAddresses:n.verifiedAddresses||[]}),Tp=(n,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&&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"?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=gp.default.validate.report(s);r(i)===!1&&((p,f,x=!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}))&&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"?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: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}})(n);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 a=S6(t.errors);throw new Error(a)};var R6=(n,e)=>{let t=n===Pe.Colony?g1(e):e,a=(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&&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"?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=gp.default.validate.report(s);r(i)===!1&&((p,f,x=!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}))&&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"?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: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}})({name:n,data:t,version:bp});if(!a.success){let i=S6(a.errors);throw new Error(i)}return a.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,P6.default)(fetch,{headers:{Accept:"application/json"},retryOn:[404,503],retries:3,retryDelay:5e3}),qs={[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]:""},Ur=class{adapter;constructor(e){this.adapter=e||new wp}static eventSupportsMetadata(e){return!!Object.keys(qs).includes(e)}async getMetadata(e,t){let a=this.adapter.getIpfsUrl(e),r=await(await _p(a)).json();return Tp(r,t)}async getMetadataForEvent(e,t){let a=this.adapter.getIpfsUrl(t),r=await(await _p(a)).json(),s=Object.entries(qs).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),a=await _p(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=R6(e,t),i=JSON.stringify(a);return this.adapter.uploadJson(i)}};var UE=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"}],Ni=class{static createInterface(){return new te.Interface(Ep)}static connect(e,t){return new oe(e,Ep,t)}};xe(Ni,"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:"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:"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:[{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:"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:"returnData",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",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:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],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:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"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:[],name:"unlock",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"}],N6="0x60c060405234801561001057600080fd5b5060405161205738038061205783398101604081905261002f91610307565b60008060018161003d6101ab565b6001600160a01b031681526020810191909152604001600090812091909155556100656101ab565b600480546001600160a01b0319166001600160a01b039290921691909117905561008d6101ab565b6001600160a01b03167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a260066100ce8482610413565b5060056100db8382610413565b5060ff81166080526007805460ff1916600117905560405146907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f90610123906006906104d1565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051601f19818403018152919052805160209091012060a0525061054692505050565b60003633301480156101be575060348110155b1561024757600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e881146102365733935050505090565b5001516001600160a01b0316919050565b3391505090565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261027557600080fd5b81516001600160401b0381111561028e5761028e61024e565b604051601f8201601f19908116603f011681016001600160401b03811182821017156102bc576102bc61024e565b6040528181528382016020018510156102d457600080fd5b60005b828110156102f3576020818601810151838301820152016102d7565b506000918101602001919091529392505050565b60008060006060848603121561031c57600080fd5b83516001600160401b0381111561033257600080fd5b61033e86828701610264565b602086015190945090506001600160401b0381111561035c57600080fd5b61036886828701610264565b925050604084015160ff8116811461037f57600080fd5b809150509250925092565b600181811c9082168061039e57607f821691505b6020821081036103be57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561040e57806000526020600020601f840160051c810160208510156103eb5750805b601f840160051c820191505b8181101561040b57600081556001016103f7565b50505b505050565b81516001600160401b0381111561042c5761042c61024e565b6104408161043a845461038a565b846103c4565b6020601f821160018114610474576000831561045c5750848201515b600019600385901b1c1916600184901b17845561040b565b600084815260208120601f198516915b828110156104a45787850151825560209485019460019092019101610484565b50848210156104c25786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b60008083546104df8161038a565b6001821680156104f6576001811461050b5761053b565b60ff198316865281151582028601935061053b565b86600052602060002060005b8381101561053357815488820152600190910190602001610517565b505081860193505b509195945050505050565b60805160a051611ae5610572600039600081816102e10152610f870152600061029b0152611ae56000f3fe6080604052600436106101815760003560e01c80637a9e5e4b116100d1578063a69df4b51161008a578063bf7e214f11610064578063bf7e214f146104b1578063cf309012146104d1578063d505accf146104eb578063dd62ed3e1461050b57600080fd5b8063a69df4b51461047c578063a9059cbb14610491578063b3eac1d8146103b957600080fd5b80637a9e5e4b146103995780637ecebe00146103b95780638da5cb5b146103ef57806395d89b41146104275780639dc29fac1461043c578063a0712d681461045c57600080fd5b806330adf81f1161013e57806340c10f191161011857806340c10f191461030357806342966c68146103235780636281133d1461034357806370a082311461036357600080fd5b806330adf81f14610255578063313ce567146102895780633644e515146102cf57600080fd5b806306fdde0314610186578063095ea7b3146101b15780630c53c51c146101e157806313af4035146101f457806318160ddd1461021657806323b872dd14610235575b600080fd5b34801561019257600080fd5b5061019b610551565b6040516101a891906115b0565b60405180910390f35b3480156101bd57600080fd5b506101d16101cc3660046115d8565b6105df565b60405190151581526020016101a8565b61019b6101ef3660046116bf565b610672565b34801561020057600080fd5b5061021461020f366004611733565b610859565b005b34801561022257600080fd5b506000545b6040519081526020016101a8565b34801561024157600080fd5b506101d1610250366004611750565b6108dc565b34801561026157600080fd5b506102277f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b34801561029557600080fd5b506102bd7f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101a8565b3480156102db57600080fd5b506102277f000000000000000000000000000000000000000000000000000000000000000081565b34801561030f57600080fd5b5061021461031e3660046115d8565b610950565b34801561032f57600080fd5b5061021461033e366004611791565b610a3f565b34801561034f57600080fd5b506101d161035e3660046117aa565b610a53565b34801561036f57600080fd5b5061022761037e366004611733565b6001600160a01b031660009081526001602052604090205490565b3480156103a557600080fd5b506102146103b4366004611733565b610ba7565b3480156103c557600080fd5b506102276103d4366004611733565b6001600160a01b031660009081526008602052604090205490565b3480156103fb57600080fd5b5060045461040f906001600160a01b031681565b6040516001600160a01b0390911681526020016101a8565b34801561043357600080fd5b5061019b610c18565b34801561044857600080fd5b506102146104573660046115d8565b610c25565b34801561046857600080fd5b50610214610477366004611791565b610e1c565b34801561048857600080fd5b50610214610e54565b34801561049d57600080fd5b506101d16104ac3660046115d8565b610e87565b3480156104bd57600080fd5b5060035461040f906001600160a01b031681565b3480156104dd57600080fd5b506007546101d19060ff1681565b3480156104f757600080fd5b50610214610506366004611831565b610ea2565b34801561051757600080fd5b506102276105263660046118a0565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6006805461055e906118d9565b80601f016020809104026020016040519081016040528092919081815260200182805461058a906118d9565b80156105d75780601f106105ac576101008083540402835291602001916105d7565b820191906000526020600020905b8154815290600101906020018083116105ba57829003601f168201915b505050505081565b600081600260006105ee611191565b6001600160a01b0390811682526020808301939093526040918201600090812091881680825291909352912091909155610626611191565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161066091815260200190565b60405180910390a35060015b92915050565b60606106a186610697886001600160a01b031660009081526008602052604090205490565b4688888888610a53565b6107045760405162461bcd60e51b815260206004820152602960248201527f6d6574617472616e73616374696f6e2d7369676e65722d7369676e617475726560448201526805adad2e6dac2e8c6d60bb1b60648201526084015b60405180910390fd5b61070d86611234565b6000306001600160a01b0316867f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e88960405160200161074e93929190611913565b60408051601f19818403018152908290526107689161194c565b6000604051808303816000865af19150503d80600081146107a5576040519150601f19603f3d011682016040523d82523d6000602084013e6107aa565b606091505b50925090508061080d5760405162461bcd60e51b815260206004820152602860248201527f636f6c6f6e792d6d65746174782d66756e6374696f6e2d63616c6c2d756e737560448201526718d8d95cdcd99d5b60c21b60648201526084016106fb565b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b87610837611191565b8860405161084793929190611968565b60405180910390a15095945050505050565b610876610864611191565b6000356001600160e01b031916611260565b6108925760405162461bcd60e51b81526004016106fb9061199d565b600480546001600160a01b0319166001600160a01b0383169081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60075460009060ff161561093d576108f5610864611191565b61093d5760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b61094884848461133b565b949350505050565b61095b610864611191565b6109775760405162461bcd60e51b81526004016106fb9061199d565b6001600160a01b0382166000908152600160205260408120805483929061099f9084906119e1565b92505081905550806000808282546109b791906119e1565b90915550506040518181526001600160a01b038316907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a26040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b610a50610a4a611191565b82610c25565b50565b600080610ad088308989604051602001610a7094939291906119f4565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b6040805160008082526020820180845284905260ff87169282019290925260608101889052608081018790529192509060019060a0016020604051602081039080840390855afa158015610b28573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610b8b5760405162461bcd60e51b815260206004820152601f60248201527f636f6c6f6e792d6d65746174782d696e76616c69642d7369676e61747572650060448201526064016106fb565b6001600160a01b038a8116911614915050979650505050505050565b610bb2610864611191565b610bce5760405162461bcd60e51b81526004016106fb9061199d565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6005805461055e906118d9565b610c2d611191565b6001600160a01b0316826001600160a01b031614610d2d576001600160a01b03821660009081526002602052604081208291610c67611191565b6001600160a01b03166001600160a01b03168152602001908152602001600020541015610cd65760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03821660009081526002602052604081208291610cf8611191565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610d279190611a3a565b90915550505b6001600160a01b038216600090815260016020526040902054811115610d955760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b03821660009081526001602052604081208054839290610dbd908490611a3a565b9250508190555080600080828254610dd59190611a3a565b90915550506040518181526001600160a01b038316907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59060200160405180910390a25050565b610e27610864611191565b610e435760405162461bcd60e51b81526004016106fb9061199d565b610a50610e4e611191565b82610950565b610e5f610864611191565b610e7b5760405162461bcd60e51b81526004016106fb9061199d565b6007805460ff19169055565b6000610e9b610e94611191565b84846108dc565b9392505050565b60075460ff1615610f0057610eb8610864611191565b610f005760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b42841015610f505760405162461bcd60e51b815260206004820152601d60248201527f636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e6500000060448201526064016106fb565b6040805180820182526002815261190160f01b6020808301919091526001600160a01b038a166000908152600890915291822080547f0000000000000000000000000000000000000000000000000000000000000000917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c9188610fd983611a4d565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161103d93929190611a66565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa1580156110a8573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906110de5750886001600160a01b0316816001600160a01b0316145b61112a5760405162461bcd60e51b815260206004820152601e60248201527f636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e6174757265000060448201526064016106fb565b6001600160a01b038981166000818152600260209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b60003633301480156111a4575060348110155b1561122d57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e8811461121c5733935050505090565b5001516001600160a01b0316919050565b3391505090565b6001600160a01b038116600090815260086020526040812080549161125883611a4d565b919050555050565b6000306001600160a01b0384160361127a5750600161066c565b6004546001600160a01b03908116908416036112985750600161066c565b6003546001600160a01b03166112b05750600061066c565b60035460405163b700961360e01b81526001600160a01b0385811660048301523060248301526001600160e01b0319851660448301529091169063b700961390606401602060405180830381865afa158015611310573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113349190611a8d565b905061066c565b6000611345611191565b6001600160a01b0316846001600160a01b031614611445576001600160a01b0384166000908152600260205260408120839161137f611191565b6001600160a01b03166001600160a01b031681526020019081526020016000205410156113ee5760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03841660009081526002602052604081208391611410611191565b6001600160a01b03166001600160a01b03168152602001908152602001600020600082825461143f9190611a3a565b90915550505b6001600160a01b0384166000908152600160205260409020548211156114ad5760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b038416600090815260016020526040812080548492906114d5908490611a3a565b90915550506001600160a01b038316600090815260016020526040812080548492906115029084906119e1565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161154e91815260200190565b60405180910390a35060019392505050565b60005b8381101561157b578181015183820152602001611563565b50506000910152565b6000815180845261159c816020860160208601611560565b601f01601f19169290920160200192915050565b602081526000610e9b6020830184611584565b6001600160a01b0381168114610a5057600080fd5b600080604083850312156115eb57600080fd5b82356115f6816115c3565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261162b57600080fd5b813567ffffffffffffffff81111561164557611645611604565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561167457611674611604565b60405281815283820160200185101561168c57600080fd5b816020850160208301376000918101602001919091529392505050565b803560ff811681146116ba57600080fd5b919050565b600080600080600060a086880312156116d757600080fd5b85356116e2816115c3565b9450602086013567ffffffffffffffff8111156116fe57600080fd5b61170a8882890161161a565b9450506040860135925060608601359150611727608087016116a9565b90509295509295909350565b60006020828403121561174557600080fd5b8135610e9b816115c3565b60008060006060848603121561176557600080fd5b8335611770816115c3565b92506020840135611780816115c3565b929592945050506040919091013590565b6000602082840312156117a357600080fd5b5035919050565b600080600080600080600060e0888a0312156117c557600080fd5b87356117d0816115c3565b96506020880135955060408801359450606088013567ffffffffffffffff8111156117fa57600080fd5b6118068a828b0161161a565b9450506080880135925060a0880135915061182360c089016116a9565b905092959891949750929550565b600080600080600080600060e0888a03121561184c57600080fd5b8735611857816115c3565b96506020880135611867816115c3565b95506040880135945060608801359350611883608089016116a9565b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156118b357600080fd5b82356118be816115c3565b915060208301356118ce816115c3565b809150509250929050565b600181811c908216806118ed57607f821691505b60208210810361190d57634e487b7160e01b600052602260045260246000fd5b50919050565b60008451611925818460208901611560565b919091019283525060601b6bffffffffffffffffffffffff19166020820152603401919050565b6000825161195e818460208701611560565b9190910192915050565b6001600160a01b0384811682528316602082015260606040820181905260009061199490830184611584565b95945050505050565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561066c5761066c6119cb565b8481526bffffffffffffffffffffffff198460601b16602082015282603482015260008251611a2a816054850160208701611560565b9190910160540195945050505050565b8181038181111561066c5761066c6119cb565b600060018201611a5f57611a5f6119cb565b5060010190565b60008451611a78818460208901611560565b91909101928352506020820152604001919050565b600060208284031215611a9f57600080fd5b81518015158114610e9b57600080fdfea264697066735822122090928a66070125904780390eb49d45fe12c136aec641b1db69316e0ffefc6da764736f6c634300081b0033",_1=n=>n.length>1,Fn=class extends gi{constructor(...e){_1(e)?super(...e):super(Ku,N6,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(Ku)}static connect(e,t){return new oe(e,Ku,t)}};xe(Fn,"bytecode",N6),xe(Fn,"abi",Ku);var Mp=[{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:"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:"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:[{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:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",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:"_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:"_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:"returnData",type:"bytes"}],stateMutability:"payable",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:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"",type:"address"}],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"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",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:"_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:"_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:"_token",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"incrementLockCounterTo",outputs:[],stateMutability:"nonpayable",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:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"pure",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetwork",type:"address"}],name:"setColonyNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",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:"_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:"_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:"_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:"_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"}],Di=class{static createInterface(){return new te.Interface(Mp)}static connect(e,t){return new oe(e,Mp,t)}};xe(Di,"abi",Mp);var Oi;(function(n){n.TokenClient="TokenClient",n.TokenLockingClient="TokenLockingClient"})(Oi||(Oi={}));var Ln;(function(n){n.Colony="Colony",n.ColonyLegacy="ColonyLegacy",n.Erc20="Erc20",n.Erc2612="Erc2612",n.Sai="Sai"})(Ln||(Ln={}));var{AddressZero:M1}=xt;async function C1(n){try{await n.authority();return}catch{throw new Error("Token can not be assigned a TokenAuthority")}}var I1=async(n,e)=>{let t,a=!0,i=!0;t=Fn.connect(n,e);try{await t.totalSupply()}catch(r){throw new Error(`Token is probably not a valid ERC20 token, got ${r.message}`)}try{await t.locked(),await C1(t)}catch{a=!1}try{await t.nonces(M1)}catch{i=!1}return a?t.tokenClientType=Ln.Colony:i?(t=An.connect(n,e),t.tokenClientType=Ln.Erc2612):(t=kn.connect(n,e),t.tokenClientType=Ln.Erc20),t.clientType=Oi.TokenClient,t},Cp=I1;var S1=(n,e)=>{let t=Di.connect(n,e);return t.clientType=Oi.TokenLockingClient,t},Ip=S1;var{AddressZero:Sp}=xt,R1=kn.connect(Sp,new ia.BaseProvider(3656691)).interface,P1=Ni.connect(Sp,new ia.BaseProvider(3656691)).interface,N1=An.connect(Sp,new ia.BaseProvider(3656691)).interface;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:"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:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{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:"returnData",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:"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:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"}],Gs=class{static createInterface(){return new te.Interface(Rp)}static connect(e,t){return new oe(e,Rp,t)}};Gs.abi=Rp;var Pp=[{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:"returnData",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"}],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:"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:!1,internalType:"address",name:"bridgeAddress",type:"address"}],name:"BridgeSet",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:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateSentToBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateStoredFromBridge",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:"uint256",name:"skillId",type:"uint256"}],name:"SkillAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillCreationStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillStoredFromBridge",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:[{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"address",name:"_resolver",type:"address"}],name:"addColonyVersion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_resolver",type:"address"}],name:"addExtensionToNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"addPendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPendingSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"addReputationUpdateLogFromBridge",outputs:[],stateMutability:"nonpayable",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:"_parentSkillId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"addSkillFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",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:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"chainId",type:"uint256"}],name:"bridgeCurrentRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"bridgePendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"skillId",type:"uint256"}],name:"bridgeSkillIfNotMiningChain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"burnUnneededRewards",outputs:[],stateMutability:"nonpayable",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:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"}],name:"claimMiningReward",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:"address",name:"_tokenAddress",type:"address"}],name:"createMetaColony",outputs:[],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:"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:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateExtension",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:"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:"returnData",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"getBridgedReputationUpdateCount",outputs:[{internalType:"uint256",name:"bridgedReputationCount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"}],name:"getBridgedSkillCounts",outputs:[{internalType:"uint256",name:"skillCount",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:"uint256",name:"_id",type:"uint256"}],name:"getColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyBridgeAddress",outputs:[{internalType:"address",name:"bridge",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCreationSalt",outputs:[{internalType:"bytes32",name:"salt",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"}],name:"getColonyVersionResolver",outputs:[{internalType:"address",name:"_resolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentColonyVersion",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getENSRegistrar",outputs:[{internalType:"address",name:"_address",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:[{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:[],name:"getFeeInverse",outputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMetaColony",outputs:[{internalType:"address payable",name:"_colonyAddress",type:"address"}],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:"getMiningChainId",outputs:[{internalType:"uint256",name:"reputationMiningChainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"}],name:"getMiningDelegator",outputs:[{internalType:"address",name:"_delegator",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiningResolver",outputs:[{internalType:"address",name:"miningResolverAddress",type:"address"}],stateMutability:"view",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:"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:"address",name:"_token",type:"address"}],name:"getPayoutWhitelist",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"getPendingReputationUpdate",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:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.PendingReputationUpdate",name:"update",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"getPendingSkillAddition",outputs:[{internalType:"uint256",name:"parentId",type:"uint256"}],stateMutability:"view",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:"_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:[{internalType:"bool",name:"_active",type:"bool"}],name:"getReputationMiningCycle",outputs:[{internalType:"address",name:"_repMiningCycleAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningCycleReward",outputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningSkillId",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"view",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:"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_deprecated",type:"bool"}],internalType:"struct ColonyNetworkDataTypes.Skill",name:"_skill",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSkillCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTokenLocking",outputs:[{internalType:"address",name:"_lockingAddress",type:"address"}],stateMutability:"view",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:"miningChainId",type:"uint256"},{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"}],name:"initialiseReputationMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[{internalType:"uint256",name:"_rootLocalSkillId",type:"uint256"}],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:"address",name:"_colony",type:"address"}],name:"isColony",outputs:[{internalType:"bool",name:"_addressIsColony",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],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:"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:"_stakers",type:"address[]"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"punishStakers",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:"_username",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerUserLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_bridgeAddress",type:"address"}],name:"setColonyBridgeAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],name:"setFeeInverse",outputs:[],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:"_miningResolverAddress",type:"address"}],name:"setMiningResolver",outputs:[],stateMutability:"nonpayable",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:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",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:"uint256",name:"_amount",type:"uint256"}],name:"setReputationMiningCycleReward",outputs:[],stateMutability:"nonpayable",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:[{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"},{internalType:"uint256",name:"nonce",type:"uint256"}],name:"setReputationRootHashFromBridge",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:"address",name:"_tokenLockingAddress",type:"address"}],name:"setTokenLocking",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:"uint256",name:"_amount",type:"uint256"}],name:"stakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"startNextCycle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"startTokenAuction",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:"bytes32",name:"_extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"unstakeForMining",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:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"}],Bi=class{static createInterface(){return new te.Interface(Np)}static connect(e,t){return new oe(e,Np,t)}};Bi.abi=Np;var ka=class{constructor({contract:e,config:t,method:a,args:i,eventData:r,txConfig:s}){this.config=t,this.contract=e,this.method=a,this.args=i,this.eventData=r,this.txConfig=s}async getArgs(e){let t=[];return typeof this.args=="function"?t=await this.args():t=this.args,e&&t.push(e),t}async getTx(e){let t=await this.getArgs(e);return await this.contract.functions[this.method].apply(this.contract,t)}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.config.ipfs.getMetadataForEvent.bind(this.config.ipfs,qs[this.txConfig.metadataType],t.metadata);return[t,e,a]}return[t,e]}return[{},e]}async broadcastMetaTx(e){let{provider:t}=this.config.getSigner();if(!t)throw new Error("No provider found");let i=await(await fetch(`${this.config.metaTxBroadcasterEndpoint}/broadcast`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();if(i.status!=="success")throw new Error(`Could not send Metatransaction. Reason given: ${i.data.reason}`);if(!i.data?.txHash)throw new Error("Could not get transaction hash from broadcaster response");return t.getTransaction(i.data.txHash)}async waitForMetaTx(e){let t=await e.wait();return t.parsedLogs=Jl(t.logs,this.contract.interface),t}tx(){return{send:async e=>{let t=await this.getTx(e);return[t,this.getMined.bind(this,t)]},mined:async e=>{let t=await this.getTx(e);return this.getMined(t)},encode:async()=>{let e=await this.getArgs();return this.contract.interface.encodeFunctionData(this.method,e)}}}};var{arrayify:O1,solidityKeccak256:B1,splitSignature:F1}=te,Ga=class extends ka{async sendMetaTransaction(e,t){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let a=this.config.getSigner(),{provider:i}=a;if(!i)throw new Error("No provider found");let r;this.config.network===Bn.Custom?r=1:r=(await i.getNetwork()).chainId;let s=await a.getAddress(),o=await this.contract.functions.getMetatransactionNonce(s),l=B1(["uint256","address","uint256","bytes"],[o.toString(),t,r,e]),p=O1(l),f=await a.signMessage(p),{r:x,s:I,v:_}=F1(f),v={target:t,payload:e,userAddress:s,r:x,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(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}},Ju=(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=_e.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 Dp=[{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(Dp)}static connect(e,t){return new oe(e,Dp,t)}};Fi.abi=Dp;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:[],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"}],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:[{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"}],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{AddressZero:G1}=xt,Un=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(ja(Un.extensionType),e.address);if(t===G1)throw new Error(`${Un.extensionType} extension is not installed for this Colony`);let a=await Dr(t,e.config.signerOrProvider);if(!Mi(Un.extensionType,a,e.version))throw new Error(`Version ${a} of the ${Un.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Un.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${Un.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new Un(e,r,a)}static getLatestSupportedVersion(){return Un.supportedVersions[Un.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||_e.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[_]),I=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,f,I,x,s,_e.SkillIgnore]},async _=>({...ne("OneTxPaymentMade",_)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[ja(Ae.OneTxPayment),t],async a=>({...ne("ExtensionUpgraded",a)}))}},za=Un;za.supportedVersions=[{version:3,factory:Vi},{version:4,factory:ji},{version:5,factory:Hi}],za.extensionType=Ae.OneTxPayment;var Vn=class{constructor(e,t){typeof t=="string"?this.tokenClient=kn.connect(t,e.config.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 Ws=class extends Vn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=Fn.connect(a,t.config.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 Ks=class extends Vn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=An.connect(a,t.config.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 D6=async(n,e)=>{let t=await Cp(e,n.config.signerOrProvider);switch(t.tokenClientType){case Ln.Colony:return new Ws(n,t);case Ln.Erc20:return new Vn(n,t);case Ln.Erc2612:return new Ks(n,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"}],qi=class{static createInterface(){return new te.Interface(Vp)}static connect(e,t){return new oe(e,Vp,t)}};qi.abi=Vp;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:[{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(jp)}static connect(e,t){return new oe(e,jp,t)}};Gi.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"}],zi=class{static createInterface(){return new te.Interface(Hp)}static connect(e,t){return new oe(e,Hp,t)}};zi.abi=Hp;var{AddressZero:qp}=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===qp)throw new Error(`${jn.extensionType} extension is not installed for this Colony`);let a=await Dr(t,e.config.signerOrProvider);if(!Mi(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.config.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.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 Os(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),this.colony.reputation,this.votingReputationContract,e,qp,ql);return[e,t,qp,ql,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.config.ipfs.uploadMetadata(Pe.Decision,t),[e,a]},async a=>({...ne("Annotation",a)}),{metadataType:Pe.Decision})}approveStake(e,t=_e.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{...Ju("UserTokenApproved",a,i.getInternalTokenLockingContract().interface)}})}stakeMotion(e,t,a){let i=async()=>{let r=await this.colony.config.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(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 I=await this.getMinStake(o,t);if(F.from(a).lt(I))throw new Error(`The staked amount is too small. Please stake at least ${Pr(I)}`);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),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!==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.config.getSigner().getAddress(),{key:p,value:f,branchMask:x,siblings:I}=await this.colony.reputation.getReputationWithProofs(o,l,s),_=await this.createMotionSalt(e),v=te.solidityKeccak256(["bytes","uint256"],[_,t]);return[e,v,p,f,x,I]};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!==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.config.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:I,value:_,branchMask:v,siblings:S}=p;return[e,f,F.from(x),I,_,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!==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.config.getSigner().getAddress(),p=await Ei(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),t,r),{key:f,value:x,branchMask:I,siblings:_}=await this.colony.reputation.getReputationWithProofs(o,l,s);return[e,t,p,f,x,I,_]};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!==Ot.Finalizable)throw new Error(`Motion cannot be finalized. It's currently in "${Ot[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",[ja(Ae.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}}},Wa=jn;Wa.supportedVersions=[{version:7,factory:qi},{version:8,factory:Gi},{version:9,factory:zi}],Wa.extensionType=Ae.VotingReputation;var J1={["motion"]:Wa,["oneTx"]:za},jr=class{static async connect(e,t){let a=await Dr(t,e.config.signerOrProvider),i=jr.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.config.signerOrProvider),s=await r.getToken(),o=await D6(e,s),l=new jr(e,r,o,a);return await l.updateExtensions(),l}static getLatestSupportedVersion(){return jr.supportedVersions[jr.supportedVersions.length-1].version}constructor(e,t,a,i){this.colony=t,this.colonyNetwork=e,this.config=e.config,this.address=t.address,this.ext={},this.reputation=new sa(e.getInternalNetworkContract(),t,{customEndpointUrl:e.config.reputationOracleEndpoint}),this.token=a,this.version=i}createColonyTxCreator(e,t,a,i,r){return new Vr({colony:this,config:this.colonyNetwork.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createPermissionedColonyTxCreator(e,t,a,i,r,s){return new Vr({colony:this,config:this.colonyNetwork.config,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 Wa.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}if(!this.ext.oneTx)try{this.ext.oneTx=await za.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.config.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.config.ipfs.uploadMetadata(Pe.Domain,e),[_e.RootDomain,t]},{roles:wt.Architecture,domain:_e.RootDomain},async t=>({...ne("DomainAdded",t),...ne("FundingPotAdded",t),...ne("DomainMetadata",t)}),{metadataType:Pe.Domain}):this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256)",[_e.RootDomain],{roles:wt.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.config.ipfs.uploadMetadata(Pe.Domain,e),[_e.RootDomain,t]},{roles:wt.Architecture,domain:_e.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 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=_e.RootDomain,s=a||_e.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 ra(this.colonyNetwork.getInternalNetworkContract(),this.colony,r,wt.Funding),x=this.colonyNetwork.getInternalNetworkContract(),I=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,f,r,I,_,v,S,e,o]},async l=>({...ne("ColonyFundsMovedBetweenFundingPots",l)}))}async getReputation(e,t=_e.RootDomain,a=3){let{skillId:i}=await this.colony.getDomain(t);return this.reputation.getReputationFraction(i,e,void 0,a)}async getReputationPoints(e,t=_e.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(address,address,bytes,bool)",a)}))}annotateTransaction(e,t){return this.createColonyTxCreator(this.colony,"annotateTransaction",async()=>{let a;return typeof t=="string"?a=t:a=await this.config.ipfs.uploadMetadata(Pe.Annotation,t),[e,a]},async a=>({...ne("Annotation",a)}),{metadataType:Pe.Annotation})}installExtension(e){let t=J1[e],a=t.getLatestSupportedVersion(),{extensionType:i}=t;if(!Mi(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",[ja(i),t.getLatestSupportedVersion()],async s=>({...Ju("ExtensionInstalled",s,r.interface)}))}async getRoles(e,t=_e.RootDomain){let a=await this.colony.getUserRoles(e,t);return fu(a)}setRoles(e,t,a=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let i=await this.getRoles(e,a),r=Array.from(new Set([...i,...[].concat(t)])),s=Kl(r);return[e,a,s]},{roles:wt.Architecture,domain:a},async i=>({...ne("ColonyRoleSet",i),...ne("RecoveryRoleSet",i)}))}unsetRoles(e,t,a=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let r=(await this.getRoles(e,a)).filter(o=>![].concat(t).includes(o)),s=Kl(r);return[e,a,s]},{roles:wt.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=_e.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=_e.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:wt.Arbitration},async i=>({...ne("ArbitraryReputationUpdate",i)}))}},Hr=jr;Hr.supportedVersions=[{version:11,factory:Fi},{version:12,factory:Li},{version:13,factory:Ui}];var{splitSignature:$1}=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,a]){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let i=this.contract.signer,{provider:r}=i;if(!r)throw new Error("No provider found");let s;this.config.network===Bn.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:a,nonce:l.toString(),deadline:f}),{r:I,s:_,v}=$1(x),S={target:e,owner:o,spender:t,value:a.toString(),deadline:f,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 Js=class{constructor(e,t){this.address=t,this.colonyNetwork=e,this.tokenLockingContract=Ip(this.address,e.config.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 $s=class{constructor(e,t){let a=t?.network||Bn.ArbitrumOne;this.metaTxBroadcasterEndpoint=t?.metaTxBroadcasterEndpoint||yu[a],this.ipfs=new Ur(t?.ipfsAdapter),this.network=a,this.reputationOracleEndpoint=t?.reputationOracleEndpoint||Rr[a],this.signerOrProvider=e}getSigner(){if(!(this.signerOrProvider instanceof Pt))throw new Error("Need a signer to create a transaction");return this.signerOrProvider}};var{namehash:O6}=te,{AddressZero:Gp}=xt,Qs=class{constructor(e,t){this.config=new $s(e,t),this.contract=Bi.connect(t?.customNetworkAddress||pu[this.config.network],e)}async getTokenLocking(){if(!this.locking){let e=await this.contract.getTokenLocking();this.locking=new Js(this,e)}return this.locking}getInternalNetworkContract(){return this.contract}createTxCreator(e,t,a,i,r){return new ka({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createMetaTxCreator(e,t,a,i,r){return new Ga({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createEip2612TxCreator(e,t,a,i,r){return new Qu({config:this.config,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[Gp,e.name,e.symbol,e.decimals||18,0,t,""]}return[e,"","",0,0,t,""]};return a?this.createMetaTxCreator(this.contract,"createColonyForFrontend",async()=>{let r=await i();return typeof a=="string"?r[6]=a:r[6]=await this.config.ipfs.uploadMetadata(Pe.Colony,a),r},async r=>({...ne("TokenDeployed",r),...ne("ColonyAdded",r),...ne("TokenAuthorityDeployed",r)}),{metadataType:Pe.Colony}):this.createMetaTxCreator(this.contract,"createColonyForFrontend",i,async r=>({...ne("TokenDeployed",r),...ne("ColonyAdded",r),...ne("TokenAuthorityDeployed",r)}))}async getColony(e){return Hr.connect(this,e)}async getMetaColony(){let e=await this.contract.getMetaColony();return this.getColony(e)}async getColonyLabel(e){let t=await this.contract.lookupRegisteredENSDomain(e);return t?t.replace(Ns[this.config.network],""):null}async getColonyAddress(e){let t=O6(`${e}${Ns[this.config.network]}`),a=await this.contract.addr(t);return a!==Gp?a:null}async getUsername(e){let t=await this.contract.lookupRegisteredENSDomain(e);return t?t.replace(Ds[this.config.network],""):null}async getUserAddress(e){let t=O6(`${e}${Ds[this.config.network]}`),a=await this.contract.addr(t);return a!==Gp?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.contract,"registerUserLabel",t,async a=>({...ne("UserLabelRegistered",a)}))}deployToken(e,t,a=18){return this.createMetaTxCreator(this.contract,"deployTokenViaNetwork",[e,t,a],async i=>({...ne("TokenDeployed",i)}))}};var{isAddress:Y1}=te,B6=new ia.Web3Provider(window.ethereum),U6,F6,Rt,ln,Wp,X1=async()=>(await B6.send("eth_requestAccounts",[]),B6.getSigner()),Z1=async n=>{let e=await X1();U6=await e.getAddress(),F6=new Qs(e),Rt=await F6.getColony(n)},eg=async n=>{if(!Rt.ext.motions||!Rt.ext.oneTx)throw new Error("Motions & Disputes extension not installed");let[{motionId:e}]=await Rt.ext.oneTx.pay("0x27ff0c145e191c22c75cd123c679c3e1f58a4469",Nr(n)).motion().mined();if(!e)throw new Error("Could not get motionId from tx");return e},tg=async n=>{if(!Rt.ext.motions)throw new Error("Motions & Disputes extension not installed");let e=await Rt.ext.motions.getMotion(n);ln=F.from(n);let t=await Rt.ext.motions.getRemainingStakes(n),a=await Rt.ext.motions.getMotionState(n);return{...e,motionState:Ot[a],remainingStakes:t}},ng=async n=>{await Rt.ext.motions?.approveStake(Nr(n)).tx().mined()},ag=async n=>{await Rt.ext.motions?.stakeMotion(ln,1,n).tx().mined()},ig=async n=>{await Rt.ext.motions?.stakeMotion(ln,0,n).tx().mined()},rg=async()=>{await Rt.ext.motions?.submitVote(ln,1).tx().mined(),Wp=1},sg=async()=>{await Rt.ext.motions?.submitVote(ln,0).tx().mined(),Wp=0},og=async()=>{await Rt.ext.motions?.revealVote(ln,Wp).tx().mined()},ug=async()=>{await Rt.ext.motions?.finalizeMotion(ln).tx().mined()},L6=document.querySelector("#current-wallet-address"),Yu=document.querySelector("#address"),V6=document.querySelector("#stake_clny_amount"),zp=document.querySelector("#payment_amount"),Kp=document.querySelector("#stake_amount"),j6=document.querySelector("#button_create_motion"),H6=document.querySelector("#motion_id"),q6=document.querySelector("#button_connect"),G6=document.querySelector("#button_stake_clny"),z6=document.querySelector("#button_get_motion"),W6=document.querySelector("#button_stake_yay"),K6=document.querySelector("#button_stake_nay"),J6=document.querySelector("#button_vote_yay"),$6=document.querySelector("#button_vote_nay"),Q6=document.querySelector("#button_reveal"),Y6=document.querySelector("#button_finalize"),Jp=document.querySelector("#error"),X6=document.querySelector("#result");if(!Yu||!V6||!zp||!H6||!Kp||!Jp||!X6||!q6||!G6||!j6||!z6||!W6||!K6||!J6||!$6||!Q6||!Y6)throw new Error("Could not find all required HTML elements");var Bt=n=>{Jp.innerText=`Found an error: ${n.message}`,console.error(n)},Aa=()=>{Jp.innerText=""},Ce=n=>{X6.innerText=n};q6.addEventListener("click",async()=>{Aa();let n=Yu.value;if(!Y1(n))return Bt(new Error("This is not a valid address"));Ce("Processing...");try{await Z1(Yu.value),L6&&(L6.innerText=U6),Ce(` +`)}`,g1=n=>({...n,isWhitelistActivated:n.isWhitelistActivated||!1,colonySafes:n.colonySafes||[],colonyTokens:n.colonyTokens||[],verifiedAddresses:n.verifiedAddresses||[]}),Tp=(n,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&&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"?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=gp.default.validate.report(s);r(i)===!1&&((p,f,x=!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}))&&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"?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: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}})(n);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 a=S6(t.errors);throw new Error(a)};var R6=(n,e)=>{let t=n===Pe.Colony?g1(e):e,a=(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&&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"?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=gp.default.validate.report(s);r(i)===!1&&((p,f,x=!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}))&&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"?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: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}})({name:n,data:t,version:bp});if(!a.success){let i=S6(a.errors);throw new Error(i)}return a.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,P6.default)(fetch,{headers:{Accept:"application/json"},retryOn:[404,503],retries:3,retryDelay:5e3}),qs={[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]:""},Ur=class{adapter;constructor(e){this.adapter=e||new wp}static eventSupportsMetadata(e){return!!Object.keys(qs).includes(e)}async getMetadata(e,t){let a=this.adapter.getIpfsUrl(e),r=await(await _p(a)).json();return Tp(r,t)}async getMetadataForEvent(e,t){let a=this.adapter.getIpfsUrl(t),r=await(await _p(a)).json(),s=Object.entries(qs).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),a=await _p(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=R6(e,t),i=JSON.stringify(a);return this.adapter.uploadJson(i)}};var VE=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"}],Ni=class{static createInterface(){return new te.Interface(Ep)}static connect(e,t){return new oe(e,Ep,t)}};xe(Ni,"abi",Ep);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:"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:"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:[{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:"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:"returnData",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"getMetatransactionNonce",outputs:[{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"locked",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",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:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],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:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"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:[],name:"unlock",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"}],N6="0x60c060405234801561001057600080fd5b5060405161205738038061205783398101604081905261002f91610307565b60008060018161003d6101ab565b6001600160a01b031681526020810191909152604001600090812091909155556100656101ab565b600480546001600160a01b0319166001600160a01b039290921691909117905561008d6101ab565b6001600160a01b03167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a260066100ce8482610413565b5060056100db8382610413565b5060ff81166080526007805460ff1916600117905560405146907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f90610123906006906104d1565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051601f19818403018152919052805160209091012060a0525061054692505050565b60003633301480156101be575060348110155b1561024757600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e881146102365733935050505090565b5001516001600160a01b0316919050565b3391505090565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261027557600080fd5b81516001600160401b0381111561028e5761028e61024e565b604051601f8201601f19908116603f011681016001600160401b03811182821017156102bc576102bc61024e565b6040528181528382016020018510156102d457600080fd5b60005b828110156102f3576020818601810151838301820152016102d7565b506000918101602001919091529392505050565b60008060006060848603121561031c57600080fd5b83516001600160401b0381111561033257600080fd5b61033e86828701610264565b602086015190945090506001600160401b0381111561035c57600080fd5b61036886828701610264565b925050604084015160ff8116811461037f57600080fd5b809150509250925092565b600181811c9082168061039e57607f821691505b6020821081036103be57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561040e57806000526020600020601f840160051c810160208510156103eb5750805b601f840160051c820191505b8181101561040b57600081556001016103f7565b50505b505050565b81516001600160401b0381111561042c5761042c61024e565b6104408161043a845461038a565b846103c4565b6020601f821160018114610474576000831561045c5750848201515b600019600385901b1c1916600184901b17845561040b565b600084815260208120601f198516915b828110156104a45787850151825560209485019460019092019101610484565b50848210156104c25786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b60008083546104df8161038a565b6001821680156104f6576001811461050b5761053b565b60ff198316865281151582028601935061053b565b86600052602060002060005b8381101561053357815488820152600190910190602001610517565b505081860193505b509195945050505050565b60805160a051611ae5610572600039600081816102e10152610f870152600061029b0152611ae56000f3fe6080604052600436106101815760003560e01c80637a9e5e4b116100d1578063a69df4b51161008a578063bf7e214f11610064578063bf7e214f146104b1578063cf309012146104d1578063d505accf146104eb578063dd62ed3e1461050b57600080fd5b8063a69df4b51461047c578063a9059cbb14610491578063b3eac1d8146103b957600080fd5b80637a9e5e4b146103995780637ecebe00146103b95780638da5cb5b146103ef57806395d89b41146104275780639dc29fac1461043c578063a0712d681461045c57600080fd5b806330adf81f1161013e57806340c10f191161011857806340c10f191461030357806342966c68146103235780636281133d1461034357806370a082311461036357600080fd5b806330adf81f14610255578063313ce567146102895780633644e515146102cf57600080fd5b806306fdde0314610186578063095ea7b3146101b15780630c53c51c146101e157806313af4035146101f457806318160ddd1461021657806323b872dd14610235575b600080fd5b34801561019257600080fd5b5061019b610551565b6040516101a891906115b0565b60405180910390f35b3480156101bd57600080fd5b506101d16101cc3660046115d8565b6105df565b60405190151581526020016101a8565b61019b6101ef3660046116bf565b610672565b34801561020057600080fd5b5061021461020f366004611733565b610859565b005b34801561022257600080fd5b506000545b6040519081526020016101a8565b34801561024157600080fd5b506101d1610250366004611750565b6108dc565b34801561026157600080fd5b506102277f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b34801561029557600080fd5b506102bd7f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101a8565b3480156102db57600080fd5b506102277f000000000000000000000000000000000000000000000000000000000000000081565b34801561030f57600080fd5b5061021461031e3660046115d8565b610950565b34801561032f57600080fd5b5061021461033e366004611791565b610a3f565b34801561034f57600080fd5b506101d161035e3660046117aa565b610a53565b34801561036f57600080fd5b5061022761037e366004611733565b6001600160a01b031660009081526001602052604090205490565b3480156103a557600080fd5b506102146103b4366004611733565b610ba7565b3480156103c557600080fd5b506102276103d4366004611733565b6001600160a01b031660009081526008602052604090205490565b3480156103fb57600080fd5b5060045461040f906001600160a01b031681565b6040516001600160a01b0390911681526020016101a8565b34801561043357600080fd5b5061019b610c18565b34801561044857600080fd5b506102146104573660046115d8565b610c25565b34801561046857600080fd5b50610214610477366004611791565b610e1c565b34801561048857600080fd5b50610214610e54565b34801561049d57600080fd5b506101d16104ac3660046115d8565b610e87565b3480156104bd57600080fd5b5060035461040f906001600160a01b031681565b3480156104dd57600080fd5b506007546101d19060ff1681565b3480156104f757600080fd5b50610214610506366004611831565b610ea2565b34801561051757600080fd5b506102276105263660046118a0565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6006805461055e906118d9565b80601f016020809104026020016040519081016040528092919081815260200182805461058a906118d9565b80156105d75780601f106105ac576101008083540402835291602001916105d7565b820191906000526020600020905b8154815290600101906020018083116105ba57829003601f168201915b505050505081565b600081600260006105ee611191565b6001600160a01b0390811682526020808301939093526040918201600090812091881680825291909352912091909155610626611191565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161066091815260200190565b60405180910390a35060015b92915050565b60606106a186610697886001600160a01b031660009081526008602052604090205490565b4688888888610a53565b6107045760405162461bcd60e51b815260206004820152602960248201527f6d6574617472616e73616374696f6e2d7369676e65722d7369676e617475726560448201526805adad2e6dac2e8c6d60bb1b60648201526084015b60405180910390fd5b61070d86611234565b6000306001600160a01b0316867f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e88960405160200161074e93929190611913565b60408051601f19818403018152908290526107689161194c565b6000604051808303816000865af19150503d80600081146107a5576040519150601f19603f3d011682016040523d82523d6000602084013e6107aa565b606091505b50925090508061080d5760405162461bcd60e51b815260206004820152602860248201527f636f6c6f6e792d6d65746174782d66756e6374696f6e2d63616c6c2d756e737560448201526718d8d95cdcd99d5b60c21b60648201526084016106fb565b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b87610837611191565b8860405161084793929190611968565b60405180910390a15095945050505050565b610876610864611191565b6000356001600160e01b031916611260565b6108925760405162461bcd60e51b81526004016106fb9061199d565b600480546001600160a01b0319166001600160a01b0383169081179091556040517fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9490600090a250565b60075460009060ff161561093d576108f5610864611191565b61093d5760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b61094884848461133b565b949350505050565b61095b610864611191565b6109775760405162461bcd60e51b81526004016106fb9061199d565b6001600160a01b0382166000908152600160205260408120805483929061099f9084906119e1565b92505081905550806000808282546109b791906119e1565b90915550506040518181526001600160a01b038316907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a26040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b610a50610a4a611191565b82610c25565b50565b600080610ad088308989604051602001610a7094939291906119f4565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b6040805160008082526020820180845284905260ff87169282019290925260608101889052608081018790529192509060019060a0016020604051602081039080840390855afa158015610b28573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610b8b5760405162461bcd60e51b815260206004820152601f60248201527f636f6c6f6e792d6d65746174782d696e76616c69642d7369676e61747572650060448201526064016106fb565b6001600160a01b038a8116911614915050979650505050505050565b610bb2610864611191565b610bce5760405162461bcd60e51b81526004016106fb9061199d565b600380546001600160a01b0319166001600160a01b0383169081179091556040517f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada490600090a250565b6005805461055e906118d9565b610c2d611191565b6001600160a01b0316826001600160a01b031614610d2d576001600160a01b03821660009081526002602052604081208291610c67611191565b6001600160a01b03166001600160a01b03168152602001908152602001600020541015610cd65760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03821660009081526002602052604081208291610cf8611191565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610d279190611a3a565b90915550505b6001600160a01b038216600090815260016020526040902054811115610d955760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b03821660009081526001602052604081208054839290610dbd908490611a3a565b9250508190555080600080828254610dd59190611a3a565b90915550506040518181526001600160a01b038316907fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59060200160405180910390a25050565b610e27610864611191565b610e435760405162461bcd60e51b81526004016106fb9061199d565b610a50610e4e611191565b82610950565b610e5f610864611191565b610e7b5760405162461bcd60e51b81526004016106fb9061199d565b6007805460ff19169055565b6000610e9b610e94611191565b84846108dc565b9392505050565b60075460ff1615610f0057610eb8610864611191565b610f005760405162461bcd60e51b815260206004820152601960248201527818dbdb1bdb9e4b5d1bdad95b8b5d5b985d5d1a1bdc9a5cd959603a1b60448201526064016106fb565b42841015610f505760405162461bcd60e51b815260206004820152601d60248201527f636f6c6f6e792d746f6b656e2d657870697265642d646561646c696e6500000060448201526064016106fb565b6040805180820182526002815261190160f01b6020808301919091526001600160a01b038a166000908152600890915291822080547f0000000000000000000000000000000000000000000000000000000000000000917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918c918c918c9188610fd983611a4d565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e0016040516020818303038152906040528051906020012060405160200161103d93929190611a66565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa1580156110a8573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906110de5750886001600160a01b0316816001600160a01b0316145b61112a5760405162461bcd60e51b815260206004820152601e60248201527f636f6c6f6e792d746f6b656e2d696e76616c69642d7369676e6174757265000060448201526064016106fb565b6001600160a01b038981166000818152600260209081526040808320948d16808452948252918290208b905590518a81527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050505050505050565b60003633301480156111a4575060348110155b1561122d57600080368080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505082810160131901519091507f02bcc191e283bfba76a1369ec8ba06566f33010645097c104c312753e04935e8811461121c5733935050505090565b5001516001600160a01b0316919050565b3391505090565b6001600160a01b038116600090815260086020526040812080549161125883611a4d565b919050555050565b6000306001600160a01b0384160361127a5750600161066c565b6004546001600160a01b03908116908416036112985750600161066c565b6003546001600160a01b03166112b05750600061066c565b60035460405163b700961360e01b81526001600160a01b0385811660048301523060248301526001600160e01b0319851660448301529091169063b700961390606401602060405180830381865afa158015611310573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113349190611a8d565b905061066c565b6000611345611191565b6001600160a01b0316846001600160a01b031614611445576001600160a01b0384166000908152600260205260408120839161137f611191565b6001600160a01b03166001600160a01b031681526020019081526020016000205410156113ee5760405162461bcd60e51b815260206004820152601e60248201527f64732d746f6b656e2d696e73756666696369656e742d617070726f76616c000060448201526064016106fb565b6001600160a01b03841660009081526002602052604081208391611410611191565b6001600160a01b03166001600160a01b03168152602001908152602001600020600082825461143f9190611a3a565b90915550505b6001600160a01b0384166000908152600160205260409020548211156114ad5760405162461bcd60e51b815260206004820152601d60248201527f64732d746f6b656e2d696e73756666696369656e742d62616c616e636500000060448201526064016106fb565b6001600160a01b038416600090815260016020526040812080548492906114d5908490611a3a565b90915550506001600160a01b038316600090815260016020526040812080548492906115029084906119e1565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161154e91815260200190565b60405180910390a35060019392505050565b60005b8381101561157b578181015183820152602001611563565b50506000910152565b6000815180845261159c816020860160208601611560565b601f01601f19169290920160200192915050565b602081526000610e9b6020830184611584565b6001600160a01b0381168114610a5057600080fd5b600080604083850312156115eb57600080fd5b82356115f6816115c3565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261162b57600080fd5b813567ffffffffffffffff81111561164557611645611604565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561167457611674611604565b60405281815283820160200185101561168c57600080fd5b816020850160208301376000918101602001919091529392505050565b803560ff811681146116ba57600080fd5b919050565b600080600080600060a086880312156116d757600080fd5b85356116e2816115c3565b9450602086013567ffffffffffffffff8111156116fe57600080fd5b61170a8882890161161a565b9450506040860135925060608601359150611727608087016116a9565b90509295509295909350565b60006020828403121561174557600080fd5b8135610e9b816115c3565b60008060006060848603121561176557600080fd5b8335611770816115c3565b92506020840135611780816115c3565b929592945050506040919091013590565b6000602082840312156117a357600080fd5b5035919050565b600080600080600080600060e0888a0312156117c557600080fd5b87356117d0816115c3565b96506020880135955060408801359450606088013567ffffffffffffffff8111156117fa57600080fd5b6118068a828b0161161a565b9450506080880135925060a0880135915061182360c089016116a9565b905092959891949750929550565b600080600080600080600060e0888a03121561184c57600080fd5b8735611857816115c3565b96506020880135611867816115c3565b95506040880135945060608801359350611883608089016116a9565b9699959850939692959460a0840135945060c09093013592915050565b600080604083850312156118b357600080fd5b82356118be816115c3565b915060208301356118ce816115c3565b809150509250929050565b600181811c908216806118ed57607f821691505b60208210810361190d57634e487b7160e01b600052602260045260246000fd5b50919050565b60008451611925818460208901611560565b919091019283525060601b6bffffffffffffffffffffffff19166020820152603401919050565b6000825161195e818460208701611560565b9190910192915050565b6001600160a01b0384811682528316602082015260606040820181905260009061199490830184611584565b95945050505050565b602080825260149082015273191ccb585d5d1a0b5d5b985d5d1a1bdc9a5e995960621b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561066c5761066c6119cb565b8481526bffffffffffffffffffffffff198460601b16602082015282603482015260008251611a2a816054850160208701611560565b9190910160540195945050505050565b8181038181111561066c5761066c6119cb565b600060018201611a5f57611a5f6119cb565b5060010190565b60008451611a78818460208901611560565b91909101928352506020820152604001919050565b600060208284031215611a9f57600080fd5b81518015158114610e9b57600080fdfea264697066735822122090928a66070125904780390eb49d45fe12c136aec641b1db69316e0ffefc6da764736f6c634300081b0033",_1=n=>n.length>1,Fn=class extends gi{constructor(...e){_1(e)?super(...e):super(Ju,N6,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(Ju)}static connect(e,t){return new oe(e,Ju,t)}};xe(Fn,"bytecode",N6),xe(Fn,"abi",Ju);var Mp=[{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:"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:"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:[{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:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",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:"_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:"_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:"returnData",type:"bytes"}],stateMutability:"payable",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:[],name:"getColonyNetwork",outputs:[{internalType:"address",name:"",type:"address"}],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"},{internalType:"address",name:"_token",type:"address"},{internalType:"address",name:"_obligator",type:"address"}],name:"getObligation",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",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:"_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:"_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:"_token",type:"address"},{internalType:"uint256",name:"_lockId",type:"uint256"}],name:"incrementLockCounterTo",outputs:[],stateMutability:"nonpayable",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:"_user",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"},{internalType:"address",name:"_token",type:"address"}],name:"obligateStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"pure",type:"function"},{inputs:[{internalType:"contract DSAuthority",name:"authority_",type:"address"}],name:"setAuthority",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colonyNetwork",type:"address"}],name:"setColonyNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"}],name:"setOwner",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:"_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:"_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:"_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:"_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"}],Di=class{static createInterface(){return new te.Interface(Mp)}static connect(e,t){return new oe(e,Mp,t)}};xe(Di,"abi",Mp);var Oi;(function(n){n.TokenClient="TokenClient",n.TokenLockingClient="TokenLockingClient"})(Oi||(Oi={}));var Ln;(function(n){n.Colony="Colony",n.ColonyLegacy="ColonyLegacy",n.Erc20="Erc20",n.Erc2612="Erc2612",n.Sai="Sai"})(Ln||(Ln={}));var{AddressZero:M1}=xt;async function C1(n){try{await n.authority();return}catch{throw new Error("Token can not be assigned a TokenAuthority")}}var I1=async(n,e)=>{let t,a=!0,i=!0;t=Fn.connect(n,e);try{await t.totalSupply()}catch(r){throw new Error(`Token is probably not a valid ERC20 token, got ${r.message}`)}try{await t.locked(),await C1(t)}catch{a=!1}try{await t.nonces(M1)}catch{i=!1}return a?t.tokenClientType=Ln.Colony:i?(t=An.connect(n,e),t.tokenClientType=Ln.Erc2612):(t=kn.connect(n,e),t.tokenClientType=Ln.Erc20),t.clientType=Oi.TokenClient,t},Cp=I1;var S1=(n,e)=>{let t=Di.connect(n,e);return t.clientType=Oi.TokenLockingClient,t},Ip=S1;var{AddressZero:Sp}=xt,R1=kn.connect(Sp,new ia.BaseProvider(3656691)).interface,P1=Ni.connect(Sp,new ia.BaseProvider(3656691)).interface,N1=An.connect(Sp,new ia.BaseProvider(3656691)).interface;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:"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:[],name:"authority",outputs:[{internalType:"contract DSAuthority",name:"",type:"address"}],stateMutability:"view",type:"function"},{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:"returnData",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:"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:"uninstall",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"version",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"pure",type:"function"}],Gs=class{static createInterface(){return new te.Interface(Rp)}static connect(e,t){return new oe(e,Rp,t)}};Gs.abi=Rp;var Pp=[{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:"returnData",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"}],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:"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:!1,internalType:"address",name:"bridgeAddress",type:"address"}],name:"BridgeSet",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:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateSentToBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"count",type:"uint256"}],name:"ReputationUpdateStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"chainId",type:"uint256"},{indexed:!1,internalType:"address",name:"colony",type:"address"},{indexed:!1,internalType:"uint256",name:"updateNumber",type:"uint256"}],name:"ReputationUpdateStoredFromBridge",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:"uint256",name:"skillId",type:"uint256"}],name:"SkillAddedFromBridge",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillCreationStored",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"skillId",type:"uint256"}],name:"SkillStoredFromBridge",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:[{internalType:"uint256",name:"_version",type:"uint256"},{internalType:"address",name:"_resolver",type:"address"}],name:"addColonyVersion",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"address",name:"_resolver",type:"address"}],name:"addExtensionToNetwork",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"addPendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],name:"addPendingSkill",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"address",name:"_user",type:"address"},{internalType:"int256",name:"_amount",type:"int256"},{internalType:"uint256",name:"_skillId",type:"uint256"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"addReputationUpdateLogFromBridge",outputs:[],stateMutability:"nonpayable",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:"_parentSkillId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"addSkillFromBridge",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_node",type:"bytes32"}],name:"addr",outputs:[{internalType:"address",name:"_address",type:"address"}],stateMutability:"view",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:"approveExitRecovery",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"chainId",type:"uint256"}],name:"bridgeCurrentRootHash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"bridgePendingReputationUpdate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"skillId",type:"uint256"}],name:"bridgeSkillIfNotMiningChain",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"burnUnneededRewards",outputs:[],stateMutability:"nonpayable",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:"_slot",type:"uint256"}],name:"checkNotAdditionalProtectedVariable",outputs:[],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"}],name:"claimMiningReward",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:"address",name:"_tokenAddress",type:"address"}],name:"createMetaColony",outputs:[],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:"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:"bytes32",name:"_extensionId",type:"bytes32"},{internalType:"bool",name:"_deprecated",type:"bool"}],name:"deprecateExtension",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:"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:"returnData",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[],name:"exitRecoveryMode",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"}],name:"getBridgedReputationUpdateCount",outputs:[{internalType:"uint256",name:"bridgedReputationCount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"}],name:"getBridgedSkillCounts",outputs:[{internalType:"uint256",name:"skillCount",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:"uint256",name:"_id",type:"uint256"}],name:"getColony",outputs:[{internalType:"address",name:"_colonyAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyBridgeAddress",outputs:[{internalType:"address",name:"bridge",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getColonyCreationSalt",outputs:[{internalType:"bytes32",name:"salt",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_version",type:"uint256"}],name:"getColonyVersionResolver",outputs:[{internalType:"address",name:"_resolverAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentColonyVersion",outputs:[{internalType:"uint256",name:"_version",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getENSRegistrar",outputs:[{internalType:"address",name:"_address",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:[{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:[],name:"getFeeInverse",outputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMetaColony",outputs:[{internalType:"address payable",name:"_colonyAddress",type:"address"}],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:"getMiningChainId",outputs:[{internalType:"uint256",name:"reputationMiningChainId",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_delegate",type:"address"}],name:"getMiningDelegator",outputs:[{internalType:"address",name:"_delegator",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMiningResolver",outputs:[{internalType:"address",name:"miningResolverAddress",type:"address"}],stateMutability:"view",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:"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:"address",name:"_token",type:"address"}],name:"getPayoutWhitelist",outputs:[{internalType:"bool",name:"_status",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"address",name:"_colony",type:"address"},{internalType:"uint256",name:"_updateNumber",type:"uint256"}],name:"getPendingReputationUpdate",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:"uint256",name:"timestamp",type:"uint256"}],internalType:"struct ColonyNetworkDataTypes.PendingReputationUpdate",name:"update",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_chainId",type:"uint256"},{internalType:"uint256",name:"_skillCount",type:"uint256"}],name:"getPendingSkillAddition",outputs:[{internalType:"uint256",name:"parentId",type:"uint256"}],stateMutability:"view",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:"_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:[{internalType:"bool",name:"_active",type:"bool"}],name:"getReputationMiningCycle",outputs:[{internalType:"address",name:"_repMiningCycleAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningCycleReward",outputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReputationMiningSkillId",outputs:[{internalType:"uint256",name:"_skillId",type:"uint256"}],stateMutability:"view",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:"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_deprecated",type:"bool"}],internalType:"struct ColonyNetworkDataTypes.Skill",name:"_skill",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSkillCount",outputs:[{internalType:"uint256",name:"_count",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTokenLocking",outputs:[{internalType:"address",name:"_lockingAddress",type:"address"}],stateMutability:"view",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:"miningChainId",type:"uint256"},{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"}],name:"initialiseReputationMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"initialiseRootLocalSkill",outputs:[{internalType:"uint256",name:"_rootLocalSkillId",type:"uint256"}],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:"address",name:"_colony",type:"address"}],name:"isColony",outputs:[{internalType:"bool",name:"_addressIsColony",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInRecoveryMode",outputs:[{internalType:"bool",name:"inRecoveryMode",type:"bool"}],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:"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:"_stakers",type:"address[]"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"punishStakers",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:"_username",type:"string"},{internalType:"string",name:"_orbitdb",type:"string"}],name:"registerUserLabel",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_user",type:"address"}],name:"removeRecoveryRole",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_recipient",type:"address"},{internalType:"uint256",name:"_amount",type:"uint256"}],name:"reward",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_bridgeAddress",type:"address"}],name:"setColonyBridgeAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_feeInverse",type:"uint256"}],name:"setFeeInverse",outputs:[],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:"_miningResolverAddress",type:"address"}],name:"setMiningResolver",outputs:[],stateMutability:"nonpayable",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:"_user",type:"address"}],name:"setRecoveryRole",outputs:[],stateMutability:"nonpayable",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:"uint256",name:"_amount",type:"uint256"}],name:"setReputationMiningCycleReward",outputs:[],stateMutability:"nonpayable",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:[{internalType:"bytes32",name:"newHash",type:"bytes32"},{internalType:"uint256",name:"newNLeaves",type:"uint256"},{internalType:"uint256",name:"nonce",type:"uint256"}],name:"setReputationRootHashFromBridge",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:"address",name:"_tokenLockingAddress",type:"address"}],name:"setTokenLocking",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:"uint256",name:"_amount",type:"uint256"}],name:"stakeForMining",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"startNextCycle",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_token",type:"address"}],name:"startTokenAuction",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:"bytes32",name:"_extensionId",type:"bytes32"}],name:"uninstallExtension",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_amount",type:"uint256"}],name:"unstakeForMining",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:"_extensionId",type:"bytes32"},{internalType:"uint256",name:"_newVersion",type:"uint256"}],name:"upgradeExtension",outputs:[],stateMutability:"nonpayable",type:"function"}],Bi=class{static createInterface(){return new te.Interface(Np)}static connect(e,t){return new oe(e,Np,t)}};Bi.abi=Np;var ka=class{constructor({contract:e,config:t,method:a,args:i,eventData:r,txConfig:s}){this.config=t,this.contract=e,this.method=a,this.args=i,this.eventData=r,this.txConfig=s}async getArgs(e){let t=[];return typeof this.args=="function"?t=await this.args():t=this.args,e&&t.push(e),t}async getTx(e){let t=await this.getArgs(e);return await this.contract.functions[this.method].apply(this.contract,t)}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.config.ipfs.getMetadataForEvent.bind(this.config.ipfs,qs[this.txConfig.metadataType],t.metadata);return[t,e,a]}return[t,e]}return[{},e]}async broadcastMetaTx(e){let{provider:t}=this.config.getSigner();if(!t)throw new Error("No provider found");let i=await(await fetch(`${this.config.metaTxBroadcasterEndpoint}/broadcast`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();if(i.status!=="success")throw new Error(`Could not send Metatransaction. Reason given: ${i.data.reason}`);if(!i.data?.txHash)throw new Error("Could not get transaction hash from broadcaster response");return t.getTransaction(i.data.txHash)}async waitForMetaTx(e){let t=await e.wait();return t.parsedLogs=Jl(t.logs,this.contract.interface),t}tx(){return{send:async e=>{let t=await this.getTx(e);return[t,this.getMined.bind(this,t)]},mined:async e=>{let t=await this.getTx(e);return this.getMined(t)},encode:async()=>{let e=await this.getArgs();return this.contract.interface.encodeFunctionData(this.method,e)}}}};var{arrayify:O1,solidityKeccak256:B1,splitSignature:F1}=te,Ga=class extends ka{async sendMetaTransaction(e,t){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let a=this.config.getSigner(),{provider:i}=a;if(!i)throw new Error("No provider found");let r;this.config.network===Bn.Custom?r=1:r=(await i.getNetwork()).chainId;let s=await a.getAddress(),o=await this.contract.functions.getMetatransactionNonce(s),l=B1(["uint256","address","uint256","bytes"],[o.toString(),t,r,e]),p=O1(l),f=await a.signMessage(p),{r:x,s:I,v:_}=F1(f),v={target:t,payload:e,userAddress:s,r:x,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(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}},$u=(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=_e.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 Dp=[{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(Dp)}static connect(e,t){return new oe(e,Dp,t)}};Fi.abi=Dp;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:[],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"}],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:[{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"}],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{AddressZero:G1}=xt,Un=class{static async connect(e){let t=await e.colonyNetwork.getInternalNetworkContract().getExtensionInstallation(ja(Un.extensionType),e.address);if(t===G1)throw new Error(`${Un.extensionType} extension is not installed for this Colony`);let a=await Dr(t,e.config.signerOrProvider);if(!Mi(Un.extensionType,a,e.version))throw new Error(`Version ${a} of the ${Un.extensionType} contract is not compatible with the installed Colony contract version ${e.version}`);let i=Un.supportedVersions.find(s=>s.version===a)?.factory;if(!i)throw new Error(`Version ${a} of the ${Un.extensionType} contract is not supported in the SDK as of now`);let r=i.connect(t,e.config.signerOrProvider);return new Un(e,r,a)}static getLatestSupportedVersion(){return Un.supportedVersions[Un.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||_e.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[_]),I=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,f,I,x,s,_e.SkillIgnore]},async _=>({...ne("OneTxPaymentMade",_)}))}upgrade(e){let t=e||this.version+1;return this.colony.createColonyTxCreator(this.colony.getInternalColonyContract(),"upgradeExtension",[ja(Ae.OneTxPayment),t],async a=>({...ne("ExtensionUpgraded",a)}))}},za=Un;za.supportedVersions=[{version:3,factory:Vi},{version:4,factory:ji},{version:5,factory:Hi}],za.extensionType=Ae.OneTxPayment;var Vn=class{constructor(e,t){typeof t=="string"?this.tokenClient=kn.connect(t,e.config.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 Ws=class extends Vn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=Fn.connect(a,t.config.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 Ks=class extends Vn{constructor(t,a){super(t,a);typeof a=="string"?this.tokenClient=An.connect(a,t.config.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 D6=async(n,e)=>{let t=await Cp(e,n.config.signerOrProvider);switch(t.tokenClientType){case Ln.Colony:return new Ws(n,t);case Ln.Erc20:return new Vn(n,t);case Ln.Erc2612:return new Ks(n,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"}],qi=class{static createInterface(){return new te.Interface(Vp)}static connect(e,t){return new oe(e,Vp,t)}};qi.abi=Vp;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:[{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(jp)}static connect(e,t){return new oe(e,jp,t)}};Gi.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"}],zi=class{static createInterface(){return new te.Interface(Hp)}static connect(e,t){return new oe(e,Hp,t)}};zi.abi=Hp;var{AddressZero:qp}=xt;var Qu=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===qp)throw new Error(`${jn.extensionType} extension is not installed for this Colony`);let a=await Dr(t,e.config.signerOrProvider);if(!Mi(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.config.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.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 Os(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),this.colony.reputation,this.votingReputationContract,e,qp,Gl);return[e,t,qp,Gl,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.config.ipfs.uploadMetadata(Pe.Decision,t),[e,a]},async a=>({...ne("Annotation",a)}),{metadataType:Pe.Decision})}approveStake(e,t=_e.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{...$u("UserTokenApproved",a,i.getInternalTokenLockingContract().interface)}})}stakeMotion(e,t,a){let i=async()=>{let r=await this.colony.config.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(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 I=await this.getMinStake(o,t);if(F.from(a).lt(I))throw new Error(`The staked amount is too small. Please stake at least ${Pr(I)}`);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),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!==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.config.getSigner().getAddress(),{key:p,value:f,branchMask:x,siblings:I}=await this.colony.reputation.getReputationWithProofs(o,l,s),_=await this.createMotionSalt(e),v=te.solidityKeccak256(["bytes","uint256"],[_,t]);return[e,v,p,f,x,I]};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!==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.config.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:I,value:_,branchMask:v,siblings:S}=p;return[e,f,F.from(x),I,_,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!==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.config.getSigner().getAddress(),p=await Ei(this.colony.colonyNetwork.getInternalNetworkContract(),this.colony.getInternalColonyContract(),t,r),{key:f,value:x,branchMask:I,siblings:_}=await this.colony.reputation.getReputationWithProofs(o,l,s);return[e,t,p,f,x,I,_]};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!==Ot.Finalizable)throw new Error(`Motion cannot be finalized. It's currently in "${Ot[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",[ja(Ae.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}}},Wa=jn;Wa.supportedVersions=[{version:7,factory:qi},{version:8,factory:Gi},{version:9,factory:zi}],Wa.extensionType=Ae.VotingReputation;var J1={["motion"]:Wa,["oneTx"]:za},jr=class{static async connect(e,t){let a=await Dr(t,e.config.signerOrProvider),i=jr.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.config.signerOrProvider),s=await r.getToken(),o=await D6(e,s),l=new jr(e,r,o,a);return await l.updateExtensions(),l}static getLatestSupportedVersion(){return jr.supportedVersions[jr.supportedVersions.length-1].version}constructor(e,t,a,i){this.colony=t,this.colonyNetwork=e,this.config=e.config,this.address=t.address,this.ext={},this.reputation=new sa(e.getInternalNetworkContract(),t,{customEndpointUrl:e.config.reputationOracleEndpoint}),this.token=a,this.version=i}createColonyTxCreator(e,t,a,i,r){return new Vr({colony:this,config:this.colonyNetwork.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createPermissionedColonyTxCreator(e,t,a,i,r,s){return new Vr({colony:this,config:this.colonyNetwork.config,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 Wa.connect(this)}catch(e){typeof process<"u"&&process?.env?.DEBUG&&console.error(e)}if(!this.ext.oneTx)try{this.ext.oneTx=await za.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.config.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.config.ipfs.uploadMetadata(Pe.Domain,e),[_e.RootDomain,t]},{roles:wt.Architecture,domain:_e.RootDomain},async t=>({...ne("DomainAdded",t),...ne("FundingPotAdded",t),...ne("DomainMetadata",t)}),{metadataType:Pe.Domain}):this.createPermissionedColonyTxCreator(this.colony,"addDomain(uint256,uint256,uint256)",[_e.RootDomain],{roles:wt.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.config.ipfs.uploadMetadata(Pe.Domain,e),[_e.RootDomain,t]},{roles:wt.Architecture,domain:_e.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 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=_e.RootDomain,s=a||_e.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 ra(this.colonyNetwork.getInternalNetworkContract(),this.colony,r,wt.Funding),x=this.colonyNetwork.getInternalNetworkContract(),I=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,f,r,I,_,v,S,e,o]},async l=>({...ne("ColonyFundsMovedBetweenFundingPots",l)}))}async getReputation(e,t=_e.RootDomain,a=3){let{skillId:i}=await this.colony.getDomain(t);return this.reputation.getReputationFraction(i,e,void 0,a)}async getReputationPoints(e,t=_e.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(address,address,bytes,bool)",a)}))}annotateTransaction(e,t){return this.createColonyTxCreator(this.colony,"annotateTransaction",async()=>{let a;return typeof t=="string"?a=t:a=await this.config.ipfs.uploadMetadata(Pe.Annotation,t),[e,a]},async a=>({...ne("Annotation",a)}),{metadataType:Pe.Annotation})}installExtension(e){let t=J1[e],a=t.getLatestSupportedVersion(),{extensionType:i}=t;if(!Mi(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",[ja(i),t.getLatestSupportedVersion()],async s=>({...$u("ExtensionInstalled",s,r.interface)}))}async getRoles(e,t=_e.RootDomain){let a=await this.colony.getUserRoles(e,t);return cu(a)}setRoles(e,t,a=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let i=await this.getRoles(e,a),r=Array.from(new Set([...i,...[].concat(t)])),s=Kl(r);return[e,a,s]},{roles:wt.Architecture,domain:a},async i=>({...ne("ColonyRoleSet",i),...ne("RecoveryRoleSet",i)}))}unsetRoles(e,t,a=_e.RootDomain){return this.createPermissionedColonyTxCreator(this.colony,"setUserRoles",async()=>{let r=(await this.getRoles(e,a)).filter(o=>![].concat(t).includes(o)),s=Kl(r);return[e,a,s]},{roles:wt.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=_e.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=_e.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:wt.Arbitration},async i=>({...ne("ArbitraryReputationUpdate",i)}))}},Hr=jr;Hr.supportedVersions=[{version:11,factory:Fi},{version:12,factory:Li},{version:13,factory:Ui}];var{splitSignature:$1}=te,Yu=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,a]){if(!this.config.metaTxBroadcasterEndpoint)throw new Error(`No metatransaction broadcaster endpoint found for network ${this.config.network}`);let i=this.contract.signer,{provider:r}=i;if(!r)throw new Error("No provider found");let s;this.config.network===Bn.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:a,nonce:l.toString(),deadline:f}),{r:I,s:_,v}=$1(x),S={target:e,owner:o,spender:t,value:a.toString(),deadline:f,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 Js=class{constructor(e,t){this.address=t,this.colonyNetwork=e,this.tokenLockingContract=Ip(this.address,e.config.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 $s=class{constructor(e,t){let a=t?.network||Bn.ArbitrumOne;this.metaTxBroadcasterEndpoint=t?.metaTxBroadcasterEndpoint||yu[a],this.ipfs=new Ur(t?.ipfsAdapter),this.network=a,this.reputationOracleEndpoint=t?.reputationOracleEndpoint||Rr[a],this.signerOrProvider=e}getSigner(){if(!(this.signerOrProvider instanceof Pt))throw new Error("Need a signer to create a transaction");return this.signerOrProvider}};var{namehash:O6}=te,{AddressZero:Gp}=xt,Qs=class{constructor(e,t){this.config=new $s(e,t),this.contract=Bi.connect(t?.customNetworkAddress||pu[this.config.network],e)}async getTokenLocking(){if(!this.locking){let e=await this.contract.getTokenLocking();this.locking=new Js(this,e)}return this.locking}getInternalNetworkContract(){return this.contract}createTxCreator(e,t,a,i,r){return new ka({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createMetaTxCreator(e,t,a,i,r){return new Ga({config:this.config,contract:e,method:t,args:a,eventData:i,txConfig:r})}createEip2612TxCreator(e,t,a,i,r){return new Yu({config:this.config,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[Gp,e.name,e.symbol,e.decimals||18,0,t,""]}return[e,"","",0,0,t,""]};return a?this.createMetaTxCreator(this.contract,"createColonyForFrontend",async()=>{let r=await i();return typeof a=="string"?r[6]=a:r[6]=await this.config.ipfs.uploadMetadata(Pe.Colony,a),r},async r=>({...ne("TokenDeployed",r),...ne("ColonyAdded",r),...ne("TokenAuthorityDeployed",r)}),{metadataType:Pe.Colony}):this.createMetaTxCreator(this.contract,"createColonyForFrontend",i,async r=>({...ne("TokenDeployed",r),...ne("ColonyAdded",r),...ne("TokenAuthorityDeployed",r)}))}async getColony(e){return Hr.connect(this,e)}async getMetaColony(){let e=await this.contract.getMetaColony();return this.getColony(e)}async getColonyLabel(e){let t=await this.contract.lookupRegisteredENSDomain(e);return t?t.replace(Ns[this.config.network],""):null}async getColonyAddress(e){let t=O6(`${e}${Ns[this.config.network]}`),a=await this.contract.addr(t);return a!==Gp?a:null}async getUsername(e){let t=await this.contract.lookupRegisteredENSDomain(e);return t?t.replace(Ds[this.config.network],""):null}async getUserAddress(e){let t=O6(`${e}${Ds[this.config.network]}`),a=await this.contract.addr(t);return a!==Gp?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.contract,"registerUserLabel",t,async a=>({...ne("UserLabelRegistered",a)}))}deployToken(e,t,a=18){return this.createMetaTxCreator(this.contract,"deployTokenViaNetwork",[e,t,a],async i=>({...ne("TokenDeployed",i)}))}};var{isAddress:Y1}=te,B6=new ia.Web3Provider(window.ethereum),U6,F6,Rt,ln,Wp,X1=async()=>(await B6.send("eth_requestAccounts",[]),B6.getSigner()),Z1=async n=>{let e=await X1();U6=await e.getAddress(),F6=new Qs(e),Rt=await F6.getColony(n)},eg=async n=>{if(!Rt.ext.motions||!Rt.ext.oneTx)throw new Error("Motions & Disputes extension not installed");let[{motionId:e}]=await Rt.ext.oneTx.pay("0x27ff0c145e191c22c75cd123c679c3e1f58a4469",Nr(n)).motion().mined();if(!e)throw new Error("Could not get motionId from tx");return e},tg=async n=>{if(!Rt.ext.motions)throw new Error("Motions & Disputes extension not installed");let e=await Rt.ext.motions.getMotion(n);ln=F.from(n);let t=await Rt.ext.motions.getRemainingStakes(n),a=await Rt.ext.motions.getMotionState(n);return{...e,motionState:Ot[a],remainingStakes:t}},ng=async n=>{await Rt.ext.motions?.approveStake(Nr(n)).tx().mined()},ag=async n=>{await Rt.ext.motions?.stakeMotion(ln,1,n).tx().mined()},ig=async n=>{await Rt.ext.motions?.stakeMotion(ln,0,n).tx().mined()},rg=async()=>{await Rt.ext.motions?.submitVote(ln,1).tx().mined(),Wp=1},sg=async()=>{await Rt.ext.motions?.submitVote(ln,0).tx().mined(),Wp=0},og=async()=>{await Rt.ext.motions?.revealVote(ln,Wp).tx().mined()},ug=async()=>{await Rt.ext.motions?.finalizeMotion(ln).tx().mined()},L6=document.querySelector("#current-wallet-address"),Xu=document.querySelector("#address"),V6=document.querySelector("#stake_clny_amount"),zp=document.querySelector("#payment_amount"),Kp=document.querySelector("#stake_amount"),j6=document.querySelector("#button_create_motion"),H6=document.querySelector("#motion_id"),q6=document.querySelector("#button_connect"),G6=document.querySelector("#button_stake_clny"),z6=document.querySelector("#button_get_motion"),W6=document.querySelector("#button_stake_yay"),K6=document.querySelector("#button_stake_nay"),J6=document.querySelector("#button_vote_yay"),$6=document.querySelector("#button_vote_nay"),Q6=document.querySelector("#button_reveal"),Y6=document.querySelector("#button_finalize"),Jp=document.querySelector("#error"),X6=document.querySelector("#result");if(!Xu||!V6||!zp||!H6||!Kp||!Jp||!X6||!q6||!G6||!j6||!z6||!W6||!K6||!J6||!$6||!Q6||!Y6)throw new Error("Could not find all required HTML elements");var Bt=n=>{Jp.innerText=`Found an error: ${n.message}`,console.error(n)},Aa=()=>{Jp.innerText=""},Ce=n=>{X6.innerText=n};q6.addEventListener("click",async()=>{Aa();let n=Xu.value;if(!Y1(n))return Bt(new Error("This is not a valid address"));Ce("Processing...");try{await Z1(Xu.value),L6&&(L6.innerText=U6),Ce(` 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),Ce("")}finally{Yu.value=""}return null});G6.addEventListener("click",async()=>{Aa(),Ce("Processing...");try{await ng(V6.value)}catch(n){Bt(n),Ce("")}Ce("Successfully approved tokens for use in staking")});j6.addEventListener("click",async()=>{Aa(),Ce("Processing...");try{let n=zp.value,e=await eg(n);Ce(`Motion created! Motion ID is: ${e}`)}catch(n){Bt(n),Ce("")}finally{zp.value=""}return null});z6.addEventListener("click",async()=>{let n=H6.value;Ce("Processing...");try{let{domainId:e,altTarget:t,motionState:a,remainingStakes:i}=await tg(n),r={domainId:e.toString(),altTarget:t,motionState:a,remainingYayStakes:Pr(i.remainingToFullyYayStaked),remainingNayStakes:Pr(i.remainingToFullyNayStaked)};Ce(JSON.stringify(r))}catch(e){Bt(e),Ce("")}});W6.addEventListener("click",async()=>{if(Aa(),!ln){Bt(new Error("Please get a motion first (in the previous step) to stake for"));return}Ce("Processing...");let n=Nr(Kp.value);try{await ag(n)}catch(e){Bt(e),Ce("");return}Ce("Staked! Feel free to refresh the motion to see the new values")});K6.addEventListener("click",async()=>{if(Aa(),!ln){Bt(new Error("Please get a motion first (in the previous step) to stake for"));return}Ce("Processing...");let n=Nr(Kp.value);try{await ig(n)}catch(e){Bt(e),Ce("");return}Ce("Staked! Feel free to refresh the motion to see the new values")});J6.addEventListener("click",async()=>{if(Aa(),!ln){Bt(new Error("Please get a motion first (in the previous step) to stake for"));return}Ce("Processing...");try{await rg()}catch(n){Bt(n),Ce("");return}Ce("Voted yay!")});$6.addEventListener("click",async()=>{if(Aa(),!ln){Bt(new Error("Please get a motion first (in the previous step) to stake for"));return}Ce("Processing...");try{await sg()}catch(n){Bt(n),Ce("");return}Ce("Voted nay!")});Q6.addEventListener("click",async()=>{if(Aa(),!ln){Bt(new Error("Please get a motion first (in the previous step) to stake for"));return}Ce("Processing...");try{await og()}catch(n){Bt(n),Ce("");return}Ce("Vote successfully revealed!")});Y6.addEventListener("click",async()=>{if(Aa(),!ln){Bt(new Error("Please get a motion first (in the previous step) to stake for"));return}Ce("Processing...");try{await ug()}catch(n){Bt(n),Ce("");return}Ce("Motion was successfully finailzed. The action was executed and rewards are paid out")});})(); + `)}catch(e){Bt(e),Ce("")}finally{Xu.value=""}return null});G6.addEventListener("click",async()=>{Aa(),Ce("Processing...");try{await ng(V6.value)}catch(n){Bt(n),Ce("")}Ce("Successfully approved tokens for use in staking")});j6.addEventListener("click",async()=>{Aa(),Ce("Processing...");try{let n=zp.value,e=await eg(n);Ce(`Motion created! Motion ID is: ${e}`)}catch(n){Bt(n),Ce("")}finally{zp.value=""}return null});z6.addEventListener("click",async()=>{let n=H6.value;Ce("Processing...");try{let{domainId:e,altTarget:t,motionState:a,remainingStakes:i}=await tg(n),r={domainId:e.toString(),altTarget:t,motionState:a,remainingYayStakes:Pr(i.remainingToFullyYayStaked),remainingNayStakes:Pr(i.remainingToFullyNayStaked)};Ce(JSON.stringify(r))}catch(e){Bt(e),Ce("")}});W6.addEventListener("click",async()=>{if(Aa(),!ln){Bt(new Error("Please get a motion first (in the previous step) to stake for"));return}Ce("Processing...");let n=Nr(Kp.value);try{await ag(n)}catch(e){Bt(e),Ce("");return}Ce("Staked! Feel free to refresh the motion to see the new values")});K6.addEventListener("click",async()=>{if(Aa(),!ln){Bt(new Error("Please get a motion first (in the previous step) to stake for"));return}Ce("Processing...");let n=Nr(Kp.value);try{await ig(n)}catch(e){Bt(e),Ce("");return}Ce("Staked! Feel free to refresh the motion to see the new values")});J6.addEventListener("click",async()=>{if(Aa(),!ln){Bt(new Error("Please get a motion first (in the previous step) to stake for"));return}Ce("Processing...");try{await rg()}catch(n){Bt(n),Ce("");return}Ce("Voted yay!")});$6.addEventListener("click",async()=>{if(Aa(),!ln){Bt(new Error("Please get a motion first (in the previous step) to stake for"));return}Ce("Processing...");try{await sg()}catch(n){Bt(n),Ce("");return}Ce("Voted nay!")});Q6.addEventListener("click",async()=>{if(Aa(),!ln){Bt(new Error("Please get a motion first (in the previous step) to stake for"));return}Ce("Processing...");try{await og()}catch(n){Bt(n),Ce("");return}Ce("Vote successfully revealed!")});Y6.addEventListener("click",async()=>{if(Aa(),!ln){Bt(new Error("Please get a motion first (in the previous step) to stake for"));return}Ce("Processing...");try{await ug()}catch(n){Bt(n),Ce("");return}Ce("Motion was successfully finailzed. The action was executed and rewards are paid out")});})(); /** * [js-sha3]{@link https://github.com/emn178/js-sha3} *