diff --git a/html/PageJs.bundle/page.js b/html/PageJs.bundle/page.js
index c57c86983..722b3f201 100644
--- a/html/PageJs.bundle/page.js
+++ b/html/PageJs.bundle/page.js
@@ -1 +1 @@
-(()=>{var t={795:(t,e,i)=>{"use strict";const n=i(699);function r(t,e,i){try{Reflect.apply(t,e,i)}catch(t){setTimeout((()=>{throw t}))}}class o extends n.EventEmitter{emit(t,...e){let i="error"===t;const n=this._events;if(void 0!==n)i=i&&void 0===n.error;else if(!i)return!1;if(i){let t;if(e.length>0&&([t]=e),t instanceof Error)throw t;const i=new Error("Unhandled error."+(t?` (${t.message})`:""));throw i.context=t,i}const o=n[t];if(void 0===o)return!1;if("function"==typeof o)r(o,this,e);else{const t=o.length,i=function(t){const e=t.length,i=new Array(e);for(let n=0;n=48&&i<=57?i-48:i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:void n(!1,"Invalid character in "+t)}function u(t,e,i){var n=h(t,i);return i-1>=e&&(n|=h(t,i-1)<<4),n}function a(t,e,i,r){for(var o=0,s=0,h=Math.min(t.length,i),u=e;u=49?a-49+10:a>=17?a-17+10:a,n(a>=0&&s0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,i){if("number"==typeof t)return this._initNumber(t,e,i);if("object"==typeof t)return this._initArray(t,e,i);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var r=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(r++,this.negative=1),r=0;r-=3)s=t[r]|t[r-1]<<8|t[r-2]<<16,this.words[o]|=s<>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);else if("le"===i)for(r=0,o=0;r>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);return this._strip()},o.prototype._parseHex=function(t,e,i){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n=e;n-=2)r=u(t,e,n)<=18?(o-=18,s+=1,this.words[s]|=r>>>26):o+=8;else for(n=(t.length-e)%2==0?e+1:e;n=18?(o-=18,s+=1,this.words[s]|=r>>>26):o+=8;this._strip()},o.prototype._parseBase=function(t,e,i){this.words=[0],this.length=1;for(var n=0,r=1;r<=67108863;r*=e)n++;n--,r=r/e|0;for(var o=t.length-i,s=o%n,h=Math.min(o,o-s)+i,u=0,l=i;l1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=f}catch(t){o.prototype.inspect=f}else o.prototype.inspect=f;function f(){return(this.red?""}var c=["","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"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],m=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(t,e,i){i.negative=e.negative^t.negative;var n=t.length+e.length|0;i.length=n,n=n-1|0;var r=0|t.words[0],o=0|e.words[0],s=r*o,h=67108863&s,u=s/67108864|0;i.words[0]=h;for(var a=1;a>>26,f=67108863&u,c=Math.min(a,e.length-1),d=Math.max(0,a-t.length+1);d<=c;d++){var m=a-d|0;l+=(s=(r=0|t.words[m])*(o=0|e.words[d])+f)/67108864|0,f=67108863&s}i.words[a]=0|f,u=0|l}return 0!==u?i.words[a]=0|u:i.length--,i._strip()}o.prototype.toString=function(t,e){var i;if(e=0|e||1,16===(t=t||10)||"hex"===t){i="";for(var r=0,o=0,s=0;s>>24-r&16777215,(r+=2)>=26&&(r-=26,s--),i=0!==o||s!==this.length-1?c[6-u.length]+u+i:u+i}for(0!==o&&(i=o.toString(16)+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(t===(0|t)&&t>=2&&t<=36){var a=d[t],l=m[t];i="";var f=this.clone();for(f.negative=0;!f.isZero();){var p=f.modrn(l).toString(t);i=(f=f.idivn(l)).isZero()?p+i:c[a-p.length]+p+i}for(this.isZero()&&(i="0"+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16,2)},s&&(o.prototype.toBuffer=function(t,e){return this.toArrayLike(s,t,e)}),o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,i){this._strip();var r=this.byteLength(),o=i||Math.max(1,r);n(r<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var s=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this["_toArrayLike"+("le"===e?"LE":"BE")](s,r),s},o.prototype._toArrayLikeLE=function(t,e){for(var i=0,n=0,r=0,o=0;r>8&255),i>16&255),6===o?(i>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(i=0&&(t[i--]=s>>8&255),i>=0&&(t[i--]=s>>16&255),6===o?(i>=0&&(t[i--]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(i>=0)for(t[i--]=n;i>=0;)t[i--]=0},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,i=0;return e>=4096&&(i+=13,e>>>=13),e>=64&&(i+=7,e>>>=7),e>=8&&(i+=4,e>>>=4),e>=2&&(i+=2,e>>>=2),i+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,i=0;return 0==(8191&e)&&(i+=13,e>>>=13),0==(127&e)&&(i+=7,e>>>=7),0==(15&e)&&(i+=4,e>>>=4),0==(3&e)&&(i+=2,e>>>=2),0==(1&e)&&i++,i},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var i=0;it.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,i;this.length>t.length?(e=this,i=t):(e=t,i=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),i=t%26;this._expand(e),i>0&&e--;for(var r=0;r0&&(this.words[r]=~this.words[r]&67108863>>26-i),this._strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var i=t/26|0,r=t%26;return this._expand(i+1),this.words[i]=e?this.words[i]|1<t.length?(i=this,n=t):(i=t,n=this);for(var r=0,o=0;o>>26;for(;0!==r&&o>>26;if(this.length=i.length,0!==r)this.words[this.length]=r,this.length++;else if(i!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var i,n,r=this.cmp(t);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;r>0?(i=this,n=t):(i=t,n=this);for(var o=0,s=0;s>26,this.words[s]=67108863&e;for(;0!==o&&s>26,this.words[s]=67108863&e;if(0===o&&s>>13,d=0|s[1],m=8191&d,p=d>>>13,v=0|s[2],g=8191&v,M=v>>>13,y=0|s[3],w=8191&y,_=y>>>13,E=0|s[4],N=8191&E,b=E>>>13,A=0|s[5],T=8191&A,R=A>>>13,I=0|s[6],O=8191&I,S=I>>>13,C=0|s[7],L=8191&C,D=C>>>13,U=0|s[8],x=8191&U,k=U>>>13,P=0|s[9],G=8191&P,B=P>>>13,K=0|h[0],W=8191&K,j=K>>>13,V=0|h[1],q=8191&V,F=V>>>13,H=0|h[2],X=8191&H,Z=H>>>13,$=0|h[3],z=8191&$,J=$>>>13,Y=0|h[4],Q=8191&Y,tt=Y>>>13,et=0|h[5],it=8191&et,nt=et>>>13,rt=0|h[6],ot=8191&rt,st=rt>>>13,ht=0|h[7],ut=8191&ht,at=ht>>>13,lt=0|h[8],ft=8191<,ct=lt>>>13,dt=0|h[9],mt=8191&dt,pt=dt>>>13;i.negative=t.negative^e.negative,i.length=19;var vt=(a+(n=Math.imul(f,W))|0)+((8191&(r=(r=Math.imul(f,j))+Math.imul(c,W)|0))<<13)|0;a=((o=Math.imul(c,j))+(r>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(m,W),r=(r=Math.imul(m,j))+Math.imul(p,W)|0,o=Math.imul(p,j);var gt=(a+(n=n+Math.imul(f,q)|0)|0)+((8191&(r=(r=r+Math.imul(f,F)|0)+Math.imul(c,q)|0))<<13)|0;a=((o=o+Math.imul(c,F)|0)+(r>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(g,W),r=(r=Math.imul(g,j))+Math.imul(M,W)|0,o=Math.imul(M,j),n=n+Math.imul(m,q)|0,r=(r=r+Math.imul(m,F)|0)+Math.imul(p,q)|0,o=o+Math.imul(p,F)|0;var Mt=(a+(n=n+Math.imul(f,X)|0)|0)+((8191&(r=(r=r+Math.imul(f,Z)|0)+Math.imul(c,X)|0))<<13)|0;a=((o=o+Math.imul(c,Z)|0)+(r>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(w,W),r=(r=Math.imul(w,j))+Math.imul(_,W)|0,o=Math.imul(_,j),n=n+Math.imul(g,q)|0,r=(r=r+Math.imul(g,F)|0)+Math.imul(M,q)|0,o=o+Math.imul(M,F)|0,n=n+Math.imul(m,X)|0,r=(r=r+Math.imul(m,Z)|0)+Math.imul(p,X)|0,o=o+Math.imul(p,Z)|0;var yt=(a+(n=n+Math.imul(f,z)|0)|0)+((8191&(r=(r=r+Math.imul(f,J)|0)+Math.imul(c,z)|0))<<13)|0;a=((o=o+Math.imul(c,J)|0)+(r>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(N,W),r=(r=Math.imul(N,j))+Math.imul(b,W)|0,o=Math.imul(b,j),n=n+Math.imul(w,q)|0,r=(r=r+Math.imul(w,F)|0)+Math.imul(_,q)|0,o=o+Math.imul(_,F)|0,n=n+Math.imul(g,X)|0,r=(r=r+Math.imul(g,Z)|0)+Math.imul(M,X)|0,o=o+Math.imul(M,Z)|0,n=n+Math.imul(m,z)|0,r=(r=r+Math.imul(m,J)|0)+Math.imul(p,z)|0,o=o+Math.imul(p,J)|0;var wt=(a+(n=n+Math.imul(f,Q)|0)|0)+((8191&(r=(r=r+Math.imul(f,tt)|0)+Math.imul(c,Q)|0))<<13)|0;a=((o=o+Math.imul(c,tt)|0)+(r>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(T,W),r=(r=Math.imul(T,j))+Math.imul(R,W)|0,o=Math.imul(R,j),n=n+Math.imul(N,q)|0,r=(r=r+Math.imul(N,F)|0)+Math.imul(b,q)|0,o=o+Math.imul(b,F)|0,n=n+Math.imul(w,X)|0,r=(r=r+Math.imul(w,Z)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,Z)|0,n=n+Math.imul(g,z)|0,r=(r=r+Math.imul(g,J)|0)+Math.imul(M,z)|0,o=o+Math.imul(M,J)|0,n=n+Math.imul(m,Q)|0,r=(r=r+Math.imul(m,tt)|0)+Math.imul(p,Q)|0,o=o+Math.imul(p,tt)|0;var _t=(a+(n=n+Math.imul(f,it)|0)|0)+((8191&(r=(r=r+Math.imul(f,nt)|0)+Math.imul(c,it)|0))<<13)|0;a=((o=o+Math.imul(c,nt)|0)+(r>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(O,W),r=(r=Math.imul(O,j))+Math.imul(S,W)|0,o=Math.imul(S,j),n=n+Math.imul(T,q)|0,r=(r=r+Math.imul(T,F)|0)+Math.imul(R,q)|0,o=o+Math.imul(R,F)|0,n=n+Math.imul(N,X)|0,r=(r=r+Math.imul(N,Z)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,Z)|0,n=n+Math.imul(w,z)|0,r=(r=r+Math.imul(w,J)|0)+Math.imul(_,z)|0,o=o+Math.imul(_,J)|0,n=n+Math.imul(g,Q)|0,r=(r=r+Math.imul(g,tt)|0)+Math.imul(M,Q)|0,o=o+Math.imul(M,tt)|0,n=n+Math.imul(m,it)|0,r=(r=r+Math.imul(m,nt)|0)+Math.imul(p,it)|0,o=o+Math.imul(p,nt)|0;var Et=(a+(n=n+Math.imul(f,ot)|0)|0)+((8191&(r=(r=r+Math.imul(f,st)|0)+Math.imul(c,ot)|0))<<13)|0;a=((o=o+Math.imul(c,st)|0)+(r>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(L,W),r=(r=Math.imul(L,j))+Math.imul(D,W)|0,o=Math.imul(D,j),n=n+Math.imul(O,q)|0,r=(r=r+Math.imul(O,F)|0)+Math.imul(S,q)|0,o=o+Math.imul(S,F)|0,n=n+Math.imul(T,X)|0,r=(r=r+Math.imul(T,Z)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,Z)|0,n=n+Math.imul(N,z)|0,r=(r=r+Math.imul(N,J)|0)+Math.imul(b,z)|0,o=o+Math.imul(b,J)|0,n=n+Math.imul(w,Q)|0,r=(r=r+Math.imul(w,tt)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(g,it)|0,r=(r=r+Math.imul(g,nt)|0)+Math.imul(M,it)|0,o=o+Math.imul(M,nt)|0,n=n+Math.imul(m,ot)|0,r=(r=r+Math.imul(m,st)|0)+Math.imul(p,ot)|0,o=o+Math.imul(p,st)|0;var Nt=(a+(n=n+Math.imul(f,ut)|0)|0)+((8191&(r=(r=r+Math.imul(f,at)|0)+Math.imul(c,ut)|0))<<13)|0;a=((o=o+Math.imul(c,at)|0)+(r>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,n=Math.imul(x,W),r=(r=Math.imul(x,j))+Math.imul(k,W)|0,o=Math.imul(k,j),n=n+Math.imul(L,q)|0,r=(r=r+Math.imul(L,F)|0)+Math.imul(D,q)|0,o=o+Math.imul(D,F)|0,n=n+Math.imul(O,X)|0,r=(r=r+Math.imul(O,Z)|0)+Math.imul(S,X)|0,o=o+Math.imul(S,Z)|0,n=n+Math.imul(T,z)|0,r=(r=r+Math.imul(T,J)|0)+Math.imul(R,z)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(N,Q)|0,r=(r=r+Math.imul(N,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(w,it)|0,r=(r=r+Math.imul(w,nt)|0)+Math.imul(_,it)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(g,ot)|0,r=(r=r+Math.imul(g,st)|0)+Math.imul(M,ot)|0,o=o+Math.imul(M,st)|0,n=n+Math.imul(m,ut)|0,r=(r=r+Math.imul(m,at)|0)+Math.imul(p,ut)|0,o=o+Math.imul(p,at)|0;var bt=(a+(n=n+Math.imul(f,ft)|0)|0)+((8191&(r=(r=r+Math.imul(f,ct)|0)+Math.imul(c,ft)|0))<<13)|0;a=((o=o+Math.imul(c,ct)|0)+(r>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(G,W),r=(r=Math.imul(G,j))+Math.imul(B,W)|0,o=Math.imul(B,j),n=n+Math.imul(x,q)|0,r=(r=r+Math.imul(x,F)|0)+Math.imul(k,q)|0,o=o+Math.imul(k,F)|0,n=n+Math.imul(L,X)|0,r=(r=r+Math.imul(L,Z)|0)+Math.imul(D,X)|0,o=o+Math.imul(D,Z)|0,n=n+Math.imul(O,z)|0,r=(r=r+Math.imul(O,J)|0)+Math.imul(S,z)|0,o=o+Math.imul(S,J)|0,n=n+Math.imul(T,Q)|0,r=(r=r+Math.imul(T,tt)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(N,it)|0,r=(r=r+Math.imul(N,nt)|0)+Math.imul(b,it)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(w,ot)|0,r=(r=r+Math.imul(w,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,n=n+Math.imul(g,ut)|0,r=(r=r+Math.imul(g,at)|0)+Math.imul(M,ut)|0,o=o+Math.imul(M,at)|0,n=n+Math.imul(m,ft)|0,r=(r=r+Math.imul(m,ct)|0)+Math.imul(p,ft)|0,o=o+Math.imul(p,ct)|0;var At=(a+(n=n+Math.imul(f,mt)|0)|0)+((8191&(r=(r=r+Math.imul(f,pt)|0)+Math.imul(c,mt)|0))<<13)|0;a=((o=o+Math.imul(c,pt)|0)+(r>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(G,q),r=(r=Math.imul(G,F))+Math.imul(B,q)|0,o=Math.imul(B,F),n=n+Math.imul(x,X)|0,r=(r=r+Math.imul(x,Z)|0)+Math.imul(k,X)|0,o=o+Math.imul(k,Z)|0,n=n+Math.imul(L,z)|0,r=(r=r+Math.imul(L,J)|0)+Math.imul(D,z)|0,o=o+Math.imul(D,J)|0,n=n+Math.imul(O,Q)|0,r=(r=r+Math.imul(O,tt)|0)+Math.imul(S,Q)|0,o=o+Math.imul(S,tt)|0,n=n+Math.imul(T,it)|0,r=(r=r+Math.imul(T,nt)|0)+Math.imul(R,it)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(N,ot)|0,r=(r=r+Math.imul(N,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,n=n+Math.imul(w,ut)|0,r=(r=r+Math.imul(w,at)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,at)|0,n=n+Math.imul(g,ft)|0,r=(r=r+Math.imul(g,ct)|0)+Math.imul(M,ft)|0,o=o+Math.imul(M,ct)|0;var Tt=(a+(n=n+Math.imul(m,mt)|0)|0)+((8191&(r=(r=r+Math.imul(m,pt)|0)+Math.imul(p,mt)|0))<<13)|0;a=((o=o+Math.imul(p,pt)|0)+(r>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(G,X),r=(r=Math.imul(G,Z))+Math.imul(B,X)|0,o=Math.imul(B,Z),n=n+Math.imul(x,z)|0,r=(r=r+Math.imul(x,J)|0)+Math.imul(k,z)|0,o=o+Math.imul(k,J)|0,n=n+Math.imul(L,Q)|0,r=(r=r+Math.imul(L,tt)|0)+Math.imul(D,Q)|0,o=o+Math.imul(D,tt)|0,n=n+Math.imul(O,it)|0,r=(r=r+Math.imul(O,nt)|0)+Math.imul(S,it)|0,o=o+Math.imul(S,nt)|0,n=n+Math.imul(T,ot)|0,r=(r=r+Math.imul(T,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,n=n+Math.imul(N,ut)|0,r=(r=r+Math.imul(N,at)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,at)|0,n=n+Math.imul(w,ft)|0,r=(r=r+Math.imul(w,ct)|0)+Math.imul(_,ft)|0,o=o+Math.imul(_,ct)|0;var Rt=(a+(n=n+Math.imul(g,mt)|0)|0)+((8191&(r=(r=r+Math.imul(g,pt)|0)+Math.imul(M,mt)|0))<<13)|0;a=((o=o+Math.imul(M,pt)|0)+(r>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(G,z),r=(r=Math.imul(G,J))+Math.imul(B,z)|0,o=Math.imul(B,J),n=n+Math.imul(x,Q)|0,r=(r=r+Math.imul(x,tt)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,n=n+Math.imul(L,it)|0,r=(r=r+Math.imul(L,nt)|0)+Math.imul(D,it)|0,o=o+Math.imul(D,nt)|0,n=n+Math.imul(O,ot)|0,r=(r=r+Math.imul(O,st)|0)+Math.imul(S,ot)|0,o=o+Math.imul(S,st)|0,n=n+Math.imul(T,ut)|0,r=(r=r+Math.imul(T,at)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,at)|0,n=n+Math.imul(N,ft)|0,r=(r=r+Math.imul(N,ct)|0)+Math.imul(b,ft)|0,o=o+Math.imul(b,ct)|0;var It=(a+(n=n+Math.imul(w,mt)|0)|0)+((8191&(r=(r=r+Math.imul(w,pt)|0)+Math.imul(_,mt)|0))<<13)|0;a=((o=o+Math.imul(_,pt)|0)+(r>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(G,Q),r=(r=Math.imul(G,tt))+Math.imul(B,Q)|0,o=Math.imul(B,tt),n=n+Math.imul(x,it)|0,r=(r=r+Math.imul(x,nt)|0)+Math.imul(k,it)|0,o=o+Math.imul(k,nt)|0,n=n+Math.imul(L,ot)|0,r=(r=r+Math.imul(L,st)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,st)|0,n=n+Math.imul(O,ut)|0,r=(r=r+Math.imul(O,at)|0)+Math.imul(S,ut)|0,o=o+Math.imul(S,at)|0,n=n+Math.imul(T,ft)|0,r=(r=r+Math.imul(T,ct)|0)+Math.imul(R,ft)|0,o=o+Math.imul(R,ct)|0;var Ot=(a+(n=n+Math.imul(N,mt)|0)|0)+((8191&(r=(r=r+Math.imul(N,pt)|0)+Math.imul(b,mt)|0))<<13)|0;a=((o=o+Math.imul(b,pt)|0)+(r>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(G,it),r=(r=Math.imul(G,nt))+Math.imul(B,it)|0,o=Math.imul(B,nt),n=n+Math.imul(x,ot)|0,r=(r=r+Math.imul(x,st)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,st)|0,n=n+Math.imul(L,ut)|0,r=(r=r+Math.imul(L,at)|0)+Math.imul(D,ut)|0,o=o+Math.imul(D,at)|0,n=n+Math.imul(O,ft)|0,r=(r=r+Math.imul(O,ct)|0)+Math.imul(S,ft)|0,o=o+Math.imul(S,ct)|0;var St=(a+(n=n+Math.imul(T,mt)|0)|0)+((8191&(r=(r=r+Math.imul(T,pt)|0)+Math.imul(R,mt)|0))<<13)|0;a=((o=o+Math.imul(R,pt)|0)+(r>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(G,ot),r=(r=Math.imul(G,st))+Math.imul(B,ot)|0,o=Math.imul(B,st),n=n+Math.imul(x,ut)|0,r=(r=r+Math.imul(x,at)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,at)|0,n=n+Math.imul(L,ft)|0,r=(r=r+Math.imul(L,ct)|0)+Math.imul(D,ft)|0,o=o+Math.imul(D,ct)|0;var Ct=(a+(n=n+Math.imul(O,mt)|0)|0)+((8191&(r=(r=r+Math.imul(O,pt)|0)+Math.imul(S,mt)|0))<<13)|0;a=((o=o+Math.imul(S,pt)|0)+(r>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(G,ut),r=(r=Math.imul(G,at))+Math.imul(B,ut)|0,o=Math.imul(B,at),n=n+Math.imul(x,ft)|0,r=(r=r+Math.imul(x,ct)|0)+Math.imul(k,ft)|0,o=o+Math.imul(k,ct)|0;var Lt=(a+(n=n+Math.imul(L,mt)|0)|0)+((8191&(r=(r=r+Math.imul(L,pt)|0)+Math.imul(D,mt)|0))<<13)|0;a=((o=o+Math.imul(D,pt)|0)+(r>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,n=Math.imul(G,ft),r=(r=Math.imul(G,ct))+Math.imul(B,ft)|0,o=Math.imul(B,ct);var Dt=(a+(n=n+Math.imul(x,mt)|0)|0)+((8191&(r=(r=r+Math.imul(x,pt)|0)+Math.imul(k,mt)|0))<<13)|0;a=((o=o+Math.imul(k,pt)|0)+(r>>>13)|0)+(Dt>>>26)|0,Dt&=67108863;var Ut=(a+(n=Math.imul(G,mt))|0)+((8191&(r=(r=Math.imul(G,pt))+Math.imul(B,mt)|0))<<13)|0;return a=((o=Math.imul(B,pt))+(r>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,u[0]=vt,u[1]=gt,u[2]=Mt,u[3]=yt,u[4]=wt,u[5]=_t,u[6]=Et,u[7]=Nt,u[8]=bt,u[9]=At,u[10]=Tt,u[11]=Rt,u[12]=It,u[13]=Ot,u[14]=St,u[15]=Ct,u[16]=Lt,u[17]=Dt,u[18]=Ut,0!==a&&(u[19]=a,i.length++),i};function g(t,e,i){i.negative=e.negative^t.negative,i.length=t.length+e.length;for(var n=0,r=0,o=0;o>>26)|0)>>>26,s&=67108863}i.words[o]=h,n=s,s=r}return 0!==n?i.words[o]=n:i.length--,i._strip()}function M(t,e,i){return g(t,e,i)}function y(t,e){this.x=t,this.y=e}Math.imul||(v=p),o.prototype.mulTo=function(t,e){var i=this.length+t.length;return 10===this.length&&10===t.length?v(this,t,e):i<63?p(this,t,e):i<1024?g(this,t,e):M(this,t,e)},y.prototype.makeRBT=function(t){for(var e=new Array(t),i=o.prototype._countBits(t)-1,n=0;n>=1;return n},y.prototype.permute=function(t,e,i,n,r,o){for(var s=0;s>>=1)r++;return 1<>>=13,i[2*s+1]=8191&o,o>>>=13;for(s=2*e;s>=26,i+=o/67108864|0,i+=s>>>26,this.words[r]=67108863&s}return 0!==i&&(this.words[r]=i,this.length++),e?this.ineg():this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),i=0;i>>r&1}return e}(t);if(0===e.length)return new o(1);for(var i=this,n=0;n=0);var e,i=t%26,r=(t-i)/26,o=67108863>>>26-i<<26-i;if(0!==i){var s=0;for(e=0;e>>26-i}s&&(this.words[e]=s,this.length++)}if(0!==r){for(e=this.length-1;e>=0;e--)this.words[e+r]=this.words[e];for(e=0;e=0),r=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),h=67108863^67108863>>>o<s)for(this.length-=s,a=0;a=0&&(0!==l||a>=r);a--){var f=0|this.words[a];this.words[a]=l<<26-o|f>>>o,l=f&h}return u&&0!==l&&(u.words[u.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(t,e,i){return n(0===this.negative),this.iushrn(t,e,i)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,i=(t-e)/26,r=1<=0);var e=t%26,i=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==e&&i++,this.length=Math.min(i,this.length),0!==e){var r=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[r+i]=67108863&o}for(;r>26,this.words[r+i]=67108863&o;if(0===h)return this._strip();for(n(-1===h),h=0,r=0;r>26,this.words[r]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,e){var i=(this.length,t.length),n=this.clone(),r=t,s=0|r.words[r.length-1];0!=(i=26-this._countBits(s))&&(r=r.ushln(i),n.iushln(i),s=0|r.words[r.length-1]);var h,u=n.length-r.length;if("mod"!==e){(h=new o(null)).length=u+1,h.words=new Array(h.length);for(var a=0;a=0;f--){var c=67108864*(0|n.words[r.length+f])+(0|n.words[r.length+f-1]);for(c=Math.min(c/s|0,67108863),n._ishlnsubmul(r,c,f);0!==n.negative;)c--,n.negative=0,n._ishlnsubmul(r,1,f),n.isZero()||(n.negative^=1);h&&(h.words[f]=c)}return h&&h._strip(),n._strip(),"div"!==e&&0!==i&&n.iushrn(i),{div:h||null,mod:n}},o.prototype.divmod=function(t,e,i){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(h=this.neg().divmod(t,e),"mod"!==e&&(r=h.div.neg()),"div"!==e&&(s=h.mod.neg(),i&&0!==s.negative&&s.iadd(t)),{div:r,mod:s}):0===this.negative&&0!==t.negative?(h=this.divmod(t.neg(),e),"mod"!==e&&(r=h.div.neg()),{div:r,mod:h.mod}):0!=(this.negative&t.negative)?(h=this.neg().divmod(t.neg(),e),"div"!==e&&(s=h.mod.neg(),i&&0!==s.negative&&s.isub(t)),{div:h.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modrn(t.words[0]))}:this._wordDiv(t,e);var r,s,h},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var i=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),r=t.andln(1),o=i.cmp(n);return o<0||1===r&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modrn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var i=(1<<26)%t,r=0,o=this.length-1;o>=0;o--)r=(i*r+(0|this.words[o]))%t;return e?-r:r},o.prototype.modn=function(t){return this.modrn(t)},o.prototype.idivn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var i=0,r=this.length-1;r>=0;r--){var o=(0|this.words[r])+67108864*i;this.words[r]=o/t|0,i=o%t}return this._strip(),e?this.ineg():this},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var r=new o(1),s=new o(0),h=new o(0),u=new o(1),a=0;e.isEven()&&i.isEven();)e.iushrn(1),i.iushrn(1),++a;for(var l=i.clone(),f=e.clone();!e.isZero();){for(var c=0,d=1;0==(e.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(e.iushrn(c);c-- >0;)(r.isOdd()||s.isOdd())&&(r.iadd(l),s.isub(f)),r.iushrn(1),s.iushrn(1);for(var m=0,p=1;0==(i.words[0]&p)&&m<26;++m,p<<=1);if(m>0)for(i.iushrn(m);m-- >0;)(h.isOdd()||u.isOdd())&&(h.iadd(l),u.isub(f)),h.iushrn(1),u.iushrn(1);e.cmp(i)>=0?(e.isub(i),r.isub(h),s.isub(u)):(i.isub(e),h.isub(r),u.isub(s))}return{a:h,b:u,gcd:i.iushln(a)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var r,s=new o(1),h=new o(0),u=i.clone();e.cmpn(1)>0&&i.cmpn(1)>0;){for(var a=0,l=1;0==(e.words[0]&l)&&a<26;++a,l<<=1);if(a>0)for(e.iushrn(a);a-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var f=0,c=1;0==(i.words[0]&c)&&f<26;++f,c<<=1);if(f>0)for(i.iushrn(f);f-- >0;)h.isOdd()&&h.iadd(u),h.iushrn(1);e.cmp(i)>=0?(e.isub(i),s.isub(h)):(i.isub(e),h.isub(s))}return(r=0===e.cmpn(1)?s:h).cmpn(0)<0&&r.iadd(t),r},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),i=t.clone();e.negative=0,i.negative=0;for(var n=0;e.isEven()&&i.isEven();n++)e.iushrn(1),i.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;i.isEven();)i.iushrn(1);var r=e.cmp(i);if(r<0){var o=e;e=i,i=o}else if(0===r||0===i.cmpn(1))break;e.isub(i)}return i.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,i=(t-e)/26,r=1<>>26,h&=67108863,this.words[s]=h}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,i=t<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this._strip(),this.length>1)e=1;else{i&&(t=-t),n(t<=67108863,"Number is too big");var r=0|this.words[0];e=r===t?0:rt.length)return 1;if(this.length=0;i--){var n=0|this.words[i],r=0|t.words[i];if(n!==r){nr&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new T(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var w={k256:null,p224:null,p192:null,p25519:null};function _(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function E(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function N(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function b(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function T(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function R(t){T.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(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)}_.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},_.prototype.ireduce=function(t){var e,i=t;do{this.split(i,this.tmp),e=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},_.prototype.split=function(t,e){t.iushrn(this.n,0,e)},_.prototype.imulK=function(t){return t.imul(this.k)},r(E,_),E.prototype.split=function(t,e){for(var i=4194303,n=Math.min(t.length,9),r=0;r>>22,o=s}o>>>=22,t.words[r-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},E.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,i=0;i>>=26,t.words[i]=r,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(w[t])return w[t];var e;if("k256"===t)e=new E;else if("p224"===t)e=new N;else if("p192"===t)e=new b;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new A}return w[t]=e,e},T.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},T.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},T.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(l(t,t.umod(this.m)._forceRed(this)),t)},T.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},T.prototype.add=function(t,e){this._verify2(t,e);var i=t.add(e);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},T.prototype.iadd=function(t,e){this._verify2(t,e);var i=t.iadd(e);return i.cmp(this.m)>=0&&i.isub(this.m),i},T.prototype.sub=function(t,e){this._verify2(t,e);var i=t.sub(e);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},T.prototype.isub=function(t,e){this._verify2(t,e);var i=t.isub(e);return i.cmpn(0)<0&&i.iadd(this.m),i},T.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},T.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},T.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},T.prototype.isqr=function(t){return this.imul(t,t.clone())},T.prototype.sqr=function(t){return this.mul(t,t)},T.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var i=this.m.add(new o(1)).iushrn(2);return this.pow(t,i)}for(var r=this.m.subn(1),s=0;!r.isZero()&&0===r.andln(1);)s++,r.iushrn(1);n(!r.isZero());var h=new o(1).toRed(this),u=h.redNeg(),a=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,a).cmp(u);)l.redIAdd(u);for(var f=this.pow(l,r),c=this.pow(t,r.addn(1).iushrn(1)),d=this.pow(t,r),m=s;0!==d.cmp(h);){for(var p=d,v=0;0!==p.cmp(h);v++)p=p.redSqr();n(v=0;n--){for(var a=e.words[n],l=u-1;l>=0;l--){var f=a>>l&1;r!==i[0]&&(r=this.sqr(r)),0!==f||0!==s?(s<<=1,s|=f,(4==++h||0===n&&0===l)&&(r=this.mul(r,i[s]),h=0,s=0)):h=0}u=26}return r},T.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},T.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new R(t)},r(R,T),R.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},R.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},R.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var i=t.imul(e),n=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=i.isub(n).iushrn(this.shift),o=r;return r.cmp(this.m)>=0?o=r.isub(this.m):r.cmpn(0)<0&&(o=r.iadd(this.m)),o._forceRed(this)},R.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var i=t.mul(e),n=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=i.isub(n).iushrn(this.shift),s=r;return r.cmp(this.m)>=0?s=r.isub(this.m):r.cmpn(0)<0&&(s=r.iadd(this.m)),s._forceRed(this)},R.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=i.nmd(t),this)},161:t=>{"use strict";var e=Object.prototype.hasOwnProperty,i="~";function n(){}function r(t,e,i){this.fn=t,this.context=e,this.once=i||!1}function o(t,e,n,o,s){if("function"!=typeof n)throw new TypeError("The listener must be a function");var h=new r(n,o||t,s),u=i?i+e:e;return t._events[u]?t._events[u].fn?t._events[u]=[t._events[u],h]:t._events[u].push(h):(t._events[u]=h,t._eventsCount++),t}function s(t,e){0==--t._eventsCount?t._events=new n:delete t._events[e]}function h(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(i=!1)),h.prototype.eventNames=function(){var t,n,r=[];if(0===this._eventsCount)return r;for(n in t=this._events)e.call(t,n)&&r.push(i?n.slice(1):n);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(t)):r},h.prototype.listeners=function(t){var e=i?i+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,o=n.length,s=new Array(o);r{"use strict";var e,i="object"==typeof Reflect?Reflect:null,n=i&&"function"==typeof i.apply?i.apply:function(t,e,i){return Function.prototype.apply.call(t,e,i)};e=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var r=Number.isNaN||function(t){return t!=t};function o(){o.init.call(this)}t.exports=o,t.exports.once=function(t,e){return new Promise((function(i,n){function r(i){t.removeListener(e,o),n(i)}function o(){"function"==typeof t.removeListener&&t.removeListener("error",r),i([].slice.call(arguments))}p(t,e,o,{once:!0}),"error"!==e&&function(t,e,i){"function"==typeof t.on&&p(t,"error",e,{once:!0})}(t,r)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function h(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function u(t){return void 0===t._maxListeners?o.defaultMaxListeners:t._maxListeners}function a(t,e,i,n){var r,o,s,a;if(h(i),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,i.listener?i.listener:i),o=t._events),s=o[e]),void 0===s)s=o[e]=i,++t._eventsCount;else if("function"==typeof s?s=o[e]=n?[i,s]:[s,i]:n?s.unshift(i):s.push(i),(r=u(t))>0&&s.length>r&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=t,l.type=e,l.count=s.length,a=l,console&&console.warn&&console.warn(a)}return t}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(t,e,i){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:i},r=l.bind(n);return r.listener=i,n.wrapFn=r,r}function c(t,e,i){var n=t._events;if(void 0===n)return[];var r=n[e];return void 0===r?[]:"function"==typeof r?i?[r.listener||r]:[r]:i?function(t){for(var e=new Array(t.length),i=0;i0&&(s=e[0]),s instanceof Error)throw s;var h=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw h.context=s,h}var u=o[t];if(void 0===u)return!1;if("function"==typeof u)n(u,this,e);else{var a=u.length,l=m(u,a);for(i=0;i=0;o--)if(i[o]===e||i[o].listener===e){s=i[o].listener,r=o;break}if(r<0)return this;0===r?i.shift():function(t,e){for(;e+1=0;n--)this.removeListener(t,e[n]);return this},o.prototype.listeners=function(t){return c(this,t,!0)},o.prototype.rawListeners=function(t){return c(this,t,!1)},o.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):d.call(t,e)},o.prototype.listenerCount=d,o.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},196:()=>{}},e={};function i(n){var r=e[n];if(void 0!==r)return r.exports;var o=e[n]={id:n,loaded:!1,exports:{}};return t[n].call(o.exports,o,o.exports,i),o.loaded=!0,o.exports}i.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),(()=>{"use strict";const t={NODE_ENV:"production",PKG_NAME:"@subwallet/extension-koni",PKG_VERSION:"1.1.7-0",TARGET_ENV:"extension",TRANSAK_API_KEY:"4b3bfb00-7f7c-44b3-844f-d4504f1065be",TRANSAK_TEST_MODE:!1,BANXA_TEST_MODE:!1,BANXA_SANDBOX_API_KEY:"subwallet@prod202308041731",BANXA_SANBOX_API_SECRET:"plz9j4qlTuxb79ChAzM2G5ds5NNfcrBI"}.EXTENSION_PREFIX||"",e=`${t}koni-page`,n=`${t}koni-content`;class r extends Error{constructor(t,e,i,n){super(e),this.errorType=t,this.code=i,this.data=n}toJSON(){return{name:this.name,message:this.message,code:this.code}}}const o={CHAIN_DISCONNECTED:{message:"Chain is disconnected",code:void 0},INVALID_PARAMS:{message:"Invalid params",code:void 0},INTERNAL_ERROR:{message:"Internal error",code:void 0},USER_REJECT:{message:"User reject request",code:void 0}};class s extends r{constructor(t,e,i){const{code:n,message:r}=o[t];super(t,e||r,n,i),this.errorType=t}}let h,u,a,l,f,c,d,m,p,v,g,M,y,w,_,E,N,b,A,T,R,I,O,S,C,L,D;!function(t){t.Web="Web",t.Node="Node",t.ExtensionChrome="Extension (Chrome)",t.ExtensionFirefox="Extension (Firefox)",t.WebWorker="Web Worker",t.ServiceWorker="Service Worker",t.Unknown="Unknown"}(h||(h={})),function(t){t.NOMINATED="nominated",t.POOLED="pooled"}(u||(u={})),function(t){t.PENDING="pending",t.READY="ready",t.CACHED="cached",t.ERROR="error",t.NOT_SUPPORT="not_support"}(a||(a={})),function(t){t.VER_1="1.0.0",t.VER_2="2.0.0"}(l||(l={})),function(t){t.ONGOING="ongoing",t.COMPLETED="completed",t.FAILED="failed"}(f||(f={})),function(t){t.wasm="wasm",t.evm="evm"}(c||(c={})),function(t){t.SEND="send",t.RECEIVED="received"}(d||(d={})),function(t){t.EVM="evm",t.SUBSTRATE="substrate"}(m||(m={})),function(t){t.TRANSFER_BALANCE="transfer.balance",t.TRANSFER_TOKEN="transfer.token",t.TRANSFER_XCM="transfer.xcm",t.SEND_NFT="send_nft",t.CROWDLOAN="crowdloan",t.STAKING_JOIN_POOL="staking.join_pool",t.STAKING_LEAVE_POOL="staking.leave_pool",t.STAKING_POOL_WITHDRAW="staking.pool_withdraw",t.STAKING_BOND="staking.bond",t.STAKING_UNBOND="staking.unbond",t.STAKING_CLAIM_REWARD="staking.claim_reward",t.STAKING_WITHDRAW="staking.withdraw",t.STAKING_COMPOUNDING="staking.compounding",t.STAKING_CANCEL_COMPOUNDING="staking.cancel_compounding",t.STAKING_CANCEL_UNSTAKE="staking.cancel_unstake",t.EVM_EXECUTE="evm.execute",t.UNKNOWN="unknown"}(p||(p={})),function(t){t.QUEUED="queued",t.SUBMITTING="submitting",t.PROCESSING="processing",t.SUCCESS="success",t.FAIL="fail",t.CANCELLED="cancelled",t.UNKNOWN="unknown"}(v||(v={})),function(t){t.NOT_ENOUGH_BALANCE="NOT_ENOUGH_BALANCE",t.CHAIN_DISCONNECTED="CHAIN_DISCONNECTED",t.INVALID_PARAMS="INVALID_PARAMS",t.DUPLICATE_TRANSACTION="DUPLICATE_TRANSACTION",t.UNABLE_TO_SIGN="UNABLE_TO_SIGN",t.USER_REJECT_REQUEST="USER_REJECT_REQUEST",t.UNABLE_TO_SEND="UNABLE_TO_SEND",t.SEND_TRANSACTION_FAILED="SEND_TRANSACTION_FAILED",t.INTERNAL_ERROR="INTERNAL_ERROR",t.UNSUPPORTED="UNSUPPORTED",t.TIMEOUT="TIMEOUT",t.NOT_ENOUGH_EXISTENTIAL_DEPOSIT="NOT_ENOUGH_EXISTENTIAL_DEPOSIT"}(g||(g={})),function(t){t.NOT_ENOUGH_MIN_STAKE="NOT_ENOUGH_MIN_STAKE",t.EXCEED_MAX_NOMINATIONS="EXCEED_MAX_NOMINATIONS",t.EXIST_UNSTAKING_REQUEST="EXIST_UNSTAKING_REQUEST",t.INVALID_ACTIVE_STAKE="INVALID_ACTIVE_STAKE",t.EXCEED_MAX_UNSTAKING="EXCEED_MAX_UNSTAKING",t.INACTIVE_NOMINATION_POOL="INACTIVE_NOMINATION_POOL"}(M||(M={})),function(t){t.NOT_ENOUGH_VALUE="NOT_ENOUGH_VALUE",t.NOT_ENOUGH_FEE="NOT_ENOUGH_FEE",t.INVALID_TOKEN="INVALID_TOKEN",t.TRANSFER_ERROR="TRANSFER_ERROR",t.RECEIVER_NOT_ENOUGH_EXISTENTIAL_DEPOSIT="RECEIVER_NOT_ENOUGH_EXISTENTIAL_DEPOSIT"}(y||(y={})),function(t){t.NOT_ENOUGH_EXISTENTIAL_DEPOSIT="notEnoughExistentialDeposit"}(w||(w={})),function(t){t.NETWORK_ERROR="NETWORK_ERROR",t.TOKEN_ERROR="TOKEN_ERROR",t.TIMEOUT="TIMEOUT",t.GET_BALANCE_ERROR="GET_BALANCE_ERROR"}(_||(_={})),function(t){t.CHAIN_DISCONNECTED="CHAIN_DISCONNECTED",t.INVALID_PARAMS="INVALID_PARAMS",t.INTERNAL_ERROR="INTERNAL_ERROR",t.USER_REJECT="USER_REJECT"}(E||(E={})),function(t){t.INVALID_ADDRESS="invalidToAccount",t.KEYRING_ERROR="keyringError",t.UNKNOWN_ERROR="unknownError"}(N||(N={})),function(t){t[t.PENDING=0]="PENDING",t[t.REJECTED=1]="REJECTED",t[t.FAILED=2]="FAILED",t[t.COMPLETED=3]="COMPLETED"}(b||(b={})),function(t){t.LIGHT="light",t.DARK="dark",t.SUBSPACE="subspace"}(A||(A={})),function(t){t.INVALID_INFO_TYPE="invalidInfoType",t.INJECT_SCRIPT_DETECTED="injectScriptDetected",t.EXISTED_NETWORK="existedNetwork",t.EXISTED_PROVIDER="existedProvider",t.INVALID_PROVIDER="invalidProvider",t.NONE="none",t.CONNECTION_FAILURE="connectionFailure",t.PROVIDER_NOT_SAME_NETWORK="providerNotSameNetwork"}(T||(T={})),function(t){t.CONNECTED="connected",t.CONNECTING="connecting",t.DISCONNECTED="disconnected",t.PENDING="pending"}(R||(R={})),function(t){t.USER_REJECTED_REQUEST="USER_REJECTED_REQUEST",t.UNAUTHORIZED="UNAUTHORIZED",t.UNSUPPORTED_METHOD="UNSUPPORTED_METHOD",t.DISCONNECTED="DISCONNECTED",t.CHAIN_DISCONNECTED="CHAIN_DISCONNECTED",t.INVALID_PARAMS="INVALID_PARAMS",t.INTERNAL_ERROR="INTERNAL_ERROR"}(I||(I={})),function(t){t.CLAIMABLE="CLAIMABLE",t.UNLOCKING="UNLOCKING"}(O||(O={})),function(t){t.EARNING_REWARD="EARNING_REWARD",t.PARTIALLY_EARNING="PARTIALLY_EARNING",t.NOT_EARNING="NOT_EARNING",t.WAITING="WAITING",t.NOT_STAKING="NOT_STAKING"}(S||(S={})),function(t){t.EVM="EVM",t.SUBSTRATE="SUBSTRATE",t.UNKNOWN="UNKNOWN",t.MIXED="MIXED"}(C||(C={})),function(t){t.INFO="info",t.SUCCESS="success",t.WARNING="warning",t.ERROR="error"}(L||(L={})),function(t){t.WRONG_PASSWORD="WRONG_PASSWORD",t.CHAIN_DISCONNECTED="CHAIN_DISCONNECTED",t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.SUCCESS="SUCCESS"}(D||(D={}));var U=i(795);let x=!1;class k extends U.Z{isSubWallet=!0;isMetaMask=!1;_connected=!1;constructor(t,e){super(),this.version=e,this.sendMessage=t,this._connected=!0}get connected(){return this._connected}isConnected(){return this._connected}subscribeExtensionEvents(){x||(this.sendMessage("evm(events.subscribe)",null,(({payload:t,type:e})=>{if(["connect","disconnect","accountsChanged","chainChanged","message","data","reconnect","error"].includes(e)){"connect"===e?this._connected=!0:"disconnect"===e&&(this._connected=!1);const i="data"===e?"message":e;this.emit(i,t)}else console.warn("Can not handle event",e,t)})).then((t=>{x=!0})).catch((()=>{x=!1})),x=!0)}async enable(){return this.request({method:"eth_requestAccounts"})}on(t,e){return this.subscribeExtensionEvents(),super.on(t,e),this}once(t,e){return this.subscribeExtensionEvents(),super.once(t,e),this}request({method:t,params:e}){return new Promise("eth_requestAccounts"===t?(t,e)=>{const i=""!==document.title?document.title:window.location.hostname;this.sendMessage("pub(authorize.tabV2)",{origin:i,accountAuthType:"evm"}).then((()=>{this.request({method:"eth_accounts"}).then((e=>{t(e)})).catch((t=>{e(t)}))})).catch((t=>{e(t)}))}:(i,n)=>{this.sendMessage("evm(request)",{params:e,method:t}).then((t=>{i(t)})).catch((t=>{n(t)}))})}_sendSync(t){let e;if("net_version"!==t.method)throw new Error(`Not support ${t.method}`);return e=this.version?`SubWallet v${this.version}`:null,{id:t.id,jsonrpc:t.jsonrpc,result:e}}send(t,e){return"string"!=typeof t||e&&!Array.isArray(e)?t&&"object"==typeof t&&"function"==typeof e?this.request(t).then((t=>{e(t)})):this._sendSync(t):this.request({method:t,params:e})}sendAsync(t,e){this.request(t).then((t=>{e(null,{result:t})})).catch((t=>{e(t)}))}}let P,G,B=0;class K{constructor(t){P=t}get(t){return P("pub(accounts.listV2)",{anyType:t,accountAuthType:"substrate"})}subscribe(t){let e=null;return P("pub(accounts.subscribeV2)",{accountAuthType:"substrate"},t).then((t=>{e=t})).catch(console.error),()=>{e&&P("pub(accounts.unsubscribe)",{id:e}).catch(console.error)}}}class W{constructor(t){G=t}get(){return G("pub(metadata.list)")}provide(t){return G("pub(metadata.provide)",t)}addToken(t){return G("pub(token.add)",t)}}const j=i(161),V="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this");function q(t){return t.toString().padStart(2,"0")}var F=i(197);const H="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this");function X(t,e){return void 0===H[t]?e:H[t]}function Z(){return Number.NaN}const $=X("BigInt",Z),z=("function"==typeof $&&$.asIntN,"function"==typeof V.Buffer&&"function"==typeof V.Buffer.isBuffer),J="object"==typeof V.process;function Y(t){return"function"==typeof t}function Q(t){return z&&!!t&&Y(t.readDoubleLE)&&V.Buffer.isBuffer(t)}function tt(t){return(t&&t.constructor)===Uint8Array||t instanceof Uint8Array}const et=new Array(256),it=new Array(65536);for(let t=0;t<256;t++)et[t]=t.toString(16).padStart(2,"0");for(let t=0;t<256;t++){const e=t<<8;for(let i=0;i<256;i++)it[e|i]=et[t]+et[i]}function nt(t,e){const i=t.length%2|0,n=t.length-i|0;for(let i=0;i9&&(ot[0|rt[t].toUpperCase().charCodeAt(0)]=0|t);for(let t=0;t<256;t++){const e=t<<8;for(let i=0;i<256;i++)st[e|i]=ot[t]<<4|ot[i]}const ht=/^0x[\da-fA-F]+$/,ut="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this");function at(t,e){return void 0===ut[t]?e:ut[t]}class lt{encode(t){const e=t.length,i=new Uint8Array(e);for(let n=0;n0){const i=Math.ceil(e/8);if(t.length>i)return`${nt(t.subarray(0,i/2),n)}…${nt(t.subarray(t.length-i/2),"")}`}return nt(t,n)}(function(t){return tt(t)?Q(t)?new Uint8Array(t):t:function(t,e=-1,i){return"string"==typeof t&&("0x"===t||ht.test(t))&&(-1===e?i||t.length%2==0:t.length===2+Math.ceil(e/4))}(t)?function(t,e=-1){if(!t)return new Uint8Array;let i=t.startsWith("0x")?2:0;const n=Math.ceil((t.length-i)/2),r=Math.ceil(-1===e?n:e/8),o=new Uint8Array(r);for(let e=r>n?r-n:0;e{if(r<=0)return t;const e=`${t}`;return e.lengthpt("debug",e,t,n):ct,error:(...t)=>pt("error",e,t),log:(...t)=>pt("log",e,t),noop:ct,warn:(...t)=>pt("warn",e,t)}}("PostMessageProvider");let wt,_t;class Et{#t;isClonable=!0;#e=!1;#i={};constructor(t){this.#t=new j,wt=t}clone(){return new Et(wt)}async connect(){console.error("PostMessageProvider.disconnect() is not implemented.")}async disconnect(){console.error("PostMessageProvider.disconnect() is not implemented.")}get hasSubscriptions(){return!0}get isConnected(){return this.#e}listProviders(){return wt("pub(rpc.listProviders)",void 0)}on(t,e){return this.#t.on(t,e),()=>{this.#t.removeListener(t,e)}}async send(t,e,i,n){if(n){const{callback:i,type:r}=n,o=await wt("pub(rpc.subscribe)",{method:t,params:e,type:r},(t=>{n.callback(null,t)}));return this.#i[`${r}::${o}`]=i,o}return wt("pub(rpc.send)",{method:t,params:e})}async startProvider(t){this.#e=!1,this.#t.emit("disconnected");const e=await wt("pub(rpc.startProvider)",t);return wt("pub(rpc.subscribeConnected)",null,(t=>(this.#e=t,t?this.#t.emit("connected"):this.#t.emit("disconnected"),!0))),e}subscribe(t,e,i,n){return this.send(e,i,!1,{callback:n,type:t})}async unsubscribe(t,e,i){const n=`${t}::${i}`;return void 0===this.#i[n]?(yt.debug((()=>`Unable to find active subscription=${n}`)),!1):(delete this.#i[n],this.send(e,[i]))}}let Nt=0;class bt{constructor(t){_t=t}async signPayload(t){const e=++Nt;return{...await _t("pub(extrinsic.sign)",t),id:e}}async signRaw(t){const e=++Nt;return{...await _t("pub(bytes.sign)",t),id:e}}}const At={};function Tt(i,n,r){return new Promise(((o,s)=>{const h=`${t}.${Date.now()}.${++B}`;At[h]={reject:s,resolve:o,subscriber:r};const u={id:h,message:i,origin:e,request:n||null};window.postMessage(u,"*")}))}const Rt="1.1.7-0";window.addEventListener("message",(({data:t,source:e})=>{e===window&&t.origin===n&&(t.id?function(t){const e=At[t.id];e?(e.subscriber||delete At[t.id],t.subscription?e.subscriber(t.subscription):t.error?e.reject(new s(E.INTERNAL_ERROR,t.error,t.errorCode)):e.resolve(t.response)):console.error(`Unknown response: ${JSON.stringify(t)}`)}(t):console.error("Missing id for response."))})),function(t,{name:e,version:i}){const n=window;n.injectedWeb3=n.injectedWeb3||{},n.injectedWeb3[e]={enable:e=>t(e),version:i}}((async function(t){return await Tt("pub(authorize.tabV2)",{origin:t}),new class{constructor(t){this.accounts=new K(t),this.metadata=new W(t),this.provider=new Et(t),this.signer=new bt(t),setInterval((()=>{t("pub(ping)",null).catch((()=>{console.error("Extension unavailable, ping failed")}))}),5e3+Math.floor(5e3*Math.random()))}}(Tt)}),{name:"subwallet-js",version:Rt}),function(t){const e=window;e.SubWallet?e.SubWallet.provider=t:e.SubWallet=t,e.dispatchEvent(new Event("subwallet#initialized")),e.addEventListener("load",(()=>{e.ethereum||(e.ethereum=t,e.dispatchEvent(new Event("ethereum#initialized")))}))}(new k(Tt,"1.1.7-0"))})()})();
\ No newline at end of file
+(()=>{var t={795:(t,e,i)=>{"use strict";const n=i(699);function r(t,e,i){try{Reflect.apply(t,e,i)}catch(t){setTimeout((()=>{throw t}))}}class o extends n.EventEmitter{emit(t,...e){let i="error"===t;const n=this._events;if(void 0!==n)i=i&&void 0===n.error;else if(!i)return!1;if(i){let t;if(e.length>0&&([t]=e),t instanceof Error)throw t;const i=new Error("Unhandled error."+(t?` (${t.message})`:""));throw i.context=t,i}const o=n[t];if(void 0===o)return!1;if("function"==typeof o)r(o,this,e);else{const t=o.length,i=function(t){const e=t.length,i=new Array(e);for(let n=0;n=48&&i<=57?i-48:i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:void n(!1,"Invalid character in "+t)}function u(t,e,i){var n=h(t,i);return i-1>=e&&(n|=h(t,i-1)<<4),n}function a(t,e,i,r){for(var o=0,s=0,h=Math.min(t.length,i),u=e;u=49?a-49+10:a>=17?a-17+10:a,n(a>=0&&s0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,i){if("number"==typeof t)return this._initNumber(t,e,i);if("object"==typeof t)return this._initArray(t,e,i);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var r=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(r++,this.negative=1),r=0;r-=3)s=t[r]|t[r-1]<<8|t[r-2]<<16,this.words[o]|=s<>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);else if("le"===i)for(r=0,o=0;r>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);return this._strip()},o.prototype._parseHex=function(t,e,i){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n=e;n-=2)r=u(t,e,n)<=18?(o-=18,s+=1,this.words[s]|=r>>>26):o+=8;else for(n=(t.length-e)%2==0?e+1:e;n=18?(o-=18,s+=1,this.words[s]|=r>>>26):o+=8;this._strip()},o.prototype._parseBase=function(t,e,i){this.words=[0],this.length=1;for(var n=0,r=1;r<=67108863;r*=e)n++;n--,r=r/e|0;for(var o=t.length-i,s=o%n,h=Math.min(o,o-s)+i,u=0,l=i;l1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=f}catch(t){o.prototype.inspect=f}else o.prototype.inspect=f;function f(){return(this.red?""}var c=["","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"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],m=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(t,e,i){i.negative=e.negative^t.negative;var n=t.length+e.length|0;i.length=n,n=n-1|0;var r=0|t.words[0],o=0|e.words[0],s=r*o,h=67108863&s,u=s/67108864|0;i.words[0]=h;for(var a=1;a>>26,f=67108863&u,c=Math.min(a,e.length-1),d=Math.max(0,a-t.length+1);d<=c;d++){var m=a-d|0;l+=(s=(r=0|t.words[m])*(o=0|e.words[d])+f)/67108864|0,f=67108863&s}i.words[a]=0|f,u=0|l}return 0!==u?i.words[a]=0|u:i.length--,i._strip()}o.prototype.toString=function(t,e){var i;if(e=0|e||1,16===(t=t||10)||"hex"===t){i="";for(var r=0,o=0,s=0;s>>24-r&16777215,(r+=2)>=26&&(r-=26,s--),i=0!==o||s!==this.length-1?c[6-u.length]+u+i:u+i}for(0!==o&&(i=o.toString(16)+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(t===(0|t)&&t>=2&&t<=36){var a=d[t],l=m[t];i="";var f=this.clone();for(f.negative=0;!f.isZero();){var p=f.modrn(l).toString(t);i=(f=f.idivn(l)).isZero()?p+i:c[a-p.length]+p+i}for(this.isZero()&&(i="0"+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16,2)},s&&(o.prototype.toBuffer=function(t,e){return this.toArrayLike(s,t,e)}),o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,i){this._strip();var r=this.byteLength(),o=i||Math.max(1,r);n(r<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var s=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this["_toArrayLike"+("le"===e?"LE":"BE")](s,r),s},o.prototype._toArrayLikeLE=function(t,e){for(var i=0,n=0,r=0,o=0;r>8&255),i>16&255),6===o?(i>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(i=0&&(t[i--]=s>>8&255),i>=0&&(t[i--]=s>>16&255),6===o?(i>=0&&(t[i--]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(i>=0)for(t[i--]=n;i>=0;)t[i--]=0},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,i=0;return e>=4096&&(i+=13,e>>>=13),e>=64&&(i+=7,e>>>=7),e>=8&&(i+=4,e>>>=4),e>=2&&(i+=2,e>>>=2),i+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,i=0;return 0==(8191&e)&&(i+=13,e>>>=13),0==(127&e)&&(i+=7,e>>>=7),0==(15&e)&&(i+=4,e>>>=4),0==(3&e)&&(i+=2,e>>>=2),0==(1&e)&&i++,i},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var i=0;it.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,i;this.length>t.length?(e=this,i=t):(e=t,i=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),i=t%26;this._expand(e),i>0&&e--;for(var r=0;r0&&(this.words[r]=~this.words[r]&67108863>>26-i),this._strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var i=t/26|0,r=t%26;return this._expand(i+1),this.words[i]=e?this.words[i]|1<t.length?(i=this,n=t):(i=t,n=this);for(var r=0,o=0;o>>26;for(;0!==r&&o>>26;if(this.length=i.length,0!==r)this.words[this.length]=r,this.length++;else if(i!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var i,n,r=this.cmp(t);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;r>0?(i=this,n=t):(i=t,n=this);for(var o=0,s=0;s>26,this.words[s]=67108863&e;for(;0!==o&&s>26,this.words[s]=67108863&e;if(0===o&&s>>13,d=0|s[1],m=8191&d,p=d>>>13,v=0|s[2],g=8191&v,M=v>>>13,y=0|s[3],w=8191&y,_=y>>>13,E=0|s[4],N=8191&E,b=E>>>13,A=0|s[5],T=8191&A,R=A>>>13,I=0|s[6],O=8191&I,S=I>>>13,L=0|s[7],C=8191&L,D=L>>>13,U=0|s[8],x=8191&U,k=U>>>13,P=0|s[9],G=8191&P,B=P>>>13,W=0|h[0],K=8191&W,j=W>>>13,V=0|h[1],q=8191&V,F=V>>>13,H=0|h[2],Z=8191&H,$=H>>>13,X=0|h[3],z=8191&X,J=X>>>13,Q=0|h[4],Y=8191&Q,tt=Q>>>13,et=0|h[5],it=8191&et,nt=et>>>13,rt=0|h[6],ot=8191&rt,st=rt>>>13,ht=0|h[7],ut=8191&ht,at=ht>>>13,lt=0|h[8],ft=8191<,ct=lt>>>13,dt=0|h[9],mt=8191&dt,pt=dt>>>13;i.negative=t.negative^e.negative,i.length=19;var vt=(a+(n=Math.imul(f,K))|0)+((8191&(r=(r=Math.imul(f,j))+Math.imul(c,K)|0))<<13)|0;a=((o=Math.imul(c,j))+(r>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(m,K),r=(r=Math.imul(m,j))+Math.imul(p,K)|0,o=Math.imul(p,j);var gt=(a+(n=n+Math.imul(f,q)|0)|0)+((8191&(r=(r=r+Math.imul(f,F)|0)+Math.imul(c,q)|0))<<13)|0;a=((o=o+Math.imul(c,F)|0)+(r>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(g,K),r=(r=Math.imul(g,j))+Math.imul(M,K)|0,o=Math.imul(M,j),n=n+Math.imul(m,q)|0,r=(r=r+Math.imul(m,F)|0)+Math.imul(p,q)|0,o=o+Math.imul(p,F)|0;var Mt=(a+(n=n+Math.imul(f,Z)|0)|0)+((8191&(r=(r=r+Math.imul(f,$)|0)+Math.imul(c,Z)|0))<<13)|0;a=((o=o+Math.imul(c,$)|0)+(r>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(w,K),r=(r=Math.imul(w,j))+Math.imul(_,K)|0,o=Math.imul(_,j),n=n+Math.imul(g,q)|0,r=(r=r+Math.imul(g,F)|0)+Math.imul(M,q)|0,o=o+Math.imul(M,F)|0,n=n+Math.imul(m,Z)|0,r=(r=r+Math.imul(m,$)|0)+Math.imul(p,Z)|0,o=o+Math.imul(p,$)|0;var yt=(a+(n=n+Math.imul(f,z)|0)|0)+((8191&(r=(r=r+Math.imul(f,J)|0)+Math.imul(c,z)|0))<<13)|0;a=((o=o+Math.imul(c,J)|0)+(r>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(N,K),r=(r=Math.imul(N,j))+Math.imul(b,K)|0,o=Math.imul(b,j),n=n+Math.imul(w,q)|0,r=(r=r+Math.imul(w,F)|0)+Math.imul(_,q)|0,o=o+Math.imul(_,F)|0,n=n+Math.imul(g,Z)|0,r=(r=r+Math.imul(g,$)|0)+Math.imul(M,Z)|0,o=o+Math.imul(M,$)|0,n=n+Math.imul(m,z)|0,r=(r=r+Math.imul(m,J)|0)+Math.imul(p,z)|0,o=o+Math.imul(p,J)|0;var wt=(a+(n=n+Math.imul(f,Y)|0)|0)+((8191&(r=(r=r+Math.imul(f,tt)|0)+Math.imul(c,Y)|0))<<13)|0;a=((o=o+Math.imul(c,tt)|0)+(r>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(T,K),r=(r=Math.imul(T,j))+Math.imul(R,K)|0,o=Math.imul(R,j),n=n+Math.imul(N,q)|0,r=(r=r+Math.imul(N,F)|0)+Math.imul(b,q)|0,o=o+Math.imul(b,F)|0,n=n+Math.imul(w,Z)|0,r=(r=r+Math.imul(w,$)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,$)|0,n=n+Math.imul(g,z)|0,r=(r=r+Math.imul(g,J)|0)+Math.imul(M,z)|0,o=o+Math.imul(M,J)|0,n=n+Math.imul(m,Y)|0,r=(r=r+Math.imul(m,tt)|0)+Math.imul(p,Y)|0,o=o+Math.imul(p,tt)|0;var _t=(a+(n=n+Math.imul(f,it)|0)|0)+((8191&(r=(r=r+Math.imul(f,nt)|0)+Math.imul(c,it)|0))<<13)|0;a=((o=o+Math.imul(c,nt)|0)+(r>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(O,K),r=(r=Math.imul(O,j))+Math.imul(S,K)|0,o=Math.imul(S,j),n=n+Math.imul(T,q)|0,r=(r=r+Math.imul(T,F)|0)+Math.imul(R,q)|0,o=o+Math.imul(R,F)|0,n=n+Math.imul(N,Z)|0,r=(r=r+Math.imul(N,$)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,$)|0,n=n+Math.imul(w,z)|0,r=(r=r+Math.imul(w,J)|0)+Math.imul(_,z)|0,o=o+Math.imul(_,J)|0,n=n+Math.imul(g,Y)|0,r=(r=r+Math.imul(g,tt)|0)+Math.imul(M,Y)|0,o=o+Math.imul(M,tt)|0,n=n+Math.imul(m,it)|0,r=(r=r+Math.imul(m,nt)|0)+Math.imul(p,it)|0,o=o+Math.imul(p,nt)|0;var Et=(a+(n=n+Math.imul(f,ot)|0)|0)+((8191&(r=(r=r+Math.imul(f,st)|0)+Math.imul(c,ot)|0))<<13)|0;a=((o=o+Math.imul(c,st)|0)+(r>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(C,K),r=(r=Math.imul(C,j))+Math.imul(D,K)|0,o=Math.imul(D,j),n=n+Math.imul(O,q)|0,r=(r=r+Math.imul(O,F)|0)+Math.imul(S,q)|0,o=o+Math.imul(S,F)|0,n=n+Math.imul(T,Z)|0,r=(r=r+Math.imul(T,$)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,$)|0,n=n+Math.imul(N,z)|0,r=(r=r+Math.imul(N,J)|0)+Math.imul(b,z)|0,o=o+Math.imul(b,J)|0,n=n+Math.imul(w,Y)|0,r=(r=r+Math.imul(w,tt)|0)+Math.imul(_,Y)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(g,it)|0,r=(r=r+Math.imul(g,nt)|0)+Math.imul(M,it)|0,o=o+Math.imul(M,nt)|0,n=n+Math.imul(m,ot)|0,r=(r=r+Math.imul(m,st)|0)+Math.imul(p,ot)|0,o=o+Math.imul(p,st)|0;var Nt=(a+(n=n+Math.imul(f,ut)|0)|0)+((8191&(r=(r=r+Math.imul(f,at)|0)+Math.imul(c,ut)|0))<<13)|0;a=((o=o+Math.imul(c,at)|0)+(r>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,n=Math.imul(x,K),r=(r=Math.imul(x,j))+Math.imul(k,K)|0,o=Math.imul(k,j),n=n+Math.imul(C,q)|0,r=(r=r+Math.imul(C,F)|0)+Math.imul(D,q)|0,o=o+Math.imul(D,F)|0,n=n+Math.imul(O,Z)|0,r=(r=r+Math.imul(O,$)|0)+Math.imul(S,Z)|0,o=o+Math.imul(S,$)|0,n=n+Math.imul(T,z)|0,r=(r=r+Math.imul(T,J)|0)+Math.imul(R,z)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(N,Y)|0,r=(r=r+Math.imul(N,tt)|0)+Math.imul(b,Y)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(w,it)|0,r=(r=r+Math.imul(w,nt)|0)+Math.imul(_,it)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(g,ot)|0,r=(r=r+Math.imul(g,st)|0)+Math.imul(M,ot)|0,o=o+Math.imul(M,st)|0,n=n+Math.imul(m,ut)|0,r=(r=r+Math.imul(m,at)|0)+Math.imul(p,ut)|0,o=o+Math.imul(p,at)|0;var bt=(a+(n=n+Math.imul(f,ft)|0)|0)+((8191&(r=(r=r+Math.imul(f,ct)|0)+Math.imul(c,ft)|0))<<13)|0;a=((o=o+Math.imul(c,ct)|0)+(r>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(G,K),r=(r=Math.imul(G,j))+Math.imul(B,K)|0,o=Math.imul(B,j),n=n+Math.imul(x,q)|0,r=(r=r+Math.imul(x,F)|0)+Math.imul(k,q)|0,o=o+Math.imul(k,F)|0,n=n+Math.imul(C,Z)|0,r=(r=r+Math.imul(C,$)|0)+Math.imul(D,Z)|0,o=o+Math.imul(D,$)|0,n=n+Math.imul(O,z)|0,r=(r=r+Math.imul(O,J)|0)+Math.imul(S,z)|0,o=o+Math.imul(S,J)|0,n=n+Math.imul(T,Y)|0,r=(r=r+Math.imul(T,tt)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,tt)|0,n=n+Math.imul(N,it)|0,r=(r=r+Math.imul(N,nt)|0)+Math.imul(b,it)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(w,ot)|0,r=(r=r+Math.imul(w,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,n=n+Math.imul(g,ut)|0,r=(r=r+Math.imul(g,at)|0)+Math.imul(M,ut)|0,o=o+Math.imul(M,at)|0,n=n+Math.imul(m,ft)|0,r=(r=r+Math.imul(m,ct)|0)+Math.imul(p,ft)|0,o=o+Math.imul(p,ct)|0;var At=(a+(n=n+Math.imul(f,mt)|0)|0)+((8191&(r=(r=r+Math.imul(f,pt)|0)+Math.imul(c,mt)|0))<<13)|0;a=((o=o+Math.imul(c,pt)|0)+(r>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(G,q),r=(r=Math.imul(G,F))+Math.imul(B,q)|0,o=Math.imul(B,F),n=n+Math.imul(x,Z)|0,r=(r=r+Math.imul(x,$)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,$)|0,n=n+Math.imul(C,z)|0,r=(r=r+Math.imul(C,J)|0)+Math.imul(D,z)|0,o=o+Math.imul(D,J)|0,n=n+Math.imul(O,Y)|0,r=(r=r+Math.imul(O,tt)|0)+Math.imul(S,Y)|0,o=o+Math.imul(S,tt)|0,n=n+Math.imul(T,it)|0,r=(r=r+Math.imul(T,nt)|0)+Math.imul(R,it)|0,o=o+Math.imul(R,nt)|0,n=n+Math.imul(N,ot)|0,r=(r=r+Math.imul(N,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,n=n+Math.imul(w,ut)|0,r=(r=r+Math.imul(w,at)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,at)|0,n=n+Math.imul(g,ft)|0,r=(r=r+Math.imul(g,ct)|0)+Math.imul(M,ft)|0,o=o+Math.imul(M,ct)|0;var Tt=(a+(n=n+Math.imul(m,mt)|0)|0)+((8191&(r=(r=r+Math.imul(m,pt)|0)+Math.imul(p,mt)|0))<<13)|0;a=((o=o+Math.imul(p,pt)|0)+(r>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(G,Z),r=(r=Math.imul(G,$))+Math.imul(B,Z)|0,o=Math.imul(B,$),n=n+Math.imul(x,z)|0,r=(r=r+Math.imul(x,J)|0)+Math.imul(k,z)|0,o=o+Math.imul(k,J)|0,n=n+Math.imul(C,Y)|0,r=(r=r+Math.imul(C,tt)|0)+Math.imul(D,Y)|0,o=o+Math.imul(D,tt)|0,n=n+Math.imul(O,it)|0,r=(r=r+Math.imul(O,nt)|0)+Math.imul(S,it)|0,o=o+Math.imul(S,nt)|0,n=n+Math.imul(T,ot)|0,r=(r=r+Math.imul(T,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,n=n+Math.imul(N,ut)|0,r=(r=r+Math.imul(N,at)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,at)|0,n=n+Math.imul(w,ft)|0,r=(r=r+Math.imul(w,ct)|0)+Math.imul(_,ft)|0,o=o+Math.imul(_,ct)|0;var Rt=(a+(n=n+Math.imul(g,mt)|0)|0)+((8191&(r=(r=r+Math.imul(g,pt)|0)+Math.imul(M,mt)|0))<<13)|0;a=((o=o+Math.imul(M,pt)|0)+(r>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(G,z),r=(r=Math.imul(G,J))+Math.imul(B,z)|0,o=Math.imul(B,J),n=n+Math.imul(x,Y)|0,r=(r=r+Math.imul(x,tt)|0)+Math.imul(k,Y)|0,o=o+Math.imul(k,tt)|0,n=n+Math.imul(C,it)|0,r=(r=r+Math.imul(C,nt)|0)+Math.imul(D,it)|0,o=o+Math.imul(D,nt)|0,n=n+Math.imul(O,ot)|0,r=(r=r+Math.imul(O,st)|0)+Math.imul(S,ot)|0,o=o+Math.imul(S,st)|0,n=n+Math.imul(T,ut)|0,r=(r=r+Math.imul(T,at)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,at)|0,n=n+Math.imul(N,ft)|0,r=(r=r+Math.imul(N,ct)|0)+Math.imul(b,ft)|0,o=o+Math.imul(b,ct)|0;var It=(a+(n=n+Math.imul(w,mt)|0)|0)+((8191&(r=(r=r+Math.imul(w,pt)|0)+Math.imul(_,mt)|0))<<13)|0;a=((o=o+Math.imul(_,pt)|0)+(r>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(G,Y),r=(r=Math.imul(G,tt))+Math.imul(B,Y)|0,o=Math.imul(B,tt),n=n+Math.imul(x,it)|0,r=(r=r+Math.imul(x,nt)|0)+Math.imul(k,it)|0,o=o+Math.imul(k,nt)|0,n=n+Math.imul(C,ot)|0,r=(r=r+Math.imul(C,st)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,st)|0,n=n+Math.imul(O,ut)|0,r=(r=r+Math.imul(O,at)|0)+Math.imul(S,ut)|0,o=o+Math.imul(S,at)|0,n=n+Math.imul(T,ft)|0,r=(r=r+Math.imul(T,ct)|0)+Math.imul(R,ft)|0,o=o+Math.imul(R,ct)|0;var Ot=(a+(n=n+Math.imul(N,mt)|0)|0)+((8191&(r=(r=r+Math.imul(N,pt)|0)+Math.imul(b,mt)|0))<<13)|0;a=((o=o+Math.imul(b,pt)|0)+(r>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(G,it),r=(r=Math.imul(G,nt))+Math.imul(B,it)|0,o=Math.imul(B,nt),n=n+Math.imul(x,ot)|0,r=(r=r+Math.imul(x,st)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,st)|0,n=n+Math.imul(C,ut)|0,r=(r=r+Math.imul(C,at)|0)+Math.imul(D,ut)|0,o=o+Math.imul(D,at)|0,n=n+Math.imul(O,ft)|0,r=(r=r+Math.imul(O,ct)|0)+Math.imul(S,ft)|0,o=o+Math.imul(S,ct)|0;var St=(a+(n=n+Math.imul(T,mt)|0)|0)+((8191&(r=(r=r+Math.imul(T,pt)|0)+Math.imul(R,mt)|0))<<13)|0;a=((o=o+Math.imul(R,pt)|0)+(r>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(G,ot),r=(r=Math.imul(G,st))+Math.imul(B,ot)|0,o=Math.imul(B,st),n=n+Math.imul(x,ut)|0,r=(r=r+Math.imul(x,at)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,at)|0,n=n+Math.imul(C,ft)|0,r=(r=r+Math.imul(C,ct)|0)+Math.imul(D,ft)|0,o=o+Math.imul(D,ct)|0;var Lt=(a+(n=n+Math.imul(O,mt)|0)|0)+((8191&(r=(r=r+Math.imul(O,pt)|0)+Math.imul(S,mt)|0))<<13)|0;a=((o=o+Math.imul(S,pt)|0)+(r>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,n=Math.imul(G,ut),r=(r=Math.imul(G,at))+Math.imul(B,ut)|0,o=Math.imul(B,at),n=n+Math.imul(x,ft)|0,r=(r=r+Math.imul(x,ct)|0)+Math.imul(k,ft)|0,o=o+Math.imul(k,ct)|0;var Ct=(a+(n=n+Math.imul(C,mt)|0)|0)+((8191&(r=(r=r+Math.imul(C,pt)|0)+Math.imul(D,mt)|0))<<13)|0;a=((o=o+Math.imul(D,pt)|0)+(r>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(G,ft),r=(r=Math.imul(G,ct))+Math.imul(B,ft)|0,o=Math.imul(B,ct);var Dt=(a+(n=n+Math.imul(x,mt)|0)|0)+((8191&(r=(r=r+Math.imul(x,pt)|0)+Math.imul(k,mt)|0))<<13)|0;a=((o=o+Math.imul(k,pt)|0)+(r>>>13)|0)+(Dt>>>26)|0,Dt&=67108863;var Ut=(a+(n=Math.imul(G,mt))|0)+((8191&(r=(r=Math.imul(G,pt))+Math.imul(B,mt)|0))<<13)|0;return a=((o=Math.imul(B,pt))+(r>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,u[0]=vt,u[1]=gt,u[2]=Mt,u[3]=yt,u[4]=wt,u[5]=_t,u[6]=Et,u[7]=Nt,u[8]=bt,u[9]=At,u[10]=Tt,u[11]=Rt,u[12]=It,u[13]=Ot,u[14]=St,u[15]=Lt,u[16]=Ct,u[17]=Dt,u[18]=Ut,0!==a&&(u[19]=a,i.length++),i};function g(t,e,i){i.negative=e.negative^t.negative,i.length=t.length+e.length;for(var n=0,r=0,o=0;o>>26)|0)>>>26,s&=67108863}i.words[o]=h,n=s,s=r}return 0!==n?i.words[o]=n:i.length--,i._strip()}function M(t,e,i){return g(t,e,i)}function y(t,e){this.x=t,this.y=e}Math.imul||(v=p),o.prototype.mulTo=function(t,e){var i=this.length+t.length;return 10===this.length&&10===t.length?v(this,t,e):i<63?p(this,t,e):i<1024?g(this,t,e):M(this,t,e)},y.prototype.makeRBT=function(t){for(var e=new Array(t),i=o.prototype._countBits(t)-1,n=0;n>=1;return n},y.prototype.permute=function(t,e,i,n,r,o){for(var s=0;s>>=1)r++;return 1<>>=13,i[2*s+1]=8191&o,o>>>=13;for(s=2*e;s>=26,i+=o/67108864|0,i+=s>>>26,this.words[r]=67108863&s}return 0!==i&&(this.words[r]=i,this.length++),e?this.ineg():this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),i=0;i>>r&1}return e}(t);if(0===e.length)return new o(1);for(var i=this,n=0;n=0);var e,i=t%26,r=(t-i)/26,o=67108863>>>26-i<<26-i;if(0!==i){var s=0;for(e=0;e>>26-i}s&&(this.words[e]=s,this.length++)}if(0!==r){for(e=this.length-1;e>=0;e--)this.words[e+r]=this.words[e];for(e=0;e=0),r=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),h=67108863^67108863>>>o<s)for(this.length-=s,a=0;a=0&&(0!==l||a>=r);a--){var f=0|this.words[a];this.words[a]=l<<26-o|f>>>o,l=f&h}return u&&0!==l&&(u.words[u.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(t,e,i){return n(0===this.negative),this.iushrn(t,e,i)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,i=(t-e)/26,r=1<=0);var e=t%26,i=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==e&&i++,this.length=Math.min(i,this.length),0!==e){var r=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[r+i]=67108863&o}for(;r>26,this.words[r+i]=67108863&o;if(0===h)return this._strip();for(n(-1===h),h=0,r=0;r>26,this.words[r]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,e){var i=(this.length,t.length),n=this.clone(),r=t,s=0|r.words[r.length-1];0!=(i=26-this._countBits(s))&&(r=r.ushln(i),n.iushln(i),s=0|r.words[r.length-1]);var h,u=n.length-r.length;if("mod"!==e){(h=new o(null)).length=u+1,h.words=new Array(h.length);for(var a=0;a=0;f--){var c=67108864*(0|n.words[r.length+f])+(0|n.words[r.length+f-1]);for(c=Math.min(c/s|0,67108863),n._ishlnsubmul(r,c,f);0!==n.negative;)c--,n.negative=0,n._ishlnsubmul(r,1,f),n.isZero()||(n.negative^=1);h&&(h.words[f]=c)}return h&&h._strip(),n._strip(),"div"!==e&&0!==i&&n.iushrn(i),{div:h||null,mod:n}},o.prototype.divmod=function(t,e,i){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(h=this.neg().divmod(t,e),"mod"!==e&&(r=h.div.neg()),"div"!==e&&(s=h.mod.neg(),i&&0!==s.negative&&s.iadd(t)),{div:r,mod:s}):0===this.negative&&0!==t.negative?(h=this.divmod(t.neg(),e),"mod"!==e&&(r=h.div.neg()),{div:r,mod:h.mod}):0!=(this.negative&t.negative)?(h=this.neg().divmod(t.neg(),e),"div"!==e&&(s=h.mod.neg(),i&&0!==s.negative&&s.isub(t)),{div:h.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modrn(t.words[0]))}:this._wordDiv(t,e);var r,s,h},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var i=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),r=t.andln(1),o=i.cmp(n);return o<0||1===r&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modrn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var i=(1<<26)%t,r=0,o=this.length-1;o>=0;o--)r=(i*r+(0|this.words[o]))%t;return e?-r:r},o.prototype.modn=function(t){return this.modrn(t)},o.prototype.idivn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var i=0,r=this.length-1;r>=0;r--){var o=(0|this.words[r])+67108864*i;this.words[r]=o/t|0,i=o%t}return this._strip(),e?this.ineg():this},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var r=new o(1),s=new o(0),h=new o(0),u=new o(1),a=0;e.isEven()&&i.isEven();)e.iushrn(1),i.iushrn(1),++a;for(var l=i.clone(),f=e.clone();!e.isZero();){for(var c=0,d=1;0==(e.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(e.iushrn(c);c-- >0;)(r.isOdd()||s.isOdd())&&(r.iadd(l),s.isub(f)),r.iushrn(1),s.iushrn(1);for(var m=0,p=1;0==(i.words[0]&p)&&m<26;++m,p<<=1);if(m>0)for(i.iushrn(m);m-- >0;)(h.isOdd()||u.isOdd())&&(h.iadd(l),u.isub(f)),h.iushrn(1),u.iushrn(1);e.cmp(i)>=0?(e.isub(i),r.isub(h),s.isub(u)):(i.isub(e),h.isub(r),u.isub(s))}return{a:h,b:u,gcd:i.iushln(a)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var r,s=new o(1),h=new o(0),u=i.clone();e.cmpn(1)>0&&i.cmpn(1)>0;){for(var a=0,l=1;0==(e.words[0]&l)&&a<26;++a,l<<=1);if(a>0)for(e.iushrn(a);a-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var f=0,c=1;0==(i.words[0]&c)&&f<26;++f,c<<=1);if(f>0)for(i.iushrn(f);f-- >0;)h.isOdd()&&h.iadd(u),h.iushrn(1);e.cmp(i)>=0?(e.isub(i),s.isub(h)):(i.isub(e),h.isub(s))}return(r=0===e.cmpn(1)?s:h).cmpn(0)<0&&r.iadd(t),r},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),i=t.clone();e.negative=0,i.negative=0;for(var n=0;e.isEven()&&i.isEven();n++)e.iushrn(1),i.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;i.isEven();)i.iushrn(1);var r=e.cmp(i);if(r<0){var o=e;e=i,i=o}else if(0===r||0===i.cmpn(1))break;e.isub(i)}return i.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,i=(t-e)/26,r=1<>>26,h&=67108863,this.words[s]=h}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,i=t<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this._strip(),this.length>1)e=1;else{i&&(t=-t),n(t<=67108863,"Number is too big");var r=0|this.words[0];e=r===t?0:rt.length)return 1;if(this.length=0;i--){var n=0|this.words[i],r=0|t.words[i];if(n!==r){nr&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new T(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var w={k256:null,p224:null,p192:null,p25519:null};function _(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function E(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function N(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function b(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function T(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function R(t){T.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(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)}_.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},_.prototype.ireduce=function(t){var e,i=t;do{this.split(i,this.tmp),e=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},_.prototype.split=function(t,e){t.iushrn(this.n,0,e)},_.prototype.imulK=function(t){return t.imul(this.k)},r(E,_),E.prototype.split=function(t,e){for(var i=4194303,n=Math.min(t.length,9),r=0;r>>22,o=s}o>>>=22,t.words[r-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},E.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,i=0;i>>=26,t.words[i]=r,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(w[t])return w[t];var e;if("k256"===t)e=new E;else if("p224"===t)e=new N;else if("p192"===t)e=new b;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new A}return w[t]=e,e},T.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},T.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},T.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(l(t,t.umod(this.m)._forceRed(this)),t)},T.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},T.prototype.add=function(t,e){this._verify2(t,e);var i=t.add(e);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},T.prototype.iadd=function(t,e){this._verify2(t,e);var i=t.iadd(e);return i.cmp(this.m)>=0&&i.isub(this.m),i},T.prototype.sub=function(t,e){this._verify2(t,e);var i=t.sub(e);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},T.prototype.isub=function(t,e){this._verify2(t,e);var i=t.isub(e);return i.cmpn(0)<0&&i.iadd(this.m),i},T.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},T.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},T.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},T.prototype.isqr=function(t){return this.imul(t,t.clone())},T.prototype.sqr=function(t){return this.mul(t,t)},T.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var i=this.m.add(new o(1)).iushrn(2);return this.pow(t,i)}for(var r=this.m.subn(1),s=0;!r.isZero()&&0===r.andln(1);)s++,r.iushrn(1);n(!r.isZero());var h=new o(1).toRed(this),u=h.redNeg(),a=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,a).cmp(u);)l.redIAdd(u);for(var f=this.pow(l,r),c=this.pow(t,r.addn(1).iushrn(1)),d=this.pow(t,r),m=s;0!==d.cmp(h);){for(var p=d,v=0;0!==p.cmp(h);v++)p=p.redSqr();n(v=0;n--){for(var a=e.words[n],l=u-1;l>=0;l--){var f=a>>l&1;r!==i[0]&&(r=this.sqr(r)),0!==f||0!==s?(s<<=1,s|=f,(4==++h||0===n&&0===l)&&(r=this.mul(r,i[s]),h=0,s=0)):h=0}u=26}return r},T.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},T.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new R(t)},r(R,T),R.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},R.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},R.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var i=t.imul(e),n=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=i.isub(n).iushrn(this.shift),o=r;return r.cmp(this.m)>=0?o=r.isub(this.m):r.cmpn(0)<0&&(o=r.iadd(this.m)),o._forceRed(this)},R.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var i=t.mul(e),n=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=i.isub(n).iushrn(this.shift),s=r;return r.cmp(this.m)>=0?s=r.isub(this.m):r.cmpn(0)<0&&(s=r.iadd(this.m)),s._forceRed(this)},R.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=i.nmd(t),this)},161:t=>{"use strict";var e=Object.prototype.hasOwnProperty,i="~";function n(){}function r(t,e,i){this.fn=t,this.context=e,this.once=i||!1}function o(t,e,n,o,s){if("function"!=typeof n)throw new TypeError("The listener must be a function");var h=new r(n,o||t,s),u=i?i+e:e;return t._events[u]?t._events[u].fn?t._events[u]=[t._events[u],h]:t._events[u].push(h):(t._events[u]=h,t._eventsCount++),t}function s(t,e){0==--t._eventsCount?t._events=new n:delete t._events[e]}function h(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(i=!1)),h.prototype.eventNames=function(){var t,n,r=[];if(0===this._eventsCount)return r;for(n in t=this._events)e.call(t,n)&&r.push(i?n.slice(1):n);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(t)):r},h.prototype.listeners=function(t){var e=i?i+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,o=n.length,s=new Array(o);r{"use strict";var e,i="object"==typeof Reflect?Reflect:null,n=i&&"function"==typeof i.apply?i.apply:function(t,e,i){return Function.prototype.apply.call(t,e,i)};e=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var r=Number.isNaN||function(t){return t!=t};function o(){o.init.call(this)}t.exports=o,t.exports.once=function(t,e){return new Promise((function(i,n){function r(i){t.removeListener(e,o),n(i)}function o(){"function"==typeof t.removeListener&&t.removeListener("error",r),i([].slice.call(arguments))}p(t,e,o,{once:!0}),"error"!==e&&function(t,e,i){"function"==typeof t.on&&p(t,"error",e,{once:!0})}(t,r)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function h(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function u(t){return void 0===t._maxListeners?o.defaultMaxListeners:t._maxListeners}function a(t,e,i,n){var r,o,s,a;if(h(i),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,i.listener?i.listener:i),o=t._events),s=o[e]),void 0===s)s=o[e]=i,++t._eventsCount;else if("function"==typeof s?s=o[e]=n?[i,s]:[s,i]:n?s.unshift(i):s.push(i),(r=u(t))>0&&s.length>r&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=t,l.type=e,l.count=s.length,a=l,console&&console.warn&&console.warn(a)}return t}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(t,e,i){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:i},r=l.bind(n);return r.listener=i,n.wrapFn=r,r}function c(t,e,i){var n=t._events;if(void 0===n)return[];var r=n[e];return void 0===r?[]:"function"==typeof r?i?[r.listener||r]:[r]:i?function(t){for(var e=new Array(t.length),i=0;i0&&(s=e[0]),s instanceof Error)throw s;var h=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw h.context=s,h}var u=o[t];if(void 0===u)return!1;if("function"==typeof u)n(u,this,e);else{var a=u.length,l=m(u,a);for(i=0;i=0;o--)if(i[o]===e||i[o].listener===e){s=i[o].listener,r=o;break}if(r<0)return this;0===r?i.shift():function(t,e){for(;e+1=0;n--)this.removeListener(t,e[n]);return this},o.prototype.listeners=function(t){return c(this,t,!0)},o.prototype.rawListeners=function(t){return c(this,t,!1)},o.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):d.call(t,e)},o.prototype.listenerCount=d,o.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},196:()=>{}},e={};function i(n){var r=e[n];if(void 0!==r)return r.exports;var o=e[n]={id:n,loaded:!1,exports:{}};return t[n].call(o.exports,o,o.exports,i),o.loaded=!0,o.exports}i.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),(()=>{"use strict";const t={NODE_ENV:"production",PKG_NAME:"@subwallet/extension-koni",PKG_VERSION:"1.1.10-0",TARGET_ENV:"extension"}.EXTENSION_PREFIX||"",e=`${t}koni-page`,n=`${t}koni-content`;class r extends Error{constructor(t,e,i,n){super(e),this.errorType=t,this.code=i,this.data=n}toJSON(){return{name:this.name,message:this.message,code:this.code}}}const o={CHAIN_DISCONNECTED:{message:"Network is disconnected",code:void 0},INVALID_PARAMS:{message:"Undefined error. Please contact SubWallet support",code:void 0},INTERNAL_ERROR:{message:"Undefined error. Please contact SubWallet support",code:void 0},USER_REJECT:{message:"Rejected by user",code:void 0}};class s extends r{constructor(t,e,i){const{code:n,message:r}=o[t];super(t,e||r,n,i),this.errorType=t}}let h,u,a,l,f,c,d,m,p,v,g,M,y,w,_,E,N,b,A,T,R,I,O,S,L,C,D,U;!function(t){t.Web="Web",t.Node="Node",t.ExtensionChrome="Extension (Chrome)",t.ExtensionFirefox="Extension (Firefox)",t.WebWorker="Web Worker",t.ServiceWorker="Service Worker",t.Unknown="Unknown"}(h||(h={})),function(t){t.NOMINATED="nominated",t.POOLED="pooled"}(u||(u={})),function(t){t.PENDING="pending",t.READY="ready",t.CACHED="cached",t.ERROR="error",t.NOT_SUPPORT="not_support"}(a||(a={})),function(t){t.VER_1="1.0.0",t.VER_2="2.0.0"}(l||(l={})),function(t){t.ONGOING="ongoing",t.COMPLETED="completed",t.FAILED="failed"}(f||(f={})),function(t){t.wasm="wasm",t.evm="evm"}(c||(c={})),function(t){t.ALWAYS_REQUIRED="always_required",t.WHEN_NEEDED="when_needed"}(d||(d={})),function(t){t.SEND="send",t.RECEIVED="received"}(m||(m={})),function(t){t.EVM="evm",t.SUBSTRATE="substrate"}(p||(p={})),function(t){t.TRANSFER_BALANCE="transfer.balance",t.TRANSFER_TOKEN="transfer.token",t.TRANSFER_XCM="transfer.xcm",t.SEND_NFT="send_nft",t.CROWDLOAN="crowdloan",t.STAKING_JOIN_POOL="staking.join_pool",t.STAKING_LEAVE_POOL="staking.leave_pool",t.STAKING_POOL_WITHDRAW="staking.pool_withdraw",t.STAKING_BOND="staking.bond",t.STAKING_UNBOND="staking.unbond",t.STAKING_CLAIM_REWARD="staking.claim_reward",t.STAKING_WITHDRAW="staking.withdraw",t.STAKING_COMPOUNDING="staking.compounding",t.STAKING_CANCEL_COMPOUNDING="staking.cancel_compounding",t.STAKING_CANCEL_UNSTAKE="staking.cancel_unstake",t.EVM_EXECUTE="evm.execute",t.UNKNOWN="unknown"}(v||(v={})),function(t){t.QUEUED="queued",t.SUBMITTING="submitting",t.PROCESSING="processing",t.SUCCESS="success",t.FAIL="fail",t.CANCELLED="cancelled",t.UNKNOWN="unknown"}(g||(g={})),function(t){t.NOT_ENOUGH_BALANCE="NOT_ENOUGH_BALANCE",t.CHAIN_DISCONNECTED="CHAIN_DISCONNECTED",t.INVALID_PARAMS="INVALID_PARAMS",t.DUPLICATE_TRANSACTION="DUPLICATE_TRANSACTION",t.UNABLE_TO_SIGN="UNABLE_TO_SIGN",t.USER_REJECT_REQUEST="USER_REJECT_REQUEST",t.UNABLE_TO_SEND="UNABLE_TO_SEND",t.SEND_TRANSACTION_FAILED="SEND_TRANSACTION_FAILED",t.INTERNAL_ERROR="INTERNAL_ERROR",t.UNSUPPORTED="UNSUPPORTED",t.TIMEOUT="TIMEOUT",t.NOT_ENOUGH_EXISTENTIAL_DEPOSIT="NOT_ENOUGH_EXISTENTIAL_DEPOSIT"}(M||(M={})),function(t){t.NOT_ENOUGH_MIN_STAKE="NOT_ENOUGH_MIN_STAKE",t.EXCEED_MAX_NOMINATIONS="EXCEED_MAX_NOMINATIONS",t.EXIST_UNSTAKING_REQUEST="EXIST_UNSTAKING_REQUEST",t.INVALID_ACTIVE_STAKE="INVALID_ACTIVE_STAKE",t.EXCEED_MAX_UNSTAKING="EXCEED_MAX_UNSTAKING",t.INACTIVE_NOMINATION_POOL="INACTIVE_NOMINATION_POOL"}(y||(y={})),function(t){t.NOT_ENOUGH_VALUE="NOT_ENOUGH_VALUE",t.NOT_ENOUGH_FEE="NOT_ENOUGH_FEE",t.INVALID_TOKEN="INVALID_TOKEN",t.TRANSFER_ERROR="TRANSFER_ERROR",t.RECEIVER_NOT_ENOUGH_EXISTENTIAL_DEPOSIT="RECEIVER_NOT_ENOUGH_EXISTENTIAL_DEPOSIT"}(w||(w={})),function(t){t.NOT_ENOUGH_EXISTENTIAL_DEPOSIT="notEnoughExistentialDeposit"}(_||(_={})),function(t){t.NETWORK_ERROR="NETWORK_ERROR",t.TOKEN_ERROR="TOKEN_ERROR",t.TIMEOUT="TIMEOUT",t.GET_BALANCE_ERROR="GET_BALANCE_ERROR"}(E||(E={})),function(t){t.CHAIN_DISCONNECTED="CHAIN_DISCONNECTED",t.INVALID_PARAMS="INVALID_PARAMS",t.INTERNAL_ERROR="INTERNAL_ERROR",t.USER_REJECT="USER_REJECT"}(N||(N={})),function(t){t.INVALID_ADDRESS="invalidToAccount",t.KEYRING_ERROR="keyringError",t.UNKNOWN_ERROR="unknownError"}(b||(b={})),function(t){t[t.PENDING=0]="PENDING",t[t.REJECTED=1]="REJECTED",t[t.FAILED=2]="FAILED",t[t.COMPLETED=3]="COMPLETED"}(A||(A={})),function(t){t.LIGHT="light",t.DARK="dark",t.SUBSPACE="subspace"}(T||(T={})),function(t){t.INVALID_INFO_TYPE="invalidInfoType",t.INJECT_SCRIPT_DETECTED="injectScriptDetected",t.EXISTED_NETWORK="existedNetwork",t.EXISTED_PROVIDER="existedProvider",t.INVALID_PROVIDER="invalidProvider",t.NONE="none",t.CONNECTION_FAILURE="connectionFailure",t.PROVIDER_NOT_SAME_NETWORK="providerNotSameNetwork"}(R||(R={})),function(t){t.CONNECTED="connected",t.CONNECTING="connecting",t.DISCONNECTED="disconnected",t.PENDING="pending"}(I||(I={})),function(t){t.USER_REJECTED_REQUEST="USER_REJECTED_REQUEST",t.UNAUTHORIZED="UNAUTHORIZED",t.UNSUPPORTED_METHOD="UNSUPPORTED_METHOD",t.DISCONNECTED="DISCONNECTED",t.CHAIN_DISCONNECTED="CHAIN_DISCONNECTED",t.INVALID_PARAMS="INVALID_PARAMS",t.INTERNAL_ERROR="INTERNAL_ERROR"}(O||(O={})),function(t){t.CLAIMABLE="CLAIMABLE",t.UNLOCKING="UNLOCKING"}(S||(S={})),function(t){t.EARNING_REWARD="EARNING_REWARD",t.PARTIALLY_EARNING="PARTIALLY_EARNING",t.NOT_EARNING="NOT_EARNING",t.WAITING="WAITING",t.NOT_STAKING="NOT_STAKING"}(L||(L={})),function(t){t.EVM="EVM",t.SUBSTRATE="SUBSTRATE",t.UNKNOWN="UNKNOWN",t.MIXED="MIXED"}(C||(C={})),function(t){t.INFO="info",t.SUCCESS="success",t.WARNING="warning",t.ERROR="error"}(D||(D={})),function(t){t.WRONG_PASSWORD="WRONG_PASSWORD",t.CHAIN_DISCONNECTED="CHAIN_DISCONNECTED",t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.SUCCESS="SUCCESS"}(U||(U={}));var x=i(795);let k=!1;class P extends x.Z{isSubWallet=!0;isMetaMask=!1;_connected=!1;constructor(t,e){super(),this.version=e,this.sendMessage=t,this._connected=!0}get connected(){return this._connected}isConnected(){return this._connected}subscribeExtensionEvents(){k||(this.sendMessage("evm(events.subscribe)",null,(({payload:t,type:e})=>{if(["connect","disconnect","accountsChanged","chainChanged","message","data","reconnect","error"].includes(e)){"connect"===e?this._connected=!0:"disconnect"===e&&(this._connected=!1);const i="data"===e?"message":e;this.emit(i,t)}else console.warn("Can not handle event",e,t)})).then((t=>{k=!0})).catch((()=>{k=!1})),k=!0)}async enable(){return this.request({method:"eth_requestAccounts"})}on(t,e){return this.subscribeExtensionEvents(),super.on(t,e),this}once(t,e){return this.subscribeExtensionEvents(),super.once(t,e),this}request({method:t,params:e}){return new Promise("eth_requestAccounts"===t?(t,e)=>{const i=""!==document.title?document.title:window.location.hostname;this.sendMessage("pub(authorize.tabV2)",{origin:i,accountAuthType:"evm"}).then((()=>{this.request({method:"eth_accounts"}).then((e=>{t(e)})).catch((t=>{e(t)}))})).catch((t=>{e(t)}))}:(i,n)=>{this.sendMessage("evm(request)",{params:e,method:t}).then((t=>{i(t)})).catch((t=>{n(t)}))})}_sendSync(t){let e;if("net_version"!==t.method)throw new Error(`Not support ${t.method}`);return e=this.version?`SubWallet v${this.version}`:null,{id:t.id,jsonrpc:t.jsonrpc,result:e}}send(t,e){return"string"!=typeof t||e&&!Array.isArray(e)?t&&"object"==typeof t&&"function"==typeof e?this.request(t).then((t=>{e(t)})):this._sendSync(t):this.request({method:t,params:e})}sendAsync(t,e){this.request(t).then((t=>{e(null,{result:t})})).catch((t=>{e(t)}))}}let G,B,W=0;class K{constructor(t){G=t}get(t){return G("pub(accounts.listV2)",{anyType:t,accountAuthType:"substrate"})}subscribe(t){let e=null;return G("pub(accounts.subscribeV2)",{accountAuthType:"substrate"},t).then((t=>{e=t})).catch(console.error),()=>{e&&G("pub(accounts.unsubscribe)",{id:e}).catch(console.error)}}}class j{constructor(t){B=t}get(){return B("pub(metadata.list)")}provide(t){return B("pub(metadata.provide)",t)}addToken(t){return B("pub(token.add)",t)}}const V=i(161),q="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this");function F(t){return t.toString().padStart(2,"0")}var H=i(197);const Z="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this");function $(t,e){return void 0===Z[t]?e:Z[t]}function X(){return Number.NaN}const z=$("BigInt",X),J=("function"==typeof z&&z.asIntN,"function"==typeof q.Buffer&&"function"==typeof q.Buffer.isBuffer),Q="object"==typeof q.process;function Y(t){return"function"==typeof t}function tt(t){return J&&!!t&&Y(t.readDoubleLE)&&q.Buffer.isBuffer(t)}function et(t){return(t&&t.constructor)===Uint8Array||t instanceof Uint8Array}const it=new Array(256),nt=new Array(65536);for(let t=0;t<256;t++)it[t]=t.toString(16).padStart(2,"0");for(let t=0;t<256;t++){const e=t<<8;for(let i=0;i<256;i++)nt[e|i]=it[t]+it[i]}function rt(t,e){const i=t.length%2|0,n=t.length-i|0;for(let i=0;i9&&(st[0|ot[t].toUpperCase().charCodeAt(0)]=0|t);for(let t=0;t<256;t++){const e=t<<8;for(let i=0;i<256;i++)ht[e|i]=st[t]<<4|st[i]}const ut=/^0x[\da-fA-F]+$/,at="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this");function lt(t,e){return void 0===at[t]?e:at[t]}class ft{encode(t){const e=t.length,i=new Uint8Array(e);for(let n=0;n0){const i=Math.ceil(e/8);if(t.length>i)return`${rt(t.subarray(0,i/2),n)}…${rt(t.subarray(t.length-i/2),"")}`}return rt(t,n)}(function(t){return et(t)?tt(t)?new Uint8Array(t):t:function(t,e=-1,i){return"string"==typeof t&&("0x"===t||ut.test(t))&&(-1===e?i||t.length%2==0:t.length===2+Math.ceil(e/4))}(t)?function(t,e=-1){if(!t)return new Uint8Array;let i=t.startsWith("0x")?2:0;const n=Math.ceil((t.length-i)/2),r=Math.ceil(-1===e?n:e/8),o=new Uint8Array(r);for(let e=r>n?r-n:0;e{if(r<=0)return t;const e=`${t}`;return e.lengthvt("debug",e,t,n):dt,error:(...t)=>vt("error",e,t),log:(...t)=>vt("log",e,t),noop:dt,warn:(...t)=>vt("warn",e,t)}}("PostMessageProvider");let _t,Et;class Nt{#t;isClonable=!0;#e=!1;#i={};constructor(t){this.#t=new V,_t=t}clone(){return new Nt(_t)}async connect(){console.error("PostMessageProvider.disconnect() is not implemented.")}async disconnect(){console.error("PostMessageProvider.disconnect() is not implemented.")}get hasSubscriptions(){return!0}get isConnected(){return this.#e}listProviders(){return _t("pub(rpc.listProviders)",void 0)}on(t,e){return this.#t.on(t,e),()=>{this.#t.removeListener(t,e)}}async send(t,e,i,n){if(n){const{callback:i,type:r}=n,o=await _t("pub(rpc.subscribe)",{method:t,params:e,type:r},(t=>{n.callback(null,t)}));return this.#i[`${r}::${o}`]=i,o}return _t("pub(rpc.send)",{method:t,params:e})}async startProvider(t){this.#e=!1,this.#t.emit("disconnected");const e=await _t("pub(rpc.startProvider)",t);return _t("pub(rpc.subscribeConnected)",null,(t=>(this.#e=t,t?this.#t.emit("connected"):this.#t.emit("disconnected"),!0))),e}subscribe(t,e,i,n){return this.send(e,i,!1,{callback:n,type:t})}async unsubscribe(t,e,i){const n=`${t}::${i}`;return void 0===this.#i[n]?(wt.debug((()=>`Unable to find active subscription=${n}`)),!1):(delete this.#i[n],this.send(e,[i]))}}let bt=0;class At{constructor(t){Et=t}async signPayload(t){const e=++bt;return{...await Et("pub(extrinsic.sign)",t),id:e}}async signRaw(t){const e=++bt;return{...await Et("pub(bytes.sign)",t),id:e}}}const Tt={};function Rt(i,n,r){return new Promise(((o,s)=>{const h=`${t}.${Date.now()}.${++W}`;Tt[h]={reject:s,resolve:o,subscriber:r};const u={id:h,message:i,origin:e,request:n||null};window.postMessage(u,"*")}))}const It="1.1.10-0";window.addEventListener("message",(({data:t,source:e})=>{e===window&&t.origin===n&&(t.id?function(t){const e=Tt[t.id];e?(e.subscriber||delete Tt[t.id],t.subscription?e.subscriber(t.subscription):t.error?e.reject(new s(N.INTERNAL_ERROR,t.error,t.errorCode)):e.resolve(t.response)):console.error(`Unknown response: ${JSON.stringify(t)}`)}(t):console.error("Missing id for response."))})),function(t,{name:e,version:i}){const n=window;n.injectedWeb3=n.injectedWeb3||{},n.injectedWeb3[e]={enable:e=>t(e),version:i}}((async function(t){return await Rt("pub(authorize.tabV2)",{origin:t}),new class{constructor(t){this.accounts=new K(t),this.metadata=new j(t),this.provider=new Nt(t),this.signer=new At(t),setInterval((()=>{t("pub(ping)",null).catch((()=>{console.error("Extension unavailable, ping failed")}))}),5e3+Math.floor(5e3*Math.random()))}}(Rt)}),{name:"subwallet-js",version:It}),function(t){const e=window;e.SubWallet?e.SubWallet.provider=t:e.SubWallet=t,e.dispatchEvent(new Event("subwallet#initialized")),e.addEventListener("load",(()=>{e.ethereum||(e.ethereum=t,e.dispatchEvent(new Event("ethereum#initialized")))}))}(new P(Rt,"1.1.10-0"))})()})();
\ No newline at end of file
diff --git a/html/Web.bundle/site/index.html b/html/Web.bundle/site/index.html
index 9413874a9..30189f1e9 100644
--- a/html/Web.bundle/site/index.html
+++ b/html/Web.bundle/site/index.html
@@ -1 +1 @@
-SubWalletSubWallet
\ No newline at end of file
+SubWalletSubWallet
\ No newline at end of file
diff --git a/html/Web.bundle/site/web-runner-82ff6a30707cb66d8b3d.js b/html/Web.bundle/site/web-runner-5218ec43c616158db3a2.js
similarity index 60%
rename from html/Web.bundle/site/web-runner-82ff6a30707cb66d8b3d.js
rename to html/Web.bundle/site/web-runner-5218ec43c616158db3a2.js
index 7f0fc9433..b34e49f32 100644
--- a/html/Web.bundle/site/web-runner-82ff6a30707cb66d8b3d.js
+++ b/html/Web.bundle/site/web-runner-5218ec43c616158db3a2.js
@@ -1,5 +1,5 @@
-/*! For license information please see web-runner-82ff6a30707cb66d8b3d.js.LICENSE.txt */
-(()=>{var __webpack_modules__={94070:(e,t,a)=>{"use strict";t.__esModule=!0;var n=a(49164);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||(t[e]=n[e]))}))},49164:(e,t,a)=>{"use strict";var n=a(71600);t.__esModule=!0,t.pool=function(e,t){return(0,o.memo)(e,((e,a)=>{const n=function(e,t){return[e,t].sort(((e,t)=>c[e.asToken.toString()]-c[t.asToken.toString()]))}(e,a);return t.query.dex.liquidityPool(n).pipe((0,r.map)((t=>{const[r,i]=t;return e.eq(n[0])&&a.eq(n[1])?[r,i]:[i,r]})))}))};var r=a(39002),i=n(a(43862)),o=a(22542);const c=i.default.types.TokenSymbol._enum},42522:(e,t,a)=>{"use strict";t.__esModule=!0;var n=a(48817);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||(t[e]=n[e]))}))},48817:(e,t,a)=>{"use strict";var n=a(71600);t.__esModule=!0,t.stakingPool=function(e,t){return(0,c.memo)(e,(()=>{const e=function(e){return{defaultExchangeRate:e.consts.stakingPool.defaultExchangeRate,bondingDuration:e.consts.polkadotBridge.bondingDuration,eraLength:e.consts.polkadotBridge.eraLength,stakingCurrency:e.consts.stakingPool.stakingCurrencyId,liquidCurrency:e.consts.stakingPool.liquidCurrencyId}}(t);return(0,i.combineLatest)([t.query.stakingPool.currentEra(),t.query.stakingPool.stakingPoolLedger(),t.query.stakingPool.stakingPoolParams(),t.query.tokens.totalIssuance(e.liquidCurrency)]).pipe((0,o.map)((t=>{const[a,n,i,o]=t;return function(e){for(var t=1;t{"use strict";t.__esModule=!0;var n={derive:!0};t.derive=void 0;var r=d(a(75902)),i=d(a(94070)),o=d(a(42522)),c=a(67965);function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,a=new WeakMap;return(s=function(e){return e?a:t})(e)}function d(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var a=s(t);if(a&&a.has(e))return a.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,a&&a.set(e,n),n}Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===c[e]||(t[e]=c[e]))}));const u={loan:r,dex:i,homa:o};t.derive=u},75902:(e,t,a)=>{"use strict";t.__esModule=!0;var n=a(58071);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||(t[e]=n[e]))}));var r=a(95947);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===r[e]||(t[e]=r[e]))}))},95947:(e,t,a)=>{"use strict";t.__esModule=!0,t.allLoanOverviews=function(e,t){return(0,i.memo)(e,(()=>{const a=s(e,t);return(0,o.getAllCollateralCurrencyIds)(t).pipe((0,r.switchMap)((e=>(0,n.combineLatest)(e.map((e=>a(e)))))))}))},t.allLoanTypes=function(e,t){return(0,i.memo)(e,(()=>{const a=c(e,t);return(0,o.getAllCollateralCurrencyIds)(t).pipe((0,r.switchMap)((e=>(0,n.combineLatest)(e.map((e=>a(e)))))))}))},t.loanOverview=s,t.loanType=c;var n=a(80977),r=a(39002),i=a(22542),o=a(99213);function c(e,t){return(0,i.memo)(e,(e=>(0,n.combineLatest)([t.query.cdpEngine.debitExchangeRate(e),t.query.cdpEngine.collateralParams(e)]).pipe((0,r.map)((a=>{const n=function(e){return{minimumDebitValue:e.consts.cdpEngine.minimumDebitValue,defaultDebitExchangeRate:e.consts.cdpEngine.defaultDebitExchangeRate,defaultLiquidationRatio:e.consts.cdpEngine.defaultLiquidationRatio,defaultLiquidationPenalty:e.consts.cdpEngine.defaultLiquidationPenalty}}(t),[r]=a,i=Reflect.has(a[1],"unwrapOrDefault")?a[1].unwrapOrDefault():a[1];return{currency:e,debitExchangeRate:r.isEmpty?n.defaultDebitExchangeRate:r,liquidationPenalty:i.liquidationPenalty.isEmpty?n.defaultLiquidationPenalty:i.liquidationPenalty,liquidationRatio:i.liquidationRatio.isEmpty?n.defaultLiquidationRatio:i.liquidationRatio,requiredCollateralRatio:i.requiredCollateralRatio,interestRatePerSec:i.interestRatePerSec,maximumTotalDebitValue:i.maximumTotalDebitValue,minimumDebitValue:n.minimumDebitValue}})))))}function s(e,t){return(0,i.memo)(e,(e=>t.query.loans.totalPositions(e).pipe((0,r.map)((t=>{const{collateral:a,debit:n}=t;return{currency:e,totalDebit:n,totalCollateral:a}})))))}},58071:(e,t,a)=>{"use strict";t.__esModule=!0,t.allLoans=function(e,t){return(0,i.memo)(e,(a=>{const i=c(e,t);return(0,o.getAllCollateralCurrencyIds)(t).pipe((0,r.switchMap)((e=>(0,n.combineLatest)(e.map((e=>i(a,e)))))))}))},t.loan=c;var n=a(80977),r=a(39002),i=a(22542),o=a(99213);function c(e,t){return(0,i.memo)(e,((e,a)=>t.query.loans.positions(a,e).pipe((0,r.map)((t=>{const{debit:n,collateral:r}=t;return{account:e,currency:a,debit:n,collateral:r}})))))}},82832:()=>{},25506:()=>{},67965:(e,t,a)=>{"use strict";t.__esModule=!0;var n=a(82832);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||(t[e]=n[e]))}));var r=a(25506);Object.keys(r).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===r[e]||(t[e]=r[e]))}));var i=a(29053);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===i[e]||(t[e]=i[e]))}));var o=a(28383);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===o[e]||(t[e]=o[e]))}))},29053:()=>{},28383:()=>{},99213:(e,t,a)=>{"use strict";t.__esModule=!0,t.getAllCollateralCurrencyIds=function(e){return e.query.cdpEngine.collateralParams.keys().pipe((0,n.map)((e=>e.map((e=>e.args[0])))))};var n=a(39002)},81364:(e,t,a)=>{"use strict";var n=a(71600);t.YM=void 0;var r=n(a(26290)),i=n(a(24923)),o=a(37986),c=a(47649),s=a(93058),d=a(6871);const u=["types","rpc","typesAlias","typesBundle","runtime","signedExtensions"];function f(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t{"use strict";t.__esModule=!0,t.runtime=void 0,t.runtime={EVMRuntimeRPCApi:[{version:2,methods:{call:{description:"call evm contract",params:[{name:"from",type:"H160"},{name:"to",type:"H160"},{name:"data",type:"Vec"},{name:"value",type:"Balance"},{name:"gas_limit",type:"u64"},{name:"storage_limit",type:"u32"},{name:"access_list",type:"Option>"},{name:"estimate",type:"bool"}],type:"Result"},create:{description:"create evm contract",params:[{name:"from",type:"H160"},{name:"data",type:"Vec"},{name:"value",type:"Balance"},{name:"gas_limit",type:"u64"},{name:"storage_limit",type:"u32"},{name:"access_list",type:"Option>"},{name:"estimate",type:"bool"}],type:"Result"}}}]}},43862:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={rpc:{},types:{Amount:"i128",AmountOf:"Amount",AuctionId:"u32",AuctionIdOf:"AuctionId",TokenSymbol:{_enum:{ACA:0,AUSD:1,DOT:2,LDOT:3,RENBTC:20,CASH:21,KAR:128,KUSD:129,KSM:130,LKSM:131,BNC:168,VSKSM:169,PHA:170,KINT:171,KBTC:172}},DexShare:{_enum:{Token:"TokenSymbol",Erc20:"EvmAddress"}},CurrencyId:{_enum:{Token:"TokenSymbol",DEXShare:"(DexShare, DexShare)",ERC20:"EvmAddress",StableAssetPoolToken:"u32",LiquidCrowdloan:"u32",ForeignAsset:"u32"}},CurrencyIdOf:"CurrencyId",AirDropCurrencyId:{_enum:["KAR","ACA"]},AuthoritysOriginId:{_enum:["Root","Treasury","HonzonTreasury","HomaTreasury","TreasuryReserve"]},AcalaDataProviderId:{_enum:["Aggregated","Acala","Band"]},TradingPair:"(CurrencyId, CurrencyId)",OrmlCurrencyId:"CurrencyId",ChainBridgeChainId:"u8",AcalaAssetMetadata:{name:"Vec",symbol:"Vec",decimals:"u8",minimalBalance:"Balance"},NumberOrHex:"u128"},typesAlias:{rewards:{OrmlCurrencyId:"CurrencyId"},oracle:{DataProviderId:"AcalaDataProviderId"},chainBridge:{ChainId:"ChainBridgeChainId"}}}},67813:(e,t,a)=>{"use strict";a(51235)},67570:(e,t,a)=>{"use strict";a(10571)},17256:(e,t,a)=>{"use strict";a(98664)},61564:(e,t,a)=>{"use strict";a(54357)},39791:(e,t,a)=>{"use strict";a(74465)},98070:(e,t,a)=>{"use strict";a(6740)},71793:(e,t,a)=>{"use strict";a(10747)},34113:(e,t,a)=>{"use strict";a(67813),a(67570),a(17256),a(61564),a(71793),a(39791),a(98070)},93058:(e,t,a)=>{"use strict";t.__esModule=!0,t.typesBundle=t.typesAlias=t.types=t.signedExtensions=t.rpc=t.lookupTypes=void 0;var n=a(59490);a(34113),a(46513);var r=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var a=i(t);if(a&&a.has(e))return a.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var c=r?Object.getOwnPropertyDescriptor(e,o):null;c&&(c.get||c.set)?Object.defineProperty(n,o,c):n[o]=e[o]}return n.default=e,a&&a.set(e,n),n}(a(782));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,a=new WeakMap;return(i=function(e){return e?a:t})(e)}t.lookupTypes=r;const o=n.types;t.types=o;const c=n.rpc;t.rpc=c;const s=n.typesAlias;t.typesAlias=s;const d=n.typesBundle;t.typesBundle=d;const u=n.signedExtensions;t.signedExtensions=u},35842:(e,t)=>{"use strict";t.__esModule=!0,t.default=void 0,t.default={FrameSystemAccountInfo:{nonce:"u32",consumers:"u32",providers:"u32",sufficients:"u32",data:"PalletBalancesAccountData"},PalletBalancesAccountData:{free:"u128",reserved:"u128",miscFrozen:"u128",feeFrozen:"u128"},FrameSupportWeightsPerDispatchClassU64:{normal:"u64",operational:"u64",mandatory:"u64"},SpRuntimeDigest:{logs:"Vec"},SpRuntimeDigestDigestItem:{_enum:{Other:"Bytes",__Unused1:"Null",__Unused2:"Null",__Unused3:"Null",Consensus:"([u8;4],Bytes)",Seal:"([u8;4],Bytes)",PreRuntime:"([u8;4],Bytes)",__Unused7:"Null",RuntimeEnvironmentUpdated:"Null"}},FrameSystemEventRecord:{phase:"FrameSystemPhase",event:"Event",topics:"Vec"},FrameSystemEvent:{_enum:{ExtrinsicSuccess:{dispatchInfo:"FrameSupportWeightsDispatchInfo"},ExtrinsicFailed:{dispatchError:"SpRuntimeDispatchError",dispatchInfo:"FrameSupportWeightsDispatchInfo"},CodeUpdated:"Null",NewAccount:{account:"AccountId32"},KilledAccount:{account:"AccountId32"},Remarked:{_alias:{hash_:"hash"},sender:"AccountId32",hash_:"H256"}}},FrameSupportWeightsDispatchInfo:{weight:"u64",class:"FrameSupportWeightsDispatchClass",paysFee:"FrameSupportWeightsPays"},FrameSupportWeightsDispatchClass:{_enum:["Normal","Operational","Mandatory"]},FrameSupportWeightsPays:{_enum:["Yes","No"]},SpRuntimeDispatchError:{_enum:{Other:"Null",CannotLookup:"Null",BadOrigin:"Null",Module:"SpRuntimeModuleError",ConsumerRemaining:"Null",NoProviders:"Null",TooManyConsumers:"Null",Token:"SpRuntimeTokenError",Arithmetic:"SpRuntimeArithmeticError",Transactional:"SpRuntimeTransactionalError"}},SpRuntimeModuleError:{index:"u8",error:"[u8;4]"},SpRuntimeTokenError:{_enum:["NoFunds","WouldDie","BelowMinimum","CannotCreate","UnknownAsset","Frozen","Unsupported"]},SpRuntimeArithmeticError:{_enum:["Underflow","Overflow","DivisionByZero"]},SpRuntimeTransactionalError:{_enum:["LimitReached","NoLayer"]},PalletSchedulerEvent:{_enum:{Scheduled:{when:"u32",index:"u32"},Canceled:{when:"u32",index:"u32"},Dispatched:{task:"(u32,u32)",id:"Option",result:"Result"},CallLookupFailed:{task:"(u32,u32)",id:"Option",error:"FrameSupportScheduleLookupError"}}},FrameSupportScheduleLookupError:{_enum:["Unknown","BadFormat"]},PalletUtilityEvent:{_enum:{BatchInterrupted:{index:"u32",error:"SpRuntimeDispatchError"},BatchCompleted:"Null",BatchCompletedWithErrors:"Null",ItemCompleted:"Null",ItemFailed:{error:"SpRuntimeDispatchError"},DispatchedAs:{result:"Result"}}},PalletMultisigEvent:{_enum:{NewMultisig:{approving:"AccountId32",multisig:"AccountId32",callHash:"[u8;32]"},MultisigApproval:{approving:"AccountId32",timepoint:"PalletMultisigTimepoint",multisig:"AccountId32",callHash:"[u8;32]"},MultisigExecuted:{approving:"AccountId32",timepoint:"PalletMultisigTimepoint",multisig:"AccountId32",callHash:"[u8;32]",result:"Result"},MultisigCancelled:{cancelling:"AccountId32",timepoint:"PalletMultisigTimepoint",multisig:"AccountId32",callHash:"[u8;32]"}}},PalletMultisigTimepoint:{height:"u32",index:"u32"},PalletProxyEvent:{_enum:{ProxyExecuted:{result:"Result"},AnonymousCreated:{anonymous:"AccountId32",who:"AccountId32",proxyType:"RuntimeCommonProxyType",disambiguationIndex:"u16"},Announced:{real:"AccountId32",proxy:"AccountId32",callHash:"H256"},ProxyAdded:{delegator:"AccountId32",delegatee:"AccountId32",proxyType:"RuntimeCommonProxyType",delay:"u32"},ProxyRemoved:{delegator:"AccountId32",delegatee:"AccountId32",proxyType:"RuntimeCommonProxyType",delay:"u32"}}},RuntimeCommonProxyType:{_enum:["Any","CancelProxy","Governance","Auction","Swap","Loan","DexLiquidity","StableAssetSwap","StableAssetLiquidity","Homa"]},ModuleTransactionPauseModuleEvent:{_enum:{TransactionPaused:{palletNameBytes:"Bytes",functionNameBytes:"Bytes"},TransactionUnpaused:{palletNameBytes:"Bytes",functionNameBytes:"Bytes"},EvmPrecompilePaused:{address:"H160"},EvmPrecompileUnpaused:{address:"H160"}}},ModuleIdleSchedulerModuleEvent:{_enum:{TaskDispatched:{taskId:"u32",result:"Result"},TaskAdded:{taskId:"u32",task:"AcalaRuntimeScheduledTasks"}}},AcalaRuntimeScheduledTasks:{_enum:{EvmTask:"ModuleEvmEvmTask"}},ModuleEvmEvmTask:{_enum:{Schedule:{from:"H160",target:"H160",input:"Bytes",value:"u128",gasLimit:"u64",storageLimit:"u32"},Remove:{caller:"H160",contract:"H160",maintainer:"H160"}}},AcalaRuntimeRuntime:"Null",PalletPreimageEvent:{_enum:{Noted:{_alias:{hash_:"hash"},hash_:"H256"},Requested:{_alias:{hash_:"hash"},hash_:"H256"},Cleared:{_alias:{hash_:"hash"},hash_:"H256"}}},PalletBalancesEvent:{_enum:{Endowed:{account:"AccountId32",freeBalance:"u128"},DustLost:{account:"AccountId32",amount:"u128"},Transfer:{from:"AccountId32",to:"AccountId32",amount:"u128"},BalanceSet:{who:"AccountId32",free:"u128",reserved:"u128"},Reserved:{who:"AccountId32",amount:"u128"},Unreserved:{who:"AccountId32",amount:"u128"},ReserveRepatriated:{from:"AccountId32",to:"AccountId32",amount:"u128",destinationStatus:"FrameSupportTokensMiscBalanceStatus"},Deposit:{who:"AccountId32",amount:"u128"},Withdraw:{who:"AccountId32",amount:"u128"},Slashed:{who:"AccountId32",amount:"u128"}}},FrameSupportTokensMiscBalanceStatus:{_enum:["Free","Reserved"]},OrmlTokensModuleEvent:{_enum:{Endowed:{currencyId:"AcalaPrimitivesCurrencyCurrencyId",who:"AccountId32",amount:"u128"},DustLost:{currencyId:"AcalaPrimitivesCurrencyCurrencyId",who:"AccountId32",amount:"u128"},Transfer:{currencyId:"AcalaPrimitivesCurrencyCurrencyId",from:"AccountId32",to:"AccountId32",amount:"u128"},Reserved:{currencyId:"AcalaPrimitivesCurrencyCurrencyId",who:"AccountId32",amount:"u128"},Unreserved:{currencyId:"AcalaPrimitivesCurrencyCurrencyId",who:"AccountId32",amount:"u128"},ReserveRepatriated:{currencyId:"AcalaPrimitivesCurrencyCurrencyId",from:"AccountId32",to:"AccountId32",amount:"u128",status:"FrameSupportTokensMiscBalanceStatus"},BalanceSet:{currencyId:"AcalaPrimitivesCurrencyCurrencyId",who:"AccountId32",free:"u128",reserved:"u128"},TotalIssuanceSet:{currencyId:"AcalaPrimitivesCurrencyCurrencyId",amount:"u128"},Withdrawn:{currencyId:"AcalaPrimitivesCurrencyCurrencyId",who:"AccountId32",amount:"u128"},Slashed:{currencyId:"AcalaPrimitivesCurrencyCurrencyId",who:"AccountId32",freeAmount:"u128",reservedAmount:"u128"},Deposited:{currencyId:"AcalaPrimitivesCurrencyCurrencyId",who:"AccountId32",amount:"u128"},LockSet:{lockId:"[u8;8]",currencyId:"AcalaPrimitivesCurrencyCurrencyId",who:"AccountId32",amount:"u128"},LockRemoved:{lockId:"[u8;8]",currencyId:"AcalaPrimitivesCurrencyCurrencyId",who:"AccountId32"}}},AcalaPrimitivesCurrencyCurrencyId:{_enum:{Token:"AcalaPrimitivesCurrencyTokenSymbol",DexShare:"(AcalaPrimitivesCurrencyDexShare,AcalaPrimitivesCurrencyDexShare)",Erc20:"H160",StableAssetPoolToken:"u32",LiquidCrowdloan:"u32",ForeignAsset:"u16"}},AcalaPrimitivesCurrencyTokenSymbol:{_enum:["ACA","AUSD","DOT","LDOT","TAP","__Unused5","__Unused6","__Unused7","__Unused8","__Unused9","__Unused10","__Unused11","__Unused12","__Unused13","__Unused14","__Unused15","__Unused16","__Unused17","__Unused18","__Unused19","RENBTC","CASH","__Unused22","__Unused23","__Unused24","__Unused25","__Unused26","__Unused27","__Unused28","__Unused29","__Unused30","__Unused31","__Unused32","__Unused33","__Unused34","__Unused35","__Unused36","__Unused37","__Unused38","__Unused39","__Unused40","__Unused41","__Unused42","__Unused43","__Unused44","__Unused45","__Unused46","__Unused47","__Unused48","__Unused49","__Unused50","__Unused51","__Unused52","__Unused53","__Unused54","__Unused55","__Unused56","__Unused57","__Unused58","__Unused59","__Unused60","__Unused61","__Unused62","__Unused63","__Unused64","__Unused65","__Unused66","__Unused67","__Unused68","__Unused69","__Unused70","__Unused71","__Unused72","__Unused73","__Unused74","__Unused75","__Unused76","__Unused77","__Unused78","__Unused79","__Unused80","__Unused81","__Unused82","__Unused83","__Unused84","__Unused85","__Unused86","__Unused87","__Unused88","__Unused89","__Unused90","__Unused91","__Unused92","__Unused93","__Unused94","__Unused95","__Unused96","__Unused97","__Unused98","__Unused99","__Unused100","__Unused101","__Unused102","__Unused103","__Unused104","__Unused105","__Unused106","__Unused107","__Unused108","__Unused109","__Unused110","__Unused111","__Unused112","__Unused113","__Unused114","__Unused115","__Unused116","__Unused117","__Unused118","__Unused119","__Unused120","__Unused121","__Unused122","__Unused123","__Unused124","__Unused125","__Unused126","__Unused127","KAR","KUSD","KSM","LKSM","TAI","__Unused133","__Unused134","__Unused135","__Unused136","__Unused137","__Unused138","__Unused139","__Unused140","__Unused141","__Unused142","__Unused143","__Unused144","__Unused145","__Unused146","__Unused147","__Unused148","__Unused149","__Unused150","__Unused151","__Unused152","__Unused153","__Unused154","__Unused155","__Unused156","__Unused157","__Unused158","__Unused159","__Unused160","__Unused161","__Unused162","__Unused163","__Unused164","__Unused165","__Unused166","__Unused167","BNC","VSKSM","PHA","KINT","KBTC"]},AcalaPrimitivesCurrencyDexShare:{_enum:{Token:"AcalaPrimitivesCurrencyTokenSymbol",Erc20:"H160",LiquidCrowdloan:"u32",ForeignAsset:"u16",StableAssetPoolToken:"u32"}},ModuleCurrenciesModuleEvent:{_enum:{Transferred:{currencyId:"AcalaPrimitivesCurrencyCurrencyId",from:"AccountId32",to:"AccountId32",amount:"u128"},Withdrawn:{currencyId:"AcalaPrimitivesCurrencyCurrencyId",who:"AccountId32",amount:"u128"},Deposited:{currencyId:"AcalaPrimitivesCurrencyCurrencyId",who:"AccountId32",amount:"u128"},DustSwept:{currencyId:"AcalaPrimitivesCurrencyCurrencyId",who:"AccountId32",amount:"u128"}}},OrmlVestingModuleEvent:{_enum:{VestingScheduleAdded:{from:"AccountId32",to:"AccountId32",vestingSchedule:"OrmlVestingVestingSchedule"},Claimed:{who:"AccountId32",amount:"u128"},VestingSchedulesUpdated:{who:"AccountId32"}}},OrmlVestingVestingSchedule:{start:"u32",period:"u32",periodCount:"u32",perPeriod:"Compact"},ModuleTransactionPaymentModuleEvent:{_enum:{ChargeFeePoolEnabled:{subAccount:"AccountId32",currencyId:"AcalaPrimitivesCurrencyCurrencyId",exchangeRate:"u128",poolSize:"u128",swapThreshold:"u128"},ChargeFeePoolSwapped:{subAccount:"AccountId32",supplyCurrencyId:"AcalaPrimitivesCurrencyCurrencyId",oldExchangeRate:"u128",swapExchangeRate:"u128",newExchangeRate:"u128",newPoolSize:"u128"},ChargeFeePoolDisabled:{currencyId:"AcalaPrimitivesCurrencyCurrencyId",foreignAmount:"u128",nativeAmount:"u128"},TransactionFeePaid:{who:"AccountId32",actualFee:"u128",actualTip:"u128",actualSurplus:"u128"}}},PalletTreasuryEvent:{_enum:{Proposed:{proposalIndex:"u32"},Spending:{budgetRemaining:"u128"},Awarded:{proposalIndex:"u32",award:"u128",account:"AccountId32"},Rejected:{proposalIndex:"u32",slashed:"u128"},Burnt:{burntFunds:"u128"},Rollover:{rolloverBalance:"u128"},Deposit:{value:"u128"},SpendApproved:{proposalIndex:"u32",amount:"u128",beneficiary:"AccountId32"}}},PalletBountiesEvent:{_enum:{BountyProposed:{index:"u32"},BountyRejected:{index:"u32",bond:"u128"},BountyBecameActive:{index:"u32"},BountyAwarded:{index:"u32",beneficiary:"AccountId32"},BountyClaimed:{index:"u32",payout:"u128",beneficiary:"AccountId32"},BountyCanceled:{index:"u32"},BountyExtended:{index:"u32"}}},PalletTipsEvent:{_enum:{NewTip:{tipHash:"H256"},TipClosing:{tipHash:"H256"},TipClosed:{tipHash:"H256",who:"AccountId32",payout:"u128"},TipRetracted:{tipHash:"H256"},TipSlashed:{tipHash:"H256",finder:"AccountId32",deposit:"u128"}}},ModuleCollatorSelectionEvent:{_enum:{NewInvulnerables:{newInvulnerables:"Vec"},NewDesiredCandidates:{newDesiredCandidates:"u32"},NewCandidacyBond:{newCandidacyBond:"u128"},CandidateAdded:{who:"AccountId32",bond:"u128"},CandidateRemoved:{who:"AccountId32"}}},PalletSessionEvent:{_enum:{NewSession:{sessionIndex:"u32"}}},ModuleSessionManagerModuleEvent:{_enum:{ScheduledSessionDuration:{blockNumber:"u32",sessionIndex:"u32",sessionDuration:"u32"}}},CumulusPalletXcmpQueueEvent:{_enum:{Success:{messageHash:"Option",weight:"u64"},Fail:{messageHash:"Option",error:"XcmV2TraitsError",weight:"u64"},BadVersion:{messageHash:"Option"},BadFormat:{messageHash:"Option"},UpwardMessageSent:{messageHash:"Option"},XcmpMessageSent:{messageHash:"Option"},OverweightEnqueued:{sender:"u32",sentAt:"u32",index:"u64",required:"u64"},OverweightServiced:{index:"u64",used:"u64"}}},XcmV2TraitsError:{_enum:{Overflow:"Null",Unimplemented:"Null",UntrustedReserveLocation:"Null",UntrustedTeleportLocation:"Null",MultiLocationFull:"Null",MultiLocationNotInvertible:"Null",BadOrigin:"Null",InvalidLocation:"Null",AssetNotFound:"Null",FailedToTransactAsset:"Null",NotWithdrawable:"Null",LocationCannotHold:"Null",ExceedsMaxMessageSize:"Null",DestinationUnsupported:"Null",Transport:"Null",Unroutable:"Null",UnknownClaim:"Null",FailedToDecode:"Null",MaxWeightInvalid:"Null",NotHoldingFees:"Null",TooExpensive:"Null",Trap:"u64",UnhandledXcmVersion:"Null",WeightLimitReached:"u64",Barrier:"Null",WeightNotComputable:"Null"}},PalletXcmEvent:{_enum:{Attempted:"XcmV2TraitsOutcome",Sent:"(XcmV1MultiLocation,XcmV1MultiLocation,XcmV2Xcm)",UnexpectedResponse:"(XcmV1MultiLocation,u64)",ResponseReady:"(u64,XcmV2Response)",Notified:"(u64,u8,u8)",NotifyOverweight:"(u64,u8,u8,u64,u64)",NotifyDispatchError:"(u64,u8,u8)",NotifyDecodeFailed:"(u64,u8,u8)",InvalidResponder:"(XcmV1MultiLocation,u64,Option)",InvalidResponderVersion:"(XcmV1MultiLocation,u64)",ResponseTaken:"u64",AssetsTrapped:"(H256,XcmV1MultiLocation,XcmVersionedMultiAssets)",VersionChangeNotified:"(XcmV1MultiLocation,u32)",SupportedVersionChanged:"(XcmV1MultiLocation,u32)",NotifyTargetSendFail:"(XcmV1MultiLocation,u64,XcmV2TraitsError)",NotifyTargetMigrationFail:"(XcmVersionedMultiLocation,u64)"}},XcmV2TraitsOutcome:{_enum:{Complete:"u64",Incomplete:"(u64,XcmV2TraitsError)",Error:"XcmV2TraitsError"}},XcmV1MultiLocation:{parents:"u8",interior:"XcmV1MultilocationJunctions"},XcmV1MultilocationJunctions:{_enum:{Here:"Null",X1:"XcmV1Junction",X2:"(XcmV1Junction,XcmV1Junction)",X3:"(XcmV1Junction,XcmV1Junction,XcmV1Junction)",X4:"(XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction)",X5:"(XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction)",X6:"(XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction)",X7:"(XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction)",X8:"(XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction)"}},XcmV1Junction:{_enum:{Parachain:"Compact",AccountId32:{network:"XcmV0JunctionNetworkId",id:"[u8;32]"},AccountIndex64:{network:"XcmV0JunctionNetworkId",index:"Compact"},AccountKey20:{network:"XcmV0JunctionNetworkId",key:"[u8;20]"},PalletInstance:"u8",GeneralIndex:"Compact",GeneralKey:"Bytes",OnlyChild:"Null",Plurality:{id:"XcmV0JunctionBodyId",part:"XcmV0JunctionBodyPart"}}},XcmV0JunctionNetworkId:{_enum:{Any:"Null",Named:"Bytes",Polkadot:"Null",Kusama:"Null"}},XcmV0JunctionBodyId:{_enum:{Unit:"Null",Named:"Bytes",Index:"Compact",Executive:"Null",Technical:"Null",Legislative:"Null",Judicial:"Null"}},XcmV0JunctionBodyPart:{_enum:{Voice:"Null",Members:{count:"Compact"},Fraction:{nom:"Compact",denom:"Compact"},AtLeastProportion:{nom:"Compact",denom:"Compact"},MoreThanProportion:{nom:"Compact",denom:"Compact"}}},XcmV2Xcm:"Vec",XcmV2Instruction:{_enum:{WithdrawAsset:"XcmV1MultiassetMultiAssets",ReserveAssetDeposited:"XcmV1MultiassetMultiAssets",ReceiveTeleportedAsset:"XcmV1MultiassetMultiAssets",QueryResponse:{queryId:"Compact",response:"XcmV2Response",maxWeight:"Compact"},TransferAsset:{assets:"XcmV1MultiassetMultiAssets",beneficiary:"XcmV1MultiLocation"},TransferReserveAsset:{assets:"XcmV1MultiassetMultiAssets",dest:"XcmV1MultiLocation",xcm:"XcmV2Xcm"},Transact:{originType:"XcmV0OriginKind",requireWeightAtMost:"Compact",call:"XcmDoubleEncoded"},HrmpNewChannelOpenRequest:{sender:"Compact",maxMessageSize:"Compact",maxCapacity:"Compact"},HrmpChannelAccepted:{recipient:"Compact"},HrmpChannelClosing:{initiator:"Compact",sender:"Compact",recipient:"Compact"},ClearOrigin:"Null",DescendOrigin:"XcmV1MultilocationJunctions",ReportError:{queryId:"Compact",dest:"XcmV1MultiLocation",maxResponseWeight:"Compact"},DepositAsset:{assets:"XcmV1MultiassetMultiAssetFilter",maxAssets:"Compact",beneficiary:"XcmV1MultiLocation"},DepositReserveAsset:{assets:"XcmV1MultiassetMultiAssetFilter",maxAssets:"Compact",dest:"XcmV1MultiLocation",xcm:"XcmV2Xcm"},ExchangeAsset:{give:"XcmV1MultiassetMultiAssetFilter",receive:"XcmV1MultiassetMultiAssets"},InitiateReserveWithdraw:{assets:"XcmV1MultiassetMultiAssetFilter",reserve:"XcmV1MultiLocation",xcm:"XcmV2Xcm"},InitiateTeleport:{assets:"XcmV1MultiassetMultiAssetFilter",dest:"XcmV1MultiLocation",xcm:"XcmV2Xcm"},QueryHolding:{queryId:"Compact",dest:"XcmV1MultiLocation",assets:"XcmV1MultiassetMultiAssetFilter",maxResponseWeight:"Compact"},BuyExecution:{fees:"XcmV1MultiAsset",weightLimit:"XcmV2WeightLimit"},RefundSurplus:"Null",SetErrorHandler:"XcmV2Xcm",SetAppendix:"XcmV2Xcm",ClearError:"Null",ClaimAsset:{assets:"XcmV1MultiassetMultiAssets",ticket:"XcmV1MultiLocation"},Trap:"Compact",SubscribeVersion:{queryId:"Compact",maxResponseWeight:"Compact"},UnsubscribeVersion:"Null"}},XcmV1MultiassetMultiAssets:"Vec",XcmV1MultiAsset:{id:"XcmV1MultiassetAssetId",fun:"XcmV1MultiassetFungibility"},XcmV1MultiassetAssetId:{_enum:{Concrete:"XcmV1MultiLocation",Abstract:"Bytes"}},XcmV1MultiassetFungibility:{_enum:{Fungible:"Compact",NonFungible:"XcmV1MultiassetAssetInstance"}},XcmV1MultiassetAssetInstance:{_enum:{Undefined:"Null",Index:"Compact",Array4:"[u8;4]",Array8:"[u8;8]",Array16:"[u8;16]",Array32:"[u8;32]",Blob:"Bytes"}},XcmV2Response:{_enum:{Null:"Null",Assets:"XcmV1MultiassetMultiAssets",ExecutionResult:"Option<(u32,XcmV2TraitsError)>",Version:"u32"}},XcmV0OriginKind:{_enum:["Native","SovereignAccount","Superuser","Xcm"]},XcmDoubleEncoded:{encoded:"Bytes"},XcmV1MultiassetMultiAssetFilter:{_enum:{Definite:"XcmV1MultiassetMultiAssets",Wild:"XcmV1MultiassetWildMultiAsset"}},XcmV1MultiassetWildMultiAsset:{_enum:{All:"Null",AllOf:{id:"XcmV1MultiassetAssetId",fun:"XcmV1MultiassetWildFungibility"}}},XcmV1MultiassetWildFungibility:{_enum:["Fungible","NonFungible"]},XcmV2WeightLimit:{_enum:{Unlimited:"Null",Limited:"Compact"}},XcmVersionedMultiAssets:{_enum:{V0:"Vec",V1:"XcmV1MultiassetMultiAssets"}},XcmV0MultiAsset:{_enum:{None:"Null",All:"Null",AllFungible:"Null",AllNonFungible:"Null",AllAbstractFungible:{id:"Bytes"},AllAbstractNonFungible:{class:"Bytes"},AllConcreteFungible:{id:"XcmV0MultiLocation"},AllConcreteNonFungible:{class:"XcmV0MultiLocation"},AbstractFungible:{id:"Bytes",amount:"Compact"},AbstractNonFungible:{class:"Bytes",instance:"XcmV1MultiassetAssetInstance"},ConcreteFungible:{id:"XcmV0MultiLocation",amount:"Compact"},ConcreteNonFungible:{class:"XcmV0MultiLocation",instance:"XcmV1MultiassetAssetInstance"}}},XcmV0MultiLocation:{_enum:{Null:"Null",X1:"XcmV0Junction",X2:"(XcmV0Junction,XcmV0Junction)",X3:"(XcmV0Junction,XcmV0Junction,XcmV0Junction)",X4:"(XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction)",X5:"(XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction)",X6:"(XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction)",X7:"(XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction)",X8:"(XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction)"}},XcmV0Junction:{_enum:{Parent:"Null",Parachain:"Compact",AccountId32:{network:"XcmV0JunctionNetworkId",id:"[u8;32]"},AccountIndex64:{network:"XcmV0JunctionNetworkId",index:"Compact"},AccountKey20:{network:"XcmV0JunctionNetworkId",key:"[u8;20]"},PalletInstance:"u8",GeneralIndex:"Compact",GeneralKey:"Bytes",OnlyChild:"Null",Plurality:{id:"XcmV0JunctionBodyId",part:"XcmV0JunctionBodyPart"}}},XcmVersionedMultiLocation:{_enum:{V0:"XcmV0MultiLocation",V1:"XcmV1MultiLocation"}},CumulusPalletXcmEvent:{_enum:{InvalidFormat:"[u8;8]",UnsupportedVersion:"[u8;8]",ExecutedDownward:"([u8;8],XcmV2TraitsOutcome)"}},CumulusPalletDmpQueueEvent:{_enum:{InvalidFormat:{messageId:"[u8;32]"},UnsupportedVersion:{messageId:"[u8;32]"},ExecutedDownward:{messageId:"[u8;32]",outcome:"XcmV2TraitsOutcome"},WeightExhausted:{messageId:"[u8;32]",remainingWeight:"u64",requiredWeight:"u64"},OverweightEnqueued:{messageId:"[u8;32]",overweightIndex:"u64",requiredWeight:"u64"},OverweightServiced:{overweightIndex:"u64",weightUsed:"u64"}}},OrmlXtokensModuleEvent:{_enum:{TransferredMultiAssets:{sender:"AccountId32",assets:"XcmV1MultiassetMultiAssets",fee:"XcmV1MultiAsset",dest:"XcmV1MultiLocation"}}},OrmlUnknownTokensModuleEvent:{_enum:{Deposited:{asset:"XcmV1MultiAsset",who:"XcmV1MultiLocation"},Withdrawn:{asset:"XcmV1MultiAsset",who:"XcmV1MultiLocation"}}},OrmlXcmModuleEvent:{_enum:{Sent:{to:"XcmV1MultiLocation",message:"XcmV2Xcm"}}},OrmlAuthorityModuleEvent:{_enum:{Dispatched:{result:"Result"},Scheduled:{origin:"AcalaRuntimeOriginCaller",index:"u32"},FastTracked:{origin:"AcalaRuntimeOriginCaller",index:"u32",when:"u32"},Delayed:{origin:"AcalaRuntimeOriginCaller",index:"u32",when:"u32"},Cancelled:{origin:"AcalaRuntimeOriginCaller",index:"u32"},AuthorizedCall:{_alias:{hash_:"hash"},hash_:"H256",caller:"Option"},RemovedAuthorizedCall:{_alias:{hash_:"hash"},hash_:"H256"},TriggeredCallBy:{_alias:{hash_:"hash"},hash_:"H256",caller:"AccountId32"}}},AcalaRuntimeOriginCaller:{_enum:{system:"FrameSupportDispatchRawOrigin",__Unused1:"Null",__Unused2:"Null",__Unused3:"Null",__Unused4:"Null",__Unused5:"Null",__Unused6:"Null",__Unused7:"Null",Void:"SpCoreVoid",__Unused9:"Null",__Unused10:"Null",__Unused11:"Null",__Unused12:"Null",__Unused13:"Null",__Unused14:"Null",__Unused15:"Null",__Unused16:"Null",__Unused17:"Null",__Unused18:"Null",__Unused19:"Null",__Unused20:"Null",__Unused21:"Null",__Unused22:"Null",__Unused23:"Null",__Unused24:"Null",__Unused25:"Null",__Unused26:"Null",__Unused27:"Null",__Unused28:"Null",__Unused29:"Null",__Unused30:"Null",__Unused31:"Null",__Unused32:"Null",__Unused33:"Null",__Unused34:"Null",__Unused35:"Null",__Unused36:"Null",__Unused37:"Null",__Unused38:"Null",__Unused39:"Null",__Unused40:"Null",__Unused41:"Null",__Unused42:"Null",__Unused43:"Null",__Unused44:"Null",__Unused45:"Null",__Unused46:"Null",__Unused47:"Null",__Unused48:"Null",__Unused49:"Null",__Unused50:"Null",PolkadotXcm:"PalletXcmOrigin",CumulusXcm:"CumulusPalletXcmOrigin",__Unused53:"Null",__Unused54:"Null",__Unused55:"Null",__Unused56:"Null",__Unused57:"Null",__Unused58:"Null",__Unused59:"Null",Authority:"OrmlAuthorityDelayedOrigin",GeneralCouncil:"PalletCollectiveRawOrigin",__Unused62:"Null",FinancialCouncil:"PalletCollectiveRawOrigin",__Unused64:"Null",HomaCouncil:"PalletCollectiveRawOrigin",__Unused66:"Null",TechnicalCommittee:"PalletCollectiveRawOrigin"}},FrameSupportDispatchRawOrigin:{_enum:{Root:"Null",Signed:"AccountId32",None:"Null"}},PalletXcmOrigin:{_enum:{Xcm:"XcmV1MultiLocation",Response:"XcmV1MultiLocation"}},CumulusPalletXcmOrigin:{_enum:{Relay:"Null",SiblingParachain:"u32"}},OrmlAuthorityDelayedOrigin:{delay:"u32",origin:"AcalaRuntimeOriginCaller"},PalletCollectiveRawOrigin:{_enum:{Members:"(u32,u32)",Member:"AccountId32",_Phantom:"Null"}},SpCoreVoid:"Null",PalletCollectiveEvent:{_enum:{Proposed:{account:"AccountId32",proposalIndex:"u32",proposalHash:"H256",threshold:"u32"},Voted:{account:"AccountId32",proposalHash:"H256",voted:"bool",yes:"u32",no:"u32"},Approved:{proposalHash:"H256"},Disapproved:{proposalHash:"H256"},Executed:{proposalHash:"H256",result:"Result"},MemberExecuted:{proposalHash:"H256",result:"Result"},Closed:{proposalHash:"H256",yes:"u32",no:"u32"}}},PalletMembershipEvent:{_enum:["MemberAdded","MemberRemoved","MembersSwapped","MembersReset","KeyChanged","Dummy"]},PalletDemocracyEvent:{_enum:{Proposed:{proposalIndex:"u32",deposit:"u128"},Tabled:{proposalIndex:"u32",deposit:"u128",depositors:"Vec"},ExternalTabled:"Null",Started:{refIndex:"u32",threshold:"PalletDemocracyVoteThreshold"},Passed:{refIndex:"u32"},NotPassed:{refIndex:"u32"},Cancelled:{refIndex:"u32"},Executed:{refIndex:"u32",result:"Result"},Delegated:{who:"AccountId32",target:"AccountId32"},Undelegated:{account:"AccountId32"},Vetoed:{who:"AccountId32",proposalHash:"H256",until:"u32"},PreimageNoted:{proposalHash:"H256",who:"AccountId32",deposit:"u128"},PreimageUsed:{proposalHash:"H256",provider:"AccountId32",deposit:"u128"},PreimageInvalid:{proposalHash:"H256",refIndex:"u32"},PreimageMissing:{proposalHash:"H256",refIndex:"u32"},PreimageReaped:{proposalHash:"H256",provider:"AccountId32",deposit:"u128",reaper:"AccountId32"},Blacklisted:{proposalHash:"H256"},Voted:{voter:"AccountId32",refIndex:"u32",vote:"PalletDemocracyVoteAccountVote"},Seconded:{seconder:"AccountId32",propIndex:"u32"},ProposalCanceled:{propIndex:"u32"}}},PalletDemocracyVoteThreshold:{_enum:["SuperMajorityApprove","SuperMajorityAgainst","SimpleMajority"]},PalletDemocracyVoteAccountVote:{_enum:{Standard:{vote:"Vote",balance:"u128"},Split:{aye:"u128",nay:"u128"}}},OrmlOracleModuleEvent:{_enum:{NewFeedData:{sender:"AccountId32",values:"Vec<(AcalaPrimitivesCurrencyCurrencyId,u128)>"}}},OrmlAuctionModuleEvent:{_enum:{Bid:{auctionId:"u32",bidder:"AccountId32",amount:"u128"}}},ModulePricesModuleEvent:{_enum:{LockPrice:{currencyId:"AcalaPrimitivesCurrencyCurrencyId",lockedPrice:"u128"},UnlockPrice:{currencyId:"AcalaPrimitivesCurrencyCurrencyId"}}},ModuleDexModuleEvent:{_enum:{AddProvision:{who:"AccountId32",currency0:"AcalaPrimitivesCurrencyCurrencyId",contribution0:"u128",currency1:"AcalaPrimitivesCurrencyCurrencyId",contribution1:"u128"},AddLiquidity:{who:"AccountId32",currency0:"AcalaPrimitivesCurrencyCurrencyId",pool0:"u128",currency1:"AcalaPrimitivesCurrencyCurrencyId",pool1:"u128",shareIncrement:"u128"},RemoveLiquidity:{who:"AccountId32",currency0:"AcalaPrimitivesCurrencyCurrencyId",pool0:"u128",currency1:"AcalaPrimitivesCurrencyCurrencyId",pool1:"u128",shareDecrement:"u128"},Swap:{trader:"AccountId32",path:"Vec",liquidityChanges:"Vec"},EnableTradingPair:{tradingPair:"AcalaPrimitivesTradingPair"},ListProvisioning:{tradingPair:"AcalaPrimitivesTradingPair"},DisableTradingPair:{tradingPair:"AcalaPrimitivesTradingPair"},ProvisioningToEnabled:{tradingPair:"AcalaPrimitivesTradingPair",pool0:"u128",pool1:"u128",shareAmount:"u128"},RefundProvision:{who:"AccountId32",currency0:"AcalaPrimitivesCurrencyCurrencyId",contribution0:"u128",currency1:"AcalaPrimitivesCurrencyCurrencyId",contribution1:"u128"},ProvisioningAborted:{tradingPair:"AcalaPrimitivesTradingPair",accumulatedProvision0:"u128",accumulatedProvision1:"u128"}}},AcalaPrimitivesTradingPair:"(AcalaPrimitivesCurrencyCurrencyId,AcalaPrimitivesCurrencyCurrencyId)",ModuleAuctionManagerModuleEvent:{_enum:{NewCollateralAuction:{auctionId:"u32",collateralType:"AcalaPrimitivesCurrencyCurrencyId",collateralAmount:"u128",targetBidPrice:"u128"},CancelAuction:{auctionId:"u32"},CollateralAuctionDealt:{auctionId:"u32",collateralType:"AcalaPrimitivesCurrencyCurrencyId",collateralAmount:"u128",winner:"AccountId32",paymentAmount:"u128"},DEXTakeCollateralAuction:{auctionId:"u32",collateralType:"AcalaPrimitivesCurrencyCurrencyId",collateralAmount:"u128",supplyCollateralAmount:"u128",targetStableAmount:"u128"},CollateralAuctionAborted:{auctionId:"u32",collateralType:"AcalaPrimitivesCurrencyCurrencyId",collateralAmount:"u128",targetStableAmount:"u128",refundRecipient:"AccountId32"}}},ModuleLoansModuleEvent:{_enum:{PositionUpdated:{owner:"AccountId32",collateralType:"AcalaPrimitivesCurrencyCurrencyId",collateralAdjustment:"i128",debitAdjustment:"i128"},ConfiscateCollateralAndDebit:{owner:"AccountId32",collateralType:"AcalaPrimitivesCurrencyCurrencyId",confiscatedCollateralAmount:"u128",deductDebitAmount:"u128"},TransferLoan:{from:"AccountId32",to:"AccountId32",currencyId:"AcalaPrimitivesCurrencyCurrencyId"}}},ModuleHonzonModuleEvent:{_enum:{Authorization:{authorizer:"AccountId32",authorizee:"AccountId32",collateralType:"AcalaPrimitivesCurrencyCurrencyId"},UnAuthorization:{authorizer:"AccountId32",authorizee:"AccountId32",collateralType:"AcalaPrimitivesCurrencyCurrencyId"},UnAuthorizationAll:{authorizer:"AccountId32"},TransferDebit:{fromCurrency:"AcalaPrimitivesCurrencyCurrencyId",toCurrency:"AcalaPrimitivesCurrencyCurrencyId",amount:"u128"}}},ModuleCdpTreasuryModuleEvent:{_enum:{ExpectedCollateralAuctionSizeUpdated:{collateralType:"AcalaPrimitivesCurrencyCurrencyId",newSize:"u128"}}},ModuleCdpEngineModuleEvent:{_enum:{LiquidateUnsafeCDP:{collateralType:"AcalaPrimitivesCurrencyCurrencyId",owner:"AccountId32",collateralAmount:"u128",badDebtValue:"u128",targetAmount:"u128"},SettleCDPInDebit:{collateralType:"AcalaPrimitivesCurrencyCurrencyId",owner:"AccountId32"},CloseCDPInDebitByDEX:{collateralType:"AcalaPrimitivesCurrencyCurrencyId",owner:"AccountId32",soldCollateralAmount:"u128",refundCollateralAmount:"u128",debitValue:"u128"},InterestRatePerSecUpdated:{collateralType:"AcalaPrimitivesCurrencyCurrencyId",newInterestRatePerSec:"Option"},LiquidationRatioUpdated:{collateralType:"AcalaPrimitivesCurrencyCurrencyId",newLiquidationRatio:"Option"},LiquidationPenaltyUpdated:{collateralType:"AcalaPrimitivesCurrencyCurrencyId",newLiquidationPenalty:"Option"},RequiredCollateralRatioUpdated:{collateralType:"AcalaPrimitivesCurrencyCurrencyId",newRequiredCollateralRatio:"Option"},MaximumTotalDebitValueUpdated:{collateralType:"AcalaPrimitivesCurrencyCurrencyId",newTotalDebitValue:"u128"},LiquidationContractRegistered:{address:"H160"},LiquidationContractDeregistered:{address:"H160"}}},ModuleEmergencyShutdownModuleEvent:{_enum:{Shutdown:{blockNumber:"u32"},OpenRefund:{blockNumber:"u32"},Refund:{who:"AccountId32",stableCoinAmount:"u128",refundList:"Vec<(AcalaPrimitivesCurrencyCurrencyId,u128)>"}}},ModuleHomaModuleEvent:{_enum:{Minted:{minter:"AccountId32",stakingCurrencyAmount:"u128",liquidAmountReceived:"u128",liquidAmountAddedToVoid:"u128"},RequestedRedeem:{redeemer:"AccountId32",liquidAmount:"u128",allowFastMatch:"bool"},RedeemRequestCancelled:{redeemer:"AccountId32",cancelledLiquidAmount:"u128"},RedeemedByFastMatch:{redeemer:"AccountId32",matchedLiquidAmount:"u128",feeInLiquid:"u128",redeemedStakingAmount:"u128"},RedeemedByUnbond:{redeemer:"AccountId32",eraIndexWhenUnbond:"u32",liquidAmount:"u128",unbondingStakingAmount:"u128"},WithdrawRedemption:{redeemer:"AccountId32",redemptionAmount:"u128"},CurrentEraBumped:{newEraIndex:"u32"},CurrentEraReset:{newEraIndex:"u32"},LedgerBondedReset:{subAccountIndex:"u16",newBondedAmount:"u128"},LedgerUnlockingReset:{subAccountIndex:"u16",newUnlocking:"Vec"},SoftBondedCapPerSubAccountUpdated:{capAmount:"u128"},EstimatedRewardRatePerEraUpdated:{rewardRate:"u128"},CommissionRateUpdated:{commissionRate:"u128"},FastMatchFeeRateUpdated:{fastMatchFeeRate:"u128"},LastEraBumpedBlockUpdated:{lastEraBumpedBlock:"u32"},BumpEraFrequencyUpdated:{frequency:"u32"}}},ModuleHomaModuleUnlockChunk:{value:"Compact",era:"Compact"},ModuleXcmInterfaceModuleEvent:{_enum:{XcmDestWeightUpdated:{xcmOperation:"ModuleXcmInterfaceModuleXcmInterfaceOperation",newXcmDestWeight:"u64"},XcmFeeUpdated:{xcmOperation:"ModuleXcmInterfaceModuleXcmInterfaceOperation",newXcmDestWeight:"u128"}}},ModuleXcmInterfaceModuleXcmInterfaceOperation:{_enum:{XtokensTransfer:"Null",HomaWithdrawUnbonded:"Null",HomaBondExtra:"Null",HomaUnbond:"Null",ParachainFee:"XcmV1MultiLocation"}},ModuleIncentivesModuleEvent:{_enum:{DepositDexShare:{who:"AccountId32",dexShareType:"AcalaPrimitivesCurrencyCurrencyId",deposit:"u128"},WithdrawDexShare:{who:"AccountId32",dexShareType:"AcalaPrimitivesCurrencyCurrencyId",withdraw:"u128"},ClaimRewards:{who:"AccountId32",pool:"ModuleSupportIncentivesPoolId",rewardCurrencyId:"AcalaPrimitivesCurrencyCurrencyId",actualAmount:"u128",deductionAmount:"u128"},IncentiveRewardAmountUpdated:{pool:"ModuleSupportIncentivesPoolId",rewardCurrencyId:"AcalaPrimitivesCurrencyCurrencyId",rewardAmountPerPeriod:"u128"},ClaimRewardDeductionRateUpdated:{pool:"ModuleSupportIncentivesPoolId",deductionRate:"u128"}}},ModuleSupportIncentivesPoolId:{_enum:{Loans:"AcalaPrimitivesCurrencyCurrencyId",Dex:"AcalaPrimitivesCurrencyCurrencyId"}},ModuleNftModuleEvent:{_enum:{CreatedClass:{owner:"AccountId32",classId:"u32"},MintedToken:{from:"AccountId32",to:"AccountId32",classId:"u32",quantity:"u32"},TransferredToken:{from:"AccountId32",to:"AccountId32",classId:"u32",tokenId:"u64"},BurnedToken:{owner:"AccountId32",classId:"u32",tokenId:"u64"},BurnedTokenWithRemark:{owner:"AccountId32",classId:"u32",tokenId:"u64",remarkHash:"H256"},DestroyedClass:{owner:"AccountId32",classId:"u32"}}},ModuleAssetRegistryModuleEvent:{_enum:{ForeignAssetRegistered:{assetId:"u16",assetAddress:"XcmV1MultiLocation",metadata:"AcalaPrimitivesCurrencyAssetMetadata"},ForeignAssetUpdated:{assetId:"u16",assetAddress:"XcmV1MultiLocation",metadata:"AcalaPrimitivesCurrencyAssetMetadata"},AssetRegistered:{assetId:"AcalaPrimitivesCurrencyAssetIds",metadata:"AcalaPrimitivesCurrencyAssetMetadata"},AssetUpdated:{assetId:"AcalaPrimitivesCurrencyAssetIds",metadata:"AcalaPrimitivesCurrencyAssetMetadata"}}},AcalaPrimitivesCurrencyAssetMetadata:{name:"Bytes",symbol:"Bytes",decimals:"u8",minimalBalance:"u128"},AcalaPrimitivesCurrencyAssetIds:{_enum:{Erc20:"H160",StableAssetId:"u32",ForeignAssetId:"u16",NativeAssetId:"AcalaPrimitivesCurrencyCurrencyId"}},ModuleEvmModuleEvent:{_enum:{Created:{from:"H160",contract:"H160",logs:"Vec",usedGas:"u64",usedStorage:"i32"},CreatedFailed:{from:"H160",contract:"H160",exitReason:"EvmCoreErrorExitReason",logs:"Vec",usedGas:"u64",usedStorage:"i32"},Executed:{from:"H160",contract:"H160",logs:"Vec",usedGas:"u64",usedStorage:"i32"},ExecutedFailed:{from:"H160",contract:"H160",exitReason:"EvmCoreErrorExitReason",output:"Bytes",logs:"Vec",usedGas:"u64",usedStorage:"i32"},TransferredMaintainer:{contract:"H160",newMaintainer:"H160"},ContractDevelopmentEnabled:{who:"AccountId32"},ContractDevelopmentDisabled:{who:"AccountId32"},ContractPublished:{contract:"H160"},ContractSetCode:{contract:"H160"},ContractSelfdestructed:{contract:"H160"}}},EthereumLog:{address:"H160",topics:"Vec",data:"Bytes"},EvmCoreErrorExitReason:{_enum:{Succeed:"EvmCoreErrorExitSucceed",Error:"EvmCoreErrorExitError",Revert:"EvmCoreErrorExitRevert",Fatal:"EvmCoreErrorExitFatal"}},EvmCoreErrorExitSucceed:{_enum:["Stopped","Returned","Suicided"]},EvmCoreErrorExitError:{_enum:{StackUnderflow:"Null",StackOverflow:"Null",InvalidJump:"Null",InvalidRange:"Null",DesignatedInvalid:"Null",CallTooDeep:"Null",CreateCollision:"Null",CreateContractLimit:"Null",OutOfOffset:"Null",OutOfGas:"Null",OutOfFund:"Null",PCUnderflow:"Null",CreateEmpty:"Null",Other:"Text",InvalidCode:"Null"}},EvmCoreErrorExitRevert:{_enum:["Reverted"]},EvmCoreErrorExitFatal:{_enum:{NotSupported:"Null",UnhandledInterrupt:"Null",CallErrorAsFatal:"EvmCoreErrorExitError",Other:"Text"}},ModuleEvmAccountsModuleEvent:{_enum:{ClaimAccount:{accountId:"AccountId32",evmAddress:"H160"}}},NutsfinanceStableAssetEvent:{_enum:{CreatePool:{poolId:"u32",a:"u128",swapId:"AccountId32",palletId:"AccountId32"},Minted:{minter:"AccountId32",poolId:"u32",a:"u128",inputAmounts:"Vec",minOutputAmount:"u128",balances:"Vec",totalSupply:"u128",feeAmount:"u128",outputAmount:"u128"},TokenSwapped:{swapper:"AccountId32",poolId:"u32",a:"u128",inputAsset:"AcalaPrimitivesCurrencyCurrencyId",outputAsset:"AcalaPrimitivesCurrencyCurrencyId",inputAmount:"u128",minOutputAmount:"u128",balances:"Vec",totalSupply:"u128",outputAmount:"u128"},RedeemedProportion:{redeemer:"AccountId32",poolId:"u32",a:"u128",inputAmount:"u128",minOutputAmounts:"Vec",balances:"Vec",totalSupply:"u128",feeAmount:"u128",outputAmounts:"Vec"},RedeemedSingle:{redeemer:"AccountId32",poolId:"u32",a:"u128",inputAmount:"u128",outputAsset:"AcalaPrimitivesCurrencyCurrencyId",minOutputAmount:"u128",balances:"Vec",totalSupply:"u128",feeAmount:"u128",outputAmount:"u128"},RedeemedMulti:{redeemer:"AccountId32",poolId:"u32",a:"u128",outputAmounts:"Vec",maxInputAmount:"u128",balances:"Vec",totalSupply:"u128",feeAmount:"u128",inputAmount:"u128"},BalanceUpdated:{poolId:"u32",oldBalances:"Vec",newBalances:"Vec"},YieldCollected:{poolId:"u32",a:"u128",oldTotalSupply:"u128",newTotalSupply:"u128",who:"AccountId32",amount:"u128"},FeeCollected:{poolId:"u32",a:"u128",oldBalances:"Vec",newBalances:"Vec",oldTotalSupply:"u128",newTotalSupply:"u128",who:"AccountId32",amount:"u128"},AModified:{poolId:"u32",value:"u128",time:"u32"},FeeModified:{poolId:"u32",mintFee:"u128",swapFee:"u128",redeemFee:"u128"},RecipientModified:{poolId:"u32",feeRecipient:"AccountId32",yieldRecipient:"AccountId32"}}},CumulusPalletParachainSystemEvent:{_enum:{ValidationFunctionStored:"Null",ValidationFunctionApplied:{relayChainBlockNum:"u32"},ValidationFunctionDiscarded:"Null",UpgradeAuthorized:{codeHash:"H256"},DownwardMessagesReceived:{count:"u32"},DownwardMessagesProcessed:{weightUsed:"u64",dmqHead:"H256"}}},PalletSudoEvent:{_enum:{Sudid:{sudoResult:"Result"},KeyChanged:{oldSudoer:"Option"},SudoAsDone:{sudoResult:"Result"}}},FrameSystemPhase:{_enum:{ApplyExtrinsic:"u32",Finalization:"Null",Initialization:"Null"}},FrameSystemLastRuntimeUpgradeInfo:{specVersion:"Compact",specName:"Text"},FrameSystemCall:{_enum:{fill_block:{ratio:"Perbill"},remark:{remark:"Bytes"},set_heap_pages:{pages:"u64"},set_code:{code:"Bytes"},set_code_without_checks:{code:"Bytes"},set_storage:{items:"Vec<(Bytes,Bytes)>"},kill_storage:{_alias:{keys_:"keys"},keys_:"Vec"},kill_prefix:{prefix:"Bytes",subkeys:"u32"},remark_with_event:{remark:"Bytes"}}},FrameSystemLimitsBlockWeights:{baseBlock:"u64",maxBlock:"u64",perClass:"FrameSupportWeightsPerDispatchClassWeightsPerClass"},FrameSupportWeightsPerDispatchClassWeightsPerClass:{normal:"FrameSystemLimitsWeightsPerClass",operational:"FrameSystemLimitsWeightsPerClass",mandatory:"FrameSystemLimitsWeightsPerClass"},FrameSystemLimitsWeightsPerClass:{baseExtrinsic:"u64",maxExtrinsic:"Option",maxTotal:"Option",reserved:"Option"},FrameSystemLimitsBlockLength:{max:"FrameSupportWeightsPerDispatchClassU32"},FrameSupportWeightsPerDispatchClassU32:{normal:"u32",operational:"u32",mandatory:"u32"},FrameSupportWeightsRuntimeDbWeight:{read:"u64",write:"u64"},SpVersionRuntimeVersion:{specName:"Text",implName:"Text",authoringVersion:"u32",specVersion:"u32",implVersion:"u32",apis:"Vec<([u8;8],u32)>",transactionVersion:"u32",stateVersion:"u8"},FrameSystemError:{_enum:["InvalidSpecName","SpecVersionNeedsToIncrease","FailedToExtractRuntimeVersion","NonDefaultComposite","NonZeroRefCount","CallFiltered"]},PalletTimestampCall:{_enum:{set:{now:"Compact"}}},PalletSchedulerScheduledV3:{maybeId:"Option",priority:"u8",call:"FrameSupportScheduleMaybeHashed",maybePeriodic:"Option<(u32,u32)>",origin:"AcalaRuntimeOriginCaller"},FrameSupportScheduleMaybeHashed:{_enum:{Value:"Call",Hash:"H256"}},PalletSchedulerCall:{_enum:{schedule:{when:"u32",maybePeriodic:"Option<(u32,u32)>",priority:"u8",call:"FrameSupportScheduleMaybeHashed"},cancel:{when:"u32",index:"u32"},schedule_named:{id:"Bytes",when:"u32",maybePeriodic:"Option<(u32,u32)>",priority:"u8",call:"FrameSupportScheduleMaybeHashed"},cancel_named:{id:"Bytes"},schedule_after:{after:"u32",maybePeriodic:"Option<(u32,u32)>",priority:"u8",call:"FrameSupportScheduleMaybeHashed"},schedule_named_after:{id:"Bytes",after:"u32",maybePeriodic:"Option<(u32,u32)>",priority:"u8",call:"FrameSupportScheduleMaybeHashed"}}},PalletUtilityCall:{_enum:{batch:{calls:"Vec"},as_derivative:{index:"u16",call:"Call"},batch_all:{calls:"Vec"},dispatch_as:{asOrigin:"AcalaRuntimeOriginCaller",call:"Call"},force_batch:{calls:"Vec"}}},PalletMultisigCall:{_enum:{as_multi_threshold_1:{otherSignatories:"Vec",call:"Call"},as_multi:{threshold:"u16",otherSignatories:"Vec",maybeTimepoint:"Option",call:"WrapperKeepOpaque",storeCall:"bool",maxWeight:"u64"},approve_as_multi:{threshold:"u16",otherSignatories:"Vec",maybeTimepoint:"Option",callHash:"[u8;32]",maxWeight:"u64"},cancel_as_multi:{threshold:"u16",otherSignatories:"Vec",timepoint:"PalletMultisigTimepoint",callHash:"[u8;32]"}}},PalletProxyCall:{_enum:{proxy:{real:"AccountId32",forceProxyType:"Option",call:"Call"},add_proxy:{delegate:"AccountId32",proxyType:"RuntimeCommonProxyType",delay:"u32"},remove_proxy:{delegate:"AccountId32",proxyType:"RuntimeCommonProxyType",delay:"u32"},remove_proxies:"Null",anonymous:{proxyType:"RuntimeCommonProxyType",delay:"u32",index:"u16"},kill_anonymous:{spawner:"AccountId32",proxyType:"RuntimeCommonProxyType",index:"u16",height:"Compact",extIndex:"Compact"},announce:{real:"AccountId32",callHash:"H256"},remove_announcement:{real:"AccountId32",callHash:"H256"},reject_announcement:{delegate:"AccountId32",callHash:"H256"},proxy_announced:{delegate:"AccountId32",real:"AccountId32",forceProxyType:"Option",call:"Call"}}},ModuleTransactionPauseModuleCall:{_enum:{pause_transaction:{palletName:"Bytes",functionName:"Bytes"},unpause_transaction:{palletName:"Bytes",functionName:"Bytes"},pause_evm_precompile:{address:"H160"},unpause_evm_precompile:{address:"H160"}}},ModuleIdleSchedulerModuleCall:{_enum:{schedule_task:{task:"AcalaRuntimeScheduledTasks"}}},PalletPreimageCall:{_enum:{note_preimage:{bytes:"Bytes"},unnote_preimage:{_alias:{hash_:"hash"},hash_:"H256"},request_preimage:{_alias:{hash_:"hash"},hash_:"H256"},unrequest_preimage:{_alias:{hash_:"hash"},hash_:"H256"}}},PalletBalancesCall:{_enum:{transfer:{dest:"MultiAddress",value:"Compact"},set_balance:{who:"MultiAddress",newFree:"Compact",newReserved:"Compact"},force_transfer:{source:"MultiAddress",dest:"MultiAddress",value:"Compact"},transfer_keep_alive:{dest:"MultiAddress",value:"Compact"},transfer_all:{dest:"MultiAddress",keepAlive:"bool"},force_unreserve:{who:"MultiAddress",amount:"u128"}}},ModuleCurrenciesModuleCall:{_enum:{transfer:{dest:"MultiAddress",currencyId:"AcalaPrimitivesCurrencyCurrencyId",amount:"Compact"},transfer_native_currency:{dest:"MultiAddress",amount:"Compact