/*! For license information please see 6.1e7a49c6.chunk.js.LICENSE.txt */ (this["webpackJsonpcougar-arbitrum-frontend-farms"]=this["webpackJsonpcougar-arbitrum-frontend-farms"]||[]).push([[6],[function(e,t,n){"use strict";e.exports=n(611)},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(222);function i(){i=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(x){c=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var i=t&&t.prototype instanceof h?t:h,o=Object.create(i.prototype),a=new I(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return S()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===d)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=f(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(e,n,a),o}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(x){return{type:"throw",arg:x}}}e.wrap=l;var d={};function h(){}function p(){}function g(){}var v={};c(v,a,(function(){return this}));var m=Object.getPrototypeOf,A=m&&m(m(C([])));A&&A!==t&&n.call(A,a)&&(v=A);var y=g.prototype=h.prototype=Object.create(v);function b(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function i(o,a,s,u){var c=f(e[o],e,a);if("throw"!==c.type){var l=c.arg,d=l.value;return d&&"object"==Object(r.a)(d)&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){i("next",e,s,u)}),(function(e){i("throw",e,s,u)})):t.resolve(d).then((function(e){l.value=e,s(l)}),(function(e){return i("throw",e,s,u)}))}u(c.arg)}var o;this._invoke=function(e,n){function r(){return new t((function(t,r){i(e,n,t,r)}))}return o=o?o.then(r,r):r()}}function _(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,_(e,t),"throw"===t.method))return d;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var r=f(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,d;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function C(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),k(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;k(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:C(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},e}},function(e,t,n){"use strict";n.d(t,"k",(function(){return a})),n.d(t,"j",(function(){return u})),n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return l})),n.d(t,"o",(function(){return f})),n.d(t,"p",(function(){return d})),n.d(t,"l",(function(){return h})),n.d(t,"i",(function(){return g})),n.d(t,"d",(function(){return v})),n.d(t,"e",(function(){return m})),n.d(t,"c",(function(){return A})),n.d(t,"g",(function(){return y})),n.d(t,"f",(function(){return b})),n.d(t,"h",(function(){return w})),n.d(t,"n",(function(){return _})),n.d(t,"m",(function(){return E}));var r=new(n(3).b)("bytes/5.7.0");function i(e){return!!e.toHexString}function o(e){return e.slice||(e.slice=function(){var t=Array.prototype.slice.call(arguments);return o(new Uint8Array(Array.prototype.slice.apply(e,t)))}),e}function a(e){return h(e)&&!(e.length%2)||u(e)}function s(e){return"number"===typeof e&&e==e&&e%1===0}function u(e){if(null==e)return!1;if(e.constructor===Uint8Array)return!0;if("string"===typeof e)return!1;if(!s(e.length)||e.length<0)return!1;for(var t=0;t=256)return!1}return!0}function c(e,t){if(t||(t={}),"number"===typeof e){r.checkSafeUint53(e,"invalid arrayify value");for(var n=[];e;)n.unshift(255&e),e=parseInt(String(e/256));return 0===n.length&&n.push(0),o(new Uint8Array(n))}if(t.allowMissingPrefix&&"string"===typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),i(e)&&(e=e.toHexString()),h(e)){var a=e.substring(2);a.length%2&&("left"===t.hexPad?a="0"+a:"right"===t.hexPad?a+="0":r.throwArgumentError("hex data is odd-length","value",e));for(var s=[],c=0;ct&&r.throwArgumentError("value out of range","value",arguments[0]);var n=new Uint8Array(t);return n.set(e,t-e.length),o(n)}function h(e,t){return!("string"!==typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&(!t||e.length===2+2*t)}var p="0123456789abcdef";function g(e,t){if(t||(t={}),"number"===typeof e){r.checkSafeUint53(e,"invalid hexlify value");for(var n="";e;)n=p[15&e]+n,e=Math.floor(e/16);return n.length?(n.length%2&&(n="0"+n),"0x"+n):"0x00"}if("bigint"===typeof e)return(e=e.toString(16)).length%2?"0x0"+e:"0x"+e;if(t.allowMissingPrefix&&"string"===typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),i(e))return e.toHexString();if(h(e))return e.length%2&&("left"===t.hexPad?e="0x0"+e.substring(2):"right"===t.hexPad?e+="0":r.throwArgumentError("hex data is odd-length","value",e)),e.toLowerCase();if(u(e)){for(var o="0x",a=0;a>4]+p[15&s]}return o}return r.throwArgumentError("invalid hexlify value","value",e)}function v(e){if("string"!==typeof e)e=g(e);else if(!h(e)||e.length%2)return null;return(e.length-2)/2}function m(e,t,n){return"string"!==typeof e?e=g(e):(!h(e)||e.length%2)&&r.throwArgumentError("invalid hexData","value",e),t=2+2*t,null!=n?"0x"+e.substring(t,2+2*n):"0x"+e.substring(t)}function A(e){var t="0x";return e.forEach((function(e){t+=g(e).substring(2)})),t}function y(e){var t=b(g(e,{hexPad:"left"}));return"0x"===t?"0x0":t}function b(e){"string"!==typeof e&&(e=g(e)),h(e)||r.throwArgumentError("invalid hex string","value",e),e=e.substring(2);for(var t=0;t2*t+2&&r.throwArgumentError("value out of range","value",arguments[1]);e.length<2*t+2;)e="0x0"+e.substring(2);return e}function _(e){var t={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(a(e)){var n=c(e);64===n.length?(t.v=27+(n[32]>>7),n[32]&=127,t.r=g(n.slice(0,32)),t.s=g(n.slice(32,64))):65===n.length?(t.r=g(n.slice(0,32)),t.s=g(n.slice(32,64)),t.v=n[64]):r.throwArgumentError("invalid signature string","signature",e),t.v<27&&(0===t.v||1===t.v?t.v+=27:r.throwArgumentError("signature invalid v byte","signature",e)),t.recoveryParam=1-t.v%2,t.recoveryParam&&(n[32]|=128),t._vs=g(n.slice(32,64))}else{if(t.r=e.r,t.s=e.s,t.v=e.v,t.recoveryParam=e.recoveryParam,t._vs=e._vs,null!=t._vs){var i=d(c(t._vs),32);t._vs=g(i);var o=i[0]>=128?1:0;null==t.recoveryParam?t.recoveryParam=o:t.recoveryParam!==o&&r.throwArgumentError("signature recoveryParam mismatch _vs","signature",e),i[0]&=127;var s=g(i);null==t.s?t.s=s:t.s!==s&&r.throwArgumentError("signature v mismatch _vs","signature",e)}if(null==t.recoveryParam)null==t.v?r.throwArgumentError("signature missing v and recoveryParam","signature",e):0===t.v||1===t.v?t.recoveryParam=t.v:t.recoveryParam=1-t.v%2;else if(null==t.v)t.v=27+t.recoveryParam;else{var u=0===t.v||1===t.v?t.v:1-t.v%2;t.recoveryParam!==u&&r.throwArgumentError("signature recoveryParam mismatch v","signature",e)}null!=t.r&&h(t.r)?t.r=w(t.r,32):r.throwArgumentError("signature missing or invalid r","signature",e),null!=t.s&&h(t.s)?t.s=w(t.s,32):r.throwArgumentError("signature missing or invalid s","signature",e);var l=c(t.s);l[0]>=128&&r.throwArgumentError("signature s out of range","signature",e),t.recoveryParam&&(l[0]|=128);var f=g(l);t._vs&&(h(t._vs)||r.throwArgumentError("signature invalid _vs","signature",e),t._vs=w(t._vs,32)),null==t._vs?t._vs=f:t._vs!==f&&r.throwArgumentError("signature _vs mismatch v and s","signature",e)}return t.yParityAndS=t._vs,t.compact=t.r+t.yParityAndS.substring(2),t}function E(e){return g(l([(e=_(e)).r,e.s,e.recoveryParam?"0x1c":"0x1b"]))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return p}));var r=n(6),i=n(7),o=!1,a=!1,s={debug:1,default:2,info:2,warning:3,error:4,off:5},u=s.default,c=null;var l,f,d=function(){try{var e=[];if(["NFD","NFC","NFKD","NFKC"].forEach((function(t){try{if("test"!=="test".normalize(t))throw new Error("bad normalize")}catch(n){e.push(t)}})),e.length)throw new Error("missing "+e.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(t){return t.message}return null}();!function(e){e.DEBUG="DEBUG",e.INFO="INFO",e.WARNING="WARNING",e.ERROR="ERROR",e.OFF="OFF"}(l||(l={})),function(e){e.UNKNOWN_ERROR="UNKNOWN_ERROR",e.NOT_IMPLEMENTED="NOT_IMPLEMENTED",e.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",e.NETWORK_ERROR="NETWORK_ERROR",e.SERVER_ERROR="SERVER_ERROR",e.TIMEOUT="TIMEOUT",e.BUFFER_OVERRUN="BUFFER_OVERRUN",e.NUMERIC_FAULT="NUMERIC_FAULT",e.MISSING_NEW="MISSING_NEW",e.INVALID_ARGUMENT="INVALID_ARGUMENT",e.MISSING_ARGUMENT="MISSING_ARGUMENT",e.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",e.CALL_EXCEPTION="CALL_EXCEPTION",e.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",e.NONCE_EXPIRED="NONCE_EXPIRED",e.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",e.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",e.TRANSACTION_REPLACED="TRANSACTION_REPLACED",e.ACTION_REJECTED="ACTION_REJECTED"}(f||(f={}));var h="0123456789abcdef",p=function(){function e(t){Object(r.a)(this,e),Object.defineProperty(this,"version",{enumerable:!0,value:t,writable:!1})}return Object(i.a)(e,[{key:"_log",value:function(e,t){var n=e.toLowerCase();null==s[n]&&this.throwArgumentError("invalid log level name","logLevel",e),u>s[n]||console.log.apply(console,t)}},{key:"debug",value:function(){for(var t=arguments.length,n=new Array(t),r=0;r>4],n+=h[15&t[o]];i.push(e+"=Uint8Array(0x"+n+")")}else i.push(e+"="+JSON.stringify(t))}catch(c){i.push(e+"="+JSON.stringify(r[e].toString()))}})),i.push("code=".concat(n)),i.push("version=".concat(this.version));var o=t,s="";switch(n){case f.NUMERIC_FAULT:s="NUMERIC_FAULT";var u=t;switch(u){case"overflow":case"underflow":case"division-by-zero":s+="-"+u;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result"}break;case f.CALL_EXCEPTION:case f.INSUFFICIENT_FUNDS:case f.MISSING_NEW:case f.NONCE_EXPIRED:case f.REPLACEMENT_UNDERPRICED:case f.TRANSACTION_REPLACED:case f.UNPREDICTABLE_GAS_LIMIT:s=n}s&&(t+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),i.length&&(t+=" ("+i.join(", ")+")");var c=new Error(t);return c.reason=o,c.code=n,Object.keys(r).forEach((function(e){c[e]=r[e]})),c}},{key:"throwError",value:function(e,t,n){throw this.makeError(e,t,n)}},{key:"throwArgumentError",value:function(t,n,r){return this.throwError(t,e.errors.INVALID_ARGUMENT,{argument:n,value:r})}},{key:"assert",value:function(e,t,n,r){e||this.throwError(t,n,r)}},{key:"assertArgument",value:function(e,t,n,r){e||this.throwArgumentError(t,n,r)}},{key:"checkNormalize",value:function(t){null==t&&(t="platform missing String.prototype.normalize"),d&&this.throwError("platform missing String.prototype.normalize",e.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:d})}},{key:"checkSafeUint53",value:function(t,n){"number"===typeof t&&(null==n&&(n="value not safe"),(t<0||t>=9007199254740991)&&this.throwError(n,e.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:t}),t%1&&this.throwError(n,e.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:t}))}},{key:"checkArgumentCount",value:function(t,n,r){r=r?": "+r:"",tn&&this.throwError("too many arguments"+r,e.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:n})}},{key:"checkNew",value:function(t,n){t!==Object&&null!=t||this.throwError("missing new",e.errors.MISSING_NEW,{name:n.name})}},{key:"checkAbstract",value:function(t,n){t===n?this.throwError("cannot instantiate abstract class "+JSON.stringify(n.name)+" directly; use a sub-class",e.errors.UNSUPPORTED_OPERATION,{name:t.name,operation:"new"}):t!==Object&&null!=t||this.throwError("missing new",e.errors.MISSING_NEW,{name:n.name})}}],[{key:"globalLogger",value:function(){return c||(c=new e("logger/5.7.0")),c}},{key:"setCensorship",value:function(t,n){if(!t&&n&&this.globalLogger().throwError("cannot permanently disable censorship",e.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),o){if(!t)return;this.globalLogger().throwError("error censorship permanent",e.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}a=!!t,o=!!n}},{key:"setLogLevel",value:function(t){var n=s[t.toLowerCase()];null!=n?u=n:e.globalLogger().warn("invalid log level - "+t)}},{key:"from",value:function(t){return new e(t)}}]),e}();p.errors=f,p.levels=l},function(e,t,n){"use strict";function r(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(c){return void n(c)}s.done?t(u):Promise.resolve(u).then(r,i)}function i(e){return function(){var t=this,n=arguments;return new Promise((function(i,o){var a=e.apply(t,n);function s(e){r(a,i,o,s,u,"next",e)}function u(e){r(a,i,o,s,u,"throw",e)}s(void 0)}))}}n.d(t,"a",(function(){return i}))},function(e,t,n){var r;!function(i){"use strict";var o,a=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,s=Math.ceil,u=Math.floor,c="[BigNumber Error] ",l=c+"Number primitive has more than 15 significant digits: ",f=1e14,d=14,h=9007199254740991,p=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],g=1e7,v=1e9;function m(e){var t=0|e;return e>0||e===t?t:t-1}function A(e){for(var t,n,r=1,i=e.length,o=e[0]+"";rc^n?1:-1;for(s=(u=i.length)<(c=o.length)?u:c,a=0;ao[a]^n?1:-1;return u==c?0:u>c^n?1:-1}function b(e,t,n,r){if(en||e!==u(e))throw Error(c+(r||"Argument")+("number"==typeof e?en?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function w(e){var t=e.c.length-1;return m(e.e/d)==t&&e.c[t]%2!=0}function _(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function E(e,t,n){var r,i;if(t<0){for(i=n+".";++t;i+=n);e=i+e}else if(++t>(r=e.length)){for(i=n,t-=r;--t;i+=n);e+=i}else tO?m.c=m.e=null:e.e=10;f/=10,c++);return void(c>O?m.c=m.e=null:(m.e=c,m.c=[e]))}v=String(e)}else{if(!a.test(v=String(e)))return i(m,v,p);m.s=45==v.charCodeAt(0)?(v=v.slice(1),-1):1}(c=v.indexOf("."))>-1&&(v=v.replace(".","")),(f=v.search(/e/i))>0?(c<0&&(c=f),c+=+v.slice(f+1),v=v.substring(0,f)):c<0&&(c=v.length)}else{if(b(t,2,T.length,"Base"),10==t&&Q)return F(m=new D(e),I+m.e+1,C);if(v=String(e),p="number"==typeof e){if(0*e!=0)return i(m,v,p,t);if(m.s=1/e<0?(v=v.slice(1),-1):1,D.DEBUG&&v.replace(/^0\.0*|\./,"").length>15)throw Error(l+e)}else m.s=45===v.charCodeAt(0)?(v=v.slice(1),-1):1;for(n=T.slice(0,t),c=f=0,g=v.length;fc){c=g;continue}}else if(!s&&(v==v.toUpperCase()&&(v=v.toLowerCase())||v==v.toLowerCase()&&(v=v.toUpperCase()))){s=!0,f=-1,c=0;continue}return i(m,String(e),p,t)}p=!1,(c=(v=r(v,t,10,m.s)).indexOf("."))>-1?v=v.replace(".",""):c=v.length}for(f=0;48===v.charCodeAt(f);f++);for(g=v.length;48===v.charCodeAt(--g););if(v=v.slice(f,++g)){if(g-=f,p&&D.DEBUG&&g>15&&(e>h||e!==u(e)))throw Error(l+m.s*e);if((c=c-f-1)>O)m.c=m.e=null;else if(c=x)?_(u,a):E(u,a,"0");else if(o=(e=F(new D(e),t,n)).e,s=(u=A(e.c)).length,1==r||2==r&&(t<=o||o<=S)){for(;ss){if(--t>0)for(u+=".";t--;u+="0");}else if((t+=o-s)>0)for(o+1==s&&(u+=".");t--;u+="0");return e.s<0&&i?"-"+u:u}function U(e,t){for(var n,r=1,i=new D(e[0]);r=10;i/=10,r++);return(n=r+n*d-1)>O?e.c=e.e=null:n=10;c/=10,i++);if((o=t-i)<0)o+=d,a=t,g=(l=v[h=0])/m[i-a-1]%10|0;else if((h=s((o+1)/d))>=v.length){if(!r)break e;for(;v.length<=h;v.push(0));l=g=0,i=1,a=(o%=d)-d+1}else{for(l=c=v[h],i=1;c>=10;c/=10,i++);g=(a=(o%=d)-d+i)<0?0:l/m[i-a-1]%10|0}if(r=r||t<0||null!=v[h+1]||(a<0?l:l%m[i-a-1]),r=n<4?(g||r)&&(0==n||n==(e.s<0?3:2)):g>5||5==g&&(4==n||r||6==n&&(o>0?a>0?l/m[i-a]:0:v[h-1])%10&1||n==(e.s<0?8:7)),t<1||!v[0])return v.length=0,r?(t-=e.e+1,v[0]=m[(d-t%d)%d],e.e=-t||0):v[0]=e.e=0,e;if(0==o?(v.length=h,c=1,h--):(v.length=h+1,c=m[d-o],v[h]=a>0?u(l/m[i-a]%m[a])*c:0),r)for(;;){if(0==h){for(o=1,a=v[0];a>=10;a/=10,o++);for(a=v[0]+=c,c=1;a>=10;a/=10,c++);o!=c&&(e.e++,v[0]==f&&(v[0]=1));break}if(v[h]+=c,v[h]!=f)break;v[h--]=0,c=1}for(o=v.length;0===v[--o];v.pop());}e.e>O?e.c=e.e=null:e.e=x?_(t,n):E(t,n,"0"),e.s<0?"-"+t:t)}return D.clone=e,D.ROUND_UP=0,D.ROUND_DOWN=1,D.ROUND_CEIL=2,D.ROUND_FLOOR=3,D.ROUND_HALF_UP=4,D.ROUND_HALF_DOWN=5,D.ROUND_HALF_EVEN=6,D.ROUND_HALF_CEIL=7,D.ROUND_HALF_FLOOR=8,D.EUCLID=9,D.config=D.set=function(e){var t,n;if(null!=e){if("object"!=typeof e)throw Error(c+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(b(n=e[t],0,v,t),I=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(b(n=e[t],0,8,t),C=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(b(n[0],-v,0,t),b(n[1],0,v,t),S=n[0],x=n[1]):(b(n,-v,v,t),S=-(x=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)b(n[0],-v,-1,t),b(n[1],1,v,t),B=n[0],O=n[1];else{if(b(n,-v,v,t),!n)throw Error(c+t+" cannot be zero: "+n);B=-(O=n<0?-n:n)}if(e.hasOwnProperty(t="CRYPTO")){if((n=e[t])!==!!n)throw Error(c+t+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw M=!n,Error(c+"crypto unavailable");M=n}else M=n}if(e.hasOwnProperty(t="MODULO_MODE")&&(b(n=e[t],0,9,t),P=n),e.hasOwnProperty(t="POW_PRECISION")&&(b(n=e[t],0,v,t),R=n),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(n=e[t]))throw Error(c+t+" not an object: "+n);N=n}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(n))throw Error(c+t+" invalid: "+n);Q="0123456789"==n.slice(0,10),T=n}}return{DECIMAL_PLACES:I,ROUNDING_MODE:C,EXPONENTIAL_AT:[S,x],RANGE:[B,O],CRYPTO:M,MODULO_MODE:P,POW_PRECISION:R,FORMAT:N,ALPHABET:T}},D.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!D.DEBUG)return!0;var t,n,r=e.c,i=e.e,o=e.s;e:if("[object Array]"=={}.toString.call(r)){if((1===o||-1===o)&&i>=-v&&i<=v&&i===u(i)){if(0===r[0]){if(0===i&&1===r.length)return!0;break e}if((t=(i+1)%d)<1&&(t+=d),String(r[0]).length==t){for(t=0;t=f||n!==u(n))break e;if(0!==n)return!0}}}else if(null===r&&null===i&&(null===o||1===o||-1===o))return!0;throw Error(c+"Invalid BigNumber: "+e)},D.maximum=D.max=function(){return U(arguments,o.lt)},D.minimum=D.min=function(){return U(arguments,o.gt)},D.random=function(){var e=9007199254740992,t=Math.random()*e&2097151?function(){return u(Math.random()*e)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};return function(e){var n,r,i,o,a,l=0,f=[],h=new D(k);if(null==e?e=I:b(e,0,v),o=s(e/d),M)if(crypto.getRandomValues){for(n=crypto.getRandomValues(new Uint32Array(o*=2));l>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),n[l]=r[0],n[l+1]=r[1]):(f.push(a%1e14),l+=2);l=o/2}else{if(!crypto.randomBytes)throw M=!1,Error(c+"crypto unavailable");for(n=crypto.randomBytes(o*=7);l=9e15?crypto.randomBytes(7).copy(n,l):(f.push(a%1e14),l+=7);l=o/7}if(!M)for(;l=10;a/=10,l++);ln-1&&(null==a[i+1]&&(a[i+1]=0),a[i+1]+=a[i]/n|0,a[i]%=n)}return a.reverse()}return function(r,i,o,a,s){var u,c,l,f,d,h,p,g,v=r.indexOf("."),m=I,y=C;for(v>=0&&(f=R,R=0,r=r.replace(".",""),h=(g=new D(i)).pow(r.length-v),R=f,g.c=t(E(A(h.c),h.e,"0"),10,o,e),g.e=g.c.length),l=f=(p=t(r,i,o,s?(u=T,e):(u=e,T))).length;0==p[--f];p.pop());if(!p[0])return u.charAt(0);if(v<0?--l:(h.c=p,h.e=l,h.s=a,p=(h=n(h,g,m,y,o)).c,d=h.r,l=h.e),v=p[c=l+m+1],f=o/2,d=d||c<0||null!=p[c+1],d=y<4?(null!=v||d)&&(0==y||y==(h.s<0?3:2)):v>f||v==f&&(4==y||d||6==y&&1&p[c-1]||y==(h.s<0?8:7)),c<1||!p[0])r=d?E(u.charAt(1),-m,u.charAt(0)):u.charAt(0);else{if(p.length=c,d)for(--o;++p[--c]>o;)p[c]=0,c||(++l,p=[1].concat(p));for(f=p.length;!p[--f];);for(v=0,r="";v<=f;r+=u.charAt(p[v++]));r=E(r,l,u.charAt(0))}return r}}(),n=function(){function e(e,t,n){var r,i,o,a,s=0,u=e.length,c=t%g,l=t/g|0;for(e=e.slice();u--;)s=((i=c*(o=e[u]%g)+(r=l*o+(a=e[u]/g|0)*c)%g*g+s)/n|0)+(r/g|0)+l*a,e[u]=i%n;return s&&(e=[s].concat(e)),e}function t(e,t,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;it[i]?1:-1;break}return o}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]1;e.splice(0,1));}return function(r,i,o,a,s){var c,l,h,p,g,v,A,y,b,w,_,E,k,I,C,S,x,B=r.s==i.s?1:-1,O=r.c,M=i.c;if(!O||!O[0]||!M||!M[0])return new D(r.s&&i.s&&(O?!M||O[0]!=M[0]:M)?O&&0==O[0]||!M?0*B:B/0:NaN);for(b=(y=new D(B)).c=[],B=o+(l=r.e-i.e)+1,s||(s=f,l=m(r.e/d)-m(i.e/d),B=B/d|0),h=0;M[h]==(O[h]||0);h++);if(M[h]>(O[h]||0)&&l--,B<0)b.push(1),p=!0;else{for(I=O.length,S=M.length,h=0,B+=2,(g=u(s/(M[0]+1)))>1&&(M=e(M,g,s),O=e(O,g,s),S=M.length,I=O.length),k=S,_=(w=O.slice(0,S)).length;_=s/2&&C++;do{if(g=0,(c=t(M,w,S,_))<0){if(E=w[0],S!=_&&(E=E*s+(w[1]||0)),(g=u(E/C))>1)for(g>=s&&(g=s-1),A=(v=e(M,g,s)).length,_=w.length;1==t(v,w,A,_);)g--,n(v,S=10;B/=10,h++);F(y,o+(y.e=h+l*d-1)+1,a,p)}else y.e=l,y.r=+p;return y}}(),i=function(){var e=/^(-?)0([xbo])(?=\w[\w.]*$)/i,t=/^([^.]+)\.$/,n=/^\.([^.]+)$/,r=/^-?(Infinity|NaN)$/,i=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(o,a,s,u){var l,f=s?a:a.replace(i,"");if(r.test(f))o.s=isNaN(f)?null:f<0?-1:1;else{if(!s&&(f=f.replace(e,(function(e,t,n){return l="x"==(n=n.toLowerCase())?16:"b"==n?2:8,u&&u!=l?e:t})),u&&(l=u,f=f.replace(t,"$1").replace(n,"0.$1")),a!=f))return new D(f,l);if(D.DEBUG)throw Error(c+"Not a"+(u?" base "+u:"")+" number: "+a);o.s=null}o.c=o.e=null}}(),o.absoluteValue=o.abs=function(){var e=new D(this);return e.s<0&&(e.s=1),e},o.comparedTo=function(e,t){return y(this,new D(e,t))},o.decimalPlaces=o.dp=function(e,t){var n,r,i,o=this;if(null!=e)return b(e,0,v),null==t?t=C:b(t,0,8),F(new D(o),e+o.e+1,t);if(!(n=o.c))return null;if(r=((i=n.length-1)-m(this.e/d))*d,i=n[i])for(;i%10==0;i/=10,r--);return r<0&&(r=0),r},o.dividedBy=o.div=function(e,t){return n(this,new D(e,t),I,C)},o.dividedToIntegerBy=o.idiv=function(e,t){return n(this,new D(e,t),0,1)},o.exponentiatedBy=o.pow=function(e,t){var n,r,i,o,a,l,f,h,p=this;if((e=new D(e)).c&&!e.isInteger())throw Error(c+"Exponent not an integer: "+H(e));if(null!=t&&(t=new D(t)),a=e.e>14,!p.c||!p.c[0]||1==p.c[0]&&!p.e&&1==p.c.length||!e.c||!e.c[0])return h=new D(Math.pow(+H(p),a?2-w(e):+H(e))),t?h.mod(t):h;if(l=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new D(NaN);(r=!l&&p.isInteger()&&t.isInteger())&&(p=p.mod(t))}else{if(e.e>9&&(p.e>0||p.e<-1||(0==p.e?p.c[0]>1||a&&p.c[1]>=24e7:p.c[0]<8e13||a&&p.c[0]<=9999975e7)))return o=p.s<0&&w(e)?-0:0,p.e>-1&&(o=1/o),new D(l?1/o:o);R&&(o=s(R/d+2))}for(a?(n=new D(.5),l&&(e.s=1),f=w(e)):f=(i=Math.abs(+H(e)))%2,h=new D(k);;){if(f){if(!(h=h.times(p)).c)break;o?h.c.length>o&&(h.c.length=o):r&&(h=h.mod(t))}if(i){if(0===(i=u(i/2)))break;f=i%2}else if(F(e=e.times(n),e.e+1,1),e.e>14)f=w(e);else{if(0===(i=+H(e)))break;f=i%2}p=p.times(p),o?p.c&&p.c.length>o&&(p.c.length=o):r&&(p=p.mod(t))}return r?h:(l&&(h=k.div(h)),t?h.mod(t):o?F(h,R,C,undefined):h)},o.integerValue=function(e){var t=new D(this);return null==e?e=C:b(e,0,8),F(t,t.e+1,e)},o.isEqualTo=o.eq=function(e,t){return 0===y(this,new D(e,t))},o.isFinite=function(){return!!this.c},o.isGreaterThan=o.gt=function(e,t){return y(this,new D(e,t))>0},o.isGreaterThanOrEqualTo=o.gte=function(e,t){return 1===(t=y(this,new D(e,t)))||0===t},o.isInteger=function(){return!!this.c&&m(this.e/d)>this.c.length-2},o.isLessThan=o.lt=function(e,t){return y(this,new D(e,t))<0},o.isLessThanOrEqualTo=o.lte=function(e,t){return-1===(t=y(this,new D(e,t)))||0===t},o.isNaN=function(){return!this.s},o.isNegative=function(){return this.s<0},o.isPositive=function(){return this.s>0},o.isZero=function(){return!!this.c&&0==this.c[0]},o.minus=function(e,t){var n,r,i,o,a=this,s=a.s;if(t=(e=new D(e,t)).s,!s||!t)return new D(NaN);if(s!=t)return e.s=-t,a.plus(e);var u=a.e/d,c=e.e/d,l=a.c,h=e.c;if(!u||!c){if(!l||!h)return l?(e.s=-t,e):new D(h?a:NaN);if(!l[0]||!h[0])return h[0]?(e.s=-t,e):new D(l[0]?a:3==C?-0:0)}if(u=m(u),c=m(c),l=l.slice(),s=u-c){for((o=s<0)?(s=-s,i=l):(c=u,i=h),i.reverse(),t=s;t--;i.push(0));i.reverse()}else for(r=(o=(s=l.length)<(t=h.length))?s:t,s=t=0;t0)for(;t--;l[n++]=0);for(t=f-1;r>s;){if(l[--r]=0;){for(n=0,p=E[i]%b,v=E[i]/b|0,o=i+(a=u);o>i;)n=((c=p*(c=_[--a]%b)+(s=v*c+(l=_[a]/b|0)*p)%b*b+A[o]+n)/y|0)+(s/b|0)+v*l,A[o--]=c%y;A[o]=n}return n?++r:A.splice(0,1),L(e,A,r)},o.negated=function(){var e=new D(this);return e.s=-e.s||null,e},o.plus=function(e,t){var n,r=this,i=r.s;if(t=(e=new D(e,t)).s,!i||!t)return new D(NaN);if(i!=t)return e.s=-t,r.minus(e);var o=r.e/d,a=e.e/d,s=r.c,u=e.c;if(!o||!a){if(!s||!u)return new D(i/0);if(!s[0]||!u[0])return u[0]?e:new D(s[0]?r:0*i)}if(o=m(o),a=m(a),s=s.slice(),i=o-a){for(i>0?(a=o,n=u):(i=-i,n=s),n.reverse();i--;n.push(0));n.reverse()}for((i=s.length)-(t=u.length)<0&&(n=u,u=s,s=n,t=i),i=0;t;)i=(s[--t]=s[t]+u[t]+i)/f|0,s[t]=f===s[t]?0:s[t]%f;return i&&(s=[i].concat(s),++a),L(e,s,a)},o.precision=o.sd=function(e,t){var n,r,i,o=this;if(null!=e&&e!==!!e)return b(e,1,v),null==t?t=C:b(t,0,8),F(new D(o),e,t);if(!(n=o.c))return null;if(r=(i=n.length-1)*d+1,i=n[i]){for(;i%10==0;i/=10,r--);for(i=n[0];i>=10;i/=10,r++);}return e&&o.e+1>r&&(r=o.e+1),r},o.shiftedBy=function(e){return b(e,-9007199254740991,h),this.times("1e"+e)},o.squareRoot=o.sqrt=function(){var e,t,r,i,o,a=this,s=a.c,u=a.s,c=a.e,l=I+4,f=new D("0.5");if(1!==u||!s||!s[0])return new D(!u||u<0&&(!s||s[0])?NaN:s?a:1/0);if(0==(u=Math.sqrt(+H(a)))||u==1/0?(((t=A(s)).length+c)%2==0&&(t+="0"),u=Math.sqrt(+t),c=m((c+1)/2)-(c<0||c%2),r=new D(t=u==1/0?"5e"+c:(t=u.toExponential()).slice(0,t.indexOf("e")+1)+c)):r=new D(u+""),r.c[0])for((u=(c=r.e)+l)<3&&(u=0);;)if(o=r,r=f.times(o.plus(n(a,o,l,1))),A(o.c).slice(0,u)===(t=A(r.c)).slice(0,u)){if(r.e0&&g>0){for(o=g%s||s,f=p.substr(0,o);o0&&(f+=l+p.slice(o)),h&&(f="-"+f)}r=d?f+(n.decimalSeparator||"")+((u=+n.fractionGroupSize)?d.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):d):f}return(n.prefix||"")+r+(n.suffix||"")},o.toFraction=function(e){var t,r,i,o,a,s,u,l,f,h,g,v,m=this,y=m.c;if(null!=e&&(!(u=new D(e)).isInteger()&&(u.c||1!==u.s)||u.lt(k)))throw Error(c+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+H(u));if(!y)return new D(m);for(t=new D(k),f=r=new D(k),i=l=new D(k),v=A(y),a=t.e=v.length-m.e-1,t.c[0]=p[(s=a%d)<0?d+s:s],e=!e||u.comparedTo(t)>0?a>0?t:f:u,s=O,O=1/0,u=new D(v),l.c[0]=0;h=n(u,t,0,1),1!=(o=r.plus(h.times(i))).comparedTo(e);)r=i,i=o,f=l.plus(h.times(o=f)),l=o,t=u.minus(h.times(o=t)),u=o;return o=n(e.minus(r),i,0,1),l=l.plus(o.times(f)),r=r.plus(o.times(i)),l.s=f.s=m.s,g=n(f,i,a*=2,C).minus(m).abs().comparedTo(n(l,r,a,C).minus(m).abs())<1?[f,i]:[l,r],O=s,g},o.toNumber=function(){return+H(this)},o.toPrecision=function(e,t){return null!=e&&b(e,1,v),j(this,e,t,2)},o.toString=function(e){var t,n=this,i=n.s,o=n.e;return null===o?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(null==e?t=o<=S||o>=x?_(A(n.c),o):E(A(n.c),o,"0"):10===e&&Q?t=E(A((n=F(new D(n),I+o+1,C)).c),n.e,"0"):(b(e,2,T.length,"Base"),t=r(E(A(n.c),o,"0"),10,e,i,!0)),i<0&&n.c[0]&&(t="-"+t)),t},o.valueOf=o.toJSON=function(){return H(this)},o._isBigNumber=!0,null!=t&&D.set(t),D}(),o.default=o.BigNumber=o,void 0===(r=function(){return o}.call(t,n,t,e))||(e.exports=r)}()},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){for(var n=0;n1?t-1:0),r=1;r0?" Args: "+n.join(", "):""))}var C=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,n=0;n=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,i=r;e>=i;)(i<<=1)<0&&I(16,""+e);this.groupSizes=new Uint32Array(i),this.groupSizes.set(n),this.length=i;for(var o=r;o=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),i=r+n,o=r;o=B&&(B=t+1),S.set(e,t),x.set(t,e)},R="style["+w+'][data-styled-version="5.3.5"]',N=new RegExp("^"+w+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),T=function(e,t,n){for(var r,i=n.split(","),o=0,a=i.length;o=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(w))return r}}(n),o=void 0!==i?i.nextSibling:null;r.setAttribute(w,"active"),r.setAttribute("data-styled-version","5.3.5");var a=D();return a&&r.setAttribute("nonce",a),n.insertBefore(r,o),r},U=function(){function e(e){var t=this.element=j(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e0&&(c+=e+",")})),r+=""+s+u+'{content:"'+c+'"}/*!sc*/\n'}}}return r}(this)},e}(),G=/(a)(d)/gi,z=function(e){return String.fromCharCode(e+(e>25?39:97))};function V(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=z(t%52)+n;return(z(t%52)+n).replace(G,"$1-$2")}var W=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},K=function(e){return W(5381,e)};function Y(e){for(var t=0;t>>0);if(!t.hasNameForId(r,a)){var s=n(o,"."+a,void 0,r);t.insertRules(r,a,s)}i.push(a),this.staticRulesId=a}else{for(var u=this.rules.length,c=W(this.baseHash,n.hash),l="",f=0;f>>0);if(!t.hasNameForId(r,g)){var v=n(l,"."+g,void 0,r);t.insertRules(r,g,v)}i.push(g)}}return i.join(" ")},e}(),$=/^\s*\/\/.*$/gm,ee=[":","[",".","#"];function te(e){var t,n,r,i,o=void 0===e?m:e,a=o.options,s=void 0===a?m:a,c=o.plugins,l=void 0===c?v:c,f=new u.a(s),d=[],h=function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(n,r,i,o,a,s,u,c,l,f){switch(n){case 1:if(0===l&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===c)return r+"/*|*/";break;case 3:switch(c){case 102:case 112:return e(i[0]+r),"";default:return r+(0===f?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(t)}}}((function(e){d.push(e)})),p=function(e,r,o){return 0===r&&-1!==ee.indexOf(o[n.length])||o.match(i)?e:"."+t};function g(e,o,a,s){void 0===s&&(s="&");var u=e.replace($,""),c=o&&a?a+" "+o+" { "+u+" }":u;return t=s,n=o,r=new RegExp("\\"+n+"\\b","g"),i=new RegExp("(\\"+n+"\\b){2,}"),f(a||!o?"":o,c)}return f.use([].concat(l,[function(e,t,i){2===e&&i.length&&i[0].lastIndexOf(n)>0&&(i[0]=i[0].replace(r,p))},h,function(e){if(-2===e){var t=d;return d=[],t}}])),g.hash=l.length?l.reduce((function(e,t){return t.name||I(15),W(e,t.name)}),5381).toString():"",g}var ne=o.a.createContext(),re=(ne.Consumer,o.a.createContext()),ie=(re.Consumer,new q),oe=te();function ae(){return Object(i.useContext)(ne)||ie}function se(){return Object(i.useContext)(re)||oe}function ue(e){var t=Object(i.useState)(e.stylisPlugins),n=t[0],r=t[1],a=ae(),u=Object(i.useMemo)((function(){var t=a;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t}),[e.disableCSSOMInjection,e.sheet,e.target]),c=Object(i.useMemo)((function(){return te({options:{prefix:!e.disableVendorPrefixes},plugins:n})}),[e.disableVendorPrefixes,n]);return Object(i.useEffect)((function(){s()(n,e.stylisPlugins)||r(e.stylisPlugins)}),[e.stylisPlugins]),o.a.createElement(ne.Provider,{value:u},o.a.createElement(re.Provider,{value:c},e.children))}var ce=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=oe);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.toString=function(){return I(12,String(n.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=oe),this.name+e.hash},e}(),le=/([A-Z])/,fe=/([A-Z])/g,de=/^ms-/,he=function(e){return"-"+e.toLowerCase()};function pe(e){return le.test(e)?e.replace(fe,he).replace(de,"-ms-"):e}var ge=function(e){return null==e||!1===e||""===e};function ve(e,t,n,r){if(Array.isArray(e)){for(var i,o=[],a=0,s=e.length;a1?t-1:0),r=1;r?@[\\\]^`{|}~-]+/g,we=/(^-|-$)/g;function _e(e){return e.replace(be,"-").replace(we,"")}var Ee=function(e){return V(K(e)>>>0)};function ke(e){return"string"==typeof e&&!0}var Ie=function(e){return"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},Ce=function(e){return"__proto__"!==e&&"constructor"!==e&&"prototype"!==e};function Se(e,t,n){var r=e[n];Ie(t)&&Ie(r)?xe(r,t):e[n]=t}function xe(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=0||(i[n]=e[n]);return i}(t,["componentId"]),o=r&&r+"-"+(ke(e)?e:_e(y(e)));return Pe(e,h({},i,{attrs:_,componentId:o}),n)},Object.defineProperty(k,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=r?xe({},e.defaultProps,t):t}}),k.toString=function(){return"."+k.styledComponentId},a&&d()(k,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),k}var Re=function(e){return function e(t,n,i){if(void 0===i&&(i=m),!Object(r.isValidElementType)(n))return I(1,String(n));var o=function(){return t(n,i,Ae.apply(void 0,arguments))};return o.withConfig=function(r){return e(t,n,h({},i,{},r))},o.attrs=function(r){return e(t,n,h({},i,{attrs:Array.prototype.concat(i.attrs,r).filter(Boolean)}))},o}(Pe,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach((function(e){Re[e]=Re(e)}));var Ne=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=Y(e),q.registerId(this.componentId+1)}var t=e.prototype;return t.createStyles=function(e,t,n,r){var i=r(ve(this.rules,t,n,r).join(""),""),o=this.componentId+e;n.insertRules(o,o,i)},t.removeStyles=function(e,t){t.clearRules(this.componentId+e)},t.renderStyles=function(e,t,n,r){e>2&&q.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)},e}();function Te(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r1?t-1:0),r=1;r"+t+""},this.getStyleTags=function(){return e.sealed?I(2):e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)return I(2);var n=((t={})[w]="",t["data-styled-version"]="5.3.5",t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),r=D();return r&&(n.nonce=r),[o.a.createElement("style",h({},n,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new q({isServer:!0}),this.sealed=!1}var t=e.prototype;t.collectStyles=function(e){return this.sealed?I(2):o.a.createElement(ue,{sheet:this.instance},e)},t.interleaveWithNodeStream=function(e){return I(3)}}();var De=function(){return Object(i.useContext)(Be)};t.e=Re}).call(this,n(35))},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function n(e,t){for(var n=0;n7?r+=e[i].toUpperCase():r+=e[i];return Object(c.addHexPrefix)(r)}function x(e){var t,n,r;return(r=e)&&r.length&&!b(e[0])&&(e[0]=(t=e[0],c.utf8ToHex(t,!n))),e}function B(e){if("undefined"!==typeof e.type&&"0"!==e.type)return e;if("undefined"===typeof e.from||(!(t=e.from)||"0x"!==t.toLowerCase().substring(0,2)||!/^(0x)?[0-9a-f]{40}$/i.test(t)||!/^(0x)?[0-9a-f]{40}$/.test(t)&&!/^(0x)?[0-9A-F]{40}$/.test(t)&&t!==S(t)))throw new Error("Transaction object must include a valid 'from' value.");var t;function n(e){var t,n=e;return("number"===typeof e||"string"===typeof e&&!function(e){return""===e||"string"===typeof e&&""===e.trim()}(e))&&(b(e)?"string"===typeof e&&(n=v(e)):n=p(e)),"string"===typeof n&&(t=n,n=c.removeHexLeadingZeros(c.addHexPrefix(t))),n}var r={from:v(e.from),to:"undefined"===typeof e.to?"":v(e.to),gasPrice:"undefined"===typeof e.gasPrice?"":n(e.gasPrice),gas:"undefined"===typeof e.gas?"undefined"===typeof e.gasLimit?"":n(e.gasLimit):n(e.gas),value:"undefined"===typeof e.value?"":n(e.value),nonce:"undefined"===typeof e.nonce?"":n(e.nonce),data:"undefined"===typeof e.data?"":v(e.data)||"0x"},i=["gasPrice","gas","value","nonce"];return Object.keys(r).forEach((function(e){!r[e].trim().length&&i.includes(e)&&delete r[e]})),r}n(1),n(4);function O(e){var t=e.message||"Failed or Rejected Request",n=-32e3;if(e&&!e.code)switch(t){case"Parse error":n=-32700;break;case"Invalid request":n=-32600;break;case"Method not found":n=-32601;break;case"Invalid params":n=-32602;break;case"Internal error":n=-32603;break;default:n=-32e3}return{code:n,message:t}}var M=n(296);function P(e){var t=-1!==e.indexOf("?")?e.indexOf("?"):void 0;return"undefined"!==typeof t?e.substr(t):""}function R(e,t){var n=N(e);return e=function(e){return M.stringify(e)}(n=Object.assign(Object.assign({},n),t))}function N(e){return M.parse(e)}function T(e){return"undefined"!==typeof e.bridge}function Q(e){var t=e.indexOf(":"),n=-1!==e.indexOf("?")?e.indexOf("?"):void 0,r=e.substring(0,t);var i=function(e){var t=e.split("@");return{handshakeTopic:t[0],version:parseInt(t[1],10)}}(e.substring(t+1,n));var o=function(e){var t=N(e);return{key:t.key||"",bridge:t.bridge||""}}("undefined"!==typeof n?e.substr(n):"");return Object.assign(Object.assign({protocol:r},i),o)}},,function(e,t){e.exports=r;var n=null;try{n=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(C){}function r(e,t,n){this.low=0|e,this.high=0|t,this.unsigned=!!n}function i(e){return!0===(e&&e.__isLong__)}r.prototype.__isLong__,Object.defineProperty(r.prototype,"__isLong__",{value:!0}),r.isLong=i;var o={},a={};function s(e,t){var n,r,i;return t?(i=0<=(e>>>=0)&&e<256)&&(r=a[e])?r:(n=c(e,(0|e)<0?-1:0,!0),i&&(a[e]=n),n):(i=-128<=(e|=0)&&e<128)&&(r=o[e])?r:(n=c(e,e<0?-1:0,!1),i&&(o[e]=n),n)}function u(e,t){if(isNaN(e))return t?A:m;if(t){if(e<0)return A;if(e>=p)return E}else{if(e<=-g)return k;if(e+1>=g)return _}return e<0?u(-e,t).neg():c(e%h|0,e/h|0,t)}function c(e,t,n){return new r(e,t,n)}r.fromInt=s,r.fromNumber=u,r.fromBits=c;var l=Math.pow;function f(e,t,n){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return m;if("number"===typeof t?(n=t,t=!1):t=!!t,(n=n||10)<2||360)throw Error("interior hyphen");if(0===r)return f(e.substring(1),t,n).neg();for(var i=u(l(n,8)),o=m,a=0;a>>0:this.low},I.toNumber=function(){return this.unsigned?(this.high>>>0)*h+(this.low>>>0):this.high*h+(this.low>>>0)},I.toString=function(e){if((e=e||10)<2||36>>0).toString(e);if((o=s).isZero())return c+a;for(;c.length<6;)c="0"+c;a=""+c+a}},I.getHighBits=function(){return this.high},I.getHighBitsUnsigned=function(){return this.high>>>0},I.getLowBits=function(){return this.low},I.getLowBitsUnsigned=function(){return this.low>>>0},I.getNumBitsAbs=function(){if(this.isNegative())return this.eq(k)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&0==(e&1<=0},I.isOdd=function(){return 1===(1&this.low)},I.isEven=function(){return 0===(1&this.low)},I.equals=function(e){return i(e)||(e=d(e)),(this.unsigned===e.unsigned||this.high>>>31!==1||e.high>>>31!==1)&&(this.high===e.high&&this.low===e.low)},I.eq=I.equals,I.notEquals=function(e){return!this.eq(e)},I.neq=I.notEquals,I.ne=I.notEquals,I.lessThan=function(e){return this.comp(e)<0},I.lt=I.lessThan,I.lessThanOrEqual=function(e){return this.comp(e)<=0},I.lte=I.lessThanOrEqual,I.le=I.lessThanOrEqual,I.greaterThan=function(e){return this.comp(e)>0},I.gt=I.greaterThan,I.greaterThanOrEqual=function(e){return this.comp(e)>=0},I.gte=I.greaterThanOrEqual,I.ge=I.greaterThanOrEqual,I.compare=function(e){if(i(e)||(e=d(e)),this.eq(e))return 0;var t=this.isNegative(),n=e.isNegative();return t&&!n?-1:!t&&n?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},I.comp=I.compare,I.negate=function(){return!this.unsigned&&this.eq(k)?k:this.not().add(y)},I.neg=I.negate,I.add=function(e){i(e)||(e=d(e));var t=this.high>>>16,n=65535&this.high,r=this.low>>>16,o=65535&this.low,a=e.high>>>16,s=65535&e.high,u=e.low>>>16,l=0,f=0,h=0,p=0;return h+=(p+=o+(65535&e.low))>>>16,f+=(h+=r+u)>>>16,l+=(f+=n+s)>>>16,l+=t+a,c((h&=65535)<<16|(p&=65535),(l&=65535)<<16|(f&=65535),this.unsigned)},I.subtract=function(e){return i(e)||(e=d(e)),this.add(e.neg())},I.sub=I.subtract,I.multiply=function(e){if(this.isZero())return m;if(i(e)||(e=d(e)),n)return c(n.mul(this.low,this.high,e.low,e.high),n.get_high(),this.unsigned);if(e.isZero())return m;if(this.eq(k))return e.isOdd()?k:m;if(e.eq(k))return this.isOdd()?k:m;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(v)&&e.lt(v))return u(this.toNumber()*e.toNumber(),this.unsigned);var t=this.high>>>16,r=65535&this.high,o=this.low>>>16,a=65535&this.low,s=e.high>>>16,l=65535&e.high,f=e.low>>>16,h=65535&e.low,p=0,g=0,A=0,y=0;return A+=(y+=a*h)>>>16,g+=(A+=o*h)>>>16,A&=65535,g+=(A+=a*f)>>>16,p+=(g+=r*h)>>>16,g&=65535,p+=(g+=o*f)>>>16,g&=65535,p+=(g+=a*l)>>>16,p+=t*h+r*f+o*l+a*s,c((A&=65535)<<16|(y&=65535),(p&=65535)<<16|(g&=65535),this.unsigned)},I.mul=I.multiply,I.divide=function(e){if(i(e)||(e=d(e)),e.isZero())throw Error("division by zero");var t,r,o;if(n)return this.unsigned||-2147483648!==this.high||-1!==e.low||-1!==e.high?c((this.unsigned?n.div_u:n.div_s)(this.low,this.high,e.low,e.high),n.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?A:m;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return A;if(e.gt(this.shru(1)))return b;o=A}else{if(this.eq(k))return e.eq(y)||e.eq(w)?k:e.eq(k)?y:(t=this.shr(1).div(e).shl(1)).eq(m)?e.isNegative()?y:w:(r=this.sub(e.mul(t)),o=t.add(r.div(e)));if(e.eq(k))return this.unsigned?A:m;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();o=m}for(r=this;r.gte(e);){t=Math.max(1,Math.floor(r.toNumber()/e.toNumber()));for(var a=Math.ceil(Math.log(t)/Math.LN2),s=a<=48?1:l(2,a-48),f=u(t),h=f.mul(e);h.isNegative()||h.gt(r);)h=(f=u(t-=s,this.unsigned)).mul(e);f.isZero()&&(f=y),o=o.add(f),r=r.sub(h)}return o},I.div=I.divide,I.modulo=function(e){return i(e)||(e=d(e)),n?c((this.unsigned?n.rem_u:n.rem_s)(this.low,this.high,e.low,e.high),n.get_high(),this.unsigned):this.sub(this.div(e).mul(e))},I.mod=I.modulo,I.rem=I.modulo,I.not=function(){return c(~this.low,~this.high,this.unsigned)},I.and=function(e){return i(e)||(e=d(e)),c(this.low&e.low,this.high&e.high,this.unsigned)},I.or=function(e){return i(e)||(e=d(e)),c(this.low|e.low,this.high|e.high,this.unsigned)},I.xor=function(e){return i(e)||(e=d(e)),c(this.low^e.low,this.high^e.high,this.unsigned)},I.shiftLeft=function(e){return i(e)&&(e=e.toInt()),0===(e&=63)?this:e<32?c(this.low<>>32-e,this.unsigned):c(0,this.low<>>e|this.high<<32-e,this.high>>e,this.unsigned):c(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},I.shr=I.shiftRight,I.shiftRightUnsigned=function(e){if(i(e)&&(e=e.toInt()),0===(e&=63))return this;var t=this.high;return e<32?c(this.low>>>e|t<<32-e,t>>>e,this.unsigned):c(32===e?t:t>>>e-32,0,this.unsigned)},I.shru=I.shiftRightUnsigned,I.shr_u=I.shiftRightUnsigned,I.toSigned=function(){return this.unsigned?c(this.low,this.high,!1):this},I.toUnsigned=function(){return this.unsigned?this:c(this.low,this.high,!0)},I.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},I.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},I.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},r.fromBytes=function(e,t,n){return n?r.fromBytesLE(e,t):r.fromBytesBE(e,t)},r.fromBytesLE=function(e,t){return new r(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},r.fromBytesBE=function(e,t){return new r(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)}},function(e,t,n){var r=n(238);e.exports=function(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=r(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";e.exports=n(953)},function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"bufferToArray",(function(){return f})),n.d(t,"bufferToHex",(function(){return d})),n.d(t,"bufferToUtf8",(function(){return h})),n.d(t,"bufferToNumber",(function(){return p})),n.d(t,"bufferToBinary",(function(){return g})),n.d(t,"arrayToBuffer",(function(){return v})),n.d(t,"arrayToHex",(function(){return m})),n.d(t,"arrayToUtf8",(function(){return A})),n.d(t,"arrayToNumber",(function(){return y})),n.d(t,"arrayToBinary",(function(){return b})),n.d(t,"hexToBuffer",(function(){return w})),n.d(t,"hexToArray",(function(){return _})),n.d(t,"hexToUtf8",(function(){return E})),n.d(t,"hexToNumber",(function(){return k})),n.d(t,"hexToBinary",(function(){return I})),n.d(t,"utf8ToBuffer",(function(){return C})),n.d(t,"utf8ToArray",(function(){return S})),n.d(t,"utf8ToHex",(function(){return x})),n.d(t,"utf8ToNumber",(function(){return B})),n.d(t,"utf8ToBinary",(function(){return O})),n.d(t,"numberToBuffer",(function(){return M})),n.d(t,"numberToArray",(function(){return P})),n.d(t,"numberToHex",(function(){return R})),n.d(t,"numberToUtf8",(function(){return N})),n.d(t,"numberToBinary",(function(){return T})),n.d(t,"binaryToBuffer",(function(){return Q})),n.d(t,"binaryToArray",(function(){return D})),n.d(t,"binaryToHex",(function(){return j})),n.d(t,"binaryToUtf8",(function(){return U})),n.d(t,"binaryToNumber",(function(){return L})),n.d(t,"isBinaryString",(function(){return F})),n.d(t,"isHexString",(function(){return H})),n.d(t,"isBuffer",(function(){return J})),n.d(t,"isTypedArray",(function(){return q})),n.d(t,"isArrayBuffer",(function(){return G})),n.d(t,"getType",(function(){return z})),n.d(t,"getEncoding",(function(){return V})),n.d(t,"concatBuffers",(function(){return W})),n.d(t,"concatArrays",(function(){return K})),n.d(t,"trimLeft",(function(){return Y})),n.d(t,"trimRight",(function(){return Z})),n.d(t,"calcByteLength",(function(){return X})),n.d(t,"splitBytes",(function(){return $})),n.d(t,"swapBytes",(function(){return ee})),n.d(t,"swapHex",(function(){return te})),n.d(t,"sanitizeBytes",(function(){return ne})),n.d(t,"padLeft",(function(){return re})),n.d(t,"padRight",(function(){return ie})),n.d(t,"removeHexPrefix",(function(){return oe})),n.d(t,"addHexPrefix",(function(){return ae})),n.d(t,"sanitizeHex",(function(){return se})),n.d(t,"removeHexLeadingZeros",(function(){return ue}));var r=n(45),i=n(295),o=n.n(i),a=n(561),s=n.n(a),u="hex",c="utf8",l="0";function f(e){return new Uint8Array(e)}function d(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.toString(u);return t?ae(n):n}function h(e){return e.toString(c)}function p(e){return e.readUIntBE(0,e.length)}function g(e){return b(f(e))}function v(e){return s()(e)}function m(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return d(v(e),t)}function A(e){return h(v(e))}function y(e){return p(v(e))}function b(e){return Array.from(e).map(T).join("")}function w(t){return e.from(oe(t),u)}function _(e){return f(w(e))}function E(e){return h(w(e))}function k(e){return y(_(e))}function I(e){return b(_(e))}function C(t){return e.from(t,c)}function S(e){return f(C(e))}function x(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return d(C(e),t)}function B(e){var t=parseInt(e,10);return function(e,t){if(!e)throw new Error(t)}(!function(e){return"undefined"===typeof e}(t),"Number can only safely store up to 53 bits"),t}function O(e){return b(S(e))}function M(e){return Q(T(e))}function P(e){return D(T(e))}function R(e,t){return j(T(e),t)}function N(e){return"".concat(e)}function T(e){return ne((e>>>0).toString(2))}function Q(e){return v(D(e))}function D(e){return new Uint8Array($(e).map((function(e){return parseInt(e,2)})))}function j(e,t){return m(D(e),t)}function U(e){return A(D(e))}function L(e){return y(D(e))}function F(e){return!("string"!==typeof e||!new RegExp(/^[01]+$/).test(e))&&e.length%8===0}function H(e,t){return!("string"!==typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&(!t||e.length===2+2*t)}function J(t){return e.isBuffer(t)}function q(e){return o.a.strict(e)&&!J(e)}function G(e){return!q(e)&&!J(e)&&"undefined"!==typeof e.byteLength}function z(e){return J(e)?"buffer":q(e)?"typed-array":G(e)?"array-buffer":Array.isArray(e)?"array":typeof e}function V(e){return F(e)?"binary":H(e)?u:c}function W(){for(var t=arguments.length,n=new Array(t),r=0;r0&&(e=e.slice(n)),e}function Z(e,t){return e.slice(0,t)}function X(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8,n=e%t;return n?(e-n)/t*t+t:e}function $(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8,n=ne(e).match(new RegExp(".{".concat(t,"}"),"gi"));return Array.from(n||[])}function ee(e){return $(e).map(ce).join("")}function te(e){return j(ee(I(e)))}function ne(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l;return re(e,X(e.length,t),n)}function re(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l;return le(e,t,!0,n)}function ie(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l;return le(e,t,!1,n)}function oe(e){return e.replace(/^0x/,"")}function ae(e){return e.startsWith("0x")?e:"0x".concat(e)}function se(e){return(e=ne(e=oe(e),2))&&(e=ae(e)),e}function ue(e){var t=e.startsWith("0x");return e=(e=oe(e)).startsWith(l)?e.substring(1):e,t?ae(e):e}function ce(e){return e.split("").reverse().join("")}function le(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:l,i=t-e.length,o=e;if(i>0){var a=r.repeat(i);o=n?a+e:e+a}return o}}.call(this,n(26).Buffer)},function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",(function(){return r}))},function(e,t){"function"===typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},,function(e,t,n){"use strict";(function(e){var r=n(327),i=n(663),o=n(664);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function p(e,t){if(u.isBuffer(e))return e.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!==typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return H(e).length;default:if(r)return F(e).length;t=(""+t).toLowerCase(),r=!0}}function g(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,n);case"utf8":case"utf-8":return C(this,t,n);case"ascii":return x(this,t,n);case"latin1":case"binary":return B(this,t,n);case"base64":return I(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function v(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function m(e,t,n,r,i){if(0===e.length)return-1;if("string"===typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"===typeof t&&(t=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:A(e,t,n,r,i);if("number"===typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):A(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function A(e,t,n,r,i){var o,a=1,s=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var l=-1;for(o=n;os&&(n=s-u),o=n;o>=0;o--){for(var f=!0,d=0;di&&(r=i):r=i;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function I(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function C(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i239?4:c>223?3:c>191?2:1;if(i+f<=n)switch(f){case 1:c<128&&(l=c);break;case 2:128===(192&(o=e[i+1]))&&(u=(31&c)<<6|63&o)>127&&(l=u);break;case 3:o=e[i+1],a=e[i+2],128===(192&o)&&128===(192&a)&&(u=(15&c)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128===(192&o)&&128===(192&a)&&128===(192&s)&&(u=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),i+=f}return function(e){var t=e.length;if(t<=S)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},u.prototype.compare=function(e,t,n,r,i){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(o,a),c=this.slice(r,i),l=e.slice(t,n),f=0;fi)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return y(this,e,t,n);case"utf8":case"utf-8":return b(this,e,t,n);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return _(this,e,t,n);case"base64":return E(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var S=4096;function x(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;ir)&&(n=r);for(var i="",o=t;on)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,n,r,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function N(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i>>8*(r?i:1-i)}function T(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i>>8*(r?i:3-i)&255}function Q(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function D(e,t,n,r,o){return o||Q(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function j(e,t,n,r,o){return o||Q(e,0,n,8),i.write(e,t,n,r,52,8),n+8}u.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(i*=256);)r+=this[e+--t]*i;return r},u.prototype.readUInt8=function(e,t){return t||P(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||P(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||P(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var r=this[e],i=1,o=0;++o=(i*=128)&&(r-=Math.pow(2,8*t)),r},u.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||P(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){t||P(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||P(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||P(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||P(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||P(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||R(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+i]=e/o&255;return t+n},u.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):T(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):T(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);R(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o>0)-s&255;return t+n},u.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);R(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):N(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):N(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):T(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):T(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,n){return D(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return D(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return j(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return j(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--i)e[i+t]=this[i+n];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"===typeof e)for(o=t;o55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function H(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(U,"")).length<2)return"";for(;e.length%4!==0;)e+="=";return e}(e))}function J(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(20))},,function(e,t,n){var r=n(363).default;function i(){"use strict";e.exports=i=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},n=Object.prototype,o=n.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},s=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(B){l=function(e,t,n){return e[t]=n}}function f(e,t,n,r){var i=t&&t.prototype instanceof p?t:p,o=Object.create(i.prototype),a=new C(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return x()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=E(a,n);if(s){if(s===h)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=d(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(e,n,a),o}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(B){return{type:"throw",arg:B}}}t.wrap=f;var h={};function p(){}function g(){}function v(){}var m={};l(m,s,(function(){return this}));var A=Object.getPrototypeOf,y=A&&A(A(S([])));y&&y!==n&&o.call(y,s)&&(m=y);var b=v.prototype=p.prototype=Object.create(m);function w(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function n(i,a,s,u){var c=d(e[i],e,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==r(f)&&o.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,s,u)}),(function(e){n("throw",e,s,u)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return n("throw",e,s,u)}))}u(c.arg)}var i;this._invoke=function(e,r){function o(){return new t((function(t,i){n(e,r,t,i)}))}return i=i?i.then(o,o):o()}}function E(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,E(e,t),"throw"===t.method))return h;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var r=d(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,h;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function S(e){if(e){var t=e[s];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n=0;--r){var i=this.tryEntries[r],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=o.call(i,"catchLoc"),u=o.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),I(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;I(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},t}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function n(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(c){return void n(c)}s.done?t(u):Promise.resolve(u).then(r,i)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(i,o){var a=e.apply(t,r);function s(e){n(a,i,o,s,u,"next",e)}function u(e){n(a,i,o,s,u,"throw",e)}s(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(245);e.exports=function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&r(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(169),i=n(362),o=n(723);e.exports=function(e){var t=i();return function(){var n,i=r(e);if(t){var a=r(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return o(this,n)}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(153);function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(e,t)||Object(r.a)(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},,function(e,t,n){(function(e){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function o(e,t,n){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var a;"object"===typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:n(654).Buffer}catch(x){}function s(e,t){var n=e.charCodeAt(t);return n>=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:void r(!1,"Invalid character in "+e)}function u(e,t,n){var r=s(e,n);return n-1>=t&&(r|=s(e,n-1)<<4),r}function c(e,t,n,i){for(var o=0,a=0,s=Math.min(e.length,n),u=t;u=49?c-49+10:c>=17?c-17+10:c,r(c>=0&&a0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,n){if("number"===typeof e)return this._initNumber(e,t,n);if("object"===typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===n)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this._strip()},o.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r=t;r-=2)i=u(e,t,r)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(r=(e.length-t)%2===0?t+1:t;r=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var o=e.length-n,a=o%r,s=Math.min(o,o-a)+n,u=0,l=n;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(x){o.prototype.inspect=f}else o.prototype.inspect=f;function f(){return(this.red?""}var d=["","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"],h=[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],p=[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];o.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var i=0,o=0,a=0;a>>24-i&16777215,(i+=2)>=26&&(i-=26,a--),n=0!==o||a!==this.length-1?d[6-u.length]+u+n:u+n}for(0!==o&&(n=o.toString(16)+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var c=h[e],l=p[e];n="";var f=this.clone();for(f.negative=0;!f.isZero();){var g=f.modrn(l).toString(e);n=(f=f.idivn(l)).isZero()?g+n:d[c-g.length]+g+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},a&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(a,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function g(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,u=a/67108864|0;n.words[0]=s;for(var c=1;c>>26,f=67108863&u,d=Math.min(c,t.length-1),h=Math.max(0,c-e.length+1);h<=d;h++){var p=c-h|0;l+=(a=(i=0|e.words[p])*(o=0|t.words[h])+f)/67108864|0,f=67108863&a}n.words[c]=0|f,u=0|l}return 0!==u?n.words[c]=0|u:n.length--,n._strip()}o.prototype.toArrayLike=function(e,t,n){this._strip();var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0");var a=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](a,i),a},o.prototype._toArrayLikeLE=function(e,t){for(var n=0,r=0,i=0,o=0;i>8&255),n>16&255),6===o?(n>24&255),r=0,o=0):(r=a>>>24,o+=2)}if(n=0&&(e[n--]=a>>8&255),n>=0&&(e[n--]=a>>16&255),6===o?(n>=0&&(e[n--]=a>>24&255),r=0,o=0):(r=a>>>24,o+=2)}if(n>=0)for(e[n--]=r;n>=0;)e[n--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0===(8191&t)&&(n+=13,t>>>=13),0===(127&t)&&(n+=7,t>>>=7),0===(15&t)&&(n+=4,t>>>=4),0===(3&t)&&(n+=2,t>>>=2),0===(1&t)&&n++,n},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;ne.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;re.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){r("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-n),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){r("number"===typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(n=this,r=e):(n=e,r=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var o=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==o&&a>26,this.words[a]=67108863&t;if(0===o&&a>>13,h=0|a[1],p=8191&h,g=h>>>13,v=0|a[2],m=8191&v,A=v>>>13,y=0|a[3],b=8191&y,w=y>>>13,_=0|a[4],E=8191&_,k=_>>>13,I=0|a[5],C=8191&I,S=I>>>13,x=0|a[6],B=8191&x,O=x>>>13,M=0|a[7],P=8191&M,R=M>>>13,N=0|a[8],T=8191&N,Q=N>>>13,D=0|a[9],j=8191&D,U=D>>>13,L=0|s[0],F=8191&L,H=L>>>13,J=0|s[1],q=8191&J,G=J>>>13,z=0|s[2],V=8191&z,W=z>>>13,K=0|s[3],Y=8191&K,Z=K>>>13,X=0|s[4],$=8191&X,ee=X>>>13,te=0|s[5],ne=8191&te,re=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ue=8191&se,ce=se>>>13,le=0|s[8],fe=8191&le,de=le>>>13,he=0|s[9],pe=8191&he,ge=he>>>13;n.negative=e.negative^t.negative,n.length=19;var ve=(c+(r=Math.imul(f,F))|0)+((8191&(i=(i=Math.imul(f,H))+Math.imul(d,F)|0))<<13)|0;c=((o=Math.imul(d,H))+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(p,F),i=(i=Math.imul(p,H))+Math.imul(g,F)|0,o=Math.imul(g,H);var me=(c+(r=r+Math.imul(f,q)|0)|0)+((8191&(i=(i=i+Math.imul(f,G)|0)+Math.imul(d,q)|0))<<13)|0;c=((o=o+Math.imul(d,G)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(m,F),i=(i=Math.imul(m,H))+Math.imul(A,F)|0,o=Math.imul(A,H),r=r+Math.imul(p,q)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(g,q)|0,o=o+Math.imul(g,G)|0;var Ae=(c+(r=r+Math.imul(f,V)|0)|0)+((8191&(i=(i=i+Math.imul(f,W)|0)+Math.imul(d,V)|0))<<13)|0;c=((o=o+Math.imul(d,W)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(b,F),i=(i=Math.imul(b,H))+Math.imul(w,F)|0,o=Math.imul(w,H),r=r+Math.imul(m,q)|0,i=(i=i+Math.imul(m,G)|0)+Math.imul(A,q)|0,o=o+Math.imul(A,G)|0,r=r+Math.imul(p,V)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,W)|0;var ye=(c+(r=r+Math.imul(f,Y)|0)|0)+((8191&(i=(i=i+Math.imul(f,Z)|0)+Math.imul(d,Y)|0))<<13)|0;c=((o=o+Math.imul(d,Z)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(E,F),i=(i=Math.imul(E,H))+Math.imul(k,F)|0,o=Math.imul(k,H),r=r+Math.imul(b,q)|0,i=(i=i+Math.imul(b,G)|0)+Math.imul(w,q)|0,o=o+Math.imul(w,G)|0,r=r+Math.imul(m,V)|0,i=(i=i+Math.imul(m,W)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,W)|0,r=r+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(g,Y)|0,o=o+Math.imul(g,Z)|0;var be=(c+(r=r+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,ee)|0)+Math.imul(d,$)|0))<<13)|0;c=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(C,F),i=(i=Math.imul(C,H))+Math.imul(S,F)|0,o=Math.imul(S,H),r=r+Math.imul(E,q)|0,i=(i=i+Math.imul(E,G)|0)+Math.imul(k,q)|0,o=o+Math.imul(k,G)|0,r=r+Math.imul(b,V)|0,i=(i=i+Math.imul(b,W)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,W)|0,r=r+Math.imul(m,Y)|0,i=(i=i+Math.imul(m,Z)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,Z)|0,r=r+Math.imul(p,$)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(g,$)|0,o=o+Math.imul(g,ee)|0;var we=(c+(r=r+Math.imul(f,ne)|0)|0)+((8191&(i=(i=i+Math.imul(f,re)|0)+Math.imul(d,ne)|0))<<13)|0;c=((o=o+Math.imul(d,re)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(B,F),i=(i=Math.imul(B,H))+Math.imul(O,F)|0,o=Math.imul(O,H),r=r+Math.imul(C,q)|0,i=(i=i+Math.imul(C,G)|0)+Math.imul(S,q)|0,o=o+Math.imul(S,G)|0,r=r+Math.imul(E,V)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(k,V)|0,o=o+Math.imul(k,W)|0,r=r+Math.imul(b,Y)|0,i=(i=i+Math.imul(b,Z)|0)+Math.imul(w,Y)|0,o=o+Math.imul(w,Z)|0,r=r+Math.imul(m,$)|0,i=(i=i+Math.imul(m,ee)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,ee)|0,r=r+Math.imul(p,ne)|0,i=(i=i+Math.imul(p,re)|0)+Math.imul(g,ne)|0,o=o+Math.imul(g,re)|0;var _e=(c+(r=r+Math.imul(f,oe)|0)|0)+((8191&(i=(i=i+Math.imul(f,ae)|0)+Math.imul(d,oe)|0))<<13)|0;c=((o=o+Math.imul(d,ae)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(P,F),i=(i=Math.imul(P,H))+Math.imul(R,F)|0,o=Math.imul(R,H),r=r+Math.imul(B,q)|0,i=(i=i+Math.imul(B,G)|0)+Math.imul(O,q)|0,o=o+Math.imul(O,G)|0,r=r+Math.imul(C,V)|0,i=(i=i+Math.imul(C,W)|0)+Math.imul(S,V)|0,o=o+Math.imul(S,W)|0,r=r+Math.imul(E,Y)|0,i=(i=i+Math.imul(E,Z)|0)+Math.imul(k,Y)|0,o=o+Math.imul(k,Z)|0,r=r+Math.imul(b,$)|0,i=(i=i+Math.imul(b,ee)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,ee)|0,r=r+Math.imul(m,ne)|0,i=(i=i+Math.imul(m,re)|0)+Math.imul(A,ne)|0,o=o+Math.imul(A,re)|0,r=r+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(g,oe)|0,o=o+Math.imul(g,ae)|0;var Ee=(c+(r=r+Math.imul(f,ue)|0)|0)+((8191&(i=(i=i+Math.imul(f,ce)|0)+Math.imul(d,ue)|0))<<13)|0;c=((o=o+Math.imul(d,ce)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(T,F),i=(i=Math.imul(T,H))+Math.imul(Q,F)|0,o=Math.imul(Q,H),r=r+Math.imul(P,q)|0,i=(i=i+Math.imul(P,G)|0)+Math.imul(R,q)|0,o=o+Math.imul(R,G)|0,r=r+Math.imul(B,V)|0,i=(i=i+Math.imul(B,W)|0)+Math.imul(O,V)|0,o=o+Math.imul(O,W)|0,r=r+Math.imul(C,Y)|0,i=(i=i+Math.imul(C,Z)|0)+Math.imul(S,Y)|0,o=o+Math.imul(S,Z)|0,r=r+Math.imul(E,$)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,ee)|0,r=r+Math.imul(b,ne)|0,i=(i=i+Math.imul(b,re)|0)+Math.imul(w,ne)|0,o=o+Math.imul(w,re)|0,r=r+Math.imul(m,oe)|0,i=(i=i+Math.imul(m,ae)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,ae)|0,r=r+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(g,ue)|0,o=o+Math.imul(g,ce)|0;var ke=(c+(r=r+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,de)|0)+Math.imul(d,fe)|0))<<13)|0;c=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(j,F),i=(i=Math.imul(j,H))+Math.imul(U,F)|0,o=Math.imul(U,H),r=r+Math.imul(T,q)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(Q,q)|0,o=o+Math.imul(Q,G)|0,r=r+Math.imul(P,V)|0,i=(i=i+Math.imul(P,W)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,W)|0,r=r+Math.imul(B,Y)|0,i=(i=i+Math.imul(B,Z)|0)+Math.imul(O,Y)|0,o=o+Math.imul(O,Z)|0,r=r+Math.imul(C,$)|0,i=(i=i+Math.imul(C,ee)|0)+Math.imul(S,$)|0,o=o+Math.imul(S,ee)|0,r=r+Math.imul(E,ne)|0,i=(i=i+Math.imul(E,re)|0)+Math.imul(k,ne)|0,o=o+Math.imul(k,re)|0,r=r+Math.imul(b,oe)|0,i=(i=i+Math.imul(b,ae)|0)+Math.imul(w,oe)|0,o=o+Math.imul(w,ae)|0,r=r+Math.imul(m,ue)|0,i=(i=i+Math.imul(m,ce)|0)+Math.imul(A,ue)|0,o=o+Math.imul(A,ce)|0,r=r+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(g,fe)|0,o=o+Math.imul(g,de)|0;var Ie=(c+(r=r+Math.imul(f,pe)|0)|0)+((8191&(i=(i=i+Math.imul(f,ge)|0)+Math.imul(d,pe)|0))<<13)|0;c=((o=o+Math.imul(d,ge)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(j,q),i=(i=Math.imul(j,G))+Math.imul(U,q)|0,o=Math.imul(U,G),r=r+Math.imul(T,V)|0,i=(i=i+Math.imul(T,W)|0)+Math.imul(Q,V)|0,o=o+Math.imul(Q,W)|0,r=r+Math.imul(P,Y)|0,i=(i=i+Math.imul(P,Z)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,Z)|0,r=r+Math.imul(B,$)|0,i=(i=i+Math.imul(B,ee)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,ee)|0,r=r+Math.imul(C,ne)|0,i=(i=i+Math.imul(C,re)|0)+Math.imul(S,ne)|0,o=o+Math.imul(S,re)|0,r=r+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,ae)|0,r=r+Math.imul(b,ue)|0,i=(i=i+Math.imul(b,ce)|0)+Math.imul(w,ue)|0,o=o+Math.imul(w,ce)|0,r=r+Math.imul(m,fe)|0,i=(i=i+Math.imul(m,de)|0)+Math.imul(A,fe)|0,o=o+Math.imul(A,de)|0;var Ce=(c+(r=r+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,ge)|0)+Math.imul(g,pe)|0))<<13)|0;c=((o=o+Math.imul(g,ge)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(j,V),i=(i=Math.imul(j,W))+Math.imul(U,V)|0,o=Math.imul(U,W),r=r+Math.imul(T,Y)|0,i=(i=i+Math.imul(T,Z)|0)+Math.imul(Q,Y)|0,o=o+Math.imul(Q,Z)|0,r=r+Math.imul(P,$)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,ee)|0,r=r+Math.imul(B,ne)|0,i=(i=i+Math.imul(B,re)|0)+Math.imul(O,ne)|0,o=o+Math.imul(O,re)|0,r=r+Math.imul(C,oe)|0,i=(i=i+Math.imul(C,ae)|0)+Math.imul(S,oe)|0,o=o+Math.imul(S,ae)|0,r=r+Math.imul(E,ue)|0,i=(i=i+Math.imul(E,ce)|0)+Math.imul(k,ue)|0,o=o+Math.imul(k,ce)|0,r=r+Math.imul(b,fe)|0,i=(i=i+Math.imul(b,de)|0)+Math.imul(w,fe)|0,o=o+Math.imul(w,de)|0;var Se=(c+(r=r+Math.imul(m,pe)|0)|0)+((8191&(i=(i=i+Math.imul(m,ge)|0)+Math.imul(A,pe)|0))<<13)|0;c=((o=o+Math.imul(A,ge)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(j,Y),i=(i=Math.imul(j,Z))+Math.imul(U,Y)|0,o=Math.imul(U,Z),r=r+Math.imul(T,$)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(Q,$)|0,o=o+Math.imul(Q,ee)|0,r=r+Math.imul(P,ne)|0,i=(i=i+Math.imul(P,re)|0)+Math.imul(R,ne)|0,o=o+Math.imul(R,re)|0,r=r+Math.imul(B,oe)|0,i=(i=i+Math.imul(B,ae)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,ae)|0,r=r+Math.imul(C,ue)|0,i=(i=i+Math.imul(C,ce)|0)+Math.imul(S,ue)|0,o=o+Math.imul(S,ce)|0,r=r+Math.imul(E,fe)|0,i=(i=i+Math.imul(E,de)|0)+Math.imul(k,fe)|0,o=o+Math.imul(k,de)|0;var xe=(c+(r=r+Math.imul(b,pe)|0)|0)+((8191&(i=(i=i+Math.imul(b,ge)|0)+Math.imul(w,pe)|0))<<13)|0;c=((o=o+Math.imul(w,ge)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(j,$),i=(i=Math.imul(j,ee))+Math.imul(U,$)|0,o=Math.imul(U,ee),r=r+Math.imul(T,ne)|0,i=(i=i+Math.imul(T,re)|0)+Math.imul(Q,ne)|0,o=o+Math.imul(Q,re)|0,r=r+Math.imul(P,oe)|0,i=(i=i+Math.imul(P,ae)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,ae)|0,r=r+Math.imul(B,ue)|0,i=(i=i+Math.imul(B,ce)|0)+Math.imul(O,ue)|0,o=o+Math.imul(O,ce)|0,r=r+Math.imul(C,fe)|0,i=(i=i+Math.imul(C,de)|0)+Math.imul(S,fe)|0,o=o+Math.imul(S,de)|0;var Be=(c+(r=r+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,ge)|0)+Math.imul(k,pe)|0))<<13)|0;c=((o=o+Math.imul(k,ge)|0)+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,r=Math.imul(j,ne),i=(i=Math.imul(j,re))+Math.imul(U,ne)|0,o=Math.imul(U,re),r=r+Math.imul(T,oe)|0,i=(i=i+Math.imul(T,ae)|0)+Math.imul(Q,oe)|0,o=o+Math.imul(Q,ae)|0,r=r+Math.imul(P,ue)|0,i=(i=i+Math.imul(P,ce)|0)+Math.imul(R,ue)|0,o=o+Math.imul(R,ce)|0,r=r+Math.imul(B,fe)|0,i=(i=i+Math.imul(B,de)|0)+Math.imul(O,fe)|0,o=o+Math.imul(O,de)|0;var Oe=(c+(r=r+Math.imul(C,pe)|0)|0)+((8191&(i=(i=i+Math.imul(C,ge)|0)+Math.imul(S,pe)|0))<<13)|0;c=((o=o+Math.imul(S,ge)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(j,oe),i=(i=Math.imul(j,ae))+Math.imul(U,oe)|0,o=Math.imul(U,ae),r=r+Math.imul(T,ue)|0,i=(i=i+Math.imul(T,ce)|0)+Math.imul(Q,ue)|0,o=o+Math.imul(Q,ce)|0,r=r+Math.imul(P,fe)|0,i=(i=i+Math.imul(P,de)|0)+Math.imul(R,fe)|0,o=o+Math.imul(R,de)|0;var Me=(c+(r=r+Math.imul(B,pe)|0)|0)+((8191&(i=(i=i+Math.imul(B,ge)|0)+Math.imul(O,pe)|0))<<13)|0;c=((o=o+Math.imul(O,ge)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(j,ue),i=(i=Math.imul(j,ce))+Math.imul(U,ue)|0,o=Math.imul(U,ce),r=r+Math.imul(T,fe)|0,i=(i=i+Math.imul(T,de)|0)+Math.imul(Q,fe)|0,o=o+Math.imul(Q,de)|0;var Pe=(c+(r=r+Math.imul(P,pe)|0)|0)+((8191&(i=(i=i+Math.imul(P,ge)|0)+Math.imul(R,pe)|0))<<13)|0;c=((o=o+Math.imul(R,ge)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(j,fe),i=(i=Math.imul(j,de))+Math.imul(U,fe)|0,o=Math.imul(U,de);var Re=(c+(r=r+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,ge)|0)+Math.imul(Q,pe)|0))<<13)|0;c=((o=o+Math.imul(Q,ge)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ne=(c+(r=Math.imul(j,pe))|0)+((8191&(i=(i=Math.imul(j,ge))+Math.imul(U,pe)|0))<<13)|0;return c=((o=Math.imul(U,ge))+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,u[0]=ve,u[1]=me,u[2]=Ae,u[3]=ye,u[4]=be,u[5]=we,u[6]=_e,u[7]=Ee,u[8]=ke,u[9]=Ie,u[10]=Ce,u[11]=Se,u[12]=xe,u[13]=Be,u[14]=Oe,u[15]=Me,u[16]=Pe,u[17]=Re,u[18]=Ne,0!==c&&(u[19]=c,n.length++),n};function m(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}n.words[o]=s,r=a,a=i}return 0!==r?n.words[o]=r:n.length--,n._strip()}function A(e,t,n){return m(e,t,n)}function y(e,t){this.x=e,this.y=t}Math.imul||(v=g),o.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?v(this,e,t):n<63?g(this,e,t):n<1024?m(this,e,t):A(this,e,t)},y.prototype.makeRBT=function(e){for(var t=new Array(e),n=o.prototype._countBits(e)-1,r=0;r>=1;return r},y.prototype.permute=function(e,t,n,r,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,n[2*a+1]=8191&o,o>>>=13;for(a=2*t;a>=26,n+=o/67108864|0,n+=a>>>26,this.words[i]=67108863&a}return 0!==n&&(this.words[i]=n,this.length++),t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n>>i&1}return t}(e);if(0===t.length)return new o(1);for(var n=this,r=0;r=0);var t,n=e%26,i=(e-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(t=0;t>>26-n}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==l||c>=i);c--){var f=0|this.words[c];this.words[c]=l<<26-o|f>>>o,l=f&s}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(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){r("number"===typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(r("number"===typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(u/67108864|0),this.words[i+n]=67108863&o}for(;i>26,this.words[i+n]=67108863&o;if(0===s)return this._strip();for(r(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),i=e,a=0|i.words[i.length-1];0!==(n=26-this._countBits(a))&&(i=i.ushln(n),r.iushln(n),a=0|i.words[i.length-1]);var s,u=r.length-i.length;if("mod"!==t){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c=0;f--){var d=67108864*(0|r.words[i.length+f])+(0|r.words[i.length+f-1]);for(d=Math.min(d/a|0,67108863),r._ishlnsubmul(i,d,f);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(i,1,f),r.isZero()||(r.negative^=1);s&&(s.words[f]=d)}return s&&s._strip(),r._strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:s||null,mod:r}},o.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),o=n.cmp(r);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=(1<<26)%e,i=0,o=this.length-1;o>=0;o--)i=(n*i+(0|this.words[o]))%e;return t?-i:i},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*n;this.words[i]=o/e|0,n=o%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++c;for(var l=n.clone(),f=t.clone();!t.isZero();){for(var d=0,h=1;0===(t.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(l),a.isub(f)),i.iushrn(1),a.iushrn(1);for(var p=0,g=1;0===(n.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(l),u.isub(f)),s.iushrn(1),u.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(s),a.isub(u)):(n.isub(t),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:n.iushln(c)}},o.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),s=new o(0),u=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,l=1;0===(t.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var f=0,d=1;0===(n.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(n.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(s)):(n.isub(t),s.isub(a))}return(i=0===t.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var o=t;t=n,n=o}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){r("number"===typeof e);var t=e%26,n=(e-t)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){ri&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new C(e)},o.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var b={k256:null,p224:null,p192:null,p25519:null};function w(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function k(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function I(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function C(e){if("string"===typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function S(e){C.call(this,e),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)}w.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},w.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},w.prototype.split=function(e,t){e.iushrn(this.n,0,t)},w.prototype.imulK=function(e){return e.imul(this.k)},i(_,w),_.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},_.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(b[e])return b[e];var t;if("k256"===e)t=new _;else if("p224"===e)t=new E;else if("p192"===e)t=new k;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new I}return b[e]=t,t},C.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},C.prototype._verify2=function(e,t){r(0===(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},C.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(l(e,e.umod(this.m)._forceRed(this)),e)},C.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},C.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},C.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},C.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},C.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},C.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},C.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},C.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},C.prototype.isqr=function(e){return this.imul(e,e.clone())},C.prototype.sqr=function(e){return this.mul(e,e)},C.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2===1),3===t){var n=this.m.add(new o(1)).iushrn(2);return this.pow(e,n)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);r(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,c).cmp(u);)l.redIAdd(u);for(var f=this.pow(l,i),d=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=a;0!==h.cmp(s);){for(var g=h,v=0;0!==g.cmp(s);v++)g=g.redSqr();r(v=0;r--){for(var c=t.words[r],l=u-1;l>=0;l--){var f=c>>l&1;i!==n[0]&&(i=this.sqr(i)),0!==f||0!==a?(a<<=1,a|=f,(4===++s||0===r&&0===l)&&(i=this.mul(i,n[a]),s=0,a=0)):s=0}u=26}return i},C.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},C.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new S(e)},i(S,C),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,n(77)(e))},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"===typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"===typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var u,c=[],l=!1,f=-1;function d(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&h())}function h(){if(!l){var e=s(d);l=!0;for(var t=c.length;t;){for(u=c,c=[];++f1)for(var n=1;n1&&i.forEach((function(n){var i;r[n]=e(((i={})[n]=t[n],i))})),r},p=function(e,t,n,r,i){var o={};return r.slice(0,e.length).forEach((function(r,a){var u,c=e[a],l=t(r,n,i);c?s()(o,((u={})[c]=s()({},o[c],l),u)):s()(o,l)})),o},g=function(e,t,n,r,i){var o={};for(var a in r){var u=e[a],c=t(r[a],n,i);if(u){var f,d=l(u);s()(o,((f={})[d]=s()({},o[d],c),f))}else s()(o,c)}return o},v=function(e){var t=e.properties,n=e.property,r=e.scale,i=e.transform,o=void 0===i?f:i,a=e.defaultScale;t=t||[n];var s=function(e,n,r){var i={},a=o(e,n,r);if(null!==a)return t.forEach((function(e){i[e]=a})),i};return s.scale=r,s.defaults=a,s},m=function(e){void 0===e&&(e={});var t={};return Object.keys(e).forEach((function(n){var r=e[n];t[n]=!0!==r?"function"!==typeof r?v(r):r:v({property:n,scale:n})})),h(t)},A=m({width:{property:"width",scale:"sizes",transform:function(e,t){return d(t,e,!function(e){return"number"===typeof e&&!isNaN(e)}(e)||e>1?e:100*e+"%")}},height:{property:"height",scale:"sizes"},minWidth:{property:"minWidth",scale:"sizes"},minHeight:{property:"minHeight",scale:"sizes"},maxWidth:{property:"maxWidth",scale:"sizes"},maxHeight:{property:"maxHeight",scale:"sizes"},size:{properties:["width","height"],scale:"sizes"},overflow:!0,overflowX:!0,overflowY:!0,display:!0,verticalAlign:!0}),y=A,b={color:{property:"color",scale:"colors"},backgroundColor:{property:"backgroundColor",scale:"colors"},opacity:!0};b.bg=b.backgroundColor;var w=m(b),_=w,E=m({fontFamily:{property:"fontFamily",scale:"fonts"},fontSize:{property:"fontSize",scale:"fontSizes",defaultScale:[12,14,16,20,24,32,48,64,72]},fontWeight:{property:"fontWeight",scale:"fontWeights"},lineHeight:{property:"lineHeight",scale:"lineHeights"},letterSpacing:{property:"letterSpacing",scale:"letterSpacings"},textAlign:!0,fontStyle:!0}),k=E,I=m({alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:!0,flex:!0,flexGrow:!0,flexShrink:!0,flexBasis:!0,justifySelf:!0,alignSelf:!0,order:!0}),C=I,S={space:[0,4,8,16,32,64,128,256,512]},x=m({gridGap:{property:"gridGap",scale:"space",defaultScale:S.space},gridColumnGap:{property:"gridColumnGap",scale:"space",defaultScale:S.space},gridRowGap:{property:"gridRowGap",scale:"space",defaultScale:S.space},gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridAutoRows:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0}),B=x,O={border:{property:"border",scale:"borders"},borderWidth:{property:"borderWidth",scale:"borderWidths"},borderStyle:{property:"borderStyle",scale:"borderStyles"},borderColor:{property:"borderColor",scale:"colors"},borderRadius:{property:"borderRadius",scale:"radii"},borderTop:{property:"borderTop",scale:"borders"},borderTopLeftRadius:{property:"borderTopLeftRadius",scale:"radii"},borderTopRightRadius:{property:"borderTopRightRadius",scale:"radii"},borderRight:{property:"borderRight",scale:"borders"},borderBottom:{property:"borderBottom",scale:"borders"},borderBottomLeftRadius:{property:"borderBottomLeftRadius",scale:"radii"},borderBottomRightRadius:{property:"borderBottomRightRadius",scale:"radii"},borderLeft:{property:"borderLeft",scale:"borders"},borderX:{properties:["borderLeft","borderRight"],scale:"borders"},borderY:{properties:["borderTop","borderBottom"],scale:"borders"},borderTopWidth:{property:"borderTopWidth",scale:"borderWidths"},borderTopColor:{property:"borderTopColor",scale:"colors"},borderTopStyle:{property:"borderTopStyle",scale:"borderStyles"}};O.borderTopLeftRadius={property:"borderTopLeftRadius",scale:"radii"},O.borderTopRightRadius={property:"borderTopRightRadius",scale:"radii"},O.borderBottomWidth={property:"borderBottomWidth",scale:"borderWidths"},O.borderBottomColor={property:"borderBottomColor",scale:"colors"},O.borderBottomStyle={property:"borderBottomStyle",scale:"borderStyles"},O.borderBottomLeftRadius={property:"borderBottomLeftRadius",scale:"radii"},O.borderBottomRightRadius={property:"borderBottomRightRadius",scale:"radii"},O.borderLeftWidth={property:"borderLeftWidth",scale:"borderWidths"},O.borderLeftColor={property:"borderLeftColor",scale:"colors"},O.borderLeftStyle={property:"borderLeftStyle",scale:"borderStyles"},O.borderRightWidth={property:"borderRightWidth",scale:"borderWidths"},O.borderRightColor={property:"borderRightColor",scale:"colors"},O.borderRightStyle={property:"borderRightStyle",scale:"borderStyles"};var M=m(O),P=M,R={background:!0,backgroundImage:!0,backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0};R.bgImage=R.backgroundImage,R.bgSize=R.backgroundSize,R.bgPosition=R.backgroundPosition,R.bgRepeat=R.backgroundRepeat;var N=m(R),T=N,Q={space:[0,4,8,16,32,64,128,256,512]},D=m({position:!0,zIndex:{property:"zIndex",scale:"zIndices"},top:{property:"top",scale:"space",defaultScale:Q.space},right:{property:"right",scale:"space",defaultScale:Q.space},bottom:{property:"bottom",scale:"space",defaultScale:Q.space},left:{property:"left",scale:"space",defaultScale:Q.space}}),j=D,U={space:[0,4,8,16,32,64,128,256,512]},L=function(e){return"number"===typeof e&&!isNaN(e)},F=function(e,t){if(!L(e))return d(t,e,e);var n=e<0,r=Math.abs(e),i=d(t,r,r);return L(i)?i*(n?-1:1):n?"-"+i:i},H={};H.margin={margin:{property:"margin",scale:"space",transform:F,defaultScale:U.space},marginTop:{property:"marginTop",scale:"space",transform:F,defaultScale:U.space},marginRight:{property:"marginRight",scale:"space",transform:F,defaultScale:U.space},marginBottom:{property:"marginBottom",scale:"space",transform:F,defaultScale:U.space},marginLeft:{property:"marginLeft",scale:"space",transform:F,defaultScale:U.space},marginX:{properties:["marginLeft","marginRight"],scale:"space",transform:F,defaultScale:U.space},marginY:{properties:["marginTop","marginBottom"],scale:"space",transform:F,defaultScale:U.space}},H.margin.m=H.margin.margin,H.margin.mt=H.margin.marginTop,H.margin.mr=H.margin.marginRight,H.margin.mb=H.margin.marginBottom,H.margin.ml=H.margin.marginLeft,H.margin.mx=H.margin.marginX,H.margin.my=H.margin.marginY,H.padding={padding:{property:"padding",scale:"space",defaultScale:U.space},paddingTop:{property:"paddingTop",scale:"space",defaultScale:U.space},paddingRight:{property:"paddingRight",scale:"space",defaultScale:U.space},paddingBottom:{property:"paddingBottom",scale:"space",defaultScale:U.space},paddingLeft:{property:"paddingLeft",scale:"space",defaultScale:U.space},paddingX:{properties:["paddingLeft","paddingRight"],scale:"space",defaultScale:U.space},paddingY:{properties:["paddingTop","paddingBottom"],scale:"space",defaultScale:U.space}},H.padding.p=H.padding.padding,H.padding.pt=H.padding.paddingTop,H.padding.pr=H.padding.paddingRight,H.padding.pb=H.padding.paddingBottom,H.padding.pl=H.padding.paddingLeft,H.padding.px=H.padding.paddingX,H.padding.py=H.padding.paddingY;var J=function(){for(var e={},t=arguments.length,n=new Array(t),r=0;r=0)return G(e,t,t);var n=Math.abs(t),r=G(e,n,n);return"string"===typeof r?"-"+r:-1*r},X=["margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","top","bottom","left","right"].reduce((function(e,t){var n;return q({},e,((n={})[t]=Z,n))}),{}),$=function e(t){return function(n){void 0===n&&(n={});var r=q({},V,{},n.theme||n),i={},o=function(e){return function(t){var n={},r=G(t,"breakpoints",z),i=[null].concat(r.map((function(e){return"@media screen and (min-width: "+e+")"})));for(var o in e){var a="function"===typeof e[o]?e[o](t):e[o];if(null!=a)if(Array.isArray(a))for(var s=0;s0&&le(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&le(r.height)/e.offsetHeight||1);var a=(oe(e)?ie(e):window).visualViewport,s=!de()&&n,u=(r.left+(s&&a?a.offsetLeft:0))/i,c=(r.top+(s&&a?a.offsetTop:0))/o,l=r.width/i,f=r.height/o;return{width:l,height:f,top:c,right:u+l,bottom:c+f,left:u,x:u,y:c}}function pe(e){var t=ie(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function ge(e){return e?(e.nodeName||"").toLowerCase():null}function ve(e){return((oe(e)?e.ownerDocument:e.document)||window.document).documentElement}function me(e){return he(ve(e)).left+pe(e).scrollLeft}function Ae(e){return ie(e).getComputedStyle(e)}function ye(e){var t=Ae(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function be(e,t,n){void 0===n&&(n=!1);var r=ae(t),i=ae(t)&&function(e){var t=e.getBoundingClientRect(),n=le(t.width)/e.offsetWidth||1,r=le(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),o=ve(t),a=he(e,i,n),s={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(r||!r&&!n)&&(("body"!==ge(t)||ye(o))&&(s=function(e){return e!==ie(e)&&ae(e)?{scrollLeft:(t=e).scrollLeft,scrollTop:t.scrollTop}:pe(e);var t}(t)),ae(t)?((u=he(t,!0)).x+=t.clientLeft,u.y+=t.clientTop):o&&(u.x=me(o))),{x:a.left+s.scrollLeft-u.x,y:a.top+s.scrollTop-u.y,width:a.width,height:a.height}}function we(e){var t=he(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function _e(e){return"html"===ge(e)?e:e.assignedSlot||e.parentNode||(se(e)?e.host:null)||ve(e)}function Ee(e){return["html","body","#document"].indexOf(ge(e))>=0?e.ownerDocument.body:ae(e)&&ye(e)?e:Ee(_e(e))}function ke(e,t){var n;void 0===t&&(t=[]);var r=Ee(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),o=ie(r),a=i?[o].concat(o.visualViewport||[],ye(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(ke(_e(a)))}function Ie(e){return["table","td","th"].indexOf(ge(e))>=0}function Ce(e){return ae(e)&&"fixed"!==Ae(e).position?e.offsetParent:null}function Se(e){for(var t=ie(e),n=Ce(e);n&&Ie(n)&&"static"===Ae(n).position;)n=Ce(n);return n&&("html"===ge(n)||"body"===ge(n)&&"static"===Ae(n).position)?t:n||function(e){var t=/firefox/i.test(fe());if(/Trident/i.test(fe())&&ae(e)&&"fixed"===Ae(e).position)return null;var n=_e(e);for(se(n)&&(n=n.host);ae(n)&&["html","body"].indexOf(ge(n))<0;){var r=Ae(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var xe="top",Be="bottom",Oe="right",Me="left",Pe="auto",Re=[xe,Be,Oe,Me],Ne="start",Te="end",Qe="viewport",De="popper",je=Re.reduce((function(e,t){return e.concat([t+"-"+Ne,t+"-"+Te])}),[]),Ue=[].concat(Re,[Pe]).reduce((function(e,t){return e.concat([t,t+"-"+Ne,t+"-"+Te])}),[]),Le=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Fe(e){var t=new Map,n=new Set,r=[];function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||i(e)})),r}function He(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=void 0,n(e())}))}))),t}}var Je={placement:"bottom",modifiers:[],strategy:"absolute"};function qe(){for(var e=arguments.length,t=new Array(e),n=0;n=0?"x":"y"}function Ye(e){var t,n=e.reference,r=e.element,i=e.placement,o=i?Ve(i):null,a=i?We(i):null,s=n.x+n.width/2-r.width/2,u=n.y+n.height/2-r.height/2;switch(o){case xe:t={x:s,y:n.y-r.height};break;case Be:t={x:s,y:n.y+n.height};break;case Oe:t={x:n.x+n.width,y:u};break;case Me:t={x:n.x-r.width,y:u};break;default:t={x:n.x,y:n.y}}var c=o?Ke(o):null;if(null!=c){var l="y"===c?"height":"width";switch(a){case Ne:t[c]=t[c]-(n[l]/2-r[l]/2);break;case Te:t[c]=t[c]+(n[l]/2-r[l]/2)}}return t}var Ze={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Xe(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,u=e.gpuAcceleration,c=e.adaptive,l=e.roundOffsets,f=e.isFixed,d=a.x,h=void 0===d?0:d,p=a.y,g=void 0===p?0:p,v="function"===typeof l?l({x:h,y:g}):{x:h,y:g};h=v.x,g=v.y;var m=a.hasOwnProperty("x"),A=a.hasOwnProperty("y"),y=Me,b=xe,w=window;if(c){var _=Se(n),E="clientHeight",k="clientWidth";if(_===ie(n)&&"static"!==Ae(_=ve(n)).position&&"absolute"===s&&(E="scrollHeight",k="scrollWidth"),i===xe||(i===Me||i===Oe)&&o===Te)b=Be,g-=(f&&_===w&&w.visualViewport?w.visualViewport.height:_[E])-r.height,g*=u?1:-1;if(i===Me||(i===xe||i===Be)&&o===Te)y=Oe,h-=(f&&_===w&&w.visualViewport?w.visualViewport.width:_[k])-r.width,h*=u?1:-1}var I,C=Object.assign({position:s},c&&Ze),S=!0===l?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:le(t*r)/r||0,y:le(n*r)/r||0}}({x:h,y:g}):{x:h,y:g};return h=S.x,g=S.y,u?Object.assign({},C,((I={})[b]=A?"0":"",I[y]=m?"0":"",I.transform=(w.devicePixelRatio||1)<=1?"translate("+h+"px, "+g+"px)":"translate3d("+h+"px, "+g+"px, 0)",I)):Object.assign({},C,((t={})[b]=A?g+"px":"",t[y]=m?h+"px":"",t.transform="",t))}var $e={left:"right",right:"left",bottom:"top",top:"bottom"};function et(e){return e.replace(/left|right|bottom|top/g,(function(e){return $e[e]}))}var tt={start:"end",end:"start"};function nt(e){return e.replace(/start|end/g,(function(e){return tt[e]}))}function rt(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&se(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function it(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function ot(e,t,n){return t===Qe?it(function(e,t){var n=ie(e),r=ve(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,u=0;if(i){o=i.width,a=i.height;var c=de();(c||!c&&"fixed"===t)&&(s=i.offsetLeft,u=i.offsetTop)}return{width:o,height:a,x:s+me(e),y:u}}(e,n)):oe(t)?function(e,t){var n=he(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):it(function(e){var t,n=ve(e),r=pe(e),i=null==(t=e.ownerDocument)?void 0:t.body,o=ue(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=ue(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+me(e),u=-r.scrollTop;return"rtl"===Ae(i||n).direction&&(s+=ue(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:u}}(ve(e)))}function at(e,t,n,r){var i="clippingParents"===t?function(e){var t=ke(_e(e)),n=["absolute","fixed"].indexOf(Ae(e).position)>=0&&ae(e)?Se(e):e;return oe(n)?t.filter((function(e){return oe(e)&&rt(e,n)&&"body"!==ge(e)})):[]}(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce((function(t,n){var i=ot(e,n,r);return t.top=ue(i.top,t.top),t.right=ce(i.right,t.right),t.bottom=ce(i.bottom,t.bottom),t.left=ue(i.left,t.left),t}),ot(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function st(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function ut(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function ct(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=void 0===r?e.placement:r,o=n.strategy,a=void 0===o?e.strategy:o,s=n.boundary,u=void 0===s?"clippingParents":s,c=n.rootBoundary,l=void 0===c?Qe:c,f=n.elementContext,d=void 0===f?De:f,h=n.altBoundary,p=void 0!==h&&h,g=n.padding,v=void 0===g?0:g,m=st("number"!==typeof v?v:ut(v,Re)),A=d===De?"reference":De,y=e.rects.popper,b=e.elements[p?A:d],w=at(oe(b)?b:b.contextElement||ve(e.elements.popper),u,l,a),_=he(e.elements.reference),E=Ye({reference:_,element:y,strategy:"absolute",placement:i}),k=it(Object.assign({},y,E)),I=d===De?k:_,C={top:w.top-I.top+m.top,bottom:I.bottom-w.bottom+m.bottom,left:w.left-I.left+m.left,right:I.right-w.right+m.right},S=e.modifiersData.offset;if(d===De&&S){var x=S[i];Object.keys(C).forEach((function(e){var t=[Oe,Be].indexOf(e)>=0?1:-1,n=[xe,Be].indexOf(e)>=0?"y":"x";C[e]+=x[n]*t}))}return C}function lt(e,t,n){return ue(e,ce(t,n))}function ft(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function dt(e){return[xe,Oe,Be,Me].some((function(t){return e[t]>=0}))}var ht=Ge({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=void 0===i||i,a=r.resize,s=void 0===a||a,u=ie(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach((function(e){e.addEventListener("scroll",n.update,ze)})),s&&u.addEventListener("resize",n.update,ze),function(){o&&c.forEach((function(e){e.removeEventListener("scroll",n.update,ze)})),s&&u.removeEventListener("resize",n.update,ze)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=Ye({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=void 0===r||r,o=n.adaptive,a=void 0===o||o,s=n.roundOffsets,u=void 0===s||s,c={placement:Ve(t.placement),variation:We(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Xe(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:u})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Xe(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];ae(i)&&ge(i)&&(Object.assign(i.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],i=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});ae(r)&&ge(r)&&(Object.assign(r.style,o),Object.keys(i).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=void 0===i?[0,0]:i,a=Ue.reduce((function(e,n){return e[n]=function(e,t,n){var r=Ve(e),i=[Me,xe].indexOf(r)>=0?-1:1,o="function"===typeof n?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Me,Oe].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,o),e}),{}),s=a[t.placement],u=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=u,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=void 0===i||i,a=n.altAxis,s=void 0===a||a,u=n.fallbackPlacements,c=n.padding,l=n.boundary,f=n.rootBoundary,d=n.altBoundary,h=n.flipVariations,p=void 0===h||h,g=n.allowedAutoPlacements,v=t.options.placement,m=Ve(v),A=u||(m===v||!p?[et(v)]:function(e){if(Ve(e)===Pe)return[];var t=et(e);return[nt(e),t,nt(t)]}(v)),y=[v].concat(A).reduce((function(e,n){return e.concat(Ve(n)===Pe?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,u=n.allowedAutoPlacements,c=void 0===u?Ue:u,l=We(r),f=l?s?je:je.filter((function(e){return We(e)===l})):Re,d=f.filter((function(e){return c.indexOf(e)>=0}));0===d.length&&(d=f);var h=d.reduce((function(t,n){return t[n]=ct(e,{placement:n,boundary:i,rootBoundary:o,padding:a})[Ve(n)],t}),{});return Object.keys(h).sort((function(e,t){return h[e]-h[t]}))}(t,{placement:n,boundary:l,rootBoundary:f,padding:c,flipVariations:p,allowedAutoPlacements:g}):n)}),[]),b=t.rects.reference,w=t.rects.popper,_=new Map,E=!0,k=y[0],I=0;I=0,O=B?"width":"height",M=ct(t,{placement:C,boundary:l,rootBoundary:f,altBoundary:d,padding:c}),P=B?x?Oe:Me:x?Be:xe;b[O]>w[O]&&(P=et(P));var R=et(P),N=[];if(o&&N.push(M[S]<=0),s&&N.push(M[P]<=0,M[R]<=0),N.every((function(e){return e}))){k=C,E=!1;break}_.set(C,N)}if(E)for(var T=function(e){var t=y.find((function(t){var n=_.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return k=t,"break"},Q=p?3:1;Q>0;Q--){if("break"===T(Q))break}t.placement!==k&&(t.modifiersData[r]._skip=!0,t.placement=k,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=void 0===i||i,a=n.altAxis,s=void 0!==a&&a,u=n.boundary,c=n.rootBoundary,l=n.altBoundary,f=n.padding,d=n.tether,h=void 0===d||d,p=n.tetherOffset,g=void 0===p?0:p,v=ct(t,{boundary:u,rootBoundary:c,padding:f,altBoundary:l}),m=Ve(t.placement),A=We(t.placement),y=!A,b=Ke(m),w="x"===b?"y":"x",_=t.modifiersData.popperOffsets,E=t.rects.reference,k=t.rects.popper,I="function"===typeof g?g(Object.assign({},t.rects,{placement:t.placement})):g,C="number"===typeof I?{mainAxis:I,altAxis:I}:Object.assign({mainAxis:0,altAxis:0},I),S=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,x={x:0,y:0};if(_){if(o){var B,O="y"===b?xe:Me,M="y"===b?Be:Oe,P="y"===b?"height":"width",R=_[b],N=R+v[O],T=R-v[M],Q=h?-k[P]/2:0,D=A===Ne?E[P]:k[P],j=A===Ne?-k[P]:-E[P],U=t.elements.arrow,L=h&&U?we(U):{width:0,height:0},F=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},H=F[O],J=F[M],q=lt(0,E[P],L[P]),G=y?E[P]/2-Q-q-H-C.mainAxis:D-q-H-C.mainAxis,z=y?-E[P]/2+Q+q+J+C.mainAxis:j+q+J+C.mainAxis,V=t.elements.arrow&&Se(t.elements.arrow),W=V?"y"===b?V.clientTop||0:V.clientLeft||0:0,K=null!=(B=null==S?void 0:S[b])?B:0,Y=R+z-K,Z=lt(h?ce(N,R+G-K-W):N,R,h?ue(T,Y):T);_[b]=Z,x[b]=Z-R}if(s){var X,$="x"===b?xe:Me,ee="x"===b?Be:Oe,te=_[w],ne="y"===w?"height":"width",re=te+v[$],ie=te-v[ee],oe=-1!==[xe,Me].indexOf(m),ae=null!=(X=null==S?void 0:S[w])?X:0,se=oe?re:te-E[ne]-k[ne]-ae+C.altAxis,le=oe?te+E[ne]+k[ne]-ae-C.altAxis:ie,fe=h&&oe?function(e,t,n){var r=lt(e,t,n);return r>n?n:r}(se,te,le):lt(h?se:re,te,h?le:ie);_[w]=fe,x[w]=fe-te}t.modifiersData[r]=x}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Ve(n.placement),u=Ke(s),c=[Me,Oe].indexOf(s)>=0?"height":"width";if(o&&a){var l=function(e,t){return st("number"!==typeof(e="function"===typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:ut(e,Re))}(i.padding,n),f=we(o),d="y"===u?xe:Me,h="y"===u?Be:Oe,p=n.rects.reference[c]+n.rects.reference[u]-a[u]-n.rects.popper[c],g=a[u]-n.rects.reference[u],v=Se(o),m=v?"y"===u?v.clientHeight||0:v.clientWidth||0:0,A=p/2-g/2,y=l[d],b=m-f[c]-l[h],w=m/2-f[c]/2+A,_=lt(y,w,b),E=u;n.modifiersData[r]=((t={})[E]=_,t.centerOffset=_-w,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!==typeof r||(r=t.elements.popper.querySelector(r)))&&rt(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=ct(t,{elementContext:"reference"}),s=ct(t,{altBoundary:!0}),u=ft(a,r),c=ft(s,i,o),l=dt(u),f=dt(c);t.modifiersData[n]={referenceClippingOffsets:u,popperEscapeOffsets:c,isReferenceHidden:l,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":f})}}]}),pt=n(535),gt=n.n(pt),vt=function(e){return e.reduce((function(e,t){var n=t[0],r=t[1];return e[n]=r,e}),{})},mt="undefined"!==typeof window&&window.document&&window.document.createElement?r.useLayoutEffect:r.useEffect,At=[],yt=(n(237),n(531)),bt=n.n(yt),wt=n(119),_t=n(57),Et=n(1128),kt=n(1129),It=function(){return It=Object.assign||function(e){for(var t,n=1,r=arguments.length;n button + button,\n & > a + a {\n margin-left: 2px; // To avoid focus shadow overlap\n }\n"],["\n background-color: ",";\n border-radius: 16px;\n display: inline-flex;\n\n & > button + button,\n & > a + a {\n margin-left: 2px; // To avoid focus shadow overlap\n }\n"])),(function(e){var t=e.theme,n=e.variant;return t.colors[n===Zt?"inputOpacity":"inputOpacityAmm"]})),vr=function(e){var t=e.activeIndex,n=void 0===t?0:t,o=e.size,a=void 0===o?Jt:o,s=e.variant,u=void 0===s?qt:s,c=e.onClick,l=e.children;return i.a.createElement(gr,{variant:u},r.Children.map(l,(function(e,t){return Object(r.cloneElement)(e,{isActive:n===t,onClick:c?function(){return c(t)}:void 0,size:a,variant:u})})))},mr=Object(o.e)(on)(fr||(fr=St(["\n background-color: transparent;\n color: ",";\n\n &:hover:not(:disabled):not(:active) {\n background-color: transparent;\n }\n"],["\n background-color: transparent;\n color: ",";\n\n &:hover:not(:disabled):not(:active) {\n background-color: transparent;\n }\n"])),(function(e){var t=e.theme,n=e.colorKey;return t.colors[n]})),Ar=function(e){var t=e.isActive,n=void 0!==t&&t,r=e.size,o=void 0===r?Jt:r,a=e.variant,s=void 0===a?qt:a,u=e.as,c=Ct(e,["isActive","size","variant","as"]);return n?i.a.createElement(on,It({as:u,size:o},c)):i.a.createElement(mr,It({forwardedAs:u,size:o,variant:"tertiary",colorKey:s===qt?"primary":"textSubtle"},c))},yr=(o.e.div(dr||(dr=St(["\n background-color: ",";\n border-radius: 16px;\n display: block;\n\n & > button + button,\n & > a + a {\n margin-left: 2px; // To avoid focus shadow overlap\n }\n"],["\n background-color: ",";\n border-radius: 16px;\n display: block;\n\n & > button + button,\n & > a + a {\n margin-left: 2px; // To avoid focus shadow overlap\n }\n"])),(function(e){var t=e.theme,n=e.variant;return t.colors[n===Zt?"inputOpacity":"transparent"]})),Object(o.e)(on)(hr||(hr=St(["\n background-color: transparent;\n color: ",";\n\n &:hover:not(:disabled):not(:active) {\n background-color: transparent;\n }\n"],["\n background-color: transparent;\n color: ",";\n\n &:hover:not(:disabled):not(:active) {\n background-color: transparent;\n }\n"])),(function(e){var t=e.theme,n=e.colorKey;return t.colors[n]})),o.e.div(pr||(pr=St(["\n background-color: ",";\n border: ",";\n border-radius: 32px;\n box-shadow: ",";\n color: ",";\n overflow: hidden;\n position: relative;\n\n ","\n"],["\n background-color: ",";\n border: ",";\n border-radius: 32px;\n box-shadow: ",";\n color: ",";\n overflow: hidden;\n position: relative;\n\n ","\n"])),(function(e){return e.theme.card.background}),(function(e){return e.theme.card.boxShadow}),(function(e){var t=e.isActive,n=e.isSuccess,r=e.isWarning,i=e.theme;return r?i.card.boxShadowWarning:n?i.card.boxShadowSuccess:t?i.card.boxShadowActive:i.card.boxShadow}),(function(e){var t=e.theme,n=e.isDisabled;return t.colors[n?"textDisabled":"text"]}),J));yr.defaultProps={isActive:!1,isSuccess:!1,isWarning:!1,isDisabled:!1};var br,wr,_r=function(e){var t=e.ribbon,n=e.children,r=Ct(e,["ribbon","children"]);return i.a.createElement(yr,It({},r),t,n)},Er=o.e.div(br||(br=St(["\n ","\n"],["\n ","\n"])),J);Er.defaultProps={p:"24px"},o.e.div(wr||(wr=St(["\n background: ",";\n\n ","\n"],["\n background: ",";\n\n ","\n"])),(function(e){return e.theme.card.cardHeaderBackground}),J).defaultProps={p:"24px"};var kr,Ir=o.e.div(kr||(kr=St(["\n border-top: 1px solid ",";\n ","\n"],["\n border-top: 1px solid ",";\n ","\n"])),(function(e){return e.theme.colors.borderColor}),J);Ir.defaultProps={p:"24px"};o.e.div(Cr||(Cr=St(["\n background-color: ",";\n color: white;\n margin: 0;\n padding: 0;\n padding: 8px 0;\n position: absolute;\n right: 0;\n top: 0;\n text-align: center;\n transform: translateX(30%) translateY(0%) rotate(45deg);\n transform-origin: top left;\n width: 96px;\n\n &:before,\n &:after {\n background-color: ",';\n content: "";\n height: 100%;\n margin: 0 -1px; /* Removes tiny gap */\n position: absolute;\n top: 0;\n width: 100%;\n }\n\n &:before {\n right: 100%;\n }\n\n &:after {\n left: 100%;\n }\n\n & > div {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n width: 96px;\n }\n'],["\n background-color: ",";\n color: white;\n margin: 0;\n padding: 0;\n padding: 8px 0;\n position: absolute;\n right: 0;\n top: 0;\n text-align: center;\n transform: translateX(30%) translateY(0%) rotate(45deg);\n transform-origin: top left;\n width: 96px;\n\n &:before,\n &:after {\n background-color: ",';\n content: "";\n height: 100%;\n margin: 0 -1px; /* Removes tiny gap */\n position: absolute;\n top: 0;\n width: 100%;\n }\n\n &:before {\n right: 100%;\n }\n\n &:after {\n left: 100%;\n }\n\n & > div {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n width: 96px;\n }\n'])),(function(e){var t=e.variantColor,n=void 0===t?"secondary":t;return e.theme.colors[n]}),(function(e){var t=e.variantColor,n=void 0===t?"secondary":t;return e.theme.colors[n]}));var Cr,Sr,xr="sm",Br="md",Or=function(e){return e.scale===xr?"24px":"32px"};o.e.input.attrs({type:"checkbox"})(Sr||(Sr=St(["\n appearance: none;\n overflow: hidden;\n cursor: pointer;\n position: relative;\n display: inline-block;\n height: ",";\n width: ",";\n vertical-align: middle;\n transition: background-color 0.2s ease-in-out;\n border: 0;\n border-radius: 8px;\n background-color: ",";\n box-shadow: ",';\n\n &:after {\n content: "";\n position: absolute;\n border-bottom: 2px solid;\n border-left: 2px solid;\n border-color: transparent;\n top: 30%;\n left: 0;\n right: 0;\n width: 50%;\n height: 25%;\n margin: auto;\n transform: rotate(-50deg);\n transition: border-color 0.2s ease-in-out;\n }\n\n &:hover:not(:disabled):not(:checked) {\n box-shadow: ',";\n }\n\n &:focus {\n outline: none;\n box-shadow: ",";\n }\n\n &:checked {\n background-color: ",";\n &:after {\n border-color: white;\n }\n }\n\n &:disabled {\n cursor: default;\n opacity: 0.6;\n }\n"],["\n appearance: none;\n overflow: hidden;\n cursor: pointer;\n position: relative;\n display: inline-block;\n height: ",";\n width: ",";\n vertical-align: middle;\n transition: background-color 0.2s ease-in-out;\n border: 0;\n border-radius: 8px;\n background-color: ",";\n box-shadow: ",';\n\n &:after {\n content: "";\n position: absolute;\n border-bottom: 2px solid;\n border-left: 2px solid;\n border-color: transparent;\n top: 30%;\n left: 0;\n right: 0;\n width: 50%;\n height: 25%;\n margin: auto;\n transform: rotate(-50deg);\n transition: border-color 0.2s ease-in-out;\n }\n\n &:hover:not(:disabled):not(:checked) {\n box-shadow: ',";\n }\n\n &:focus {\n outline: none;\n box-shadow: ",";\n }\n\n &:checked {\n background-color: ",";\n &:after {\n border-color: white;\n }\n }\n\n &:disabled {\n cursor: default;\n opacity: 0.6;\n }\n"])),Or,Or,(function(e){return e.theme.colors.input}),(function(e){return e.theme.shadows.inset}),(function(e){return e.theme.shadows.focus}),(function(e){return e.theme.shadows.focus}),(function(e){return e.theme.colors.success})).defaultProps={scale:Br};var Mr,Pr,Rr=o.e.div(Mr||(Mr=St(["\n width: max-content;\n display: none;\n flex-direction: column;\n position: absolute;\n transform: translate(-50%, 0);\n left: ",";\n bottom: ",";\n background-color: ",";\n box-shadow: ",";\n padding: 16px;\n max-height: 500px;\n overflow-y: auto;\n z-index: ",";\n border-radius: ",";\n"],["\n width: max-content;\n display: none;\n flex-direction: column;\n position: absolute;\n transform: translate(-50%, 0);\n left: ",";\n bottom: ",";\n background-color: ",";\n box-shadow: ",";\n padding: 16px;\n max-height: 500px;\n overflow-y: auto;\n z-index: ",";\n border-radius: ",";\n"])),(function(e){return"top-right"===e.position?"100%":"50%"}),(function(e){var t=e.position;return"top"===t||"top-right"===t?"100%":"auto"}),(function(e){return e.theme.nav.background}),(function(e){return e.theme.shadows.level1}),(function(e){return e.theme.zIndices.dropdown}),(function(e){return e.theme.radii.small})),Nr=o.e.div(Pr||(Pr=St(["\n position: relative;\n &:hover ",", &:focus-within "," {\n display: flex;\n }\n"],["\n position: relative;\n &:hover ",", &:focus-within "," {\n display: flex;\n }\n"])),Rr,Rr),Tr=function(e){var t=e.target,n=e.position,r=void 0===n?"bottom":n,o=e.children;return i.a.createElement(Nr,null,t,i.a.createElement(Rr,{position:r},o))};Tr.defaultProps={position:"bottom"};var Qr,Dr,jr="md",Ur="lg",Lr="xl",Fr="xxl",Hr=((Qr={})[jr]={fontSize:"20px"},Qr[Ur]={fontSize:"24px"},Qr[Lr]={fontSize:"40px"},Qr[Fr]={fontSize:"64px"},Qr),Jr=Object(o.e)(Lt).attrs({bold:!0})(Dr||(Dr=St(["\n ","\n font-weight:600;\n line-height: 1.1;\n"],["\n ","\n font-weight:600;\n line-height: 1.1;\n"])),(function(e){var t=e.size;return Hr[t||jr]}));Jr.defaultProps={as:"h2"};var qr,Gr,zr,Vr,Wr,Kr,Yr={root:null,rootMargin:"200px",threshold:0},Zr=o.e.div(qr||(qr=St(["\n position: relative;\n background-position: center center;\n background-repeat: no-repeat;\n background-size: cover;\n height: ","px;\n max-width: ","px;\n max-height: ","px;\n width: 100%;\n padding-top: ","%;\n ","\n"],["\n position: relative;\n background-position: center center;\n background-repeat: no-repeat;\n background-size: cover;\n height: ","px;\n max-width: ","px;\n max-height: ","px;\n width: 100%;\n padding-top: ","%;\n ","\n"])),(function(e){var t=e.height;return e.responsive?0:t}),(function(e){return e.width}),(function(e){return e.height}),(function(e){var t=e.width,n=e.height;return e.responsive?n/t*100:0}),J),Xr=o.e.img(Gr||(Gr=St(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n max-width: 100%;\n"],["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n max-width: 100%;\n"]))),$r=o.e.div(zr||(zr=St(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"],["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"]))),ei=function(e){var t=e.src,n=e.alt,o=Ct(e,["src","alt"]),a=Object(r.useRef)(null),s=Object(r.useState)(!1),u=s[0],c=s[1];return Object(r.useEffect)((function(){var e=a.current,t=new IntersectionObserver((function(e){e.forEach((function(e){e.isIntersecting&&(c(!0),t.disconnect())}))}),Yr);return t.observe(e),function(){t.disconnect()}}),[t]),i.a.createElement(Zr,It({ref:a},o),u?i.a.createElement(Xr,{src:t,alt:n}):i.a.createElement($r,null))},ti=o.e.div(Vr||(Vr=St(["\n display: grid;\n grid-template-columns: repeat(6, 1fr);\n grid-gap: 16px;\n "," {\n grid-template-columns: repeat(8, 1fr);\n grid-gap: 24px;\n }\n "," {\n grid-template-columns: repeat(12, 1fr);\n grid-gap: 24px;\n }\n "," {\n grid-template-columns: repeat(12, 1fr);\n grid-gap: 32px;\n }\n"],["\n display: grid;\n grid-template-columns: repeat(6, 1fr);\n grid-gap: 16px;\n "," {\n grid-template-columns: repeat(8, 1fr);\n grid-gap: 24px;\n }\n "," {\n grid-template-columns: repeat(12, 1fr);\n grid-gap: 24px;\n }\n "," {\n grid-template-columns: repeat(12, 1fr);\n grid-gap: 32px;\n }\n"])),(function(e){return e.theme.mediaQueries.sm}),(function(e){return e.theme.mediaQueries.md}),(function(e){return e.theme.mediaQueries.lg})),ni=(Object(o.e)(ti)(Wr||(Wr=St(["\n & > div {\n grid-column: span 6;\n "," {\n grid-column: span 4;\n }\n }\n"],["\n & > div {\n grid-column: span 6;\n "," {\n grid-column: span 4;\n }\n }\n"])),(function(e){return e.theme.mediaQueries.sm})),"sm"),ri="md",ii=function(e){return e.scale===ni?"24px":"32px"},oi=function(e){return e.scale===ni?"12px":"20px"};o.e.input.attrs({type:"radio"})(Kr||(Kr=St(["\n appearance: none;\n overflow: hidden;\n cursor: pointer;\n position: relative;\n display: inline-block;\n height: ",";\n width: ",";\n vertical-align: middle;\n transition: background-color 0.2s ease-in-out;\n border: 0;\n border-radius: 50%;\n background-color: ",";\n box-shadow: ",';\n\n &:after {\n border-radius: 50%;\n content: "";\n height: ',";\n left: 6px;\n position: absolute;\n top: 6px;\n width: ",";\n }\n\n &:hover:not(:disabled):not(:checked) {\n box-shadow: ",";\n }\n\n &:focus {\n outline: none;\n box-shadow: ",";\n }\n\n &:checked {\n background-color: ",";\n &:after {\n background-color: ",";\n }\n }\n\n &:disabled {\n cursor: default;\n opacity: 0.6;\n }\n ","\n"],["\n appearance: none;\n overflow: hidden;\n cursor: pointer;\n position: relative;\n display: inline-block;\n height: ",";\n width: ",";\n vertical-align: middle;\n transition: background-color 0.2s ease-in-out;\n border: 0;\n border-radius: 50%;\n background-color: ",";\n box-shadow: ",';\n\n &:after {\n border-radius: 50%;\n content: "";\n height: ',";\n left: 6px;\n position: absolute;\n top: 6px;\n width: ",";\n }\n\n &:hover:not(:disabled):not(:checked) {\n box-shadow: ",";\n }\n\n &:focus {\n outline: none;\n box-shadow: ",";\n }\n\n &:checked {\n background-color: ",";\n &:after {\n background-color: ",";\n }\n }\n\n &:disabled {\n cursor: default;\n opacity: 0.6;\n }\n ","\n"])),ii,ii,(function(e){return e.theme.colors.input}),(function(e){return e.theme.shadows.inset}),oi,oi,(function(e){return e.theme.shadows.focus}),(function(e){return e.theme.shadows.focus}),(function(e){return e.theme.colors.success}),(function(e){return e.theme.radio.handleBackground}),J).defaultProps={scale:ri,m:0};var ai,si=function(e,t){return Mt("colors.".concat(e),e)(t)},ui=function(e){var t=e.outline,n=e.variant,r=void 0===n?"primary":n,i=e.theme;return t?si(r,i):"#ffffff"},ci=o.e.div(ai||(ai=St(["\n align-items: center;\n background-color: ",";\n border: 2px solid ",";\n border-radius: 16px;\n color: ",";\n display: inline-flex;\n font-size: 14px;\n font-weight: 400;\n height: 28px;\n line-height: 1.5;\n padding: 0 8px;\n white-space: nowrap;\n\n svg {\n fill: ",";\n }\n"],["\n align-items: center;\n background-color: ",";\n border: 2px solid ",";\n border-radius: 16px;\n color: ",";\n display: inline-flex;\n font-size: 14px;\n font-weight: 400;\n height: 28px;\n line-height: 1.5;\n padding: 0 8px;\n white-space: nowrap;\n\n svg {\n fill: ",";\n }\n"])),(function(e){var t=e.outline,n=e.theme,r=e.variant;return t?"transparent":si(void 0===r?"primary":r,n)}),(function(e){var t=e.variant,n=void 0===t?"primary":t,r=e.theme;return si(n,r)}),ui,ui),li=function(e){var t=e.startIcon,n=e.endIcon,r=e.children,o=Ct(e,["startIcon","endIcon","children"]);return i.a.createElement(ci,It({},o),i.a.isValidElement(t)&&i.a.cloneElement(t,{mr:"0.5rem"}),r,i.a.isValidElement(n)&&i.a.cloneElement(n,{ml:"0.5rem"}))};li.defaultProps={variant:"primary",outline:!1};var fi,di,hi;Object(o.e)(Wn)(fi||(fi=St(["\n border-bottom: 2px solid ","; \n overflow: visible;\n\n ::-webkit-scrollbar {\n display: none;\n }\n -ms-overflow-style: none; /* IE and Edge */\n scrollbar-width: none; /* Firefox */\n"],["\n border-bottom: 2px solid ","; \n overflow: visible;\n\n ::-webkit-scrollbar {\n display: none;\n }\n -ms-overflow-style: none; /* IE and Edge */\n scrollbar-width: none; /* Firefox */\n"])),(function(e){return e.theme.colors.textSubtle})),Object(o.e)(Wn)(di||(di=St(["\n justify-content: space-between;\n width: 100%;\n flex-grow: 1;\n\n & > button + button {\n margin-left: 2px;\n }\n\n "," {\n flex-grow: 0;\n }\n"],["\n justify-content: space-between;\n width: 100%;\n flex-grow: 1;\n\n & > button + button {\n margin-left: 2px;\n }\n\n "," {\n flex-grow: 0;\n }\n"])),(function(e){return e.theme.mediaQueries.md}));o.e.button(hi||(hi=St(["\n display: inline-flex;\n justify-content: center;\n cursor: pointer;\n border: 0;\n outline: 0;\n flex-grow: 1;\n padding: ",";\n border-radius: ",";\n font-size: 16px;\n font-weight: 400;\n\n "," {\n flex-grow: 0;\n }\n\n ","\n"],["\n display: inline-flex;\n justify-content: center;\n cursor: pointer;\n border: 0;\n outline: 0;\n flex-grow: 1;\n padding: ",";\n border-radius: ",";\n font-size: 16px;\n font-weight: 400;\n\n "," {\n flex-grow: 0;\n }\n\n ","\n"])),(function(e){return"md"===e.scale?"8px":"16px"}),(function(e){return"md"===e.scale?"4px 4px 0 0":"6px 6px 0 0"}),(function(e){return e.theme.mediaQueries.md}),w).defaultProps={scale:"md"};var pi,gi=Object(o.e)(Lt)(pi||(pi=St(["\n display: flex;\n align-items: center;\n width: fit-content;\n &:hover {\n text-decoration: underline;\n }\n"],["\n display: flex;\n align-items: center;\n width: fit-content;\n &:hover {\n text-decoration: underline;\n }\n"]))),vi=function(e){var t=e.external,n=Ct(e,["external"]),r=t?{target:"_blank",rel:"noreferrer noopener"}:{};return i.a.createElement(gi,It({as:"a",bold:!0},r,n))};vi.defaultProps={color:"primary"};var mi,Ai,yi,bi,wi=function(e){var t=e.children,n=Ct(e,["children"]);return i.a.createElement(vi,It({external:!0},n),t,i.a.createElement(Fn,{color:"primary",ml:"4px"}))},_i={failure:"#951e8a",primary:"#ffffff",primaryBright:"#c7c7e1",primaryDark:"#252f5a",secondary:"#000000",success:"#5455d3",warning:"#FFB237",ultraHeader:"#08afff",ultraFocus:"#08afff",ultraText:"#FFFFFF",ultraTextGreen:"#448646d6",ultraTextBlue:"#408eecd6",ultraBackgroundTransparent:"#27262cad",ultraBackgroundModal:"#27262ce6",cardBorder:"#E7E3EB",transparent:"#ffffff00",white:"#ffffff",highlightText:"#fb0d0d",highlightTextDark:"#e74c4c",textDark:"#000",textProper:"#8a63e7"},Ei={binance:"#F0B90B"},ki=It(It(It({},_i),Ei),{secondary:"#f9baf3",background:"#343135",backgroundAlt:"#FFFFFF",backgroundDisabled:"#CFCFCF1F",contrast:"#FFFFFF",invertedContrast:"#191326",input:"#CFCFCF",inputOpacity:"#CFCFCF1F",inputOpacityAmm:"#8f87d5",primaryDark:"#FFFFFF",primaryLight:"#08afff",primaryDarkAibitrum:"#6869e7",primaryHoverAibitrum:"#5455d3",tertiary:"#FFFFFF",text:"#FFFFFF",textTitleFarm:"#FFFFFF",textSubTitleFarm:"#08afff",textDisabled:"#45464c",textSubtle:"#FFFFFF",borderColor:"#FFFFFF",smallBorderColor:"#45464c",headerTop:"#8f87d5",card:"#27262c",toogle:"#8a63e7",gradients:{bubblegum:"linear-gradient(139.73deg, #313D5C 0%, #3D2A54 100%)"},buttonInactive:"#16120F"}),Ii=It(It(It({},_i),Ei),{secondary:"#2196f3",background:"#343135",backgroundAlt:"#27262c",backgroundDisabled:"#0f172a",contrast:"#FFFFFF",invertedContrast:"#191326",input:"#CFCFCF",primaryDark:"#4b7ca5",tertiary:"#FFFFFF",text:"#51eadd",textDisabled:"#2f9088",textSubtle:"#2196f3",borderColor:"#524B63",smallBorderColor:"#45464c",headerTop:"#8f87d5",card:"#27262c",gradients:{bubblegum:"linear-gradient(139.73deg, #313D5C 0%, #3D2A54 100%)"},buttonInactive:"#16120F",toogle:"#8a63e7",inputOpacity:"#CFCFCF1F",textTitleFarm:"#7573a0",textSubTitleFarm:"#08afff",primaryLight:"#ffa8f8",inputOpacityAmm:"#8f87d5",primaryDarkAibitrum:"#6869e7",primaryHoverAibitrum:"#6869e7"}),Ci={background:ki.card},Si={background:Ii.card},xi=qt,Bi=Gt,Oi=zt,Mi=Vt,Pi=Wt,Ri=Kt,Ni=Yt,Ti=Zt,Qi=Xt,Di=$t,ji=en,Ui=tn,Li=((mi={})[xi]={backgroundArbitrum:ki.primaryDarkAibitrum,background:ki.primaryDark,backgroundActive:ki.primaryDark,backgroundHover:ki.primaryHoverAibitrum,border:0,borderColorHover:"currentColor",boxShadow:"inset 0px -1px 0px rgba(14, 14, 44, 0.4)",boxShadowActive:"inset 0px -1px 0px rgba(14, 14, 44, 0.4)",color:ki.primary},mi[Bi]={backgroundArbitrum:ki.transparent,background:"transparent",backgroundActive:"transparent",backgroundHover:"transparent",border:"2px solid ".concat(ki.primary),borderColorHover:ki.primaryBright,boxShadow:"none",boxShadowActive:"none",color:ki.primary},mi[Oi]={backgroundArbitrum:ki.primaryDarkAibitrum,background:ki.tertiary,backgroundActive:ki.tertiary,backgroundHover:ki.primaryHoverAibitrum,border:0,borderColorHover:"currentColor",boxShadow:"none",boxShadowActive:"none",color:ki.primary},mi[Mi]={backgroundArbitrum:ki.transparent,background:"transparent",backgroundActive:"transparent",backgroundHover:ki.primaryHoverAibitrum,border:0,borderColorHover:"currentColor",boxShadow:"none",boxShadowActive:"none",color:ki.primaryDark},mi[Pi]={backgroundArbitrum:ki.transparent,background:"transparent",backgroundActive:"transparent",backgroundHover:"transparent",border:0,borderColorHover:"currentColor",boxShadow:"none",boxShadowActive:"none",color:ki.primaryDark},mi[Ri]={backgroundArbitrum:ki.transparent,background:"transparent",backgroundActive:"transparent",backgroundHover:ki.primaryLight,border:0,borderColorHover:"currentColor",boxShadow:"none",boxShadowActive:"none",color:ki.primaryDark},mi[Ni]={backgroundArbitrum:ki.failure,background:ki.failure,backgroundActive:"#D43285",backgroundHover:"#FF65B8",border:0,borderColorHover:"currentColor",boxShadow:"none",boxShadowActive:"none",color:"#FFFFFF"},mi[Ti]={backgroundArbitrum:ki.textSubtle,background:ki.textSubtle,backgroundActive:"".concat(ki.textSubtle,"D9"),backgroundHover:"".concat(ki.textSubtle,"B3"),border:0,borderColorHover:"currentColor",boxShadow:"none",boxShadowActive:"none",color:"#FFFFFF"},mi[Qi]={backgroundArbitrum:ki.success,background:ki.success,backgroundActive:"".concat(ki.success,"D9"),backgroundHover:"".concat(ki.success,"B3"),border:0,borderColorHover:"currentColor",boxShadow:"none",boxShadowActive:"none",color:"#FFFFFF"},mi[Di]={backgroundArbitrum:ki.primary,background:ki.primary,backgroundActive:ki.primaryBright,backgroundHover:ki.primary,border:0,borderColorHover:"currentColor",boxShadow:"inset 0px -1px 0px rgba(255, 255, 255, 255)",boxShadowActive:"inset 0px -1px 0px rgba(255, 255, 255, 255)",color:"#87011F"},mi[ji]={backgroundArbitrum:ki.textSubtle,background:ki.textSubtle,backgroundActive:ki.primaryBright,backgroundHover:ki.text,border:0,borderColorHover:"currentColor",boxShadow:"inset 0px -1px 0px rgba(255, 255, 255, 255)",boxShadowActive:"inset 0px -1px 0px rgba(255, 255, 255, 255)",color:"#ffffff"},mi[Ui]={backgroundArbitrum:ki.transparent,background:ki.transparent,backgroundActive:ki.transparent,backgroundHover:ki.transparent,border:0,borderColorHover:ki.transparent,boxShadow:ki.transparent,boxShadowActive:ki.transparent,color:"#FFAD02"},mi),Fi=((Ai={})[xi]=It({},Li.primary),Ai[Bi]=It({},Li.secondary),Ai[Oi]=It(It({},Li.tertiary),{background:Ii.tertiary,backgroundActive:Ii.tertiary,backgroundHover:Ii.tertiary,color:Ii.primary}),Ai[Mi]=It(It({},Li.text),{backgroundHover:Ii.tertiary}),Ai[Ni]=It({},Li.danger),Ai[Ti]=It({},Li.subtle),Ai[Qi]=It({},Li.success),Ai[Di]=It({},Li.primarycronos),Ai[ji]=It({},Li.primarycronosstyle1),Ai[Ui]=It({},Li.primarycronosstyle2),Ai[Pi]=It({},Li.texttotop),Ai[Ri]=It({},Li.texticonamm),Ai),Hi={xs:370,sm:576,md:852,lg:968,xl:1080},Ji={level1:"0px 2px 12px -8px rgba(25, 19, 38, 0.1), 0px 1px 1px rgba(25, 19, 38, 0.05)",active:"0px 0px 0px 1px #ff9800, 0px 0px 4px 8px #96784b",success:"0px 0px 0px 1px #31D0AA, 0px 0px 0px 4px rgba(49, 208, 170, 0.2)",warning:"0px 0px 0px 1px #ED4B9E, 0px 0px 0px 4px rgba(237, 75, 158, 0.2)",focus:"0px 0px 0px 1px #AF042A, 0px 0px 0px 4px #AF042A",inset:"inset 0px 2px 2px -1px rgba(74, 74, 104, 0.1)",tooltip:"0px 0px 2px rgba(0, 0, 0, 0.2), 0px 4px 12px -8px rgba(14, 14, 44, 0.1)"},qi={siteWidth:1200,breakpoints:Object.values(Hi).map((function(e){return"".concat(e,"px")})),mediaQueries:{xs:"@media screen and (min-width: ".concat(Hi.xs,"px)"),sm:"@media screen and (min-width: ".concat(Hi.sm,"px)"),md:"@media screen and (min-width: ".concat(Hi.md,"px)"),lg:"@media screen and (min-width: ".concat(Hi.lg,"px)"),xl:"@media screen and (min-width: ".concat(Hi.xl,"px)"),nav:"@media screen and (min-width: ".concat(Hi.lg,"px)")},spacing:[0,4,8,16,24,32,48,64],shadows:Ji,radii:{small:"4px",default:"16px",card:"32px",circle:"50%"},zIndices:{dropdown:10,modal:100}},Gi={background:ki.card,boxShadow:"0px 2px 12px -8px rgba(25, 19, 38, 0.1), 0px 1px 1px rgba(25, 19, 38, 0.05)",boxShadowActive:Ji.active,boxShadowSuccess:Ji.success,boxShadowWarning:Ji.warning,cardHeaderBackground:"linear-gradient(111.68deg, #F2ECF2 0%, #E8F2F6 100%)"},zi={background:Ii.card,boxShadow:"0px 2px 12px -8px rgba(25, 19, 38, 0.1), 0px 1px 1px rgba(25, 19, 38, 0.05)",boxShadowActive:Ji.active,boxShadowSuccess:Ji.success,boxShadowWarning:Ji.warning,cardHeaderBackground:"linear-gradient(166.77deg, #3B4155 0%, #3A3045 100%)"},Vi={handleBackground:ki.card},Wi={handleBackground:Ii.card},Ki={handleBackground:ki.toogle},Yi={handleBackground:Ii.toogle},Zi={background:ki.headerTop,hover:"#EEEAF4"},Xi={background:Ii.headerTop,hover:"#473d5d"},$i={background:ki.ultraBackgroundModal},eo={background:Ii.card},to={background:Ii.backgroundAlt,text:Ii.text,boxShadow:Ji.tooltip},no={background:ki.backgroundAlt,text:ki.text,boxShadow:Ji.tooltip},ro=It(It({},qi),{isDark:!0,alert:Si,button:Fi,colors:Ii,card:zi,toggle:Yi,nav:Xi,modal:eo,radio:Wi,tooltip:no}),io=It(It({},qi),{isDark:!1,alert:Ci,button:Li,colors:ki,card:Gi,toggle:Ki,nav:Zi,modal:$i,radio:Vi,tooltip:to}),oo="round",ao="flat",so="md",uo="sm",co=((yi={})[oo]={borderRadius:"32px"},yi[ao]={borderRadius:0},yi),lo=((bi={})[so]={height:"16px"},bi[uo]={height:"8px"},bi),fo=o.e.div(ho||(ho=St(["\n position: absolute;\n top: 0;\n left: 0;\n background: ",";\n height: 100%;\n transition: width 200ms ease;\n"],["\n position: absolute;\n top: 0;\n left: 0;\n background: ",";\n height: 100%;\n transition: width 200ms ease;\n"])),(function(e){var t=e.theme,n=e.$useDark,r=e.primary,i=e.$background;return i||(n?r?t.colors.secondary:"".concat(t.colors.secondary,"80"):r?ki.secondary:"".concat(ki.secondary,"80"))}));fo.defaultProps={primary:!1};o.e.div(po||(po=St(["\n position: relative;\n background-color: ",";\n box-shadow: ",";\n overflow: hidden;\n\n "," {\n border-top-left-radius: ",";\n border-bottom-left-radius: ",";\n }\n\n ","\n ","\n ","\n"],["\n position: relative;\n background-color: ",";\n box-shadow: ",";\n overflow: hidden;\n\n "," {\n border-top-left-radius: ",";\n border-bottom-left-radius: ",";\n }\n\n ","\n ","\n ","\n"])),(function(e){var t=e.theme;return e.$useDark?t.colors.input:ki.input}),(function(e){return e.theme.shadows.inset}),fo,(function(e){return e.variant===ao?"0":"32px"}),(function(e){return e.variant===ao?"0":"32px"}),ee({variants:co}),ee({prop:"scale",variants:lo}),J),o.e.div(go||(go=St(["\n display: flex;\n z-index: 2;\n top: -65%;\n position: absolute;\n transform: translate(-50%, -50%);\n transition: left 200ms ease-out;\n"],["\n display: flex;\n z-index: 2;\n top: -65%;\n position: absolute;\n transform: translate(-50%, -50%);\n transition: left 200ms ease-out;\n"])));var ho,po,go,vo,mo,Ao,yo,bo,wo,_o,Eo,ko,Io,Co,So,xo,Bo,Oo,Mo,Po,Ro,No,To,Qo,Do,jo,Uo,Lo,Fo,Ho,Jo,qo,Go,zo,Vo=Object(o.f)(vo||(vo=St(["\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n"],["\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n"]))),Wo=o.e.div(mo||(mo=St(["\n position: relative;\n"],["\n position: relative;\n"]))),Ko=Object(o.e)((function(e){return i.a.createElement(Nt,It({viewBox:"0 0 96 96"},e),i.a.createElement("image",{width:"96",height:"96",href:"/images/egg/9.png"}))}))(Ao||(Ao=St(["\n position: absolute;\n top: 0;\n left: 0;\n animation: "," 2s linear infinite;\n transform: translate3d(0, 0, 0);\n"],["\n position: absolute;\n top: 0;\n left: 0;\n animation: "," 2s linear infinite;\n transform: translate3d(0, 0, 0);\n"])),Vo),Yo=function(e){var t=e.size,n=void 0===t?128:t;return i.a.createElement(Wo,null,i.a.createElement(Ko,{width:"".concat(.5*n,"px")}))},Zo="waves",Xo="pulse",$o="rect",ea="circle",ta=Object(o.f)(yo||(yo=St(["\n from {\n left: -150px;\n }\n to {\n left: 100%;\n }\n"],["\n from {\n left: -150px;\n }\n to {\n left: 100%;\n }\n"]))),na=Object(o.f)(bo||(bo=St(["\n 0% {\n opacity: 1;\n }\n 50% {\n opacity: 0.4;\n }\n 100% {\n opacity: 1;\n }\n"],["\n 0% {\n opacity: 1;\n }\n 50% {\n opacity: 0.4;\n }\n 100% {\n opacity: 1;\n }\n"]))),ra=o.e.div(wo||(wo=St(["\n min-height: 20px;\n display: block;\n background-color: ",";\n border-radius: ",";\n\n ","\n ","\n"],["\n min-height: 20px;\n display: block;\n background-color: ",";\n border-radius: ",";\n\n ","\n ","\n"])),(function(e){return e.theme.colors.backgroundDisabled}),(function(e){var t=e.variant,n=e.theme;return t===ea?n.radii.circle:n.radii.small}),A,J),ia=Object(o.e)(ra)(_o||(_o=St(["\n animation: "," 2s infinite ease-out;\n transform: translate3d(0, 0, 0);\n"],["\n animation: "," 2s infinite ease-out;\n transform: translate3d(0, 0, 0);\n"])),na),oa=Object(o.e)(ra)(Eo||(Eo=St(['\n position: relative;\n overflow: hidden;\n transform: translate3d(0, 0, 0);\n &:before {\n content: "";\n position: absolute;\n background-image: linear-gradient(90deg, transparent, rgba(243, 243, 243, 0.5), transparent);\n top: 0;\n left: -150px;\n height: 100%;\n width: 150px;\n animation: '," 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n }\n"],['\n position: relative;\n overflow: hidden;\n transform: translate3d(0, 0, 0);\n &:before {\n content: "";\n position: absolute;\n background-image: linear-gradient(90deg, transparent, rgba(243, 243, 243, 0.5), transparent);\n top: 0;\n left: -150px;\n height: 100%;\n width: 150px;\n animation: '," 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;\n }\n"])),ta),aa=function(e){var t=e.variant,n=void 0===t?$o:t,r=e.animation,o=void 0===r?Xo:r,a=Ct(e,["variant","animation"]);return o===Zo?i.a.createElement(oa,It({variant:n},a)):i.a.createElement(ia,It({variant:n},a))},sa=o.e.div(ko||(ko=St(["\n background-color: ",";\n border-radius: 50%;\n cursor: pointer;\n height: 32px;\n left: 4px;\n position: absolute;\n top: 4px;\n transition: left 200ms ease-in;\n width: 32px;\n z-index: 1;\n"],["\n background-color: ",";\n border-radius: 50%;\n cursor: pointer;\n height: 32px;\n left: 4px;\n position: absolute;\n top: 4px;\n transition: left 200ms ease-in;\n width: 32px;\n z-index: 1;\n"])),(function(e){return e.theme.toggle.handleBackground})),ua=o.e.input(Io||(Io=St(["\n cursor: pointer;\n opacity: 0;\n height: 100%;\n position: absolute;\n width: 100%;\n z-index: 3;\n\n &:checked + "," {\n left: calc(100% - 36px);\n }\n\n &:focus + "," {\n box-shadow: ",";\n }\n\n &:hover + ",":not(:disabled):not(:checked) {\n box-shadow: ",";\n }\n"],["\n cursor: pointer;\n opacity: 0;\n height: 100%;\n position: absolute;\n width: 100%;\n z-index: 3;\n\n &:checked + "," {\n left: calc(100% - 36px);\n }\n\n &:focus + "," {\n box-shadow: ",";\n }\n\n &:hover + ",":not(:disabled):not(:checked) {\n box-shadow: ",";\n }\n"])),sa,sa,(function(e){return e.theme.shadows.focus}),sa,(function(e){return e.theme.shadows.focus})),ca=o.e.div(Co||(Co=St(["\n align-items: center;\n background-color: ",";\n border-radius: 24px;\n box-shadow: ",";\n cursor: pointer;\n display: inline-flex;\n height: 40px;\n position: relative;\n transition: background-color 200ms;\n width: 72px;\n"],["\n align-items: center;\n background-color: ",";\n border-radius: 24px;\n box-shadow: ",";\n cursor: pointer;\n display: inline-flex;\n height: 40px;\n position: relative;\n transition: background-color 200ms;\n width: 72px;\n"])),(function(e){var t=e.theme;e.checked;return t.colors.inputOpacity}),(function(e){return e.theme.shadows.inset})),la=function(e){var t=e.checked,n=Ct(e,["checked"]),r=!!t;return i.a.createElement(ca,{checked:r},i.a.createElement(ua,It({checked:t},n,{type:"checkbox"})),i.a.createElement(sa,null))},fa=(o.e.div(So||(So=St(["\n display: flex;\n flex-direction: column;\n width: fit-content;\n"],["\n display: flex;\n flex-direction: column;\n width: fit-content;\n"]))),Object(o.e)(Wn)(xo||(xo=St(["\n "," {\n justify-content: center;\n }\n"],["\n "," {\n justify-content: center;\n }\n"])),(function(e){return e.theme.mediaQueries.md})),o.e.div(Bo||(Bo=St(["\n position: absolute;\n width: 4px;\n height: calc(50% + 20px);\n ","\n left: calc(50% - 2px);\n background-color: ",";\n"],["\n position: absolute;\n width: 4px;\n height: calc(50% + 20px);\n ","\n left: calc(50% - 2px);\n background-color: ",";\n"])),(function(e){var t=e.$isFirstStep,n=e.$isLastStep,r=e.$isFirstPart;return t?"top: 50%;":n?"top: 0;":r?"top:0;":"top:50%;"}),(function(e){var t=e.theme,n=e.status;return t.colors["past"===n||"current"===n?"success":"textDisabled"]})),Object(o.e)(Vn)(Oo||(Oo=St(["\n "," {\n visibility: ",";\n }\n"],["\n "," {\n visibility: ",";\n }\n"])),(function(e){return e.theme.mediaQueries.md}),(function(e){return e.isVisible?"visible":"hidden"}))),da=(Object(o.e)(fa)(Mo||(Mo=St(["\n display: none;\n "," {\n display: block;\n margin-right: 16px;\n }\n"],["\n display: none;\n "," {\n display: block;\n margin-right: 16px;\n }\n"])),(function(e){return e.theme.mediaQueries.md})),Object(o.e)(fa)(Po||(Po=St(["\n margin-left: 8px;\n "," {\n margin-left: 16px;\n }\n"],["\n margin-left: 8px;\n "," {\n margin-left: 16px;\n }\n"])),(function(e){return e.theme.mediaQueries.md})),o.e.div(Ro||(Ro=St(["\n position: relative;\n display: flex;\n align-items: center;\n"],["\n position: relative;\n display: flex;\n align-items: center;\n"]))),o.e.div(No||(No=St(["\n box-shadow: 0px 1px 4px rgba(25, 19, 38, 0.15);\n background-color: ",";\n border: 2px solid ",";\n border-radius: ",";\n color: ",";\n display: flex;\n justify-content: center;\n align-items: center;\n font-weight: 600;\n font-size: 32px;\n width: 48px;\n height: 48px;\n z-index: 5;\n "," {\n font-size: 40px;\n width: 80px;\n height: 80px;\n }\n"],["\n box-shadow: 0px 1px 4px rgba(25, 19, 38, 0.15);\n background-color: ",";\n border: 2px solid ",";\n border-radius: ",";\n color: ",";\n display: flex;\n justify-content: center;\n align-items: center;\n font-weight: 600;\n font-size: 32px;\n width: 48px;\n height: 48px;\n z-index: 5;\n "," {\n font-size: 40px;\n width: 80px;\n height: 80px;\n }\n"])),(function(e){var t=e.theme,n=e.status;return t.colors["current"===n?"secondary":"invertedContrast"]}),(function(e){var t=e.theme;return"past"===e.status?t.colors.success:"transparent"}),(function(e){return e.theme.radii.circle}),(function(e){var t=e.theme,n=e.status;return"past"===n?t.colors.success:"current"===n?t.colors.invertedContrast:t.colors.primaryBright}),(function(e){return e.theme.mediaQueries.md})),o.e.div(To||(To=St(['\n &,\n &::before {\n position: absolute;\n width: 10px;\n height: 10px;\n border-radius: 2px;\n z-index: -1;\n }\n\n &::before {\n content: "";\n transform: rotate(45deg);\n background: ',";\n }\n"],['\n &,\n &::before {\n position: absolute;\n width: 10px;\n height: 10px;\n border-radius: 2px;\n z-index: -1;\n }\n\n &::before {\n content: "";\n transform: rotate(45deg);\n background: ',";\n }\n"])),(function(e){return e.theme.tooltip.background}))),ha=o.e.div(Qo||(Qo=St(["\n padding: 16px;\n font-size: 16px;\n line-height: 130%;\n border-radius: 16px;\n max-width: 320px;\n z-index: 101;\n background: ",";\n color: ",";\n box-shadow: ",';\n\n &[data-popper-placement^="top"] > ',' {\n bottom: -4px;\n }\n\n &[data-popper-placement^="bottom"] > ',' {\n top: -4px;\n }\n\n &[data-popper-placement^="left"] > ',' {\n right: -4px;\n }\n\n &[data-popper-placement^="right"] > '," {\n left: -4px;\n }\n"],["\n padding: 16px;\n font-size: 16px;\n line-height: 130%;\n border-radius: 16px;\n max-width: 320px;\n z-index: 101;\n background: ",";\n color: ",";\n box-shadow: ",';\n\n &[data-popper-placement^="top"] > ',' {\n bottom: -4px;\n }\n\n &[data-popper-placement^="bottom"] > ',' {\n top: -4px;\n }\n\n &[data-popper-placement^="left"] > ',' {\n right: -4px;\n }\n\n &[data-popper-placement^="right"] > '," {\n left: -4px;\n }\n"])),(function(e){return e.theme.tooltip.background}),(function(e){return e.theme.tooltip.text}),(function(e){return e.theme.tooltip.boxShadow}),da,da,da,da),pa=function(e){return e.isDark?io:ro},ga=document.getElementById("portal-root"),va=function(e,t){var n=t.placement,a=void 0===n?"auto":n,s=t.trigger,u=void 0===s?"hover":s,c=t.arrowPadding,l=void 0===c?16:c,f=t.tooltipPadding,d=void 0===f?{left:16,right:16}:f,h=t.tooltipOffset,p=void 0===h?[0,10]:h,g=Object(r.useState)(null),v=g[0],m=g[1],A=Object(r.useState)(null),y=A[0],b=A[1],w=Object(r.useState)(null),_=w[0],E=w[1],k=Object(r.useState)(!1),I=k[0],C=k[1],S=Object(r.useRef)(!1),x=Object(r.useRef)(),B=Object(r.useCallback)((function(e){var t=function(){e.stopPropagation(),e.preventDefault(),C(!1)};"hover"===u?(x.current&&window.clearTimeout(x.current),e.target===y&&(S.current=!1),S.current||(x.current=window.setTimeout((function(){S.current||t()}),100))):t()}),[y,u]),O=Object(r.useCallback)((function(e){e.stopPropagation(),e.preventDefault(),C(!0),"hover"===u&&(e.target===v&&clearTimeout(x.current),e.target===y&&(S.current=!0))}),[y,v,u]),M=Object(r.useCallback)((function(e){e.stopPropagation(),C(!I)}),[I]);Object(r.useEffect)((function(){if(null!==v&&"hover"===u)return"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0?(v.addEventListener("touchstart",O),v.addEventListener("touchend",B)):(v.addEventListener("mouseenter",O),v.addEventListener("mouseleave",B)),function(){v.removeEventListener("touchstart",O),v.removeEventListener("touchend",B),v.removeEventListener("mouseenter",O),v.removeEventListener("mouseleave",O)}}),[u,v,B,O]),Object(r.useEffect)((function(){if(null!==y&&"hover"===u)return y.addEventListener("mouseenter",O),y.addEventListener("mouseleave",B),function(){y.removeEventListener("mouseenter",O),y.removeEventListener("mouseleave",B)}}),[u,y,B,O]),Object(r.useEffect)((function(){if(null!==v&&"click"===u)return v.addEventListener("click",M),function(){return v.removeEventListener("click",M)}}),[u,v,I,M]),Object(r.useEffect)((function(){if("click"===u){var e=function(e){var t=e.target;t instanceof Node&&(null==y||null==v||y.contains(t)||v.contains(t)||C(!1))};return document.addEventListener("mousedown",e),function(){return document.removeEventListener("mousedown",e)}}}),[u,v,y]),Object(r.useEffect)((function(){if(null!==v&&"focus"===u)return v.addEventListener("focus",O),v.addEventListener("blur",B),function(){v.removeEventListener("focus",O),v.removeEventListener("blur",B)}}),[u,v,O,B]);var P=function(e,t,n){void 0===n&&(n={});var i=r.useRef(null),o={onFirstUpdate:n.onFirstUpdate,placement:n.placement||"bottom",strategy:n.strategy||"absolute",modifiers:n.modifiers||At},a=r.useState({styles:{popper:{position:o.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),s=a[0],u=a[1],c=r.useMemo((function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(e){var t=e.state,n=Object.keys(t.elements);re.flushSync((function(){u({styles:vt(n.map((function(e){return[e,t.styles[e]||{}]}))),attributes:vt(n.map((function(e){return[e,t.attributes[e]]})))})}))},requires:["computeStyles"]}}),[]),l=r.useMemo((function(){var e={onFirstUpdate:o.onFirstUpdate,placement:o.placement,strategy:o.strategy,modifiers:[].concat(o.modifiers,[c,{name:"applyStyles",enabled:!1}])};return gt()(i.current,e)?i.current||e:(i.current=e,e)}),[o.onFirstUpdate,o.placement,o.strategy,o.modifiers,c]),f=r.useRef();return mt((function(){f.current&&f.current.setOptions(l)}),[l]),mt((function(){if(null!=e&&null!=t){var r=(n.createPopper||ht)(e,t,l);return f.current=r,function(){r.destroy(),f.current=null}}}),[e,t,n.createPopper]),{state:f.current?f.current.state:null,styles:s.styles,attributes:s.attributes,update:f.current?f.current.update:null,forceUpdate:f.current?f.current.forceUpdate:null}}(v,y,{placement:a,modifiers:[{name:"arrow",options:{element:_,padding:l}},{name:"offset",options:{offset:p}},{name:"preventOverflow",options:{padding:d}}]}),R=P.styles,N=P.attributes,T=i.a.createElement(ha,It({ref:b,style:R.popper},N.popper),i.a.createElement(o.b,{theme:pa},e),i.a.createElement(da,{ref:E,style:R.arrow})),Q=ga?Object(re.createPortal)(T,ga):null;return{targetRef:m,tooltip:null!==Q&&void 0!==Q?Q:T,tooltipVisible:I}},ma=(o.e.ul(Do||(Do=St(["\n display: flex;\n flex-direction: column;\n list-style: none;\n"],["\n display: flex;\n flex-direction: column;\n list-style: none;\n"]))),o.e.li(jo||(jo=St(['\n display: flex;\n position: relative;\n margin-bottom: 14px;\n\n &:after {\n content: "";\n position: absolute;\n left: 9px;\n top: 26px;\n width: 2px;\n height: 10px;\n background-color: ',";\n }\n\n &:last-child:after {\n display: none;\n }\n"],['\n display: flex;\n position: relative;\n margin-bottom: 14px;\n\n &:after {\n content: "";\n position: absolute;\n left: 9px;\n top: 26px;\n width: 2px;\n height: 10px;\n background-color: ',";\n }\n\n &:last-child:after {\n display: none;\n }\n"])),(function(e){var t=e.theme;return e.$useDark?t.colors.textSubtle:ki.textSubtle})),o.e.div(Uo||(Uo=St(["\n position: relative;\n\n ",";\n"],["\n position: relative;\n\n ",";\n"])),(function(e){var t=e.$isActive,n=e.$variant,r=e.theme;return t&&"subMenu"===n&&'\n &:after{\n content: "";\n position: absolute;\n bottom: 0;\n height: 4px;\n width: 100%;\n background-color: '.concat(r.colors.primary,";\n border-radius: 2px 2px 0 0;\n }\n ")})),o.e.a(Lo||(Lo=St(["\n position: relative;\n display: flex;\n align-items: center;\n\n color: ",";\n font-size: 16px;\n font-weight: ",";\n\n ","\n\n ","\n\n &:hover {\n background: ",";\n ",";\n }\n"],["\n position: relative;\n display: flex;\n align-items: center;\n\n color: ",";\n font-size: 16px;\n font-weight: ",";\n\n ","\n\n ","\n\n &:hover {\n background: ",";\n ",";\n }\n"])),(function(e){var t=e.theme;return e.$isActive?t.colors.secondary:t.colors.textSubtle}),(function(e){return e.$isActive?"600":"400"}),(function(e){var t=e.$statusColor,n=e.theme;return t&&'\n &:after {\n content: "";\n border-radius: 100%;\n background: '.concat(n.colors[t],";\n height: 8px;\n width: 8px;\n margin-left: 12px;\n }\n ")}),(function(e){return"default"===e.$variant?"\n padding: 0 16px;\n height: 48px;\n ":"\n padding: 4px 4px 0px 4px;\n height: 42px;\n "}),(function(e){return e.theme.colors.tertiary}),(function(e){return"default"===e.$variant&&"border-radius: 16px;"})),Object(o.e)(Wn)(Fo||(Fo=St(["\n "," {\n ",";\n }\n flex-grow: 1;\n background-color: ",";\n box-shadow: inset 0px -2px 0px -8px rgba(133, 133, 133, 0.1);\n overflow-x: scroll;\n scrollbar-width: none;\n -ms-overflow-style: none;\n &::-webkit-scrollbar {\n display: none;\n }\n"],["\n "," {\n ",";\n }\n flex-grow: 1;\n background-color: ",";\n box-shadow: inset 0px -2px 0px -8px rgba(133, 133, 133, 0.1);\n overflow-x: scroll;\n scrollbar-width: none;\n -ms-overflow-style: none;\n &::-webkit-scrollbar {\n display: none;\n }\n"])),(function(e){return e.theme.mediaQueries.sm}),(function(e){return e.$isMobileOnly?"display:none":""}),(function(e){var t=e.theme;return"".concat(t.colors.background)})),{warning:{background:"#FFB23719",borderColor:"warning"},danger:{background:"#ED4B9E19",borderColor:"failure"},success:{background:"rgba(49, 208, 170, 0.1)",borderColor:"success"}}),Aa=(i.a.createContext({variant:"success"}),o.e.div(Ho||(Ho=St(["\n display: flex;\n background-color: gray;\n padding: 16px;\n border-radius: 16px;\n border: solid 1px;\n\n ","\n ","\n"],["\n display: flex;\n background-color: gray;\n padding: 16px;\n border-radius: 16px;\n border: solid 1px;\n\n ","\n ","\n"])),J,ee({variants:ma})),function(){var e=0;return Object.keys(Hi).reduce((function(t,n,r){var i,o;if(r===Object.keys(Hi).length-1)return It(It({},t),((i={})[n]="(min-width: ".concat(e,"px)"),i));var a=e,s=Hi[n];return e=s+1,It(It({},t),((o={})[n]="(min-width: ".concat(a,"px) and (max-width: ").concat(s,"px)"),o))}),{})}()),ya=function(e){return"is".concat(e.charAt(0).toUpperCase()).concat(e.slice(1))},ba=o.e.div(Jo||(Jo=St([" \n background: radial-gradient(100% 100% at 0 50%,#121250 0,rgb(15 15 54 / 0%) 100%),radial-gradient(75% 125% at 100% 100%,#0e105ce8 0,rgba(213,0,248,0) 100%),radial-gradient(50% 130% at 65% 0,#12557d 0,rgba(0,178,255,0) 100%),#0b0b1f;\n box-shadow: 0px 20px 36px -8px rgba(14, 14, 44, 0.1), 0px 1px 1px rgba(0, 0, 0, 0.05);\n border-radius: 22px;\n width: 100%;\n z-index: ",";\n overflow-y: auto;\n "," {\n width: auto; \n min-width: 360px;\n max-width: 98%;\n }\n"],[" \n background: radial-gradient(100% 100% at 0 50%,#121250 0,rgb(15 15 54 / 0%) 100%),radial-gradient(75% 125% at 100% 100%,#0e105ce8 0,rgba(213,0,248,0) 100%),radial-gradient(50% 130% at 65% 0,#12557d 0,rgba(0,178,255,0) 100%),#0b0b1f;\n box-shadow: 0px 20px 36px -8px rgba(14, 14, 44, 0.1), 0px 1px 1px rgba(0, 0, 0, 0.05);\n border-radius: 22px;\n width: 100%;\n z-index: ",";\n overflow-y: auto;\n "," {\n width: auto; \n min-width: 360px;\n max-width: 98%;\n }\n"])),(function(e){return e.theme.zIndices.modal}),(function(e){return e.theme.mediaQueries.xs})),wa=o.e.div(qo||(qo=St(["\n background: radial-gradient(100% 100% at 0 50%,#1b1b47 0,rgba(94,95,255,0) 100%),radial-gradient(75% 125% at 100% 100%,#620876 0,rgba(213,0,248,0) 100%),radial-gradient(50% 130% at 65% 0,#12557d 0,rgba(0,178,255,0) 100%),#0b0b1f;\n box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);\n display: flex;\n align-items: center;\n border-bottom: 0px solid #e9eaeb;\n align-items: center;\n padding: 12px 24px;\n"],["\n background: radial-gradient(100% 100% at 0 50%,#1b1b47 0,rgba(94,95,255,0) 100%),radial-gradient(75% 125% at 100% 100%,#620876 0,rgba(213,0,248,0) 100%),radial-gradient(50% 130% at 65% 0,#12557d 0,rgba(0,178,255,0) 100%),#0b0b1f;\n box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);\n display: flex;\n align-items: center;\n border-bottom: 0px solid #e9eaeb;\n align-items: center;\n padding: 12px 24px;\n"]))),_a=Object(o.e)(Wn)(Go||(Go=St(["\n align-items: center;\n flex: 1;\n"],["\n align-items: center;\n flex: 1;\n"]))),Ea=function(e){var t=e.title,n=e.onDismiss,r=e.onBack,o=e.children,a=e.hideCloseButton,s=void 0!==a&&a,u=e.bodyPadding,c=void 0===u?"24px":u;return i.a.createElement(ba,null,i.a.createElement(wa,null,i.a.createElement(_a,null,r&&i.a.createElement(gn,{variant:"text",onClick:r,"area-label":"go back",mr:"8px"},i.a.createElement(mn,{color:"primary"})),i.a.createElement(Jr,null,t)),!s&&i.a.createElement(gn,{variant:"text",onClick:n,"aria-label":"Close the dialog"},i.a.createElement(Nn,{color:"primaryHoverAibitrum"}))),i.a.createElement(Wn,{flexDirection:"column",p:c},o))},ka=o.e.div.attrs({role:"presentation"})(zo||(zo=St(["\n position: fixed;\n top: 0px;\n left: 0px;\n width: 100%;\n height: 100%;\n background-color: #000;\n transition: opacity 0.4s;\n opacity: ",";\n z-index: ",";\n pointer-events: ",";\n"],["\n position: fixed;\n top: 0px;\n left: 0px;\n width: 100%;\n height: 100%;\n background-color: #000;\n transition: opacity 0.4s;\n opacity: ",";\n z-index: ",";\n pointer-events: ",";\n"])),(function(e){return e.show?.7:0}),(function(e){return e.zIndex}),(function(e){return e.show?"initial":"none"}));ka.defaultProps={show:!1,zIndex:10};var Ia,Ca,Sa=o.e.div(Ia||(Ia=St(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: ",";\n"],["\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: ",";\n"])),(function(e){return e.theme.zIndices.modal-1})),xa=Object(r.createContext)({onPresent:function(){return null},onDismiss:function(){return null},setCloseOnOverlayClick:function(){return!0}}),Ba=function(e){var t=e.children,n=Object(r.useState)(!1),o=n[0],a=n[1],s=Object(r.useState)(),u=s[0],c=s[1],l=Object(r.useState)(!0),f=l[0],d=l[1],h=function(){c(void 0),a(!1)};return i.a.createElement(xa.Provider,{value:{onPresent:function(e){c(e),a(!0)},onDismiss:h,setCloseOnOverlayClick:d}},o&&i.a.createElement(Sa,null,i.a.createElement(ka,{show:!0,onClick:function(){f&&h()}}),i.a.isValidElement(u)&&i.a.cloneElement(u,{onDismiss:h})),t)},Oa=function(e,t){void 0===t&&(t=!0);var n=Object(r.useContext)(xa),i=n.onPresent,o=n.onDismiss,a=n.setCloseOnOverlayClick,s=Object(r.useCallback)((function(){i(e)}),[e,i]);return Object(r.useEffect)((function(){a(t)}),[t,a]),[s,o]},Ma=function(e){return i.a.createElement(Nt,It({viewBox:"0 0 24 24"},e),i.a.createElement("path",{d:"M4 18H20C20.55 18 21 17.55 21 17C21 16.45 20.55 16 20 16H4C3.45 16 3 16.45 3 17C3 17.55 3.45 18 4 18ZM4 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11H4C3.45 11 3 11.45 3 12C3 12.55 3.45 13 4 13ZM3 7C3 7.55 3.45 8 4 8H20C20.55 8 21 7.55 21 7C21 6.45 20.55 6 20 6H4C3.45 6 3 6.45 3 7Z"}))},Pa=function(e){return i.a.createElement(Nt,It({viewBox:"0 0 24 24"},e),i.a.createElement("path",{d:"M4 18H15C15.55 18 16 17.55 16 17C16 16.45 15.55 16 15 16H4C3.45 16 3 16.45 3 17C3 17.55 3.45 18 4 18ZM4 13H12C12.55 13 13 12.55 13 12C13 11.45 12.55 11 12 11H4C3.45 11 3 11.45 3 12C3 12.55 3.45 13 4 13ZM3 7C3 7.55 3.45 8 4 8H15C15.55 8 16 7.55 16 7C16 6.45 15.55 6 15 6H4C3.45 6 3 6.45 3 7ZM20.3 14.88L17.42 12L20.3 9.12C20.69 8.73 20.69 8.1 20.3 7.71C19.91 7.32 19.28 7.32 18.89 7.71L15.3 11.3C14.91 11.69 14.91 12.32 15.3 12.71L18.89 16.3C19.28 16.69 19.91 16.69 20.3 16.3C20.68 15.91 20.69 15.27 20.3 14.88Z"}))},Ra=Object.freeze({__proto__:null,FarmIcon:function(e){return i.a.createElement(Nt,It({viewBox:"0 0 24 24"},e),i.a.createElement("path",{d:"M13.3 2.79L9.8 6.29L10.5 7L11.9 5.61L13 6.71V9C13 10.11 12.11 11 11 11H10.46A6 6 0 0 1 12 15A6 6 0 0 1 11.91 16H15.03A4.5 4.5 0 0 1 19.5 12A4.5 4.5 0 0 1 22 12.76V8C22 6.89 21.11 6 20 6H13.71L12.61 4.9L14 3.5L13.3 2.79M4 7C3.45 7 3 7.45 3 8C3 8.55 3.45 9 4 9H9C9 7.9 8.11 7 7 7H4M6 10A5 5 0 0 0 4.44 10.25L4.8 11.18L4.33 11.36L4 10.43A5 5 0 0 0 1.54 12.74L2.45 13.15L2.24 13.6L1.34 13.2A5 5 0 0 0 1 15A5 5 0 0 0 1.25 16.56L2.18 16.2L2.36 16.67L1.43 17A5 5 0 0 0 3.74 19.46L4.14 18.55L4.6 18.76L4.2 19.66A5 5 0 0 0 6 20A5 5 0 0 0 7.56 19.75L7.2 18.82L7.67 18.64L8 19.57A5 5 0 0 0 10.46 17.26L9.55 16.86L9.76 16.4L10.66 16.8A5 5 0 0 0 11 15A5 5 0 0 0 10.75 13.44L9.82 13.8L9.64 13.33L10.57 13A5 5 0 0 0 8.26 10.54L7.86 11.45L7.4 11.24L7.8 10.34A5 5 0 0 0 6 10M6 12A3 3 0 0 1 9 15A3 3 0 0 1 6 18A3 3 0 0 1 3 15A3 3 0 0 1 6 12M19.5 13A3.5 3.5 0 0 0 16 16.5A3.5 3.5 0 0 0 19.5 20A3.5 3.5 0 0 0 23 16.5A3.5 3.5 0 0 0 19.5 13M19.5 15A1.5 1.5 0 0 1 21 16.5A1.5 1.5 0 0 1 19.5 18A1.5 1.5 0 0 1 18 16.5A1.5 1.5 0 0 1 19.5 15Z"}))},GroupsIcon:function(e){return i.a.createElement(Nt,It({viewBox:"0 0 24 24"},e),i.a.createElement("path",{d:"M12 12.75C13.63 12.75 15.07 13.14 16.24 13.65C17.32 14.13 18 15.21 18 16.38V17C18 17.55 17.55 18 17 18H7C6.45 18 6 17.55 6 17V16.39C6 15.21 6.68 14.13 7.76 13.66C8.93 13.14 10.37 12.75 12 12.75ZM4 13C5.1 13 6 12.1 6 11C6 9.9 5.1 9 4 9C2.9 9 2 9.9 2 11C2 12.1 2.9 13 4 13ZM5.13 14.1C4.76 14.04 4.39 14 4 14C3.01 14 2.07 14.21 1.22 14.58C0.48 14.9 0 15.62 0 16.43V17C0 17.55 0.45 18 1 18H4.5V16.39C4.5 15.56 4.73 14.78 5.13 14.1ZM20 13C21.1 13 22 12.1 22 11C22 9.9 21.1 9 20 9C18.9 9 18 9.9 18 11C18 12.1 18.9 13 20 13ZM24 16.43C24 15.62 23.52 14.9 22.78 14.58C21.93 14.21 20.99 14 20 14C19.61 14 19.24 14.04 18.87 14.1C19.27 14.78 19.5 15.56 19.5 16.39V18H23C23.55 18 24 17.55 24 17V16.43ZM12 6C13.66 6 15 7.34 15 9C15 10.66 13.66 12 12 12C10.34 12 9 10.66 9 9C9 7.34 10.34 6 12 6Z"}))},Groups2Icon:function(e){return i.a.createElement(Nt,It({viewBox:"0 0 24 24"},e),i.a.createElement("path",{d:"M16.5,12A2.5,2.5 0 0,0 19,9.5A2.5,2.5 0 0,0 16.5,7A2.5,2.5 0 0,0 14,9.5A2.5,2.5 0 0,0 16.5,12M9,11A3,3 0 0,0 12,8A3,3 0 0,0 9,5A3,3 0 0,0 6,8A3,3 0 0,0 9,11M16.5,14C14.67,14 11,14.92 11,16.75V19H22V16.75C22,14.92 18.33,14 16.5,14M9,13C6.67,13 2,14.17 2,16.5V19H9V16.75C9,15.9 9.33,14.41 11.37,13.28C10.5,13.1 9.66,13 9,13Z"}))},HamburgerIcon:Ma,HamburgerCloseIcon:Pa,HomeIcon:function(e){return i.a.createElement(Nt,It({viewBox:"0 0 24 24"},e),i.a.createElement("path",{d:"M9.99998 19V14H14V19C14 19.55 14.45 20 15 20H18C18.55 20 19 19.55 19 19V12H20.7C21.16 12 21.38 11.43 21.03 11.13L12.67 3.59997C12.29 3.25997 11.71 3.25997 11.33 3.59997L2.96998 11.13C2.62998 11.43 2.83998 12 3.29998 12H4.99998V19C4.99998 19.55 5.44998 20 5.99998 20H8.99998C9.54998 20 9.99998 19.55 9.99998 19Z"}))},Ifo3Icon:function(e){return i.a.createElement(Nt,It({viewBox:"0 0 24 24"},e),i.a.createElement("path",{d:"M21.9 8.89L20.85 4.52C20.63 3.62 19.85 3 18.94 3H16.73H14.72H13H11H9.28001H7.26001H5.05001C4.15001 3 3.36001 3.63 3.15001 4.52L2.10001 8.89C1.86001 9.91 2.08001 10.95 2.72001 11.77C2.80001 11.88 2.91001 11.96 3.00001 12.06V19C3.00001 20.1 3.90001 21 5.00001 21H19C20.1 21 21 20.1 21 19V12.06C21.09 11.97 21.2 11.88 21.28 11.78C21.92 10.96 22.15 9.91 21.9 8.89ZM7.02001 5L6.44001 9.86C6.36001 10.51 5.84001 11 5.23001 11C4.74001 11 4.43001 10.71 4.30001 10.53C4.04001 10.2 3.95001 9.77 4.05001 9.36L5.05001 5H7.02001ZM18.91 4.99L19.96 9.36C20.06 9.78 19.97 10.2 19.71 10.53C19.57 10.71 19.27 11 18.77 11C18.16 11 17.63 10.51 17.56 9.86L16.98 5L18.91 4.99ZM15.51 9.52C15.56 9.91 15.44 10.3 15.18 10.59C14.95 10.85 14.63 11 14.22 11C13.55 11 13 10.41 13 9.69V5H14.96L15.51 9.52ZM11 9.69C11 10.41 10.45 11 9.71001 11C9.37001 11 9.06001 10.85 8.82001 10.59C8.57001 10.3 8.45001 9.91 8.49001 9.52L9.04001 5H11V9.69ZM18 19H6.00001C5.45001 19 5.00001 18.55 5.00001 18V12.97C5.08001 12.98 5.15001 13 5.23001 13C6.10001 13 6.89001 12.64 7.47001 12.05C8.07001 12.65 8.87001 13 9.78001 13C10.65 13 11.43 12.64 12.01 12.07C12.6 12.64 13.4 13 14.3 13C15.14 13 15.94 12.65 16.54 12.05C17.12 12.64 17.91 13 18.78 13C18.86 13 18.93 12.98 19.01 12.97V18C19 18.55 18.55 19 18 19Z"}))},Ifo2Icon:function(e){return i.a.createElement(Nt,It({viewBox:"0 0 26 26"},e),i.a.createElement("path",{d:"M13.13 22.19L11.5 18.36C13.07 17.78 14.54 17 15.9 16.09L13.13 22.19M5.64 12.5L1.81 10.87L7.91 8.1C7 9.46 6.22 10.93 5.64 12.5M19.22 4C19.5 4 19.75 4 19.96 4.05C20.13 5.44 19.94 8.3 16.66 11.58C14.96 13.29 12.93 14.6 10.65 15.47L8.5 13.37C9.42 11.06 10.73 9.03 12.42 7.34C15.18 4.58 17.64 4 19.22 4M19.22 2C17.24 2 14.24 2.69 11 5.93C8.81 8.12 7.5 10.53 6.65 12.64C6.37 13.39 6.56 14.21 7.11 14.77L9.24 16.89C9.62 17.27 10.13 17.5 10.66 17.5C10.89 17.5 11.13 17.44 11.36 17.35C13.5 16.53 15.88 15.19 18.07 13C23.73 7.34 21.61 2.39 21.61 2.39S20.7 2 19.22 2M14.54 9.46C13.76 8.68 13.76 7.41 14.54 6.63S16.59 5.85 17.37 6.63C18.14 7.41 18.15 8.68 17.37 9.46C16.59 10.24 15.32 10.24 14.54 9.46M8.88 16.53L7.47 15.12L8.88 16.53M6.24 22L9.88 18.36C9.54 18.27 9.21 18.12 8.91 17.91L4.83 22H6.24M2 22H3.41L8.18 17.24L6.76 15.83L2 20.59V22M2 19.17L6.09 15.09C5.88 14.79 5.73 14.47 5.64 14.12L2 17.76V19.17Z"}))},Info2Icon:function(e){return i.a.createElement(Nt,It({viewBox:"0 0 24 24"},e),i.a.createElement("path",{d:"M5 7C5 6.44772 4.55228 6 4 6C3.44772 6 3 6.44772 3 7V18C3 19.1046 3.89543 20 5 20H20C20.5523 20 21 19.5523 21 19C21 18.4477 20.5523 18 20 18H5V7Z"}),i.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19 17H7C6.44772 17 6 16.5523 6 16V12C6 11.4477 6.44772 11 7 11H10V10C10 9.44772 10.4477 9 11 9H14V7C14 6.44772 14.4477 6 15 6H19C19.5523 6 20 6.44772 20 7V16C20 16.5523 19.5523 17 19 17ZM16 8H18V15H16V8ZM12 15H14V11H12V15ZM10 13H8V15H10V13Z"}))},LanguageIcon:function(e){return i.a.createElement(Nt,It({viewBox:"0 0 24 24"},e),i.a.createElement("path",{d:"M11.99 2C6.47 2 2 6.48 2 12C2 17.52 6.47 22 11.99 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 11.99 2ZM18.92 8H15.97C15.65 6.75 15.19 5.55 14.59 4.44C16.43 5.07 17.96 6.35 18.92 8ZM12 4.04C12.83 5.24 13.48 6.57 13.91 8H10.09C10.52 6.57 11.17 5.24 12 4.04ZM4.26 14C4.1 13.36 4 12.69 4 12C4 11.31 4.1 10.64 4.26 10H7.64C7.56 10.66 7.5 11.32 7.5 12C7.5 12.68 7.56 13.34 7.64 14H4.26ZM5.08 16H8.03C8.35 17.25 8.81 18.45 9.41 19.56C7.57 18.93 6.04 17.66 5.08 16ZM8.03 8H5.08C6.04 6.34 7.57 5.07 9.41 4.44C8.81 5.55 8.35 6.75 8.03 8ZM12 19.96C11.17 18.76 10.52 17.43 10.09 16H13.91C13.48 17.43 12.83 18.76 12 19.96ZM14.34 14H9.66C9.57 13.34 9.5 12.68 9.5 12C9.5 11.32 9.57 10.65 9.66 10H14.34C14.43 10.65 14.5 11.32 14.5 12C14.5 12.68 14.43 13.34 14.34 14ZM14.59 19.56C15.19 18.45 15.65 17.25 15.97 16H18.92C17.96 17.65 16.43 18.93 14.59 19.56ZM16.36 14C16.44 13.34 16.5 12.68 16.5 12C16.5 11.32 16.44 10.66 16.36 10H19.74C19.9 10.64 20 11.31 20 12C20 12.69 19.9 13.36 19.74 14H16.36Z"}))},Logo2Icon:function(e){var t=e.isDark,n=Ct(e,["isDark"]);return i.a.createElement(Nt,It({viewBox:"0 0 205 26"},n),i.a.createElement("image",{width:"205",height:"26",href:t?"/images/egg/LogoTextNewDark.png":"/images/egg/LogoTextNewWhite.png"}))},MoonIcon:function(e){return i.a.createElement(Nt,It({viewBox:"0 0 24 24"},e),i.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.1534 13.6089L4.15362 13.61C4.77322 16.8113 7.42207 19.3677 10.647 19.8853L10.6502 19.8858C13.0412 20.2736 15.2625 19.6103 16.9422 18.2833C11.3549 16.2878 7.9748 10.3524 9.26266 4.48816C5.69846 5.77194 3.35817 9.51245 4.1534 13.6089ZM10.0083 2.21054C4.76622 3.2533 1.09895 8.36947 2.19006 13.9901C2.97006 18.0201 6.28006 21.2101 10.3301 21.8601C13.8512 22.4311 17.0955 21.1608 19.2662 18.8587C19.2765 18.8478 19.2866 18.837 19.2968 18.8261C19.4385 18.6745 19.5757 18.5184 19.7079 18.3581C19.7105 18.355 19.713 18.3519 19.7156 18.3487C19.8853 18.1426 20.0469 17.9295 20.2001 17.7101C20.4101 17.4001 20.2401 16.9601 19.8701 16.9201C19.5114 16.8796 19.1602 16.8209 18.817 16.7452C18.7964 16.7406 18.7758 16.736 18.7552 16.7313C18.6676 16.7114 18.5804 16.6903 18.4938 16.6681C18.4919 16.6676 18.4901 16.6672 18.4882 16.6667C13.0234 15.2647 9.72516 9.48006 11.4542 4.03417C11.4549 4.03214 11.4555 4.03012 11.4562 4.0281C11.4875 3.92954 11.5205 3.83109 11.5552 3.73278C11.5565 3.72911 11.5578 3.72543 11.5591 3.72175C11.6768 3.38921 11.8136 3.05829 11.9701 2.73005C12.1301 2.39005 11.8501 2.01005 11.4701 2.03005C11.1954 2.04379 10.924 2.06848 10.6561 2.10368C10.6517 2.10427 10.6472 2.10486 10.6428 2.10545C10.4413 2.13221 10.2418 2.16492 10.0446 2.2034C10.0325 2.20576 10.0204 2.20814 10.0083 2.21054Z"}))},MoreIcon:function(e){return i.a.createElement(Nt,It({viewBox:"0 0 24 24"},e),i.a.createElement("path",{d:"M6 10C4.9 10 4 10.9 4 12C4 13.1 4.9 14 6 14C7.1 14 8 13.1 8 12C8 10.9 7.1 10 6 10ZM18 10C16.9 10 16 10.9 16 12C16 13.1 16.9 14 18 14C19.1 14 20 13.1 20 12C20 10.9 19.1 10 18 10ZM12 10C10.9 10 10 10.9 10 12C10 13.1 10.9 14 12 14C13.1 14 14 13.1 14 12C14 10.9 13.1 10 12 10Z"}))},NftIcon:function(e){return i.a.createElement(Nt,It({viewBox:"0 0 24 24"},e),i.a.createElement("path",{d:"M12.8533 3.39627C12.4634 2.75821 11.5366 2.75821 11.1467 3.39627L7.42977 9.47855C7.02256 10.1449 7.50213 11 8.28306 11H15.7169C16.4979 11 16.9774 10.1449 16.5702 9.47855L12.8533 3.39627ZM12 5.84L13.93 9H10.06L12 5.84ZM17.5 13C15.01 13 13 15.01 13 17.5C13 19.99 15.01 22 17.5 22C19.99 22 22 19.99 22 17.5C22 15.01 19.99 13 17.5 13ZM17.5 20C16.12 20 15 18.88 15 17.5C15 16.12 16.12 15 17.5 15C18.88 15 20 16.12 20 17.5C20 18.88 18.88 20 17.5 20ZM3 19.5C3 20.6046 3.89543 21.5 5 21.5H9C10.1046 21.5 11 20.6046 11 19.5V15.5C11 14.3954 10.1046 13.5 9 13.5H5C3.89543 13.5 3 14.3954 3 15.5V19.5ZM5 15.5H9V19.5H5V15.5Z"}))},PoolIcon:function(e){return i.a.createElement(Nt,It({viewBox:"0 0 24 24"},e),i.a.createElement("path",{d:"M7.5 13C7.5 11.8954 8.39543 11 9.5 11H12.5C13.6046 11 14.5 11.8954 14.5 13V15C14.5 16.1046 13.6046 17 12.5 17H9.5C8.39543 17 7.5 16.1046 7.5 15V13Z"}),i.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.5 2C8.39543 2 7.5 2.89543 7.5 4V6.49482C7.5 6.93167 7.2113 7.30895 6.81834 7.49981C5.15004 8.31009 4 10.0207 4 12V17C4 19.2091 5.79086 21 8 21H14C16.2091 21 18 19.2091 18 17V12C18 11.4175 17.9004 10.8583 17.7173 10.3385L17.7892 10.297C19.4786 9.32167 20.0574 7.16153 19.082 5.47221C18.1552 3.86682 16.1534 3.25957 14.5 4.05146V4C14.5 2.89543 13.6046 2 12.5 2H9.5ZM9.5 6.25V4H12.5V6.25H9.5ZM9.22663 7.75C8.89473 8.46917 8.30318 9.00205 7.69211 9.29884C6.68638 9.78731 6 10.8154 6 12V17C6 18.1046 6.89543 19 8 19H14C15.1046 19 16 18.1046 16 17V12C16 10.8154 15.3136 9.78731 14.3079 9.29884C13.6968 9.00205 13.1053 8.46917 12.7734 7.75H9.22663ZM14.5 6.3226V6.49482C14.5 6.93167 14.7887 7.30895 15.1817 7.49981C15.7529 7.77726 16.2634 8.16029 16.6878 8.62352L16.7892 8.56495C17.522 8.1419 17.773 7.20495 17.35 6.47221C16.9346 5.75269 16.0213 5.49542 15.2914 5.89229L14.5 6.3226Z"}))},Pool2Icon:function(e){return i.a.createElement(Nt,It({viewBox:"0 0 24 24"},e),i.a.createElement("path",{d:"M17.2,5V5C17.8,5 18.4,5 18.9,5.1C19.1,7.4 19.1,12 16.4,15.2C14.4,17.7 11,19 6.4,19C6,19 5.5,19 5.1,19C4.9,14.4 5.8,10.8 7.9,8.5C10.4,5.6 14.4,5 17.2,5M17.2,3C11.7,3 1.6,5.1 3.2,20.8C4.3,20.9 5.4,21 6.4,21C24.3,21 20.7,3.3 20.7,3.3C20.7,3.3 19.3,3 17.2,3M17,7C7,7 7,17 7,17C11,9 17,7 17,7Z"}))},JungleIcon:function(e){return i.a.createElement(Nt,It({viewBox:"0 0 24 24"},e),i.a.createElement("path",{d:"M10,21V18H3L8,13H5L10,8H7L12,3L17,8H14L19,13H16L21,18H14V21H10Z"}))},SunIcon:function(e){return i.a.createElement(Nt,It({viewBox:"0 0 24 24"},e),i.a.createElement("path",{d:"M5.66 4.2L6.05 4.59C6.44 4.97 6.44 5.61 6.05 5.99L6.04 6C5.65 6.39 5.03 6.39 4.64 6L4.25 5.61C3.86 5.23 3.86 4.6 4.25 4.21L4.26 4.2C4.64 3.82 5.27 3.81 5.66 4.2Z"}),i.a.createElement("path",{d:"M1.99 10.95H3.01C3.56 10.95 4 11.39 4 11.95V11.96C4 12.51 3.56 12.95 3 12.94H1.99C1.44 12.94 1 12.5 1 11.95V11.94C1 11.39 1.44 10.95 1.99 10.95Z"}),i.a.createElement("path",{d:"M12 1H12.01C12.56 1 13 1.44 13 1.99V2.96C13 3.51 12.56 3.95 12 3.94H11.99C11.44 3.94 11 3.5 11 2.95V1.99C11 1.44 11.44 1 12 1Z"}),i.a.createElement("path",{d:"M18.34 4.2C18.73 3.82 19.36 3.82 19.75 4.21C20.14 4.6 20.14 5.22 19.75 5.61L19.36 6C18.98 6.39 18.35 6.39 17.96 6L17.95 5.99C17.56 5.61 17.56 4.98 17.95 4.59L18.34 4.2Z"}),i.a.createElement("path",{d:"M18.33 19.7L17.94 19.31C17.55 18.92 17.55 18.3 17.95 17.9C18.33 17.52 18.96 17.51 19.35 17.9L19.74 18.29C20.13 18.68 20.13 19.31 19.74 19.7C19.35 20.09 18.72 20.09 18.33 19.7Z"}),i.a.createElement("path",{d:"M20 11.95V11.94C20 11.39 20.44 10.95 20.99 10.95H22C22.55 10.95 22.99 11.39 22.99 11.94V11.95C22.99 12.5 22.55 12.94 22 12.94H20.99C20.44 12.94 20 12.5 20 11.95Z"}),i.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 11.95C6 8.64 8.69 5.95 12 5.95C15.31 5.95 18 8.64 18 11.95C18 15.26 15.31 17.95 12 17.95C8.69 17.95 6 15.26 6 11.95ZM12 16C14.2091 16 16 14.2091 16 12C16 9.79086 14.2091 8 12 8C9.79086 8 8 9.79086 8 12C8 14.2091 9.79086 16 12 16Z"}),i.a.createElement("path",{d:"M12 22.9H11.99C11.44 22.9 11 22.46 11 21.91V20.95C11 20.4 11.44 19.96 11.99 19.96H12C12.55 19.96 12.99 20.4 12.99 20.95V21.91C12.99 22.46 12.55 22.9 12 22.9Z"}),i.a.createElement("path",{d:"M5.66 19.69C5.27 20.08 4.64 20.08 4.25 19.69C3.86 19.3 3.86 18.68 4.24 18.28L4.63 17.89C5.02 17.5 5.65 17.5 6.04 17.89L6.05 17.9C6.43 18.28 6.44 18.91 6.05 19.3L5.66 19.69Z"}))},TelegramIcon:function(e){return i.a.createElement(Nt,It({viewBox:"0 0 18 18"},e),i.a.createElement("path",{d:"M16.9513 3.29916L14.5438 15.1556C14.377 15.997 13.8902 16.1987 13.21 15.8093L9.542 12.979L7.76804 14.7662C7.56797 14.9748 7.40125 15.1556 7.03445 15.1556C6.55428 15.1556 6.63431 14.9679 6.47425 14.495L5.20714 10.1905L1.57252 9.00834C0.785579 8.76495 0.77891 8.20168 1.74592 7.7914L15.9243 2.08918C16.5711 1.79016 17.1914 2.25607 16.9446 3.29221L16.9513 3.29916Z"}))},TicketIcon:function(e){return i.a.createElement(Nt,It({viewBox:"0 0 24 24"},e),i.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.3137 3L15.2631 3.94934C14.5597 5.19866 14.7398 6.81097 15.8032 7.87441C16.8667 8.93786 18.479 9.11792 19.7283 8.4146L20.6777 9.36396L17.6569 12.3848L17.1287 11.8566C16.7382 11.4661 16.105 11.4661 15.7145 11.8566C15.3239 12.2471 15.3239 12.8803 15.7145 13.2708L16.2426 13.799L9.36396 20.6777L8.49923 19.8129C9.71921 18.5286 9.69924 16.4983 8.43932 15.2384C7.1794 13.9784 5.14908 13.9585 3.86473 15.1784L3 14.3137L9.87868 7.43503L10.2145 7.77081C10.605 8.16134 11.2382 8.16134 11.6287 7.77081C12.0192 7.38029 12.0192 6.74713 11.6287 6.3566L11.2929 6.02081L14.3137 3ZM12.8995 1.58579C13.6805 0.804738 14.9469 0.804738 15.7279 1.58579L17.299 3.15684C17.6895 3.54736 17.6895 4.18053 17.299 4.57105L17.2175 4.65257C16.7183 5.15173 16.7183 5.96103 17.2175 6.4602C17.7166 6.95936 18.5259 6.95936 19.0251 6.4602L19.1066 6.37868C19.4971 5.98816 20.1303 5.98816 20.5208 6.37868L22.0919 7.94975C22.8729 8.7308 22.8729 9.99713 22.0919 10.7782L10.7782 22.0919C9.99713 22.8729 8.7308 22.8729 7.94975 22.0919L6.37869 20.5208C5.98817 20.1303 5.98817 19.4971 6.37869 19.1066L7.02511 18.4602C7.52427 17.961 7.52427 17.1517 7.02511 16.6526C6.52594 16.1534 5.71664 16.1534 5.21748 16.6526L4.57106 17.299C4.18054 17.6895 3.54737 17.6895 3.15685 17.299L1.58579 15.7279C0.804738 14.9469 0.804738 13.6805 1.58579 12.8995L12.8995 1.58579ZM13.8787 8.6066C13.4882 8.21608 12.855 8.21608 12.4645 8.6066C12.0739 8.99712 12.0739 9.63029 12.4645 10.0208L13.4645 11.0208C13.855 11.4113 14.4882 11.4113 14.8787 11.0208C15.2692 10.6303 15.2692 9.99713 14.8787 9.6066L13.8787 8.6066Z"}))},TradeIcon:function(e){return i.a.createElement(Nt,It({viewBox:"0 0 24 24"},e),i.a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.86 4.86003L21.65 7.65003C21.84 7.84003 21.84 8.16003 21.64 8.35003L18.85 11.14C18.54 11.46 18 11.24 18 10.79V9.00003H4C3.45 9.00003 3 8.55003 3 8.00003C3 7.45003 3.45 7.00003 4 7.00003H18V5.21003C18 4.76003 18.54 4.54003 18.86 4.86003ZM5.14001 19.14L2.35001 16.35C2.16001 16.16 2.16001 15.84 2.36001 15.65L5.15001 12.86C5.46001 12.54 6.00001 12.76 6.00001 13.21V15H20C20.55 15 21 15.45 21 16C21 16.55 20.55 17 20 17H6.00001V18.79C6.00001 19.24 5.46001 19.46 5.14001 19.14Z"}))},TwitterIcon:function(e){return i.a.createElement(Nt,It({viewBox:"0 0 18 18"},e),i.a.createElement("path",{d:"M17.9655 3.42682C17.3018 3.71857 16.593 3.91732 15.8468 4.00807C16.6073 3.54982 17.1922 2.82757 17.469 1.96582C16.7558 2.38207 15.9653 2.68507 15.1238 2.85382C14.4518 2.13457 13.494 1.68457 12.4305 1.68457C10.3927 1.68457 8.7405 3.33682 8.7405 5.37232C8.7405 5.66482 8.77425 5.94607 8.83575 6.21532C5.76825 6.07057 3.0495 4.59757 1.23 2.37082C0.90975 2.91232 0.7305 3.54157 0.7305 4.22707C0.7305 5.50957 1.383 6.63682 2.3715 7.29907C1.76625 7.27957 1.197 7.11307 0.7005 6.83707V6.88282C0.7005 8.67157 1.97025 10.1633 3.66 10.5031C3.35025 10.5863 3.02325 10.6313 2.688 10.6313C2.4525 10.6313 2.22675 10.6088 2.001 10.5668C2.47425 12.0316 3.83475 13.0996 5.454 13.1296C4.194 14.1188 2.59725 14.7083 0.8775 14.7083C0.585 14.7083 0.29325 14.6911 0 14.6581C1.64175 15.7036 3.576 16.3148 5.66775 16.3148C12.4583 16.3148 16.167 10.6928 16.167 5.82532C16.167 5.66857 16.167 5.51032 16.1558 5.35282C16.8765 4.83607 17.5057 4.18282 18.0007 3.44182L17.9655 3.42682Z"}))},HelmetIcon:function(e){return i.a.createElement(Nt,It({viewBox:"0 0 512 512"},e),i.a.createElement("g",null,i.a.createElement("path",{d:"m292.571 80.014c0-20.198-16.374-36.571-36.571-36.571s-36.571 16.374-36.571 36.571v215.922h73.143v-215.922z"}),i.a.createElement("path",{d:"m444.652 229.682c40.506-26.015 67.348-71.461 67.348-123.18 0-33.261-11.105-63.919-29.802-88.487l-9.55 2.939c-3.94 84.795-44.483 109.337-92.427 114.518 29.856 24.145 52.565 56.787 64.431 94.21z"}),i.a.createElement("path",{d:"m88.143 295.935h101.285v-160.643c-59.533 25.82-101.285 85.155-101.285 154.071z"}),i.a.createElement("path",{d:"m322.571 135.281v160.654h101.286v-6.572c0-68.917-41.751-128.261-101.286-154.082z"}),i.a.createElement("path",{d:"m292.571 457.414v-28.336h-73.142v28.336l36.571 36.571z"}),i.a.createElement("path",{d:"m67.351 229.684c11.868-37.425 34.58-70.066 64.44-94.21-47.95-5.178-88.499-29.717-92.44-114.519l-9.55-2.939c-18.696 24.567-29.801 55.225-29.801 88.486 0 51.72 26.843 97.167 67.351 123.182z"}),i.a.createElement("path",{d:"m54.857 325.935h402.286v73.143h-402.286z"})))},AuditIcon:function(e){return i.a.createElement(Nt,It({viewBox:"-60 -30 600 600"},e),i.a.createElement("g",{id:"surface1"},i.a.createElement("path",{d:"M 217.996094 158.457031 C 164.203125 158.457031 120.441406 202.21875 120.441406 256.007812 C 120.441406 309.800781 164.203125 353.5625 217.996094 353.5625 C 271.785156 353.5625 315.546875 309.800781 315.546875 256.007812 C 315.546875 202.21875 271.785156 158.457031 217.996094 158.457031 Z M 275.914062 237.636719 L 206.027344 307.523438 C 203.09375 310.457031 199.246094 311.925781 195.402344 311.925781 C 191.558594 311.925781 187.714844 310.460938 184.78125 307.523438 L 158.074219 280.816406 C 152.207031 274.953125 152.207031 265.441406 158.074219 259.574219 C 163.9375 253.707031 173.449219 253.707031 179.316406 259.574219 L 195.402344 275.660156 L 254.671875 216.394531 C 260.535156 210.527344 270.046875 210.527344 275.914062 216.394531 C 281.78125 222.257812 281.78125 231.769531 275.914062 237.636719 Z M 275.914062 237.636719 "}),i.a.createElement("path",{d:"M 435.488281 138.917969 L 435.472656 138.519531 C 435.25 133.601562 435.101562 128.398438 435.011719 122.609375 C 434.59375 94.378906 412.152344 71.027344 383.917969 69.449219 C 325.050781 66.164062 279.511719 46.96875 240.601562 9.042969 L 240.269531 8.726562 C 227.578125 -2.910156 208.433594 -2.910156 195.738281 8.726562 L 195.40625 9.042969 C 156.496094 46.96875 110.957031 66.164062 52.089844 69.453125 C 23.859375 71.027344 1.414062 94.378906 0.996094 122.613281 C 0.910156 128.363281 0.757812 133.566406 0.535156 138.519531 L 0.511719 139.445312 C -0.632812 199.472656 -2.054688 274.179688 22.9375 341.988281 C 36.679688 379.277344 57.492188 411.691406 84.792969 438.335938 C 115.886719 468.679688 156.613281 492.769531 205.839844 509.933594 C 207.441406 510.492188 209.105469 510.945312 210.800781 511.285156 C 213.191406 511.761719 215.597656 512 218.003906 512 C 220.410156 512 222.820312 511.761719 225.207031 511.285156 C 226.902344 510.945312 228.578125 510.488281 230.1875 509.925781 C 279.355469 492.730469 320.039062 468.628906 351.105469 438.289062 C 378.394531 411.636719 399.207031 379.214844 412.960938 341.917969 C 438.046875 273.90625 436.628906 199.058594 435.488281 138.917969 Z M 217.996094 383.605469 C 147.636719 383.605469 90.398438 326.367188 90.398438 256.007812 C 90.398438 185.648438 147.636719 128.410156 217.996094 128.410156 C 288.351562 128.410156 345.59375 185.648438 345.59375 256.007812 C 345.59375 326.367188 288.351562 383.605469 217.996094 383.605469 Z M 217.996094 383.605469 "})))},Audit2Icon:function(e){return i.a.createElement(Nt,It({viewBox:"0 0 28 28"},e),i.a.createElement("path",{d:"M12,12H19C18.47,16.11 15.72,19.78 12,20.92V12H5V6.3L12,3.19M12,1L3,5V11C3,16.55 6.84,21.73 12,23C17.16,21.73 21,16.55 21,11V5L12,1Z"}))},IcebergIcon:function(e){return i.a.createElement(Nt,It({viewBox:"0 0 463 463"},e),i.a.createElement("g",null,i.a.createElement("path",{d:"m455.5,348h-18.275l-46.544-154.661c-0.438-1.457-1.309-2.745-2.496-3.695l-39.772-31.817-21.559-107.798c-0.594-2.969-2.915-5.29-5.884-5.884l-40-8c-2.169-0.433-4.424,0.114-6.156,1.498l-38.303,30.642-69.84,7.76c-3.04,0.338-5.569,2.487-6.395,5.432l-27.758,99.137-39.804,15.922c-1.97,0.788-3.514,2.373-4.25,4.363l-54.373,147.101h-26.591c-4.143,0-7.5,3.358-7.5,7.5s3.357,7.5 7.5,7.5h448c4.143,0 7.5-3.358 7.5-7.5s-3.357-7.5-7.5-7.5zm-354.12-138.774l26.045-10.418-23.148,82.67c-1.116,3.988 1.212,8.127 5.2,9.244 3.995,1.12 8.129-1.212 9.245-5.2l54.635-195.126 60.137-6.682 30.358,151.786-7.706,38.529c-0.285,1.426-0.149,2.905 0.391,4.256l16,40c1.173,2.932 3.989,4.716 6.966,4.716 0.928,0 1.87-0.173 2.783-0.539 3.846-1.538 5.717-5.903 4.179-9.749l-15.172-37.93 7.563-37.814c0.194-0.971 0.194-1.971 0-2.941l-31.106-155.523 26.713-21.371 20.528,107.772c0.685,3.595 3.829,6.098 7.358,6.098 0.466,0 0.938-0.043 1.412-0.134 4.069-0.775 6.739-4.702 5.964-8.771l-20.774-109.061 24.175,4.835 47.02,235.097c0.713,3.565 3.845,6.031 7.347,6.031 0.487,0 0.982-0.048 1.479-0.147 4.062-0.813 6.696-4.764 5.884-8.825l-21.867-109.334 24.004,19.203 44.568,148.102h-371.477l51.296-138.774z"}),i.a.createElement("path",{d:"m311.5,380h-144c-4.143,0-7.5,3.358-7.5,7.5s3.357,7.5 7.5,7.5h144c4.143,0 7.5-3.358 7.5-7.5s-3.357-7.5-7.5-7.5z"}),i.a.createElement("path",{d:"m135.5,380h-64c-4.143,0-7.5,3.358-7.5,7.5s3.357,7.5 7.5,7.5h64c4.143,0 7.5-3.358 7.5-7.5s-3.357-7.5-7.5-7.5z"}),i.a.createElement("path",{d:"m359.5,380h-16c-4.143,0-7.5,3.358-7.5,7.5s3.357,7.5 7.5,7.5h16c4.143,0 7.5-3.358 7.5-7.5s-3.357-7.5-7.5-7.5z"}),i.a.createElement("path",{d:"m295.5,412h-79.998c-4.143,0-7.5,3.358-7.5,7.5s3.357,7.5 7.5,7.5h79.998c4.143,0 7.5-3.358 7.5-7.5s-3.357-7.5-7.5-7.5z"}),i.a.createElement("path",{d:"m183.501,412h-16.001c-4.143,0-7.5,3.358-7.5,7.5s3.357,7.5 7.5,7.5h16.001c4.143,0 7.5-3.358 7.5-7.5s-3.357-7.5-7.5-7.5z"}),i.a.createElement("path",{d:"m315.819,194.097c-0.774-4.07-4.708-6.738-8.771-5.964-4.069,0.775-6.739,4.702-5.964,8.771l3.048,15.999c0.685,3.595 3.829,6.098 7.358,6.098 0.466,0 0.938-0.043 1.412-0.134 4.069-0.775 6.739-4.702 5.964-8.771l-3.047-15.999z"}),i.a.createElement("path",{d:"m200.431,124.058c-4.117-0.516-7.859,2.401-8.373,6.512l-18,144.001c-0.514,4.11 2.402,7.858 6.512,8.372 0.316,0.04 0.63,0.059 0.94,0.059 3.727,0 6.958-2.776 7.433-6.571l18-144.001c0.513-4.11-2.403-7.859-6.512-8.372z"}),i.a.createElement("path",{d:"m178.431,300.059c-4.118-0.516-7.859,2.401-8.373,6.512l-2,15.999c-0.514,4.11 2.402,7.858 6.512,8.372 0.316,0.04 0.63,0.059 0.94,0.059 3.727,0 6.958-2.776 7.433-6.571l2-15.999c0.513-4.109-2.403-7.858-6.512-8.372z"})))},Titanic1Icon:function(e){return i.a.createElement(Nt,It({viewBox:"0 0 960 480"},e),i.a.createElement("g",{transform:"translate(0.000000,480.000000) scale(0.100000,-0.100000)",stroke:"none"},i.a.createElement("path",{d:"M1665 3633 c-49 -15 -50 -16 -22 -25 33 -12 35 -26 4 -37 -13 -5 -29 -17 -37 -27 -14 -16 -13 -17 5 -10 11 5 45 11 75 14 69 6 80 15 80 63 0 36 -2 39 -27 38 -16 0 -50 -7 -78 -16z"}),i.a.createElement("path",{d:"M7945 3537 l-60 -21 33 -8 c17 -5 32 -12 32 -16 0 -10 -1386 -74 -2295 -107 -1469 -52 -1757 -48 -2725 41 -254 23 -1046 108 -1115 119 -24 4 -26 3 -10 -5 28 -13 687 -86 1160 -129 918 -84 1211 -88 2585 -41 539 19 1734 70 2240 96 l125 7 -19 -22 c-23 -25 -21 -25 34 -6 23 8 53 15 66 15 14 0 33 5 43 12 15 9 17 16 8 50 -11 44 -17 45 -102 15z"}),i.a.createElement("path",{d:"M1260 2771 l-535 -730 -221 0 -222 -1 -73 114 c-41 63 -77 115 -80 115 -3 1 -32 -24 -65 -54 -58 -53 -58 -54 -26 -48 35 6 43 -8 17 -33 -8 -9 -15 -22 -15 -30 0 -13 62 26 113 71 10 9 20 15 21 13 61 -94 90 -145 91 -162 3 -56 7 -67 27 -87 13 -12 57 -37 98 -56 41 -19 85 -44 97 -56 29 -26 29 -65 1 -106 -13 -17 -36 -49 -52 -71 -38 -53 -44 -118 -21 -220 33 -143 88 -212 212 -262 l58 -23 4135 3 c4507 3 4190 -1 4409 58 161 44 243 90 278 158 11 20 19 74 24 156 4 69 22 194 38 278 17 84 31 169 31 188 0 31 -3 34 -29 34 -29 0 -30 2 -36 63 -4 35 -5 74 -3 87 3 21 -2 25 -37 32 -22 4 -57 7 -78 7 l-38 1 27 -24 28 -23 -36 -5 c-37 -4 -40 -1 -685 634 -356 350 -651 638 -655 638 -3 0 152 -156 345 -347 708 -700 946 -937 943 -941 -2 -2 -278 216 -613 485 l-608 488 -12 50 -13 50 6 -46 5 -46 -53 -6 c-29 -2 -54 -4 -54 -3 -1 0 13 61 31 134 17 72 29 132 25 132 -3 0 -19 -56 -35 -124 -15 -68 -31 -129 -34 -135 -4 -6 -217 -32 -505 -62 -391 -41 -500 -49 -506 -39 -6 10 -35 9 -139 -5 l-131 -18 6 -51 c3 -28 8 -57 10 -65 3 -8 0 -18 -7 -21 -8 -6 -1 -83 25 -286 20 -154 39 -294 42 -311 l6 -33 -466 0 -466 0 -5 23 c-2 12 -22 159 -44 326 -22 167 -44 307 -50 310 -6 4 -15 35 -19 69 -5 34 -11 65 -15 68 -3 3 -64 -2 -136 -12 -123 -16 -130 -18 -126 -38 12 -62 15 -110 6 -120 -6 -7 5 -118 30 -306 21 -162 39 -301 39 -307 0 -10 -103 -13 -484 -13 l-484 0 -5 33 c-3 17 -23 165 -44 327 -23 183 -42 298 -49 303 -7 4 -16 36 -19 72 -8 75 4 70 -145 50 -58 -8 -111 -15 -119 -15 -10 0 -12 -14 -6 -69 4 -38 3 -71 -2 -74 -5 -3 8 -131 29 -289 20 -156 37 -295 38 -310 l0 -28 -435 0 c-330 0 -435 3 -435 12 0 6 -19 154 -41 327 -27 200 -47 319 -54 323 -7 4 -16 37 -20 73 -4 39 -11 65 -18 65 -7 0 -67 -7 -134 -16 -138 -19 -130 -11 -114 -106 5 -30 4 -49 -2 -51 -9 -3 50 -517 69 -604 3 -16 0 -23 -10 -23 -8 0 -294 286 -636 635 -342 349 -623 635 -623 635 -1 0 -243 -328 -537 -729z m1134 105 c322 -329 583 -602 581 -607 -3 -4 5 -15 17 -23 21 -15 -5 -16 -305 -16 l-327 0 0 -70 0 -70 -155 0 c-116 0 -157 3 -160 13 -9 25 -186 1050 -183 1059 2 5 248 -191 547 -437 299 -245 545 -444 547 -442 2 2 -246 208 -550 458 -372 304 -555 460 -555 473 -1 11 -4 17 -7 14 -4 -5 151 -1006 172 -1110 l6 -28 -81 0 -81 0 0 -55 0 -55 -245 0 -245 0 0 25 0 25 -217 -2 -218 -3 213 -2 212 -3 0 -25 0 -24 273 -3 c149 -2 273 0 275 3 1 3 9 14 16 24 12 17 125 17 2865 1 l2852 -16 39 -25 c39 -24 44 -25 234 -25 183 0 196 1 206 19 5 11 22 22 37 24 27 4 26 4 -4 6 -24 1 -33 -4 -38 -19 -6 -19 -15 -20 -196 -20 -104 0 -189 3 -189 8 0 4 24 75 54 157 29 83 115 329 192 548 76 218 141 392 145 385 3 -7 9 -31 13 -53 3 -22 40 -251 81 -508 41 -258 75 -472 75 -477 0 -5 -24 -11 -52 -13 -99 -7 266 -4 467 3 174 7 163 7 -87 4 l-286 -5 -11 53 c-38 191 -191 1041 -188 1044 2 3 304 -235 669 -528 l665 -533 -96 -6 c-86 -5 -80 -5 62 -7 l157 -2 0 -38 0 -39 -142 -6 c-605 -28 -988 -32 -2963 -31 -2085 0 -4017 17 -5827 50 l-367 7 -10 30 c-6 16 -11 34 -11 38 0 5 150 10 333 11 182 1 288 4 234 7 l-99 6 528 718 c291 394 531 716 535 715 5 -2 271 -272 593 -602z m5718 214 c-5 -28 -355 -1030 -358 -1027 -3 3 226 964 242 1019 9 29 122 37 116 8z m-127 -2 c-2 -7 -63 -260 -135 -563 -72 -302 -133 -556 -136 -563 -3 -11 -12 -9 -40 7 -19 12 -48 21 -65 21 -28 0 -29 1 -29 49 l0 50 -47 3 -48 3 -3 68 -3 67 -188 0 -187 0 -42 326 c-30 226 -47 331 -57 341 -8 8 -15 30 -15 49 0 19 0 37 0 42 0 4 217 30 482 58 573 61 518 57 513 42z m-4698 -240 c-3 -7 -5 -2 -5 12 0 14 2 19 5 13 2 -7 2 -19 0 -25z m3720 10 c-3 -8 -6 -5 -6 6 -1 11 2 17 5 13 3 -3 4 -12 1 -19z m-2530 -30 c-3 -7 -5 -2 -5 12 0 14 2 19 5 13 2 -7 2 -19 0 -25z m-1470 -20 c-3 -7 -5 -2 -5 12 0 14 2 19 5 13 2 -7 2 -19 0 -25z m1190 -5 c-3 -10 -5 -4 -5 12 0 17 2 24 5 18 2 -7 2 -21 0 -30z m1642 -551 l1 -23 -142 3 -143 3 -37 280 c-20 154 -35 285 -33 290 2 6 4 0 4 -12 1 -27 12 -28 128 -13 141 18 143 19 144 43 1 24 77 -532 78 -571z m1217 252 c19 -144 34 -264 34 -268 0 -3 -65 -6 -145 -6 -109 0 -145 3 -145 13 0 6 -16 131 -35 277 -40 300 -38 280 -26 261 8 -13 26 -13 138 2 81 10 130 21 133 29 3 7 6 0 8 -17 2 -16 19 -147 38 -291z m-3727 34 c18 -145 35 -273 38 -285 l5 -23 -146 0 c-80 0 -146 3 -146 8 0 4 -16 124 -35 267 -18 143 -33 260 -32 261 3 1 241 31 262 33 19 1 22 -14 54 -261z m1156 240 c2 -13 18 -131 35 -263 17 -132 33 -250 35 -262 l5 -23 -144 0 -145 0 -6 33 c-12 69 -66 499 -63 501 3 3 229 32 260 35 11 0 20 -8 23 -21z m2985 -623 l0 -65 -2547 2 -2548 3 -3 63 -3 62 2551 0 2550 0 0 -65z m1991 -43 c16 -6 31 -7 42 -1 15 9 17 4 17 -41 0 -62 -12 -64 -65 -10 -21 21 -42 37 -46 35 -4 -3 -18 4 -30 15 l-24 19 40 -3 c22 -2 51 -9 66 -14z m-1891 -77 l0 -45 -597 5 c-957 9 -3918 25 -4510 25 -533 0 -542 0 -548 -20 -3 -11 -15 -20 -26 -20 -16 0 -19 7 -19 50 l0 50 2850 0 2850 0 0 -45z m-6620 -260 c0 -8 -4 -15 -10 -15 -5 0 -10 7 -10 15 0 8 5 15 10 15 6 0 10 -7 10 -15z m150 0 c0 -8 -7 -15 -15 -15 -16 0 -20 12 -8 23 11 12 23 8 23 -8z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m148 -3 c2 -7 -3 -12 -12 -12 -9 0 -16 7 -16 16 0 17 22 14 28 -4z m150 0 c2 -7 -3 -12 -12 -12 -9 0 -16 7 -16 16 0 17 22 14 28 -4z m142 3 c0 -8 -7 -15 -15 -15 -16 0 -20 12 -8 23 11 12 23 8 23 -8z m150 0 c0 -8 -7 -15 -15 -15 -16 0 -20 12 -8 23 11 12 23 8 23 -8z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m148 -3 c2 -7 -3 -12 -12 -12 -9 0 -16 7 -16 16 0 17 22 14 28 -4z m142 3 c0 -8 -4 -15 -10 -15 -5 0 -10 7 -10 15 0 8 5 15 10 15 6 0 10 -7 10 -15z m150 0 c0 -8 -7 -15 -15 -15 -16 0 -20 12 -8 23 11 12 23 8 23 -8z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m148 -3 c2 -7 -3 -12 -12 -12 -9 0 -16 7 -16 16 0 17 22 14 28 -4z m142 3 c0 -8 -4 -15 -9 -15 -13 0 -22 16 -14 24 11 11 23 6 23 -9z m150 0 c0 -8 -7 -15 -15 -15 -16 0 -20 12 -8 23 11 12 23 8 23 -8z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m148 -3 c2 -7 -3 -12 -12 -12 -9 0 -16 7 -16 16 0 17 22 14 28 -4z m144 3 c0 -5 -5 -11 -11 -13 -6 -2 -11 4 -11 13 0 9 5 15 11 13 6 -2 11 -8 11 -13z m148 0 c0 -8 -7 -15 -15 -15 -16 0 -20 12 -8 23 11 12 23 8 23 -8z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m148 -3 c2 -7 -3 -12 -12 -12 -9 0 -16 7 -16 16 0 17 22 14 28 -4z m142 3 c0 -8 -4 -15 -10 -15 -5 0 -10 7 -10 15 0 8 5 15 10 15 6 0 10 -7 10 -15z m150 0 c0 -8 -7 -15 -15 -15 -16 0 -20 12 -8 23 11 12 23 8 23 -8z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m148 -3 c2 -7 -3 -12 -12 -12 -9 0 -16 7 -16 16 0 17 22 14 28 -4z m150 0 c2 -7 -3 -12 -12 -12 -9 0 -16 7 -16 16 0 17 22 14 28 -4z m142 3 c0 -8 -7 -15 -15 -15 -16 0 -20 12 -8 23 11 12 23 8 23 -8z m150 0 c0 -8 -7 -15 -15 -15 -16 0 -20 12 -8 23 11 12 23 8 23 -8z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m148 -3 c2 -7 -3 -12 -12 -12 -9 0 -16 7 -16 16 0 17 22 14 28 -4z m142 3 c0 -8 -4 -15 -10 -15 -5 0 -10 7 -10 15 0 8 5 15 10 15 6 0 10 -7 10 -15z m150 0 c0 -8 -7 -15 -15 -15 -16 0 -20 12 -8 23 11 12 23 8 23 -8z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m148 -3 c2 -7 -3 -12 -12 -12 -9 0 -16 7 -16 16 0 17 22 14 28 -4z m150 0 c2 -7 -3 -12 -12 -12 -9 0 -16 7 -16 16 0 17 22 14 28 -4z m142 3 c0 -8 -7 -15 -15 -15 -16 0 -20 12 -8 23 11 12 23 8 23 -8z m-7810 -80 c0 -8 -7 -15 -15 -15 -16 0 -20 12 -8 23 11 12 23 8 23 -8z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m140 0 c0 -8 -4 -15 -10 -15 -5 0 -10 7 -10 15 0 8 5 15 10 15 6 0 10 -7 10 -15z m150 0 c0 -8 -7 -15 -15 -15 -16 0 -20 12 -8 23 11 12 23 8 23 -8z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m148 -3 c2 -7 -3 -12 -12 -12 -9 0 -16 7 -16 16 0 17 22 14 28 -4z m142 3 c0 -8 -4 -15 -10 -15 -5 0 -10 7 -10 15 0 8 5 15 10 15 6 0 10 -7 10 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m140 0 c0 -8 -4 -15 -10 -15 -5 0 -10 7 -10 15 0 8 5 15 10 15 6 0 10 -7 10 -15z m150 0 c0 -8 -7 -15 -15 -15 -16 0 -20 12 -8 23 11 12 23 8 23 -8z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m148 -3 c2 -7 -3 -12 -12 -12 -9 0 -16 7 -16 16 0 17 22 14 28 -4z m142 3 c0 -8 -4 -15 -10 -15 -5 0 -10 7 -10 15 0 8 5 15 10 15 6 0 10 -7 10 -15z m150 0 c0 -8 -7 -15 -15 -15 -16 0 -20 12 -8 23 11 12 23 8 23 -8z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m148 -3 c2 -7 -3 -12 -12 -12 -9 0 -16 7 -16 16 0 17 22 14 28 -4z m142 3 c0 -8 -7 -15 -15 -15 -16 0 -20 12 -8 23 11 12 23 8 23 -8z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m148 -3 c2 -7 -3 -12 -12 -12 -9 0 -16 7 -16 16 0 17 22 14 28 -4z m142 3 c0 -8 -4 -15 -10 -15 -5 0 -10 7 -10 15 0 8 5 15 10 15 6 0 10 -7 10 -15z m150 0 c0 -8 -7 -15 -15 -15 -16 0 -20 12 -8 23 11 12 23 8 23 -8z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m148 -3 c2 -7 -3 -12 -12 -12 -9 0 -16 7 -16 16 0 17 22 14 28 -4z m142 3 c0 -8 -7 -15 -15 -15 -16 0 -20 12 -8 23 11 12 23 8 23 -8z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m148 -3 c2 -7 -3 -12 -12 -12 -9 0 -16 7 -16 16 0 17 22 14 28 -4z m142 3 c0 -8 -4 -15 -10 -15 -5 0 -10 7 -10 15 0 8 5 15 10 15 6 0 10 -7 10 -15z m150 0 c0 -8 -7 -15 -15 -15 -16 0 -20 12 -8 23 11 12 23 8 23 -8z m-7930 -80 c0 -8 -4 -15 -10 -15 -5 0 -10 7 -10 15 0 8 5 15 10 15 6 0 10 -7 10 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m148 -3 c2 -7 -3 -12 -12 -12 -9 0 -16 7 -16 16 0 17 22 14 28 -4z m142 3 c0 -8 -4 -15 -9 -15 -13 0 -22 16 -14 24 11 11 23 6 23 -9z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m140 0 c0 -8 -4 -15 -10 -15 -5 0 -10 7 -10 15 0 8 5 15 10 15 6 0 10 -7 10 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m148 -3 c2 -7 -3 -12 -12 -12 -9 0 -16 7 -16 16 0 17 22 14 28 -4z m142 3 c0 -8 -4 -15 -10 -15 -5 0 -10 7 -10 15 0 8 5 15 10 15 6 0 10 -7 10 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m140 0 c0 -8 -4 -15 -10 -15 -5 0 -10 7 -10 15 0 8 5 15 10 15 6 0 10 -7 10 -15z m150 0 c0 -8 -7 -15 -15 -15 -16 0 -20 12 -8 23 11 12 23 8 23 -8z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m140 0 c0 -8 -4 -15 -10 -15 -5 0 -10 7 -10 15 0 8 5 15 10 15 6 0 10 -7 10 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m142 0 c0 -5 -5 -11 -11 -13 -6 -2 -11 4 -11 13 0 9 5 15 11 13 6 -2 11 -8 11 -13z m148 0 c0 -8 -7 -15 -15 -15 -16 0 -20 12 -8 23 11 12 23 8 23 -8z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m140 0 c0 -8 -4 -15 -10 -15 -5 0 -10 7 -10 15 0 8 5 15 10 15 6 0 10 -7 10 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m150 0 c0 -8 -7 -15 -15 -15 -8 0 -15 7 -15 15 0 8 7 15 15 15 8 0 15 -7 15 -15z m148 -3 c2 -7 -3 -12 -12 -12 -9 0 -16 7 -16 16 0 17 22 14 28 -4z m142 3 c0 -8 -4 -15 -9 -15 -13 0 -22 16 -14 24 11 11 23 6 23 -9z"}),i.a.createElement("path",{d:"M1832 3270 c0 -14 2 -19 5 -12 2 6 2 18 0 25 -3 6 -5 1 -5 -13z"}),i.a.createElement("path",{d:"M9002 2003 c48 -2 129 -2 180 0 51 1 12 3 -87 3 -99 0 -141 -2 -93 -3z"}),i.a.createElement("path",{d:"M2510 2165 c0 -8 7 -15 15 -15 8 0 15 7 15 15 0 8 -7 15 -15 15 -8 0 -15 -7 -15 -15z"}),i.a.createElement("path",{d:"M2660 2166 c0 -9 7 -16 16 -16 17 0 14 22 -4 28 -7 2 -12 -3 -12 -12z"}),i.a.createElement("path",{d:"M2810 2166 c0 -9 7 -16 16 -16 17 0 14 22 -4 28 -7 2 -12 -3 -12 -12z"}),i.a.createElement("path",{d:"M2957 2174 c-13 -13 -7 -24 14 -24 11 0 19 5 17 12 -5 14 -22 21 -31 12z"}),i.a.createElement("path",{d:"M3107 2173 c-12 -11 -8 -23 8 -23 8 0 15 7 15 15 0 16 -12 20 -23 8z"}),i.a.createElement("path",{d:"M3257 2173 c-12 -11 -8 -23 8 -23 8 0 15 7 15 15 0 16 -12 20 -23 8z"}),i.a.createElement("path",{d:"M3400 2165 c0 -8 7 -15 15 -15 8 0 15 7 15 15 0 8 -7 15 -15 15 -8 0 -15 -7 -15 -15z"}),i.a.createElement("path",{d:"M3550 2165 c0 -8 7 -15 15 -15 8 0 15 7 15 15 0 8 -7 15 -15 15 -8 0 -15 -7 -15 -15z"}),i.a.createElement("path",{d:"M3700 2166 c0 -9 7 -16 16 -16 17 0 14 22 -4 28 -7 2 -12 -3 -12 -12z"}),i.a.createElement("path",{d:"M3850 2166 c0 -9 7 -16 16 -16 17 0 14 22 -4 28 -7 2 -12 -3 -12 -12z"}),i.a.createElement("path",{d:"M3997 2173 c-12 -11 -8 -23 8 -23 8 0 15 7 15 15 0 16 -12 20 -23 8z"}),i.a.createElement("path",{d:"M4147 2173 c-12 -11 -8 -23 8 -23 8 0 15 7 15 15 0 16 -12 20 -23 8z"}),i.a.createElement("path",{d:"M4290 2165 c0 -8 7 -15 15 -15 8 0 15 7 15 15 0 8 -7 15 -15 15 -8 0 -15 -7 -15 -15z"}),i.a.createElement("path",{d:"M4440 2165 c0 -8 7 -15 15 -15 8 0 15 7 15 15 0 8 -7 15 -15 15 -8 0 -15 -7 -15 -15z"}),i.a.createElement("path",{d:"M4590 2166 c0 -9 7 -16 16 -16 17 0 14 22 -4 28 -7 2 -12 -3 -12 -12z"}),i.a.createElement("path",{d:"M4740 2166 c0 -9 7 -16 16 -16 17 0 14 22 -4 28 -7 2 -12 -3 -12 -12z"}),i.a.createElement("path",{d:"M4887 2174 c-13 -13 -7 -24 14 -24 11 0 19 5 17 12 -5 14 -22 21 -31 12z"}),i.a.createElement("path",{d:"M5037 2173 c-12 -11 -8 -23 8 -23 8 0 15 7 15 15 0 16 -12 20 -23 8z"}),i.a.createElement("path",{d:"M5187 2173 c-12 -11 -8 -23 8 -23 8 0 15 7 15 15 0 16 -12 20 -23 8z"}),i.a.createElement("path",{d:"M5330 2165 c0 -8 7 -15 15 -15 8 0 15 7 15 15 0 8 -7 15 -15 15 -8 0 -15 -7 -15 -15z"}),i.a.createElement("path",{d:"M5480 2165 c0 -8 7 -15 15 -15 8 0 15 7 15 15 0 8 -7 15 -15 15 -8 0 -15 -7 -15 -15z"}),i.a.createElement("path",{d:"M5630 2166 c0 -9 7 -16 16 -16 17 0 14 22 -4 28 -7 2 -12 -3 -12 -12z"}),i.a.createElement("path",{d:"M5780 2166 c0 -9 7 -16 16 -16 17 0 14 22 -4 28 -7 2 -12 -3 -12 -12z"}),i.a.createElement("path",{d:"M5927 2173 c-12 -11 -8 -23 8 -23 8 0 15 7 15 15 0 16 -12 20 -23 8z"}),i.a.createElement("path",{d:"M6077 2173 c-12 -11 -8 -23 8 -23 8 0 15 7 15 15 0 16 -12 20 -23 8z"}),i.a.createElement("path",{d:"M6220 2165 c0 -8 7 -15 15 -15 8 0 15 7 15 15 0 8 -7 15 -15 15 -8 0 -15 -7 -15 -15z"}),i.a.createElement("path",{d:"M6370 2165 c0 -8 7 -15 15 -15 8 0 15 7 15 15 0 8 -7 15 -15 15 -8 0 -15 -7 -15 -15z"}),i.a.createElement("path",{d:"M6520 2166 c0 -9 7 -16 16 -16 17 0 14 22 -4 28 -7 2 -12 -3 -12 -12z"}),i.a.createElement("path",{d:"M6670 2166 c0 -9 7 -16 16 -16 17 0 14 22 -4 28 -7 2 -12 -3 -12 -12z"}),i.a.createElement("path",{d:"M6817 2174 c-13 -13 -7 -24 14 -24 11 0 19 5 17 12 -5 14 -22 21 -31 12z"}),i.a.createElement("path",{d:"M6967 2173 c-12 -11 -8 -23 8 -23 8 0 15 7 15 15 0 16 -12 20 -23 8z"}),i.a.createElement("path",{d:"M7117 2173 c-12 -11 -8 -23 8 -23 8 0 15 7 15 15 0 16 -12 20 -23 8z"}),i.a.createElement("path",{d:"M7260 2165 c0 -8 7 -15 15 -15 8 0 15 7 15 15 0 8 -7 15 -15 15 -8 0 -15 -7 -15 -15z"}),i.a.createElement("path",{d:"M2177 2063 c-12 -11 -8 -23 8 -23 8 0 15 7 15 15 0 16 -12 20 -23 8z"}),i.a.createElement("path",{d:"M2327 2063 c-12 -11 -8 -23 8 -23 8 0 15 7 15 15 0 16 -12 20 -23 8z"}),i.a.createElement("path",{d:"M2477 2063 c-12 -11 -8 -23 8 -23 8 0 15 7 15 15 0 16 -12 20 -23 8z"}),i.a.createElement("path",{d:"M2620 2056 c0 -9 7 -16 16 -16 17 0 14 22 -4 28 -7 2 -12 -3 -12 -12z"}),i.a.createElement("path",{d:"M2770 2056 c0 -9 7 -16 16 -16 17 0 14 22 -4 28 -7 2 -12 -3 -12 -12z"}),i.a.createElement("path",{d:"M2920 2056 c0 -9 7 -16 16 -16 17 0 14 22 -4 28 -7 2 -12 -3 -12 -12z"}),i.a.createElement("path",{d:"M3065 2060 c-7 -12 2 -30 16 -30 5 0 9 9 9 20 0 21 -15 27 -25 10z"}),i.a.createElement("path",{d:"M3215 2060 c-7 -12 2 -30 16 -30 5 0 9 9 9 20 0 21 -15 27 -25 10z"}),i.a.createElement("path",{d:"M3367 2063 c-12 -11 -8 -23 8 -23 8 0 15 7 15 15 0 16 -12 20 -23 8z"}),i.a.createElement("path",{d:"M3510 2055 c0 -8 7 -15 15 -15 8 0 15 7 15 15 0 8 -7 15 -15 15 -8 0 -15 -7 -15 -15z"}),i.a.createElement("path",{d:"M3660 2050 c0 -13 5 -20 13 -17 6 2 12 10 12 17 0 7 -6 15 -12 18 -8 2 -13 -5 -13 -18z"}),i.a.createElement("path",{d:"M3810 2050 c0 -13 5 -20 13 -17 6 2 12 10 12 17 0 7 -6 15 -12 18 -8 2 -13 -5 -13 -18z"}),i.a.createElement("path",{d:"M3954 2059 c-10 -17 13 -36 27 -22 12 12 4 33 -11 33 -5 0 -12 -5 -16 -11z"}),i.a.createElement("path",{d:"M4105 2060 c-7 -12 2 -30 16 -30 5 0 9 9 9 20 0 21 -15 27 -25 10z"}),i.a.createElement("path",{d:"M4257 2063 c-12 -11 -8 -23 8 -23 8 0 15 7 15 15 0 16 -12 20 -23 8z"}),i.a.createElement("path",{d:"M4407 2063 c-12 -11 -8 -23 8 -23 8 0 15 7 15 15 0 16 -12 20 -23 8z"}),i.a.createElement("path",{d:"M4550 2056 c0 -9 7 -16 16 -16 17 0 14 22 -4 28 -7 2 -12 -3 -12 -12z"}),i.a.createElement("path",{d:"M4700 2056 c0 -9 7 -16 16 -16 17 0 14 22 -4 28 -7 2 -12 -3 -12 -12z"}),i.a.createElement("path",{d:"M4850 2050 c0 -13 5 -20 13 -17 6 2 12 10 12 17 0 7 -6 15 -12 18 -8 2 -13 -5 -13 -18z"}),i.a.createElement("path",{d:"M4994 2059 c-3 -6 -1 -16 5 -22 9 -9 14 -8 21 3 9 15 4 30 -10 30 -5 0 -12 -5 -16 -11z"}),i.a.createElement("path",{d:"M5147 2063 c-12 -11 -8 -23 8 -23 8 0 15 7 15 15 0 16 -12 20 -23 8z"}),i.a.createElement("path",{d:"M5297 2063 c-12 -11 -8 -23 8 -23 8 0 15 7 15 15 0 16 -12 20 -23 8z"}),i.a.createElement("path",{d:"M5440 2055 c0 -8 7 -15 15 -15 8 0 15 7 15 15 0 8 -7 15 -15 15 -8 0 -15 -7 -15 -15z"}),i.a.createElement("path",{d:"M5590 2056 c0 -9 7 -16 16 -16 9 0 14 5 12 12 -6 18 -28 21 -28 4z"}),i.a.createElement("path",{d:"M5740 2056 c0 -9 7 -16 16 -16 9 0 14 5 12 12 -6 18 -28 21 -28 4z"}),i.a.createElement("path",{d:"M5886 2062 c-2 -4 -1 -14 4 -22 7 -11 12 -12 21 -3 6 6 8 16 5 22 -8 13 -23 14 -30 3z"}),i.a.createElement("path",{d:"M6035 2060 c-8 -13 4 -32 16 -25 12 8 12 35 0 35 -6 0 -13 -4 -16 -10z"}),i.a.createElement("path",{d:"M6187 2063 c-12 -11 -8 -23 8 -23 8 0 15 7 15 15 0 16 -12 20 -23 8z"}),i.a.createElement("path",{d:"M6337 2063 c-12 -11 -8 -23 8 -23 8 0 15 7 15 15 0 16 -12 20 -23 8z"}),i.a.createElement("path",{d:"M6480 2056 c0 -9 7 -16 16 -16 9 0 14 5 12 12 -6 18 -28 21 -28 4z"}),i.a.createElement("path",{d:"M6630 2056 c0 -9 7 -16 16 -16 9 0 14 5 12 12 -6 18 -28 21 -28 4z"}),i.a.createElement("path",{d:"M6782 2056 c1 -10 8 -17 13 -17 15 1 12 24 -3 29 -9 3 -13 -2 -10 -12z"}),i.a.createElement("path",{d:"M6924 2059 c-10 -17 13 -36 27 -22 12 12 4 33 -11 33 -5 0 -12 -5 -16 -11z"}),i.a.createElement("path",{d:"M7077 2063 c-12 -11 -8 -23 8 -23 8 0 15 7 15 15 0 16 -12 20 -23 8z"}),i.a.createElement("path",{d:"M8092 3240 c0 -14 2 -19 5 -12 2 6 2 18 0 25 -3 6 -5 1 -5 -13z"})))},Titanic2Icon:function(e){return i.a.createElement(Nt,It({viewBox:"0 0 585 488"},e),i.a.createElement("g",{xmlns:"http://www.w3.org/2000/svg",transform:"translate(0.000000,488.000000) scale(0.100000,-0.100000)",stroke:"none"},i.a.createElement("path",{d:"M3012 4275 c0 -16 2 -22 5 -12 2 9 2 23 0 30 -3 6 -5 -1 -5 -18z"}),i.a.createElement("path",{d:"M3025 4055 c3 -99 8 -249 12 -333 6 -151 6 -153 -15 -159 -23 -6 -26 -21 -16 -85 5 -28 11 -38 25 -38 16 0 19 -8 20 -52 0 -29 6 -179 13 -333 7 -154 11 -283 10 -286 -2 -3 -348 -4 -769 -1 l-765 5 0 -47 0 -46 770 0 770 0 0 -40 0 -40 -102 0 c-168 -1 -1360 -28 -1363 -32 -1 -2 0 -18 2 -35 l5 -33 233 0 c127 0 313 3 413 7 179 6 181 6 186 30 6 20 12 23 56 23 47 0 50 -1 50 -26 l0 -27 92 7 c50 3 144 6 209 6 l118 0 7 35 c5 30 10 35 35 35 26 0 29 -3 29 -31 l0 -32 77 7 c43 4 79 8 80 10 1 1 -4 60 -12 131 -8 72 -28 258 -45 415 -16 157 -33 302 -36 323 -5 35 -4 37 21 37 27 0 28 1 21 46 -3 26 -6 53 -6 60 0 8 -11 14 -25 14 -14 0 -25 1 -26 3 0 1 -18 151 -39 332 l-39 330 4 -180z"}),i.a.createElement("path",{d:"M2020 4065 c-26 -8 -56 -25 -69 -39 l-23 -24 21 -378 c12 -209 24 -407 27 -440 l5 -62 60 -6 59 -7 0 -34 c0 -31 3 -35 25 -35 18 0 25 5 25 20 0 18 7 20 71 20 l72 0 -6 88 c-4 48 -14 260 -24 472 -17 378 -18 385 -40 406 -39 36 -122 44 -203 19z"}),i.a.createElement("path",{d:"M1549 3749 c-15 -5 -30 -19 -35 -30 -7 -15 17 -722 25 -736 0 -2 55 -3 121 -3 89 0 120 3 120 13 0 6 -7 170 -15 362 -8 193 -15 356 -15 363 0 34 -137 54 -201 31z"}),i.a.createElement("path",{d:"M1305 3548 c-54 -12 -75 -33 -70 -72 2 -17 7 -148 10 -291 4 -143 8 -262 10 -264 2 -1 47 11 100 29 l96 32 -7 262 c-6 240 -8 263 -26 282 -23 26 -59 33 -113 22z"}),i.a.createElement("path",{d:"M1060 3388 l-25 -14 3 -199 c3 -215 10 -325 21 -325 4 0 38 11 77 24 l69 23 -3 234 c-3 177 -7 237 -17 248 -19 19 -95 24 -125 9z"}),i.a.createElement("path",{d:"M2460 3091 c0 -48 -1 -49 -35 -55 -19 -4 -35 -11 -35 -17 0 -5 -10 -14 -22 -19 -17 -6 1 -9 62 -9 l86 -1 -10 75 c-8 63 -12 75 -28 75 -15 0 -18 -8 -18 -49z"}),i.a.createElement("path",{d:"M4721 2773 c-1 -219 1 -228 37 -204 11 6 10 42 -8 197 -11 104 -22 196 -24 204 -2 8 -4 -81 -5 -197z"}),i.a.createElement("path",{d:"M1630 2941 c0 -10 7 -22 16 -25 9 -3 137 -6 285 -6 l269 0 0 25 0 25 -285 0 c-273 0 -285 -1 -285 -19z"}),i.a.createElement("path",{d:"M2247 2953 c-4 -3 -7 -17 -7 -30 0 -20 5 -24 23 -21 20 3 23 10 18 48 -1 11 -24 13 -34 3z"}),i.a.createElement("path",{d:"M2300 2930 c0 -25 4 -30 25 -30 20 0 24 4 21 23 -3 12 -5 25 -5 30 -1 4 -10 7 -21 7 -16 0 -20 -7 -20 -30z"}),i.a.createElement("path",{d:"M2360 2930 c0 -23 4 -30 20 -30 16 0 20 7 20 30 0 23 -4 30 -20 30 -16 0 -20 -7 -20 -30z"}),i.a.createElement("path",{d:"M2738 2948 c-8 -24 4 -48 24 -48 15 0 19 6 16 27 -3 29 -33 44 -40 21z"}),i.a.createElement("path",{d:"M1238 2861 c-192 -79 -232 -102 -211 -122 4 -4 101 14 216 39 l207 47 6 31 c3 16 2 44 -3 60 l-8 30 -207 -85z"}),i.a.createElement("path",{d:"M2429 2945 c-7 -32 -1 -50 16 -50 14 0 21 8 23 28 3 22 -1 27 -17 27 -12 0 -21 -2 -22 -5z"}),i.a.createElement("path",{d:"M2492 2923 c2 -17 10 -29 21 -31 13 -3 17 3 17 27 0 25 -4 31 -21 31 -16 0 -20 -5 -17 -27z"}),i.a.createElement("path",{d:"M2550 2920 c0 -23 4 -30 20 -30 16 0 20 7 20 30 0 23 -4 30 -20 30 -16 0 -20 -7 -20 -30z"}),i.a.createElement("path",{d:"M2610 2920 c0 -23 4 -30 20 -30 16 0 20 7 20 30 0 23 -4 30 -20 30 -16 0 -20 -7 -20 -30z"}),i.a.createElement("path",{d:"M2675 2940 c-11 -18 6 -50 26 -50 14 0 19 7 19 30 0 23 -5 30 -19 30 -11 0 -23 -5 -26 -10z"}),i.a.createElement("path",{d:"M745 2765 c-5 -2 -45 -6 -87 -10 l-78 -7 0 -40 0 -41 46 7 c26 3 55 6 65 6 12 0 19 7 19 19 0 14 10 20 40 25 31 5 40 11 40 26 0 19 -17 25 -45 15z"}),i.a.createElement("path",{d:"M1320 2734 c-211 -49 -392 -74 -582 -81 -156 -5 -168 -7 -168 -25 0 -18 8 -18 163 -13 398 14 671 34 744 54 29 8 32 20 18 79 -6 26 4 27 -175 -14z"}),i.a.createElement("path",{d:"M5301 2623 c-13 -39 -17 -43 -55 -47 -104 -13 -2114 -101 -2870 -126 -164 -5 -301 -12 -304 -15 -3 -3 -3 -8 1 -11 15 -15 3228 114 3245 131 2 1 2 27 0 56 l-3 54 -14 -42z"}),i.a.createElement("path",{d:"M570 2545 c0 -16 22 -21 180 -34 334 -29 746 -39 767 -18 3 3 2 18 -1 34 l-6 28 -470 2 c-400 2 -470 0 -470 -12z"}),i.a.createElement("path",{d:"M550 2468 c0 -11 67 -312 76 -341 9 -29 120 -142 213 -216 167 -133 497 -344 688 -439 125 -63 230 -104 438 -172 105 -34 216 -70 248 -80 l59 -19 29 31 c89 98 92 233 6 322 -78 81 -180 86 -254 12 -55 -56 -64 -99 -32 -163 30 -59 73 -86 136 -85 36 1 44 -1 34 -11 -7 -7 -36 -12 -65 -12 -124 0 -208 129 -162 250 22 55 94 121 150 136 88 24 208 -11 293 -85 88 -77 136 -236 114 -382 -6 -42 -9 -79 -6 -82 12 -12 1969 -562 2000 -562 19 0 110 102 134 148 62 121 66 276 12 387 -37 74 -106 141 -185 180 -99 48 -249 28 -339 -46 -76 -62 -113 -197 -84 -300 22 -75 73 -130 157 -173 73 -36 72 -52 -3 -37 -67 13 -94 28 -145 75 -85 79 -120 188 -100 310 29 186 181 313 391 324 72 4 99 1 158 -18 87 -28 200 -100 255 -163 162 -184 222 -543 124 -741 -10 -22 -18 -42 -15 -44 4 -5 284 -82 297 -82 23 0 39 100 63 385 26 320 60 901 81 1419 l7 169 -149 -6 c-1057 -47 -1529 -63 -2254 -78 -554 -12 -1127 -7 -1377 11 -219 15 -687 100 -910 164 -46 13 -83 19 -83 14z"}),i.a.createElement("path",{d:"M1652 2415 c3 -51 9 -70 26 -88 21 -21 32 -22 207 -25 128 -3 185 0 185 7 0 7 -32 11 -87 11 -123 0 -224 16 -247 39 -13 13 -19 34 -19 70 l-1 51 -34 0 -34 0 4 -65z"}),i.a.createElement("path",{d:"M4240 2405 c0 -14 5 -25 10 -25 6 0 10 11 10 25 0 14 -4 25 -10 25 -5 0 -10 -11 -10 -25z"}),i.a.createElement("path",{d:"M3787 2413 c-11 -10 -8 -43 3 -43 6 0 10 11 10 25 0 26 -2 29 -13 18z"}),i.a.createElement("path",{d:"M3314 2376 c-4 -10 -2 -22 4 -28 8 -8 13 -7 18 6 4 10 2 22 -4 28 -8 8 -13 7 -18 -6z"}),i.a.createElement("path",{d:"M3000 2355 c0 -14 5 -25 10 -25 6 0 10 11 10 25 0 14 -4 25 -10 25 -5 0 -10 -11 -10 -25z"}),i.a.createElement("path",{d:"M2770 2351 c0 -11 5 -23 10 -26 6 -4 10 5 10 19 0 14 -4 26 -10 26 -5 0 -10 -9 -10 -19z"})))},IglooIcon:function(e){return i.a.createElement(Nt,It({viewBox:"0 -17 503.87855 503"},e),i.a.createElement("path",{d:"m503.792969 386.136719c-.214844-14.625-1.816407-29.191407-4.78125-43.511719-6.582031-32.152344-19.910157-62.539062-39.101563-89.160156-8.496094-11.820313-18.117187-22.789063-28.730468-32.75-28.5-27.109375-63.710938-46.132813-102.007813-55.113282-14.421875-3.425781-29.164063-5.34375-43.984375-5.722656 0-.078125.046875-.140625.046875-.21875v-46.539062c9.328125 2.910156 19.050781 4.371094 28.824219 4.335937 17.890625-.714843 35.636718-3.527343 52.871094-8.386719 24.800781-5.945312 48.210937-11.5625 71.25-4.910156l.003906.003906c5.222656 1.515626 10.828125-.460937 13.945312-4.917968 3.109375-4.386719 3.019532-10.285156-.21875-14.578125-6.390625-8.6875-13.234375-17.035157-20.5-25.007813 5.921875-5.417968 12.289063-10.332031 19.03125-14.6875 4.058594-2.542968 6.292969-7.199218 5.734375-11.957031-.523437-4.832031-3.785156-8.933594-8.375-10.535156-29.03125-10.273438-57.378906-3.457031-84.792969 3.117187-25.273437 6.0625-49.160156 11.792969-72.625 4.496094-1.675781-.484375-3.410156-.710938-5.152343-.671875v-20.589844c0-4.636719-3.757813-8.394531-8.394531-8.394531-4.636719 0-8.394532 3.757812-8.394532 8.394531v150.832031c0 .125.066406.226563.074219.351563-53.320313 2.226563-104 23.800781-142.5625 60.6875l-.160156.164063-.023438.023437c-12.035156 11.382813-22.796875 24.039063-32.101562 37.746094-5.042969 7.367187-9.613281 15.046875-13.683594 22.988281-8.074219 15.296875-14.335937 31.484375-18.65625 48.234375-3.425781 1.089844-6.726563 2.542969-9.847656 4.332031-29.277344 16.832032-49.476563 63.441406-51.4687502 118.730469-.1718748 4.511719 1.5117192 8.894531 4.6601562 12.128906 3.1875 3.292969 7.570313 5.15625 12.152344 5.167969h461.453125c13.902344-.015625 25.167968-11.277344 25.179687-25.179688v-52.488281c.230469-.667969.371094-1.367187.421875-2.070312 0-1.597657-.007812-3.199219-.085937-4.34375zm-462.644531-19.054688 9.132812 16.367188c-2.882812 5.9375-5.386719 12.054687-7.496094 18.308593-.0625.195313-.125.398438-.179687.605469-.820313 2.386719-1.445313 4.917969-2.160157 7.386719l-15.429687-7.683594c3.554687-12.417968 8.996094-24.214844 16.132813-34.980468zm17.496093 40.261719c.070313-.199219.128907-.410156.1875-.621094 9.605469-27.585937 16.496094-28.832031 16.5625-28.832031 2.9375 0 5.90625 5.085937 11.777344 17.214844l.121094.285156.027343.0625c.046876.117187.09375.234375.148438.347656 8.15625 18.148438 12.539062 37.769531 12.875 57.664063l-49.832031.042968c.4375-15.703124 3.175781-31.253906 8.132812-46.164062zm44.261719-18.171875c-.035156-.101563-.085938-.199219-.128906-.300781l-.046875-.113282c-.046875-.109374-.085938-.222656-.140625-.332031-.757813-1.570312-1.496094-3.085937-2.234375-4.578125l9.222656-16.546875c7.105469 10.71875 12.542969 22.453125 16.128906 34.804688l-15.171875 7.582031c-1.980468-7.03125-4.535156-13.894531-7.628906-20.515625zm-10.277344-95.214844h41.519532v33.574219h-54.804688c3.433594-11.558594 7.878906-22.792969 13.285156-33.574219zm125.453125 0v41.96875h-40.570312c-7.84375-5.34375-17.085938-8.261719-26.578125-8.394531v-33.574219zm100.722657-113.375v37.835938h-83.9375v-37.148438c27.632812-6.035156 56.210937-6.269531 83.9375-.6875zm145.792968 113.375c6.605469 13.417969 11.808594 27.480469 15.527344 41.96875h-60.601562v-41.96875zm-61.859375 41.96875h-67.148437v-41.96875h67.148437zm-117.507812 58.753907v-41.96875h75.539062v41.96875zm33.574219-100.722657v41.96875h-83.9375v-41.96875zm-33.574219-16.785156v-41.96875h75.539062v41.96875zm50.359375-58.753906v-33.726563c24.167968 7.019532 46.828125 18.457032 66.832031 33.726563zm-117.507813 0h-63.390625c19.058594-14.53125 40.511719-25.621094 63.390625-32.765625zm50.359375 16.785156v41.96875h-75.539062v-41.96875zm-148.664062 117.378906c-2.292969-2.914062-4.78125-5.675781-7.4375-8.265625h38.59375c19.304687 0 36.988281 20.132813 47.800781 50.359375h-57.746094c-4.558593-15.160156-11.738281-29.40625-21.210937-42.09375zm75.574218.128907h73.089844v41.964843h-51.859375c-4.550781-15.128906-11.738281-29.335937-21.230469-41.964843zm123.453126 58.753906v41.96875h-92.519532c0-.167969.035156-.328125.03125-.496094-.484375-13.953125-2.234375-27.835938-5.238281-41.472656zm16.785156 0h67.148437v41.96875h-67.148437zm41.96875-16.785156v-41.96875h67.144531v41.96875zm83.933594-41.96875h22.140624c1.894532 10.691406 2.996094 21.507812 3.285157 32.363281-.113281.398437-.195313.800781-.246094 1.210937v8.394532h-25.179687zm-16.789063-91.425782v15.886719h-67.144531v-41.96875h44.300781c8.324219 8.042969 15.96875 16.765625 22.84375 26.082031zm-159.304687-215.15625c27.894531 8.65625 55.160156 2.121094 81.527343-4.207031 23.234375-5.582031 45.316407-10.882813 67.015625-5.996094-5.960937 4.417969-11.65625 9.183594-17.058594 14.269531-2.449218 2.28125-3.890624 5.445313-4.003906 8.792969-.109375 3.34375 1.113282 6.597657 3.402344 9.039063 5.28125 5.625 10.285156 11.40625 15.136719 17.496094-23.332031-3.59375-46.210938 1.894531-68.40625 7.21875-27.152344 6.511718-52.789063 12.664062-77.777344 2.632812zm-150.222657 189.074219h40.9375v41.96875h-67.144531v-11.066406c7.730469-11.109375 16.507812-21.457031 26.207031-30.902344zm-59.78125 109.117187c8.398438.316407 16.398438 3.671876 22.511719 9.441407l-7.761719 13.929687c-3.726562-4.234375-9.109375-6.640625-14.75-6.585937-5.582031.195312-10.839843 2.664062-14.558593 6.828125l-7.910157-14.183594c2.160157-1.882812 4.488281-3.566406 6.957031-5.027344 4.683594-2.824218 10.039063-4.34375 15.511719-4.402344zm-58.601562 109.214844c.398437-11.691406 1.753906-23.324218 4.042969-34.792968l15.683593 7.820312c-1.550781 8.910156-2.484375 17.914062-2.792969 26.953125zm100.335937-.085937c-.300781-9.023438-1.21875-18.015625-2.738281-26.914063l15.425781-7.710937c2.332032 11.402343 3.71875 22.980469 4.140625 34.609375zm67.378906-.015625h-33.726562l-.007812-.507813c-.484376-13.953125-2.25-27.828125-5.265626-41.460937h58.285157c3.328125 13.757812 5.242187 27.820312 5.710937 41.96875zm293.769532 0h-58.753906v-41.96875h67.148437v33.574218c-.007813 4.632813-3.761719 8.386719-8.394531 8.394532zm0 0"}))},BurningIcon:function(e){return i.a.createElement(Nt,It({viewBox:"0 0 600 600"},e),i.a.createElement("g",null,i.a.createElement("path",{d:"m381.148 160.07s-20.652 54.278-59.78 42.54c-32.684-9.805-30.809-54.137-15.091-90.711 27.233-63.371-50.539-111.899-50.539-111.899s1.216 64.276-48.22 88.759c-42.359 20.979-53.983 66.736-34.241 100.91 18.305 31.686-1.109 50.899-18.157 57.743-43.368 17.412-68.606-36.458-68.606-36.458-18.246 29.978-28.742 65.182-28.742 102.837 0 108.984 87.953 197.393 196.749 198.189-49.745-.791-89.989-41.476-90.036-91.396-.229-19.778 4.514-40.885 14.095-62.737l5.293-12.072 26.814 7.837c4.302-21.175 15.154-40.033 31.966-55.284 15.853-14.381 31.32-20.48 33.032-21.128l18.258-6.914 1.977 19.423c2.021 19.872 7.155 36.313 15.692 50.264 7.657 12.494 14.76 22.975 23.066 34.865 8.363 11.994 12.922 28.219 12.845 45.7-.008 24.425-9.528 47.39-26.809 64.67-17.276 17.278-40.259 26.792-64.717 26.792h.003c109.478 0 198.228-88.729 198.228-198.208 0-62.019-28.49-117.386-73.08-153.722z"}),i.a.createElement("path",{d:"m317.522 420.435c.054-11.202-2.66-21.562-7.445-28.425-7.448-10.661-15.522-22.454-24.05-36.367-7.479-12.221-12.894-25.697-16.366-40.809-13.545 9.978-30.488 28.421-31.059 58.467l-.373 19.617-36.971-10.806c-4.647 13.453-6.922 26.255-6.775 38.194l.001.185c.013 33.927 27.606 61.509 61.512 61.509 16.444 0 31.895-6.394 43.505-18.003 11.621-11.622 18.021-27.066 18.021-43.49z"})))},AirdropIcon:function(e){return i.a.createElement(Nt,It({viewBox:"0 0 24 24"},e),i.a.createElement("path",{d:"M21.2,10.95L12,23L2.78,10.96L2.87,10.88C3.08,10.67 3.33,10.5 3.58,10.36L10.73,19.69L8.58,13L9.24,11.81L12,20.38L14.73,11.8L15.4,13L13.27,19.69L20.41,10.35C20.66,10.5 20.9,10.64 21.1,10.85L21.2,10.95M5,9C6.5,9 7.81,9.86 8.5,11.1C9.17,9.86 10.47,9 12,9C13.5,9 14.8,9.85 15.5,11.09C16.16,9.84 17.47,9 19,9C20.09,9 21.09,9.42 21.81,10.14C20.94,5.5 16.88,2 12,2C7.09,2 3.03,5.5 2.16,10.17C2.89,9.45 3.89,9 5,9Z"}))},ChartIcon:function(e){return i.a.createElement(Nt,It({viewBox:"0 0 26 26"},e),i.a.createElement("path",{d:"M22,21H2V3H4V19H6V10H10V19H12V6H16V19H18V14H22V21Z"}))},FaucetIcon:function(e){return i.a.createElement(Nt,It({viewBox:"0 0 24 24"},e),i.a.createElement("path",{d:"M12,3.77L11.25,4.61C11.25,4.61 9.97,6.06 8.68,7.94C7.39,9.82 6,12.07 6,14.23A6,6 0 0,0 12,20.23A6,6 0 0,0 18,14.23C18,12.07 16.61,9.82 15.32,7.94C14.03,6.06 12.75,4.61 12.75,4.61L12,3.77M12,6.9C12.44,7.42 12.84,7.85 13.68,9.07C14.89,10.83 16,13.07 16,14.23C16,16.45 14.22,18.23 12,18.23C9.78,18.23 8,16.45 8,14.23C8,13.07 9.11,10.83 10.32,9.07C11.16,7.85 11.56,7.42 12,6.9Z"}))},GitbookIcon:function(e){return i.a.createElement(Nt,It({viewBox:"0 0 24 24"},e),i.a.createElement("path",{d:"M10.802 17.77a.703.703 0 11-.002 1.406.703.703 0 01.002-1.406m11.024-4.347a.703.703 0 11.001-1.406.703.703 0 01-.001 1.406m0-2.876a2.176 2.176 0 00-2.174 2.174c0 .233.039.465.115.691l-7.181 3.823a2.165 2.165 0 00-1.784-.937c-.829 0-1.584.475-1.95 1.216l-6.451-3.402c-.682-.358-1.192-1.48-1.138-2.502.028-.533.212-.947.493-1.107.178-.1.392-.092.62.027l.042.023c1.71.9 7.304 3.847 7.54 3.956.363.169.565.237 1.185-.057l11.564-6.014c.17-.064.368-.227.368-.474 0-.342-.354-.477-.355-.477-.658-.315-1.669-.788-2.655-1.25-2.108-.987-4.497-2.105-5.546-2.655-.906-.474-1.635-.074-1.765.006l-.252.125C7.78 6.048 1.46 9.178 1.1 9.397.457 9.789.058 10.57.006 11.539c-.08 1.537.703 3.14 1.824 3.727l6.822 3.518a2.175 2.175 0 002.15 1.862 2.177 2.177 0 002.173-2.14l7.514-4.073c.38.298.853.461 1.337.461A2.176 2.176 0 0024 12.72a2.176 2.176 0 00-2.174-2.174"}))},GithubIcon:function(e){return i.a.createElement(Nt,It({viewBox:"0 0 24 24"},e),i.a.createElement("path",{d:"m12 .5c-6.63 0-12 5.28-12 11.792 0 5.211 3.438 9.63 8.205 11.188.6.111.82-.254.82-.567 0-.28-.01-1.022-.015-2.005-3.338.711-4.042-1.582-4.042-1.582-.546-1.361-1.335-1.725-1.335-1.725-1.087-.731.084-.716.084-.716 1.205.082 1.838 1.215 1.838 1.215 1.07 1.803 2.809 1.282 3.495.981.108-.763.417-1.282.76-1.577-2.665-.295-5.466-1.309-5.466-5.827 0-1.287.465-2.339 1.235-3.164-.135-.298-.54-1.497.105-3.121 0 0 1.005-.316 3.3 1.209.96-.262 1.98-.392 3-.398 1.02.006 2.04.136 3 .398 2.28-1.525 3.285-1.209 3.285-1.209.645 1.624.24 2.823.12 3.121.765.825 1.23 1.877 1.23 3.164 0 4.53-2.805 5.527-5.475 5.817.42.354.81 1.077.81 2.182 0 1.578-.015 2.846-.015 3.229 0 .309.21.678.825.56 4.801-1.548 8.236-5.97 8.236-11.173 0-6.512-5.373-11.792-12-11.792z"}))},MediumIcon:function(e){return i.a.createElement(Nt,It({viewBox:"0 0 24 24"},e),i.a.createElement("path",{d:"m7.996 21.324c0 .695-.521.982-1.098.695l-6.228-3.113c-.188-.089-.346-.238-.475-.447s-.195-.417-.195-.622v-15.227c0-.568.341-.825 1.112-.441l6.844 3.42c.099.099.026-.581.04 15.735zm.857-14.32 7.152 11.568-7.152-3.553zm15.147.241v14.079c0 .223-.062.403-.188.541-.125.138-.295.207-.509.207s-.424-.058-.629-.174l-5.906-2.939zm-.04-1.603c0 .027-1.145 1.895-3.435 5.603s-3.632 5.88-4.025 6.512l-5.223-8.469 4.339-7.039c.236-.388.72-.456 1.045-.294l7.246 3.607c.035.017.053.044.053.08z"}))},RedditIcon:function(e){return i.a.createElement(Nt,It({viewBox:"0 0 24 24"},e),i.a.createElement("path",{d:"M14.238 15.348c.085.084.085.221 0 .306-.465.462-1.194.687-2.231.687l-.008-.002-.008.002c-1.036 0-1.766-.225-2.231-.688-.085-.084-.085-.221 0-.305.084-.084.222-.084.307 0 .379.377 1.008.561 1.924.561l.008.002.008-.002c.915 0 1.544-.184 1.924-.561.085-.084.223-.084.307 0zm-3.44-2.418c0-.507-.414-.919-.922-.919-.509 0-.923.412-.923.919 0 .506.414.918.923.918.508.001.922-.411.922-.918zm13.202-.93c0 6.627-5.373 12-12 12s-12-5.373-12-12 5.373-12 12-12 12 5.373 12 12zm-5-.129c0-.851-.695-1.543-1.55-1.543-.417 0-.795.167-1.074.435-1.056-.695-2.485-1.137-4.066-1.194l.865-2.724 2.343.549-.003.034c0 .696.569 1.262 1.268 1.262.699 0 1.267-.566 1.267-1.262s-.568-1.262-1.267-1.262c-.537 0-.994.335-1.179.804l-2.525-.592c-.11-.027-.223.037-.257.145l-.965 3.038c-1.656.02-3.155.466-4.258 1.181-.277-.255-.644-.415-1.05-.415-.854.001-1.549.693-1.549 1.544 0 .566.311 1.056.768 1.325-.03.164-.05.331-.05.5 0 2.281 2.805 4.137 6.253 4.137s6.253-1.856 6.253-4.137c0-.16-.017-.317-.044-.472.486-.261.82-.766.82-1.353zm-4.872.141c-.509 0-.922.412-.922.919 0 .506.414.918.922.918s.922-.412.922-.918c0-.507-.413-.919-.922-.919z"}))},YoutubeIcon:function(e){return i.a.createElement(Nt,It({viewBox:"0 0 18 18"},e),i.a.createElement("path",{d:"M17.6242 4.85293C17.5199 4.49635 17.3209 4.17147 17.0465 3.90969C16.772 3.64791 16.4314 3.45809 16.0576 3.35857C14.6546 3.00001 9.00801 3.00001 9.00801 3.00001C9.00801 3.00001 3.37567 2.99285 1.95839 3.35857C1.58457 3.45809 1.24399 3.64791 0.969559 3.90969C0.69513 4.17147 0.496134 4.49635 0.391808 4.85293C0.125849 6.22313 -0.00526955 7.61404 0.000162055 9.00752C-0.00424273 10.3957 0.126872 11.7813 0.391808 13.1464C0.496134 13.5029 0.69513 13.8278 0.969559 14.0896C1.24399 14.3514 1.58457 14.5412 1.95839 14.6407C3.35991 15 9.00801 15 9.00801 15C9.00801 15 14.6396 15 16.0576 14.6407C16.4314 14.5412 16.772 14.3514 17.0465 14.0896C17.3209 13.8278 17.5199 13.5029 17.6242 13.1464C17.8836 11.7808 18.0092 10.3952 17.9994 9.00752C18.0102 7.61454 17.8846 6.22363 17.6242 4.85293ZM7.20584 11.5776V6.4296L11.9056 9.00752L7.20584 11.5776Z"}))},LinkedinIcon:function(e){return i.a.createElement(Nt,It({viewBox:"0 0 24 24"},e),i.a.createElement("path",{d:"M19 0h-14c-2.761 0-5 2.239-5 5v14c0 2.761 2.239 5 5 5h14c2.762 0 5-2.239 5-5v-14c0-2.761-2.238-5-5-5zm-11 19h-3v-11h3v11zm-1.5-12.268c-.966 0-1.75-.79-1.75-1.764s.784-1.764 1.75-1.764 1.75.79 1.75 1.764-.783 1.764-1.75 1.764zm13.5 12.268h-3v-5.604c0-3.368-4-3.113-4 0v5.604h-3v-11h3v1.765c1.396-2.586 7-2.777 7 2.476v6.759z"}))},DiscordIcon:function(e){return i.a.createElement(Nt,It({viewBox:"0 0 20 16"},e),i.a.createElement("path",{d:"M16.93 1.644A16.491 16.491 0 0012.86.38a.062.062 0 00-.066.031c-.175.313-.37.72-.506 1.041a15.226 15.226 0 00-4.573 0A10.54 10.54 0 007.2.412a.064.064 0 00-.065-.031 16.447 16.447 0 00-4.07 1.263.058.058 0 00-.028.023C.444 5.54-.266 9.319.083 13.05a.069.069 0 00.026.047 16.584 16.584 0 004.994 2.525.064.064 0 00.07-.023c.385-.526.728-1.08 1.022-1.662a.063.063 0 00-.035-.088 10.917 10.917 0 01-1.56-.744.064.064 0 01-.007-.106c.105-.079.21-.16.31-.243a.062.062 0 01.065-.009c3.273 1.495 6.817 1.495 10.051 0a.062.062 0 01.066.008c.1.083.204.165.31.244a.064.064 0 01-.005.106c-.499.291-1.017.537-1.561.743a.064.064 0 00-.034.089c.3.582.643 1.135 1.02 1.66a.063.063 0 00.07.025 16.53 16.53 0 005.003-2.525.064.064 0 00.026-.046c.417-4.314-.699-8.061-2.957-11.384a.05.05 0 00-.026-.023zM6.684 10.778c-.985 0-1.797-.905-1.797-2.016 0-1.11.796-2.015 1.797-2.015 1.01 0 1.814.912 1.798 2.015 0 1.111-.796 2.016-1.798 2.016zm6.646 0c-.986 0-1.797-.905-1.797-2.016 0-1.11.796-2.015 1.797-2.015 1.009 0 1.813.912 1.797 2.015 0 1.111-.788 2.016-1.797 2.016z"}))},AnalyticsIcon:function(e){return i.a.createElement(Nt,It({viewBox:"0 0 26 26"},e),i.a.createElement("path",{d:"M13,2.05V5.08C16.39,5.57 19,8.47 19,12C19,12.9 18.82,13.75 18.5,14.54L21.12,16.07C21.68,14.83 22,13.45 22,12C22,6.82 18.05,2.55 13,2.05M12,19A7,7 0 0,1 5,12C5,8.47 7.61,5.57 11,5.08V2.05C5.94,2.55 2,6.81 2,12A10,10 0 0,0 12,22C15.3,22 18.23,20.39 20.05,17.91L17.45,16.38C16.17,18 14.21,19 12,19Z"}))},BridgeIcon:function(e){return i.a.createElement(Nt,It({viewBox:"0 0 50 50"},e),i.a.createElement("path",{d:"M43.313,29.373v-3.022v-2.864c0-0.426-0.193-0.822-0.523-1.088c-0.557-0.45-1.133-0.877-1.725-1.283\r\n c-0.9-0.618-1.838-1.182-2.813-1.69v-1.887c0-0.621-0.502-1.124-1.123-1.124l0,0c-0.621,0-1.123,0.503-1.123,1.124v0.838\r\n c-1.725-0.712-3.539-1.255-5.418-1.606v-1.28c0-0.615-0.475-1.152-1.09-1.171c-0.637-0.02-1.16,0.492-1.16,1.124v1.001\r\n c-0.941-0.099-1.895-0.148-2.862-0.148c-0.845,0-1.68,0.039-2.505,0.114v-0.919c0-0.615-0.476-1.152-1.09-1.171\r\n c-0.638-0.02-1.16,0.492-1.16,1.124v1.264c-1.896,0.329-3.726,0.849-5.467,1.546v-0.666c0-0.614-0.476-1.151-1.091-1.171\r\n c-0.637-0.02-1.16,0.492-1.16,1.124v1.728c-0.941,0.478-1.853,1.009-2.729,1.587c-0.575,0.38-1.137,0.782-1.682,1.205\r\n c-0.341,0.266-0.545,0.671-0.545,1.104v2.723v3.147c-0.341,0.276-0.677,0.564-1.004,0.858c-1.342,1.201-1.387,3.289-0.111,4.564\r\n l0.083,0.083c1.191,1.191,3.098,1.219,4.355,0.1c3.745-3.345,8.688-5.378,14.104-5.378c5.524,0,10.551,2.112,14.323,5.576\r\n c1.254,1.15,3.18,1.134,4.385-0.071l0.084-0.083c1.262-1.261,1.236-3.32-0.072-4.528C43.904,29.885,43.611,29.624,43.313,29.373z\r\n M10.295,27.379v-3.016c0-0.424,0.195-0.827,0.528-1.093c0.696-0.557,1.423-1.073,2.18-1.548v4.083\r\n C12.07,26.281,11.167,26.806,10.295,27.379z M15.254,20.476c1.716-0.83,3.55-1.459,5.467-1.856v4.624\r\n c-1.896,0.33-3.726,0.85-5.467,1.545V20.476z M22.971,22.949v-4.676c0.822-0.087,1.657-0.135,2.505-0.135\r\n c0.969,0,1.922,0.059,2.862,0.174v4.67c-0.941-0.097-1.895-0.147-2.862-0.147C24.631,22.835,23.796,22.876,22.971,22.949z\r\n M30.586,18.697c1.904,0.423,3.721,1.077,5.416,1.93v4.288c-1.723-0.713-3.539-1.256-5.416-1.608V18.697z M38.252,25.965v-4.047\r\n c0.807,0.522,1.576,1.096,2.313,1.71c0.314,0.266,0.5,0.657,0.5,1.071v2.957C40.162,27.038,39.227,26.474,38.252,25.965z"}))}}),Na=Object(o.e)(on)(Ca||(Ca=St(["\n color: ",";\n padding: 0 8px;\n border-radius: 8px;\n"],["\n color: ",";\n padding: 0 8px;\n border-radius: 8px;\n"])),(function(e){return e.theme.colors.borderColor}));Na.defaultProps={variant:"text",size:"sm"};var Ta,Qa,Da,ja,Ua,La,Fa=Object(o.e)(wt.b)(Ta||(Ta=St(["\n display: flex;\n align-items: center;\n .mobile-icon {\n width: 32px;\n "," {\n display: none;\n }\n }\n .desktop-icon {\n width: 250px;\n display: none;\n svg {\n width: 50px;\n }\n "," {\n display: flex;\n }\n }\n"],["\n display: flex;\n align-items: center;\n .mobile-icon {\n width: 32px;\n "," {\n display: none;\n }\n }\n .desktop-icon {\n width: 250px;\n display: none;\n svg {\n width: 50px;\n }\n "," {\n display: flex;\n }\n }\n"])),(function(e){return e.theme.mediaQueries.nav}),(function(e){return e.theme.mediaQueries.nav})),Ha=Object(o.e)(Wn)(Qa||(Qa=St(["\n align-items: center; \n span {\n margin-left: 15px;\n text-transform: upper-case;\n color: ",";\n text-shadow: 0 0 20px ",";\n font-size: 1.5em;\n }\n"],["\n align-items: center; \n span {\n margin-left: 15px;\n text-transform: upper-case;\n color: ",";\n text-shadow: 0 0 20px ",";\n font-size: 1.5em;\n }\n"])),(function(e){return e.theme.colors.text}),(function(e){return e.theme.colors.contrast})),Ja=Object(o.e)(Wn)(Da||(Da=St(["\n align-items: center;\n"],["\n align-items: center;\n"]))),qa=function(e){var t=e.isPushed,n=e.togglePush;e.isDark;var r=e.href,o=r.startsWith("http"),a=i.a.createElement(i.a.Fragment,null,i.a.createElement(Un,{className:"mobile-icon"}),i.a.createElement(Ha,{className:"desktop-icon"},i.a.createElement(Un,null),i.a.createElement("span",null,"COUGAR SWAP")));return i.a.createElement(Ja,null,i.a.createElement(Na,{"aria-label":"Toggle menu",onClick:n,mr:"24px"},t?i.a.createElement(Pa,{width:"24px",color:"textSubtle"}):i.a.createElement(Ma,{width:"24px",color:"textSubtle"})),o?i.a.createElement(Fa,{as:"a",href:r,"aria-label":"Pancake home page"},a):i.a.createElement(Fa,{to:r,"aria-label":"Pancake home page"},a))},Ga=[{label:"Github",icon:"GithubIcon",href:"https://github.com/cougarswap"},{label:"Gitbook",icon:"GitbookIcon",href:"https://cougarecosystem.gitbook.io/arbicougarswap/"},{label:"Telegram",icon:"TelegramIcon",items:[{label:"English",href:"https://t.me/CougarSwap_Multichain_Official"},{label:"Announcements",href:"https://t.me/CougarSwap_Official_ANN"}]},{label:"Twitter",icon:"TwitterIcon",href:"https://twitter.com/cougarswap"},{label:"Discord",icon:"DiscordIcon",href:"https://discord.gg/5JNWQNZafU"},{label:"Medium",icon:"MediumIcon",href:"https://cougarinsight.medium.com/"}],za=Object(o.f)(ja||(ja=St(["\n 0%,\n 100% {\n background-position: 0 0;\n }\n 50% {\n background-position: 100% 0;\n }\n"],["\n 0%,\n 100% {\n background-position: 0 0;\n }\n 50% {\n background-position: 100% 0;\n }\n"]))),Va=o.e.div(Ua||(Ua=St(["\n color: ",";\n transition: color 0.4s;\n flex-grow: 1;\n &:hover {\n color: ",";\n }\n"],["\n color: ",";\n transition: color 0.4s;\n flex-grow: 1;\n &:hover {\n color: ",";\n }\n"])),(function(e){var t=e.isPushed,n=e.theme;return t?n.colors.contrast:"transparent"}),(function(e){return e.theme.colors.text})),Wa=o.e.div(La||(La=St(["\n cursor: pointer;\n display: flex;\n align-items: center;\n height: ","px;\n padding: ",";\n font-size: ",";\n background-color: transparent;\n color: ",";\n box-shadow: ",";\n\n a {\n display: flex;\n align-items: center;\n width: 100%;\n height: 100%; \n }\n\n svg {\n fill: ",";\n &:hover {\n fill: ",";\n }\n }\n\n &:hover {\n background-color: ",";\n color: ",";\n svg {\n fill: ",";\n }\n div {\n color: ",";\n }\n }\n\n // Safari fix\n flex-shrink: 0;\n\n &.rainbow {\n -webkit-background-clip: text;\n animation: "," 3s ease-in-out infinite;\n background: ",";\n background-size: 200% 100%;\n font-weight: bold;\n }\n"],["\n cursor: pointer;\n display: flex;\n align-items: center;\n height: ","px;\n padding: ",";\n font-size: ",";\n background-color: transparent;\n color: ",";\n box-shadow: ",";\n\n a {\n display: flex;\n align-items: center;\n width: 100%;\n height: 100%; \n }\n\n svg {\n fill: ",";\n &:hover {\n fill: ",";\n }\n }\n\n &:hover {\n background-color: ",";\n color: ",";\n svg {\n fill: ",";\n }\n div {\n color: ",";\n }\n }\n\n // Safari fix\n flex-shrink: 0;\n\n &.rainbow {\n -webkit-background-clip: text;\n animation: "," 3s ease-in-out infinite;\n background: ",";\n background-size: 200% 100%;\n font-weight: bold;\n }\n"])),48,(function(e){return e.secondary?"0 32px":"0 16px"}),(function(e){return e.secondary?"14px":"16px"}),(function(e){return e.theme.colors.textSubtle}),(function(e){var t=e.isActive,n=e.theme;return t?"inset 4px 0px 0px ".concat(n.colors.headerTop):"none"}),(function(e){return e.theme.colors.textSubtle}),(function(e){return e.theme.colors.text}),(function(e){return e.theme.colors.inputOpacity}),(function(e){return e.theme.colors.text}),(function(e){return e.theme.colors.text}),(function(e){return e.theme.colors.text}),za,(function(e){return e.theme.colors.gradients.bubblegum}));Wa.defaultProps={secondary:!1,isActive:!1,role:"button"};var Ka,Ya,Za,Xa,$a,es,ts,ns=o.e.div(Ka||(Ka=St(["\n display: flex;\n flex-direction: column;\n // Safari fix\n flex-shrink: 0;\n"],["\n display: flex;\n flex-direction: column;\n // Safari fix\n flex-shrink: 0;\n"]))),rs=o.e.div(Ya||(Ya=St(["\n max-height: ",";\n transition: max-height 0.3s ease-out;\n overflow: hidden;\n border-color: ",";\n border-style: solid;\n border-width: 1px;\n"],["\n max-height: ",";\n transition: max-height 0.3s ease-out;\n overflow: hidden;\n border-color: ",";\n border-style: solid;\n border-width: 1px;\n"])),(function(e){var t=e.isOpen,n=e.maxHeight;return t?"".concat(n,"px"):0}),(function(e){var t=e.isOpen,n=e.isPushed;return t&&n?"rgba(133, 133, 133, 0.1)":"transparent"})),is=function(e){var t=e.label,n=e.icon,o=e.isPushed,a=e.pushNav,s=e.initialOpenState,u=void 0!==s&&s,c=e.children,l=e.className,f=Object(r.useState)(u),d=f[0],h=f[1];return i.a.createElement(ns,null,i.a.createElement(Wa,{onClick:function(){o?h((function(e){return!e})):(a(!0),h(!0))},className:l},n,i.a.createElement(Va,{isPushed:o},t),d?i.a.createElement(yn,null):i.a.createElement(An,null)),i.a.createElement(rs,{isOpen:d,isPushed:o,maxHeight:48*i.a.Children.count(c)},c))},os=function(e){var t=e.href,n=Ct(e,["href"]),r=null===t||void 0===t?void 0:t.startsWith("http"),o=r?"a":wt.c,a=r?{href:t}:{to:t};return i.a.createElement(o,It({},a,n))},as=Ra,ss=o.e.div(Za||(Za=St(["\n display: flex;\n flex-direction: column;\n overflow-y: auto;\n overflow-x: hidden;\n height: 100%;\n border-top: 2px solid ",";\n border-right: 2px solid ",";\n border-top-right-radius: 30px;\n"],["\n display: flex;\n flex-direction: column;\n overflow-y: auto;\n overflow-x: hidden;\n height: 100%;\n border-top: 2px solid ",";\n border-right: 2px solid ",";\n border-top-right-radius: 30px;\n"])),(function(e){return e.theme.colors.headerTop}),(function(e){return e.theme.colors.headerTop})),us=function(e){var t=e.isPushed,n=e.pushNav,r=e.isMobile,o=e.links,a=Object(_t.g)(),s=r?function(){return n(!1)}:void 0;return i.a.createElement(ss,null,o.map((function(e){var r=as[e.icon],o=i.a.createElement(r,{width:"24px",mr:"8px"}),u=e.calloutClass?e.calloutClass:void 0;return e.items?i.a.createElement(is,{key:e.label,isPushed:t,pushNav:n,icon:o,label:e.label,initialOpenState:e.initialOpenState,className:u},t&&e.items.map((function(e){return i.a.createElement(Wa,{key:e.href,secondary:!0,isActive:e.href===a.pathname,onClick:s},i.a.createElement(os,{href:e.href},e.label))}))):i.a.createElement(Wa,{key:e.label,isActive:e.href===a.pathname,className:u},i.a.createElement(os,{href:e.href,onClick:s},o,i.a.createElement(Va,{isPushed:t},e.label)))})))},cs=function(e){var t=e.network,n=e.onShow,r=t.title,o=t.icon;return i.a.createElement(on,{padding:"10px",marginLeft:"6px",variant:"text",onClick:n,style:{justifyContent:"space-between"},startIcon:i.a.createElement(o,{width:"32px"}),endIcon:i.a.createElement(An,{ml:"0.3em"})},i.a.createElement(Lt,{bold:!0,color:"#DF0939"},r))},ls=[{title:"BSC",fullName:"Binance Smart Chain",icon:wn,active:!1,url:"https://app.cougarswap.io/"},{title:"Poly",fullName:"Polygon Network",icon:_n,active:!1,url:"https://polyapp.cougarswap.io"},{title:"Fantom",fullName:"Fantom Network",icon:En,active:!1,url:"https://fantomapp.cougarswap.io"},{title:"Harmony",fullName:"Harmony Network",icon:kn,active:!1,url:"https://harmony.cougarswap.io"},{title:"Avax",fullName:"Avax Network",icon:In,active:!1,url:"https://avaapp.cougarswap.io/"},{title:"Cronos",fullName:"Cronos Network",icon:Cn,active:!1,url:"https://cronosapp.cougarswap.io"},{title:"Moonbeam",fullName:"Moonbeam Network",icon:Sn,active:!1,url:"https://moonbeam.cougarswap.io"},{title:"Arbitrum",fullName:"Arbitrum Network",icon:xn,active:!0,url:"https://arbi.cougarswap.io"}],fs=Object(o.e)(on)(Xa||(Xa=St(["\n width: 100%;\n align-items: center;\n display: flex;\n flex-direction: column;\n height: auto;\n justify-content: center;\n margin-left: auto;\n margin-right: auto;\n border: none;\n border-radius: 20px;\n padding: 16px 24px;\n background-color: ","\n"],["\n width: 100%;\n align-items: center;\n display: flex;\n flex-direction: column;\n height: auto;\n justify-content: center;\n margin-left: auto;\n margin-right: auto;\n border: none;\n border-radius: 20px;\n padding: 16px 24px;\n background-color: ","\n"])),(function(e){return e.theme.colors.headerTop})),ds=Object(o.e)(on)($a||($a=St(["\n width: 100%;\n align-items: center;\n display: flex;\n flex-direction: column;\n height: auto;\n justify-content: center;\n margin-left: auto;\n margin-right: auto;\n border: none;\n padding: 16px 24px;\n border-radius: 20px;\n &:hover {\n background-color: ","\n }\n"],["\n width: 100%;\n align-items: center;\n display: flex;\n flex-direction: column;\n height: auto;\n justify-content: center;\n margin-left: auto;\n margin-right: auto;\n border: none;\n padding: 16px 24px;\n border-radius: 20px;\n &:hover {\n background-color: ","\n }\n"])),(function(e){var t=e.theme;return"".concat(t.colors.input,"B3")})),hs=function(e){var t=e.network,n=e.onDismiss,r=void 0===n?function(){return null}:n,o=t.title,a=t.url,s=t.active,u=t.disabled,c=t.icon;return u?i.a.createElement(fs,{disabled:!0,variant:"subtle"},i.a.createElement(c,{width:"60px",height:"60px",mb:"8px"}),i.a.createElement(Lt,{bold:!0,fontSize:"16px"},o)):s?i.a.createElement(fs,{onClick:r,variant:"subtle"},i.a.createElement(c,{width:"60px",height:"60px",mb:"8px"}),i.a.createElement(Lt,{bold:!0,fontSize:"16px"},o)):i.a.createElement(ds,{as:"a",href:a,"aria-label":t.fullName},i.a.createElement(c,{width:"60px",height:"60px",mb:"8px"}),i.a.createElement(Lt,{bold:!0,fontSize:"16px"},o))},ps=Object(o.e)(vi)(es||(es=St(["\n display: flex;\n align-self: center;\n align-items: center;\n margin-top: 24px;\n"],["\n display: flex;\n align-self: center;\n align-items: center;\n margin-top: 24px;\n"]))),gs=Object(o.e)(Wn)(ts||(ts=St(["\n display: flex; \n flex-wrap: wrap; \n padding: 0;\n padding-bottom: 16px;\n border-bottom: 1px solid ","; \n & > * {\n flex: 50%;\n }\n\n "," {\n & > * {\n flex: 1;\n }\n }\n"],["\n display: flex; \n flex-wrap: wrap; \n padding: 0;\n padding-bottom: 16px;\n border-bottom: 1px solid ","; \n & > * {\n flex: 50%;\n }\n\n "," {\n & > * {\n flex: 1;\n }\n }\n"])),(function(e){return e.theme.colors.cardBorder}),(function(e){return e.theme.mediaQueries.nav})),vs=function(e){var t=e.networks,n=e.onDismiss;return i.a.createElement(Ea,{title:"Switch to other network",onDismiss:n},i.a.createElement(gs,null,t.map((function(e){return i.a.createElement(hs,{key:e.title,network:e,onDismiss:n})}))),i.a.createElement(ps,{href:"https://cougarswap.gitbook.io/arbicougarswap/How To Set Up Your Wallet On Arbitrum",external:!0},i.a.createElement(jn,{color:"primary",mr:"6px"}),"Learn how to start"))},ms=Ra;ms.MoonIcon,ms.SunIcon;var As=ms.LanguageIcon,ys=o.e.div(bs||(bs=St(["\n flex: none;\n padding: 8px 4px; \n border-right: 2px solid ",";\n border-bottom: 2px solid ",";\n border-top: 1px solid ","; \n border-bottom-right-radius: 30px; \n"],["\n flex: none;\n padding: 8px 4px; \n border-right: 2px solid ",";\n border-bottom: 2px solid ",";\n border-top: 1px solid ","; \n border-bottom-right-radius: 30px; \n"])),(function(e){return e.theme.colors.headerTop}),(function(e){return e.theme.colors.headerTop}),(function(e){return e.theme.colors.textSubtle}));o.e.a(ws||(ws=St(["\n display: flex;\n align-items: center;\n svg {\n transition: transform 0.3s;\n }\n :hover {\n svg {\n transform: scale(1.2);\n }\n }\n"],["\n display: flex;\n align-items: center;\n svg {\n transition: transform 0.3s;\n }\n :hover {\n svg {\n transform: scale(1.2);\n }\n }\n"])));var bs,ws,_s,Es,ks,Is,Cs,Ss,xs,Bs,Os,Ms,Ps=o.e.div(_s||(_s=St(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n height: ","px;\n padding: 0 16px;\n"],["\n display: flex;\n align-items: center;\n justify-content: space-between;\n height: ","px;\n padding: 0 16px;\n"])),48),Rs=o.e.div(Es||(Es=St(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n height: ","px;\n padding: 0 16px;\n margin-top: 10px;\n margin-bottom: 10px;\n"],["\n display: flex;\n align-items: center;\n justify-content: space-between;\n height: ","px;\n padding: 0 16px;\n margin-top: 10px;\n margin-bottom: 10px;\n"])),36),Ns=Object(o.e)(Wn)(ks||(ks=St(["\n width: 100%; \n flex-wrap: wrap; \n column-gap: 30px;\n"],["\n width: 100%; \n flex-wrap: wrap; \n column-gap: 30px;\n"]))),Ts=function(e){var t=e.isPushed,n=e.pushNav;e.toggleTheme,e.isDark,e.cakePriceUsd;var r=e.currentLang,o=e.langs,a=e.setLang;if(e.priceLink,!t)return i.a.createElement(ys,null,i.a.createElement(gn,{variant:"text",onClick:function(){return n(!0)}},i.a.createElement(Tn,null)));var s=ls.find((function(e){return!0===e.active})),u=Oa(i.a.createElement(vs,{networks:ls}))[0];return i.a.createElement(ys,null,i.a.createElement(Ps,null,i.a.createElement(Tr,{position:"top-right",target:i.a.createElement(on,{padding:"0",variant:"text",startIcon:i.a.createElement(As,{color:"textSubtle",width:"24px"})},i.a.createElement(Lt,{color:"textSubtle"},null===r||void 0===r?void 0:r.toUpperCase()))},o.map((function(e){return i.a.createElement(Na,{key:e.code,fullWidth:!0,onClick:function(){return a(e)},style:{minHeight:"32px",height:"auto"}},e.language)}))),i.a.createElement(cs,{network:s,onShow:u,onDismiss:function(){return null}})),i.a.createElement(Rs,null,i.a.createElement(Ns,null,Ga.map((function(e,t){var n=ms[e.icon],r={width:"24px",color:"textSubtle",style:{cursor:"pointer"}},o=t=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function u(e,t,n){var r=s(e,n);return n-1>=t&&(r|=s(e,n-1)<<4),r}function c(e,t,n,r){for(var i=0,o=Math.min(e.length,n),a=t;a=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(e){return e instanceof o||null!==e&&"object"===typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,n){if("number"===typeof e)return this._initNumber(e,t,n);if("object"===typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===n)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r=t;r-=2)i=u(e,t,r)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(r=(e.length-t)%2===0?t+1:t;r=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var o=e.length-n,a=o%r,s=Math.min(o,o-a)+n,u=0,l=n;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},o.prototype.inspect=function(){return(this.red?""};var l=["","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"],f=[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],d=[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 h(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,u=a/67108864|0;n.words[0]=s;for(var c=1;c>>26,f=67108863&u,d=Math.min(c,t.length-1),h=Math.max(0,c-e.length+1);h<=d;h++){var p=c-h|0;l+=(a=(i=0|e.words[p])*(o=0|t.words[h])+f)/67108864|0,f=67108863&a}n.words[c]=0|f,u=0|l}return 0!==u?n.words[c]=0|u:n.length--,n.strip()}o.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?l[6-u.length]+u+n:u+n,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(n=o.toString(16)+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var c=f[e],h=d[e];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var g=p.modn(h).toString(e);n=(p=p.idivn(h)).isZero()?g+n:l[c-g.length]+g+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return r("undefined"!==typeof a),this.toArrayLike(a,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,n){var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===t,c=new e(o),l=this.clone();if(u){for(s=0;!l.isZero();s++)a=l.andln(255),l.iushrn(8),c[s]=a;for(;s=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0===(8191&t)&&(n+=13,t>>>=13),0===(127&t)&&(n+=7,t>>>=7),0===(15&t)&&(n+=4,t>>>=4),0===(3&t)&&(n+=2,t>>>=2),0===(1&t)&&n++,n},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;ne.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;re.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){r("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){r("number"===typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(n=this,r=e):(n=e,r=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var o=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==o&&a>26,this.words[a]=67108863&t;if(0===o&&a>>13,h=0|a[1],p=8191&h,g=h>>>13,v=0|a[2],m=8191&v,A=v>>>13,y=0|a[3],b=8191&y,w=y>>>13,_=0|a[4],E=8191&_,k=_>>>13,I=0|a[5],C=8191&I,S=I>>>13,x=0|a[6],B=8191&x,O=x>>>13,M=0|a[7],P=8191&M,R=M>>>13,N=0|a[8],T=8191&N,Q=N>>>13,D=0|a[9],j=8191&D,U=D>>>13,L=0|s[0],F=8191&L,H=L>>>13,J=0|s[1],q=8191&J,G=J>>>13,z=0|s[2],V=8191&z,W=z>>>13,K=0|s[3],Y=8191&K,Z=K>>>13,X=0|s[4],$=8191&X,ee=X>>>13,te=0|s[5],ne=8191&te,re=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ue=8191&se,ce=se>>>13,le=0|s[8],fe=8191&le,de=le>>>13,he=0|s[9],pe=8191&he,ge=he>>>13;n.negative=e.negative^t.negative,n.length=19;var ve=(c+(r=Math.imul(f,F))|0)+((8191&(i=(i=Math.imul(f,H))+Math.imul(d,F)|0))<<13)|0;c=((o=Math.imul(d,H))+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(p,F),i=(i=Math.imul(p,H))+Math.imul(g,F)|0,o=Math.imul(g,H);var me=(c+(r=r+Math.imul(f,q)|0)|0)+((8191&(i=(i=i+Math.imul(f,G)|0)+Math.imul(d,q)|0))<<13)|0;c=((o=o+Math.imul(d,G)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(m,F),i=(i=Math.imul(m,H))+Math.imul(A,F)|0,o=Math.imul(A,H),r=r+Math.imul(p,q)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(g,q)|0,o=o+Math.imul(g,G)|0;var Ae=(c+(r=r+Math.imul(f,V)|0)|0)+((8191&(i=(i=i+Math.imul(f,W)|0)+Math.imul(d,V)|0))<<13)|0;c=((o=o+Math.imul(d,W)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(b,F),i=(i=Math.imul(b,H))+Math.imul(w,F)|0,o=Math.imul(w,H),r=r+Math.imul(m,q)|0,i=(i=i+Math.imul(m,G)|0)+Math.imul(A,q)|0,o=o+Math.imul(A,G)|0,r=r+Math.imul(p,V)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,W)|0;var ye=(c+(r=r+Math.imul(f,Y)|0)|0)+((8191&(i=(i=i+Math.imul(f,Z)|0)+Math.imul(d,Y)|0))<<13)|0;c=((o=o+Math.imul(d,Z)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(E,F),i=(i=Math.imul(E,H))+Math.imul(k,F)|0,o=Math.imul(k,H),r=r+Math.imul(b,q)|0,i=(i=i+Math.imul(b,G)|0)+Math.imul(w,q)|0,o=o+Math.imul(w,G)|0,r=r+Math.imul(m,V)|0,i=(i=i+Math.imul(m,W)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,W)|0,r=r+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(g,Y)|0,o=o+Math.imul(g,Z)|0;var be=(c+(r=r+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,ee)|0)+Math.imul(d,$)|0))<<13)|0;c=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(C,F),i=(i=Math.imul(C,H))+Math.imul(S,F)|0,o=Math.imul(S,H),r=r+Math.imul(E,q)|0,i=(i=i+Math.imul(E,G)|0)+Math.imul(k,q)|0,o=o+Math.imul(k,G)|0,r=r+Math.imul(b,V)|0,i=(i=i+Math.imul(b,W)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,W)|0,r=r+Math.imul(m,Y)|0,i=(i=i+Math.imul(m,Z)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,Z)|0,r=r+Math.imul(p,$)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(g,$)|0,o=o+Math.imul(g,ee)|0;var we=(c+(r=r+Math.imul(f,ne)|0)|0)+((8191&(i=(i=i+Math.imul(f,re)|0)+Math.imul(d,ne)|0))<<13)|0;c=((o=o+Math.imul(d,re)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(B,F),i=(i=Math.imul(B,H))+Math.imul(O,F)|0,o=Math.imul(O,H),r=r+Math.imul(C,q)|0,i=(i=i+Math.imul(C,G)|0)+Math.imul(S,q)|0,o=o+Math.imul(S,G)|0,r=r+Math.imul(E,V)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(k,V)|0,o=o+Math.imul(k,W)|0,r=r+Math.imul(b,Y)|0,i=(i=i+Math.imul(b,Z)|0)+Math.imul(w,Y)|0,o=o+Math.imul(w,Z)|0,r=r+Math.imul(m,$)|0,i=(i=i+Math.imul(m,ee)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,ee)|0,r=r+Math.imul(p,ne)|0,i=(i=i+Math.imul(p,re)|0)+Math.imul(g,ne)|0,o=o+Math.imul(g,re)|0;var _e=(c+(r=r+Math.imul(f,oe)|0)|0)+((8191&(i=(i=i+Math.imul(f,ae)|0)+Math.imul(d,oe)|0))<<13)|0;c=((o=o+Math.imul(d,ae)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(P,F),i=(i=Math.imul(P,H))+Math.imul(R,F)|0,o=Math.imul(R,H),r=r+Math.imul(B,q)|0,i=(i=i+Math.imul(B,G)|0)+Math.imul(O,q)|0,o=o+Math.imul(O,G)|0,r=r+Math.imul(C,V)|0,i=(i=i+Math.imul(C,W)|0)+Math.imul(S,V)|0,o=o+Math.imul(S,W)|0,r=r+Math.imul(E,Y)|0,i=(i=i+Math.imul(E,Z)|0)+Math.imul(k,Y)|0,o=o+Math.imul(k,Z)|0,r=r+Math.imul(b,$)|0,i=(i=i+Math.imul(b,ee)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,ee)|0,r=r+Math.imul(m,ne)|0,i=(i=i+Math.imul(m,re)|0)+Math.imul(A,ne)|0,o=o+Math.imul(A,re)|0,r=r+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(g,oe)|0,o=o+Math.imul(g,ae)|0;var Ee=(c+(r=r+Math.imul(f,ue)|0)|0)+((8191&(i=(i=i+Math.imul(f,ce)|0)+Math.imul(d,ue)|0))<<13)|0;c=((o=o+Math.imul(d,ce)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(T,F),i=(i=Math.imul(T,H))+Math.imul(Q,F)|0,o=Math.imul(Q,H),r=r+Math.imul(P,q)|0,i=(i=i+Math.imul(P,G)|0)+Math.imul(R,q)|0,o=o+Math.imul(R,G)|0,r=r+Math.imul(B,V)|0,i=(i=i+Math.imul(B,W)|0)+Math.imul(O,V)|0,o=o+Math.imul(O,W)|0,r=r+Math.imul(C,Y)|0,i=(i=i+Math.imul(C,Z)|0)+Math.imul(S,Y)|0,o=o+Math.imul(S,Z)|0,r=r+Math.imul(E,$)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,ee)|0,r=r+Math.imul(b,ne)|0,i=(i=i+Math.imul(b,re)|0)+Math.imul(w,ne)|0,o=o+Math.imul(w,re)|0,r=r+Math.imul(m,oe)|0,i=(i=i+Math.imul(m,ae)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,ae)|0,r=r+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(g,ue)|0,o=o+Math.imul(g,ce)|0;var ke=(c+(r=r+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,de)|0)+Math.imul(d,fe)|0))<<13)|0;c=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(j,F),i=(i=Math.imul(j,H))+Math.imul(U,F)|0,o=Math.imul(U,H),r=r+Math.imul(T,q)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(Q,q)|0,o=o+Math.imul(Q,G)|0,r=r+Math.imul(P,V)|0,i=(i=i+Math.imul(P,W)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,W)|0,r=r+Math.imul(B,Y)|0,i=(i=i+Math.imul(B,Z)|0)+Math.imul(O,Y)|0,o=o+Math.imul(O,Z)|0,r=r+Math.imul(C,$)|0,i=(i=i+Math.imul(C,ee)|0)+Math.imul(S,$)|0,o=o+Math.imul(S,ee)|0,r=r+Math.imul(E,ne)|0,i=(i=i+Math.imul(E,re)|0)+Math.imul(k,ne)|0,o=o+Math.imul(k,re)|0,r=r+Math.imul(b,oe)|0,i=(i=i+Math.imul(b,ae)|0)+Math.imul(w,oe)|0,o=o+Math.imul(w,ae)|0,r=r+Math.imul(m,ue)|0,i=(i=i+Math.imul(m,ce)|0)+Math.imul(A,ue)|0,o=o+Math.imul(A,ce)|0,r=r+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(g,fe)|0,o=o+Math.imul(g,de)|0;var Ie=(c+(r=r+Math.imul(f,pe)|0)|0)+((8191&(i=(i=i+Math.imul(f,ge)|0)+Math.imul(d,pe)|0))<<13)|0;c=((o=o+Math.imul(d,ge)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(j,q),i=(i=Math.imul(j,G))+Math.imul(U,q)|0,o=Math.imul(U,G),r=r+Math.imul(T,V)|0,i=(i=i+Math.imul(T,W)|0)+Math.imul(Q,V)|0,o=o+Math.imul(Q,W)|0,r=r+Math.imul(P,Y)|0,i=(i=i+Math.imul(P,Z)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,Z)|0,r=r+Math.imul(B,$)|0,i=(i=i+Math.imul(B,ee)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,ee)|0,r=r+Math.imul(C,ne)|0,i=(i=i+Math.imul(C,re)|0)+Math.imul(S,ne)|0,o=o+Math.imul(S,re)|0,r=r+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,ae)|0,r=r+Math.imul(b,ue)|0,i=(i=i+Math.imul(b,ce)|0)+Math.imul(w,ue)|0,o=o+Math.imul(w,ce)|0,r=r+Math.imul(m,fe)|0,i=(i=i+Math.imul(m,de)|0)+Math.imul(A,fe)|0,o=o+Math.imul(A,de)|0;var Ce=(c+(r=r+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,ge)|0)+Math.imul(g,pe)|0))<<13)|0;c=((o=o+Math.imul(g,ge)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(j,V),i=(i=Math.imul(j,W))+Math.imul(U,V)|0,o=Math.imul(U,W),r=r+Math.imul(T,Y)|0,i=(i=i+Math.imul(T,Z)|0)+Math.imul(Q,Y)|0,o=o+Math.imul(Q,Z)|0,r=r+Math.imul(P,$)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,ee)|0,r=r+Math.imul(B,ne)|0,i=(i=i+Math.imul(B,re)|0)+Math.imul(O,ne)|0,o=o+Math.imul(O,re)|0,r=r+Math.imul(C,oe)|0,i=(i=i+Math.imul(C,ae)|0)+Math.imul(S,oe)|0,o=o+Math.imul(S,ae)|0,r=r+Math.imul(E,ue)|0,i=(i=i+Math.imul(E,ce)|0)+Math.imul(k,ue)|0,o=o+Math.imul(k,ce)|0,r=r+Math.imul(b,fe)|0,i=(i=i+Math.imul(b,de)|0)+Math.imul(w,fe)|0,o=o+Math.imul(w,de)|0;var Se=(c+(r=r+Math.imul(m,pe)|0)|0)+((8191&(i=(i=i+Math.imul(m,ge)|0)+Math.imul(A,pe)|0))<<13)|0;c=((o=o+Math.imul(A,ge)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(j,Y),i=(i=Math.imul(j,Z))+Math.imul(U,Y)|0,o=Math.imul(U,Z),r=r+Math.imul(T,$)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(Q,$)|0,o=o+Math.imul(Q,ee)|0,r=r+Math.imul(P,ne)|0,i=(i=i+Math.imul(P,re)|0)+Math.imul(R,ne)|0,o=o+Math.imul(R,re)|0,r=r+Math.imul(B,oe)|0,i=(i=i+Math.imul(B,ae)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,ae)|0,r=r+Math.imul(C,ue)|0,i=(i=i+Math.imul(C,ce)|0)+Math.imul(S,ue)|0,o=o+Math.imul(S,ce)|0,r=r+Math.imul(E,fe)|0,i=(i=i+Math.imul(E,de)|0)+Math.imul(k,fe)|0,o=o+Math.imul(k,de)|0;var xe=(c+(r=r+Math.imul(b,pe)|0)|0)+((8191&(i=(i=i+Math.imul(b,ge)|0)+Math.imul(w,pe)|0))<<13)|0;c=((o=o+Math.imul(w,ge)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(j,$),i=(i=Math.imul(j,ee))+Math.imul(U,$)|0,o=Math.imul(U,ee),r=r+Math.imul(T,ne)|0,i=(i=i+Math.imul(T,re)|0)+Math.imul(Q,ne)|0,o=o+Math.imul(Q,re)|0,r=r+Math.imul(P,oe)|0,i=(i=i+Math.imul(P,ae)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,ae)|0,r=r+Math.imul(B,ue)|0,i=(i=i+Math.imul(B,ce)|0)+Math.imul(O,ue)|0,o=o+Math.imul(O,ce)|0,r=r+Math.imul(C,fe)|0,i=(i=i+Math.imul(C,de)|0)+Math.imul(S,fe)|0,o=o+Math.imul(S,de)|0;var Be=(c+(r=r+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,ge)|0)+Math.imul(k,pe)|0))<<13)|0;c=((o=o+Math.imul(k,ge)|0)+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,r=Math.imul(j,ne),i=(i=Math.imul(j,re))+Math.imul(U,ne)|0,o=Math.imul(U,re),r=r+Math.imul(T,oe)|0,i=(i=i+Math.imul(T,ae)|0)+Math.imul(Q,oe)|0,o=o+Math.imul(Q,ae)|0,r=r+Math.imul(P,ue)|0,i=(i=i+Math.imul(P,ce)|0)+Math.imul(R,ue)|0,o=o+Math.imul(R,ce)|0,r=r+Math.imul(B,fe)|0,i=(i=i+Math.imul(B,de)|0)+Math.imul(O,fe)|0,o=o+Math.imul(O,de)|0;var Oe=(c+(r=r+Math.imul(C,pe)|0)|0)+((8191&(i=(i=i+Math.imul(C,ge)|0)+Math.imul(S,pe)|0))<<13)|0;c=((o=o+Math.imul(S,ge)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(j,oe),i=(i=Math.imul(j,ae))+Math.imul(U,oe)|0,o=Math.imul(U,ae),r=r+Math.imul(T,ue)|0,i=(i=i+Math.imul(T,ce)|0)+Math.imul(Q,ue)|0,o=o+Math.imul(Q,ce)|0,r=r+Math.imul(P,fe)|0,i=(i=i+Math.imul(P,de)|0)+Math.imul(R,fe)|0,o=o+Math.imul(R,de)|0;var Me=(c+(r=r+Math.imul(B,pe)|0)|0)+((8191&(i=(i=i+Math.imul(B,ge)|0)+Math.imul(O,pe)|0))<<13)|0;c=((o=o+Math.imul(O,ge)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(j,ue),i=(i=Math.imul(j,ce))+Math.imul(U,ue)|0,o=Math.imul(U,ce),r=r+Math.imul(T,fe)|0,i=(i=i+Math.imul(T,de)|0)+Math.imul(Q,fe)|0,o=o+Math.imul(Q,de)|0;var Pe=(c+(r=r+Math.imul(P,pe)|0)|0)+((8191&(i=(i=i+Math.imul(P,ge)|0)+Math.imul(R,pe)|0))<<13)|0;c=((o=o+Math.imul(R,ge)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(j,fe),i=(i=Math.imul(j,de))+Math.imul(U,fe)|0,o=Math.imul(U,de);var Re=(c+(r=r+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,ge)|0)+Math.imul(Q,pe)|0))<<13)|0;c=((o=o+Math.imul(Q,ge)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ne=(c+(r=Math.imul(j,pe))|0)+((8191&(i=(i=Math.imul(j,ge))+Math.imul(U,pe)|0))<<13)|0;return c=((o=Math.imul(U,ge))+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,u[0]=ve,u[1]=me,u[2]=Ae,u[3]=ye,u[4]=be,u[5]=we,u[6]=_e,u[7]=Ee,u[8]=ke,u[9]=Ie,u[10]=Ce,u[11]=Se,u[12]=xe,u[13]=Be,u[14]=Oe,u[15]=Me,u[16]=Pe,u[17]=Re,u[18]=Ne,0!==c&&(u[19]=c,n.length++),n};function g(e,t,n){return(new v).mulp(e,t,n)}function v(e,t){this.x=e,this.y=t}Math.imul||(p=h),o.prototype.mulTo=function(e,t){var n,r=this.length+e.length;return n=10===this.length&&10===e.length?p(this,e,t):r<63?h(this,e,t):r<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}n.words[o]=s,r=a,a=i}return 0!==r?n.words[o]=r:n.length--,n.strip()}(this,e,t):g(this,e,t),n},v.prototype.makeRBT=function(e){for(var t=new Array(e),n=o.prototype._countBits(e)-1,r=0;r>=1;return r},v.prototype.permute=function(e,t,n,r,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,n[2*a+1]=8191&o,o>>>=13;for(a=2*t;a>=26,t+=i/67108864|0,t+=o>>>26,this.words[n]=67108863&o}return 0!==t&&(this.words[n]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n>>i}return t}(e);if(0===t.length)return new o(1);for(var n=this,r=0;r=0);var t,n=e%26,i=(e-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(t=0;t>>26-n}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==l||c>=i);c--){var f=0|this.words[c];this.words[c]=l<<26-o|f>>>o,l=f&s}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(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){r("number"===typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(r("number"===typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(u/67108864|0),this.words[i+n]=67108863&o}for(;i>26,this.words[i+n]=67108863&o;if(0===s)return this.strip();for(r(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),i=e,a=0|i.words[i.length-1];0!==(n=26-this._countBits(a))&&(i=i.ushln(n),r.iushln(n),a=0|i.words[i.length-1]);var s,u=r.length-i.length;if("mod"!==t){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c=0;f--){var d=67108864*(0|r.words[i.length+f])+(0|r.words[i.length+f-1]);for(d=Math.min(d/a|0,67108863),r._ishlnsubmul(i,d,f);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(i,1,f),r.isZero()||(r.negative^=1);s&&(s.words[f]=d)}return s&&s.strip(),r.strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:s||null,mod:r}},o.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),o=n.cmp(r);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){r(e<=67108863);for(var t=(1<<26)%e,n=0,i=this.length-1;i>=0;i--)n=(t*n+(0|this.words[i]))%e;return n},o.prototype.idivn=function(e){r(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*t;this.words[n]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++c;for(var l=n.clone(),f=t.clone();!t.isZero();){for(var d=0,h=1;0===(t.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(l),a.isub(f)),i.iushrn(1),a.iushrn(1);for(var p=0,g=1;0===(n.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(l),u.isub(f)),s.iushrn(1),u.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(s),a.isub(u)):(n.isub(t),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:n.iushln(c)}},o.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),s=new o(0),u=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,l=1;0===(t.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var f=0,d=1;0===(n.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(n.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(s)):(n.isub(t),s.isub(a))}return(i=0===t.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var o=t;t=n,n=o}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){r("number"===typeof e);var t=e%26,n=(e-t)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){ri&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new E(e)},o.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var m={k256:null,p224:null,p192:null,p25519:null};function A(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){A.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){A.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){A.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){A.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"===typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function k(e){E.call(this,e),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)}A.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},A.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},A.prototype.split=function(e,t){e.iushrn(this.n,0,t)},A.prototype.imulK=function(e){return e.imul(this.k)},i(y,A),y.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},y.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(m[e])return m[e];var t;if("k256"===e)t=new y;else if("p224"===e)t=new b;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return m[e]=t,t},E.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},E.prototype._verify2=function(e,t){r(0===(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},E.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},E.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},E.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},E.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2===1),3===t){var n=this.m.add(new o(1)).iushrn(2);return this.pow(e,n)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);r(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,c).cmp(u);)l.redIAdd(u);for(var f=this.pow(l,i),d=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=a;0!==h.cmp(s);){for(var g=h,v=0;0!==g.cmp(s);v++)g=g.redSqr();r(v=0;r--){for(var c=t.words[r],l=u-1;l>=0;l--){var f=c>>l&1;i!==n[0]&&(i=this.sqr(i)),0!==f||0!==a?(a<<=1,a|=f,(4===++s||0===r&&0===l)&&(i=this.mul(i,n[a]),s=0,a=0)):s=0}u=26}return i},E.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new k(e)},i(k,E),k.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},k.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},k.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},k.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},k.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,n(77)(e))},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"g",(function(){return o})),n.d(t,"a",(function(){return a})),n.d(t,"f",(function(){return s})),n.d(t,"e",(function(){return u})),n.d(t,"i",(function(){return c})),n.d(t,"j",(function(){return l})),n.d(t,"h",(function(){return r})),n.d(t,"d",(function(){return f})),n.d(t,"c",(function(){return d})),n.d(t,"k",(function(){return h})),n.d(t,"l",(function(){return p}));var r=512,i=256,o=256,a="AES-CBC",s="SHA-".concat(i),u="HMAC",c="SHA-256",l="SHA-512",f=("aes-".concat(i,"-cbc"),"sha".concat(o),"encrypt"),d="decrypt",h="sign",p="verify"},function(e,t,n){"use strict";(function(e){var r=n(28).default,i=n(29).default,o=n(10).default,a=n(9).default,s=n(30).default,u=n(31).default,c=n(232).default;Object.defineProperty(t,"__esModule",{value:!0}),t.isOptionalNumber=t.isOptionalString=t.CrowdinApi=t.CrowdinValidationError=t.CrowdinError=t.BooleanInt=void 0;var l=n(1097),f=n(1117),d=n(1118);!function(e){e[e.TRUE=1]="TRUE",e[e.FALSE=0]="FALSE"}(t.BooleanInt||(t.BooleanInt={}));var h=function(e){s(n,e);var t=u(n);function n(e,r){var i;return a(this,n),(i=t.call(this,e)).code=r,i}return o(n)}(c(Error));t.CrowdinError=h;var p=function(e){s(n,e);var t=u(n);function n(e,r){var i;return a(this,n),(i=t.call(this,e,400)).validationCodes=r,i}return o(n)}(h);function g(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Array.isArray(n.errors)){var r=[],i=[];n.errors.forEach((function(e){var t;if(e.error.key&&Array.isArray(null===(t=e.error)||void 0===t?void 0:t.errors)){var n=[];e.error.errors.forEach((function(e){e.message&&e.code&&(n.push(e.code),i.push(e.message))})),r.push({key:e.error.key,codes:n})}}));var o=0===i.length?"Validation error":i.join(", ");throw new p(o,r)}var a=(null===(e=n.error)||void 0===e?void 0:e.message)||"Error occured",s=(null===(t=n.error)||void 0===t?void 0:t.code)||500;throw new h(a,s)}t.CrowdinValidationError=p;var v=function(){function e(t,n){var r;a(this,e),this.fetchAllFlag=!1,this.token=t.token,this.organization=t.organization,t.baseUrl?this.url=t.baseUrl:this.organization?this.url="https://".concat(this.organization,".").concat(e.CROWDIN_URL_SUFFIX):this.url="https://".concat(e.CROWDIN_URL_SUFFIX),r=(null===n||void 0===n?void 0:n.retryConfig)?n.retryConfig:{waitInterval:0,retries:0,conditions:[]},this.retryService=new d.RetryService(r),this.config=n}return o(e,[{key:"addQueryParam",value:function(e,t,n){return n&&(e+=new RegExp(/\?.+=.*/g).test(e)?"&":"?",e+="".concat(t,"=").concat(n)),e}},{key:"defaultConfig",value:function(){var e,t,n={headers:{Authorization:"Bearer ".concat(this.token)}};return(null===(e=this.config)||void 0===e?void 0:e.userAgent)&&(n.headers["User-Agent"]=this.config.userAgent),(null===(t=this.config)||void 0===t?void 0:t.integrationUserAgent)&&(n.headers["X-Crowdin-Integrations-User-Agent"]=this.config.integrationUserAgent),n}},{key:"httpClient",get:function(){var t,n;if(null===(t=this.config)||void 0===t?void 0:t.httpClient)return this.config.httpClient;if(null===(n=this.config)||void 0===n?void 0:n.httpClientType)switch(this.config.httpClientType){case"axios":default:return e.AXIOS_INSTANCE;case"fetch":return e.FETCH_INSTANCE}return e.AXIOS_INSTANCE}},{key:"withFetchAll",value:function(e){return this.fetchAllFlag=!0,this.maxLimit=e,this}},{key:"getList",value:function(){var e=i(r().mark((function e(t,n,i,o){var a,s;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=null!==o&&void 0!==o?o:this.defaultConfig(),!this.fetchAllFlag){e.next=10;break}return this.fetchAllFlag=!1,s=this.maxLimit,this.maxLimit=void 0,e.next=7,this.fetchAll(t,a,s);case 7:return e.abrupt("return",e.sent);case 10:return t=this.addQueryParam(t,"limit",n),t=this.addQueryParam(t,"offset",i),e.abrupt("return",this.get(t,a));case 13:case"end":return e.stop()}}),e,this)})));return function(t,n,r,i){return e.apply(this,arguments)}}()},{key:"fetchAll",value:function(){var e=i(r().mark((function e(t,n,i){var o,a,s,u,c;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=500,i&&i=i)){e.next=13;break}return e.abrupt("break",17);case 13:a+=o;case 14:i&&i0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return""!==e.typeUrl&&t.uint32(10).string(e.typeUrl),0!==e.value.length&&t.uint32(18).bytes(e.value),t},decode:function(e,t){var n=e instanceof a.default.Reader?e:new a.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},s);for(i.value=new Uint8Array;n.pos>>3){case 1:i.typeUrl=n.string();break;case 2:i.value=n.bytes();break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t=Object.assign({},s);return t.typeUrl=void 0!==e.typeUrl&&null!==e.typeUrl?String(e.typeUrl):"",t.value=void 0!==e.value&&null!==e.value?function(e){for(var t=c(e),n=new Uint8Array(t.length),r=0;r=0||(i[n]=e[n]);return i}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return w})),n.d(t,"b",(function(){return I})),n.d(t,"c",(function(){return v})),n.d(t,"d",(function(){return M})),n.d(t,"e",(function(){return g})),n.d(t,"f",(function(){return k})),n.d(t,"g",(function(){return R})),n.d(t,"h",(function(){return N}));var r=n(62),i=n(0),o=n.n(i),a=n(76),s=n(536),u=n(54),c=n(42),l=n(298),f=n.n(l),d=(n(180),n(56)),h=(n(116),function(e){var t=Object(s.a)();return t.displayName=e,t}),p=h("Router-History"),g=h("Router"),v=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={location:t.history.location},n._isMounted=!1,n._pendingLocation=null,t.staticContext||(n.unlisten=t.history.listen((function(e){n._pendingLocation=e}))),n}Object(r.a)(t,e),t.computeRootMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}};var n=t.prototype;return n.componentDidMount=function(){var e=this;this._isMounted=!0,this.unlisten&&this.unlisten(),this.props.staticContext||(this.unlisten=this.props.history.listen((function(t){e._isMounted&&e.setState({location:t})}))),this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&(this.unlisten(),this._isMounted=!1,this._pendingLocation=null)},n.render=function(){return o.a.createElement(g.Provider,{value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},o.a.createElement(p.Provider,{children:this.props.children||null,value:this.props.history}))},t}(o.a.Component);o.a.Component;var m=function(e){function t(){return e.apply(this,arguments)||this}Object(r.a)(t,e);var n=t.prototype;return n.componentDidMount=function(){this.props.onMount&&this.props.onMount.call(this,this)},n.componentDidUpdate=function(e){this.props.onUpdate&&this.props.onUpdate.call(this,this,e)},n.componentWillUnmount=function(){this.props.onUnmount&&this.props.onUnmount.call(this,this)},n.render=function(){return null},t}(o.a.Component);var A={},y=0;function b(e,t){return void 0===e&&(e="/"),void 0===t&&(t={}),"/"===e?e:function(e){if(A[e])return A[e];var t=f.a.compile(e);return y<1e4&&(A[e]=t,y++),t}(e)(t,{pretty:!0})}function w(e){var t=e.computedMatch,n=e.to,r=e.push,i=void 0!==r&&r;return o.a.createElement(g.Consumer,null,(function(e){e||Object(u.a)(!1);var r=e.history,s=e.staticContext,l=i?r.push:r.replace,f=Object(a.c)(t?"string"===typeof n?b(n,t.params):Object(c.a)({},n,{pathname:b(n.pathname,t.params)}):n);return s?(l(f),null):o.a.createElement(m,{onMount:function(){l(f)},onUpdate:function(e,t){var n=Object(a.c)(t.to);Object(a.f)(n,Object(c.a)({},f,{key:n.key}))||l(f)},to:n})}))}var _={},E=0;function k(e,t){void 0===t&&(t={}),("string"===typeof t||Array.isArray(t))&&(t={path:t});var n=t,r=n.path,i=n.exact,o=void 0!==i&&i,a=n.strict,s=void 0!==a&&a,u=n.sensitive,c=void 0!==u&&u;return[].concat(r).reduce((function(t,n){if(!n&&""!==n)return null;if(t)return t;var r=function(e,t){var n=""+t.end+t.strict+t.sensitive,r=_[n]||(_[n]={});if(r[e])return r[e];var i=[],o={regexp:f()(e,i,t),keys:i};return E<1e4&&(r[e]=o,E++),o}(n,{end:o,strict:s,sensitive:c}),i=r.regexp,a=r.keys,u=i.exec(e);if(!u)return null;var l=u[0],d=u.slice(1),h=e===l;return o&&!h?null:{path:n,url:"/"===n&&""===l?"/":l,isExact:h,params:a.reduce((function(e,t,n){return e[t.name]=d[n],e}),{})}}),null)}var I=function(e){function t(){return e.apply(this,arguments)||this}return Object(r.a)(t,e),t.prototype.render=function(){var e=this;return o.a.createElement(g.Consumer,null,(function(t){t||Object(u.a)(!1);var n=e.props.location||t.location,r=e.props.computedMatch?e.props.computedMatch:e.props.path?k(n.pathname,e.props):t.match,i=Object(c.a)({},t,{location:n,match:r}),a=e.props,s=a.children,l=a.component,f=a.render;return Array.isArray(s)&&function(e){return 0===o.a.Children.count(e)}(s)&&(s=null),o.a.createElement(g.Provider,{value:i},i.match?s?"function"===typeof s?s(i):s:l?o.a.createElement(l,i):f?f(i):null:"function"===typeof s?s(i):null)}))},t}(o.a.Component);function C(e){return"/"===e.charAt(0)?e:"/"+e}function S(e,t){if(!e)return t;var n=C(e);return 0!==t.pathname.indexOf(n)?t:Object(c.a)({},t,{pathname:t.pathname.substr(n.length)})}function x(e){return"string"===typeof e?e:Object(a.e)(e)}function B(e){return function(){Object(u.a)(!1)}}function O(){}o.a.Component;var M=function(e){function t(){return e.apply(this,arguments)||this}return Object(r.a)(t,e),t.prototype.render=function(){var e=this;return o.a.createElement(g.Consumer,null,(function(t){t||Object(u.a)(!1);var n,r,i=e.props.location||t.location;return o.a.Children.forEach(e.props.children,(function(e){if(null==r&&o.a.isValidElement(e)){n=e;var a=e.props.path||e.props.from;r=a?k(i.pathname,Object(c.a)({},e.props,{path:a})):t.match}})),r?o.a.cloneElement(n,{location:i,computedMatch:r}):null}))},t}(o.a.Component);var P=o.a.useContext;function R(){return P(g).location}function N(e){var t=R(),n=P(g).match;return e?k(t.pathname,e):n}},function(e,t,n){"use strict";function r(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:d(e)?2:h(e)?3:0}function u(e,t){return 2===s(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function c(e,t){return 2===s(e)?e.get(t):e[t]}function l(e,t,n){var r=s(e);2===r?e.set(t,n):3===r?(e.delete(t),e.add(n)):e[t]=n}function f(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function d(e){return H&&e instanceof Map}function h(e){return J&&e instanceof Set}function p(e){return e.o||e.t}function g(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Y(e);delete t[V];for(var n=K(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=m),Object.freeze(e),t&&a(e,(function(e,t){return v(t,!0)}),!0)),e}function m(){r(2)}function A(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function y(e){var t=Z[e];return t||r(18,e),t}function b(e,t){Z[e]||(Z[e]=t)}function w(){return L}function _(e,t){t&&(y("Patches"),e.u=[],e.s=[],e.v=t)}function E(e){k(e),e.p.forEach(C),e.p=null}function k(e){e===L&&(L=e.l)}function I(e){return L={p:[],l:L,h:e,m:!0,_:0}}function C(e){var t=e[V];0===t.i||1===t.i?t.j():t.O=!0}function S(e,t){t._=t.p.length;var n=t.p[0],i=void 0!==e&&e!==n;return t.h.g||y("ES5").S(t,e,i),i?(n[V].P&&(E(t),r(4)),o(e)&&(e=x(t,e),t.l||O(t,e)),t.u&&y("Patches").M(n[V].t,e,t.u,t.s)):e=x(t,n,[]),E(t),t.u&&t.v(t.u,t.s),e!==G?e:void 0}function x(e,t,n){if(A(t))return t;var r=t[V];if(!r)return a(t,(function(i,o){return B(e,r,t,i,o,n)}),!0),t;if(r.A!==e)return t;if(!r.P)return O(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=4===r.i||5===r.i?r.o=g(r.k):r.o;a(3===r.i?new Set(i):i,(function(t,o){return B(e,r,i,t,o,n)})),O(e,i,!1),n&&e.u&&y("Patches").R(r,n,e.u,e.s)}return r.o}function B(e,t,n,r,a,s){if(i(a)){var c=x(e,a,s&&t&&3!==t.i&&!u(t.D,r)?s.concat(r):void 0);if(l(n,r,c),!i(c))return;e.m=!1}if(o(a)&&!A(a)){if(!e.h.F&&e._<1)return;x(e,a),t&&t.A.l||O(e,a)}}function O(e,t,n){void 0===n&&(n=!1),e.h.F&&e.m&&v(t,n)}function M(e,t){var n=e[V];return(n?p(n):e)[t]}function P(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function R(e){e.P||(e.P=!0,e.l&&R(e.l))}function N(e){e.o||(e.o=g(e.t))}function T(e,t,n){var r=d(t)?y("MapSet").N(t,n):h(t)?y("MapSet").T(t,n):e.g?function(e,t){var n=Array.isArray(e),r={i:n?1:0,A:t?t.A:w(),P:!1,I:!1,D:{},l:t,t:e,k:null,o:null,j:null,C:!1},i=r,o=X;n&&(i=[r],o=$);var a=Proxy.revocable(i,o),s=a.revoke,u=a.proxy;return r.k=u,r.j=s,u}(t,n):y("ES5").J(t,n);return(n?n.A:w()).p.push(r),r}function Q(e){return i(e)||r(22,e),function e(t){if(!o(t))return t;var n,r=t[V],i=s(t);if(r){if(!r.P&&(r.i<4||!y("ES5").K(r)))return r.t;r.I=!0,n=D(t,i),r.I=!1}else n=D(t,i);return a(n,(function(t,i){r&&c(r.t,t)===i||l(n,t,e(i))})),3===i?new Set(n):n}(e)}function D(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return g(e)}function j(){function e(e,t){var n=o[e];return n?n.enumerable=t:o[e]=n={configurable:!0,enumerable:t,get:function(){var t=this[V];return X.get(t,e)},set:function(t){var n=this[V];X.set(n,e,t)}},n}function t(e){for(var t=e.length-1;t>=0;t--){var i=e[t][V];if(!i.P)switch(i.i){case 5:r(i)&&R(i);break;case 4:n(i)&&R(i)}}}function n(e){for(var t=e.t,n=e.k,r=K(n),i=r.length-1;i>=0;i--){var o=r[i];if(o!==V){var a=t[o];if(void 0===a&&!u(t,o))return!0;var s=n[o],c=s&&s[V];if(c?c.t!==a:!f(s,a))return!0}}var l=!!t[V];return r.length!==K(t).length+(l?0:1)}function r(e){var t=e.k;if(t.length!==e.t.length)return!0;var n=Object.getOwnPropertyDescriptor(t,t.length-1);if(n&&!n.get)return!0;for(var r=0;r1?r-1:0),o=1;o1?r-1:0),o=1;o=0;n--){var r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));var o=y("Patches").$;return i(e)?o(e,t):this.produce(e,(function(e){return o(e,t)}))},e}(),te=new ee,ne=te.produce;te.produceWithPatches.bind(te),te.setAutoFreeze.bind(te),te.setUseProxies.bind(te),te.applyPatches.bind(te),te.createDraft.bind(te),te.finishDraft.bind(te);t.b=ne},,function(e,t,n){"use strict";function r(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}n.d(t,"a",(function(){return r}))},,function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(220);function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Object(r.a)(e,t)}},function(e,t,n){var r=t;r.utils=n(99),r.common=n(165),r.sha=n(655),r.ripemd=n(659),r.hmac=n(660),r.sha1=r.sha.sha1,r.sha256=r.sha.sha256,r.sha224=r.sha.sha224,r.sha384=r.sha.sha384,r.sha512=r.sha.sha512,r.ripemd160=r.ripemd.ripemd160},,function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"d",(function(){return a})),n.d(t,"c",(function(){return s})),n.d(t,"e",(function(){return u})),n.d(t,"f",(function(){return c})),n.d(t,"a",(function(){return l}));var r,i=n(43),o="INTERNAL_ERROR",a="SERVER_ERROR",s=[-32700,-32600,-32601,-32602,-32603],u=[-32e3,-32099],c=(r={},Object(i.a)(r,"PARSE_ERROR",{code:-32700,message:"Parse error"}),Object(i.a)(r,"INVALID_REQUEST",{code:-32600,message:"Invalid Request"}),Object(i.a)(r,"METHOD_NOT_FOUND",{code:-32601,message:"Method not found"}),Object(i.a)(r,"INVALID_PARAMS",{code:-32602,message:"Invalid params"}),Object(i.a)(r,o,{code:-32603,message:"Internal error"}),Object(i.a)(r,a,{code:-32e3,message:"Server error"}),r),l=a},function(e,t,n){"use strict";var r,i="object"===typeof Reflect?Reflect:null,o=i&&"function"===typeof i.apply?i.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=i&&"function"===typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!==e};function s(){s.init.call(this)}e.exports=s,e.exports.once=function(e,t){return new Promise((function(n,r){function i(n){e.removeListener(t,o),r(n)}function o(){"function"===typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}m(e,t,o,{once:!0}),"error"!==t&&function(e,t,n){"function"===typeof e.on&&m(e,"error",t,n)}(e,i,{once:!0})}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var u=10;function c(e){if("function"!==typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function f(e,t,n,r){var i,o,a,s;if(c(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),a=o[t]),void 0===a)a=o[t]=n,++e._eventsCount;else if("function"===typeof a?a=o[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(i=l(e))>0&&a.length>i&&!a.warned){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=a.length,s=u,console&&console.warn&&console.warn(s)}return e}function d(){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 h(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=d.bind(r);return i.listener=n,r.wrapFn=i,i}function p(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"===typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var u=i[e];if(void 0===u)return!1;if("function"===typeof u)o(u,this,t);else{var c=u.length,l=v(u,c);for(n=0;n=0;o--)if(n[o]===t||n[o].listener===t){a=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return p(this,e,!0)},s.prototype.rawListeners=function(e){return p(this,e,!1)},s.listenerCount=function(e,t){return"function"===typeof e.listenerCount?e.listenerCount(t):g.call(e,t)},s.prototype.listenerCount=g,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(665),t),i(n(666),t)},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.DecProto=t.IntProto=t.DecCoin=t.Coin=t.protobufPackage=void 0;var i=r(n(18)),o=r(n(21));t.protobufPackage="cosmos.base.v1beta1";var a={denom:"",amount:""};t.Coin={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.denom&&t.uint32(10).string(e.denom),""!==e.amount&&t.uint32(18).string(e.amount),t},decode:function(e,t){for(var n=e instanceof o.default.Reader?e:new o.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},a);n.pos>>3){case 1:i.denom=n.string();break;case 2:i.amount=n.string();break;default:n.skipType(7&s)}}return i},fromJSON:function(e){var t=Object.assign({},a);return t.denom=void 0!==e.denom&&null!==e.denom?String(e.denom):"",t.amount=void 0!==e.amount&&null!==e.amount?String(e.amount):"",t},toJSON:function(e){var t={};return void 0!==e.denom&&(t.denom=e.denom),void 0!==e.amount&&(t.amount=e.amount),t},fromPartial:function(e){var t,n,r=Object.assign({},a);return r.denom=null!==(t=e.denom)&&void 0!==t?t:"",r.amount=null!==(n=e.amount)&&void 0!==n?n:"",r}};var s={denom:"",amount:""};t.DecCoin={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.denom&&t.uint32(10).string(e.denom),""!==e.amount&&t.uint32(18).string(e.amount),t},decode:function(e,t){for(var n=e instanceof o.default.Reader?e:new o.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},s);n.pos>>3){case 1:i.denom=n.string();break;case 2:i.amount=n.string();break;default:n.skipType(7&a)}}return i},fromJSON:function(e){var t=Object.assign({},s);return t.denom=void 0!==e.denom&&null!==e.denom?String(e.denom):"",t.amount=void 0!==e.amount&&null!==e.amount?String(e.amount):"",t},toJSON:function(e){var t={};return void 0!==e.denom&&(t.denom=e.denom),void 0!==e.amount&&(t.amount=e.amount),t},fromPartial:function(e){var t,n,r=Object.assign({},s);return r.denom=null!==(t=e.denom)&&void 0!==t?t:"",r.amount=null!==(n=e.amount)&&void 0!==n?n:"",r}};var u={int:""};t.IntProto={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.int&&t.uint32(10).string(e.int),t},decode:function(e,t){for(var n=e instanceof o.default.Reader?e:new o.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},u);n.pos>>3===1)i.int=n.string();else n.skipType(7&a)}return i},fromJSON:function(e){var t=Object.assign({},u);return t.int=void 0!==e.int&&null!==e.int?String(e.int):"",t},toJSON:function(e){var t={};return void 0!==e.int&&(t.int=e.int),t},fromPartial:function(e){var t,n=Object.assign({},u);return n.int=null!==(t=e.int)&&void 0!==t?t:"",n}};var c={dec:""};t.DecProto={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return""!==e.dec&&t.uint32(10).string(e.dec),t},decode:function(e,t){for(var n=e instanceof o.default.Reader?e:new o.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},c);n.pos>>3===1)i.dec=n.string();else n.skipType(7&a)}return i},fromJSON:function(e){var t=Object.assign({},c);return t.dec=void 0!==e.dec&&null!==e.dec?String(e.dec):"",t},toJSON:function(e){var t={};return void 0!==e.dec&&(t.dec=e.dec),t},fromPartial:function(e){var t,n=Object.assign({},c);return n.dec=null!==(t=e.dec)&&void 0!==t?t:"",n}},o.default.util.Long!==i.default&&(o.default.util.Long=i.default,o.default.configure())},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isUint8Array=t.isNonNullObject=t.sleep=t.assertDefinedAndNotNull=t.assertDefined=t.assert=t.arrayContentStartsWith=t.arrayContentEquals=void 0;var r=n(879);Object.defineProperty(t,"arrayContentEquals",{enumerable:!0,get:function(){return r.arrayContentEquals}}),Object.defineProperty(t,"arrayContentStartsWith",{enumerable:!0,get:function(){return r.arrayContentStartsWith}});var i=n(880);Object.defineProperty(t,"assert",{enumerable:!0,get:function(){return i.assert}}),Object.defineProperty(t,"assertDefined",{enumerable:!0,get:function(){return i.assertDefined}}),Object.defineProperty(t,"assertDefinedAndNotNull",{enumerable:!0,get:function(){return i.assertDefinedAndNotNull}});var o=n(881);Object.defineProperty(t,"sleep",{enumerable:!0,get:function(){return o.sleep}});var a=n(882);Object.defineProperty(t,"isNonNullObject",{enumerable:!0,get:function(){return a.isNonNullObject}}),Object.defineProperty(t,"isUint8Array",{enumerable:!0,get:function(){return a.isUint8Array}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Uint64=t.Uint53=t.Uint32=t.Int53=t.Decimal=void 0;var r=n(945);Object.defineProperty(t,"Decimal",{enumerable:!0,get:function(){return r.Decimal}});var i=n(947);Object.defineProperty(t,"Int53",{enumerable:!0,get:function(){return i.Int53}}),Object.defineProperty(t,"Uint32",{enumerable:!0,get:function(){return i.Uint32}}),Object.defineProperty(t,"Uint53",{enumerable:!0,get:function(){return i.Uint53}}),Object.defineProperty(t,"Uint64",{enumerable:!0,get:function(){return i.Uint64}})},function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(i){return!1}}()?Object.assign:function(e,t){for(var n,s,u=a(e),c=1;cf[n]||console.log.apply(console,t)}},{key:"debug",value:function(){for(var t=arguments.length,n=new Array(t),r=0;r>4],n+=m[15&t[o]];i.push(e+"=Uint8Array(0x"+n+")")}else i.push(e+"="+JSON.stringify(t))}catch(u){i.push(e+"="+JSON.stringify(r[e].toString()))}})),i.push("code=".concat(n)),i.push("version=".concat(this.version));var o=t,a="";switch(n){case g.NUMERIC_FAULT:a="NUMERIC_FAULT";var s=t;switch(s){case"overflow":case"underflow":case"division-by-zero":a+="-"+s;break;case"negative-power":case"negative-width":a+="-unsupported";break;case"unbound-bitwise-result":a+="-unbound-result"}break;case g.CALL_EXCEPTION:case g.INSUFFICIENT_FUNDS:case g.MISSING_NEW:case g.NONCE_EXPIRED:case g.REPLACEMENT_UNDERPRICED:case g.TRANSACTION_REPLACED:case g.UNPREDICTABLE_GAS_LIMIT:a=n}a&&(t+=" [ See: https://links.ethers.org/v5-errors-"+a+" ]"),i.length&&(t+=" ("+i.join(", ")+")");var u=new Error(t);return u.reason=o,u.code=n,Object.keys(r).forEach((function(e){u[e]=r[e]})),u}},{key:"throwError",value:function(e,t,n){throw this.makeError(e,t,n)}},{key:"throwArgumentError",value:function(t,n,r){return this.throwError(t,e.errors.INVALID_ARGUMENT,{argument:n,value:r})}},{key:"assert",value:function(e,t,n,r){e||this.throwError(t,n,r)}},{key:"assertArgument",value:function(e,t,n,r){e||this.throwArgumentError(t,n,r)}},{key:"checkNormalize",value:function(t){null==t&&(t="platform missing String.prototype.normalize"),v&&this.throwError("platform missing String.prototype.normalize",e.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:v})}},{key:"checkSafeUint53",value:function(t,n){"number"===typeof t&&(null==n&&(n="value not safe"),(t<0||t>=9007199254740991)&&this.throwError(n,e.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:t}),t%1&&this.throwError(n,e.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:t}))}},{key:"checkArgumentCount",value:function(t,n,r){r=r?": "+r:"",tn&&this.throwError("too many arguments"+r,e.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:n})}},{key:"checkNew",value:function(t,n){t!==Object&&null!=t||this.throwError("missing new",e.errors.MISSING_NEW,{name:n.name})}},{key:"checkAbstract",value:function(t,n){t===n?this.throwError("cannot instantiate abstract class "+JSON.stringify(n.name)+" directly; use a sub-class",e.errors.UNSUPPORTED_OPERATION,{name:t.name,operation:"new"}):t!==Object&&null!=t||this.throwError("missing new",e.errors.MISSING_NEW,{name:n.name})}}],[{key:"globalLogger",value:function(){return h||(h=new e("logger/5.6.0")),h}},{key:"setCensorship",value:function(t,n){if(!t&&n&&this.globalLogger().throwError("cannot permanently disable censorship",e.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),c){if(!t)return;this.globalLogger().throwError("error censorship permanent",e.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}l=!!t,c=!!n}},{key:"setLogLevel",value:function(t){var n=f[t.toLowerCase()];null!=n?d=n:e.globalLogger().warn("invalid log level - "+t)}},{key:"from",value:function(t){return new e(t)}}]),e}();A.errors=g,A.levels=p;var y=new A("bytes/5.6.1");function b(e){return!!e.toHexString}function w(e){return e.slice||(e.slice=function(){var t=Array.prototype.slice.call(arguments);return w(new Uint8Array(Array.prototype.slice.apply(e,t)))}),e}function _(e){return"number"===typeof e&&e==e&&e%1===0}function E(e){if(null==e)return!1;if(e.constructor===Uint8Array)return!0;if("string"===typeof e)return!1;if(!_(e.length)||e.length<0)return!1;for(var t=0;t=256)return!1}return!0}function k(e,t){if(t||(t={}),"number"===typeof e){y.checkSafeUint53(e,"invalid arrayify value");for(var n=[];e;)n.unshift(255&e),e=parseInt(String(e/256));return 0===n.length&&n.push(0),w(new Uint8Array(n))}if(t.allowMissingPrefix&&"string"===typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),b(e)&&(e=e.toHexString()),I(e)){var r=e.substring(2);r.length%2&&("left"===t.hexPad?r="0"+r:"right"===t.hexPad?r+="0":y.throwArgumentError("hex data is odd-length","value",e));for(var i=[],o=0;o>1]>>4>=8&&(n[u]=n[u].toUpperCase()),(15&s[u>>1])>=8&&(n[u+1]=n[u+1].toUpperCase());var c="0x"+n.join("");return t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==c&&Object(o.a)(!1),c}var j,U=function(e,t){try{var n=function(n){return Promise.resolve(Promise.all([void 0===t.chainId?e.getChainId():t.chainId,void 0===t.account?e.getAccount():t.account])).then((function(t){var r=t[0],i=t[1],o=Q(r);if(e.supportedChainIds&&!e.supportedChainIds.includes(o))throw new F(o,e.supportedChainIds);var a=null===i?i:D(i);return{provider:n,chainId:o,account:a}}))},r=void 0===t.provider;return Promise.resolve(r?Promise.resolve(e.getProvider()).then(n):n(t.provider))}catch(i){return Promise.reject(i)}},L=function(e){function t(){var t;return(t=e.call(this)||this).name=t.constructor.name,t}return B(t,e),t}(N(Error)),F=function(e){function t(t,n){var r;return(r=e.call(this)||this).name=r.constructor.name,r.message="Unsupported chain id: "+t+". Supported chain ids are: "+n+".",r}return B(t,e),t}(N(Error));function H(e,t){var n=t.type,r=t.payload;switch(n){case j.ACTIVATE_CONNECTOR:return{connector:r.connector,provider:r.provider,chainId:r.chainId,account:r.account,onError:r.onError};case j.UPDATE:var i=r.provider,o=r.chainId,a=r.account;return x({},e,void 0===i?{}:{provider:i},void 0===o?{}:{chainId:o},void 0===a?{}:{account:a});case j.UPDATE_FROM_ERROR:var s=r.provider,u=r.chainId,c=r.account;return x({},e,void 0===s?{}:{provider:s},void 0===u?{}:{chainId:u},void 0===c?{}:{account:c},{error:void 0});case j.ERROR:var l=r.error;return{connector:e.connector,error:l,onError:e.onError};case j.ERROR_FROM_ACTIVATION:return{connector:r.connector,error:r.error};case j.DEACTIVATE_CONNECTOR:return{}}}!function(e){e[e.ACTIVATE_CONNECTOR=0]="ACTIVATE_CONNECTOR",e[e.UPDATE=1]="UPDATE",e[e.UPDATE_FROM_ERROR=2]="UPDATE_FROM_ERROR",e[e.ERROR=3]="ERROR",e[e.ERROR_FROM_ACTIVATION=4]="ERROR_FROM_ACTIVATION",e[e.DEACTIVATE_CONNECTOR=5]="DEACTIVATE_CONNECTOR"}(j||(j={}));var J="primary",q={};function G(e){q[e]&&Object(o.a)(!1),q[e]=Object(r.createContext)({activate:function(){try{return Object(o.a)(!1),Promise.resolve()}catch(e){return Promise.reject(e)}},setError:function(){Object(o.a)(!1)},deactivate:function(){Object(o.a)(!1)},active:!1}),q[e].displayName="Web3ReactContext - "+e;var t=q[e].Provider;return function(e){var n=e.getLibrary,o=e.children,s=function(){var e=Object(r.useReducer)(H,{}),t=e[0],n=e[1],i=t.connector,o=t.provider,s=t.chainId,u=t.account,c=t.onError,l=t.error,f=Object(r.useRef)(-1);f.current+=1;var d=Object(r.useCallback)((function(e,t,r){void 0===r&&(r=!1);try{var i=f.current,o=!1;return Promise.resolve(T((function(){return Promise.resolve(e.activate().then((function(e){return o=!0,e}))).then((function(r){return Promise.resolve(U(e,r)).then((function(r){if(f.current>i)throw new L;n({type:j.ACTIVATE_CONNECTOR,payload:x({connector:e},r,{onError:t})})}))}))}),(function(i){if(i instanceof L)o&&e.deactivate();else{if(r)throw o&&e.deactivate(),i;t?(o&&e.deactivate(),t(i)):n({type:j.ERROR_FROM_ACTIVATION,payload:{connector:e,error:i}})}})))}catch(a){return Promise.reject(a)}}),[]),h=Object(r.useCallback)((function(e){n({type:j.ERROR,payload:{error:e}})}),[]),p=Object(r.useCallback)((function(){n({type:j.DEACTIVATE_CONNECTOR})}),[]),g=Object(r.useCallback)((function(e){try{if(!i)throw Error("This should never happen, it's just so Typescript stops complaining");var t=f.current;return Promise.resolve(function(){if(l)return T((function(){return Promise.resolve(U(i,e)).then((function(e){if(f.current>t)throw new L;n({type:j.UPDATE_FROM_ERROR,payload:e})}))}),(function(e){e instanceof L||(c?c(e):n({type:j.ERROR,payload:{error:e}}))}));var r=void 0===e.chainId?void 0:Q(e.chainId);if(void 0!==r&&i.supportedChainIds&&!i.supportedChainIds.includes(r)){var o=new F(r,i.supportedChainIds);c?c(o):n({type:j.ERROR,payload:{error:o}})}else{var a="string"===typeof e.account?D(e.account):e.account;n({type:j.UPDATE,payload:{provider:e.provider,chainId:r,account:a}})}}())}catch(r){return Promise.reject(r)}}),[i,l,c]),v=Object(r.useCallback)((function(e){c?c(e):n({type:j.ERROR,payload:{error:e}})}),[c]),m=Object(r.useCallback)((function(){n({type:j.DEACTIVATE_CONNECTOR})}),[]);return Object(r.useEffect)((function(){return function(){i&&i.deactivate()}}),[i]),Object(r.useEffect)((function(){return i&&i.on(a.a.Update,g).on(a.a.Error,v).on(a.a.Deactivate,m),function(){i&&i.off(a.a.Update,g).off(a.a.Error,v).off(a.a.Deactivate,m)}}),[i,g,v,m]),{connector:i,provider:o,chainId:s,account:u,activate:d,setError:h,deactivate:p,error:l}}(),u=s.connector,c=s.provider,l=s.chainId,f=s.account,d=s.activate,h=s.setError,p=s.deactivate,g=s.error,v=void 0!==u&&void 0!==l&&void 0!==f&&!g,m=Object(r.useMemo)((function(){return v&&void 0!==l&&Number.isInteger(l)&&u?n(c,u):void 0}),[v,n,c,u,l]),A={connector:u,library:m,chainId:l,account:f,activate:d,setError:h,deactivate:p,active:v,error:g};return i.a.createElement(t,{value:A},o)}}var z=G(J);function V(e){return Object(r.useContext)(function(e){return void 0===e&&(e=J),Object.keys(q).includes(e)||Object(o.a)(!1),q[e]}(e))}},function(e,t,n){var r=n(667),i=n(668),o=n(238),a=n(669);e.exports=function(e,t){return r(e)||i(e,t)||o(e,t)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},,function(e,t,n){"use strict";function r(e){var t=void 0;return"undefined"!==typeof window&&"undefined"!==typeof window[e]&&(t=window[e]),t}function i(e){var t=r(e);if(!t)throw new Error("".concat(e," is not defined in Window"));return t}Object.defineProperty(t,"__esModule",{value:!0}),t.getLocalStorage=t.getLocalStorageOrThrow=t.getCrypto=t.getCryptoOrThrow=t.getLocation=t.getLocationOrThrow=t.getNavigator=t.getNavigatorOrThrow=t.getDocument=t.getDocumentOrThrow=t.getFromWindowOrThrow=t.getFromWindow=void 0,t.getFromWindow=r,t.getFromWindowOrThrow=i,t.getDocumentOrThrow=function(){return i("document")},t.getDocument=function(){return r("document")},t.getNavigatorOrThrow=function(){return i("navigator")},t.getNavigator=function(){return r("navigator")},t.getLocationOrThrow=function(){return i("location")},t.getLocation=function(){return r("location")},t.getCryptoOrThrow=function(){return i("crypto")},t.getCrypto=function(){return r("crypto")},t.getLocalStorageOrThrow=function(){return i("localStorage")},t.getLocalStorage=function(){return r("localStorage")}},function(e,t,n){"use strict";n.d(t,"a",(function(){return E})),n.d(t,"b",(function(){return B})),n.d(t,"d",(function(){return M})),n.d(t,"c",(function(){return g})),n.d(t,"f",(function(){return v})),n.d(t,"e",(function(){return p}));var r=n(42);function i(e){return"/"===e.charAt(0)}function o(e,t){for(var n=t,r=n+1,i=e.length;r=0;d--){var h=a[d];"."===h?o(a,d):".."===h?(o(a,d),f++):f&&(o(a,d),f--)}if(!c)for(;f--;f)a.unshift("..");!c||""===a[0]||a[0]&&i(a[0])||a.unshift("");var p=a.join("/");return n&&"/"!==p.substr(-1)&&(p+="/"),p};function s(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}var u=function e(t,n){if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every((function(t,r){return e(t,n[r])}));if("object"===typeof t||"object"===typeof n){var r=s(t),i=s(n);return r!==t||i!==n?e(r,i):Object.keys(Object.assign({},t,n)).every((function(r){return e(t[r],n[r])}))}return!1},c=n(54);function l(e){return"/"===e.charAt(0)?e:"/"+e}function f(e){return"/"===e.charAt(0)?e.substr(1):e}function d(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function h(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function p(e){var t=e.pathname,n=e.search,r=e.hash,i=t||"/";return n&&"?"!==n&&(i+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(i+="#"===r.charAt(0)?r:"#"+r),i}function g(e,t,n,i){var o;"string"===typeof e?(o=function(e){var t=e||"/",n="",r="",i=t.indexOf("#");-1!==i&&(r=t.substr(i),t=t.substr(0,i));var o=t.indexOf("?");return-1!==o&&(n=t.substr(o),t=t.substr(0,o)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e),o.state=t):(void 0===(o=Object(r.a)({},e)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==t&&void 0===o.state&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(s){throw s instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):s}return n&&(o.key=n),i?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=a(o.pathname,i.pathname)):o.pathname=i.pathname:o.pathname||(o.pathname="/"),o}function v(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&u(e.state,t.state)}function m(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,i){if(null!=e){var o="function"===typeof e?e(t,n):e;"string"===typeof o?"function"===typeof r?r(o,i):i(!0):i(!1!==o)}else i(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;rt?n.splice(t,n.length-t,i):n.push(i),f({action:r,location:i,index:t,entries:n})}}))},replace:function(e,t){var r="REPLACE",i=g(e,t,d(),b.location);l.confirmTransitionTo(i,r,n,(function(e){e&&(b.entries[b.index]=i,f({action:r,location:i}))}))},go:y,goBack:function(){y(-1)},goForward:function(){y(1)},canGo:function(e){var t=b.index+e;return t>=0&&t(i>>1)-1?(i>>1)-u:u,o.isubn(s)):s=0,r[a]=s,o.iushrn(1)}return r},r.getJSF=function(e,t){var n=[[],[]];e=e.clone(),t=t.clone();for(var r,i=0,o=0;e.cmpn(-i)>0||t.cmpn(-o)>0;){var a,s,u=e.andln(3)+i&3,c=t.andln(3)+o&3;3===u&&(u=-1),3===c&&(c=-1),a=0===(1&u)?0:3!==(r=e.andln(7)+i&7)&&5!==r||2!==c?u:-u,n[0].push(a),s=0===(1&c)?0:3!==(r=t.andln(7)+o&7)&&5!==r||2!==u?c:-c,n[1].push(s),2*i===a+1&&(i=1-i),2*o===s+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return n},r.cachedProperty=function(e,t,n){var r="_"+t;e.prototype[t]=function(){return void 0!==this[r]?this[r]:this[r]=n.call(this)}},r.parseBytes=function(e){return"string"===typeof e?r.toArray(e,"hex"):e},r.intFromLE=function(e){return new i(e,"hex","le")}},function(e,t,n){var r=n(582);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}e.exports=function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return 0!==e.key.length&&t.uint32(10).bytes(e.key),e.offset.isZero()||t.uint32(16).uint64(e.offset),e.limit.isZero()||t.uint32(24).uint64(e.limit),!0===e.countTotal&&t.uint32(32).bool(e.countTotal),!0===e.reverse&&t.uint32(40).bool(e.reverse),t},decode:function(e,t){var n=e instanceof a.default.Reader?e:new a.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},s);for(i.key=new Uint8Array;n.pos>>3){case 1:i.key=n.bytes();break;case 2:i.offset=n.uint64();break;case 3:i.limit=n.uint64();break;case 4:i.countTotal=n.bool();break;case 5:i.reverse=n.bool();break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t=Object.assign({},s);return t.key=void 0!==e.key&&null!==e.key?f(e.key):new Uint8Array,t.offset=void 0!==e.offset&&null!==e.offset?o.default.fromString(e.offset):o.default.UZERO,t.limit=void 0!==e.limit&&null!==e.limit?o.default.fromString(e.limit):o.default.UZERO,t.countTotal=void 0!==e.countTotal&&null!==e.countTotal&&Boolean(e.countTotal),t.reverse=void 0!==e.reverse&&null!==e.reverse&&Boolean(e.reverse),t},toJSON:function(e){var t={};return void 0!==e.key&&(t.key=h(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.offset&&(t.offset=(e.offset||o.default.UZERO).toString()),void 0!==e.limit&&(t.limit=(e.limit||o.default.UZERO).toString()),void 0!==e.countTotal&&(t.countTotal=e.countTotal),void 0!==e.reverse&&(t.reverse=e.reverse),t},fromPartial:function(e){var t,n,r,i=Object.assign({},s);return i.key=null!==(t=e.key)&&void 0!==t?t:new Uint8Array,i.offset=void 0!==e.offset&&null!==e.offset?o.default.fromValue(e.offset):o.default.UZERO,i.limit=void 0!==e.limit&&null!==e.limit?o.default.fromValue(e.limit):o.default.UZERO,i.countTotal=null!==(n=e.countTotal)&&void 0!==n&&n,i.reverse=null!==(r=e.reverse)&&void 0!==r&&r,i}};var u={total:o.default.UZERO};t.PageResponse={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return 0!==e.nextKey.length&&t.uint32(10).bytes(e.nextKey),e.total.isZero()||t.uint32(16).uint64(e.total),t},decode:function(e,t){var n=e instanceof a.default.Reader?e:new a.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},u);for(i.nextKey=new Uint8Array;n.pos>>3){case 1:i.nextKey=n.bytes();break;case 2:i.total=n.uint64();break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t=Object.assign({},u);return t.nextKey=void 0!==e.nextKey&&null!==e.nextKey?f(e.nextKey):new Uint8Array,t.total=void 0!==e.total&&null!==e.total?o.default.fromString(e.total):o.default.UZERO,t},toJSON:function(e){var t={};return void 0!==e.nextKey&&(t.nextKey=h(void 0!==e.nextKey?e.nextKey:new Uint8Array)),void 0!==e.total&&(t.total=(e.total||o.default.UZERO).toString()),t},fromPartial:function(e){var t,n=Object.assign({},u);return n.nextKey=null!==(t=e.nextKey)&&void 0!==t?t:new Uint8Array,n.total=void 0!==e.total&&null!==e.total?o.default.fromValue(e.total):o.default.UZERO,n}};var c=function(){if("undefined"!==typeof c)return c;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof e)return e;throw"Unable to locate global object"}(),l=c.atob||function(e){return c.Buffer.from(e,"base64").toString("binary")};function f(e){for(var t=l(e),n=new Uint8Array(t.length),r=0;r255)return!1;return!0}function i(e,t){if(e.buffer&&ArrayBuffer.isView(e)&&"Uint8Array"===e.name)return t&&(e=e.slice?e.slice():Array.prototype.slice.call(e)),e;if(Array.isArray(e)){if(!r(e))throw new Error("Array contains invalid value: "+e);return new Uint8Array(e)}if(n(e.length)&&r(e))return new Uint8Array(e);throw new Error("unsupported array-like object")}function o(e){return new Uint8Array(e)}function a(e,t,n,r,i){null==r&&null==i||(e=e.slice?e.slice(r,i):Array.prototype.slice.call(e,r,i)),t.set(e,n)}var s={toBytes:function(e){var t=[],n=0;for(e=encodeURI(e);n191&&r<224?(t.push(String.fromCharCode((31&r)<<6|63&e[n+1])),n+=2):(t.push(String.fromCharCode((15&r)<<12|(63&e[n+1])<<6|63&e[n+2])),n+=3)}return t.join("")}},u=function(){var e="0123456789abcdef";return{toBytes:function(e){for(var t=[],n=0;n>4]+e[15&i])}return n.join("")}}}(),c={16:10,24:12,32:14},l=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],f=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],d=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],h=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],p=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],g=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],v=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],m=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],A=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],y=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],b=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],w=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],_=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],E=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],k=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function I(e){for(var t=[],n=0;n>2,this._Ke[n][t%4]=o[t],this._Kd[e-n][t%4]=o[t];for(var a,s=0,u=i;u>16&255]<<24^f[a>>8&255]<<16^f[255&a]<<8^f[a>>24&255]^l[s]<<24,s+=1,8!=i)for(t=1;t>8&255]<<8^f[a>>16&255]<<16^f[a>>24&255]<<24;for(t=i/2+1;t>2,h=u%4,this._Ke[d][h]=o[t],this._Kd[e-d][h]=o[t++],u++}for(var d=1;d>24&255]^_[a>>16&255]^E[a>>8&255]^k[255&a]},C.prototype.encrypt=function(e){if(16!=e.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var t=this._Ke.length-1,n=[0,0,0,0],r=I(e),i=0;i<4;i++)r[i]^=this._Ke[0][i];for(var a=1;a>24&255]^p[r[(i+1)%4]>>16&255]^g[r[(i+2)%4]>>8&255]^v[255&r[(i+3)%4]]^this._Ke[a][i];r=n.slice()}var s,u=o(16);for(i=0;i<4;i++)s=this._Ke[t][i],u[4*i]=255&(f[r[i]>>24&255]^s>>24),u[4*i+1]=255&(f[r[(i+1)%4]>>16&255]^s>>16),u[4*i+2]=255&(f[r[(i+2)%4]>>8&255]^s>>8),u[4*i+3]=255&(f[255&r[(i+3)%4]]^s);return u},C.prototype.decrypt=function(e){if(16!=e.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var t=this._Kd.length-1,n=[0,0,0,0],r=I(e),i=0;i<4;i++)r[i]^=this._Kd[0][i];for(var a=1;a>24&255]^A[r[(i+3)%4]>>16&255]^y[r[(i+2)%4]>>8&255]^b[255&r[(i+1)%4]]^this._Kd[a][i];r=n.slice()}var s,u=o(16);for(i=0;i<4;i++)s=this._Kd[t][i],u[4*i]=255&(d[r[i]>>24&255]^s>>24),u[4*i+1]=255&(d[r[(i+3)%4]>>16&255]^s>>16),u[4*i+2]=255&(d[r[(i+2)%4]>>8&255]^s>>8),u[4*i+3]=255&(d[255&r[(i+1)%4]]^s);return u};var S=function e(t){if(!(this instanceof e))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new C(t)};S.prototype.encrypt=function(e){if((e=i(e)).length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=o(e.length),n=o(16),r=0;r=0;--t)this._counter[t]=e%256,e>>=8},M.prototype.setBytes=function(e){if(16!=(e=i(e,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=e},M.prototype.increment=function(){for(var e=15;e>=0;e--){if(255!==this._counter[e]){this._counter[e]++;break}this._counter[e]=0}};var P=function e(t,n){if(!(this instanceof e))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",n instanceof M||(n=new M(n)),this._counter=n,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new C(t)};P.prototype.encrypt=function(e){for(var t=i(e,!0),n=0;n16)throw new Error("PKCS#7 padding byte out of range");for(var n=e.length-t,r=0;r1&&void 0!==i[1]?i[1]:a.a,e.abrupt("return",o.getSubtleCrypto().importKey("raw",t,s(n),!0,u(n)));case 2:case"end":return e.stop()}}),e)}))),l.apply(this,arguments)}function f(e,t,n){return d.apply(this,arguments)}function d(){return(d=Object(i.a)(Object(r.a)().mark((function e(t,n,i){var s,u,l;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=o.getSubtleCrypto(),e.next=3,c(n,a.a);case 3:return u=e.sent,e.next=6,s.encrypt({iv:t,name:a.a},u,i);case 6:return l=e.sent,e.abrupt("return",new Uint8Array(l));case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function h(e,t,n){return p.apply(this,arguments)}function p(){return(p=Object(i.a)(Object(r.a)().mark((function e(t,n,i){var s,u,l;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=o.getSubtleCrypto(),e.next=3,c(n,a.a);case 3:return u=e.sent,e.next=6,s.decrypt({iv:t,name:a.a},u,i);case 6:return l=e.sent,e.abrupt("return",new Uint8Array(l));case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function g(e,t){return v.apply(this,arguments)}function v(){return(v=Object(i.a)(Object(r.a)().mark((function e(t,n){var i,s,u;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=o.getSubtleCrypto(),e.next=3,c(t,a.e);case 3:return s=e.sent,e.next=6,i.sign({length:a.g,name:a.e},s,n);case 6:return u=e.sent,e.abrupt("return",new Uint8Array(u));case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function m(e,t){return A.apply(this,arguments)}function A(){return(A=Object(i.a)(Object(r.a)().mark((function e(t,n){var i,s,u;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=o.getSubtleCrypto(),e.next=3,c(t,a.e);case 3:return s=e.sent,e.next=6,i.sign({length:a.h,name:a.e},s,n);case 6:return u=e.sent,e.abrupt("return",new Uint8Array(u));case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function y(e){return b.apply(this,arguments)}function b(){return(b=Object(i.a)(Object(r.a)().mark((function e(t){var n,i;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=o.getSubtleCrypto(),e.next=3,n.digest({name:a.i},t);case 3:return i=e.sent,e.abrupt("return",new Uint8Array(i));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function w(e){return _.apply(this,arguments)}function _(){return(_=Object(i.a)(Object(r.a)().mark((function e(t){var n,i;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=o.getSubtleCrypto(),e.next=3,n.digest({name:a.j},t);case 3:return i=e.sent,e.abrupt("return",new Uint8Array(i));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return r})),function(e){e.Update="Web3ReactUpdate",e.Error="Web3ReactError",e.Deactivate="Web3ReactDeactivate"}(r||(r={}))},function(e,t,n){"use strict";var r=n(85),i=n(24);function o(e,t){return 55296===(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320===(64512&e.charCodeAt(t+1)))}function a(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function s(e){return 1===e.length?"0"+e:e}function u(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"===typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!==0&&(e="0"+e),i=0;i>6|192,n[r++]=63&a|128):o(e,i)?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++i)),n[r++]=a>>18|240,n[r++]=a>>12&63|128,n[r++]=a>>6&63|128,n[r++]=63&a|128):(n[r++]=a>>12|224,n[r++]=a>>6&63|128,n[r++]=63&a|128)}else for(i=0;i>>0}return a},t.split32=function(e,t){for(var n=new Array(4*e.length),r=0,i=0;r>>24,n[i+1]=o>>>16&255,n[i+2]=o>>>8&255,n[i+3]=255&o):(n[i+3]=o>>>24,n[i+2]=o>>>16&255,n[i+1]=o>>>8&255,n[i]=255&o)}return n},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,n){return e+t+n>>>0},t.sum32_4=function(e,t,n,r){return e+t+n+r>>>0},t.sum32_5=function(e,t,n,r,i){return e+t+n+r+i>>>0},t.sum64=function(e,t,n,r){var i=e[t],o=r+e[t+1]>>>0,a=(o>>0,e[t+1]=o},t.sum64_hi=function(e,t,n,r){return(t+r>>>0>>0},t.sum64_lo=function(e,t,n,r){return t+r>>>0},t.sum64_4_hi=function(e,t,n,r,i,o,a,s){var u=0,c=t;return u+=(c=c+r>>>0)>>0)>>0)>>0},t.sum64_4_lo=function(e,t,n,r,i,o,a,s){return t+r+o+s>>>0},t.sum64_5_hi=function(e,t,n,r,i,o,a,s,u,c){var l=0,f=t;return l+=(f=f+r>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,t,n,r,i,o,a,s,u,c){return t+r+o+s+c>>>0},t.rotr64_hi=function(e,t,n){return(t<<32-n|e>>>n)>>>0},t.rotr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},t.shr64_hi=function(e,t,n){return e>>>n},t.shr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.executeKdf=t.makeStdTx=t.isStdTx=t.serializeSignDoc=t.makeSignDoc=t.encodeSecp256k1Signature=t.decodeSignature=t.Secp256k1Wallet=t.Secp256k1HdWallet=t.extractKdfConfiguration=t.pubkeyType=t.isSinglePubkey=t.isSecp256k1Pubkey=t.isMultisigThresholdPubkey=t.isEd25519Pubkey=t.makeCosmoshubPath=t.createMultisigThresholdPubkey=t.encodeSecp256k1Pubkey=t.encodeBech32Pubkey=t.encodeAminoPubkey=t.decodeBech32Pubkey=t.decodeAminoPubkey=t.parseCoins=t.coins=t.coin=t.addCoins=t.rawSecp256k1PubkeyToRawAddress=t.rawEd25519PubkeyToRawAddress=t.pubkeyToRawAddress=t.pubkeyToAddress=void 0;var r=n(208);Object.defineProperty(t,"pubkeyToAddress",{enumerable:!0,get:function(){return r.pubkeyToAddress}}),Object.defineProperty(t,"pubkeyToRawAddress",{enumerable:!0,get:function(){return r.pubkeyToRawAddress}}),Object.defineProperty(t,"rawEd25519PubkeyToRawAddress",{enumerable:!0,get:function(){return r.rawEd25519PubkeyToRawAddress}}),Object.defineProperty(t,"rawSecp256k1PubkeyToRawAddress",{enumerable:!0,get:function(){return r.rawSecp256k1PubkeyToRawAddress}});var i=n(948);Object.defineProperty(t,"addCoins",{enumerable:!0,get:function(){return i.addCoins}}),Object.defineProperty(t,"coin",{enumerable:!0,get:function(){return i.coin}}),Object.defineProperty(t,"coins",{enumerable:!0,get:function(){return i.coins}}),Object.defineProperty(t,"parseCoins",{enumerable:!0,get:function(){return i.parseCoins}});var o=n(278);Object.defineProperty(t,"decodeAminoPubkey",{enumerable:!0,get:function(){return o.decodeAminoPubkey}}),Object.defineProperty(t,"decodeBech32Pubkey",{enumerable:!0,get:function(){return o.decodeBech32Pubkey}}),Object.defineProperty(t,"encodeAminoPubkey",{enumerable:!0,get:function(){return o.encodeAminoPubkey}}),Object.defineProperty(t,"encodeBech32Pubkey",{enumerable:!0,get:function(){return o.encodeBech32Pubkey}}),Object.defineProperty(t,"encodeSecp256k1Pubkey",{enumerable:!0,get:function(){return o.encodeSecp256k1Pubkey}});var a=n(949);Object.defineProperty(t,"createMultisigThresholdPubkey",{enumerable:!0,get:function(){return a.createMultisigThresholdPubkey}});var s=n(448);Object.defineProperty(t,"makeCosmoshubPath",{enumerable:!0,get:function(){return s.makeCosmoshubPath}});var u=n(215);Object.defineProperty(t,"isEd25519Pubkey",{enumerable:!0,get:function(){return u.isEd25519Pubkey}}),Object.defineProperty(t,"isMultisigThresholdPubkey",{enumerable:!0,get:function(){return u.isMultisigThresholdPubkey}}),Object.defineProperty(t,"isSecp256k1Pubkey",{enumerable:!0,get:function(){return u.isSecp256k1Pubkey}}),Object.defineProperty(t,"isSinglePubkey",{enumerable:!0,get:function(){return u.isSinglePubkey}}),Object.defineProperty(t,"pubkeyType",{enumerable:!0,get:function(){return u.pubkeyType}});var c=n(950);Object.defineProperty(t,"extractKdfConfiguration",{enumerable:!0,get:function(){return c.extractKdfConfiguration}}),Object.defineProperty(t,"Secp256k1HdWallet",{enumerable:!0,get:function(){return c.Secp256k1HdWallet}});var l=n(951);Object.defineProperty(t,"Secp256k1Wallet",{enumerable:!0,get:function(){return l.Secp256k1Wallet}});var f=n(279);Object.defineProperty(t,"decodeSignature",{enumerable:!0,get:function(){return f.decodeSignature}}),Object.defineProperty(t,"encodeSecp256k1Signature",{enumerable:!0,get:function(){return f.encodeSecp256k1Signature}});var d=n(280);Object.defineProperty(t,"makeSignDoc",{enumerable:!0,get:function(){return d.makeSignDoc}}),Object.defineProperty(t,"serializeSignDoc",{enumerable:!0,get:function(){return d.serializeSignDoc}});var h=n(952);Object.defineProperty(t,"isStdTx",{enumerable:!0,get:function(){return h.isStdTx}}),Object.defineProperty(t,"makeStdTx",{enumerable:!0,get:function(){return h.makeStdTx}});var p=n(449);Object.defineProperty(t,"executeKdf",{enumerable:!0,get:function(){return p.executeKdf}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(66),i=n(98);var o=function(e){var t,n;function r(t){var n,r=(void 0===t?{}:t).supportedChainIds;return(n=e.call(this)||this).supportedChainIds=r,n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var o=r.prototype;return o.emitUpdate=function(e){this.emit(i.a.Update,e)},o.emitError=function(e){this.emit(i.a.Error,e)},o.emitDeactivate=function(){this.emit(i.a.Deactivate)},r}(r.EventEmitter)},function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return l})),n.d(t,"c",(function(){return f})),n.d(t,"d",(function(){return c}));var r=n(11);function i(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var o="function"===typeof Symbol&&Symbol.observable||"@@observable",a=function(){return Math.random().toString(36).substring(7).split("").join(".")},s={INIT:"@@redux/INIT"+a(),REPLACE:"@@redux/REPLACE"+a(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+a()}};function u(e){if("object"!==typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function c(e,t,n){var r;if("function"===typeof t&&"function"===typeof n||"function"===typeof n&&"function"===typeof arguments[3])throw new Error(i(0));if("function"===typeof t&&"undefined"===typeof n&&(n=t,t=void 0),"undefined"!==typeof n){if("function"!==typeof n)throw new Error(i(1));return n(c)(e,t)}if("function"!==typeof e)throw new Error(i(2));var a=e,l=t,f=[],d=f,h=!1;function p(){d===f&&(d=f.slice())}function g(){if(h)throw new Error(i(3));return l}function v(e){if("function"!==typeof e)throw new Error(i(4));if(h)throw new Error(i(5));var t=!0;return p(),d.push(e),function(){if(t){if(h)throw new Error(i(6));t=!1,p();var n=d.indexOf(e);d.splice(n,1),f=null}}}function m(e){if(!u(e))throw new Error(i(7));if("undefined"===typeof e.type)throw new Error(i(8));if(h)throw new Error(i(9));try{h=!0,l=a(l,e)}finally{h=!1}for(var t=f=d,n=0;n>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!==(192&t[0]))return e.lastNeed=0,"\ufffd";if(e.lastNeed>1&&t.length>1){if(128!==(192&t[1]))return e.lastNeed=1,"\ufffd";if(e.lastNeed>2&&t.length>2&&128!==(192&t[2]))return e.lastNeed=2,"\ufffd"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2===0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function l(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}t.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n=0)return i>0&&(e.lastNeed=i-1),i;if(--r=0)return i>0&&(e.lastNeed=i-2),i;if(--r=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r={};n.r(r),n.d(r,"encode",(function(){return oe})),n.d(r,"decode",(function(){return ue}));var i={};n.r(i),n.d(i,"AddressZero",(function(){return Ii})),n.d(i,"NegativeOne",(function(){return ze})),n.d(i,"Zero",(function(){return Ve})),n.d(i,"One",(function(){return We})),n.d(i,"Two",(function(){return Ke})),n.d(i,"WeiPerEther",(function(){return Ye})),n.d(i,"MaxUint256",(function(){return Ze})),n.d(i,"MinInt256",(function(){return Xe})),n.d(i,"MaxInt256",(function(){return $e})),n.d(i,"HashZero",(function(){return Ci})),n.d(i,"EtherSymbol",(function(){return Si}));var o={};n.r(o),n.d(o,"Provider",(function(){return Ht})),n.d(o,"BaseProvider",(function(){return $o})),n.d(o,"Resolver",(function(){return Yo})),n.d(o,"UrlJsonRpcProvider",(function(){return Ea})),n.d(o,"FallbackProvider",(function(){return is})),n.d(o,"AlchemyProvider",(function(){return Sa})),n.d(o,"AlchemyWebSocketProvider",(function(){return Ca})),n.d(o,"AnkrProvider",(function(){return Ma})),n.d(o,"CloudflareProvider",(function(){return Na})),n.d(o,"EtherscanProvider",(function(){return Ha})),n.d(o,"InfuraProvider",(function(){return cs})),n.d(o,"InfuraWebSocketProvider",(function(){return us})),n.d(o,"JsonRpcProvider",(function(){return ha})),n.d(o,"JsonRpcBatchProvider",(function(){return ls})),n.d(o,"NodesmithProvider",(function(){return ds})),n.d(o,"PocketProvider",(function(){return gs})),n.d(o,"StaticJsonRpcProvider",(function(){return _a})),n.d(o,"Web3Provider",(function(){return ys})),n.d(o,"WebSocketProvider",(function(){return ya})),n.d(o,"IpcProvider",(function(){return os})),n.d(o,"JsonRpcSigner",(function(){return la})),n.d(o,"getDefaultProvider",(function(){return ws})),n.d(o,"getNetwork",(function(){return Ti})),n.d(o,"isCommunityResource",(function(){return So})),n.d(o,"isCommunityResourcable",(function(){return Co})),n.d(o,"showThrottleMessage",(function(){return Bo})),n.d(o,"Formatter",(function(){return Io}));var a={};n.r(a),n.d(a,"decode",(function(){return Qi})),n.d(a,"encode",(function(){return Di}));var s={};n.r(s),n.d(s,"AbiCoder",(function(){return Bt})),n.d(s,"defaultAbiCoder",(function(){return Ot})),n.d(s,"Fragment",(function(){return ht})),n.d(s,"ConstructorFragment",(function(){return At})),n.d(s,"ErrorFragment",(function(){return wt})),n.d(s,"EventFragment",(function(){return pt})),n.d(s,"FunctionFragment",(function(){return yt})),n.d(s,"ParamType",(function(){return ft})),n.d(s,"FormatTypes",(function(){return ct})),n.d(s,"checkResultErrors",(function(){return W})),n.d(s,"Logger",(function(){return _.b})),n.d(s,"RLP",(function(){return r})),n.d(s,"_fetchData",(function(){return Ao})),n.d(s,"fetchJson",(function(){return yo})),n.d(s,"poll",(function(){return bo})),n.d(s,"checkProperties",(function(){return U})),n.d(s,"deepCopy",(function(){return q})),n.d(s,"defineReadOnly",(function(){return Q})),n.d(s,"getStatic",(function(){return D})),n.d(s,"resolveProperties",(function(){return j})),n.d(s,"shallowCopy",(function(){return L})),n.d(s,"arrayify",(function(){return y.a})),n.d(s,"concat",(function(){return y.b})),n.d(s,"stripZeros",(function(){return y.o})),n.d(s,"zeroPad",(function(){return y.p})),n.d(s,"isBytes",(function(){return y.j})),n.d(s,"isBytesLike",(function(){return y.k})),n.d(s,"defaultPath",(function(){return Lr})),n.d(s,"HDNode",(function(){return Fr})),n.d(s,"SigningKey",(function(){return $t})),n.d(s,"Interface",(function(){return jt})),n.d(s,"LogDescription",(function(){return Pt})),n.d(s,"TransactionDescription",(function(){return Rt})),n.d(s,"base58",(function(){return vr})),n.d(s,"base64",(function(){return a})),n.d(s,"hexlify",(function(){return y.i})),n.d(s,"isHexString",(function(){return y.l})),n.d(s,"hexConcat",(function(){return y.c})),n.d(s,"hexStripZeros",(function(){return y.f})),n.d(s,"hexValue",(function(){return y.g})),n.d(s,"hexZeroPad",(function(){return y.h})),n.d(s,"hexDataLength",(function(){return y.d})),n.d(s,"hexDataSlice",(function(){return y.e})),n.d(s,"nameprep",(function(){return Ls})),n.d(s,"_toEscapedUtf8String",(function(){return Oe})),n.d(s,"toUtf8Bytes",(function(){return xe})),n.d(s,"toUtf8CodePoints",(function(){return Re})),n.d(s,"toUtf8String",(function(){return Pe})),n.d(s,"Utf8ErrorFuncs",(function(){return Ce})),n.d(s,"formatBytes32String",(function(){return Fs})),n.d(s,"parseBytes32String",(function(){return Hs})),n.d(s,"dnsEncode",(function(){return lo})),n.d(s,"hashMessage",(function(){return Yn})),n.d(s,"namehash",(function(){return co})),n.d(s,"isValidName",(function(){return uo})),n.d(s,"id",(function(){return Ne})),n.d(s,"_TypedDataEncoder",(function(){return pr})),n.d(s,"getAddress",(function(){return me})),n.d(s,"getIcapAddress",(function(){return ye})),n.d(s,"getContractAddress",(function(){return be})),n.d(s,"getCreate2Address",(function(){return we})),n.d(s,"isAddress",(function(){return Ae})),n.d(s,"formatEther",(function(){return Ws})),n.d(s,"parseEther",(function(){return Ks})),n.d(s,"formatUnits",(function(){return zs})),n.d(s,"parseUnits",(function(){return Vs})),n.d(s,"commify",(function(){return Gs})),n.d(s,"computeHmac",(function(){return Er})),n.d(s,"keccak256",(function(){return ee})),n.d(s,"ripemd160",(function(){return br})),n.d(s,"sha256",(function(){return wr})),n.d(s,"sha512",(function(){return _r})),n.d(s,"randomBytes",(function(){return Vr.a})),n.d(s,"shuffled",(function(){return Ja})),n.d(s,"solidityPack",(function(){return Ss})),n.d(s,"solidityKeccak256",(function(){return xs})),n.d(s,"soliditySha256",(function(){return Bs})),n.d(s,"splitSignature",(function(){return y.n})),n.d(s,"joinSignature",(function(){return y.m})),n.d(s,"accessListify",(function(){return hn})),n.d(s,"parseTransaction",(function(){return yn})),n.d(s,"serializeTransaction",(function(){return mn})),n.d(s,"TransactionTypes",(function(){return nn})),n.d(s,"getJsonWalletAddress",(function(){return mi})),n.d(s,"computeAddress",(function(){return cn})),n.d(s,"recoverAddress",(function(){return ln})),n.d(s,"computePublicKey",(function(){return tn})),n.d(s,"recoverPublicKey",(function(){return en})),n.d(s,"verifyMessage",(function(){return Ei})),n.d(s,"verifyTypedData",(function(){return ki})),n.d(s,"getAccountPath",(function(){return zr})),n.d(s,"mnemonicToEntropy",(function(){return Jr})),n.d(s,"entropyToMnemonic",(function(){return qr})),n.d(s,"isValidMnemonic",(function(){return Gr})),n.d(s,"mnemonicToSeed",(function(){return Hr})),n.d(s,"SupportedAlgorithm",(function(){return hr})),n.d(s,"UnicodeNormalizationForm",(function(){return _e})),n.d(s,"Utf8ErrorReason",(function(){return Ee})),n.d(s,"Indexed",(function(){return Tt}));var u={};n.r(u),n.d(u,"Signer",(function(){return Vt})),n.d(u,"Wallet",(function(){return _i})),n.d(u,"VoidSigner",(function(){return Wt})),n.d(u,"getDefaultProvider",(function(){return ws})),n.d(u,"providers",(function(){return o})),n.d(u,"BaseContract",(function(){return Nn})),n.d(u,"Contract",(function(){return Tn})),n.d(u,"ContractFactory",(function(){return Qn})),n.d(u,"BigNumber",(function(){return B})),n.d(u,"FixedNumber",(function(){return Vn})),n.d(u,"constants",(function(){return i})),n.d(u,"errors",(function(){return _.a})),n.d(u,"logger",(function(){return Zs})),n.d(u,"utils",(function(){return s})),n.d(u,"wordlists",(function(){return Or})),n.d(u,"version",(function(){return Ys})),n.d(u,"Wordlist",(function(){return Cr}));var c=n(45),l=n(23),f=n(52);function d(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Object(f.a)(e)););return e}function h(){return h="undefined"!==typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=d(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},h.apply(this,arguments)}var p=n(13),g=n(14),v=n(6),m=n(7),A=n(1),y=n(2),b=n(539),w=n.n(b),_=n(3),E="bignumber/5.7.0",k=w.a.BN,I=new _.b(E),C={},S=9007199254740991;var x=!1,B=function(){function e(t,n){Object(v.a)(this,e),t!==C&&I.throwError("cannot call constructor directly; use BigNumber.from",_.b.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=n,this._isBigNumber=!0,Object.freeze(this)}return Object(m.a)(e,[{key:"fromTwos",value:function(e){return M(P(this).fromTwos(e))}},{key:"toTwos",value:function(e){return M(P(this).toTwos(e))}},{key:"abs",value:function(){return"-"===this._hex[0]?e.from(this._hex.substring(1)):this}},{key:"add",value:function(e){return M(P(this).add(P(e)))}},{key:"sub",value:function(e){return M(P(this).sub(P(e)))}},{key:"div",value:function(t){return e.from(t).isZero()&&R("division-by-zero","div"),M(P(this).div(P(t)))}},{key:"mul",value:function(e){return M(P(this).mul(P(e)))}},{key:"mod",value:function(e){var t=P(e);return t.isNeg()&&R("division-by-zero","mod"),M(P(this).umod(t))}},{key:"pow",value:function(e){var t=P(e);return t.isNeg()&&R("negative-power","pow"),M(P(this).pow(t))}},{key:"and",value:function(e){var t=P(e);return(this.isNegative()||t.isNeg())&&R("unbound-bitwise-result","and"),M(P(this).and(t))}},{key:"or",value:function(e){var t=P(e);return(this.isNegative()||t.isNeg())&&R("unbound-bitwise-result","or"),M(P(this).or(t))}},{key:"xor",value:function(e){var t=P(e);return(this.isNegative()||t.isNeg())&&R("unbound-bitwise-result","xor"),M(P(this).xor(t))}},{key:"mask",value:function(e){return(this.isNegative()||e<0)&&R("negative-width","mask"),M(P(this).maskn(e))}},{key:"shl",value:function(e){return(this.isNegative()||e<0)&&R("negative-width","shl"),M(P(this).shln(e))}},{key:"shr",value:function(e){return(this.isNegative()||e<0)&&R("negative-width","shr"),M(P(this).shrn(e))}},{key:"eq",value:function(e){return P(this).eq(P(e))}},{key:"lt",value:function(e){return P(this).lt(P(e))}},{key:"lte",value:function(e){return P(this).lte(P(e))}},{key:"gt",value:function(e){return P(this).gt(P(e))}},{key:"gte",value:function(e){return P(this).gte(P(e))}},{key:"isNegative",value:function(){return"-"===this._hex[0]}},{key:"isZero",value:function(){return P(this).isZero()}},{key:"toNumber",value:function(){try{return P(this).toNumber()}catch(e){R("overflow","toNumber",this.toString())}return null}},{key:"toBigInt",value:function(){try{return BigInt(this.toString())}catch(e){}return I.throwError("this platform does not support BigInt",_.b.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}},{key:"toString",value:function(){return arguments.length>0&&(10===arguments[0]?x||(x=!0,I.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?I.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",_.b.errors.UNEXPECTED_ARGUMENT,{}):I.throwError("BigNumber.toString does not accept parameters",_.b.errors.UNEXPECTED_ARGUMENT,{})),P(this).toString(10)}},{key:"toHexString",value:function(){return this._hex}},{key:"toJSON",value:function(e){return{type:"BigNumber",hex:this.toHexString()}}}],[{key:"from",value:function(t){if(t instanceof e)return t;if("string"===typeof t)return t.match(/^-?0x[0-9a-f]+$/i)?new e(C,O(t)):t.match(/^-?[0-9]+$/)?new e(C,O(new k(t))):I.throwArgumentError("invalid BigNumber string","value",t);if("number"===typeof t)return t%1&&R("underflow","BigNumber.from",t),(t>=S||t<=-S)&&R("overflow","BigNumber.from",t),e.from(String(t));var n=t;if("bigint"===typeof n)return e.from(n.toString());if(Object(y.j)(n))return e.from(Object(y.i)(n));if(n)if(n.toHexString){var r=n.toHexString();if("string"===typeof r)return e.from(r)}else{var i=n._hex;if(null==i&&"BigNumber"===n.type&&(i=n.hex),"string"===typeof i&&(Object(y.l)(i)||"-"===i[0]&&Object(y.l)(i.substring(1))))return e.from(i)}return I.throwArgumentError("invalid BigNumber value","value",t)}},{key:"isBigNumber",value:function(e){return!(!e||!e._isBigNumber)}}]),e}();function O(e){if("string"!==typeof e)return O(e.toString(16));if("-"===e[0])return"-"===(e=e.substring(1))[0]&&I.throwArgumentError("invalid hex","value",e),"0x00"===(e=O(e))?e:"-"+e;if("0x"!==e.substring(0,2)&&(e="0x"+e),"0x"===e)return"0x00";for(e.length%2&&(e="0x0"+e.substring(2));e.length>4&&"0x00"===e.substring(0,4);)e="0x"+e.substring(4);return e}function M(e){return B.from(O(e))}function P(e){var t=B.from(e).toHexString();return"-"===t[0]?new k("-"+t.substring(3),16):new k(t.substring(2),16)}function R(e,t,n){var r={fault:e,operation:t};return null!=n&&(r.value=n),I.throwError(e,_.b.errors.NUMERIC_FAULT,r)}var N=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(t){o(t)}}function s(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},T=new _.b("properties/5.7.0");function Q(e,t,n){Object.defineProperty(e,t,{enumerable:!0,value:n,writable:!1})}function D(e,t){for(var n=0;n<32;n++){if(e[t])return e[t];if(!e.prototype||"object"!==typeof e.prototype)break;e=Object.getPrototypeOf(e.prototype).constructor}return null}function j(e){return N(this,void 0,void 0,Object(A.a)().mark((function t(){var n,r;return Object(A.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=Object.keys(e).map((function(t){var n=e[t];return Promise.resolve(n).then((function(e){return{key:t,value:e}}))})),t.next=3,Promise.all(n);case 3:return r=t.sent,t.abrupt("return",r.reduce((function(e,t){return e[t.key]=t.value,e}),{}));case 5:case"end":return t.stop()}}),t)})))}function U(e,t){e&&"object"===typeof e||T.throwArgumentError("invalid object","object",e),Object.keys(e).forEach((function(n){t[n]||T.throwArgumentError("invalid object key - "+n,"transaction:"+n,e)}))}function L(e){var t={};for(var n in e)t[n]=e[n];return t}var F={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function H(e){if(void 0===e||null===e||F[typeof e])return!0;if(Array.isArray(e)||"object"===typeof e){if(!Object.isFrozen(e))return!1;for(var t=Object.keys(e),n=0;nthis.wordSize&&V.throwError("value out-of-bounds",_.b.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=Object(y.b)([this._padding.slice(t.length%this.wordSize),t])),t}},{key:"writeValue",value:function(e){return this._writeData(this._getValue(e))}},{key:"writeUpdatableValue",value:function(){var e=this,t=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,function(n){e._data[t]=e._getValue(n)}}}]),e}(),Z=function(){function e(t,n,r,i){Object(v.a)(this,e),Q(this,"_data",Object(y.a)(t)),Q(this,"wordSize",n||32),Q(this,"_coerceFunc",r),Q(this,"allowLoose",i),this._offset=0}return Object(m.a)(e,[{key:"data",get:function(){return Object(y.i)(this._data)}},{key:"consumed",get:function(){return this._offset}},{key:"coerce",value:function(t,n){return this._coerceFunc?this._coerceFunc(t,n):e.coerce(t,n)}},{key:"_peekBytes",value:function(e,t,n){var r=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+r>this._data.length&&(this.allowLoose&&n&&this._offset+t<=this._data.length?r=t:V.throwError("data out-of-bounds",_.b.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+r})),this._data.slice(this._offset,this._offset+r)}},{key:"subReader",value:function(t){return new e(this._data.slice(this._offset+t),this.wordSize,this._coerceFunc,this.allowLoose)}},{key:"readBytes",value:function(e,t){var n=this._peekBytes(0,e,!!t);return this._offset+=n.length,n.slice(0,e)}},{key:"readValue",value:function(){return B.from(this.readBytes(this.wordSize))}}],[{key:"coerce",value:function(e,t){var n=e.match("^u?int([0-9]+)$");return n&&parseInt(n[1])<=48&&(t=t.toNumber()),t}}]),e}(),X=n(151),$=n.n(X);function ee(e){return"0x"+$.a.keccak_256(Object(y.a)(e))}var te=new _.b("rlp/5.7.0");function ne(e){for(var t=[];e;)t.unshift(255&e),e>>=8;return t}function re(e,t,n){for(var r=0,i=0;it+1+r&&te.throwError("child data too short",_.b.errors.BUFFER_OVERRUN,{})}return{consumed:1+r,result:i}}function se(e,t){if(0===e.length&&te.throwError("data too short",_.b.errors.BUFFER_OVERRUN,{}),e[t]>=248){var n=e[t]-247;t+1+n>e.length&&te.throwError("data short segment too short",_.b.errors.BUFFER_OVERRUN,{});var r=re(e,t+1,n);return t+1+n+r>e.length&&te.throwError("data long segment too short",_.b.errors.BUFFER_OVERRUN,{}),ae(e,t,t+1+n,n+r)}if(e[t]>=192){var i=e[t]-192;return t+1+i>e.length&&te.throwError("data array too short",_.b.errors.BUFFER_OVERRUN,{}),ae(e,t,t+1,i)}if(e[t]>=184){var o=e[t]-183;t+1+o>e.length&&te.throwError("data array too short",_.b.errors.BUFFER_OVERRUN,{});var a=re(e,t+1,o);return t+1+o+a>e.length&&te.throwError("data array too short",_.b.errors.BUFFER_OVERRUN,{}),{consumed:1+o+a,result:Object(y.i)(e.slice(t+1+o,t+1+o+a))}}if(e[t]>=128){var s=e[t]-128;return t+1+s>e.length&&te.throwError("data too short",_.b.errors.BUFFER_OVERRUN,{}),{consumed:1+s,result:Object(y.i)(e.slice(t+1,t+1+s))}}return{consumed:1,result:Object(y.i)(e[t])}}function ue(e){var t=Object(y.a)(e),n=se(t,0);return n.consumed!==t.length&&te.throwArgumentError("invalid rlp data","data",e),n.result}var ce=new _.b("address/5.7.0");function le(e){Object(y.l)(e,20)||ce.throwArgumentError("invalid address","address",e);for(var t=(e=e.toLowerCase()).substring(2).split(""),n=new Uint8Array(40),r=0;r<40;r++)n[r]=t[r].charCodeAt(0);for(var i=Object(y.a)(ee(n)),o=0;o<40;o+=2)i[o>>1]>>4>=8&&(t[o]=t[o].toUpperCase()),(15&i[o>>1])>=8&&(t[o+1]=t[o+1].toUpperCase());return"0x"+t.join("")}for(var fe={},de=0;de<10;de++)fe[String(de)]=String(de);for(var he=0;he<26;he++)fe[String.fromCharCode(65+he)]=String(10+he);var pe,ge=Math.floor((pe=9007199254740991,Math.log10?Math.log10(pe):Math.log(pe)/Math.LN10));function ve(e){for(var t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((function(e){return fe[e]})).join("");t.length>=ge;){var n=t.substring(0,ge);t=parseInt(n,10)%97+t.substring(n.length)}for(var r=String(98-parseInt(t,10)%97);r.length<2;)r="0"+r;return r}function me(e){var t,n=null;if("string"!==typeof e&&ce.throwArgumentError("invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==e.substring(0,2)&&(e="0x"+e),n=le(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&n!==e&&ce.throwArgumentError("bad address checksum","address",e);else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(e.substring(2,4)!==ve(e)&&ce.throwArgumentError("bad icap checksum","address",e),t=e.substring(4),n=new k(t,36).toString(16);n.length<40;)n="0"+n;n=le("0x"+n)}else ce.throwArgumentError("invalid address","address",e);return n}function Ae(e){try{return me(e),!0}catch(t){}return!1}function ye(e){for(var t,n=(t=me(e).substring(2),new k(t,16).toString(36)).toUpperCase();n.length<30;)n="0"+n;return"XE"+ve("XE00"+n)+n}function be(e){var t=null;try{t=me(e.from)}catch(r){ce.throwArgumentError("missing from address","transaction",e)}var n=Object(y.o)(Object(y.a)(B.from(e.nonce).toHexString()));return me(Object(y.e)(ee(oe([t,n])),12))}function we(e,t,n){return 32!==Object(y.d)(t)&&ce.throwArgumentError("salt must be 32 bytes","salt",t),32!==Object(y.d)(n)&&ce.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",n),me(Object(y.e)(ee(Object(y.b)(["0xff",me(e),t,n])),12))}var _e,Ee,ke=new _.b("strings/5.7.0");function Ie(e,t,n,r,i){if(e===Ee.BAD_PREFIX||e===Ee.UNEXPECTED_CONTINUE){for(var o=0,a=t+1;a>6===2;a++)o++;return o}return e===Ee.OVERRUN?n.length-t-1:0}!function(e){e.current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD"}(_e||(_e={})),function(e){e.UNEXPECTED_CONTINUE="unexpected continuation byte",e.BAD_PREFIX="bad codepoint prefix",e.OVERRUN="string overrun",e.MISSING_CONTINUE="missing continuation byte",e.OUT_OF_RANGE="out of UTF-8 range",e.UTF16_SURROGATE="UTF-16 surrogate",e.OVERLONG="overlong representation"}(Ee||(Ee={}));var Ce=Object.freeze({error:function(e,t,n,r,i){return ke.throwArgumentError("invalid codepoint at offset ".concat(t,"; ").concat(e),"bytes",n)},ignore:Ie,replace:function(e,t,n,r,i){return e===Ee.OVERLONG?(r.push(i),0):(r.push(65533),Ie(e,t,n))}});function Se(e,t){null==t&&(t=Ce.error),e=Object(y.a)(e);for(var n=[],r=0;r>7!==0){var o=null,a=null;if(192===(224&i))o=1,a=127;else if(224===(240&i))o=2,a=2047;else{if(240!==(248&i)){r+=t(128===(192&i)?Ee.UNEXPECTED_CONTINUE:Ee.BAD_PREFIX,r-1,e,n);continue}o=3,a=65535}if(r-1+o>=e.length)r+=t(Ee.OVERRUN,r-1,e,n);else{for(var s=i&(1<<8-o-1)-1,u=0;u1114111?r+=t(Ee.OUT_OF_RANGE,r-1-o,e,n,s):s>=55296&&s<=57343?r+=t(Ee.UTF16_SURROGATE,r-1-o,e,n,s):s<=a?r+=t(Ee.OVERLONG,r-1-o,e,n,s):n.push(s))}}else n.push(i)}return n}function xe(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_e.current;t!=_e.current&&(ke.checkNormalize(),e=e.normalize(t));for(var n=[],r=0;r>6|192),n.push(63&i|128);else if(55296==(64512&i)){r++;var o=e.charCodeAt(r);if(r>=e.length||56320!==(64512&o))throw new Error("invalid utf-8 string");var a=65536+((1023&i)<<10)+(1023&o);n.push(a>>18|240),n.push(a>>12&63|128),n.push(a>>6&63|128),n.push(63&a|128)}else n.push(i>>12|224),n.push(i>>6&63|128),n.push(63&i|128)}return Object(y.a)(n)}function Be(e){var t="0000"+e.toString(16);return"\\u"+t.substring(t.length-4)}function Oe(e,t){return'"'+Se(e,t).map((function(e){if(e<256){switch(e){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(e>=32&&e<127)return String.fromCharCode(e)}return e<=65535?Be(e):Be(55296+((e-=65536)>>10&1023))+Be(56320+(1023&e))})).join("")+'"'}function Me(e){return e.map((function(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e)))})).join("")}function Pe(e,t){return Me(Se(e,t))}function Re(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_e.current;return Se(xe(e,t))}function Ne(e){return ee(xe(e))}var Te=function(e){Object(p.a)(n,e);var t=Object(g.a)(n);function n(e){return Object(v.a)(this,n),t.call(this,"address","address",e,!1)}return Object(m.a)(n,[{key:"defaultValue",value:function(){return"0x0000000000000000000000000000000000000000"}},{key:"encode",value:function(e,t){try{t=me(t)}catch(n){this._throwError(n.message,t)}return e.writeValue(t)}},{key:"decode",value:function(e){return me(Object(y.h)(e.readValue().toHexString(),20))}}]),n}(K),Qe=function(e){Object(p.a)(n,e);var t=Object(g.a)(n);function n(e){var r;return Object(v.a)(this,n),(r=t.call(this,e.name,e.type,void 0,e.dynamic)).coder=e,r}return Object(m.a)(n,[{key:"defaultValue",value:function(){return this.coder.defaultValue()}},{key:"encode",value:function(e,t){return this.coder.encode(e,t)}},{key:"decode",value:function(e){return this.coder.decode(e)}}]),n}(K),De=new _.b(z);function je(e,t,n){var r=null;if(Array.isArray(n))r=n;else if(n&&"object"===typeof n){var i={};r=t.map((function(e){var t=e.localName;return t||De.throwError("cannot encode object for signature with missing names",_.b.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:n}),i[t]&&De.throwError("cannot encode object for signature with duplicate names",_.b.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:n}),i[t]=!0,n[t]}))}else De.throwArgumentError("invalid tuple value","tuple",n);t.length!==r.length&&De.throwArgumentError("types/value length mismatch","tuple",n);var o=new Y(e.wordSize),a=new Y(e.wordSize),s=[];t.forEach((function(e,t){var n=r[t];if(e.dynamic){var i=a.length;e.encode(a,n);var u=o.writeUpdatableValue();s.push((function(e){u(e+i)}))}else e.encode(o,n)})),s.forEach((function(e){e(o.length)}));var u=e.appendWriter(o);return u+=e.appendWriter(a)}function Ue(e,t){var n=[],r=e.subReader(0);t.forEach((function(t){var i=null;if(t.dynamic){var o=e.readValue(),a=r.subReader(o.toNumber());try{i=t.decode(a)}catch(s){if(s.code===_.b.errors.BUFFER_OVERRUN)throw s;(i=s).baseType=t.name,i.name=t.localName,i.type=t.type}}else try{i=t.decode(e)}catch(s){if(s.code===_.b.errors.BUFFER_OVERRUN)throw s;(i=s).baseType=t.name,i.name=t.localName,i.type=t.type}void 0!=i&&n.push(i)}));var i=t.reduce((function(e,t){var n=t.localName;return n&&(e[n]||(e[n]=0),e[n]++),e}),{});t.forEach((function(e,t){var r=e.localName;if(r&&1===i[r]&&("length"===r&&(r="_length"),null==n[r])){var o=n[t];o instanceof Error?Object.defineProperty(n,r,{enumerable:!0,get:function(){throw o}}):n[r]=o}}));for(var o=function(e){var t=n[e];t instanceof Error&&Object.defineProperty(n,e,{enumerable:!0,get:function(){throw t}})},a=0;a=0?r:"")+"]",s=-1===r||e.dynamic;return(o=t.call(this,"array",a,i,s)).coder=e,o.length=r,o}return Object(m.a)(n,[{key:"defaultValue",value:function(){for(var e=this.coder.defaultValue(),t=[],n=0;ne._data.length&&De.throwError("insufficient data length",_.b.errors.BUFFER_OVERRUN,{length:e._data.length,count:t});for(var n=[],r=0;r=0||"tuple"===e)&&at[t])return!0;return(ot[t]||"payable"===t)&&rt.throwArgumentError("invalid modifier","name",t),!1}function ut(e,t){for(var n in t)Q(e,n,t[n])}var ct=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),lt=new RegExp(/^(.*)\[([0-9]*)\]$/),ft=function(){function e(t,n){Object(v.a)(this,e),t!==it&&rt.throwError("use fromString",_.b.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),ut(this,n);var r=this.type.match(lt);ut(this,r?{arrayLength:parseInt(r[2]||"-1"),arrayChildren:e.fromObject({type:r[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}return Object(m.a)(e,[{key:"format",value:function(e){if(e||(e=ct.sighash),ct[e]||rt.throwArgumentError("invalid format type","format",e),e===ct.json){var t={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"===typeof this.indexed&&(t.indexed=this.indexed),this.components&&(t.components=this.components.map((function(t){return JSON.parse(t.format(e))}))),JSON.stringify(t)}var n="";return"array"===this.baseType?(n+=this.arrayChildren.format(e),n+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(e!==ct.sighash&&(n+=this.type),n+="("+this.components.map((function(t){return t.format(e)})).join(e===ct.full?", ":",")+")"):n+=this.type,e!==ct.sighash&&(!0===this.indexed&&(n+=" indexed"),e===ct.full&&this.name&&(n+=" "+this.name)),n}}],[{key:"from",value:function(t,n){return"string"===typeof t?e.fromString(t,n):e.fromObject(t)}},{key:"fromObject",value:function(t){return e.isParamType(t)?t:new e(it,{name:t.name||null,type:_t(t.type),indexed:null==t.indexed?null:!!t.indexed,components:t.components?t.components.map(e.fromObject):null})}},{key:"fromString",value:function(t,n){return r=function(e,t){var n=e;function r(t){rt.throwArgumentError("unexpected character at position ".concat(t),"param",e)}function i(e){var n={type:"",name:"",parent:e,state:{allowType:!0}};return t&&(n.indexed=!1),n}e=e.replace(/\s/g," ");for(var o={type:"",name:"",state:{allowType:!0}},a=o,s=0;s2&&rt.throwArgumentError("invalid human-readable ABI signature","value",e),n[1].match(/^[0-9]+$/)||rt.throwArgumentError("invalid human-readable ABI signature gas","value",e),t.gas=B.from(n[1]),n[0]):e}function vt(e,t){t.constant=!1,t.payable=!1,t.stateMutability="nonpayable",e.split(" ").forEach((function(e){switch(e.trim()){case"constant":t.constant=!0;break;case"payable":t.payable=!0,t.stateMutability="payable";break;case"nonpayable":t.payable=!1,t.stateMutability="nonpayable";break;case"pure":t.constant=!0,t.stateMutability="pure";break;case"view":t.constant=!0,t.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+e)}}))}function mt(e){var t={constant:!1,payable:!0,stateMutability:"payable"};return null!=e.stateMutability?(t.stateMutability=e.stateMutability,t.constant="view"===t.stateMutability||"pure"===t.stateMutability,null!=e.constant&&!!e.constant!==t.constant&&rt.throwArgumentError("cannot have constant function with mutability "+t.stateMutability,"value",e),t.payable="payable"===t.stateMutability,null!=e.payable&&!!e.payable!==t.payable&&rt.throwArgumentError("cannot have payable function with mutability "+t.stateMutability,"value",e)):null!=e.payable?(t.payable=!!e.payable,null!=e.constant||t.payable||"constructor"===e.type||rt.throwArgumentError("unable to determine stateMutability","value",e),t.constant=!!e.constant,t.constant?t.stateMutability="view":t.stateMutability=t.payable?"payable":"nonpayable",t.payable&&t.constant&&rt.throwArgumentError("cannot have constant payable function","value",e)):null!=e.constant?(t.constant=!!e.constant,t.payable=!t.constant,t.stateMutability=t.constant?"view":"payable"):"constructor"!==e.type&&rt.throwArgumentError("unable to determine stateMutability","value",e),t}var At=function(e){Object(p.a)(n,e);var t=Object(g.a)(n);function n(){return Object(v.a)(this,n),t.apply(this,arguments)}return Object(m.a)(n,[{key:"format",value:function(e){if(e||(e=ct.sighash),ct[e]||rt.throwArgumentError("invalid format type","format",e),e===ct.json)return JSON.stringify({type:"constructor",stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((function(t){return JSON.parse(t.format(e))}))});e===ct.sighash&&rt.throwError("cannot format a constructor for sighash",_.b.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});var t="constructor("+this.inputs.map((function(t){return t.format(e)})).join(e===ct.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "),t.trim()}}],[{key:"from",value:function(e){return"string"===typeof e?n.fromString(e):n.fromObject(e)}},{key:"fromObject",value:function(e){if(n.isConstructorFragment(e))return e;"constructor"!==e.type&&rt.throwArgumentError("invalid constructor object","value",e);var t=mt(e);t.constant&&rt.throwArgumentError("constructor cannot be constant","value",e);var r={name:null,type:e.type,inputs:e.inputs?e.inputs.map(ft.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?B.from(e.gas):null};return new n(it,r)}},{key:"fromString",value:function(e){var t={type:"constructor"},r=(e=gt(e,t)).match(It);return r&&"constructor"===r[1].trim()||rt.throwArgumentError("invalid constructor string","value",e),t.inputs=dt(r[2].trim(),!1),vt(r[3].trim(),t),n.fromObject(t)}},{key:"isConstructorFragment",value:function(e){return e&&e._isFragment&&"constructor"===e.type}}]),n}(ht),yt=function(e){Object(p.a)(n,e);var t=Object(g.a)(n);function n(){return Object(v.a)(this,n),t.apply(this,arguments)}return Object(m.a)(n,[{key:"format",value:function(e){if(e||(e=ct.sighash),ct[e]||rt.throwArgumentError("invalid format type","format",e),e===ct.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((function(t){return JSON.parse(t.format(e))})),outputs:this.outputs.map((function(t){return JSON.parse(t.format(e))}))});var t="";return e!==ct.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map((function(t){return t.format(e)})).join(e===ct.full?", ":",")+") ",e!==ct.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map((function(t){return t.format(e)})).join(", ")+") "),null!=this.gas&&(t+="@"+this.gas.toString()+" ")),t.trim()}}],[{key:"from",value:function(e){return"string"===typeof e?n.fromString(e):n.fromObject(e)}},{key:"fromObject",value:function(e){if(n.isFunctionFragment(e))return e;"function"!==e.type&&rt.throwArgumentError("invalid function object","value",e);var t=mt(e),r={type:e.type,name:kt(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(ft.fromObject):[],outputs:e.outputs?e.outputs.map(ft.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?B.from(e.gas):null};return new n(it,r)}},{key:"fromString",value:function(e){var t={type:"function"},r=(e=gt(e,t)).split(" returns ");r.length>2&&rt.throwArgumentError("invalid function string","value",e);var i=r[0].match(It);if(i||rt.throwArgumentError("invalid function signature","value",e),t.name=i[1].trim(),t.name&&kt(t.name),t.inputs=dt(i[2],!1),vt(i[3].trim(),t),r.length>1){var o=r[1].match(It);""==o[1].trim()&&""==o[3].trim()||rt.throwArgumentError("unexpected tokens","value",e),t.outputs=dt(o[2],!1)}else t.outputs=[];return n.fromObject(t)}},{key:"isFunctionFragment",value:function(e){return e&&e._isFragment&&"function"===e.type}}]),n}(At);function bt(e){var t=e.format();return"Error(string)"!==t&&"Panic(uint256)"!==t||rt.throwArgumentError("cannot specify user defined ".concat(t," error"),"fragment",e),e}var wt=function(e){Object(p.a)(n,e);var t=Object(g.a)(n);function n(){return Object(v.a)(this,n),t.apply(this,arguments)}return Object(m.a)(n,[{key:"format",value:function(e){if(e||(e=ct.sighash),ct[e]||rt.throwArgumentError("invalid format type","format",e),e===ct.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((function(t){return JSON.parse(t.format(e))}))});var t="";return e!==ct.sighash&&(t+="error "),(t+=this.name+"("+this.inputs.map((function(t){return t.format(e)})).join(e===ct.full?", ":",")+") ").trim()}}],[{key:"from",value:function(e){return"string"===typeof e?n.fromString(e):n.fromObject(e)}},{key:"fromObject",value:function(e){if(n.isErrorFragment(e))return e;"error"!==e.type&&rt.throwArgumentError("invalid error object","value",e);var t={type:e.type,name:kt(e.name),inputs:e.inputs?e.inputs.map(ft.fromObject):[]};return bt(new n(it,t))}},{key:"fromString",value:function(e){var t={type:"error"},r=e.match(It);return r||rt.throwArgumentError("invalid error signature","value",e),t.name=r[1].trim(),t.name&&kt(t.name),t.inputs=dt(r[2],!1),bt(n.fromObject(t))}},{key:"isErrorFragment",value:function(e){return e&&e._isFragment&&"error"===e.type}}]),n}(ht);function _t(e){return e.match(/^uint($|[^1-9])/)?e="uint256"+e.substring(4):e.match(/^int($|[^1-9])/)&&(e="int256"+e.substring(3)),e}var Et=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function kt(e){return e&&e.match(Et)||rt.throwArgumentError('invalid identifier "'.concat(e,'"'),"value",e),e}var It=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");var Ct=new _.b(z),St=new RegExp(/^bytes([0-9]*)$/),xt=new RegExp(/^(u?int)([0-9]*)$/),Bt=function(){function e(t){Object(v.a)(this,e),Q(this,"coerceFunc",t||null)}return Object(m.a)(e,[{key:"_getCoder",value:function(e){var t=this;switch(e.baseType){case"address":return new Te(e.name);case"bool":return new Fe(e.name);case"string":return new tt(e.name);case"bytes":return new Je(e.name);case"array":return new Le(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new nt((e.components||[]).map((function(e){return t._getCoder(e)})),e.name);case"":return new Ge(e.name)}var n=e.type.match(xt);if(n){var r=parseInt(n[2]||"256");return(0===r||r>256||r%8!==0)&&Ct.throwArgumentError("invalid "+n[1]+" bit length","param",e),new et(r/8,"int"===n[1],e.name)}if(n=e.type.match(St)){var i=parseInt(n[1]);return(0===i||i>32)&&Ct.throwArgumentError("invalid bytes length","param",e),new qe(i,e.name)}return Ct.throwArgumentError("invalid type","type",e.type)}},{key:"_getWordSize",value:function(){return 32}},{key:"_getReader",value:function(e,t){return new Z(e,this._getWordSize(),this.coerceFunc,t)}},{key:"_getWriter",value:function(){return new Y(this._getWordSize())}},{key:"getDefaultValue",value:function(e){var t=this,n=e.map((function(e){return t._getCoder(ft.from(e))}));return new nt(n,"_").defaultValue()}},{key:"encode",value:function(e,t){var n=this;e.length!==t.length&&Ct.throwError("types/values length mismatch",_.b.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});var r=e.map((function(e){return n._getCoder(ft.from(e))})),i=new nt(r,"_"),o=this._getWriter();return i.encode(o,t),o.data}},{key:"decode",value:function(e,t,n){var r=this,i=e.map((function(e){return r._getCoder(ft.from(e))}));return new nt(i,"_").decode(this._getReader(Object(y.a)(t),n))}}]),e}(),Ot=new Bt,Mt=new _.b(z),Pt=function(e){Object(p.a)(n,e);var t=Object(g.a)(n);function n(){return Object(v.a)(this,n),t.apply(this,arguments)}return Object(m.a)(n)}(G),Rt=function(e){Object(p.a)(n,e);var t=Object(g.a)(n);function n(){return Object(v.a)(this,n),t.apply(this,arguments)}return Object(m.a)(n)}(G),Nt=function(e){Object(p.a)(n,e);var t=Object(g.a)(n);function n(){return Object(v.a)(this,n),t.apply(this,arguments)}return Object(m.a)(n)}(G),Tt=function(e){Object(p.a)(n,e);var t=Object(g.a)(n);function n(){return Object(v.a)(this,n),t.apply(this,arguments)}return Object(m.a)(n,null,[{key:"isIndexed",value:function(e){return!(!e||!e._isIndexed)}}]),n}(G),Qt={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function Dt(e,t){var n=new Error("deferred error during ABI decoding triggered accessing ".concat(e));return n.error=t,n}var jt=function(){function e(t){var n=this;Object(v.a)(this,e);Q(this,"fragments",("string"===typeof t?JSON.parse(t):t).map((function(e){return ht.from(e)})).filter((function(e){return null!=e}))),Q(this,"_abiCoder",D(this instanceof e?this.constructor:void 0,"getAbiCoder")()),Q(this,"functions",{}),Q(this,"errors",{}),Q(this,"events",{}),Q(this,"structs",{}),this.fragments.forEach((function(e){var t=null;switch(e.type){case"constructor":return n.deploy?void Mt.warn("duplicate definition - constructor"):void Q(n,"deploy",e);case"function":t=n.functions;break;case"event":t=n.events;break;case"error":t=n.errors;break;default:return}var r=e.format();t[r]?Mt.warn("duplicate definition - "+r):t[r]=e})),this.deploy||Q(this,"deploy",At.from({payable:!1,type:"constructor"})),Q(this,"_isInterface",!0)}return Object(m.a)(e,[{key:"format",value:function(e){e||(e=ct.full),e===ct.sighash&&Mt.throwArgumentError("interface does not support formatting sighash","format",e);var t=this.fragments.map((function(t){return t.format(e)}));return e===ct.json?JSON.stringify(t.map((function(e){return JSON.parse(e)}))):t}},{key:"getFunction",value:function(e){if(Object(y.l)(e)){for(var t in this.functions)if(e===this.getSighash(t))return this.functions[t];Mt.throwArgumentError("no matching function","sighash",e)}if(-1===e.indexOf("(")){var n=e.trim(),r=Object.keys(this.functions).filter((function(e){return e.split("(")[0]===n}));return 0===r.length?Mt.throwArgumentError("no matching function","name",n):r.length>1&&Mt.throwArgumentError("multiple matching functions","name",n),this.functions[r[0]]}var i=this.functions[yt.fromString(e).format()];return i||Mt.throwArgumentError("no matching function","signature",e),i}},{key:"getEvent",value:function(e){if(Object(y.l)(e)){var t=e.toLowerCase();for(var n in this.events)if(t===this.getEventTopic(n))return this.events[n];Mt.throwArgumentError("no matching event","topichash",t)}if(-1===e.indexOf("(")){var r=e.trim(),i=Object.keys(this.events).filter((function(e){return e.split("(")[0]===r}));return 0===i.length?Mt.throwArgumentError("no matching event","name",r):i.length>1&&Mt.throwArgumentError("multiple matching events","name",r),this.events[i[0]]}var o=this.events[pt.fromString(e).format()];return o||Mt.throwArgumentError("no matching event","signature",e),o}},{key:"getError",value:function(e){if(Object(y.l)(e)){var t=D(this.constructor,"getSighash");for(var n in this.errors){if(e===t(this.errors[n]))return this.errors[n]}Mt.throwArgumentError("no matching error","sighash",e)}if(-1===e.indexOf("(")){var r=e.trim(),i=Object.keys(this.errors).filter((function(e){return e.split("(")[0]===r}));return 0===i.length?Mt.throwArgumentError("no matching error","name",r):i.length>1&&Mt.throwArgumentError("multiple matching errors","name",r),this.errors[i[0]]}var o=this.errors[yt.fromString(e).format()];return o||Mt.throwArgumentError("no matching error","signature",e),o}},{key:"getSighash",value:function(e){if("string"===typeof e)try{e=this.getFunction(e)}catch(t){try{e=this.getError(e)}catch(n){throw t}}return D(this.constructor,"getSighash")(e)}},{key:"getEventTopic",value:function(e){return"string"===typeof e&&(e=this.getEvent(e)),D(this.constructor,"getEventTopic")(e)}},{key:"_decodeParams",value:function(e,t){return this._abiCoder.decode(e,t)}},{key:"_encodeParams",value:function(e,t){return this._abiCoder.encode(e,t)}},{key:"encodeDeploy",value:function(e){return this._encodeParams(this.deploy.inputs,e||[])}},{key:"decodeErrorResult",value:function(e,t){"string"===typeof e&&(e=this.getError(e));var n=Object(y.a)(t);return Object(y.i)(n.slice(0,4))!==this.getSighash(e)&&Mt.throwArgumentError("data signature does not match error ".concat(e.name,"."),"data",Object(y.i)(n)),this._decodeParams(e.inputs,n.slice(4))}},{key:"encodeErrorResult",value:function(e,t){return"string"===typeof e&&(e=this.getError(e)),Object(y.i)(Object(y.b)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}},{key:"decodeFunctionData",value:function(e,t){"string"===typeof e&&(e=this.getFunction(e));var n=Object(y.a)(t);return Object(y.i)(n.slice(0,4))!==this.getSighash(e)&&Mt.throwArgumentError("data signature does not match function ".concat(e.name,"."),"data",Object(y.i)(n)),this._decodeParams(e.inputs,n.slice(4))}},{key:"encodeFunctionData",value:function(e,t){return"string"===typeof e&&(e=this.getFunction(e)),Object(y.i)(Object(y.b)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}},{key:"decodeFunctionResult",value:function(e,t){"string"===typeof e&&(e=this.getFunction(e));var n=Object(y.a)(t),r=null,i="",o=null,a=null,s=null;switch(n.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,n)}catch(l){}break;case 4:var u=Object(y.i)(n.slice(0,4)),c=Qt[u];if(c)o=this._abiCoder.decode(c.inputs,n.slice(4)),a=c.name,s=c.signature,c.reason&&(r=o[0]),"Error"===a?i="; VM Exception while processing transaction: reverted with reason string ".concat(JSON.stringify(o[0])):"Panic"===a&&(i="; VM Exception while processing transaction: reverted with panic code ".concat(o[0]));else try{var l=this.getError(u);o=this._abiCoder.decode(l.inputs,n.slice(4)),a=l.name,s=l.format()}catch(l){}}return Mt.throwError("call revert exception"+i,_.b.errors.CALL_EXCEPTION,{method:e.format(),data:Object(y.i)(t),errorArgs:o,errorName:a,errorSignature:s,reason:r})}},{key:"encodeFunctionResult",value:function(e,t){return"string"===typeof e&&(e=this.getFunction(e)),Object(y.i)(this._abiCoder.encode(e.outputs,t||[]))}},{key:"encodeFilterTopics",value:function(e,t){var n=this;"string"===typeof e&&(e=this.getEvent(e)),t.length>e.inputs.length&&Mt.throwError("too many arguments for "+e.format(),_.b.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});var r=[];e.anonymous||r.push(this.getEventTopic(e));var i=function(e,t){return"string"===e.type?Ne(t):"bytes"===e.type?ee(Object(y.i)(t)):("bool"===e.type&&"boolean"===typeof t&&(t=t?"0x01":"0x00"),e.type.match(/^u?int/)&&(t=B.from(t).toHexString()),"address"===e.type&&n._abiCoder.encode(["address"],[t]),Object(y.h)(Object(y.i)(t),32))};for(t.forEach((function(t,n){var o=e.inputs[n];o.indexed?null==t?r.push(null):"array"===o.baseType||"tuple"===o.baseType?Mt.throwArgumentError("filtering with tuples or arrays not supported","contract."+o.name,t):Array.isArray(t)?r.push(t.map((function(e){return i(o,e)}))):r.push(i(o,t)):null!=t&&Mt.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+o.name,t)}));r.length&&null===r[r.length-1];)r.pop();return r}},{key:"encodeEventLog",value:function(e,t){var n=this;"string"===typeof e&&(e=this.getEvent(e));var r=[],i=[],o=[];return e.anonymous||r.push(this.getEventTopic(e)),t.length!==e.inputs.length&&Mt.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach((function(e,a){var s=t[a];if(e.indexed)if("string"===e.type)r.push(Ne(s));else if("bytes"===e.type)r.push(ee(s));else{if("tuple"===e.baseType||"array"===e.baseType)throw new Error("not implemented");r.push(n._abiCoder.encode([e.type],[s]))}else i.push(e),o.push(s)})),{data:this._abiCoder.encode(i,o),topics:r}}},{key:"decodeEventLog",value:function(e,t,n){if("string"===typeof e&&(e=this.getEvent(e)),null!=n&&!e.anonymous){var r=this.getEventTopic(e);Object(y.l)(n[0],32)&&n[0].toLowerCase()===r||Mt.throwError("fragment/topic mismatch",_.b.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:r,value:n[0]}),n=n.slice(1)}var i=[],o=[],a=[];e.inputs.forEach((function(e,t){e.indexed?"string"===e.type||"bytes"===e.type||"tuple"===e.baseType||"array"===e.baseType?(i.push(ft.fromObject({type:"bytes32",name:e.name})),a.push(!0)):(i.push(e),a.push(!1)):(o.push(e),a.push(!1))}));var s=null!=n?this._abiCoder.decode(i,Object(y.b)(n)):null,u=this._abiCoder.decode(o,t,!0),c=[],l=0,f=0;e.inputs.forEach((function(e,t){if(e.indexed)if(null==s)c[t]=new Tt({_isIndexed:!0,hash:null});else if(a[t])c[t]=new Tt({_isIndexed:!0,hash:s[f++]});else try{c[t]=s[f++]}catch(r){c[t]=r}else try{c[t]=u[l++]}catch(r){c[t]=r}if(e.name&&null==c[e.name]){var n=c[t];n instanceof Error?Object.defineProperty(c,e.name,{enumerable:!0,get:function(){throw Dt("property ".concat(JSON.stringify(e.name)),n)}}):c[e.name]=n}}));for(var d=function(e){var t=c[e];t instanceof Error&&Object.defineProperty(c,e,{enumerable:!0,get:function(){throw Dt("index ".concat(e),t)}})},h=0;h=0)throw e;return qt.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",_.b.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,tx:n})}))),null==n.chainId?n.chainId=this.getChainId():n.chainId=Promise.all([Promise.resolve(n.chainId),this.getChainId()]).then((function(t){return 0!==t[1]&&t[0]!==t[1]&&qt.throwArgumentError("chainId address mismatch","transaction",e),t[0]})),t.next=23,j(n);case 23:return t.abrupt("return",t.sent);case 24:case"end":return t.stop()}}),t,this)})))}},{key:"_checkProvider",value:function(e){this.provider||qt.throwError("missing provider",_.b.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}}],[{key:"isSigner",value:function(e){return!(!e||!e._isSigner)}}]),e}(),Wt=function(e){Object(p.a)(n,e);var t=Object(g.a)(n);function n(e,r){var i;return Object(v.a)(this,n),i=t.call(this),Q(Object(l.a)(i),"address",e),Q(Object(l.a)(i),"provider",r||null),i}return Object(m.a)(n,[{key:"getAddress",value:function(){return Promise.resolve(this.address)}},{key:"_fail",value:function(e,t){return Promise.resolve().then((function(){qt.throwError(e,_.b.errors.UNSUPPORTED_OPERATION,{operation:t})}))}},{key:"signMessage",value:function(e){return this._fail("VoidSigner cannot sign messages","signMessage")}},{key:"signTransaction",value:function(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}},{key:"_signTypedData",value:function(e,t,n){return this._fail("VoidSigner cannot sign typed data","signTypedData")}},{key:"connect",value:function(e){return new n(this.address,e)}}]),n}(Vt),Kt=n(538),Yt=new _.b("signing-key/5.7.0"),Zt=null;function Xt(){return Zt||(Zt=new Kt.a("secp256k1")),Zt}var $t=function(){function e(t){Object(v.a)(this,e),Q(this,"curve","secp256k1"),Q(this,"privateKey",Object(y.i)(t)),32!==Object(y.d)(this.privateKey)&&Yt.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");var n=Xt().keyFromPrivate(Object(y.a)(this.privateKey));Q(this,"publicKey","0x"+n.getPublic(!1,"hex")),Q(this,"compressedPublicKey","0x"+n.getPublic(!0,"hex")),Q(this,"_isSigningKey",!0)}return Object(m.a)(e,[{key:"_addPoint",value:function(e){var t=Xt().keyFromPublic(Object(y.a)(this.publicKey)),n=Xt().keyFromPublic(Object(y.a)(e));return"0x"+t.pub.add(n.pub).encodeCompressed("hex")}},{key:"signDigest",value:function(e){var t=Xt().keyFromPrivate(Object(y.a)(this.privateKey)),n=Object(y.a)(e);32!==n.length&&Yt.throwArgumentError("bad digest length","digest",e);var r=t.sign(n,{canonical:!0});return Object(y.n)({recoveryParam:r.recoveryParam,r:Object(y.h)("0x"+r.r.toString(16),32),s:Object(y.h)("0x"+r.s.toString(16),32)})}},{key:"computeSharedSecret",value:function(e){var t=Xt().keyFromPrivate(Object(y.a)(this.privateKey)),n=Xt().keyFromPublic(Object(y.a)(tn(e)));return Object(y.h)("0x"+t.derive(n.getPublic()).toString(16),32)}}],[{key:"isSigningKey",value:function(e){return!(!e||!e._isSigningKey)}}]),e}();function en(e,t){var n=Object(y.n)(t),r={r:Object(y.a)(n.r),s:Object(y.a)(n.s)};return"0x"+Xt().recoverPubKey(Object(y.a)(e),r,n.recoveryParam).encode("hex",!1)}function tn(e,t){var n=Object(y.a)(e);if(32===n.length){var r=new $t(n);return t?"0x"+Xt().keyFromPrivate(n).getPublic(!0,"hex"):r.publicKey}return 33===n.length?t?Object(y.i)(n):"0x"+Xt().keyFromPublic(n).getPublic(!1,"hex"):65===n.length?t?"0x"+Xt().keyFromPublic(n).getPublic(!0,"hex"):Object(y.i)(n):Yt.throwArgumentError("invalid public or private key","key","[REDACTED]")}var nn,rn=new _.b("transactions/5.7.0");function on(e){return"0x"===e?null:me(e)}function an(e){return"0x"===e?Ve:B.from(e)}!function(e){e[e.legacy=0]="legacy",e[e.eip2930=1]="eip2930",e[e.eip1559=2]="eip1559"}(nn||(nn={}));var sn=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],un={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function cn(e){var t=tn(e);return me(Object(y.e)(ee(Object(y.e)(t,1)),12))}function ln(e,t){return cn(en(Object(y.a)(e),t))}function fn(e,t){var n=Object(y.o)(B.from(e).toHexString());return n.length>32&&rn.throwArgumentError("invalid length for "+t,"transaction:"+t,e),n}function dn(e,t){return{address:me(e),storageKeys:(t||[]).map((function(t,n){return 32!==Object(y.d)(t)&&rn.throwArgumentError("invalid access list storageKey","accessList[".concat(e,":").concat(n,"]"),t),t.toLowerCase()}))}}function hn(e){if(Array.isArray(e))return e.map((function(e,t){return Array.isArray(e)?(e.length>2&&rn.throwArgumentError("access list expected to be [ address, storageKeys[] ]","value[".concat(t,"]"),e),dn(e[0],e[1])):dn(e.address,e.storageKeys)}));var t=Object.keys(e).map((function(t){var n=e[t].reduce((function(e,t){return e[t]=!0,e}),{});return dn(t,Object.keys(n).sort())}));return t.sort((function(e,t){return e.address.localeCompare(t.address)})),t}function pn(e){return hn(e).map((function(e){return[e.address,e.storageKeys]}))}function gn(e,t){if(null!=e.gasPrice){var n=B.from(e.gasPrice),r=B.from(e.maxFeePerGas||0);n.eq(r)||rn.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:n,maxFeePerGas:r})}var i=[fn(e.chainId||0,"chainId"),fn(e.nonce||0,"nonce"),fn(e.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),fn(e.maxFeePerGas||0,"maxFeePerGas"),fn(e.gasLimit||0,"gasLimit"),null!=e.to?me(e.to):"0x",fn(e.value||0,"value"),e.data||"0x",pn(e.accessList||[])];if(t){var o=Object(y.n)(t);i.push(fn(o.recoveryParam,"recoveryParam")),i.push(Object(y.o)(o.r)),i.push(Object(y.o)(o.s))}return Object(y.c)(["0x02",oe(i)])}function vn(e,t){var n=[fn(e.chainId||0,"chainId"),fn(e.nonce||0,"nonce"),fn(e.gasPrice||0,"gasPrice"),fn(e.gasLimit||0,"gasLimit"),null!=e.to?me(e.to):"0x",fn(e.value||0,"value"),e.data||"0x",pn(e.accessList||[])];if(t){var r=Object(y.n)(t);n.push(fn(r.recoveryParam,"recoveryParam")),n.push(Object(y.o)(r.r)),n.push(Object(y.o)(r.s))}return Object(y.c)(["0x01",oe(n)])}function mn(e,t){if(null==e.type||0===e.type)return null!=e.accessList&&rn.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",e),function(e,t){U(e,un);var n=[];sn.forEach((function(t){var r=e[t.name]||[],i={};t.numeric&&(i.hexPad="left"),r=Object(y.a)(Object(y.i)(r,i)),t.length&&r.length!==t.length&&r.length>0&&rn.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,r),t.maxLength&&(r=Object(y.o)(r)).length>t.maxLength&&rn.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,r),n.push(Object(y.i)(r))}));var r=0;if(null!=e.chainId?"number"!==typeof(r=e.chainId)&&rn.throwArgumentError("invalid transaction.chainId","transaction",e):t&&!Object(y.k)(t)&&t.v>28&&(r=Math.floor((t.v-35)/2)),0!==r&&(n.push(Object(y.i)(r)),n.push("0x"),n.push("0x")),!t)return oe(n);var i=Object(y.n)(t),o=27+i.recoveryParam;return 0!==r?(n.pop(),n.pop(),n.pop(),o+=2*r+8,i.v>28&&i.v!==o&&rn.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t)):i.v!==o&&rn.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t),n.push(Object(y.i)(o)),n.push(Object(y.o)(Object(y.a)(i.r))),n.push(Object(y.o)(Object(y.a)(i.s))),oe(n)}(e,t);switch(e.type){case 1:return vn(e,t);case 2:return gn(e,t)}return rn.throwError("unsupported transaction type: ".concat(e.type),_.b.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:e.type})}function An(e,t,n){try{var r=an(t[0]).toNumber();if(0!==r&&1!==r)throw new Error("bad recid");e.v=r}catch(o){rn.throwArgumentError("invalid v for transaction type: 1","v",t[0])}e.r=Object(y.h)(t[1],32),e.s=Object(y.h)(t[2],32);try{var i=ee(n(e));e.from=ln(i,{r:e.r,s:e.s,recoveryParam:e.v})}catch(o){}}function yn(e){var t=Object(y.a)(e);if(t[0]>127)return function(e){var t=ue(e);9!==t.length&&6!==t.length&&rn.throwArgumentError("invalid raw transaction","rawTransaction",e);var n={nonce:an(t[0]).toNumber(),gasPrice:an(t[1]),gasLimit:an(t[2]),to:on(t[3]),value:an(t[4]),data:t[5],chainId:0};if(6===t.length)return n;try{n.v=B.from(t[6]).toNumber()}catch(a){return n}if(n.r=Object(y.h)(t[7],32),n.s=Object(y.h)(t[8],32),B.from(n.r).isZero()&&B.from(n.s).isZero())n.chainId=n.v,n.v=0;else{n.chainId=Math.floor((n.v-35)/2),n.chainId<0&&(n.chainId=0);var r=n.v-27,i=t.slice(0,6);0!==n.chainId&&(i.push(Object(y.i)(n.chainId)),i.push("0x"),i.push("0x"),r-=2*n.chainId+8);var o=ee(oe(i));try{n.from=ln(o,{r:Object(y.i)(n.r),s:Object(y.i)(n.s),recoveryParam:r})}catch(a){}n.hash=ee(e)}return n.type=null,n}(t);switch(t[0]){case 1:return function(e){var t=ue(e.slice(1));8!==t.length&&11!==t.length&&rn.throwArgumentError("invalid component count for transaction type: 1","payload",Object(y.i)(e));var n={type:1,chainId:an(t[0]).toNumber(),nonce:an(t[1]).toNumber(),gasPrice:an(t[2]),gasLimit:an(t[3]),to:on(t[4]),value:an(t[5]),data:t[6],accessList:hn(t[7])};return 8===t.length||(n.hash=ee(e),An(n,t.slice(8),vn)),n}(t);case 2:return function(e){var t=ue(e.slice(1));9!==t.length&&12!==t.length&&rn.throwArgumentError("invalid component count for transaction type: 2","payload",Object(y.i)(e));var n=an(t[2]),r=an(t[3]),i={type:2,chainId:an(t[0]).toNumber(),nonce:an(t[1]).toNumber(),maxPriorityFeePerGas:n,maxFeePerGas:r,gasPrice:null,gasLimit:an(t[4]),to:on(t[5]),value:an(t[6]),data:t[7],accessList:hn(t[8])};return 9===t.length||(i.hash=ee(e),An(i,t.slice(9),gn)),i}(t)}return rn.throwError("unsupported transaction type: ".concat(t[0]),_.b.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:t[0]})}var bn=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(t){o(t)}}function s(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},wn=new _.b("contracts/5.7.0"),_n={chainId:!0,data:!0,from:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0,customData:!0,ccipReadEnabled:!0};function En(e,t){return bn(this,void 0,void 0,Object(A.a)().mark((function n(){var r,i;return Object(A.a)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,t;case 2:return"string"!==typeof(r=n.sent)&&wn.throwArgumentError("invalid address or ENS name","name",r),n.prev=4,n.abrupt("return",me(r));case 8:n.prev=8,n.t0=n.catch(4);case 10:return e||wn.throwError("a provider or signer is needed to resolve ENS names",_.b.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"}),n.next=13,e.resolveName(r);case 13:return null==(i=n.sent)&&wn.throwArgumentError("resolver or addr is not configured for ENS name","name",r),n.abrupt("return",i);case 16:case"end":return n.stop()}}),n,null,[[4,8]])})))}function kn(e,t,n){return bn(this,void 0,void 0,Object(A.a)().mark((function r(){return Object(A.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!Array.isArray(n)){r.next=4;break}return r.next=3,Promise.all(n.map((function(n,r){return kn(e,Array.isArray(t)?t[r]:t[n.name],n)})));case 3:case 7:case 11:case 17:return r.abrupt("return",r.sent);case 4:if("address"!==n.type){r.next=8;break}return r.next=7,En(e,t);case 8:if("tuple"!==n.type){r.next=12;break}return r.next=11,kn(e,t,n.components);case 12:if("array"!==n.baseType){r.next=18;break}if(Array.isArray(t)){r.next=15;break}return r.abrupt("return",Promise.reject(wn.makeError("invalid value for array",_.b.errors.INVALID_ARGUMENT,{argument:"value",value:t})));case 15:return r.next=17,Promise.all(t.map((function(t){return kn(e,t,n.arrayChildren)})));case 18:return r.abrupt("return",t);case 19:case"end":return r.stop()}}),r)})))}function In(e,t,n){return bn(this,void 0,void 0,Object(A.a)().mark((function r(){var i,o,a,s,u,c,l,f,d,h,p=this;return Object(A.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return i={},n.length===t.inputs.length+1&&"object"===typeof n[n.length-1]&&(i=L(n.pop())),wn.checkArgumentCount(n.length,t.inputs.length,"passed to contract"),e.signer?i.from?i.from=j({override:En(e.signer,i.from),signer:e.signer.getAddress()}).then((function(e){return bn(p,void 0,void 0,Object(A.a)().mark((function t(){return Object(A.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return me(e.signer)!==e.override&&wn.throwError("Contract with a Signer cannot override from",_.b.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),t.abrupt("return",e.override);case 2:case"end":return t.stop()}}),t)})))})):i.from=e.signer.getAddress():i.from&&(i.from=En(e.provider,i.from)),r.next=6,j({args:kn(e.signer||e.provider,n,t.inputs),address:e.resolvedAddress,overrides:j(i)||{}});case 6:if(o=r.sent,a=e.interface.encodeFunctionData(t,o.args),s={data:a,to:o.address},null!=(u=o.overrides).nonce&&(s.nonce=B.from(u.nonce).toNumber()),null!=u.gasLimit&&(s.gasLimit=B.from(u.gasLimit)),null!=u.gasPrice&&(s.gasPrice=B.from(u.gasPrice)),null!=u.maxFeePerGas&&(s.maxFeePerGas=B.from(u.maxFeePerGas)),null!=u.maxPriorityFeePerGas&&(s.maxPriorityFeePerGas=B.from(u.maxPriorityFeePerGas)),null!=u.from&&(s.from=u.from),null!=u.type&&(s.type=u.type),null!=u.accessList&&(s.accessList=hn(u.accessList)),null==s.gasLimit&&null!=t.gas){for(c=21e3,l=Object(y.a)(a),f=0;f1)){e=e.substring(1);var n=t[0];try{null==i[e]&&Q(i,e,i[n])}catch(r){}null==i.functions[e]&&Q(i.functions,e,i.functions[n]),null==i.callStatic[e]&&Q(i.callStatic,e,i.callStatic[n]),null==i.populateTransaction[e]&&Q(i.populateTransaction,e,i.populateTransaction[n]),null==i.estimateGas[e]&&Q(i.estimateGas,e,i.estimateGas[n])}}))}return Object(m.a)(e,[{key:"deployed",value:function(){return this._deployed()}},{key:"_deployed",value:function(e){var t=this;return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then((function(){return t})):this._deployedPromise=this.provider.getCode(this.address,e).then((function(e){return"0x"===e&&wn.throwError("contract not deployed",_.b.errors.UNSUPPORTED_OPERATION,{contractAddress:t.address,operation:"getDeployed"}),t}))),this._deployedPromise}},{key:"fallback",value:function(e){var t=this;this.signer||wn.throwError("sending a transactions require a signer",_.b.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});var n=L(e||{});return["from","to"].forEach((function(e){null!=n[e]&&wn.throwError("cannot override "+e,_.b.errors.UNSUPPORTED_OPERATION,{operation:e})})),n.to=this.resolvedAddress,this.deployed().then((function(){return t.signer.sendTransaction(n)}))}},{key:"connect",value:function(e){"string"===typeof e&&(e=new Wt(e,this.provider));var t=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&Q(t,"deployTransaction",this.deployTransaction),t}},{key:"attach",value:function(e){return new this.constructor(e,this.interface,this.signer||this.provider)}},{key:"_normalizeRunningEvent",value:function(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}},{key:"_getRunningEvent",value:function(e){if("string"===typeof e){if("error"===e)return this._normalizeRunningEvent(new Mn);if("event"===e)return this._normalizeRunningEvent(new On("event",null));if("*"===e)return this._normalizeRunningEvent(new Rn(this.address,this.interface));var t=this.interface.getEvent(e);return this._normalizeRunningEvent(new Pn(this.address,this.interface,t))}if(e.topics&&e.topics.length>0){try{var n=e.topics[0];if("string"!==typeof n)throw new Error("invalid topic");var r=this.interface.getEvent(n);return this._normalizeRunningEvent(new Pn(this.address,this.interface,r,e.topics))}catch(o){}var i={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new On(Bn(i),i))}return this._normalizeRunningEvent(new Rn(this.address,this.interface))}},{key:"_checkRunningEvents",value:function(e){if(0===e.listenerCount()){delete this._runningEvents[e.tag];var t=this._wrappedEmits[e.tag];t&&e.filter&&(this.provider.off(e.filter,t),delete this._wrappedEmits[e.tag])}}},{key:"_wrapEvent",value:function(e,t,n){var r=this,i=q(t);return i.removeListener=function(){n&&(e.removeListener(n),r._checkRunningEvents(e))},i.getBlock=function(){return r.provider.getBlock(t.blockHash)},i.getTransaction=function(){return r.provider.getTransaction(t.transactionHash)},i.getTransactionReceipt=function(){return r.provider.getTransactionReceipt(t.transactionHash)},e.prepareEvent(i),i}},{key:"_addEventListener",value:function(e,t,n){var r=this;if(this.provider||wn.throwError("events require a provider or a signer with a provider",_.b.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(t,n),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){var i=function(n){var i=r._wrapEvent(e,n,t);if(null==i.decodeError)try{var o=e.getEmit(i);r.emit.apply(r,[e.filter].concat(Object(c.a)(o)))}catch(a){i.decodeError=a.error}null!=e.filter&&r.emit("event",i),null!=i.decodeError&&r.emit("error",i.decodeError,i)};this._wrappedEmits[e.tag]=i,null!=e.filter&&this.provider.on(e.filter,i)}}},{key:"queryFilter",value:function(e,t,n){var r=this,i=this._getRunningEvent(e),o=L(i.filter);return"string"===typeof t&&Object(y.l)(t,32)?(null!=n&&wn.throwArgumentError("cannot specify toBlock with blockhash","toBlock",n),o.blockHash=t):(o.fromBlock=null!=t?t:0,o.toBlock=null!=n?n:"latest"),this.provider.getLogs(o).then((function(e){return e.map((function(e){return r._wrapEvent(i,e,null)}))}))}},{key:"on",value:function(e,t){return this._addEventListener(this._getRunningEvent(e),t,!1),this}},{key:"once",value:function(e,t){return this._addEventListener(this._getRunningEvent(e),t,!0),this}},{key:"emit",value:function(e){if(!this.provider)return!1;for(var t=this._getRunningEvent(e),n=arguments.length,r=new Array(n>1?n-1:0),i=1;i0;return this._checkRunningEvents(t),o}},{key:"listenerCount",value:function(e){var t=this;return this.provider?null==e?Object.keys(this._runningEvents).reduce((function(e,n){return e+t._runningEvents[n].listenerCount()}),0):this._getRunningEvent(e).listenerCount():0}},{key:"listeners",value:function(e){var t=this;if(!this.provider)return[];if(null==e){var n=function(){var e=[];for(var n in t._runningEvents)t._runningEvents[n].listeners().forEach((function(t){e.push(t)}));return{v:e}}();if("object"===typeof n)return n.v}return this._getRunningEvent(e).listeners()}},{key:"removeAllListeners",value:function(e){if(!this.provider)return this;if(null==e){for(var t in this._runningEvents){var n=this._runningEvents[t];n.removeAllListeners(),this._checkRunningEvents(n)}return this}var r=this._getRunningEvent(e);return r.removeAllListeners(),this._checkRunningEvents(r),this}},{key:"off",value:function(e,t){if(!this.provider)return this;var n=this._getRunningEvent(e);return n.removeListener(t),this._checkRunningEvents(n),this}},{key:"removeListener",value:function(e,t){return this.off(e,t)}}],[{key:"getContractAddress",value:function(e){return be(e)}},{key:"getInterface",value:function(e){return jt.isInterface(e)?e:new jt(e)}},{key:"isIndexed",value:function(e){return Tt.isIndexed(e)}}]),e}(),Tn=function(e){Object(p.a)(n,e);var t=Object(g.a)(n);function n(){return Object(v.a)(this,n),t.apply(this,arguments)}return Object(m.a)(n)}(Nn),Qn=function(){function e(t,n,r){Object(v.a)(this,e);var i=null;"0x"!==(i="string"===typeof n?n:Object(y.j)(n)?Object(y.i)(n):n&&"string"===typeof n.object?n.object:"!").substring(0,2)&&(i="0x"+i),(!Object(y.l)(i)||i.length%2)&&wn.throwArgumentError("invalid bytecode","bytecode",n),r&&!Vt.isSigner(r)&&wn.throwArgumentError("invalid signer","signer",r),Q(this,"bytecode",i),Q(this,"interface",D(this instanceof e?this.constructor:void 0,"getInterface")(t)),Q(this,"signer",r||null)}return Object(m.a)(e,[{key:"getDeployTransaction",value:function(){for(var e={},t=arguments.length,n=new Array(t),r=0;r=0&&e<=256&&!(e%1)?"1"+Hn.substring(0,e):Dn.throwArgumentError("invalid decimal size","decimals",e)}function qn(e,t){null==t&&(t=0);var n=Jn(t),r=(e=B.from(e)).lt(Un);r&&(e=e.mul(Ln));for(var i=e.mod(n).toString();i.length2&&Dn.throwArgumentError("too many decimal points","value",e);var o=i[0],a=i[1];for(o||(o="0"),a||(a="0");"0"===a[a.length-1];)a=a.substring(0,a.length-1);for(a.length>n.length-1&&Fn("fractional component exceeds decimals","underflow","parseFixed"),""===a&&(a="0");a.length80&&Dn.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new e(jn,n,r,i)}}]),e}(),Vn=function(){function e(t,n,r,i){Object(v.a)(this,e),t!==jn&&Dn.throwError("cannot use FixedNumber constructor; use FixedNumber.from",_.b.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=i,this._hex=n,this._value=r,this._isFixedNumber=!0,Object.freeze(this)}return Object(m.a)(e,[{key:"_checkFormat",value:function(e){this.format.name!==e.format.name&&Dn.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}},{key:"addUnsafe",value:function(t){this._checkFormat(t);var n=Gn(this._value,this.format.decimals),r=Gn(t._value,t.format.decimals);return e.fromValue(n.add(r),this.format.decimals,this.format)}},{key:"subUnsafe",value:function(t){this._checkFormat(t);var n=Gn(this._value,this.format.decimals),r=Gn(t._value,t.format.decimals);return e.fromValue(n.sub(r),this.format.decimals,this.format)}},{key:"mulUnsafe",value:function(t){this._checkFormat(t);var n=Gn(this._value,this.format.decimals),r=Gn(t._value,t.format.decimals);return e.fromValue(n.mul(r).div(this.format._multiplier),this.format.decimals,this.format)}},{key:"divUnsafe",value:function(t){this._checkFormat(t);var n=Gn(this._value,this.format.decimals),r=Gn(t._value,t.format.decimals);return e.fromValue(n.mul(this.format._multiplier).div(r),this.format.decimals,this.format)}},{key:"floor",value:function(){var t=this.toString().split(".");1===t.length&&t.push("0");var n=e.from(t[0],this.format),r=!t[1].match(/^(0*)$/);return this.isNegative()&&r&&(n=n.subUnsafe(Wn.toFormat(n.format))),n}},{key:"ceiling",value:function(){var t=this.toString().split(".");1===t.length&&t.push("0");var n=e.from(t[0],this.format),r=!t[1].match(/^(0*)$/);return!this.isNegative()&&r&&(n=n.addUnsafe(Wn.toFormat(n.format))),n}},{key:"round",value:function(t){null==t&&(t=0);var n=this.toString().split(".");if(1===n.length&&n.push("0"),(t<0||t>80||t%1)&&Dn.throwArgumentError("invalid decimal count","decimals",t),n[1].length<=t)return this;var r=e.from("1"+Hn.substring(0,t),this.format),i=Kn.toFormat(this.format);return this.mulUnsafe(r).addUnsafe(i).floor().divUnsafe(r)}},{key:"isZero",value:function(){return"0.0"===this._value||"0"===this._value}},{key:"isNegative",value:function(){return"-"===this._value[0]}},{key:"toString",value:function(){return this._value}},{key:"toHexString",value:function(e){if(null==e)return this._hex;e%8&&Dn.throwArgumentError("invalid byte width","width",e);var t=B.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return Object(y.h)(t,e/8)}},{key:"toUnsafeFloat",value:function(){return parseFloat(this.toString())}},{key:"toFormat",value:function(t){return e.fromString(this._value,t)}}],[{key:"fromValue",value:function(t,n,r){return null!=r||null==n||function(e){return null!=e&&(B.isBigNumber(e)||"number"===typeof e&&e%1===0||"string"===typeof e&&!!e.match(/^-?[0-9]+$/)||Object(y.l)(e)||"bigint"===typeof e||Object(y.j)(e))}(n)||(r=n,n=null),null==n&&(n=0),null==r&&(r="fixed"),e.fromString(qn(t,n),zn.from(r))}},{key:"fromString",value:function(t,n){null==n&&(n="fixed");var r=zn.from(n),i=Gn(t,r.decimals);!r.signed&&i.lt(Un)&&Fn("unsigned value cannot be negative","overflow","value",t);var o=null;r.signed?o=i.toTwos(r.width).toHexString():(o=i.toHexString(),o=Object(y.h)(o,r.width/8));var a=qn(i,r.decimals);return new e(jn,o,a,r)}},{key:"fromBytes",value:function(t,n){null==n&&(n="fixed");var r=zn.from(n);if(Object(y.a)(t).length>r.width/8)throw new Error("overflow");var i=B.from(t);r.signed&&(i=i.fromTwos(r.width));var o=i.toTwos((r.signed?0:1)+r.width).toHexString(),a=qn(i,r.decimals);return new e(jn,o,a,r)}},{key:"from",value:function(t,n){if("string"===typeof t)return e.fromString(t,n);if(Object(y.j)(t))return e.fromBytes(t,n);try{return e.fromValue(t,0,n)}catch(r){if(r.code!==_.b.errors.INVALID_ARGUMENT)throw r}return Dn.throwArgumentError("invalid FixedNumber value","value",t)}},{key:"isFixedNumber",value:function(e){return!(!e||!e._isFixedNumber)}}]),e}(),Wn=Vn.from(1),Kn=Vn.from("0.5");function Yn(e){return"string"===typeof e&&(e=xe(e)),ee(Object(y.b)([xe("\x19Ethereum Signed Message:\n"),xe(String(e.length)),e]))}var Zn="hash/5.7.0",Xn=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(t){o(t)}}function s(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},$n=new _.b(Zn),er=new Uint8Array(32);er.fill(0);var tr=B.from(-1),nr=B.from(0),rr=B.from(1),ir=B.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");var or=Object(y.h)(rr.toHexString(),32),ar=Object(y.h)(nr.toHexString(),32),sr={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},ur=["name","version","chainId","verifyingContract","salt"];function cr(e){return function(t){return"string"!==typeof t&&$n.throwArgumentError("invalid domain value for ".concat(JSON.stringify(e)),"domain.".concat(e),t),t}}var lr={name:cr("name"),version:cr("version"),chainId:function(e){try{return B.from(e).toString()}catch(t){}return $n.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",e)},verifyingContract:function(e){try{return me(e).toLowerCase()}catch(t){}return $n.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",e)},salt:function(e){try{var t=Object(y.a)(e);if(32!==t.length)throw new Error("bad length");return Object(y.i)(t)}catch(n){}return $n.throwArgumentError('invalid domain value "salt"',"domain.salt",e)}};function fr(e){var t=e.match(/^(u?)int(\d*)$/);if(t){var n=""===t[1],r=parseInt(t[2]||"256");(r%8!==0||r>256||t[2]&&t[2]!==String(r))&&$n.throwArgumentError("invalid numeric width","type",e);var i=ir.mask(n?r-1:r),o=n?i.add(rr).mul(tr):nr;return function(t){var n=B.from(t);return(n.lt(o)||n.gt(i))&&$n.throwArgumentError("value out-of-bounds for ".concat(e),"value",t),Object(y.h)(n.toTwos(256).toHexString(),32)}}var a=e.match(/^bytes(\d+)$/);if(a){var s=parseInt(a[1]);return(0===s||s>32||a[1]!==String(s))&&$n.throwArgumentError("invalid bytes width","type",e),function(t){return Object(y.a)(t).length!==s&&$n.throwArgumentError("invalid length for ".concat(e),"value",t),function(e){var t=Object(y.a)(e),n=t.length%32;return n?Object(y.c)([t,er.slice(n)]):Object(y.i)(t)}(t)}}switch(e){case"address":return function(e){return Object(y.h)(me(e),32)};case"bool":return function(e){return e?or:ar};case"bytes":return function(e){return ee(e)};case"string":return function(e){return Ne(e)}}return null}function dr(e,t){return"".concat(e,"(").concat(t.map((function(e){var t=e.name;return e.type+" "+t})).join(","),")")}var hr,pr=function(){function e(t){Object(v.a)(this,e),Q(this,"types",Object.freeze(q(t))),Q(this,"_encoderCache",{}),Q(this,"_types",{});var n={},r={},i={};Object.keys(t).forEach((function(e){n[e]={},r[e]=[],i[e]={}}));var o=function(e){var i={};t[e].forEach((function(o){i[o.name]&&$n.throwArgumentError("duplicate variable name ".concat(JSON.stringify(o.name)," in ").concat(JSON.stringify(e)),"types",t),i[o.name]=!0;var a=o.type.match(/^([^\x5b]*)(\x5b|$)/)[1];a===e&&$n.throwArgumentError("circular type reference to ".concat(JSON.stringify(a)),"types",t),fr(a)||(r[a]||$n.throwArgumentError("unknown type ".concat(JSON.stringify(a)),"types",t),r[a].push(e),n[e][a]=!0)}))};for(var a in t)o(a);var s=Object.keys(r).filter((function(e){return 0===r[e].length}));for(var u in 0===s.length?$n.throwArgumentError("missing primary type","types",t):s.length>1&&$n.throwArgumentError("ambiguous primary types or unused types: ".concat(s.map((function(e){return JSON.stringify(e)})).join(", ")),"types",t),Q(this,"primaryType",s[0]),function e(o,a){a[o]&&$n.throwArgumentError("circular type reference to ".concat(JSON.stringify(o)),"types",t),a[o]=!0,Object.keys(n[o]).forEach((function(t){r[t]&&(e(t,a),Object.keys(a).forEach((function(e){i[e][t]=!0})))})),delete a[o]}(this.primaryType,{}),i){var c=Object.keys(i[u]);c.sort(),this._types[u]=dr(u,t[u])+c.map((function(e){return dr(e,t[e])})).join("")}}return Object(m.a)(e,[{key:"getEncoder",value:function(e){var t=this._encoderCache[e];return t||(t=this._encoderCache[e]=this._getEncoder(e)),t}},{key:"_getEncoder",value:function(e){var t=this,n=fr(e);if(n)return n;var r=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(r){var i=r[1],o=this.getEncoder(i),a=parseInt(r[3]);return function(e){a>=0&&e.length!==a&&$n.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",e);var n=e.map(o);return t._types[i]&&(n=n.map(ee)),ee(Object(y.c)(n))}}var s=this.types[e];if(s){var u=Ne(this._types[e]);return function(e){var n=s.map((function(n){var r=n.name,i=n.type,o=t.getEncoder(i)(e[r]);return t._types[i]?ee(o):o}));return n.unshift(u),Object(y.c)(n)}}return $n.throwArgumentError("unknown type: ".concat(e),"type",e)}},{key:"encodeType",value:function(e){var t=this._types[e];return t||$n.throwArgumentError("unknown type: ".concat(JSON.stringify(e)),"name",e),t}},{key:"encodeData",value:function(e,t){return this.getEncoder(e)(t)}},{key:"hashStruct",value:function(e,t){return ee(this.encodeData(e,t))}},{key:"encode",value:function(e){return this.encodeData(this.primaryType,e)}},{key:"hash",value:function(e){return this.hashStruct(this.primaryType,e)}},{key:"_visit",value:function(e,t,n){var r=this;if(fr(e))return n(e,t);var i=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(i){var o=i[1],a=parseInt(i[3]);return a>=0&&t.length!==a&&$n.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t),t.map((function(e){return r._visit(o,e,n)}))}var s=this.types[e];return s?s.reduce((function(e,i){var o=i.name,a=i.type;return e[o]=r._visit(a,t[o],n),e}),{}):$n.throwArgumentError("unknown type: ".concat(e),"type",e)}},{key:"visit",value:function(e,t){return this._visit(this.primaryType,e,t)}}],[{key:"from",value:function(t){return new e(t)}},{key:"getPrimaryType",value:function(t){return e.from(t).primaryType}},{key:"hashStruct",value:function(t,n,r){return e.from(n).hashStruct(t,r)}},{key:"hashDomain",value:function(t){var n=[];for(var r in t){var i=sr[r];i||$n.throwArgumentError("invalid typed-data domain key: ".concat(JSON.stringify(r)),"domain",t),n.push({name:r,type:i})}return n.sort((function(e,t){return ur.indexOf(e.name)-ur.indexOf(t.name)})),e.hashStruct("EIP712Domain",{EIP712Domain:n},t)}},{key:"encode",value:function(t,n,r){return Object(y.c)(["0x1901",e.hashDomain(t),e.from(n).hash(r)])}},{key:"hash",value:function(t,n,r){return ee(e.encode(t,n,r))}},{key:"resolveNames",value:function(t,n,r,i){return Xn(this,void 0,void 0,Object(A.a)().mark((function o(){var a,s,u;return Object(A.a)().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:t=L(t),a={},t.verifyingContract&&!Object(y.l)(t.verifyingContract,20)&&(a[t.verifyingContract]="0x"),(s=e.from(n)).visit(r,(function(e,t){return"address"!==e||Object(y.l)(t,20)||(a[t]="0x"),t})),o.t0=Object(A.a)().keys(a);case 6:if((o.t1=o.t0()).done){o.next=13;break}return u=o.t1.value,o.next=10,i(u);case 10:a[u]=o.sent,o.next=6;break;case 13:return t.verifyingContract&&a[t.verifyingContract]&&(t.verifyingContract=a[t.verifyingContract]),r=s.visit(r,(function(e,t){return"address"===e&&a[t]?a[t]:t})),o.abrupt("return",{domain:t,value:r});case 16:case"end":return o.stop()}}),o)})))}},{key:"getPayload",value:function(t,n,r){e.hashDomain(t);var i={},o=[];ur.forEach((function(e){var n=t[e];null!=n&&(i[e]=lr[e](n),o.push({name:e,type:sr[e]}))}));var a=e.from(n),s=L(n);return s.EIP712Domain?$n.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",n):s.EIP712Domain=o,a.encode(r),{types:s,domain:i,primaryType:a.primaryType,message:a.visit(r,(function(e,t){if(e.match(/^bytes(\d*)/))return Object(y.i)(Object(y.a)(t));if(e.match(/^u?int/))return B.from(t).toString();switch(e){case"address":return t.toLowerCase();case"bool":return!!t;case"string":return"string"!==typeof t&&$n.throwArgumentError("invalid string","value",t),t}return $n.throwArgumentError("unsupported type","type",e)}))}}}]),e}(),gr=function(){function e(t){Object(v.a)(this,e),Q(this,"alphabet",t),Q(this,"base",t.length),Q(this,"_alphabetMap",{}),Q(this,"_leader",t.charAt(0));for(var n=0;n0;)n.push(i%this.base),i=i/this.base|0}for(var a="",s=0;0===t[s]&&s=0;--u)a+=this.alphabet[n[u]];return a}},{key:"decode",value:function(e){if("string"!==typeof e)throw new TypeError("Expected String");var t=[];if(0===e.length)return new Uint8Array(t);t.push(0);for(var n=0;n>=8;for(;i>0;)t.push(255&i),i>>=8}for(var a=0;e[a]===this._leader&&a>24&255,l[t.length+1]=f>>16&255,l[t.length+2]=f>>8&255,l[t.length+3]=255&f;var d=Object(y.a)(Er(i,e,l));o||(o=d.length,s=new Uint8Array(o),a=r-((u=Math.ceil(r/o))-1)*o),s.set(d);for(var h=1;h=256)throw new Error("Depth too large!");return Dr(Object(y.b)([null!=this.privateKey?"0x0488ADE4":"0x0488B21E",Object(y.i)(this.depth),this.parentFingerprint,Object(y.h)(Object(y.i)(this.index),4),this.chainCode,null!=this.privateKey?Object(y.b)(["0x00",this.privateKey]):this.publicKey]))}},{key:"neuter",value:function(){return new e(Ur,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}},{key:"_derive",value:function(t){if(t>4294967295)throw new Error("invalid index - "+String(t));var n=this.path;n&&(n+="/"+(2147483647&t));var r=new Uint8Array(37);if(t&Nr){if(!this.privateKey)throw new Error("cannot derive child of neutered node");r.set(Object(y.a)(this.privateKey),1),n&&(n+="'")}else r.set(Object(y.a)(this.publicKey));for(var i=24;i>=0;i-=8)r[33+(i>>3)]=t>>24-i&255;var o=Object(y.a)(Er(hr.sha512,this.chainCode,r)),a=o.slice(0,32),s=o.slice(32),u=null,c=null;this.privateKey?u=Qr(B.from(a).add(this.privateKey).mod(Pr)):c=new $t(Object(y.i)(a))._addPoint(this.publicKey);var l=n,f=this.mnemonic;return f&&(l=Object.freeze({phrase:f.phrase,path:n,locale:f.locale||"en"})),new e(Ur,u,c,this.fingerprint,Qr(s),t,this.depth+1,l)}},{key:"derivePath",value:function(e){var t=e.split("/");if(0===t.length||"m"===t[0]&&0!==this.depth)throw new Error("invalid path - "+e);"m"===t[0]&&t.shift();for(var n=this,r=0;r=Nr)throw new Error("invalid path index - "+i);n=n._derive(Nr+o)}else{if(!i.match(/^[0-9]+$/))throw new Error("invalid path component - "+i);var a=parseInt(i);if(a>=Nr)throw new Error("invalid path index - "+i);n=n._derive(a)}}return n}}],[{key:"_fromSeed",value:function(t,n){var r=Object(y.a)(t);if(r.length<16||r.length>64)throw new Error("invalid seed");var i=Object(y.a)(Er(hr.sha512,Rr,r));return new e(Ur,Qr(i.slice(0,32)),null,"0x00000000",Qr(i.slice(32)),0,0,n)}},{key:"fromMnemonic",value:function(t,n,r){return t=qr(Jr(t,r=jr(r)),r),e._fromSeed(Hr(t,n),{phrase:t,path:"m",locale:r.locale})}},{key:"fromSeed",value:function(t){return e._fromSeed(t,null)}},{key:"fromExtendedKey",value:function(t){var n=vr.decode(t);82===n.length&&Dr(n.slice(0,78))===t||Mr.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");var r=n[4],i=Object(y.i)(n.slice(5,9)),o=parseInt(Object(y.i)(n.slice(9,13)).substring(2),16),a=Object(y.i)(n.slice(13,45)),s=n.slice(45,78);switch(Object(y.i)(n.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new e(Ur,null,Object(y.i)(s),i,a,o,r,null);case"0x0488ade4":case"0x04358394 ":if(0!==s[0])break;return new e(Ur,Object(y.i)(s.slice(1)),null,i,a,o,r,null)}return Mr.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}]),e}();function Hr(e,t){t||(t="");var n=xe("mnemonic"+t,_e.NFKD);return kr(xe(e,_e.NFKD),n,2048,64,"sha512")}function Jr(e,t){t=jr(t),Mr.checkNormalize();var n=t.split(e);if(n.length%3!==0)throw new Error("invalid mnemonic");for(var r=Object(y.a)(new Uint8Array(Math.ceil(11*n.length/8))),i=0,o=0;o>3]|=1<<7-i%8),i++}var u=32*n.length/3,c=Tr(n.length/3);if((Object(y.a)(wr(r.slice(0,u/8)))[0]&c)!==(r[r.length-1]&c))throw new Error("invalid checksum");return Object(y.i)(r.slice(0,u/8))}function qr(e,t){if(t=jr(t),(e=Object(y.a)(e)).length%4!==0||e.length<16||e.length>32)throw new Error("invalid entropy");for(var n=[0],r=11,i=0;i8?(n[n.length-1]<<=8,n[n.length-1]|=e[i],r-=8):(n[n.length-1]<<=r,n[n.length-1]|=e[i]>>8-r,n.push(e[i]&(1<<8-r)-1),r+=3);var o=e.length/4,a=Object(y.a)(wr(e))[0]&Tr(o);return n[n.length-1]<<=o,n[n.length-1]|=a>>8-o,t.join(n.map((function(e){return t.getWord(e)})))}function Gr(e,t){try{return Jr(e,t),!0}catch(n){}return!1}function zr(e){return("number"!==typeof e||e<0||e>=Nr||e%1)&&Mr.throwArgumentError("invalid account index","index",e),"m/44'/60'/".concat(e,"'/0/0")}var Vr=n(1127),Wr=n(91),Kr=n.n(Wr),Yr=n(231),Zr=n.n(Yr);function Xr(e){return"string"===typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),Object(y.a)(e)}function $r(e,t){for(e=String(e);e.length0&&Array.isArray(t)?e(t,i-1):n.push(t)}))}(e,t),n}function Li(e){return function(e){var t=0;return function(){return e[t++]}}(function(e){var t=0;function n(){return e[t++]<<8|e[t++]}for(var r=n(),i=1,o=[0,1],a=1;a>--c&1}for(var d=Math.pow(2,31),h=d>>>1,p=h>>1,g=d-1,v=0,m=0;m<31;m++)v=v<<1|f();for(var A=[],y=0,b=d;;){for(var w=Math.floor(((v-y+1)*i-1)/b),_=0,E=r;E-_>1;){var k=_+E>>>1;w>>1|f(),I=I<<1^h,C=(C^h)<<1|h|1;y=I,b=1+C-I}var S=r-4;return A.map((function(t){switch(t-S){case 3:return S+65792+(e[u++]<<16|e[u++]<<8|e[u++]);case 2:return S+256+(e[u++]<<8|e[u++]);case 1:return S+e[u++];default:return t-1}}))}(e))}function Fi(e){return 1&e?~e>>1:e>>1}function Hi(e,t){for(var n=Array(e),r=0,i=-1;r>=1),check:2==o}}()}(Wi);function $i(e){return Re(e)}function eo(e){return e.filter((function(e){return 65039!=e}))}function to(e){var t,n=function(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Object(ji.a)(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}(e.split("."));try{for(n.s();!(t=n.n()).done;){var r=t.value,i=$i(r);try{for(var o=i.lastIndexOf(95)-1;o>=0;o--)if(95!==i[o])throw new Error("underscore only allowed at start");if(i.length>=4&&i.every((function(e){return e<128}))&&45===i[2]&&45===i[3])throw new Error("invalid label extension")}catch(a){throw new Error('Invalid label "'.concat(r,'": ').concat(a.message))}}}catch(a){n.e(a)}finally{n.f()}return e}function no(e){return to(function(e,t){var n=$i(e).reverse(),r=[];for(;n.length;){var i=ro(n);if(i)r.push.apply(r,Object(c.a)(t(i)));else{var o=n.pop();if(Ki.has(o))r.push(o);else if(!Yi.has(o)){var a=Zi[o];if(!a)throw new Error("Disallowed codepoint: 0x".concat(o.toString(16).toUpperCase()));r.push.apply(r,Object(c.a)(a))}}}return to((s=String.fromCodePoint.apply(String,r),s.normalize("NFC")));var s}(e,eo))}function ro(e,t){var n,r,i,o=Xi,a=[],s=e.length;t&&(t.length=0);for(var u=function(){var u=e[--s];if(o=null===(n=o.branches.find((function(e){return e.set.has(u)})))||void 0===n?void 0:n.node,!o)return"break";if(o.save)i=u;else if(o.check&&u===i)return"break";a.push(u),o.fe0f&&(a.push(65039),s>0&&65039==e[s-1]&&s--),o.valid&&(r=a.slice(),2==o.valid&&r.splice(1,1),t&&t.push.apply(t,Object(c.a)(e.slice(s).reverse())),e.length=s)};s;){if("break"===u())break}return r}var io=new _.b(Zn),oo=new Uint8Array(32);function ao(e){if(0===e.length)throw new Error("invalid ENS name; empty component");return e}function so(e){var t=xe(no(e)),n=[];if(0===e.length)return n;for(var r=0,i=0;i=t.length)throw new Error("invalid ENS name; empty component");return n.push(ao(t.slice(r))),n}function uo(e){try{return 0!==so(e).length}catch(t){}return!1}function co(e){"string"!==typeof e&&io.throwArgumentError("invalid ENS name; not a string","name",e);for(var t=oo,n=so(e);n.length;)t=ee(Object(y.b)([t,ee(n.pop())]));return Object(y.i)(t)}function lo(e){return Object(y.i)(Object(y.b)(so(e).map((function(e){if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");var t=new Uint8Array(e.length+1);return t.set(e,1),t[0]=t.length-1,t}))))+"00"}oo.fill(0);var fo=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(t){o(t)}}function s(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))};function ho(e,t){return fo(this,void 0,void 0,Object(A.a)().mark((function n(){var r,i,o,a,s;return Object(A.a)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return null==t&&(t={}),r={method:t.method||"GET",headers:t.headers||{},body:t.body||void 0},!0!==t.skipFetchSetup&&(r.mode="cors",r.cache="no-cache",r.credentials="same-origin",r.redirect="follow",r.referrer="client"),null!=t.fetchOptions&&((i=t.fetchOptions).mode&&(r.mode=i.mode),i.cache&&(r.cache=i.cache),i.credentials&&(r.credentials=i.credentials),i.redirect&&(r.redirect=i.redirect),i.referrer&&(r.referrer=i.referrer)),n.next=7,fetch(e,r);case 7:return o=n.sent,n.next=10,o.arrayBuffer();case 10:return a=n.sent,s={},o.headers.forEach?o.headers.forEach((function(e,t){s[t.toLowerCase()]=e})):o.headers.keys().forEach((function(e){s[e.toLowerCase()]=o.headers.get(e)})),n.abrupt("return",{headers:s,statusCode:o.status,statusMessage:o.statusText,body:Object(y.a)(new Uint8Array(a))});case 14:case"end":return n.stop()}}),n)})))}var po=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(t){o(t)}}function s(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},go=new _.b("web/5.7.0");function vo(e){return new Promise((function(t){setTimeout(t,e)}))}function mo(e,t){if(null==e)return null;if("string"===typeof e)return e;if(Object(y.k)(e)){if(t&&("text"===t.split("/")[0]||"application/json"===t.split(";")[0].trim()))try{return Pe(e)}catch(n){}return Object(y.i)(e)}return e}function Ao(e,t,n){var r="object"===typeof e&&null!=e.throttleLimit?e.throttleLimit:12;go.assertArgument(r>0&&r%1===0,"invalid connection throttle limit","connection.throttleLimit",r);var i="object"===typeof e?e.throttleCallback:null,o="object"===typeof e&&"number"===typeof e.throttleSlotInterval?e.throttleSlotInterval:100;go.assertArgument(o>0&&o%1===0,"invalid connection throttle slot interval","connection.throttleSlotInterval",o);var a="object"===typeof e&&!!e.errorPassThrough,s={},u=null,c={method:"GET"},l=!1,f=12e4;if("string"===typeof e)u=e;else if("object"===typeof e){if(null!=e&&null!=e.url||go.throwArgumentError("missing URL","connection.url",e),u=e.url,"number"===typeof e.timeout&&e.timeout>0&&(f=e.timeout),e.headers)for(var d in e.headers)s[d.toLowerCase()]={key:d,value:String(e.headers[d])},["if-none-match","if-modified-since"].indexOf(d.toLowerCase())>=0&&(l=!0);if(c.allowGzip=!!e.allowGzip,null!=e.user&&null!=e.password){"https:"!==u.substring(0,6)&&!0!==e.allowInsecureAuthentication&&go.throwError("basic authentication requires a secure https url",_.b.errors.INVALID_ARGUMENT,{argument:"url",url:u,user:e.user,password:"[REDACTED]"});var h=e.user+":"+e.password;s.authorization={key:"Authorization",value:"Basic "+Di(xe(h))}}null!=e.skipFetchSetup&&(c.skipFetchSetup=!!e.skipFetchSetup),null!=e.fetchOptions&&(c.fetchOptions=L(e.fetchOptions))}var p=new RegExp("^data:([a-z0-9-]+/[a-z0-9-]+);base64,(.*)$","i"),g=u?u.match(p):null;if(g)try{var v={statusCode:200,statusMessage:"OK",headers:{"content-type":g[1]},body:Qi(g[2])},m=v.body;return n&&(m=n(v.body,v)),Promise.resolve(m)}catch(E){go.throwError("processing response error",_.b.errors.SERVER_ERROR,{body:mo(g[1],g[2]),error:E,requestBody:null,requestMethod:"GET",url:u})}t&&(c.method="POST",c.body=t,null==s["content-type"]&&(s["content-type"]={key:"Content-Type",value:"application/octet-stream"}),null==s["content-length"]&&(s["content-length"]={key:"Content-Length",value:String(t.length)}));var y={};Object.keys(s).forEach((function(e){var t=s[e];y[t.key]=t.value})),c.headers=y;var b=function(){var e=null;return{promise:new Promise((function(t,n){f&&(e=setTimeout((function(){null!=e&&(e=null,n(go.makeError("timeout",_.b.errors.TIMEOUT,{requestBody:mo(c.body,y["content-type"]),requestMethod:c.method,timeout:f,url:u})))}),f))})),cancel:function(){null!=e&&(clearTimeout(e),e=null)}}}(),w=function(){return po(this,void 0,void 0,Object(A.a)().mark((function e(){var t,s,f,d,h,p,g,v,m,w;return Object(A.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=0;case 1:if(!(t=300)&&(b.cancel(),go.throwError("bad response",_.b.errors.SERVER_ERROR,{status:s.statusCode,headers:s.headers,body:mo(g,s.headers?s.headers["content-type"]:null),requestBody:mo(c.body,y["content-type"]),requestMethod:c.method,url:u})),!n){e.next=60;break}return e.prev=37,e.next=40,n(g,s);case 40:return v=e.sent,b.cancel(),e.abrupt("return",v);case 45:if(e.prev=45,e.t1=e.catch(37),!(e.t1.throttleRetry&&ts)return void(a()&&r(new Error("retry limit reached")));var c=t.interval*parseInt(String(Math.random()*Math.pow(2,u)));ct.ceiling&&(c=t.ceiling),setTimeout(i,c)}return null}),(function(e){a()&&r(e)}))}()}))}var wo=n(224),_o=n.n(wo),Eo="providers/5.7.0",ko=new _.b(Eo),Io=function(){function e(){Object(v.a)(this,e),this.formats=this.getDefaultFormats()}return Object(m.a)(e,[{key:"getDefaultFormats",value:function(){var t=this,n={},r=this.address.bind(this),i=this.bigNumber.bind(this),o=this.blockTag.bind(this),a=this.data.bind(this),s=this.hash.bind(this),u=this.hex.bind(this),c=this.number.bind(this),l=this.type.bind(this);return n.transaction={hash:s,type:l,accessList:e.allowNull(this.accessList.bind(this),null),blockHash:e.allowNull(s,null),blockNumber:e.allowNull(c,null),transactionIndex:e.allowNull(c,null),confirmations:e.allowNull(c,null),from:r,gasPrice:e.allowNull(i),maxPriorityFeePerGas:e.allowNull(i),maxFeePerGas:e.allowNull(i),gasLimit:i,to:e.allowNull(r,null),value:i,nonce:c,data:a,r:e.allowNull(this.uint256),s:e.allowNull(this.uint256),v:e.allowNull(c),creates:e.allowNull(r,null),raw:e.allowNull(a)},n.transactionRequest={from:e.allowNull(r),nonce:e.allowNull(c),gasLimit:e.allowNull(i),gasPrice:e.allowNull(i),maxPriorityFeePerGas:e.allowNull(i),maxFeePerGas:e.allowNull(i),to:e.allowNull(r),value:e.allowNull(i),data:e.allowNull((function(e){return t.data(e,!0)})),type:e.allowNull(c),accessList:e.allowNull(this.accessList.bind(this),null)},n.receiptLog={transactionIndex:c,blockNumber:c,transactionHash:s,address:r,topics:e.arrayOf(s),data:a,logIndex:c,blockHash:s},n.receipt={to:e.allowNull(this.address,null),from:e.allowNull(this.address,null),contractAddress:e.allowNull(r,null),transactionIndex:c,root:e.allowNull(u),gasUsed:i,logsBloom:e.allowNull(a),blockHash:s,transactionHash:s,logs:e.arrayOf(this.receiptLog.bind(this)),blockNumber:c,confirmations:e.allowNull(c,null),cumulativeGasUsed:i,effectiveGasPrice:e.allowNull(i),status:e.allowNull(c),type:l},n.block={hash:e.allowNull(s),parentHash:s,number:c,timestamp:c,nonce:e.allowNull(u),difficulty:this.difficulty.bind(this),gasLimit:i,gasUsed:i,miner:e.allowNull(r),extraData:a,transactions:e.allowNull(e.arrayOf(s)),baseFeePerGas:e.allowNull(i)},n.blockWithTransactions=L(n.block),n.blockWithTransactions.transactions=e.allowNull(e.arrayOf(this.transactionResponse.bind(this))),n.filter={fromBlock:e.allowNull(o,void 0),toBlock:e.allowNull(o,void 0),blockHash:e.allowNull(s,void 0),address:e.allowNull(r,void 0),topics:e.allowNull(this.topics.bind(this),void 0)},n.filterLog={blockNumber:e.allowNull(c),blockHash:e.allowNull(s),transactionIndex:c,removed:e.allowNull(this.boolean.bind(this)),address:r,data:e.allowFalsish(a,"0x"),topics:e.arrayOf(s),transactionHash:s,logIndex:c},n}},{key:"accessList",value:function(e){return hn(e||[])}},{key:"number",value:function(e){return"0x"===e?0:B.from(e).toNumber()}},{key:"type",value:function(e){return"0x"===e||null==e?0:B.from(e).toNumber()}},{key:"bigNumber",value:function(e){return B.from(e)}},{key:"boolean",value:function(e){if("boolean"===typeof e)return e;if("string"===typeof e){if("true"===(e=e.toLowerCase()))return!0;if("false"===e)return!1}throw new Error("invalid boolean - "+e)}},{key:"hex",value:function(e,t){return"string"===typeof e&&(t||"0x"===e.substring(0,2)||(e="0x"+e),Object(y.l)(e))?e.toLowerCase():ko.throwArgumentError("invalid hash","value",e)}},{key:"data",value:function(e,t){var n=this.hex(e,t);if(n.length%2!==0)throw new Error("invalid data; odd-length - "+e);return n}},{key:"address",value:function(e){return me(e)}},{key:"callAddress",value:function(e){if(!Object(y.l)(e,32))return null;var t=me(Object(y.e)(e,12));return t===Ii?null:t}},{key:"contractAddress",value:function(e){return be(e)}},{key:"blockTag",value:function(e){if(null==e)return"latest";if("earliest"===e)return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if("number"===typeof e||Object(y.l)(e))return Object(y.g)(e);throw new Error("invalid blockTag")}},{key:"hash",value:function(e,t){var n=this.hex(e,t);return 32!==Object(y.d)(n)?ko.throwArgumentError("invalid hash","value",e):n}},{key:"difficulty",value:function(e){if(null==e)return null;var t=B.from(e);try{return t.toNumber()}catch(n){}return null}},{key:"uint256",value:function(e){if(!Object(y.l)(e))throw new Error("invalid uint256");return Object(y.h)(e,32)}},{key:"_block",value:function(t,n){null!=t.author&&null==t.miner&&(t.miner=t.author);var r=null!=t._difficulty?t._difficulty:t.difficulty,i=e.check(n,t);return i._difficulty=null==r?null:B.from(r),i}},{key:"block",value:function(e){return this._block(e,this.formats.block)}},{key:"blockWithTransactions",value:function(e){return this._block(e,this.formats.blockWithTransactions)}},{key:"transactionRequest",value:function(t){return e.check(this.formats.transactionRequest,t)}},{key:"transactionResponse",value:function(t){null!=t.gas&&null==t.gasLimit&&(t.gasLimit=t.gas),t.to&&B.from(t.to).isZero()&&(t.to="0x0000000000000000000000000000000000000000"),null!=t.input&&null==t.data&&(t.data=t.input),null==t.to&&null==t.creates&&(t.creates=this.contractAddress(t)),1!==t.type&&2!==t.type||null!=t.accessList||(t.accessList=[]);var n=e.check(this.formats.transaction,t);if(null!=t.chainId){var r=t.chainId;Object(y.l)(r)&&(r=B.from(r).toNumber()),n.chainId=r}else{var i=t.networkId;null==i&&null==n.v&&(i=t.chainId),Object(y.l)(i)&&(i=B.from(i).toNumber()),"number"!==typeof i&&null!=n.v&&((i=(n.v-35)/2)<0&&(i=0),i=parseInt(i)),"number"!==typeof i&&(i=0),n.chainId=i}return n.blockHash&&"x"===n.blockHash.replace(/0/g,"")&&(n.blockHash=null),n}},{key:"transaction",value:function(e){return yn(e)}},{key:"receiptLog",value:function(t){return e.check(this.formats.receiptLog,t)}},{key:"receipt",value:function(t){var n=e.check(this.formats.receipt,t);if(null!=n.root)if(n.root.length<=4){var r=B.from(n.root).toNumber();0===r||1===r?(null!=n.status&&n.status!==r&&ko.throwArgumentError("alt-root-status/status mismatch","value",{root:n.root,status:n.status}),n.status=r,delete n.root):ko.throwArgumentError("invalid alt-root-status","value.root",n.root)}else 66!==n.root.length&&ko.throwArgumentError("invalid root hash","value.root",n.root);return null!=n.status&&(n.byzantium=!0),n}},{key:"topics",value:function(e){var t=this;return Array.isArray(e)?e.map((function(e){return t.topics(e)})):null!=e?this.hash(e,!0):null}},{key:"filter",value:function(t){return e.check(this.formats.filter,t)}},{key:"filterLog",value:function(t){return e.check(this.formats.filterLog,t)}}],[{key:"check",value:function(e,t){var n={};for(var r in e)try{var i=e[r](t[r]);void 0!==i&&(n[r]=i)}catch(o){throw o.checkKey=r,o.checkValue=t[r],o}return n}},{key:"allowNull",value:function(e,t){return function(n){return null==n?t:e(n)}}},{key:"allowFalsish",value:function(e,t){return function(n){return n?e(n):t}}},{key:"arrayOf",value:function(e){return function(t){if(!Array.isArray(t))throw new Error("not an array");var n=[];return t.forEach((function(t){n.push(e(t))})),n}}}]),e}();function Co(e){return e&&"function"===typeof e.isCommunityResource}function So(e){return Co(e)&&e.isCommunityResource()}var xo=!1;function Bo(){xo||(xo=!0,console.log("========= NOTICE ========="),console.log("Request-Rate Exceeded (this message will not be repeated)"),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.io/api-keys/"),console.log("=========================="))}var Oo=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(t){o(t)}}function s(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Mo=new _.b(Eo);function Po(e){return null==e?"null":(32!==Object(y.d)(e)&&Mo.throwArgumentError("invalid topic","topic",e),e.toLowerCase())}function Ro(e){for(e=e.slice();e.length>0&&null==e[e.length-1];)e.pop();return e.map((function(e){if(Array.isArray(e)){var t={};e.forEach((function(e){t[Po(e)]=!0}));var n=Object.keys(t);return n.sort(),n.join("|")}return Po(e)})).join("&")}function No(e){if("string"===typeof e){if(e=e.toLowerCase(),32===Object(y.d)(e))return"tx:"+e;if(-1===e.indexOf(":"))return e}else{if(Array.isArray(e))return"filter:*:"+Ro(e);if(Ft.isForkEvent(e))throw Mo.warn("not implemented"),new Error("not implemented");if(e&&"object"===typeof e)return"filter:"+(e.address||"*")+":"+Ro(e.topics||[])}throw new Error("invalid event - "+e)}function To(){return(new Date).getTime()}function Qo(e){return new Promise((function(t){setTimeout(t,e)}))}var Do=["block","network","pending","poll"],jo=function(){function e(t,n,r){Object(v.a)(this,e),Q(this,"tag",t),Q(this,"listener",n),Q(this,"once",r),this._lastBlockNumber=-2,this._inflight=!1}return Object(m.a)(e,[{key:"event",get:function(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}},{key:"type",get:function(){return this.tag.split(":")[0]}},{key:"hash",get:function(){var e=this.tag.split(":");return"tx"!==e[0]?null:e[1]}},{key:"filter",get:function(){var e=this.tag.split(":");if("filter"!==e[0])return null;var t,n=e[1],r=""===(t=e[2])?[]:t.split(/&/g).map((function(e){if(""===e)return[];var t=e.split("|").map((function(e){return"null"===e?null:e}));return 1===t.length?t[0]:t})),i={};return r.length>0&&(i.topics=r),n&&"*"!==n&&(i.address=n),i}},{key:"pollable",value:function(){return this.tag.indexOf(":")>=0||Do.indexOf(this.tag)>=0}}]),e}(),Uo={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function Lo(e){return Object(y.h)(B.from(e).toHexString(),32)}function Fo(e){return vr.encode(Object(y.b)([e,Object(y.e)(wr(wr(e)),0,4)]))}var Ho=new RegExp("^(ipfs)://(.*)$","i"),Jo=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),Ho,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function qo(e,t){try{return Pe(Go(e,t))}catch(n){}return null}function Go(e,t){if("0x"===e)return null;var n=B.from(Object(y.e)(e,t,t+32)).toNumber(),r=B.from(Object(y.e)(e,n,n+32)).toNumber();return Object(y.e)(e,n+32,n+32+r)}function zo(e){return e.match(/^ipfs:\/\/ipfs\//i)?e=e.substring(12):e.match(/^ipfs:\/\//i)?e=e.substring(7):Mo.throwArgumentError("unsupported IPFS format","link",e),"https://gateway.ipfs.io/ipfs/".concat(e)}function Vo(e){var t=Object(y.a)(e);if(t.length>32)throw new Error("internal; should not happen");var n=new Uint8Array(32);return n.set(t,32-t.length),n}function Wo(e){if(e.length%32===0)return e;var t=new Uint8Array(32*Math.ceil(e.length/32));return t.set(e),t}function Ko(e){for(var t=[],n=0,r=0;r=1&&o<=75)return Fo(Object(y.b)([[n.p2pkh],"0x"+i[2]]))}}if(null!=n.p2sh){var a=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(a){var s=parseInt(a[1],16);if(a[2].length===2*s&&s>=1&&s<=75)return Fo(Object(y.b)([[n.p2sh],"0x"+a[2]]))}}if(null!=n.prefix){var u=r[1],c=r[0];if(0===c?20!==u&&32!==u&&(c=-1):c=-1,c>=0&&r.length===2+u&&u>=1&&u<=75){var l=_o.a.toWords(r.slice(2));return l.unshift(c),_o.a.encode(n.prefix,l)}}return null}},{key:"getAddress",value:function(e){return Oo(this,void 0,void 0,Object(A.a)().mark((function t(){var n,r,i;return Object(A.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null==e&&(e=60),60!==e){t.next=16;break}return t.prev=2,t.next=5,this._fetch("0x3b3b57de");case 5:if("0x"!==(n=t.sent)&&n!==Ci){t.next=8;break}return t.abrupt("return",null);case 8:return t.abrupt("return",this.provider.formatter.callAddress(n));case 11:if(t.prev=11,t.t0=t.catch(2),t.t0.code!==_.b.errors.CALL_EXCEPTION){t.next=15;break}return t.abrupt("return",null);case 15:throw t.t0;case 16:return t.next=18,this._fetchBytes("0xf1cb7e06",Lo(e));case 18:if(null!=(r=t.sent)&&"0x"!==r){t.next=21;break}return t.abrupt("return",null);case 21:return null==(i=this._getAddress(e,r))&&Mo.throwError("invalid or unsupported coin data",_.b.errors.UNSUPPORTED_OPERATION,{operation:"getAddress(".concat(e,")"),coinType:e,data:r}),t.abrupt("return",i);case 24:case"end":return t.stop()}}),t,this,[[2,11]])})))}},{key:"getAvatar",value:function(){return Oo(this,void 0,void 0,Object(A.a)().mark((function e(){var t,n,r,i,o,a,s,u,c,l,f,d,h,p,g,v;return Object(A.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=[{type:"name",content:this.name}],e.prev=1,e.next=4,this.getText("avatar");case 4:if(null!=(n=e.sent)){e.next=7;break}return e.abrupt("return",null);case 7:r=0;case 8:if(!(r=0?null:JSON.stringify({data:o,sender:i}),r.next=12,yo({url:c,errorPassThrough:!0},l,(function(e,t){return e.status=t.statusCode,e}));case 12:if(!(f=r.sent).data){r.next=15;break}return r.abrupt("return",f.data);case 15:if(d=f.message||"unknown error",!(f.status>=400&&f.status<500)){r.next=18;break}return r.abrupt("return",Mo.throwError("response not found during CCIP fetch: ".concat(d),_.b.errors.SERVER_ERROR,{url:u,errorMessage:d}));case 18:a.push(d);case 19:s++,r.next=6;break;case 22:return r.abrupt("return",Mo.throwError("error encountered during CCIP fetch: ".concat(a.map((function(e){return JSON.stringify(e)})).join(", ")),_.b.errors.SERVER_ERROR,{urls:n,errorMessages:a}));case 23:case"end":return r.stop()}}),r,this)})))}},{key:"_getInternalBlockNumber",value:function(e){return Oo(this,void 0,void 0,Object(A.a)().mark((function t(){var n,r,i,o,a=this;return Object(A.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._ready();case 2:if(!(e>0)){t.next=20;break}case 3:if(!this._internalBlockNumber){t.next=20;break}return n=this._internalBlockNumber,t.prev=5,t.next=8,n;case 8:if(r=t.sent,!(To()-r.respTime<=e)){t.next=11;break}return t.abrupt("return",r.blockNumber);case 11:return t.abrupt("break",20);case 14:if(t.prev=14,t.t0=t.catch(5),this._internalBlockNumber!==n){t.next=18;break}return t.abrupt("break",20);case 18:t.next=3;break;case 20:return i=To(),o=j({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then((function(e){return null}),(function(e){return e}))}).then((function(e){var t=e.blockNumber,n=e.networkError;if(n)throw a._internalBlockNumber===o&&(a._internalBlockNumber=null),n;var r=To();return(t=B.from(t).toNumber())1e3)Mo.warn("network block skew detected; skipping block events (emitted=".concat(this._emitted.block," blockNumber").concat(r,")")),this.emit("error",Mo.makeError("network block skew detected",_.b.errors.NETWORK_ERROR,{blockNumber:r,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",r);else for(i=this._emitted.block+1;i<=r;i++)this.emit("block",i);return this._emitted.block!==r&&(this._emitted.block=r,Object.keys(this._emitted).forEach((function(e){if("block"!==e){var t=o._emitted[e];"pending"!==t&&r-t>12&&delete o._emitted[e]}}))),-2===this._lastBlockNumber&&(this._lastBlockNumber=r-1),this._events.forEach((function(e){switch(e.type){case"tx":var t=e.hash,i=o.getTransactionReceipt(t).then((function(e){return e&&null!=e.blockNumber?(o._emitted["t:"+t]=e.blockNumber,o.emit(t,e),null):null})).catch((function(e){o.emit("error",e)}));n.push(i);break;case"filter":if(!e._inflight){e._inflight=!0,-2===e._lastBlockNumber&&(e._lastBlockNumber=r-1);var a=e.filter;a.fromBlock=e._lastBlockNumber+1,a.toBlock=r;var s=a.toBlock-o._maxFilterBlockRange;s>a.fromBlock&&(a.fromBlock=s),a.fromBlock<0&&(a.fromBlock=0);var u=o.getLogs(a).then((function(t){e._inflight=!1,0!==t.length&&t.forEach((function(t){t.blockNumber>e._lastBlockNumber&&(e._lastBlockNumber=t.blockNumber),o._emitted["b:"+t.blockHash]=t.blockNumber,o._emitted["t:"+t.transactionHash]=t.blockNumber,o.emit(a,t)}))})).catch((function(t){o.emit("error",t),e._inflight=!1}));n.push(u)}}})),this._lastBlockNumber=r,Promise.all(n).then((function(){o.emit("didPoll",t)})).catch((function(e){o.emit("error",e)})),e.abrupt("return");case 26:case"end":return e.stop()}}),e,this,[[3,9]])})))}},{key:"resetEventsBlock",value:function(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}},{key:"network",get:function(){return this._network}},{key:"detectNetwork",value:function(){return Oo(this,void 0,void 0,Object(A.a)().mark((function e(){return Object(A.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Mo.throwError("provider does not support network detection",_.b.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"}));case 1:case"end":return e.stop()}}),e)})))}},{key:"getNetwork",value:function(){return Oo(this,void 0,void 0,Object(A.a)().mark((function e(){var t,n,r;return Object(A.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._ready();case 2:return t=e.sent,e.next=5,this.detectNetwork();case 5:if(n=e.sent,t.chainId===n.chainId){e.next=23;break}if(!this.anyNetwork){e.next=20;break}return this._network=n,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",n,t),e.next=19,Qo(0);case 19:return e.abrupt("return",this._network);case 20:throw r=Mo.makeError("underlying network changed",_.b.errors.NETWORK_ERROR,{event:"changed",network:t,detectedNetwork:n}),this.emit("error",r),r;case 23:return e.abrupt("return",t);case 24:case"end":return e.stop()}}),e,this)})))}},{key:"blockNumber",get:function(){var e=this;return this._getInternalBlockNumber(100+this.pollingInterval/2).then((function(t){e._setFastBlockNumber(t)}),(function(e){})),null!=this._fastBlockNumber?this._fastBlockNumber:-1}},{key:"polling",get:function(){return null!=this._poller},set:function(e){var t=this;e&&!this._poller?(this._poller=setInterval((function(){t.poll()}),this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout((function(){t.poll(),t._bootstrapPoll=setTimeout((function(){t._poller||t.poll(),t._bootstrapPoll=null}),t.pollingInterval)}),0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}},{key:"pollingInterval",get:function(){return this._pollingInterval},set:function(e){var t=this;if("number"!==typeof e||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval((function(){t.poll()}),this._pollingInterval))}},{key:"_getFastBlockNumber",value:function(){var e=this,t=To();return t-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=t,this._fastBlockNumberPromise=this.getBlockNumber().then((function(t){return(null==e._fastBlockNumber||t>e._fastBlockNumber)&&(e._fastBlockNumber=t),e._fastBlockNumber}))),this._fastBlockNumberPromise}},{key:"_setFastBlockNumber",value:function(e){null!=this._fastBlockNumber&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}},{key:"waitForTransaction",value:function(e,t,n){return Oo(this,void 0,void 0,Object(A.a)().mark((function r(){return Object(A.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",this._waitForTransaction(e,null==t?1:t,n||0,null));case 1:case"end":return r.stop()}}),r,this)})))}},{key:"_waitForTransaction",value:function(e,t,n,r){return Oo(this,void 0,void 0,Object(A.a)().mark((function i(){var o,a=this;return Object(A.a)().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,this.getTransactionReceipt(e);case 2:if(!(((o=i.sent)?o.confirmations:0)>=t)){i.next=5;break}return i.abrupt("return",o);case 5:return i.abrupt("return",new Promise((function(i,o){var s=[],u=!1,c=function(){return!!u||(u=!0,s.forEach((function(e){e()})),!1)},l=function(e){e.confirmations0){var p=setTimeout((function(){c()||o(Mo.makeError("timeout exceeded",_.b.errors.TIMEOUT,{timeout:n}))}),n);p.unref&&p.unref(),s.push((function(){clearTimeout(p)}))}})));case 6:case"end":return i.stop()}}),i,this)})))}},{key:"getBlockNumber",value:function(){return Oo(this,void 0,void 0,Object(A.a)().mark((function e(){return Object(A.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this._getInternalBlockNumber(0));case 1:case"end":return e.stop()}}),e,this)})))}},{key:"getGasPrice",value:function(){return Oo(this,void 0,void 0,Object(A.a)().mark((function e(){var t;return Object(A.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getNetwork();case 2:return e.next=4,this.perform("getGasPrice",{});case 4:return t=e.sent,e.prev=5,e.abrupt("return",B.from(t));case 9:return e.prev=9,e.t0=e.catch(5),e.abrupt("return",Mo.throwError("bad result from backend",_.b.errors.SERVER_ERROR,{method:"getGasPrice",result:t,error:e.t0}));case 12:case"end":return e.stop()}}),e,this,[[5,9]])})))}},{key:"getBalance",value:function(e,t){return Oo(this,void 0,void 0,Object(A.a)().mark((function n(){var r,i;return Object(A.a)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.getNetwork();case 2:return n.next=4,j({address:this._getAddress(e),blockTag:this._getBlockTag(t)});case 4:return r=n.sent,n.next=7,this.perform("getBalance",r);case 7:return i=n.sent,n.prev=8,n.abrupt("return",B.from(i));case 12:return n.prev=12,n.t0=n.catch(8),n.abrupt("return",Mo.throwError("bad result from backend",_.b.errors.SERVER_ERROR,{method:"getBalance",params:r,result:i,error:n.t0}));case 15:case"end":return n.stop()}}),n,this,[[8,12]])})))}},{key:"getTransactionCount",value:function(e,t){return Oo(this,void 0,void 0,Object(A.a)().mark((function n(){var r,i;return Object(A.a)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.getNetwork();case 2:return n.next=4,j({address:this._getAddress(e),blockTag:this._getBlockTag(t)});case 4:return r=n.sent,n.next=7,this.perform("getTransactionCount",r);case 7:return i=n.sent,n.prev=8,n.abrupt("return",B.from(i).toNumber());case 12:return n.prev=12,n.t0=n.catch(8),n.abrupt("return",Mo.throwError("bad result from backend",_.b.errors.SERVER_ERROR,{method:"getTransactionCount",params:r,result:i,error:n.t0}));case 15:case"end":return n.stop()}}),n,this,[[8,12]])})))}},{key:"getCode",value:function(e,t){return Oo(this,void 0,void 0,Object(A.a)().mark((function n(){var r,i;return Object(A.a)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.getNetwork();case 2:return n.next=4,j({address:this._getAddress(e),blockTag:this._getBlockTag(t)});case 4:return r=n.sent,n.next=7,this.perform("getCode",r);case 7:return i=n.sent,n.prev=8,n.abrupt("return",Object(y.i)(i));case 12:return n.prev=12,n.t0=n.catch(8),n.abrupt("return",Mo.throwError("bad result from backend",_.b.errors.SERVER_ERROR,{method:"getCode",params:r,result:i,error:n.t0}));case 15:case"end":return n.stop()}}),n,this,[[8,12]])})))}},{key:"getStorageAt",value:function(e,t,n){return Oo(this,void 0,void 0,Object(A.a)().mark((function r(){var i,o;return Object(A.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.getNetwork();case 2:return r.next=4,j({address:this._getAddress(e),blockTag:this._getBlockTag(n),position:Promise.resolve(t).then((function(e){return Object(y.g)(e)}))});case 4:return i=r.sent,r.next=7,this.perform("getStorageAt",i);case 7:return o=r.sent,r.prev=8,r.abrupt("return",Object(y.i)(o));case 12:return r.prev=12,r.t0=r.catch(8),r.abrupt("return",Mo.throwError("bad result from backend",_.b.errors.SERVER_ERROR,{method:"getStorageAt",params:i,result:o,error:r.t0}));case 15:case"end":return r.stop()}}),r,this,[[8,12]])})))}},{key:"_wrapTransaction",value:function(e,t,n){var r=this;if(null!=t&&32!==Object(y.d)(t))throw new Error("invalid response - sendTransaction");var i=e;return null!=t&&e.hash!==t&&Mo.throwError("Transaction hash mismatch from Provider.sendTransaction.",_.b.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),i.wait=function(t,i){return Oo(r,void 0,void 0,Object(A.a)().mark((function r(){var o,a;return Object(A.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return null==t&&(t=1),null==i&&(i=0),o=void 0,0!==t&&null!=n&&(o={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:n}),r.next=6,this._waitForTransaction(e.hash,t,i,o);case 6:if(null!=(a=r.sent)||0!==t){r.next=9;break}return r.abrupt("return",null);case 9:return this._emitted["t:"+e.hash]=a.blockNumber,0===a.status&&Mo.throwError("transaction failed",_.b.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:a}),r.abrupt("return",a);case 12:case"end":return r.stop()}}),r,this)})))},i}},{key:"sendTransaction",value:function(e){return Oo(this,void 0,void 0,Object(A.a)().mark((function t(){var n,r,i,o;return Object(A.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getNetwork();case 2:return t.next=4,Promise.resolve(e).then((function(e){return Object(y.i)(e)}));case 4:return n=t.sent,null==(r=this.formatter.transaction(e)).confirmations&&(r.confirmations=0),t.next=9,this._getInternalBlockNumber(100+2*this.pollingInterval);case 9:return i=t.sent,t.prev=10,t.next=13,this.perform("sendTransaction",{signedTransaction:n});case 13:return o=t.sent,t.abrupt("return",this._wrapTransaction(r,o,i));case 17:throw t.prev=17,t.t0=t.catch(10),t.t0.transaction=r,t.t0.transactionHash=r.hash,t.t0;case 22:case"end":return t.stop()}}),t,this,[[10,17]])})))}},{key:"_getTransactionRequest",value:function(e){return Oo(this,void 0,void 0,Object(A.a)().mark((function t(){var n,r,i=this;return Object(A.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e;case 2:return n=t.sent,r={},["from","to"].forEach((function(e){null!=n[e]&&(r[e]=Promise.resolve(n[e]).then((function(e){return e?i._getAddress(e):null})))})),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach((function(e){null!=n[e]&&(r[e]=Promise.resolve(n[e]).then((function(e){return e?B.from(e):null})))})),["type"].forEach((function(e){null!=n[e]&&(r[e]=Promise.resolve(n[e]).then((function(e){return null!=e?e:null})))})),n.accessList&&(r.accessList=this.formatter.accessList(n.accessList)),["data"].forEach((function(e){null!=n[e]&&(r[e]=Promise.resolve(n[e]).then((function(e){return e?Object(y.i)(e):null})))})),t.t0=this.formatter,t.next=12,j(r);case 12:return t.t1=t.sent,t.abrupt("return",t.t0.transactionRequest.call(t.t0,t.t1));case 14:case"end":return t.stop()}}),t,this)})))}},{key:"_getFilter",value:function(e){return Oo(this,void 0,void 0,Object(A.a)().mark((function t(){var n,r=this;return Object(A.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e;case 2:return e=t.sent,n={},null!=e.address&&(n.address=this._getAddress(e.address)),["blockHash","topics"].forEach((function(t){null!=e[t]&&(n[t]=e[t])})),["fromBlock","toBlock"].forEach((function(t){null!=e[t]&&(n[t]=r._getBlockTag(e[t]))})),t.t0=this.formatter,t.next=10,j(n);case 10:return t.t1=t.sent,t.abrupt("return",t.t0.filter.call(t.t0,t.t1));case 12:case"end":return t.stop()}}),t,this)})))}},{key:"_call",value:function(e,t,n){return Oo(this,void 0,void 0,Object(A.a)().mark((function r(){var i,o,a,s,u,c,l,f,d,h,p,g,v,m,b;return Object(A.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n>=10&&Mo.throwError("CCIP read exceeded maximum redirections",_.b.errors.SERVER_ERROR,{redirects:n,transaction:e}),i=e.to,r.next=4,this.perform("call",{transaction:e,blockTag:t});case 4:if(o=r.sent,!(n>=0&&"latest"===t&&null!=i&&"0x556f1830"===o.substring(0,10)&&Object(y.d)(o)%32===4)){r.next=31;break}for(r.prev=6,a=Object(y.e)(o,4),s=Object(y.e)(a,0,32),B.from(s).eq(i)||Mo.throwError("CCIP Read sender did not match",_.b.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:o}),u=[],c=B.from(Object(y.e)(a,32,64)).toNumber(),l=B.from(Object(y.e)(a,c,c+32)).toNumber(),f=Object(y.e)(a,c+32),d=0;dthis._emitted.block)){e.next=10;break}return e.abrupt("return",null);case 10:return e.abrupt("return",void 0);case 11:if(!t){e.next=34;break}o=null,a=0;case 14:if(!(a0}},{key:"_stopEvent",value:function(e){this.polling=this._events.filter((function(e){return e.pollable()})).length>0}},{key:"_addEventListener",value:function(e,t,n){var r=new jo(No(e),t,n);return this._events.push(r),this._startEvent(r),this}},{key:"on",value:function(e,t){return this._addEventListener(e,t,!1)}},{key:"once",value:function(e,t){return this._addEventListener(e,t,!0)}},{key:"emit",value:function(e){for(var t=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i=0&&a.match(/gas required exceeds allowance|always failing transaction|execution reverted/)&&na.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",_.b.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,method:e,transaction:r}),t}function aa(e){return new Promise((function(t){setTimeout(t,e)}))}function sa(e){if(e.error){var t=new Error(e.error.message);throw t.code=e.error.code,t.data=e.error.data,t}return e.result}function ua(e){return e?e.toLowerCase():e}var ca={},la=function(e){Object(p.a)(n,e);var t=Object(g.a)(n);function n(e,r,i){var o;if(Object(v.a)(this,n),o=t.call(this),e!==ca)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");return Q(Object(l.a)(o),"provider",r),null==i&&(i=0),"string"===typeof i?(Q(Object(l.a)(o),"_address",o.provider.formatter.address(i)),Q(Object(l.a)(o),"_index",null)):"number"===typeof i?(Q(Object(l.a)(o),"_index",i),Q(Object(l.a)(o),"_address",null)):na.throwArgumentError("invalid address or index","addressOrIndex",i),o}return Object(m.a)(n,[{key:"connect",value:function(e){return na.throwError("cannot alter JSON-RPC Signer connection",_.b.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}},{key:"connectUnchecked",value:function(){return new fa(ca,this.provider,this._address||this._index)}},{key:"getAddress",value:function(){var e=this;return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then((function(t){return t.length<=e._index&&na.throwError("unknown account #"+e._index,_.b.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),e.provider.formatter.address(t[e._index])}))}},{key:"sendUncheckedTransaction",value:function(e){var t=this;e=L(e);var n=this.getAddress().then((function(e){return e&&(e=e.toLowerCase()),e}));if(null==e.gasLimit){var r=L(e);r.from=n,e.gasLimit=this.provider.estimateGas(r)}return null!=e.to&&(e.to=Promise.resolve(e.to).then((function(e){return ta(t,void 0,void 0,Object(A.a)().mark((function t(){var n;return Object(A.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null!=e){t.next=2;break}return t.abrupt("return",null);case 2:return t.next=4,this.provider.resolveName(e);case 4:return null==(n=t.sent)&&na.throwArgumentError("provided ENS name resolves to null","tx.to",e),t.abrupt("return",n);case 7:case"end":return t.stop()}}),t,this)})))}))),j({tx:j(e),sender:n}).then((function(n){var r=n.tx,i=n.sender;null!=r.from?r.from.toLowerCase()!==i&&na.throwArgumentError("from address mismatch","transaction",e):r.from=i;var o=t.provider.constructor.hexlifyTransaction(r,{from:!0});return t.provider.send("eth_sendTransaction",[o]).then((function(e){return e}),(function(e){return"string"===typeof e.message&&e.message.match(/user denied/i)&&na.throwError("user rejected transaction",_.b.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:r}),oa("sendTransaction",e,o)}))}))}},{key:"signTransaction",value:function(e){return na.throwError("signing transactions is unsupported",_.b.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}},{key:"sendTransaction",value:function(e){return ta(this,void 0,void 0,Object(A.a)().mark((function t(){var n,r,i=this;return Object(A.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval);case 2:return n=t.sent,t.next=5,this.sendUncheckedTransaction(e);case 5:return r=t.sent,t.prev=6,t.next=9,bo((function(){return ta(i,void 0,void 0,Object(A.a)().mark((function e(){var t;return Object(A.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.provider.getTransaction(r);case 2:if(null!==(t=e.sent)){e.next=5;break}return e.abrupt("return",void 0);case 5:return e.abrupt("return",this.provider._wrapTransaction(t,r,n));case 6:case"end":return e.stop()}}),e,this)})))}),{oncePoll:this.provider});case 9:return t.abrupt("return",t.sent);case 12:throw t.prev=12,t.t0=t.catch(6),t.t0.transactionHash=r,t.t0;case 16:case"end":return t.stop()}}),t,this,[[6,12]])})))}},{key:"signMessage",value:function(e){return ta(this,void 0,void 0,Object(A.a)().mark((function t(){var n,r;return Object(A.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n="string"===typeof e?xe(e):e,t.next=3,this.getAddress();case 3:return r=t.sent,t.prev=4,t.next=7,this.provider.send("personal_sign",[Object(y.i)(n),r.toLowerCase()]);case 7:return t.abrupt("return",t.sent);case 10:throw t.prev=10,t.t0=t.catch(4),"string"===typeof t.t0.message&&t.t0.message.match(/user denied/i)&&na.throwError("user rejected signing",_.b.errors.ACTION_REJECTED,{action:"signMessage",from:r,message:n}),t.t0;case 14:case"end":return t.stop()}}),t,this,[[4,10]])})))}},{key:"_legacySignMessage",value:function(e){return ta(this,void 0,void 0,Object(A.a)().mark((function t(){var n,r;return Object(A.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n="string"===typeof e?xe(e):e,t.next=3,this.getAddress();case 3:return r=t.sent,t.prev=4,t.next=7,this.provider.send("eth_sign",[r.toLowerCase(),Object(y.i)(n)]);case 7:return t.abrupt("return",t.sent);case 10:throw t.prev=10,t.t0=t.catch(4),"string"===typeof t.t0.message&&t.t0.message.match(/user denied/i)&&na.throwError("user rejected signing",_.b.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:r,message:n}),t.t0;case 14:case"end":return t.stop()}}),t,this,[[4,10]])})))}},{key:"_signTypedData",value:function(e,t,n){return ta(this,void 0,void 0,Object(A.a)().mark((function r(){var i,o,a=this;return Object(A.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,pr.resolveNames(e,t,n,(function(e){return a.provider.resolveName(e)}));case 2:return i=r.sent,r.next=5,this.getAddress();case 5:return o=r.sent,r.prev=6,r.next=9,this.provider.send("eth_signTypedData_v4",[o.toLowerCase(),JSON.stringify(pr.getPayload(i.domain,t,i.value))]);case 9:return r.abrupt("return",r.sent);case 12:throw r.prev=12,r.t0=r.catch(6),"string"===typeof r.t0.message&&r.t0.message.match(/user denied/i)&&na.throwError("user rejected signing",_.b.errors.ACTION_REJECTED,{action:"_signTypedData",from:o,message:{domain:i.domain,types:t,value:i.value}}),r.t0;case 16:case"end":return r.stop()}}),r,this,[[6,12]])})))}},{key:"unlock",value:function(e){return ta(this,void 0,void 0,Object(A.a)().mark((function t(){var n,r;return Object(A.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.provider,t.next=3,this.getAddress();case 3:return r=t.sent,t.abrupt("return",n.send("personal_unlockAccount",[r.toLowerCase(),e,null]));case 5:case"end":return t.stop()}}),t,this)})))}}]),n}(Vt),fa=function(e){Object(p.a)(n,e);var t=Object(g.a)(n);function n(){return Object(v.a)(this,n),t.apply(this,arguments)}return Object(m.a)(n,[{key:"sendTransaction",value:function(e){var t=this;return this.sendUncheckedTransaction(e).then((function(e){return{hash:e,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:function(n){return t.provider.waitForTransaction(e,n)}}}))}}]),n}(la),da={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0},ha=function(e){Object(p.a)(n,e);var t=Object(g.a)(n);function n(e,r){var i;Object(v.a)(this,n);var o=r;return null==o&&(o=new Promise((function(e,t){setTimeout((function(){i.detectNetwork().then((function(t){e(t)}),(function(e){t(e)}))}),0)}))),i=t.call(this,o),e||(e=D(i.constructor,"defaultUrl")()),Q(Object(l.a)(i),"connection","string"===typeof e?Object.freeze({url:e}):Object.freeze(L(e))),i._nextId=42,i}return Object(m.a)(n,[{key:"_cache",get:function(){return null==this._eventLoopCache&&(this._eventLoopCache={}),this._eventLoopCache}},{key:"detectNetwork",value:function(){var e=this;return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout((function(){e._cache.detectNetwork=null}),0)),this._cache.detectNetwork}},{key:"_uncachedDetectNetwork",value:function(){return ta(this,void 0,void 0,Object(A.a)().mark((function e(){var t,n;return Object(A.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,aa(0);case 2:return t=null,e.prev=3,e.next=6,this.send("eth_chainId",[]);case 6:t=e.sent,e.next=19;break;case 9:return e.prev=9,e.t0=e.catch(3),e.prev=11,e.next=14,this.send("net_version",[]);case 14:t=e.sent,e.next=19;break;case 17:e.prev=17,e.t1=e.catch(11);case 19:if(null==t){e.next=28;break}return n=D(this.constructor,"getNetwork"),e.prev=21,e.abrupt("return",n(B.from(t).toNumber()));case 25:return e.prev=25,e.t2=e.catch(21),e.abrupt("return",na.throwError("could not detect network",_.b.errors.NETWORK_ERROR,{chainId:t,event:"invalidNetwork",serverError:e.t2}));case 28:return e.abrupt("return",na.throwError("could not detect network",_.b.errors.NETWORK_ERROR,{event:"noNetwork"}));case 29:case"end":return e.stop()}}),e,this,[[3,9],[11,17],[21,25]])})))}},{key:"getSigner",value:function(e){return new la(ca,this,e)}},{key:"getUncheckedSigner",value:function(e){return this.getSigner(e).connectUnchecked()}},{key:"listAccounts",value:function(){var e=this;return this.send("eth_accounts",[]).then((function(t){return t.map((function(t){return e.formatter.address(t)}))}))}},{key:"send",value:function(e,t){var n=this,r={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:q(r),provider:this});var i=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(i&&this._cache[e])return this._cache[e];var o=yo(this.connection,JSON.stringify(r),sa).then((function(e){return n.emit("debug",{action:"response",request:r,response:e,provider:n}),e}),(function(e){throw n.emit("debug",{action:"response",error:e,request:r,provider:n}),e}));return i&&(this._cache[e]=o,setTimeout((function(){n._cache[e]=null}),0)),o}},{key:"prepareRequest",value:function(e,t){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[ua(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[ua(t.address),t.blockTag]];case"getCode":return["eth_getCode",[ua(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[ua(t.address),Object(y.h)(t.position,32),t.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[t.signedTransaction]];case"getBlock":return t.blockTag?["eth_getBlockByNumber",[t.blockTag,!!t.includeTransactions]]:t.blockHash?["eth_getBlockByHash",[t.blockHash,!!t.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[t.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[t.transactionHash]];case"call":return["eth_call",[D(this.constructor,"hexlifyTransaction")(t.transaction,{from:!0}),t.blockTag]];case"estimateGas":return["eth_estimateGas",[D(this.constructor,"hexlifyTransaction")(t.transaction,{from:!0})]];case"getLogs":return t.filter&&null!=t.filter.address&&(t.filter.address=ua(t.filter.address)),["eth_getLogs",[t.filter]]}return null}},{key:"perform",value:function(e,t){return ta(this,void 0,void 0,Object(A.a)().mark((function n(){var r,i,o;return Object(A.a)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if("call"!==e&&"estimateGas"!==e){n.next=8;break}if(!(r=t.transaction)||null==r.type||!B.from(r.type).isZero()){n.next=8;break}if(null!=r.maxFeePerGas||null!=r.maxPriorityFeePerGas){n.next=8;break}return n.next=6,this.getFeeData();case 6:null==(i=n.sent).maxFeePerGas&&null==i.maxPriorityFeePerGas&&((t=L(t)).transaction=L(r),delete t.transaction.type);case 8:return null==(o=this.prepareRequest(e,t))&&na.throwError(e+" not implemented",_.b.errors.NOT_IMPLEMENTED,{operation:e}),n.prev=10,n.next=13,this.send(o[0],o[1]);case 13:return n.abrupt("return",n.sent);case 16:return n.prev=16,n.t0=n.catch(10),n.abrupt("return",oa(e,n.t0,t));case 19:case"end":return n.stop()}}),n,this,[[10,16]])})))}},{key:"_startEvent",value:function(e){"pending"===e.tag&&this._startPending(),h(Object(f.a)(n.prototype),"_startEvent",this).call(this,e)}},{key:"_startPending",value:function(){if(null==this._pendingFilter){var e=this,t=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=t,t.then((function(n){return function r(){e.send("eth_getFilterChanges",[n]).then((function(n){if(e._pendingFilter!=t)return null;var r=Promise.resolve();return n.forEach((function(t){e._emitted["t:"+t.toLowerCase()]="pending",r=r.then((function(){return e.getTransaction(t).then((function(t){return e.emit("pending",t),null}))}))})),r.then((function(){return aa(1e3)}))})).then((function(){if(e._pendingFilter==t)return setTimeout((function(){r()}),0),null;e.send("eth_uninstallFilter",[n])})).catch((function(e){}))}(),n})).catch((function(e){}))}}},{key:"_stopEvent",value:function(e){"pending"===e.tag&&0===this.listenerCount("pending")&&(this._pendingFilter=null),h(Object(f.a)(n.prototype),"_stopEvent",this).call(this,e)}}],[{key:"defaultUrl",value:function(){return"http://localhost:8545"}},{key:"hexlifyTransaction",value:function(e,t){var n=L(da);if(t)for(var r in t)t[r]&&(n[r]=!0);U(e,n);var i={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach((function(t){if(null!=e[t]){var n=Object(y.g)(B.from(e[t]));"gasLimit"===t&&(t="gas"),i[t]=n}})),["from","to","data"].forEach((function(t){null!=e[t]&&(i[t]=Object(y.i)(e[t]))})),e.accessList&&(i.accessList=hn(e.accessList)),i}}]),n}($o),pa=null;try{if(null==(pa=WebSocket))throw new Error("inject please")}catch($s){var ga=new _.b(Eo);pa=function(){ga.throwError("WebSockets not supported in this environment",_.b.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var va=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(t){o(t)}}function s(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},ma=new _.b(Eo),Aa=1,ya=function(e){Object(p.a)(n,e);var t=Object(g.a)(n);function n(e,r){var i,o;Object(v.a)(this,n),"any"===r&&ma.throwError("WebSocketProvider does not support 'any' network yet",_.b.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),(o="string"===typeof e?t.call(this,e,r):t.call(this,"_websocket",r))._pollingInterval=-1,o._wsReady=!1,Q(Object(l.a)(o),"_websocket","string"===typeof e?new pa(o.connection.url):e),Q(Object(l.a)(o),"_requests",{}),Q(Object(l.a)(o),"_subs",{}),Q(Object(l.a)(o),"_subIds",{}),Q(Object(l.a)(o),"_detectNetwork",h((i=Object(l.a)(o),Object(f.a)(n.prototype)),"detectNetwork",i).call(i)),o.websocket.onopen=function(){o._wsReady=!0,Object.keys(o._requests).forEach((function(e){o.websocket.send(o._requests[e].payload)}))},o.websocket.onmessage=function(e){var t=e.data,n=JSON.parse(t);if(null!=n.id){var r=String(n.id),i=o._requests[r];if(delete o._requests[r],void 0!==n.result)i.callback(null,n.result),o.emit("debug",{action:"response",request:JSON.parse(i.payload),response:n.result,provider:Object(l.a)(o)});else{var a=null;n.error?(Q(a=new Error(n.error.message||"unknown error"),"code",n.error.code||null),Q(a,"response",t)):a=new Error("unknown error"),i.callback(a,void 0),o.emit("debug",{action:"response",error:a,request:JSON.parse(i.payload),provider:Object(l.a)(o)})}}else if("eth_subscription"===n.method){var s=o._subs[n.params.subscription];s&&s.processFunc(n.params.result)}else console.warn("this should not happen")};var a=setInterval((function(){o.emit("poll")}),1e3);return a.unref&&a.unref(),Object(ea.a)(o)}return Object(m.a)(n,[{key:"websocket",get:function(){return this._websocket}},{key:"detectNetwork",value:function(){return this._detectNetwork}},{key:"pollingInterval",get:function(){return 0},set:function(e){ma.throwError("cannot set polling interval on WebSocketProvider",_.b.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}},{key:"resetEventsBlock",value:function(e){ma.throwError("cannot reset events block on WebSocketProvider",_.b.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}},{key:"poll",value:function(){return va(this,void 0,void 0,Object(A.a)().mark((function e(){return Object(A.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",null);case 1:case"end":return e.stop()}}),e)})))}},{key:"polling",set:function(e){e&&ma.throwError("cannot set polling on WebSocketProvider",_.b.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}},{key:"send",value:function(e,t){var n=this,r=Aa++;return new Promise((function(i,o){var a=JSON.stringify({method:e,params:t,id:r,jsonrpc:"2.0"});n.emit("debug",{action:"request",request:JSON.parse(a),provider:n}),n._requests[String(r)]={callback:function(e,t){return e?o(e):i(t)},payload:a},n._wsReady&&n.websocket.send(a)}))}},{key:"_subscribe",value:function(e,t,n){return va(this,void 0,void 0,Object(A.a)().mark((function r(){var i,o,a=this;return Object(A.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return null==(i=this._subIds[e])&&(i=Promise.all(t).then((function(e){return a.send("eth_subscribe",e)})),this._subIds[e]=i),r.next=4,i;case 4:o=r.sent,this._subs[o]={tag:e,processFunc:n};case 6:case"end":return r.stop()}}),r,this)})))}},{key:"_startEvent",value:function(e){var t=this;switch(e.type){case"block":this._subscribe("block",["newHeads"],(function(e){var n=B.from(e.number).toNumber();t._emitted.block=n,t.emit("block",n)}));break;case"pending":this._subscribe("pending",["newPendingTransactions"],(function(e){t.emit("pending",e)}));break;case"filter":this._subscribe(e.tag,["logs",this._getFilter(e.filter)],(function(n){null==n.removed&&(n.removed=!1),t.emit(e.filter,t.formatter.filterLog(n))}));break;case"tx":var n=function(e){var n=e.hash;t.getTransactionReceipt(n).then((function(e){e&&t.emit(n,e)}))};n(e),this._subscribe("tx",["newHeads"],(function(e){t._events.filter((function(e){return"tx"===e.type})).forEach(n)}));break;case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",e)}}},{key:"_stopEvent",value:function(e){var t=this,n=e.tag;if("tx"===e.type){if(this._events.filter((function(e){return"tx"===e.type})).length)return;n="tx"}else if(this.listenerCount(e.event))return;var r=this._subIds[n];r&&(delete this._subIds[n],r.then((function(e){t._subs[e]&&(delete t._subs[e],t.send("eth_unsubscribe",[e]))})))}},{key:"destroy",value:function(){return va(this,void 0,void 0,Object(A.a)().mark((function e(){var t=this;return Object(A.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.websocket.readyState!==pa.CONNECTING){e.next=3;break}return e.next=3,new Promise((function(e){t.websocket.onopen=function(){e(!0)},t.websocket.onerror=function(){e(!1)}}));case 3:this.websocket.close(1e3);case 4:case"end":return e.stop()}}),e,this)})))}}],[{key:"defaultUrl",value:function(){return"ws://localhost:8546"}}]),n}(ha),ba=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(t){o(t)}}function s(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},wa=new _.b(Eo),_a=function(e){Object(p.a)(n,e);var t=Object(g.a)(n);function n(){return Object(v.a)(this,n),t.apply(this,arguments)}return Object(m.a)(n,[{key:"detectNetwork",value:function(){var e=this,t=Object.create(null,{detectNetwork:{get:function(){return h(Object(f.a)(n.prototype),"detectNetwork",e)}}});return ba(this,void 0,void 0,Object(A.a)().mark((function e(){var n;return Object(A.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=(n=this.network)){e.next=7;break}return e.next=4,t.detectNetwork.call(this);case 4:(n=e.sent)||wa.throwError("no network detected",_.b.errors.UNKNOWN_ERROR,{}),null==this._network&&(Q(this,"_network",n),this.emit("network",n,null));case 7:return e.abrupt("return",n);case 8:case"end":return e.stop()}}),e,this)})))}}]),n}(ha),Ea=function(e){Object(p.a)(n,e);var t=Object(g.a)(n);function n(e,r){var i;Object(v.a)(this,n),wa.checkAbstract(this instanceof n?this.constructor:void 0,n),e=D(this instanceof n?this.constructor:void 0,"getNetwork")(e),r=D(this instanceof n?this.constructor:void 0,"getApiKey")(r);var o=D(this instanceof n?this.constructor:void 0,"getUrl")(e,r);return i=t.call(this,o,e),"string"===typeof r?Q(Object(l.a)(i),"apiKey",r):null!=r&&Object.keys(r).forEach((function(e){Q(Object(l.a)(i),e,r[e])})),i}return Object(m.a)(n,[{key:"_startPending",value:function(){wa.warn("WARNING: API provider does not support pending filters")}},{key:"isCommunityResource",value:function(){return!1}},{key:"getSigner",value:function(e){return wa.throwError("API provider does not support signing",_.b.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}},{key:"listAccounts",value:function(){return Promise.resolve([])}}],[{key:"getApiKey",value:function(e){return e}},{key:"getUrl",value:function(e,t){return wa.throwError("not implemented; sub-classes must override getUrl",_.b.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}}]),n}(_a),ka=new _.b(Eo),Ia="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC",Ca=function(e){Object(p.a)(n,e);var t=Object(g.a)(n);function n(e,r){var i;Object(v.a)(this,n);var o=new Sa(e,r),a=o.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi.");return i=t.call(this,a,o.network),Q(Object(l.a)(i),"apiKey",o.apiKey),i}return Object(m.a)(n,[{key:"isCommunityResource",value:function(){return this.apiKey===Ia}}]),n}(ya),Sa=function(e){Object(p.a)(n,e);var t=Object(g.a)(n);function n(){return Object(v.a)(this,n),t.apply(this,arguments)}return Object(m.a)(n,[{key:"isCommunityResource",value:function(){return this.apiKey===Ia}}],[{key:"getWebSocketProvider",value:function(e,t){return new Ca(e,t)}},{key:"getApiKey",value:function(e){return null==e?Ia:(e&&"string"!==typeof e&&ka.throwArgumentError("invalid apiKey","apiKey",e),e)}},{key:"getUrl",value:function(e,t){var n=null;switch(e.name){case"homestead":n="eth-mainnet.alchemyapi.io/v2/";break;case"ropsten":n="eth-ropsten.alchemyapi.io/v2/";break;case"rinkeby":n="eth-rinkeby.alchemyapi.io/v2/";break;case"goerli":n="eth-goerli.alchemyapi.io/v2/";break;case"kovan":n="eth-kovan.alchemyapi.io/v2/";break;case"matic":n="polygon-mainnet.g.alchemy.com/v2/";break;case"maticmum":n="polygon-mumbai.g.alchemy.com/v2/";break;case"arbitrum":n="arb-mainnet.g.alchemy.com/v2/";break;case"arbitrum-rinkeby":n="arb-rinkeby.g.alchemy.com/v2/";break;case"arbitrum-goerli":n="arb-goerli.g.alchemy.com/v2/";break;case"optimism":n="opt-mainnet.g.alchemy.com/v2/";break;case"optimism-kovan":n="opt-kovan.g.alchemy.com/v2/";break;case"optimism-goerli":n="opt-goerli.g.alchemy.com/v2/";break;default:ka.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+n+t,throttleCallback:function(e,n){return t===Ia&&Bo(),Promise.resolve(!0)}}}}]),n}(Ea),xa=new _.b(Eo),Ba="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function Oa(e){switch(e){case"homestead":return"rpc.ankr.com/eth/";case"ropsten":return"rpc.ankr.com/eth_ropsten/";case"rinkeby":return"rpc.ankr.com/eth_rinkeby/";case"goerli":return"rpc.ankr.com/eth_goerli/";case"matic":return"rpc.ankr.com/polygon/";case"arbitrum":return"rpc.ankr.com/arbitrum/"}return xa.throwArgumentError("unsupported network","name",e)}var Ma=function(e){Object(p.a)(n,e);var t=Object(g.a)(n);function n(){return Object(v.a)(this,n),t.apply(this,arguments)}return Object(m.a)(n,[{key:"isCommunityResource",value:function(){return this.apiKey===Ba}}],[{key:"getApiKey",value:function(e){return null==e?Ba:e}},{key:"getUrl",value:function(e,t){null==t&&(t=Ba);var n={allowGzip:!0,url:"https://"+Oa(e.name)+t,throttleCallback:function(e,n){return t.apiKey===Ba&&Bo(),Promise.resolve(!0)}};return null!=t.projectSecret&&(n.user="",n.password=t.projectSecret),n}}]),n}(Ea),Pa=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(t){o(t)}}function s(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Ra=new _.b(Eo),Na=function(e){Object(p.a)(n,e);var t=Object(g.a)(n);function n(){return Object(v.a)(this,n),t.apply(this,arguments)}return Object(m.a)(n,[{key:"perform",value:function(e,t){var r=this,i=Object.create(null,{perform:{get:function(){return h(Object(f.a)(n.prototype),"perform",r)}}});return Pa(this,void 0,void 0,Object(A.a)().mark((function n(){var r;return Object(A.a)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if("getBlockNumber"!==e){n.next=5;break}return n.next=3,i.perform.call(this,"getBlock",{blockTag:"latest"});case 3:return r=n.sent,n.abrupt("return",r.number);case 5:return n.abrupt("return",i.perform.call(this,e,t));case 6:case"end":return n.stop()}}),n,this)})))}}],[{key:"getApiKey",value:function(e){return null!=e&&Ra.throwArgumentError("apiKey not supported for cloudflare","apiKey",e),null}},{key:"getUrl",value:function(e,t){var n=null;if("homestead"===e.name)n="https://cloudflare-eth.com/";else Ra.throwArgumentError("unsupported network","network",arguments[0]);return n}}]),n}(Ea),Ta=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(t){o(t)}}function s(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Qa=new _.b(Eo);function Da(e){var t={};for(var n in e)if(null!=e[n]){var r=e[n];"type"===n&&0===r||(r={type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[n]?Object(y.g)(Object(y.i)(r)):"accessList"===n?"["+hn(r).map((function(e){return'{address:"'.concat(e.address,'",storageKeys:["').concat(e.storageKeys.join('","'),'"]}')})).join(",")+"]":Object(y.i)(r),t[n]=r)}return t}function ja(e){if(0==e.status&&("No records found"===e.message||"No transactions found"===e.message))return e.result;if(1!=e.status||"string"!==typeof e.message||!e.message.match(/^OK/)){var t=new Error("invalid response");throw t.result=JSON.stringify(e),(e.result||"").toLowerCase().indexOf("rate limit")>=0&&(t.throttleRetry=!0),t}return e.result}function Ua(e){if(e&&0==e.status&&"NOTOK"==e.message&&(e.result||"").toLowerCase().indexOf("rate limit")>=0){var t=new Error("throttled response");throw t.result=JSON.stringify(e),t.throttleRetry=!0,t}if("2.0"!=e.jsonrpc){var n=new Error("invalid response");throw n.result=JSON.stringify(e),n}if(e.error){var r=new Error(e.error.message||"unknown error");throw e.error.code&&(r.code=e.error.code),e.error.data&&(r.data=e.error.data),r}return e.result}function La(e){if("pending"===e)throw new Error("pending not supported");return"latest"===e?e:parseInt(e.substring(2),16)}function Fa(e,t,n){if("call"===e&&t.code===_.b.errors.SERVER_ERROR){var r=t.error;if(r&&(r.message.match(/reverted/i)||r.message.match(/VM execution error/i))){var i=r.data;if(i&&(i="0x"+i.replace(/^.*0x/i,"")),Object(y.l)(i))return i;Qa.throwError("missing revert data in call exception",_.b.errors.CALL_EXCEPTION,{error:t,data:"0x"})}}var o=t.message;throw t.code===_.b.errors.SERVER_ERROR&&(t.error&&"string"===typeof t.error.message?o=t.error.message:"string"===typeof t.body?o=t.body:"string"===typeof t.responseText&&(o=t.responseText)),(o=(o||"").toLowerCase()).match(/insufficient funds/)&&Qa.throwError("insufficient funds for intrinsic transaction cost",_.b.errors.INSUFFICIENT_FUNDS,{error:t,method:e,transaction:n}),o.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&Qa.throwError("nonce has already been used",_.b.errors.NONCE_EXPIRED,{error:t,method:e,transaction:n}),o.match(/another transaction with same nonce/)&&Qa.throwError("replacement fee too low",_.b.errors.REPLACEMENT_UNDERPRICED,{error:t,method:e,transaction:n}),o.match(/execution failed due to an exception|execution reverted/)&&Qa.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",_.b.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,method:e,transaction:n}),t}var Ha=function(e){Object(p.a)(n,e);var t=Object(g.a)(n);function n(e,r){var i;return Object(v.a)(this,n),i=t.call(this,e),Q(Object(l.a)(i),"baseUrl",i.getBaseUrl()),Q(Object(l.a)(i),"apiKey",r||null),i}return Object(m.a)(n,[{key:"getBaseUrl",value:function(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"ropsten":return"https://api-ropsten.etherscan.io";case"rinkeby":return"https://api-rinkeby.etherscan.io";case"kovan":return"https://api-kovan.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-kovan":return"https://api-kovan-optimistic.etherscan.io"}return Qa.throwArgumentError("unsupported network","network",this.network.name)}},{key:"getUrl",value:function(e,t){var n=Object.keys(t).reduce((function(e,n){var r=t[n];return null!=r&&(e+="&".concat(n,"=").concat(r)),e}),""),r=this.apiKey?"&apikey=".concat(this.apiKey):"";return"".concat(this.baseUrl,"/api?module=").concat(e).concat(n).concat(r)}},{key:"getPostUrl",value:function(){return"".concat(this.baseUrl,"/api")}},{key:"getPostData",value:function(e,t){return t.module=e,t.apikey=this.apiKey,t}},{key:"fetch",value:function(e,t,n){return Ta(this,void 0,void 0,Object(A.a)().mark((function r(){var i,o,a,s,u,c,l=this;return Object(A.a)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return i=n?this.getPostUrl():this.getUrl(e,t),o=n?this.getPostData(e,t):null,a="proxy"===e?Ua:ja,this.emit("debug",{action:"request",request:i,provider:this}),s={url:i,throttleSlotInterval:1e3,throttleCallback:function(e,t){return l.isCommunityResource()&&Bo(),Promise.resolve(!0)}},u=null,o&&(s.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},u=Object.keys(o).map((function(e){return"".concat(e,"=").concat(o[e])})).join("&")),r.next=9,yo(s,u,a||Ua);case 9:return c=r.sent,this.emit("debug",{action:"response",request:i,response:q(c),provider:this}),r.abrupt("return",c);case 12:case"end":return r.stop()}}),r,this)})))}},{key:"detectNetwork",value:function(){return Ta(this,void 0,void 0,Object(A.a)().mark((function e(){return Object(A.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.network);case 1:case"end":return e.stop()}}),e,this)})))}},{key:"perform",value:function(e,t){var r=this,i=Object.create(null,{perform:{get:function(){return h(Object(f.a)(n.prototype),"perform",r)}}});return Ta(this,void 0,void 0,Object(A.a)().mark((function n(){var r,o,a,s,u,c,l,f,d;return Object(A.a)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:n.t0=e,n.next="getBlockNumber"===n.t0?3:"getGasPrice"===n.t0?4:"getBalance"===n.t0?5:"getTransactionCount"===n.t0?6:"getCode"===n.t0?7:"getStorageAt"===n.t0?8:"sendTransaction"===n.t0?9:"getBlock"===n.t0?10:"getTransaction"===n.t0?13:"getTransactionReceipt"===n.t0?14:"call"===n.t0?15:"estimateGas"===n.t0?29:"getLogs"===n.t0?41:"getEtherPrice"===n.t0?65:72;break;case 3:return n.abrupt("return",this.fetch("proxy",{action:"eth_blockNumber"}));case 4:return n.abrupt("return",this.fetch("proxy",{action:"eth_gasPrice"}));case 5:return n.abrupt("return",this.fetch("account",{action:"balance",address:t.address,tag:t.blockTag}));case 6:return n.abrupt("return",this.fetch("proxy",{action:"eth_getTransactionCount",address:t.address,tag:t.blockTag}));case 7:return n.abrupt("return",this.fetch("proxy",{action:"eth_getCode",address:t.address,tag:t.blockTag}));case 8:return n.abrupt("return",this.fetch("proxy",{action:"eth_getStorageAt",address:t.address,position:t.position,tag:t.blockTag}));case 9:return n.abrupt("return",this.fetch("proxy",{action:"eth_sendRawTransaction",hex:t.signedTransaction},!0).catch((function(e){return Fa("sendTransaction",e,t.signedTransaction)})));case 10:if(!t.blockTag){n.next=12;break}return n.abrupt("return",this.fetch("proxy",{action:"eth_getBlockByNumber",tag:t.blockTag,boolean:t.includeTransactions?"true":"false"}));case 12:throw new Error("getBlock by blockHash not implemented");case 13:return n.abrupt("return",this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:t.transactionHash}));case 14:return n.abrupt("return",this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:t.transactionHash}));case 15:if("latest"===t.blockTag){n.next=17;break}throw new Error("EtherscanProvider does not support blockTag for call");case 17:return(r=Da(t.transaction)).module="proxy",r.action="eth_call",n.prev=20,n.next=23,this.fetch("proxy",r,!0);case 23:return n.abrupt("return",n.sent);case 26:return n.prev=26,n.t1=n.catch(20),n.abrupt("return",Fa("call",n.t1,t.transaction));case 29:return(o=Da(t.transaction)).module="proxy",o.action="eth_estimateGas",n.prev=32,n.next=35,this.fetch("proxy",o,!0);case 35:return n.abrupt("return",n.sent);case 38:return n.prev=38,n.t2=n.catch(32),n.abrupt("return",Fa("estimateGas",n.t2,t.transaction));case 41:return a={action:"getLogs"},t.filter.fromBlock&&(a.fromBlock=La(t.filter.fromBlock)),t.filter.toBlock&&(a.toBlock=La(t.filter.toBlock)),t.filter.address&&(a.address=t.filter.address),t.filter.topics&&t.filter.topics.length>0&&(t.filter.topics.length>1&&Qa.throwError("unsupported topic count",_.b.errors.UNSUPPORTED_OPERATION,{topics:t.filter.topics}),1===t.filter.topics.length&&("string"===typeof(s=t.filter.topics[0])&&66===s.length||Qa.throwError("unsupported topic format",_.b.errors.UNSUPPORTED_OPERATION,{topic0:s}),a.topic0=s)),n.next=48,this.fetch("logs",a);case 48:u=n.sent,c={},l=0;case 51:if(!(l0;t--){var n=Math.floor(Math.random()*(t+1)),r=e[t];e[t]=e[n],e[n]=r}return e}var qa=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(t){o(t)}}function s(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Ga=new _.b(Eo);function za(){return(new Date).getTime()}function Va(e){for(var t=null,n=0;nt?null:(r+i)/2}function Ka(e){if(null===e)return"null";if("number"===typeof e||"boolean"===typeof e)return JSON.stringify(e);if("string"===typeof e)return e;if(B.isBigNumber(e))return e.toString();if(Array.isArray(e))return JSON.stringify(e.map((function(e){return Ka(e)})));if("object"===typeof e){var t=Object.keys(e);return t.sort(),"{"+t.map((function(t){var n=e[t];return n="function"===typeof n?"[function]":Ka(n),JSON.stringify(t)+":"+n})).join(",")+"}"}throw new Error("unknown value type: "+typeof e)}var Ya=1;function Za(e){var t=null,n=null,r=new Promise((function(r){t=function(){n&&(clearTimeout(n),n=null),r()},n=setTimeout(t,e)}));return{cancel:t,getPromise:function(){return r},wait:function(e){return r=r.then(e)}}}var Xa=[_.b.errors.CALL_EXCEPTION,_.b.errors.INSUFFICIENT_FUNDS,_.b.errors.NONCE_EXPIRED,_.b.errors.REPLACEMENT_UNDERPRICED,_.b.errors.UNPREDICTABLE_GAS_LIMIT],$a=["address","args","errorArgs","errorSignature","method","transaction"];function es(e,t){var n={weight:e.weight};return Object.defineProperty(n,"provider",{get:function(){return e.provider}}),e.start&&(n.start=e.start),t&&(n.duration=t-e.start),e.done&&(e.error?n.error=e.error:n.result=e.result||null),n}function ts(e,t,n){var r=Ka;switch(t){case"getBlockNumber":return function(t){var n=t.map((function(e){return e.result})),r=Wa(t.map((function(e){return e.result})),2);if(null!=r)return r=Math.ceil(r),n.indexOf(r+1)>=0&&r++,r>=e._highestBlockNumber&&(e._highestBlockNumber=r),e._highestBlockNumber};case"getGasPrice":return function(e){var t=e.map((function(e){return e.result}));return t.sort(),t[Math.floor(t.length/2)]};case"getEtherPrice":return function(e){return Wa(e.map((function(e){return e.result})))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":r=function(e){return null==e?null:((e=L(e)).confirmations=-1,Ka(e))};break;case"getBlock":r=n.includeTransactions?function(e){return null==e?null:((e=L(e)).transactions=e.transactions.map((function(e){return(e=L(e)).confirmations=-1,e})),Ka(e))}:function(e){return null==e?null:Ka(e)};break;default:throw new Error("unknown method: "+t)}return function(e,t){return function(n){var r={};n.forEach((function(t){var n=e(t.result);r[n]||(r[n]={count:0,result:t.result}),r[n].count++}));for(var i=Object.keys(r),o=0;o=t)return a.result}}}(r,e.quorum)}function ns(e,t){return qa(this,void 0,void 0,Object(A.a)().mark((function n(){var r;return Object(A.a)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!(null!=(r=e.provider).blockNumber&&r.blockNumber>=t||-1===t)){n.next=3;break}return n.abrupt("return",r);case 3:return n.abrupt("return",bo((function(){return new Promise((function(n,i){setTimeout((function(){return r.blockNumber>=t?n(r):e.cancelled?n(null):n(void 0)}),0)}))}),{oncePoll:r}));case 4:case"end":return n.stop()}}),n)})))}function rs(e,t,n,r){return qa(this,void 0,void 0,Object(A.a)().mark((function i(){var o,a;return Object(A.a)().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:o=e.provider,i.t0=n,i.next="getBlockNumber"===i.t0||"getGasPrice"===i.t0?4:"getEtherPrice"===i.t0?5:"getBalance"===i.t0||"getTransactionCount"===i.t0||"getCode"===i.t0?8:"getStorageAt"===i.t0?13:"getBlock"===i.t0?18:"call"===i.t0||"estimateGas"===i.t0?23:"getTransaction"===i.t0||"getTransactionReceipt"===i.t0?30:"getLogs"===i.t0?31:37;break;case 4:return i.abrupt("return",o[n]());case 5:if(!o.getEtherPrice){i.next=7;break}return i.abrupt("return",o.getEtherPrice());case 7:return i.abrupt("break",37);case 8:if(!r.blockTag||!Object(y.l)(r.blockTag)){i.next=12;break}return i.next=11,ns(e,t);case 11:o=i.sent;case 12:return i.abrupt("return",o[n](r.address,r.blockTag||"latest"));case 13:if(!r.blockTag||!Object(y.l)(r.blockTag)){i.next=17;break}return i.next=16,ns(e,t);case 16:o=i.sent;case 17:return i.abrupt("return",o.getStorageAt(r.address,r.position,r.blockTag||"latest"));case 18:if(!r.blockTag||!Object(y.l)(r.blockTag)){i.next=22;break}return i.next=21,ns(e,t);case 21:o=i.sent;case 22:return i.abrupt("return",o[r.includeTransactions?"getBlockWithTransactions":"getBlock"](r.blockTag||r.blockHash));case 23:if(!r.blockTag||!Object(y.l)(r.blockTag)){i.next=27;break}return i.next=26,ns(e,t);case 26:o=i.sent;case 27:if("call"!==n||!r.blockTag){i.next=29;break}return i.abrupt("return",o[n](r.transaction,r.blockTag));case 29:return i.abrupt("return",o[n](r.transaction));case 30:return i.abrupt("return",o[n](r.transactionHash));case 31:if(!((a=r.filter).fromBlock&&Object(y.l)(a.fromBlock)||a.toBlock&&Object(y.l)(a.toBlock))){i.next=36;break}return i.next=35,ns(e,t);case 35:o=i.sent;case 36:return i.abrupt("return",o.getLogs(a));case 37:return i.abrupt("return",Ga.throwError("unknown method error",_.b.errors.UNKNOWN_ERROR,{method:n,params:r}));case 38:case"end":return i.stop()}}),i)})))}var is=function(e){Object(p.a)(n,e);var t=Object(g.a)(n);function n(e,r){var i;Object(v.a)(this,n),0===e.length&&Ga.throwArgumentError("missing providers","providers",e);var o=e.map((function(e,t){if(Ht.isProvider(e)){var n=So(e)?2e3:750;return Object.freeze({provider:e,weight:1,stallTimeout:n,priority:1})}var r=L(e);null==r.priority&&(r.priority=1),null==r.stallTimeout&&(r.stallTimeout=So(e)?2e3:750),null==r.weight&&(r.weight=1);var i=r.weight;return(i%1||i>512||i<1)&&Ga.throwArgumentError("invalid weight; must be integer in [1, 512]","providers[".concat(t,"].weight"),i),Object.freeze(r)})),a=o.reduce((function(e,t){return e+t.weight}),0);null==r?r=a/2:r>a&&Ga.throwArgumentError("quorum will always fail; larger than total weight","quorum",r);var s=Va(o.map((function(e){return e.provider.network})));return null==s&&(s=new Promise((function(e,t){setTimeout((function(){i.detectNetwork().then(e,t)}),0)}))),i=t.call(this,s),Q(Object(l.a)(i),"providerConfigs",Object.freeze(o)),Q(Object(l.a)(i),"quorum",r),i._highestBlockNumber=-1,i}return Object(m.a)(n,[{key:"detectNetwork",value:function(){return qa(this,void 0,void 0,Object(A.a)().mark((function e(){var t;return Object(A.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all(this.providerConfigs.map((function(e){return e.provider.getNetwork()})));case 2:return t=e.sent,e.abrupt("return",Va(t));case 4:case"end":return e.stop()}}),e,this)})))}},{key:"perform",value:function(e,t){return qa(this,void 0,void 0,Object(A.a)().mark((function n(){var r,i,o,a,s,u,c,l,f,d,h=this;return Object(A.a)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if("sendTransaction"!==e){n.next=13;break}return n.next=3,Promise.all(this.providerConfigs.map((function(e){return e.provider.sendTransaction(t.signedTransaction).then((function(e){return e.hash}),(function(e){return e}))})));case 3:r=n.sent,i=0;case 5:if(!(i=h.quorum)){n.next=19;break}if(void 0===(p=a(d))){n.next=15;break}return s.forEach((function(e){e.staller&&e.staller.cancel(),e.cancelled=!0})),n.abrupt("return",{v:p});case 15:if(l){n.next=18;break}return n.next=18,Za(100).getPromise();case 18:l=!1;case 19:if(g=s.reduce((function(e,t){if(!t.done||null==t.error)return e;var n=t.error.code;return Xa.indexOf(n)>=0&&(e[n]||(e[n]={error:t.error,weight:0}),e[n].weight+=t.weight),e}),{}),Object.keys(g).forEach((function(e){var t=g[e];if(!(t.weight256)&&Is.throwArgumentError("invalid number type","type",e),n&&(i=256),t=B.from(t).toTwos(i),Object(y.p)(t,i/8)}if(r=e.match(_s)){var o=parseInt(r[1]);return(String(o)!==r[1]||0===o||o>32)&&Is.throwArgumentError("invalid bytes type","type",e),Object(y.a)(t).byteLength!==o&&Is.throwArgumentError("invalid value for ".concat(e),"value",t),n?Object(y.a)((t+"0000000000000000000000000000000000000000000000000000000000000000").substring(0,66)):t}if((r=e.match(ks))&&Array.isArray(t)){var a=r[1];parseInt(r[2]||String(t.length))!=t.length&&Is.throwArgumentError("invalid array length for ".concat(e),"value",t);var s=[];return t.forEach((function(e){s.push(Cs(a,e,!0))})),Object(y.b)(s)}return Is.throwArgumentError("invalid type","type",e)}function Ss(e,t){e.length!=t.length&&Is.throwArgumentError("wrong number of values; expected ${ types.length }","values",t);var n=[];return e.forEach((function(e,r){n.push(Cs(e,t[r]))})),Object(y.i)(Object(y.b)(n))}function xs(e,t){return ee(Ss(e,t))}function Bs(e,t){return wr(Ss(e,t))}function Os(e,t){t||(t=function(e){return[parseInt(e,16)]});var n=0,r={};return e.split(",").forEach((function(e){var i=e.split(":");n+=parseInt(i[0],16),r[n]=t(i[1])})),r}function Ms(e){var t=0;return e.split(",").map((function(e){var n=e.split("-");return 1===n.length?n[1]="0":""===n[1]&&(n[1]="1"),{l:t+parseInt(n[0],16),h:t=parseInt(n[1],16)}}))}function Ps(e,t){for(var n=0,r=0;r=(n+=i.l)&&e<=n+i.h&&(e-n)%(i.d||1)===0){if(i.e&&-1!==i.e.indexOf(e-n))continue;return i}}return null}var Rs=Ms("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),Ns="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map((function(e){return parseInt(e,16)})),Ts=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],Qs=Os("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),Ds=Os("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),js=Os("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",(function(e){if(e.length%4!==0)throw new Error("bad data");for(var t=[],n=0;n=0)return[];if(e>=65024&&e<=65039)return[];var t=function(e){var t=Ps(e,Ts);if(t)return[e+t.s];var n=Qs[e];if(n)return n;var r=Ds[e];return r?[e+r[0]]:js[e]||null}(e);return t||[e]})),n=t.reduce((function(e,t){return t.forEach((function(t){e.push(t)})),e}),[]),(n=Re(Me(n),_e.NFKC)).forEach((function(e){if(Ps(e,Us))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")})),n.forEach((function(e){if(Ps(e,Rs))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")}));var r=Me(n);if("-"===r.substring(0,1)||"--"===r.substring(2,4)||"-"===r.substring(r.length-1))throw new Error("invalid hyphen");return r}function Fs(e){var t=xe(e);if(t.length>31)throw new Error("bytes32 string must be less than 32 bytes");return Object(y.i)(Object(y.b)([t,Ci]).slice(0,32))}function Hs(e){var t=Object(y.a)(e);if(32!==t.length)throw new Error("invalid bytes32 - not 32 bytes long");if(0!==t[31])throw new Error("invalid bytes32 string - no null terminator");for(var n=31;0===t[n-1];)n--;return Pe(t.slice(0,n))}var Js=new _.b("units/5.7.0"),qs=["wei","kwei","mwei","gwei","szabo","finney","ether"];function Gs(e){var t=String(e).split(".");(t.length>2||!t[0].match(/^-?[0-9]*$/)||t[1]&&!t[1].match(/^[0-9]*$/)||"."===e||"-."===e)&&Js.throwArgumentError("invalid value","value",e);var n=t[0],r="";for("-"===n.substring(0,1)&&(r="-",n=n.substring(1));"0"===n.substring(0,1);)n=n.substring(1);""===n&&(n="0");var i="";for(2===t.length&&(i="."+(t[1]||"0"));i.length>2&&"0"===i[i.length-1];)i=i.substring(0,i.length-1);for(var o=[];n.length;){if(n.length<=3){o.unshift(n);break}var a=n.length-3;o.unshift(n.substring(a)),n=n.substring(0,a)}return r+o.join(",")+i}function zs(e,t){if("string"===typeof t){var n=qs.indexOf(t);-1!==n&&(t=3*n)}return qn(e,null!=t?t:18)}function Vs(e,t){if("string"!==typeof e&&Js.throwArgumentError("value must be a string","value",e),"string"===typeof t){var n=qs.indexOf(t);-1!==n&&(t=3*n)}return Gn(e,null!=t?t:18)}function Ws(e){return zs(e,18)}function Ks(e){return Vs(e,18)}var Ys="ethers/5.7.0",Zs=new _.b(Ys);try{var Xs=window;null==Xs._ethers&&(Xs._ethers=u)}catch($s){}},,,,function(e,t,n){"use strict";var r=t;r.version=n(737).version,r.utils=n(86),r.rand=n(247),r.curve=n(374),r.curves=n(248),r.ec=n(744),r.eddsa=n(748)},function(e,t,n){var r=n(37).Buffer,i=n(768).Transform,o=n(104).StringDecoder;function a(e){i.call(this),this.hashMode="string"===typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}n(24)(a,i),a.prototype.update=function(e,t,n){"string"===typeof e&&(e=r.from(e,t));var i=this._update(e);return this.hashMode?this:(n&&(i=this._toString(i,n)),i)},a.prototype.setAutoPadding=function(){},a.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},a.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},a.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},a.prototype._transform=function(e,t,n){var r;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(i){r=i}finally{n(r)}},a.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(n){t=n}e(t)},a.prototype._finalOrDigest=function(e){var t=this.__final()||r.alloc(0);return e&&(t=this._toString(t,e,!0)),t},a.prototype._toString=function(e,t,n){if(this._decoder||(this._decoder=new o(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var r=this._decoder.write(e);return n&&(r+=this._decoder.end()),r},e.exports=a},function(e,t,n){"use strict";(function(e){var r=n(19).default,i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Fee=t.ModeInfo_Multi=t.ModeInfo_Single=t.ModeInfo=t.SignerInfo=t.AuthInfo=t.TxBody=t.SignDoc=t.TxRaw=t.Tx=t.protobufPackage=void 0;var o=i(n(18)),a=i(n(21)),s=n(55),u=n(174),c=n(281),l=n(68);t.protobufPackage="cosmos.tx.v1beta1";var f={};t.Tx={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();void 0!==e.body&&t.TxBody.encode(e.body,n.uint32(10).fork()).ldelim(),void 0!==e.authInfo&&t.AuthInfo.encode(e.authInfo,n.uint32(18).fork()).ldelim();var i,o=r(e.signatures);try{for(o.s();!(i=o.n()).done;){var s=i.value;n.uint32(26).bytes(s)}}catch(u){o.e(u)}finally{o.f()}return n},decode:function(e,n){var r=e instanceof a.default.Reader?e:new a.default.Reader(e),i=void 0===n?r.len:r.pos+n,o=Object.assign({},f);for(o.signatures=[];r.pos>>3){case 1:o.body=t.TxBody.decode(r,r.uint32());break;case 2:o.authInfo=t.AuthInfo.decode(r,r.uint32());break;case 3:o.signatures.push(r.bytes());break;default:r.skipType(7&s)}}return o},fromJSON:function(e){var n,r=Object.assign({},f);return r.body=void 0!==e.body&&null!==e.body?t.TxBody.fromJSON(e.body):void 0,r.authInfo=void 0!==e.authInfo&&null!==e.authInfo?t.AuthInfo.fromJSON(e.authInfo):void 0,r.signatures=(null!==(n=e.signatures)&&void 0!==n?n:[]).map((function(e){return E(e)})),r},toJSON:function(e){var n={};return void 0!==e.body&&(n.body=e.body?t.TxBody.toJSON(e.body):void 0),void 0!==e.authInfo&&(n.authInfo=e.authInfo?t.AuthInfo.toJSON(e.authInfo):void 0),e.signatures?n.signatures=e.signatures.map((function(e){return I(void 0!==e?e:new Uint8Array)})):n.signatures=[],n},fromPartial:function(e){var n,r=Object.assign({},f);return r.body=void 0!==e.body&&null!==e.body?t.TxBody.fromPartial(e.body):void 0,r.authInfo=void 0!==e.authInfo&&null!==e.authInfo?t.AuthInfo.fromPartial(e.authInfo):void 0,r.signatures=(null===(n=e.signatures)||void 0===n?void 0:n.map((function(e){return e})))||[],r}};var d={};t.TxRaw={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();0!==e.bodyBytes.length&&t.uint32(10).bytes(e.bodyBytes),0!==e.authInfoBytes.length&&t.uint32(18).bytes(e.authInfoBytes);var n,i=r(e.signatures);try{for(i.s();!(n=i.n()).done;){var o=n.value;t.uint32(26).bytes(o)}}catch(s){i.e(s)}finally{i.f()}return t},decode:function(e,t){var n=e instanceof a.default.Reader?e:new a.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},d);for(i.signatures=[],i.bodyBytes=new Uint8Array,i.authInfoBytes=new Uint8Array;n.pos>>3){case 1:i.bodyBytes=n.bytes();break;case 2:i.authInfoBytes=n.bytes();break;case 3:i.signatures.push(n.bytes());break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t,n=Object.assign({},d);return n.bodyBytes=void 0!==e.bodyBytes&&null!==e.bodyBytes?E(e.bodyBytes):new Uint8Array,n.authInfoBytes=void 0!==e.authInfoBytes&&null!==e.authInfoBytes?E(e.authInfoBytes):new Uint8Array,n.signatures=(null!==(t=e.signatures)&&void 0!==t?t:[]).map((function(e){return E(e)})),n},toJSON:function(e){var t={};return void 0!==e.bodyBytes&&(t.bodyBytes=I(void 0!==e.bodyBytes?e.bodyBytes:new Uint8Array)),void 0!==e.authInfoBytes&&(t.authInfoBytes=I(void 0!==e.authInfoBytes?e.authInfoBytes:new Uint8Array)),e.signatures?t.signatures=e.signatures.map((function(e){return I(void 0!==e?e:new Uint8Array)})):t.signatures=[],t},fromPartial:function(e){var t,n,r,i=Object.assign({},d);return i.bodyBytes=null!==(t=e.bodyBytes)&&void 0!==t?t:new Uint8Array,i.authInfoBytes=null!==(n=e.authInfoBytes)&&void 0!==n?n:new Uint8Array,i.signatures=(null===(r=e.signatures)||void 0===r?void 0:r.map((function(e){return e})))||[],i}};var h={chainId:"",accountNumber:o.default.UZERO};t.SignDoc={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return 0!==e.bodyBytes.length&&t.uint32(10).bytes(e.bodyBytes),0!==e.authInfoBytes.length&&t.uint32(18).bytes(e.authInfoBytes),""!==e.chainId&&t.uint32(26).string(e.chainId),e.accountNumber.isZero()||t.uint32(32).uint64(e.accountNumber),t},decode:function(e,t){var n=e instanceof a.default.Reader?e:new a.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},h);for(i.bodyBytes=new Uint8Array,i.authInfoBytes=new Uint8Array;n.pos>>3){case 1:i.bodyBytes=n.bytes();break;case 2:i.authInfoBytes=n.bytes();break;case 3:i.chainId=n.string();break;case 4:i.accountNumber=n.uint64();break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t=Object.assign({},h);return t.bodyBytes=void 0!==e.bodyBytes&&null!==e.bodyBytes?E(e.bodyBytes):new Uint8Array,t.authInfoBytes=void 0!==e.authInfoBytes&&null!==e.authInfoBytes?E(e.authInfoBytes):new Uint8Array,t.chainId=void 0!==e.chainId&&null!==e.chainId?String(e.chainId):"",t.accountNumber=void 0!==e.accountNumber&&null!==e.accountNumber?o.default.fromString(e.accountNumber):o.default.UZERO,t},toJSON:function(e){var t={};return void 0!==e.bodyBytes&&(t.bodyBytes=I(void 0!==e.bodyBytes?e.bodyBytes:new Uint8Array)),void 0!==e.authInfoBytes&&(t.authInfoBytes=I(void 0!==e.authInfoBytes?e.authInfoBytes:new Uint8Array)),void 0!==e.chainId&&(t.chainId=e.chainId),void 0!==e.accountNumber&&(t.accountNumber=(e.accountNumber||o.default.UZERO).toString()),t},fromPartial:function(e){var t,n,r,i=Object.assign({},h);return i.bodyBytes=null!==(t=e.bodyBytes)&&void 0!==t?t:new Uint8Array,i.authInfoBytes=null!==(n=e.authInfoBytes)&&void 0!==n?n:new Uint8Array,i.chainId=null!==(r=e.chainId)&&void 0!==r?r:"",i.accountNumber=void 0!==e.accountNumber&&null!==e.accountNumber?o.default.fromValue(e.accountNumber):o.default.UZERO,i}};var p={memo:"",timeoutHeight:o.default.UZERO};t.TxBody={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create(),i=r(e.messages);try{for(i.s();!(t=i.n()).done;){var o=t.value;s.Any.encode(o,n.uint32(10).fork()).ldelim()}}catch(p){i.e(p)}finally{i.f()}""!==e.memo&&n.uint32(18).string(e.memo),e.timeoutHeight.isZero()||n.uint32(24).uint64(e.timeoutHeight);var u,c=r(e.extensionOptions);try{for(c.s();!(u=c.n()).done;){var l=u.value;s.Any.encode(l,n.uint32(8186).fork()).ldelim()}}catch(p){c.e(p)}finally{c.f()}var f,d=r(e.nonCriticalExtensionOptions);try{for(d.s();!(f=d.n()).done;){var h=f.value;s.Any.encode(h,n.uint32(16378).fork()).ldelim()}}catch(p){d.e(p)}finally{d.f()}return n},decode:function(e,t){var n=e instanceof a.default.Reader?e:new a.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},p);for(i.messages=[],i.extensionOptions=[],i.nonCriticalExtensionOptions=[];n.pos>>3){case 1:i.messages.push(s.Any.decode(n,n.uint32()));break;case 2:i.memo=n.string();break;case 3:i.timeoutHeight=n.uint64();break;case 1023:i.extensionOptions.push(s.Any.decode(n,n.uint32()));break;case 2047:i.nonCriticalExtensionOptions.push(s.Any.decode(n,n.uint32()));break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t,n,r,i=Object.assign({},p);return i.messages=(null!==(t=e.messages)&&void 0!==t?t:[]).map((function(e){return s.Any.fromJSON(e)})),i.memo=void 0!==e.memo&&null!==e.memo?String(e.memo):"",i.timeoutHeight=void 0!==e.timeoutHeight&&null!==e.timeoutHeight?o.default.fromString(e.timeoutHeight):o.default.UZERO,i.extensionOptions=(null!==(n=e.extensionOptions)&&void 0!==n?n:[]).map((function(e){return s.Any.fromJSON(e)})),i.nonCriticalExtensionOptions=(null!==(r=e.nonCriticalExtensionOptions)&&void 0!==r?r:[]).map((function(e){return s.Any.fromJSON(e)})),i},toJSON:function(e){var t={};return e.messages?t.messages=e.messages.map((function(e){return e?s.Any.toJSON(e):void 0})):t.messages=[],void 0!==e.memo&&(t.memo=e.memo),void 0!==e.timeoutHeight&&(t.timeoutHeight=(e.timeoutHeight||o.default.UZERO).toString()),e.extensionOptions?t.extensionOptions=e.extensionOptions.map((function(e){return e?s.Any.toJSON(e):void 0})):t.extensionOptions=[],e.nonCriticalExtensionOptions?t.nonCriticalExtensionOptions=e.nonCriticalExtensionOptions.map((function(e){return e?s.Any.toJSON(e):void 0})):t.nonCriticalExtensionOptions=[],t},fromPartial:function(e){var t,n,r,i,a=Object.assign({},p);return a.messages=(null===(t=e.messages)||void 0===t?void 0:t.map((function(e){return s.Any.fromPartial(e)})))||[],a.memo=null!==(n=e.memo)&&void 0!==n?n:"",a.timeoutHeight=void 0!==e.timeoutHeight&&null!==e.timeoutHeight?o.default.fromValue(e.timeoutHeight):o.default.UZERO,a.extensionOptions=(null===(r=e.extensionOptions)||void 0===r?void 0:r.map((function(e){return s.Any.fromPartial(e)})))||[],a.nonCriticalExtensionOptions=(null===(i=e.nonCriticalExtensionOptions)||void 0===i?void 0:i.map((function(e){return s.Any.fromPartial(e)})))||[],a}};var g={};t.AuthInfo={encode:function(e){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create(),o=r(e.signerInfos);try{for(o.s();!(n=o.n()).done;){var s=n.value;t.SignerInfo.encode(s,i.uint32(10).fork()).ldelim()}}catch(u){o.e(u)}finally{o.f()}return void 0!==e.fee&&t.Fee.encode(e.fee,i.uint32(18).fork()).ldelim(),i},decode:function(e,n){var r=e instanceof a.default.Reader?e:new a.default.Reader(e),i=void 0===n?r.len:r.pos+n,o=Object.assign({},g);for(o.signerInfos=[];r.pos>>3){case 1:o.signerInfos.push(t.SignerInfo.decode(r,r.uint32()));break;case 2:o.fee=t.Fee.decode(r,r.uint32());break;default:r.skipType(7&s)}}return o},fromJSON:function(e){var n,r=Object.assign({},g);return r.signerInfos=(null!==(n=e.signerInfos)&&void 0!==n?n:[]).map((function(e){return t.SignerInfo.fromJSON(e)})),r.fee=void 0!==e.fee&&null!==e.fee?t.Fee.fromJSON(e.fee):void 0,r},toJSON:function(e){var n={};return e.signerInfos?n.signerInfos=e.signerInfos.map((function(e){return e?t.SignerInfo.toJSON(e):void 0})):n.signerInfos=[],void 0!==e.fee&&(n.fee=e.fee?t.Fee.toJSON(e.fee):void 0),n},fromPartial:function(e){var n,r=Object.assign({},g);return r.signerInfos=(null===(n=e.signerInfos)||void 0===n?void 0:n.map((function(e){return t.SignerInfo.fromPartial(e)})))||[],r.fee=void 0!==e.fee&&null!==e.fee?t.Fee.fromPartial(e.fee):void 0,r}};var v={sequence:o.default.UZERO};t.SignerInfo={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return void 0!==e.publicKey&&s.Any.encode(e.publicKey,n.uint32(10).fork()).ldelim(),void 0!==e.modeInfo&&t.ModeInfo.encode(e.modeInfo,n.uint32(18).fork()).ldelim(),e.sequence.isZero()||n.uint32(24).uint64(e.sequence),n},decode:function(e,n){for(var r=e instanceof a.default.Reader?e:new a.default.Reader(e),i=void 0===n?r.len:r.pos+n,o=Object.assign({},v);r.pos>>3){case 1:o.publicKey=s.Any.decode(r,r.uint32());break;case 2:o.modeInfo=t.ModeInfo.decode(r,r.uint32());break;case 3:o.sequence=r.uint64();break;default:r.skipType(7&u)}}return o},fromJSON:function(e){var n=Object.assign({},v);return n.publicKey=void 0!==e.publicKey&&null!==e.publicKey?s.Any.fromJSON(e.publicKey):void 0,n.modeInfo=void 0!==e.modeInfo&&null!==e.modeInfo?t.ModeInfo.fromJSON(e.modeInfo):void 0,n.sequence=void 0!==e.sequence&&null!==e.sequence?o.default.fromString(e.sequence):o.default.UZERO,n},toJSON:function(e){var n={};return void 0!==e.publicKey&&(n.publicKey=e.publicKey?s.Any.toJSON(e.publicKey):void 0),void 0!==e.modeInfo&&(n.modeInfo=e.modeInfo?t.ModeInfo.toJSON(e.modeInfo):void 0),void 0!==e.sequence&&(n.sequence=(e.sequence||o.default.UZERO).toString()),n},fromPartial:function(e){var n=Object.assign({},v);return n.publicKey=void 0!==e.publicKey&&null!==e.publicKey?s.Any.fromPartial(e.publicKey):void 0,n.modeInfo=void 0!==e.modeInfo&&null!==e.modeInfo?t.ModeInfo.fromPartial(e.modeInfo):void 0,n.sequence=void 0!==e.sequence&&null!==e.sequence?o.default.fromValue(e.sequence):o.default.UZERO,n}};var m={};t.ModeInfo={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return void 0!==e.single&&t.ModeInfo_Single.encode(e.single,n.uint32(10).fork()).ldelim(),void 0!==e.multi&&t.ModeInfo_Multi.encode(e.multi,n.uint32(18).fork()).ldelim(),n},decode:function(e,n){for(var r=e instanceof a.default.Reader?e:new a.default.Reader(e),i=void 0===n?r.len:r.pos+n,o=Object.assign({},m);r.pos>>3){case 1:o.single=t.ModeInfo_Single.decode(r,r.uint32());break;case 2:o.multi=t.ModeInfo_Multi.decode(r,r.uint32());break;default:r.skipType(7&s)}}return o},fromJSON:function(e){var n=Object.assign({},m);return n.single=void 0!==e.single&&null!==e.single?t.ModeInfo_Single.fromJSON(e.single):void 0,n.multi=void 0!==e.multi&&null!==e.multi?t.ModeInfo_Multi.fromJSON(e.multi):void 0,n},toJSON:function(e){var n={};return void 0!==e.single&&(n.single=e.single?t.ModeInfo_Single.toJSON(e.single):void 0),void 0!==e.multi&&(n.multi=e.multi?t.ModeInfo_Multi.toJSON(e.multi):void 0),n},fromPartial:function(e){var n=Object.assign({},m);return n.single=void 0!==e.single&&null!==e.single?t.ModeInfo_Single.fromPartial(e.single):void 0,n.multi=void 0!==e.multi&&null!==e.multi?t.ModeInfo_Multi.fromPartial(e.multi):void 0,n}};var A={mode:0};t.ModeInfo_Single={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return 0!==e.mode&&t.uint32(8).int32(e.mode),t},decode:function(e,t){for(var n=e instanceof a.default.Reader?e:new a.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},A);n.pos>>3===1)i.mode=n.int32();else n.skipType(7&o)}return i},fromJSON:function(e){var t=Object.assign({},A);return t.mode=void 0!==e.mode&&null!==e.mode?u.signModeFromJSON(e.mode):0,t},toJSON:function(e){var t={};return void 0!==e.mode&&(t.mode=u.signModeToJSON(e.mode)),t},fromPartial:function(e){var t,n=Object.assign({},A);return n.mode=null!==(t=e.mode)&&void 0!==t?t:0,n}};var y={};t.ModeInfo_Multi={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();void 0!==e.bitarray&&c.CompactBitArray.encode(e.bitarray,n.uint32(10).fork()).ldelim();var i,o=r(e.modeInfos);try{for(o.s();!(i=o.n()).done;){var s=i.value;t.ModeInfo.encode(s,n.uint32(18).fork()).ldelim()}}catch(u){o.e(u)}finally{o.f()}return n},decode:function(e,n){var r=e instanceof a.default.Reader?e:new a.default.Reader(e),i=void 0===n?r.len:r.pos+n,o=Object.assign({},y);for(o.modeInfos=[];r.pos>>3){case 1:o.bitarray=c.CompactBitArray.decode(r,r.uint32());break;case 2:o.modeInfos.push(t.ModeInfo.decode(r,r.uint32()));break;default:r.skipType(7&s)}}return o},fromJSON:function(e){var n,r=Object.assign({},y);return r.bitarray=void 0!==e.bitarray&&null!==e.bitarray?c.CompactBitArray.fromJSON(e.bitarray):void 0,r.modeInfos=(null!==(n=e.modeInfos)&&void 0!==n?n:[]).map((function(e){return t.ModeInfo.fromJSON(e)})),r},toJSON:function(e){var n={};return void 0!==e.bitarray&&(n.bitarray=e.bitarray?c.CompactBitArray.toJSON(e.bitarray):void 0),e.modeInfos?n.modeInfos=e.modeInfos.map((function(e){return e?t.ModeInfo.toJSON(e):void 0})):n.modeInfos=[],n},fromPartial:function(e){var n,r=Object.assign({},y);return r.bitarray=void 0!==e.bitarray&&null!==e.bitarray?c.CompactBitArray.fromPartial(e.bitarray):void 0,r.modeInfos=(null===(n=e.modeInfos)||void 0===n?void 0:n.map((function(e){return t.ModeInfo.fromPartial(e)})))||[],r}};var b={gasLimit:o.default.UZERO,payer:"",granter:""};t.Fee={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create(),i=r(e.amount);try{for(i.s();!(t=i.n()).done;){var o=t.value;l.Coin.encode(o,n.uint32(10).fork()).ldelim()}}catch(s){i.e(s)}finally{i.f()}return e.gasLimit.isZero()||n.uint32(16).uint64(e.gasLimit),""!==e.payer&&n.uint32(26).string(e.payer),""!==e.granter&&n.uint32(34).string(e.granter),n},decode:function(e,t){var n=e instanceof a.default.Reader?e:new a.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},b);for(i.amount=[];n.pos>>3){case 1:i.amount.push(l.Coin.decode(n,n.uint32()));break;case 2:i.gasLimit=n.uint64();break;case 3:i.payer=n.string();break;case 4:i.granter=n.string();break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t,n=Object.assign({},b);return n.amount=(null!==(t=e.amount)&&void 0!==t?t:[]).map((function(e){return l.Coin.fromJSON(e)})),n.gasLimit=void 0!==e.gasLimit&&null!==e.gasLimit?o.default.fromString(e.gasLimit):o.default.UZERO,n.payer=void 0!==e.payer&&null!==e.payer?String(e.payer):"",n.granter=void 0!==e.granter&&null!==e.granter?String(e.granter):"",n},toJSON:function(e){var t={};return e.amount?t.amount=e.amount.map((function(e){return e?l.Coin.toJSON(e):void 0})):t.amount=[],void 0!==e.gasLimit&&(t.gasLimit=(e.gasLimit||o.default.UZERO).toString()),void 0!==e.payer&&(t.payer=e.payer),void 0!==e.granter&&(t.granter=e.granter),t},fromPartial:function(e){var t,n,r,i=Object.assign({},b);return i.amount=(null===(t=e.amount)||void 0===t?void 0:t.map((function(e){return l.Coin.fromPartial(e)})))||[],i.gasLimit=void 0!==e.gasLimit&&null!==e.gasLimit?o.default.fromValue(e.gasLimit):o.default.UZERO,i.payer=null!==(n=e.payer)&&void 0!==n?n:"",i.granter=null!==(r=e.granter)&&void 0!==r?r:"",i}};var w=function(){if("undefined"!==typeof w)return w;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof e)return e;throw"Unable to locate global object"}(),_=w.atob||function(e){return w.Buffer.from(e,"base64").toString("binary")};function E(e){for(var t=_(e),n=new Uint8Array(t.length),r=0;r1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return e.seconds.isZero()||t.uint32(8).int64(e.seconds),0!==e.nanos&&t.uint32(16).int32(e.nanos),t},decode:function(e,t){for(var n=e instanceof o.default.Reader?e:new o.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},a);n.pos>>3){case 1:i.seconds=n.int64();break;case 2:i.nanos=n.int32();break;default:n.skipType(7&s)}}return i},fromJSON:function(e){var t=Object.assign({},a);return t.seconds=void 0!==e.seconds&&null!==e.seconds?i.default.fromString(e.seconds):i.default.ZERO,t.nanos=void 0!==e.nanos&&null!==e.nanos?Number(e.nanos):0,t},toJSON:function(e){var t={};return void 0!==e.seconds&&(t.seconds=(e.seconds||i.default.ZERO).toString()),void 0!==e.nanos&&(t.nanos=e.nanos),t},fromPartial:function(e){var t,n=Object.assign({},a);return n.seconds=void 0!==e.seconds&&null!==e.seconds?i.default.fromValue(e.seconds):i.default.ZERO,n.nanos=null!==(t=e.nanos)&&void 0!==t?t:0,n}},o.default.util.Long!==i.default&&(o.default.util.Long=i.default,o.default.configure())},function(e,t,n){"use strict";var r=n(19).default,i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Params=t.Height=t.ClientUpdateProposal=t.ClientConsensusStates=t.ConsensusStateWithHeight=t.IdentifiedClientState=t.protobufPackage=void 0;var o=i(n(18)),a=i(n(21)),s=n(55);t.protobufPackage="ibc.core.client.v1";var u={clientId:""};t.IdentifiedClientState={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return""!==e.clientId&&t.uint32(10).string(e.clientId),void 0!==e.clientState&&s.Any.encode(e.clientState,t.uint32(18).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof a.default.Reader?e:new a.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},u);n.pos>>3){case 1:i.clientId=n.string();break;case 2:i.clientState=s.Any.decode(n,n.uint32());break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t=Object.assign({},u);return t.clientId=void 0!==e.clientId&&null!==e.clientId?String(e.clientId):"",t.clientState=void 0!==e.clientState&&null!==e.clientState?s.Any.fromJSON(e.clientState):void 0,t},toJSON:function(e){var t={};return void 0!==e.clientId&&(t.clientId=e.clientId),void 0!==e.clientState&&(t.clientState=e.clientState?s.Any.toJSON(e.clientState):void 0),t},fromPartial:function(e){var t,n=Object.assign({},u);return n.clientId=null!==(t=e.clientId)&&void 0!==t?t:"",n.clientState=void 0!==e.clientState&&null!==e.clientState?s.Any.fromPartial(e.clientState):void 0,n}};var c={};t.ConsensusStateWithHeight={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return void 0!==e.height&&t.Height.encode(e.height,n.uint32(10).fork()).ldelim(),void 0!==e.consensusState&&s.Any.encode(e.consensusState,n.uint32(18).fork()).ldelim(),n},decode:function(e,n){for(var r=e instanceof a.default.Reader?e:new a.default.Reader(e),i=void 0===n?r.len:r.pos+n,o=Object.assign({},c);r.pos>>3){case 1:o.height=t.Height.decode(r,r.uint32());break;case 2:o.consensusState=s.Any.decode(r,r.uint32());break;default:r.skipType(7&u)}}return o},fromJSON:function(e){var n=Object.assign({},c);return n.height=void 0!==e.height&&null!==e.height?t.Height.fromJSON(e.height):void 0,n.consensusState=void 0!==e.consensusState&&null!==e.consensusState?s.Any.fromJSON(e.consensusState):void 0,n},toJSON:function(e){var n={};return void 0!==e.height&&(n.height=e.height?t.Height.toJSON(e.height):void 0),void 0!==e.consensusState&&(n.consensusState=e.consensusState?s.Any.toJSON(e.consensusState):void 0),n},fromPartial:function(e){var n=Object.assign({},c);return n.height=void 0!==e.height&&null!==e.height?t.Height.fromPartial(e.height):void 0,n.consensusState=void 0!==e.consensusState&&null!==e.consensusState?s.Any.fromPartial(e.consensusState):void 0,n}};var l={clientId:""};t.ClientConsensusStates={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();""!==e.clientId&&n.uint32(10).string(e.clientId);var i,o=r(e.consensusStates);try{for(o.s();!(i=o.n()).done;){var s=i.value;t.ConsensusStateWithHeight.encode(s,n.uint32(18).fork()).ldelim()}}catch(u){o.e(u)}finally{o.f()}return n},decode:function(e,n){var r=e instanceof a.default.Reader?e:new a.default.Reader(e),i=void 0===n?r.len:r.pos+n,o=Object.assign({},l);for(o.consensusStates=[];r.pos>>3){case 1:o.clientId=r.string();break;case 2:o.consensusStates.push(t.ConsensusStateWithHeight.decode(r,r.uint32()));break;default:r.skipType(7&s)}}return o},fromJSON:function(e){var n,r=Object.assign({},l);return r.clientId=void 0!==e.clientId&&null!==e.clientId?String(e.clientId):"",r.consensusStates=(null!==(n=e.consensusStates)&&void 0!==n?n:[]).map((function(e){return t.ConsensusStateWithHeight.fromJSON(e)})),r},toJSON:function(e){var n={};return void 0!==e.clientId&&(n.clientId=e.clientId),e.consensusStates?n.consensusStates=e.consensusStates.map((function(e){return e?t.ConsensusStateWithHeight.toJSON(e):void 0})):n.consensusStates=[],n},fromPartial:function(e){var n,r,i=Object.assign({},l);return i.clientId=null!==(n=e.clientId)&&void 0!==n?n:"",i.consensusStates=(null===(r=e.consensusStates)||void 0===r?void 0:r.map((function(e){return t.ConsensusStateWithHeight.fromPartial(e)})))||[],i}};var f={title:"",description:"",clientId:""};t.ClientUpdateProposal={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return""!==e.title&&t.uint32(10).string(e.title),""!==e.description&&t.uint32(18).string(e.description),""!==e.clientId&&t.uint32(26).string(e.clientId),void 0!==e.header&&s.Any.encode(e.header,t.uint32(34).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof a.default.Reader?e:new a.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},f);n.pos>>3){case 1:i.title=n.string();break;case 2:i.description=n.string();break;case 3:i.clientId=n.string();break;case 4:i.header=s.Any.decode(n,n.uint32());break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t=Object.assign({},f);return t.title=void 0!==e.title&&null!==e.title?String(e.title):"",t.description=void 0!==e.description&&null!==e.description?String(e.description):"",t.clientId=void 0!==e.clientId&&null!==e.clientId?String(e.clientId):"",t.header=void 0!==e.header&&null!==e.header?s.Any.fromJSON(e.header):void 0,t},toJSON:function(e){var t={};return void 0!==e.title&&(t.title=e.title),void 0!==e.description&&(t.description=e.description),void 0!==e.clientId&&(t.clientId=e.clientId),void 0!==e.header&&(t.header=e.header?s.Any.toJSON(e.header):void 0),t},fromPartial:function(e){var t,n,r,i=Object.assign({},f);return i.title=null!==(t=e.title)&&void 0!==t?t:"",i.description=null!==(n=e.description)&&void 0!==n?n:"",i.clientId=null!==(r=e.clientId)&&void 0!==r?r:"",i.header=void 0!==e.header&&null!==e.header?s.Any.fromPartial(e.header):void 0,i}};var d={revisionNumber:o.default.UZERO,revisionHeight:o.default.UZERO};t.Height={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return e.revisionNumber.isZero()||t.uint32(8).uint64(e.revisionNumber),e.revisionHeight.isZero()||t.uint32(16).uint64(e.revisionHeight),t},decode:function(e,t){for(var n=e instanceof a.default.Reader?e:new a.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},d);n.pos>>3){case 1:i.revisionNumber=n.uint64();break;case 2:i.revisionHeight=n.uint64();break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t=Object.assign({},d);return t.revisionNumber=void 0!==e.revisionNumber&&null!==e.revisionNumber?o.default.fromString(e.revisionNumber):o.default.UZERO,t.revisionHeight=void 0!==e.revisionHeight&&null!==e.revisionHeight?o.default.fromString(e.revisionHeight):o.default.UZERO,t},toJSON:function(e){var t={};return void 0!==e.revisionNumber&&(t.revisionNumber=(e.revisionNumber||o.default.UZERO).toString()),void 0!==e.revisionHeight&&(t.revisionHeight=(e.revisionHeight||o.default.UZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},d);return t.revisionNumber=void 0!==e.revisionNumber&&null!==e.revisionNumber?o.default.fromValue(e.revisionNumber):o.default.UZERO,t.revisionHeight=void 0!==e.revisionHeight&&null!==e.revisionHeight?o.default.fromValue(e.revisionHeight):o.default.UZERO,t}};var h={allowedClients:""};t.Params={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create(),i=r(e.allowedClients);try{for(i.s();!(t=i.n()).done;){var o=t.value;n.uint32(10).string(o)}}catch(s){i.e(s)}finally{i.f()}return n},decode:function(e,t){var n=e instanceof a.default.Reader?e:new a.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},h);for(i.allowedClients=[];n.pos>>3===1)i.allowedClients.push(n.string());else n.skipType(7&o)}return i},fromJSON:function(e){var t,n=Object.assign({},h);return n.allowedClients=(null!==(t=e.allowedClients)&&void 0!==t?t:[]).map((function(e){return String(e)})),n},toJSON:function(e){var t={};return e.allowedClients?t.allowedClients=e.allowedClients.map((function(e){return e})):t.allowedClients=[],t},fromPartial:function(e){var t,n=Object.assign({},h);return n.allowedClients=(null===(t=e.allowedClients)||void 0===t?void 0:t.map((function(e){return e})))||[],n}},a.default.util.Long!==o.default&&(a.default.util.Long=o.default,a.default.configure())},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.coins=t.coin=t.executeKdf=t.makeSignDoc=t.makeSignBytes=t.makeAuthInfoBytes=t.isOfflineDirectSigner=t.Registry=t.isTxBodyEncodeObject=t.isTsProtoGeneratedType=t.isPbjsGeneratedType=t.encodePubkey=t.decodePubkey=t.makeCosmoshubPath=t.DirectSecp256k1Wallet=t.extractKdfConfiguration=t.DirectSecp256k1HdWallet=t.decodeTxRaw=t.parseCoins=void 0;var r=n(969);Object.defineProperty(t,"parseCoins",{enumerable:!0,get:function(){return r.parseCoins}});var i=n(970);Object.defineProperty(t,"decodeTxRaw",{enumerable:!0,get:function(){return i.decodeTxRaw}});var o=n(971);Object.defineProperty(t,"DirectSecp256k1HdWallet",{enumerable:!0,get:function(){return o.DirectSecp256k1HdWallet}}),Object.defineProperty(t,"extractKdfConfiguration",{enumerable:!0,get:function(){return o.extractKdfConfiguration}});var a=n(972);Object.defineProperty(t,"DirectSecp256k1Wallet",{enumerable:!0,get:function(){return a.DirectSecp256k1Wallet}});var s=n(973);Object.defineProperty(t,"makeCosmoshubPath",{enumerable:!0,get:function(){return s.makeCosmoshubPath}});var u=n(974);Object.defineProperty(t,"decodePubkey",{enumerable:!0,get:function(){return u.decodePubkey}}),Object.defineProperty(t,"encodePubkey",{enumerable:!0,get:function(){return u.encodePubkey}});var c=n(977);Object.defineProperty(t,"isPbjsGeneratedType",{enumerable:!0,get:function(){return c.isPbjsGeneratedType}}),Object.defineProperty(t,"isTsProtoGeneratedType",{enumerable:!0,get:function(){return c.isTsProtoGeneratedType}}),Object.defineProperty(t,"isTxBodyEncodeObject",{enumerable:!0,get:function(){return c.isTxBodyEncodeObject}}),Object.defineProperty(t,"Registry",{enumerable:!0,get:function(){return c.Registry}});var l=n(978);Object.defineProperty(t,"isOfflineDirectSigner",{enumerable:!0,get:function(){return l.isOfflineDirectSigner}});var f=n(282);Object.defineProperty(t,"makeAuthInfoBytes",{enumerable:!0,get:function(){return f.makeAuthInfoBytes}}),Object.defineProperty(t,"makeSignBytes",{enumerable:!0,get:function(){return f.makeSignBytes}}),Object.defineProperty(t,"makeSignDoc",{enumerable:!0,get:function(){return f.makeSignDoc}});var d=n(454);Object.defineProperty(t,"executeKdf",{enumerable:!0,get:function(){return d.executeKdf}});var h=n(101);Object.defineProperty(t,"coin",{enumerable:!0,get:function(){return h.coin}}),Object.defineProperty(t,"coins",{enumerable:!0,get:function(){return h.coins}})},function(e,t){e.exports=function(){}},function(e,t,n){"use strict";var r=n(180),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function u(e){return r.isMemo(e)?a:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var c=Object.defineProperty,l=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(p){var i=h(n);i&&i!==p&&e(t,i,r)}var a=l(n);f&&(a=a.concat(f(n)));for(var s=u(t),g=u(n),v=0;v40)throw new Error('"version" should be in range from 1 to 40');return 4*e+17},t.getSymbolTotalCodewords=function(e){return r[e]},t.getBCHDigit=function(e){for(var t=0;0!==e;)t++,e>>>=1;return t},t.setToSJISFunction=function(e){if("function"!==typeof e)throw new Error('"toSJISFunc" is not a valid function.');n=e},t.isKanjiModeEnabled=function(){return"undefined"!==typeof n},t.toSJIS=function(e){return n(e)}},function(e,t,n){var r=n(349),i=n(350);t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(e,t){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!r.isValid(t))throw new Error("Invalid version: "+t);return t>=1&&t<10?e.ccBits[0]:t<27?e.ccBits[1]:e.ccBits[2]},t.getBestModeForData=function(e){return i.testNumeric(e)?t.NUMERIC:i.testAlphanumeric(e)?t.ALPHANUMERIC:i.testKanji(e)?t.KANJI:t.BYTE},t.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},t.isValid=function(e){return e&&e.bit&&e.ccBits},t.from=function(e,n){if(t.isValid(e))return e;try{return function(e){if("string"!==typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+e)}}(e)}catch(r){return n}}},function(e,t,n){"use strict";var r=n(201),i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=f;var o=Object.create(n(167));o.inherits=n(24);var a=n(357),s=n(242);o.inherits(f,a);for(var u=i(s.prototype),c=0;c=o)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(t){return"[Circular]"}default:return e}})),u=r[n];n=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),p(n)?r.showHidden=n:n&&t._extend(r,n),A(r.showHidden)&&(r.showHidden=!1),A(r.depth)&&(r.depth=2),A(r.colors)&&(r.colors=!1),A(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=u),l(r,e,r.depth)}function u(e,t){var n=s.styles[t];return n?"\x1b["+s.colors[n][0]+"m"+e+"\x1b["+s.colors[n][1]+"m":e}function c(e,t){return e}function l(e,n,r){if(e.customInspect&&n&&E(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,e);return m(i)||(i=l(e,i,r)),i}var o=function(e,t){if(A(t))return e.stylize("undefined","undefined");if(m(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(v(t))return e.stylize(""+t,"number");if(p(t))return e.stylize(""+t,"boolean");if(g(t))return e.stylize("null","null")}(e,n);if(o)return o;var a=Object.keys(n),s=function(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(n)),_(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return f(n);if(0===a.length){if(E(n)){var u=n.name?": "+n.name:"";return e.stylize("[Function"+u+"]","special")}if(y(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(w(n))return e.stylize(Date.prototype.toString.call(n),"date");if(_(n))return f(n)}var c,b="",k=!1,I=["{","}"];(h(n)&&(k=!0,I=["[","]"]),E(n))&&(b=" [Function"+(n.name?": "+n.name:"")+"]");return y(n)&&(b=" "+RegExp.prototype.toString.call(n)),w(n)&&(b=" "+Date.prototype.toUTCString.call(n)),_(n)&&(b=" "+f(n)),0!==a.length||k&&0!=n.length?r<0?y(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),c=k?function(e,t,n,r,i){for(var o=[],a=0,s=t.length;a=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1];return n[0]+t+" "+e.join(", ")+" "+n[1]}(c,b,I)):I[0]+b+I[1]}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function d(e,t,n,r,i,o){var a,s,u;if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(s=e.stylize("[Setter]","special")),x(r,i)||(a="["+i+"]"),s||(e.seen.indexOf(u.value)<0?(s=g(n)?l(e,u.value,null):l(e,u.value,n-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),A(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function h(e){return Array.isArray(e)}function p(e){return"boolean"===typeof e}function g(e){return null===e}function v(e){return"number"===typeof e}function m(e){return"string"===typeof e}function A(e){return void 0===e}function y(e){return b(e)&&"[object RegExp]"===k(e)}function b(e){return"object"===typeof e&&null!==e}function w(e){return b(e)&&"[object Date]"===k(e)}function _(e){return b(e)&&("[object Error]"===k(e)||e instanceof Error)}function E(e){return"function"===typeof e}function k(e){return Object.prototype.toString.call(e)}function I(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(n){if(A(o)&&(o=Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_CHAIN_ID:"42161",REACT_APP_ETHEREUM_RPC:"https://eth-mainnet.public.blastapi.io",REACT_APP_NODE_1:"https://arb1.arbitrum.io/rpc"}).NODE_DEBUG||""),n=n.toUpperCase(),!a[n])if(new RegExp("\\b"+n+"\\b","i").test(o)){var r=e.pid;a[n]=function(){var e=t.format.apply(t,arguments);console.error("%s %d: %s",n,r,e)}}else a[n]=function(){};return a[n]},t.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=h,t.isBoolean=p,t.isNull=g,t.isNullOrUndefined=function(e){return null==e},t.isNumber=v,t.isString=m,t.isSymbol=function(e){return"symbol"===typeof e},t.isUndefined=A,t.isRegExp=y,t.isObject=b,t.isDate=w,t.isError=_,t.isFunction=E,t.isPrimitive=function(e){return null===e||"boolean"===typeof e||"number"===typeof e||"string"===typeof e||"symbol"===typeof e||"undefined"===typeof e},t.isBuffer=n(718);var C=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function S(){var e=new Date,t=[I(e.getHours()),I(e.getMinutes()),I(e.getSeconds())].join(":");return[e.getDate(),C[e.getMonth()],t].join(" ")}function x(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",S(),t.format.apply(t,arguments))},t.inherits=n(719),t._extend=function(e,t){if(!t||!b(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e};var B="undefined"!==typeof Symbol?Symbol("util.promisify.custom"):void 0;function O(e,t){if(!e){var n=new Error("Promise was rejected with a falsy value");n.reason=e,e=n}return t(e)}t.promisify=function(e){if("function"!==typeof e)throw new TypeError('The "original" argument must be of type Function');if(B&&e[B]){var t;if("function"!==typeof(t=e[B]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,B,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,n,r=new Promise((function(e,r){t=e,n=r})),i=[],o=0;oo)throw new RangeError("requested too many random bytes");var n=a.allocUnsafe(e);if(e>0)if(e>i)for(var u=0;u40)throw new Error('"version" should be in range from 1 to 40');return 4*e+17},t.getSymbolTotalCodewords=function(e){return r[e]},t.getBCHDigit=function(e){for(var t=0;0!==e;)t++,e>>>=1;return t},t.setToSJISFunction=function(e){if("function"!==typeof e)throw new Error('"toSJISFunc" is not a valid function.');n=e},t.isKanjiModeEnabled=function(){return"undefined"!==typeof n},t.toSJIS=function(e){return n(e)}},function(e,t,n){var r=n(404),i=n(405);t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(e,t){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!r.isValid(t))throw new Error("Invalid version: "+t);return t>=1&&t<10?e.ccBits[0]:t<27?e.ccBits[1]:e.ccBits[2]},t.getBestModeForData=function(e){return i.testNumeric(e)?t.NUMERIC:i.testAlphanumeric(e)?t.ALPHANUMERIC:i.testKanji(e)?t.KANJI:t.BYTE},t.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},t.isValid=function(e){return e&&e.bit&&e.ccBits},t.from=function(e,n){if(t.isValid(e))return e;try{return function(e){if("string"!==typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+e)}}(e)}catch(r){return n}}},function(e,t,n){"use strict";var r=n(9).default,i=n(10).default,o=n(28).default,a=n(29).default;Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytes=t.wrapConstructorWithOpts=t.wrapConstructor=t.checkOpts=t.Hash=t.concatBytes=t.toBytes=t.utf8ToBytes=t.asyncLoop=t.nextTick=t.hexToBytes=t.bytesToHex=t.isLE=t.rotr=t.createView=t.u32=t.u8=void 0;var s=n(885);t.u8=function(e){return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)};t.u32=function(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))};t.createView=function(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)};if(t.rotr=function(e,t){return e<<32-t|e>>>t},t.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!t.isLE)throw new Error("Non little-endian hardware is not supported");var u=Array.from({length:256},(function(e,t){return t.toString(16).padStart(2,"0")}));t.bytesToHex=function(e){if(!(e instanceof Uint8Array))throw new Error("Uint8Array expected");for(var t="",n=0;n=0&&u0&&void 0!==arguments[0]?arguments[0]:32;if(s.crypto.web)return s.crypto.web.getRandomValues(new Uint8Array(e));if(s.crypto.node)return new Uint8Array(s.crypto.node.randomBytes(e).buffer);throw new Error("The environment doesn't have randomBytes function")}},function(e,t,n){"use strict";(function(e){var r=t;function i(e,t,n){for(var r=Object.keys(t),i=0;i0)},r.Buffer=function(){try{var e=r.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(t){return null}}(),r._Buffer_from=null,r._Buffer_allocUnsafe=null,r.newBuffer=function(e){return"number"===typeof e?r.Buffer?r._Buffer_allocUnsafe(e):new r.Array(e):r.Buffer?r._Buffer_from(e):"undefined"===typeof Uint8Array?e:new Uint8Array(e)},r.Array="undefined"!==typeof Uint8Array?Uint8Array:Array,r.Long=r.global.dcodeIO&&r.global.dcodeIO.Long||r.global.Long||r.inquire("long"),r.key2Re=/^true|false|0|1$/,r.key32Re=/^-?(?:0|[1-9][0-9]*)$/,r.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,r.longToHash=function(e){return e?r.LongBits.from(e).toHash():r.LongBits.zeroHash},r.longFromHash=function(e,t){var n=r.LongBits.fromHash(e);return r.Long?r.Long.fromBits(n.lo,n.hi,t):n.toNumber(Boolean(t))},r.merge=i,r.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},r.newError=o,r.ProtocolError=o("ProtocolError"),r.oneOfGetter=function(e){for(var t={},n=0;n-1;--n)if(1===t[e[n]]&&void 0!==this[e[n]]&&null!==this[e[n]])return e[n]}},r.oneOfSetter=function(e){return function(t){for(var n=0;n=this.max&&t._n(e)},e.prototype._e=function(e){var t=this.out;t!==s&&t._e(e)},e.prototype._c=function(){var e=this.out;e!==s&&e._c()},e}(),k=function(){function e(e,t){this.out=e,this.op=t}return e.prototype._n=function(){this.op.end()},e.prototype._e=function(e){this.out._e(e)},e.prototype._c=function(){this.op.end()},e}(),I=function(){function e(e,t){this.type="endWhen",this.ins=t,this.out=s,this.o=e,this.oil=f}return e.prototype._start=function(e){this.out=e,this.o._add(this.oil=new k(e,this)),this.ins._add(this)},e.prototype._stop=function(){this.ins._remove(this),this.o._remove(this.oil),this.out=s,this.oil=f},e.prototype.end=function(){var e=this.out;e!==s&&e._c()},e.prototype._n=function(e){var t=this.out;t!==s&&t._n(e)},e.prototype._e=function(e){var t=this.out;t!==s&&t._e(e)},e.prototype._c=function(){this.end()},e}(),C=function(){function e(e,t){this.type="filter",this.ins=t,this.out=s,this.f=e}return e.prototype._start=function(e){this.out=e,this.ins._add(this)},e.prototype._stop=function(){this.ins._remove(this),this.out=s},e.prototype._n=function(e){var t=this.out;if(t!==s){var n=l(this,e,t);n!==s&&n&&t._n(e)}},e.prototype._e=function(e){var t=this.out;t!==s&&t._e(e)},e.prototype._c=function(){var e=this.out;e!==s&&e._c()},e}(),S=function(){function e(e,t){this.out=e,this.op=t}return e.prototype._n=function(e){this.out._n(e)},e.prototype._e=function(e){this.out._e(e)},e.prototype._c=function(){this.op.inner=s,this.op.less()},e}(),x=function(){function e(e){this.type="flatten",this.ins=e,this.out=s,this.open=!0,this.inner=s,this.il=f}return e.prototype._start=function(e){this.out=e,this.open=!0,this.inner=s,this.il=f,this.ins._add(this)},e.prototype._stop=function(){this.ins._remove(this),this.inner!==s&&this.inner._remove(this.il),this.out=s,this.open=!0,this.inner=s,this.il=f},e.prototype.less=function(){var e=this.out;e!==s&&(this.open||this.inner!==s||e._c())},e.prototype._n=function(e){var t=this.out;if(t!==s){var n=this.inner,r=this.il;n!==s&&r!==f&&n._remove(r),(this.inner=e)._add(this.il=new S(t,this))}},e.prototype._e=function(e){var t=this.out;t!==s&&t._e(e)},e.prototype._c=function(){this.open=!1,this.less()},e}(),B=function(){function e(e,t,n){var r=this;this.type="fold",this.ins=n,this.out=s,this.f=function(t){return e(r.acc,t)},this.acc=this.seed=t}return e.prototype._start=function(e){this.out=e,this.acc=this.seed,e._n(this.acc),this.ins._add(this)},e.prototype._stop=function(){this.ins._remove(this),this.out=s,this.acc=this.seed},e.prototype._n=function(e){var t=this.out;if(t!==s){var n=l(this,e,t);n!==s&&t._n(this.acc=n)}},e.prototype._e=function(e){var t=this.out;t!==s&&t._e(e)},e.prototype._c=function(){var e=this.out;e!==s&&e._c()},e}(),O=function(){function e(e){this.type="last",this.ins=e,this.out=s,this.has=!1,this.val=s}return e.prototype._start=function(e){this.out=e,this.has=!1,this.ins._add(this)},e.prototype._stop=function(){this.ins._remove(this),this.out=s,this.val=s},e.prototype._n=function(e){this.has=!0,this.val=e},e.prototype._e=function(e){var t=this.out;t!==s&&t._e(e)},e.prototype._c=function(){var e=this.out;e!==s&&(this.has?(e._n(this.val),e._c()):e._e(new Error("last() failed because input stream completed")))},e}(),M=function(){function e(e,t){this.type="map",this.ins=t,this.out=s,this.f=e}return e.prototype._start=function(e){this.out=e,this.ins._add(this)},e.prototype._stop=function(){this.ins._remove(this),this.out=s},e.prototype._n=function(e){var t=this.out;if(t!==s){var n=l(this,e,t);n!==s&&t._n(n)}},e.prototype._e=function(e){var t=this.out;t!==s&&t._e(e)},e.prototype._c=function(){var e=this.out;e!==s&&e._c()},e}(),P=function(){function e(e){this.type="remember",this.ins=e,this.out=s}return e.prototype._start=function(e){this.out=e,this.ins._add(e)},e.prototype._stop=function(){this.ins._remove(this.out),this.out=s},e}(),R=function(){function e(e,t){this.type="replaceError",this.ins=t,this.out=s,this.f=e}return e.prototype._start=function(e){this.out=e,this.ins._add(this)},e.prototype._stop=function(){this.ins._remove(this),this.out=s},e.prototype._n=function(e){var t=this.out;t!==s&&t._n(e)},e.prototype._e=function(e){var t=this.out;if(t!==s)try{this.ins._remove(this),(this.ins=this.f(e))._add(this)}catch(n){t._e(n)}},e.prototype._c=function(){var e=this.out;e!==s&&e._c()},e}(),N=function(){function e(e,t){this.type="startWith",this.ins=e,this.out=s,this.val=t}return e.prototype._start=function(e){this.out=e,this.out._n(this.val),this.ins._add(e)},e.prototype._stop=function(){this.ins._remove(this.out),this.out=s},e}(),T=function(){function e(e,t){this.type="take",this.ins=t,this.out=s,this.max=e,this.taken=0}return e.prototype._start=function(e){this.out=e,this.taken=0,this.max<=0?e._c():this.ins._add(this)},e.prototype._stop=function(){this.ins._remove(this),this.out=s},e.prototype._n=function(e){var t=this.out;if(t!==s){var n=++this.taken;n1))if(this._stopID!==s)clearTimeout(this._stopID),this._stopID=s;else{var r=this._prod;r!==s&&r._start(this)}},e.prototype._remove=function(e){var t=this,n=this._target;if(n)return n._remove(e);var r=this._ils,i=r.indexOf(e);i>-1&&(r.splice(i,1),this._prod!==s&&r.length<=0?(this._err=s,this._stopID=setTimeout((function(){return t._stopNow()}))):1===r.length&&this._pruneCycles())},e.prototype._pruneCycles=function(){this._hasNoSinks(this,[])&&this._remove(this._ils[0])},e.prototype._hasNoSinks=function(e,t){if(-1!==t.indexOf(e))return!0;if(e.out===this)return!0;if(e.out&&e.out!==s)return this._hasNoSinks(e.out,t.concat(e));if(e._ils){for(var n=0,r=e._ils.length;n1)this._has&&e._n(this._v);else if(this._stopID!==s)this._has&&e._n(this._v),clearTimeout(this._stopID),this._stopID=s;else if(this._has)e._n(this._v);else{var r=this._prod;r!==s&&r._start(this)}},t.prototype._stopNow=function(){this._has=!1,e.prototype._stopNow.call(this)},t.prototype._x=function(){this._has=!1,e.prototype._x.call(this)},t.prototype.map=function(e){return this._map(e)},t.prototype.mapTo=function(t){return e.prototype.mapTo.call(this,t)},t.prototype.take=function(t){return e.prototype.take.call(this,t)},t.prototype.endWhen=function(t){return e.prototype.endWhen.call(this,t)},t.prototype.replaceError=function(t){return e.prototype.replaceError.call(this,t)},t.prototype.remember=function(){return this},t.prototype.debug=function(t){return e.prototype.debug.call(this,t)},t}(Q);t.MemoryStream=D;var j=Q;t.default=j},,,,,function(e,t,n){"use strict";n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a}));var r=n(65);function i(e){return r.c.includes(e)}function o(e){return Object.keys(r.f).includes(e)?r.f[e]:r.f[r.a]}function a(e){var t=Object.values(r.f).find((function(t){return t.code===e}));return t||r.f[r.a]}},,function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,n){"use strict";var r=n(239);o.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(t){return!1}}();var i=o.TYPED_ARRAY_SUPPORT?2147483647:1073741823;function o(e,t,n){return o.TYPED_ARRAY_SUPPORT||this instanceof o?"number"===typeof e?u(this,e):function(e,t,n,r){if("number"===typeof t)throw new TypeError('"value" argument must not be a number');if("undefined"!==typeof ArrayBuffer&&t instanceof ArrayBuffer)return function(e,t,n,r){if(n<0||t.byteLength=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return 0|e}function s(e,t){var n;return o.TYPED_ARRAY_SUPPORT?(n=new Uint8Array(t)).__proto__=o.prototype:(null===(n=e)&&(n=new o(t)),n.length=t),n}function u(e,t){var n=s(e,t<0?0:0|a(t));if(!o.TYPED_ARRAY_SUPPORT)for(var r=0;r55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function f(e){return o.isBuffer(e)?e.length:"undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer)?e.byteLength:("string"!==typeof e&&(e=""+e),0===e.length?0:l(e).length)}o.TYPED_ARRAY_SUPPORT&&(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,"undefined"!==typeof Symbol&&Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1})),o.prototype.write=function(e,t,n){void 0===t||void 0===n&&"string"===typeof t?(n=this.length,t=0):isFinite(t)&&(t|=0,isFinite(n)?n|=0:n=void 0);var r=this.length-t;if((void 0===n||n>r)&&(n=r),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");return function(e,t,n,r){return function(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}(l(t,e.length-n),e,n,r)}(this,e,t,n)},o.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--i)e[i+t]=this[i+n];else if(a<1e3||!o.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"===typeof e)for(i=t;i2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}i("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(e,t,n){var r,i,a,s;if("string"===typeof t&&(i="not ",t.substr(!a||a<0?0:+a,i.length)===i)?(r="must not be",t=t.replace(/^not /,"")):r="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))s="The ".concat(e," ").concat(r," ").concat(o(t,"type"));else{var u=function(e,t,n){return"number"!==typeof n&&(n=0),!(n+t.length>e.length)&&-1!==e.indexOf(t,n)}(e,".")?"property":"argument";s='The "'.concat(e,'" ').concat(u," ").concat(r," ").concat(o(t,"type"))}return s+=". Received type ".concat(typeof n)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=r},function(e,t,n){"use strict";(function(t){var r=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=c;var i=n(365),o=n(369);n(24)(c,i);for(var a=r(o.prototype),s=0;s2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}i("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(e,t,n){var r,i,a,s;if("string"===typeof t&&(i="not ",t.substr(!a||a<0?0:+a,i.length)===i)?(r="must not be",t=t.replace(/^not /,"")):r="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))s="The ".concat(e," ").concat(r," ").concat(o(t,"type"));else{var u=function(e,t,n){return"number"!==typeof n&&(n=0),!(n+t.length>e.length)&&-1!==e.indexOf(t,n)}(e,".")?"property":"argument";s='The "'.concat(e,'" ').concat(u," ").concat(r," ").concat(o(t,"type"))}return s+=". Received type ".concat(typeof n)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=r},function(e,t,n){"use strict";(function(t){var r=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=c;var i=n(376),o=n(380);n(24)(c,i);for(var a=r(o.prototype),s=0;s=this._finalSize&&(this._update(this._block),this._block.fill(0));var n=8*this._len;if(n<=4294967295)this._block.writeUInt32BE(n,this._blockSize-4);else{var r=(4294967295&n)>>>0,i=(n-r)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=i},function(e,t,n){"use strict";(function(t){var r=n(384),i=n(773);function o(e){var t=e;if("string"!==typeof t)throw new Error("[ethjs-util] while padding to even, value must be string, is currently "+typeof t+", while padToEven.");return t.length%2&&(t="0"+t),t}function a(e){return"0x"+e.toString(16)}e.exports={arrayContainsArray:function(e,t,n){if(!0!==Array.isArray(e))throw new Error("[ethjs-util] method arrayContainsArray requires input 'superset' to be an array got type '"+typeof e+"'");if(!0!==Array.isArray(t))throw new Error("[ethjs-util] method arrayContainsArray requires input 'subset' to be an array got type '"+typeof t+"'");return t[Boolean(n)?"some":"every"]((function(t){return e.indexOf(t)>=0}))},intToBuffer:function(e){var n=a(e);return new t(o(n.slice(2)),"hex")},getBinarySize:function(e){if("string"!==typeof e)throw new Error("[ethjs-util] while getting binary size, method getBinarySize requires input 'str' to be type String, got '"+typeof e+"'.");return t.byteLength(e,"utf8")},isHexPrefixed:r,stripHexPrefix:i,padToEven:o,intToHex:a,fromAscii:function(e){for(var t="",n=0;n2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}i("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(e,t,n){var r,i,a,s;if("string"===typeof t&&(i="not ",t.substr(!a||a<0?0:+a,i.length)===i)?(r="must not be",t=t.replace(/^not /,"")):r="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))s="The ".concat(e," ").concat(r," ").concat(o(t,"type"));else{var u=function(e,t,n){return"number"!==typeof n&&(n=0),!(n+t.length>e.length)&&-1!==e.indexOf(t,n)}(e,".")?"property":"argument";s='The "'.concat(e,'" ').concat(u," ").concat(r," ").concat(o(t,"type"))}return s+=". Received type ".concat(typeof n)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=r},function(e,t,n){"use strict";(function(t){var r=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=c;var i=n(425),o=n(429);n(24)(c,i);for(var a=r(o.prototype),s=0;s>5,this.byteCount=this.blockCount<<2,this.outputBlocks=n>>5,this.extraBytes=(31&n)>>3;for(var r=0;r<50;++r)this.s[r]=0}function D(e,t,n){Q.call(this,e,t,n)}Q.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var t,n=typeof e;if("string"!==n){if("object"!==n)throw new Error(a);if(null===e)throw new Error(a);if(d&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!d||!ArrayBuffer.isView(e)))throw new Error(a);t=!0}for(var r,i,o=this.blocks,s=this.byteCount,u=e.length,c=this.blockCount,l=0,f=this.s;l>2]|=e[l]<>2]|=i<>2]|=(192|i>>6)<>2]|=(128|63&i)<=57344?(o[r>>2]|=(224|i>>12)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<>2]|=(240|i>>18)<>2]|=(128|i>>12&63)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<=s){for(this.start=r-s,this.block=o[c],r=0;r>=8);n>0;)i.unshift(n),n=255&(e>>=8),++r;return t?i.push(r):i.unshift(r),this.update(i),i.length},Q.prototype.encodeString=function(e){var t,n=typeof e;if("string"!==n){if("object"!==n)throw new Error(a);if(null===e)throw new Error(a);if(d&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!d||!ArrayBuffer.isView(e)))throw new Error(a);t=!0}var r=0,i=e.length;if(t)r=i;else for(var o=0;o=57344?r+=3:(s=65536+((1023&s)<<10|1023&e.charCodeAt(++o)),r+=4)}return r+=this.encode(8*r),this.update(e),r},Q.prototype.bytepad=function(e,t){for(var n=this.encode(t),r=0;r>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[n],t=1;t>4&15]+h[15&e]+h[e>>12&15]+h[e>>8&15]+h[e>>20&15]+h[e>>16&15]+h[e>>28&15]+h[e>>24&15];a%t===0&&(j(n),o=0)}return i&&(e=n[o],s+=h[e>>4&15]+h[15&e],i>1&&(s+=h[e>>12&15]+h[e>>8&15]),i>2&&(s+=h[e>>20&15]+h[e>>16&15])),s},Q.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,n=this.s,r=this.outputBlocks,i=this.extraBytes,o=0,a=0,s=this.outputBits>>3;e=i?new ArrayBuffer(r+1<<2):new ArrayBuffer(s);for(var u=new Uint32Array(e);a>8&255,u[e+2]=t>>16&255,u[e+3]=t>>24&255;s%n===0&&j(r)}return o&&(e=s<<2,t=r[a],u[e]=255&t,o>1&&(u[e+1]=t>>8&255),o>2&&(u[e+2]=t>>16&255)),u},D.prototype=new Q,D.prototype.finalize=function(){return this.encode(this.outputBits,!0),Q.prototype.finalize.call(this)};var j=function(e){var t,n,r,i,o,a,s,u,c,l,f,d,h,p,g,m,A,y,b,w,_,E,k,I,C,S,x,B,O,M,P,R,N,T,Q,D,j,U,L,F,H,J,q,G,z,V,W,K,Y,Z,X,$,ee,te,ne,re,ie,oe,ae,se,ue,ce,le;for(r=0;r<48;r+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],a=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],u=e[4]^e[14]^e[24]^e[34]^e[44],c=e[5]^e[15]^e[25]^e[35]^e[45],l=e[6]^e[16]^e[26]^e[36]^e[46],f=e[7]^e[17]^e[27]^e[37]^e[47],t=(d=e[8]^e[18]^e[28]^e[38]^e[48])^(a<<1|s>>>31),n=(h=e[9]^e[19]^e[29]^e[39]^e[49])^(s<<1|a>>>31),e[0]^=t,e[1]^=n,e[10]^=t,e[11]^=n,e[20]^=t,e[21]^=n,e[30]^=t,e[31]^=n,e[40]^=t,e[41]^=n,t=i^(u<<1|c>>>31),n=o^(c<<1|u>>>31),e[2]^=t,e[3]^=n,e[12]^=t,e[13]^=n,e[22]^=t,e[23]^=n,e[32]^=t,e[33]^=n,e[42]^=t,e[43]^=n,t=a^(l<<1|f>>>31),n=s^(f<<1|l>>>31),e[4]^=t,e[5]^=n,e[14]^=t,e[15]^=n,e[24]^=t,e[25]^=n,e[34]^=t,e[35]^=n,e[44]^=t,e[45]^=n,t=u^(d<<1|h>>>31),n=c^(h<<1|d>>>31),e[6]^=t,e[7]^=n,e[16]^=t,e[17]^=n,e[26]^=t,e[27]^=n,e[36]^=t,e[37]^=n,e[46]^=t,e[47]^=n,t=l^(i<<1|o>>>31),n=f^(o<<1|i>>>31),e[8]^=t,e[9]^=n,e[18]^=t,e[19]^=n,e[28]^=t,e[29]^=n,e[38]^=t,e[39]^=n,e[48]^=t,e[49]^=n,p=e[0],g=e[1],V=e[11]<<4|e[10]>>>28,W=e[10]<<4|e[11]>>>28,B=e[20]<<3|e[21]>>>29,O=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ue=e[30]<<9|e[31]>>>23,J=e[40]<<18|e[41]>>>14,q=e[41]<<18|e[40]>>>14,T=e[2]<<1|e[3]>>>31,Q=e[3]<<1|e[2]>>>31,m=e[13]<<12|e[12]>>>20,A=e[12]<<12|e[13]>>>20,K=e[22]<<10|e[23]>>>22,Y=e[23]<<10|e[22]>>>22,M=e[33]<<13|e[32]>>>19,P=e[32]<<13|e[33]>>>19,ce=e[42]<<2|e[43]>>>30,le=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,ne=e[4]<<30|e[5]>>>2,D=e[14]<<6|e[15]>>>26,j=e[15]<<6|e[14]>>>26,y=e[25]<<11|e[24]>>>21,b=e[24]<<11|e[25]>>>21,Z=e[34]<<15|e[35]>>>17,X=e[35]<<15|e[34]>>>17,R=e[45]<<29|e[44]>>>3,N=e[44]<<29|e[45]>>>3,I=e[6]<<28|e[7]>>>4,C=e[7]<<28|e[6]>>>4,re=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,U=e[26]<<25|e[27]>>>7,L=e[27]<<25|e[26]>>>7,w=e[36]<<21|e[37]>>>11,_=e[37]<<21|e[36]>>>11,$=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,G=e[8]<<27|e[9]>>>5,z=e[9]<<27|e[8]>>>5,S=e[18]<<20|e[19]>>>12,x=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,F=e[38]<<8|e[39]>>>24,H=e[39]<<8|e[38]>>>24,E=e[48]<<14|e[49]>>>18,k=e[49]<<14|e[48]>>>18,e[0]=p^~m&y,e[1]=g^~A&b,e[10]=I^~S&B,e[11]=C^~x&O,e[20]=T^~D&U,e[21]=Q^~j&L,e[30]=G^~V&K,e[31]=z^~W&Y,e[40]=te^~re&oe,e[41]=ne^~ie&ae,e[2]=m^~y&w,e[3]=A^~b&_,e[12]=S^~B&M,e[13]=x^~O&P,e[22]=D^~U&F,e[23]=j^~L&H,e[32]=V^~K&Z,e[33]=W^~Y&X,e[42]=re^~oe&se,e[43]=ie^~ae&ue,e[4]=y^~w&E,e[5]=b^~_&k,e[14]=B^~M&R,e[15]=O^~P&N,e[24]=U^~F&J,e[25]=L^~H&q,e[34]=K^~Z&$,e[35]=Y^~X&ee,e[44]=oe^~se&ce,e[45]=ae^~ue&le,e[6]=w^~E&p,e[7]=_^~k&g,e[16]=M^~R&I,e[17]=P^~N&C,e[26]=F^~J&T,e[27]=H^~q&Q,e[36]=Z^~$&G,e[37]=X^~ee&z,e[46]=se^~ce&te,e[47]=ue^~le&ne,e[8]=E^~p&m,e[9]=k^~g&A,e[18]=R^~I&S,e[19]=N^~C&x,e[28]=J^~T&D,e[29]=q^~Q&j,e[38]=$^~G&V,e[39]=ee^~z&W,e[48]=ce^~te&re,e[49]=le^~ne&ie,e[0]^=v[r],e[1]^=v[r+1]};if(l)e.exports=x;else{for(O=0;O1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();void 0!==e.body&&t.TxBody.encode(e.body,n.uint32(10).fork()).ldelim(),void 0!==e.authInfo&&t.AuthInfo.encode(e.authInfo,n.uint32(18).fork()).ldelim();var i,o=r(e.signatures);try{for(o.s();!(i=o.n()).done;){var s=i.value;n.uint32(26).bytes(s)}}catch(u){o.e(u)}finally{o.f()}return n},decode:function(e,n){var r=e instanceof a.default.Reader?e:new a.default.Reader(e),i=void 0===n?r.len:r.pos+n,o=Object.assign({},f);for(o.signatures=[];r.pos>>3){case 1:o.body=t.TxBody.decode(r,r.uint32());break;case 2:o.authInfo=t.AuthInfo.decode(r,r.uint32());break;case 3:o.signatures.push(r.bytes());break;default:r.skipType(7&s)}}return o},fromJSON:function(e){var n=Object.assign({},f);if(n.signatures=[],void 0!==e.body&&null!==e.body?n.body=t.TxBody.fromJSON(e.body):n.body=void 0,void 0!==e.authInfo&&null!==e.authInfo?n.authInfo=t.AuthInfo.fromJSON(e.authInfo):n.authInfo=void 0,void 0!==e.signatures&&null!==e.signatures){var i,o=r(e.signatures);try{for(o.s();!(i=o.n()).done;){var a=i.value;n.signatures.push(E(a))}}catch(s){o.e(s)}finally{o.f()}}return n},toJSON:function(e){var n={};return void 0!==e.body&&(n.body=e.body?t.TxBody.toJSON(e.body):void 0),void 0!==e.authInfo&&(n.authInfo=e.authInfo?t.AuthInfo.toJSON(e.authInfo):void 0),e.signatures?n.signatures=e.signatures.map((function(e){return I(void 0!==e?e:new Uint8Array)})):n.signatures=[],n},fromPartial:function(e){var n=Object.assign({},f);if(void 0!==e.body&&null!==e.body?n.body=t.TxBody.fromPartial(e.body):n.body=void 0,void 0!==e.authInfo&&null!==e.authInfo?n.authInfo=t.AuthInfo.fromPartial(e.authInfo):n.authInfo=void 0,n.signatures=[],void 0!==e.signatures&&null!==e.signatures){var i,o=r(e.signatures);try{for(o.s();!(i=o.n()).done;){var a=i.value;n.signatures.push(a)}}catch(s){o.e(s)}finally{o.f()}}return n}};var d={};t.TxRaw={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();0!==e.bodyBytes.length&&t.uint32(10).bytes(e.bodyBytes),0!==e.authInfoBytes.length&&t.uint32(18).bytes(e.authInfoBytes);var n,i=r(e.signatures);try{for(i.s();!(n=i.n()).done;){var o=n.value;t.uint32(26).bytes(o)}}catch(s){i.e(s)}finally{i.f()}return t},decode:function(e,t){var n=e instanceof a.default.Reader?e:new a.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},d);for(i.signatures=[],i.bodyBytes=new Uint8Array,i.authInfoBytes=new Uint8Array;n.pos>>3){case 1:i.bodyBytes=n.bytes();break;case 2:i.authInfoBytes=n.bytes();break;case 3:i.signatures.push(n.bytes());break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t=Object.assign({},d);if(t.signatures=[],t.bodyBytes=new Uint8Array,t.authInfoBytes=new Uint8Array,void 0!==e.bodyBytes&&null!==e.bodyBytes&&(t.bodyBytes=E(e.bodyBytes)),void 0!==e.authInfoBytes&&null!==e.authInfoBytes&&(t.authInfoBytes=E(e.authInfoBytes)),void 0!==e.signatures&&null!==e.signatures){var n,i=r(e.signatures);try{for(i.s();!(n=i.n()).done;){var o=n.value;t.signatures.push(E(o))}}catch(a){i.e(a)}finally{i.f()}}return t},toJSON:function(e){var t={};return void 0!==e.bodyBytes&&(t.bodyBytes=I(void 0!==e.bodyBytes?e.bodyBytes:new Uint8Array)),void 0!==e.authInfoBytes&&(t.authInfoBytes=I(void 0!==e.authInfoBytes?e.authInfoBytes:new Uint8Array)),e.signatures?t.signatures=e.signatures.map((function(e){return I(void 0!==e?e:new Uint8Array)})):t.signatures=[],t},fromPartial:function(e){var t,n,i=Object.assign({},d);if(i.bodyBytes=null!==(t=e.bodyBytes)&&void 0!==t?t:new Uint8Array,i.authInfoBytes=null!==(n=e.authInfoBytes)&&void 0!==n?n:new Uint8Array,i.signatures=[],void 0!==e.signatures&&null!==e.signatures){var o,a=r(e.signatures);try{for(a.s();!(o=a.n()).done;){var s=o.value;i.signatures.push(s)}}catch(u){a.e(u)}finally{a.f()}}return i}};var h={chainId:"",accountNumber:o.default.UZERO};t.SignDoc={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return 0!==e.bodyBytes.length&&t.uint32(10).bytes(e.bodyBytes),0!==e.authInfoBytes.length&&t.uint32(18).bytes(e.authInfoBytes),""!==e.chainId&&t.uint32(26).string(e.chainId),e.accountNumber.isZero()||t.uint32(32).uint64(e.accountNumber),t},decode:function(e,t){var n=e instanceof a.default.Reader?e:new a.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},h);for(i.bodyBytes=new Uint8Array,i.authInfoBytes=new Uint8Array;n.pos>>3){case 1:i.bodyBytes=n.bytes();break;case 2:i.authInfoBytes=n.bytes();break;case 3:i.chainId=n.string();break;case 4:i.accountNumber=n.uint64();break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t=Object.assign({},h);return t.bodyBytes=new Uint8Array,t.authInfoBytes=new Uint8Array,void 0!==e.bodyBytes&&null!==e.bodyBytes&&(t.bodyBytes=E(e.bodyBytes)),void 0!==e.authInfoBytes&&null!==e.authInfoBytes&&(t.authInfoBytes=E(e.authInfoBytes)),void 0!==e.chainId&&null!==e.chainId?t.chainId=String(e.chainId):t.chainId="",void 0!==e.accountNumber&&null!==e.accountNumber?t.accountNumber=o.default.fromString(e.accountNumber):t.accountNumber=o.default.UZERO,t},toJSON:function(e){var t={};return void 0!==e.bodyBytes&&(t.bodyBytes=I(void 0!==e.bodyBytes?e.bodyBytes:new Uint8Array)),void 0!==e.authInfoBytes&&(t.authInfoBytes=I(void 0!==e.authInfoBytes?e.authInfoBytes:new Uint8Array)),void 0!==e.chainId&&(t.chainId=e.chainId),void 0!==e.accountNumber&&(t.accountNumber=(e.accountNumber||o.default.UZERO).toString()),t},fromPartial:function(e){var t,n,r,i=Object.assign({},h);return i.bodyBytes=null!==(t=e.bodyBytes)&&void 0!==t?t:new Uint8Array,i.authInfoBytes=null!==(n=e.authInfoBytes)&&void 0!==n?n:new Uint8Array,i.chainId=null!==(r=e.chainId)&&void 0!==r?r:"",void 0!==e.accountNumber&&null!==e.accountNumber?i.accountNumber=e.accountNumber:i.accountNumber=o.default.UZERO,i}};var p={memo:"",timeoutHeight:o.default.UZERO};t.TxBody={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create(),i=r(e.messages);try{for(i.s();!(t=i.n()).done;){var o=t.value;s.Any.encode(o,n.uint32(10).fork()).ldelim()}}catch(p){i.e(p)}finally{i.f()}""!==e.memo&&n.uint32(18).string(e.memo),e.timeoutHeight.isZero()||n.uint32(24).uint64(e.timeoutHeight);var u,c=r(e.extensionOptions);try{for(c.s();!(u=c.n()).done;){var l=u.value;s.Any.encode(l,n.uint32(8186).fork()).ldelim()}}catch(p){c.e(p)}finally{c.f()}var f,d=r(e.nonCriticalExtensionOptions);try{for(d.s();!(f=d.n()).done;){var h=f.value;s.Any.encode(h,n.uint32(16378).fork()).ldelim()}}catch(p){d.e(p)}finally{d.f()}return n},decode:function(e,t){var n=e instanceof a.default.Reader?e:new a.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},p);for(i.messages=[],i.extensionOptions=[],i.nonCriticalExtensionOptions=[];n.pos>>3){case 1:i.messages.push(s.Any.decode(n,n.uint32()));break;case 2:i.memo=n.string();break;case 3:i.timeoutHeight=n.uint64();break;case 1023:i.extensionOptions.push(s.Any.decode(n,n.uint32()));break;case 2047:i.nonCriticalExtensionOptions.push(s.Any.decode(n,n.uint32()));break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t=Object.assign({},p);if(t.messages=[],t.extensionOptions=[],t.nonCriticalExtensionOptions=[],void 0!==e.messages&&null!==e.messages){var n,i=r(e.messages);try{for(i.s();!(n=i.n()).done;){var a=n.value;t.messages.push(s.Any.fromJSON(a))}}catch(g){i.e(g)}finally{i.f()}}if(void 0!==e.memo&&null!==e.memo?t.memo=String(e.memo):t.memo="",void 0!==e.timeoutHeight&&null!==e.timeoutHeight?t.timeoutHeight=o.default.fromString(e.timeoutHeight):t.timeoutHeight=o.default.UZERO,void 0!==e.extensionOptions&&null!==e.extensionOptions){var u,c=r(e.extensionOptions);try{for(c.s();!(u=c.n()).done;){var l=u.value;t.extensionOptions.push(s.Any.fromJSON(l))}}catch(g){c.e(g)}finally{c.f()}}if(void 0!==e.nonCriticalExtensionOptions&&null!==e.nonCriticalExtensionOptions){var f,d=r(e.nonCriticalExtensionOptions);try{for(d.s();!(f=d.n()).done;){var h=f.value;t.nonCriticalExtensionOptions.push(s.Any.fromJSON(h))}}catch(g){d.e(g)}finally{d.f()}}return t},toJSON:function(e){var t={};return e.messages?t.messages=e.messages.map((function(e){return e?s.Any.toJSON(e):void 0})):t.messages=[],void 0!==e.memo&&(t.memo=e.memo),void 0!==e.timeoutHeight&&(t.timeoutHeight=(e.timeoutHeight||o.default.UZERO).toString()),e.extensionOptions?t.extensionOptions=e.extensionOptions.map((function(e){return e?s.Any.toJSON(e):void 0})):t.extensionOptions=[],e.nonCriticalExtensionOptions?t.nonCriticalExtensionOptions=e.nonCriticalExtensionOptions.map((function(e){return e?s.Any.toJSON(e):void 0})):t.nonCriticalExtensionOptions=[],t},fromPartial:function(e){var t,n=Object.assign({},p);if(n.messages=[],void 0!==e.messages&&null!==e.messages){var i,a=r(e.messages);try{for(a.s();!(i=a.n()).done;){var u=i.value;n.messages.push(s.Any.fromPartial(u))}}catch(v){a.e(v)}finally{a.f()}}if(n.memo=null!==(t=e.memo)&&void 0!==t?t:"",void 0!==e.timeoutHeight&&null!==e.timeoutHeight?n.timeoutHeight=e.timeoutHeight:n.timeoutHeight=o.default.UZERO,n.extensionOptions=[],void 0!==e.extensionOptions&&null!==e.extensionOptions){var c,l=r(e.extensionOptions);try{for(l.s();!(c=l.n()).done;){var f=c.value;n.extensionOptions.push(s.Any.fromPartial(f))}}catch(v){l.e(v)}finally{l.f()}}if(n.nonCriticalExtensionOptions=[],void 0!==e.nonCriticalExtensionOptions&&null!==e.nonCriticalExtensionOptions){var d,h=r(e.nonCriticalExtensionOptions);try{for(h.s();!(d=h.n()).done;){var g=d.value;n.nonCriticalExtensionOptions.push(s.Any.fromPartial(g))}}catch(v){h.e(v)}finally{h.f()}}return n}};var g={};t.AuthInfo={encode:function(e){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create(),o=r(e.signerInfos);try{for(o.s();!(n=o.n()).done;){var s=n.value;t.SignerInfo.encode(s,i.uint32(10).fork()).ldelim()}}catch(u){o.e(u)}finally{o.f()}return void 0!==e.fee&&t.Fee.encode(e.fee,i.uint32(18).fork()).ldelim(),i},decode:function(e,n){var r=e instanceof a.default.Reader?e:new a.default.Reader(e),i=void 0===n?r.len:r.pos+n,o=Object.assign({},g);for(o.signerInfos=[];r.pos>>3){case 1:o.signerInfos.push(t.SignerInfo.decode(r,r.uint32()));break;case 2:o.fee=t.Fee.decode(r,r.uint32());break;default:r.skipType(7&s)}}return o},fromJSON:function(e){var n=Object.assign({},g);if(n.signerInfos=[],void 0!==e.signerInfos&&null!==e.signerInfos){var i,o=r(e.signerInfos);try{for(o.s();!(i=o.n()).done;){var a=i.value;n.signerInfos.push(t.SignerInfo.fromJSON(a))}}catch(s){o.e(s)}finally{o.f()}}return void 0!==e.fee&&null!==e.fee?n.fee=t.Fee.fromJSON(e.fee):n.fee=void 0,n},toJSON:function(e){var n={};return e.signerInfos?n.signerInfos=e.signerInfos.map((function(e){return e?t.SignerInfo.toJSON(e):void 0})):n.signerInfos=[],void 0!==e.fee&&(n.fee=e.fee?t.Fee.toJSON(e.fee):void 0),n},fromPartial:function(e){var n=Object.assign({},g);if(n.signerInfos=[],void 0!==e.signerInfos&&null!==e.signerInfos){var i,o=r(e.signerInfos);try{for(o.s();!(i=o.n()).done;){var a=i.value;n.signerInfos.push(t.SignerInfo.fromPartial(a))}}catch(s){o.e(s)}finally{o.f()}}return void 0!==e.fee&&null!==e.fee?n.fee=t.Fee.fromPartial(e.fee):n.fee=void 0,n}};var v={sequence:o.default.UZERO};t.SignerInfo={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return void 0!==e.publicKey&&s.Any.encode(e.publicKey,n.uint32(10).fork()).ldelim(),void 0!==e.modeInfo&&t.ModeInfo.encode(e.modeInfo,n.uint32(18).fork()).ldelim(),e.sequence.isZero()||n.uint32(24).uint64(e.sequence),n},decode:function(e,n){for(var r=e instanceof a.default.Reader?e:new a.default.Reader(e),i=void 0===n?r.len:r.pos+n,o=Object.assign({},v);r.pos>>3){case 1:o.publicKey=s.Any.decode(r,r.uint32());break;case 2:o.modeInfo=t.ModeInfo.decode(r,r.uint32());break;case 3:o.sequence=r.uint64();break;default:r.skipType(7&u)}}return o},fromJSON:function(e){var n=Object.assign({},v);return void 0!==e.publicKey&&null!==e.publicKey?n.publicKey=s.Any.fromJSON(e.publicKey):n.publicKey=void 0,void 0!==e.modeInfo&&null!==e.modeInfo?n.modeInfo=t.ModeInfo.fromJSON(e.modeInfo):n.modeInfo=void 0,void 0!==e.sequence&&null!==e.sequence?n.sequence=o.default.fromString(e.sequence):n.sequence=o.default.UZERO,n},toJSON:function(e){var n={};return void 0!==e.publicKey&&(n.publicKey=e.publicKey?s.Any.toJSON(e.publicKey):void 0),void 0!==e.modeInfo&&(n.modeInfo=e.modeInfo?t.ModeInfo.toJSON(e.modeInfo):void 0),void 0!==e.sequence&&(n.sequence=(e.sequence||o.default.UZERO).toString()),n},fromPartial:function(e){var n=Object.assign({},v);return void 0!==e.publicKey&&null!==e.publicKey?n.publicKey=s.Any.fromPartial(e.publicKey):n.publicKey=void 0,void 0!==e.modeInfo&&null!==e.modeInfo?n.modeInfo=t.ModeInfo.fromPartial(e.modeInfo):n.modeInfo=void 0,void 0!==e.sequence&&null!==e.sequence?n.sequence=e.sequence:n.sequence=o.default.UZERO,n}};var m={};t.ModeInfo={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return void 0!==e.single&&t.ModeInfo_Single.encode(e.single,n.uint32(10).fork()).ldelim(),void 0!==e.multi&&t.ModeInfo_Multi.encode(e.multi,n.uint32(18).fork()).ldelim(),n},decode:function(e,n){for(var r=e instanceof a.default.Reader?e:new a.default.Reader(e),i=void 0===n?r.len:r.pos+n,o=Object.assign({},m);r.pos>>3){case 1:o.single=t.ModeInfo_Single.decode(r,r.uint32());break;case 2:o.multi=t.ModeInfo_Multi.decode(r,r.uint32());break;default:r.skipType(7&s)}}return o},fromJSON:function(e){var n=Object.assign({},m);return void 0!==e.single&&null!==e.single?n.single=t.ModeInfo_Single.fromJSON(e.single):n.single=void 0,void 0!==e.multi&&null!==e.multi?n.multi=t.ModeInfo_Multi.fromJSON(e.multi):n.multi=void 0,n},toJSON:function(e){var n={};return void 0!==e.single&&(n.single=e.single?t.ModeInfo_Single.toJSON(e.single):void 0),void 0!==e.multi&&(n.multi=e.multi?t.ModeInfo_Multi.toJSON(e.multi):void 0),n},fromPartial:function(e){var n=Object.assign({},m);return void 0!==e.single&&null!==e.single?n.single=t.ModeInfo_Single.fromPartial(e.single):n.single=void 0,void 0!==e.multi&&null!==e.multi?n.multi=t.ModeInfo_Multi.fromPartial(e.multi):n.multi=void 0,n}};var A={mode:0};t.ModeInfo_Single={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return 0!==e.mode&&t.uint32(8).int32(e.mode),t},decode:function(e,t){for(var n=e instanceof a.default.Reader?e:new a.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},A);n.pos>>3===1)i.mode=n.int32();else n.skipType(7&o)}return i},fromJSON:function(e){var t=Object.assign({},A);return void 0!==e.mode&&null!==e.mode?t.mode=u.signModeFromJSON(e.mode):t.mode=0,t},toJSON:function(e){var t={};return void 0!==e.mode&&(t.mode=u.signModeToJSON(e.mode)),t},fromPartial:function(e){var t,n=Object.assign({},A);return n.mode=null!==(t=e.mode)&&void 0!==t?t:0,n}};var y={};t.ModeInfo_Multi={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();void 0!==e.bitarray&&c.CompactBitArray.encode(e.bitarray,n.uint32(10).fork()).ldelim();var i,o=r(e.modeInfos);try{for(o.s();!(i=o.n()).done;){var s=i.value;t.ModeInfo.encode(s,n.uint32(18).fork()).ldelim()}}catch(u){o.e(u)}finally{o.f()}return n},decode:function(e,n){var r=e instanceof a.default.Reader?e:new a.default.Reader(e),i=void 0===n?r.len:r.pos+n,o=Object.assign({},y);for(o.modeInfos=[];r.pos>>3){case 1:o.bitarray=c.CompactBitArray.decode(r,r.uint32());break;case 2:o.modeInfos.push(t.ModeInfo.decode(r,r.uint32()));break;default:r.skipType(7&s)}}return o},fromJSON:function(e){var n=Object.assign({},y);if(n.modeInfos=[],void 0!==e.bitarray&&null!==e.bitarray?n.bitarray=c.CompactBitArray.fromJSON(e.bitarray):n.bitarray=void 0,void 0!==e.modeInfos&&null!==e.modeInfos){var i,o=r(e.modeInfos);try{for(o.s();!(i=o.n()).done;){var a=i.value;n.modeInfos.push(t.ModeInfo.fromJSON(a))}}catch(s){o.e(s)}finally{o.f()}}return n},toJSON:function(e){var n={};return void 0!==e.bitarray&&(n.bitarray=e.bitarray?c.CompactBitArray.toJSON(e.bitarray):void 0),e.modeInfos?n.modeInfos=e.modeInfos.map((function(e){return e?t.ModeInfo.toJSON(e):void 0})):n.modeInfos=[],n},fromPartial:function(e){var n=Object.assign({},y);if(void 0!==e.bitarray&&null!==e.bitarray?n.bitarray=c.CompactBitArray.fromPartial(e.bitarray):n.bitarray=void 0,n.modeInfos=[],void 0!==e.modeInfos&&null!==e.modeInfos){var i,o=r(e.modeInfos);try{for(o.s();!(i=o.n()).done;){var a=i.value;n.modeInfos.push(t.ModeInfo.fromPartial(a))}}catch(s){o.e(s)}finally{o.f()}}return n}};var b={gasLimit:o.default.UZERO,payer:"",granter:""};t.Fee={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create(),i=r(e.amount);try{for(i.s();!(t=i.n()).done;){var o=t.value;l.Coin.encode(o,n.uint32(10).fork()).ldelim()}}catch(s){i.e(s)}finally{i.f()}return e.gasLimit.isZero()||n.uint32(16).uint64(e.gasLimit),""!==e.payer&&n.uint32(26).string(e.payer),""!==e.granter&&n.uint32(34).string(e.granter),n},decode:function(e,t){var n=e instanceof a.default.Reader?e:new a.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},b);for(i.amount=[];n.pos>>3){case 1:i.amount.push(l.Coin.decode(n,n.uint32()));break;case 2:i.gasLimit=n.uint64();break;case 3:i.payer=n.string();break;case 4:i.granter=n.string();break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t=Object.assign({},b);if(t.amount=[],void 0!==e.amount&&null!==e.amount){var n,i=r(e.amount);try{for(i.s();!(n=i.n()).done;){var a=n.value;t.amount.push(l.Coin.fromJSON(a))}}catch(s){i.e(s)}finally{i.f()}}return void 0!==e.gasLimit&&null!==e.gasLimit?t.gasLimit=o.default.fromString(e.gasLimit):t.gasLimit=o.default.UZERO,void 0!==e.payer&&null!==e.payer?t.payer=String(e.payer):t.payer="",void 0!==e.granter&&null!==e.granter?t.granter=String(e.granter):t.granter="",t},toJSON:function(e){var t={};return e.amount?t.amount=e.amount.map((function(e){return e?l.Coin.toJSON(e):void 0})):t.amount=[],void 0!==e.gasLimit&&(t.gasLimit=(e.gasLimit||o.default.UZERO).toString()),void 0!==e.payer&&(t.payer=e.payer),void 0!==e.granter&&(t.granter=e.granter),t},fromPartial:function(e){var t,n,i=Object.assign({},b);if(i.amount=[],void 0!==e.amount&&null!==e.amount){var a,s=r(e.amount);try{for(s.s();!(a=s.n()).done;){var u=a.value;i.amount.push(l.Coin.fromPartial(u))}}catch(c){s.e(c)}finally{s.f()}}return void 0!==e.gasLimit&&null!==e.gasLimit?i.gasLimit=e.gasLimit:i.gasLimit=o.default.UZERO,i.payer=null!==(t=e.payer)&&void 0!==t?t:"",i.granter=null!==(n=e.granter)&&void 0!==n?n:"",i}};var w=function(){if("undefined"!==typeof w)return w;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof e)return e;throw"Unable to locate global object"}(),_=w.atob||function(e){return w.Buffer.from(e,"base64").toString("binary")};function E(e){for(var t=_(e),n=new Uint8Array(t.length),r=0;r=this._delta8){var n=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-n,e.length),0===this.pending.length&&(this.pending=null),e=r.join32(e,0,e.length-n,this.endian);for(var i=0;i>>24&255,r[i++]=e>>>16&255,r[i++]=e>>>8&255,r[i++]=255&e}else for(r[i++]=255&e,r[i++]=e>>>8&255,r[i++]=e>>>16&255,r[i++]=e>>>24&255,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,o=8;o0&&"0"===n.toString();)n=(e=e.slice(1))[0];return e},t.toBuffer=function(e){if(!p.isBuffer(e))if(Array.isArray(e))e=p.from(e);else if("string"===typeof e)e=t.isHexString(e)?p.from(t.padToEven(t.stripHexPrefix(e)),"hex"):p.from(e);else if("number"===typeof e)e=t.intToBuffer(e);else if(null===e||void 0===e)e=p.allocUnsafe(0);else if(d.isBN(e))e=e.toArrayLike(p);else{if(!e.toArray)throw new Error("invalid type");e=p.from(e.toArray())}return e},t.bufferToInt=function(e){return new d(t.toBuffer(e)).toNumber()},t.bufferToHex=function(e){return"0x"+(e=t.toBuffer(e)).toString("hex")},t.fromSigned=function(e){return new d(e).fromTwos(256)},t.toUnsigned=function(e){return p.from(e.toTwos(256).toArray())},t.keccak=function(e,n){switch(e=t.toBuffer(e),n||(n=256),n){case 224:return o(e);case 256:return s(e);case 384:return a(e);case 512:return u(e);default:throw new Error("Invald algorithm: keccak"+n)}},t.keccak256=function(e){return t.keccak(e)},t.sha3=t.keccak,t.sha256=function(e){return e=t.toBuffer(e),h("sha256").update(e).digest()},t.ripemd160=function(e,n){e=t.toBuffer(e);var r=h("rmd160").update(e).digest();return!0===n?t.setLength(r,32):r},t.rlphash=function(e){return t.keccak(f.encode(e))},t.isValidPrivate=function(e){return c.privateKeyVerify(e)},t.isValidPublic=function(e,t){return 64===e.length?c.publicKeyVerify(p.concat([p.from([4]),e])):!!t&&c.publicKeyVerify(e)},t.pubToAddress=t.publicToAddress=function(e,n){return e=t.toBuffer(e),n&&64!==e.length&&(e=c.publicKeyConvert(e,!1).slice(1)),l(64===e.length),t.keccak(e).slice(-20)};var g=t.privateToPublic=function(e){return e=t.toBuffer(e),c.publicKeyCreate(e,!1).slice(1)};t.importPublic=function(e){return 64!==(e=t.toBuffer(e)).length&&(e=c.publicKeyConvert(e,!1).slice(1)),e},t.ecsign=function(e,t){var n=c.sign(e,t),r={};return r.r=n.signature.slice(0,32),r.s=n.signature.slice(32,64),r.v=n.recovery+27,r},t.hashPersonalMessage=function(e){var n=t.toBuffer("\x19Ethereum Signed Message:\n"+e.length.toString());return t.keccak(p.concat([n,e]))},t.ecrecover=function(e,n,r,i){var o=p.concat([t.setLength(r,32),t.setLength(i,32)],64),a=n-27;if(0!==a&&1!==a)throw new Error("Invalid signature v value");var s=c.recover(e,o,a);return c.publicKeyConvert(s,!1).slice(1)},t.toRpcSig=function(e,n,r){if(27!==e&&28!==e)throw new Error("Invalid recovery id");return t.bufferToHex(p.concat([t.setLengthLeft(n,32),t.setLengthLeft(r,32),t.toBuffer(e-27)]))},t.fromRpcSig=function(e){if(65!==(e=t.toBuffer(e)).length)throw new Error("Invalid signature length");var n=e[64];return n<27&&(n+=27),{v:n,r:e.slice(0,32),s:e.slice(32,64)}},t.privateToAddress=function(e){return t.publicToAddress(g(e))},t.isValidAddress=function(e){return/^0x[0-9a-fA-F]{40}$/.test(e)},t.isZeroAddress=function(e){return t.zeroAddress()===t.addHexPrefix(e)},t.toChecksumAddress=function(e){e=t.stripHexPrefix(e).toLowerCase();for(var n=t.keccak(e).toString("hex"),r="0x",i=0;i=8?r+=e[i].toUpperCase():r+=e[i];return r},t.isValidChecksumAddress=function(e){return t.isValidAddress(e)&&t.toChecksumAddress(e)===e},t.generateAddress=function(e,n){return e=t.toBuffer(e),n=(n=new d(n)).isZero()?null:p.from(n.toArray()),t.rlphash([e,n]).slice(-20)},t.isPrecompiled=function(e){var n=t.unpad(e);return 1===n.length&&n[0]>=1&&n[0]<=8},t.addHexPrefix=function(e){return"string"!==typeof e||t.isHexPrefixed(e)?e:"0x"+e},t.isValidSignature=function(e,t,n,r){var i=new d("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),o=new d("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);return 32===t.length&&32===n.length&&((27===e||28===e)&&(t=new d(t),n=new d(n),!(t.isZero()||t.gt(o)||n.isZero()||n.gt(o))&&(!1!==r||1!==new d(n).cmp(i))))},t.baToJSON=function(e){if(p.isBuffer(e))return"0x"+e.toString("hex");if(e instanceof Array){for(var n=[],r=0;r=i.length,"The field "+n.name+" must not have more "+n.length+" bytes")):n.allowZero&&0===i.length||!n.length||l(n.length===i.length,"The field "+n.name+" must have byte length of "+n.length),e.raw[r]=i}e._fields.push(n.name),Object.defineProperty(e,n.name,{enumerable:!0,configurable:!0,get:i,set:o}),n.default&&(e[n.name]=n.default),n.alias&&Object.defineProperty(e,n.alias,{enumerable:!1,configurable:!0,set:o,get:i})})),i)if("string"===typeof i&&(i=p.from(t.stripHexPrefix(i),"hex")),p.isBuffer(i)&&(i=f.decode(i)),Array.isArray(i)){if(i.length>e._fields.length)throw new Error("wrong number of fields in data");i.forEach((function(n,r){e[e._fields[r]]=t.toBuffer(n)}))}else{if("object"!==("undefined"===typeof i?"undefined":r(i)))throw new Error("invalid data");var o=Object.keys(i);n.forEach((function(t){-1!==o.indexOf(t.name)&&(e[t.name]=i[t.name]),-1!==o.indexOf(t.alias)&&(e[t.alias]=i[t.alias])}))}}},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,n(t)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function n(e){return e.sort((function(e,t){return"latest"===e||"earliest"===t?1:"latest"===t||"earliest"===e?-1:r(e)-r(t)}))}function r(e){return void 0===e||null===e?e:Number.parseInt(e,16)}function i(e){if(void 0===e||null===e)return e;var t=e.toString(16);return t.length%2&&(t="0"+t),"0x"+t}function o(){return Math.floor(16*Math.random()).toString(16)}e.exports={minBlockRef:function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&"0"===t.toString();)t=(e=e.slice(1))[0];return e},t.stripZeros=t.unpad,t.toBuffer=function(t){if(!e.isBuffer(t))if(Array.isArray(t))t=e.from(t);else if("string"===typeof t){if(!r.isHexString(t))throw new Error("Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: "+t);t=e.from(r.padToEven(r.stripHexPrefix(t)),"hex")}else if("number"===typeof t)t=r.intToBuffer(t);else if(null===t||void 0===t)t=e.allocUnsafe(0);else if(i.isBN(t))t=t.toArrayLike(e);else{if(!t.toArray)throw new Error("invalid type");t=e.from(t.toArray())}return t},t.bufferToInt=function(e){return new i(t.toBuffer(e)).toNumber()},t.bufferToHex=function(e){return"0x"+(e=t.toBuffer(e)).toString("hex")},t.fromSigned=function(e){return new i(e).fromTwos(256)},t.toUnsigned=function(t){return e.from(t.toTwos(256).toArray())},t.addHexPrefix=function(e){return"string"!==typeof e||r.isHexPrefixed(e)?e:"0x"+e},t.baToJSON=function(n){if(e.isBuffer(n))return"0x"+n.toString("hex");if(n instanceof Array){for(var r=[],i=0;i1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create(),o=r(e.signatures);try{for(o.s();!(n=o.n()).done;){var a=n.value;t.SignatureDescriptor.encode(a,i.uint32(10).fork()).ldelim()}}catch(u){o.e(u)}finally{o.f()}return i},decode:function(e,n){var r=e instanceof s.default.Reader?e:new s.default.Reader(e),i=void 0===n?r.len:r.pos+n,o=Object.assign({},d);for(o.signatures=[];r.pos>>3===1)o.signatures.push(t.SignatureDescriptor.decode(r,r.uint32()));else r.skipType(7&a)}return o},fromJSON:function(e){var n,r=Object.assign({},d);return r.signatures=(null!==(n=e.signatures)&&void 0!==n?n:[]).map((function(e){return t.SignatureDescriptor.fromJSON(e)})),r},toJSON:function(e){var n={};return e.signatures?n.signatures=e.signatures.map((function(e){return e?t.SignatureDescriptor.toJSON(e):void 0})):n.signatures=[],n},fromPartial:function(e){var n,r=Object.assign({},d);return r.signatures=(null===(n=e.signatures)||void 0===n?void 0:n.map((function(e){return t.SignatureDescriptor.fromPartial(e)})))||[],r}};var h={sequence:a.default.UZERO};t.SignatureDescriptor={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return void 0!==e.publicKey&&u.Any.encode(e.publicKey,n.uint32(10).fork()).ldelim(),void 0!==e.data&&t.SignatureDescriptor_Data.encode(e.data,n.uint32(18).fork()).ldelim(),e.sequence.isZero()||n.uint32(24).uint64(e.sequence),n},decode:function(e,n){for(var r=e instanceof s.default.Reader?e:new s.default.Reader(e),i=void 0===n?r.len:r.pos+n,o=Object.assign({},h);r.pos>>3){case 1:o.publicKey=u.Any.decode(r,r.uint32());break;case 2:o.data=t.SignatureDescriptor_Data.decode(r,r.uint32());break;case 3:o.sequence=r.uint64();break;default:r.skipType(7&a)}}return o},fromJSON:function(e){var n=Object.assign({},h);return n.publicKey=void 0!==e.publicKey&&null!==e.publicKey?u.Any.fromJSON(e.publicKey):void 0,n.data=void 0!==e.data&&null!==e.data?t.SignatureDescriptor_Data.fromJSON(e.data):void 0,n.sequence=void 0!==e.sequence&&null!==e.sequence?a.default.fromString(e.sequence):a.default.UZERO,n},toJSON:function(e){var n={};return void 0!==e.publicKey&&(n.publicKey=e.publicKey?u.Any.toJSON(e.publicKey):void 0),void 0!==e.data&&(n.data=e.data?t.SignatureDescriptor_Data.toJSON(e.data):void 0),void 0!==e.sequence&&(n.sequence=(e.sequence||a.default.UZERO).toString()),n},fromPartial:function(e){var n=Object.assign({},h);return n.publicKey=void 0!==e.publicKey&&null!==e.publicKey?u.Any.fromPartial(e.publicKey):void 0,n.data=void 0!==e.data&&null!==e.data?t.SignatureDescriptor_Data.fromPartial(e.data):void 0,n.sequence=void 0!==e.sequence&&null!==e.sequence?a.default.fromValue(e.sequence):a.default.UZERO,n}};var p={};t.SignatureDescriptor_Data={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return void 0!==e.single&&t.SignatureDescriptor_Data_Single.encode(e.single,n.uint32(10).fork()).ldelim(),void 0!==e.multi&&t.SignatureDescriptor_Data_Multi.encode(e.multi,n.uint32(18).fork()).ldelim(),n},decode:function(e,n){for(var r=e instanceof s.default.Reader?e:new s.default.Reader(e),i=void 0===n?r.len:r.pos+n,o=Object.assign({},p);r.pos>>3){case 1:o.single=t.SignatureDescriptor_Data_Single.decode(r,r.uint32());break;case 2:o.multi=t.SignatureDescriptor_Data_Multi.decode(r,r.uint32());break;default:r.skipType(7&a)}}return o},fromJSON:function(e){var n=Object.assign({},p);return n.single=void 0!==e.single&&null!==e.single?t.SignatureDescriptor_Data_Single.fromJSON(e.single):void 0,n.multi=void 0!==e.multi&&null!==e.multi?t.SignatureDescriptor_Data_Multi.fromJSON(e.multi):void 0,n},toJSON:function(e){var n={};return void 0!==e.single&&(n.single=e.single?t.SignatureDescriptor_Data_Single.toJSON(e.single):void 0),void 0!==e.multi&&(n.multi=e.multi?t.SignatureDescriptor_Data_Multi.toJSON(e.multi):void 0),n},fromPartial:function(e){var n=Object.assign({},p);return n.single=void 0!==e.single&&null!==e.single?t.SignatureDescriptor_Data_Single.fromPartial(e.single):void 0,n.multi=void 0!==e.multi&&null!==e.multi?t.SignatureDescriptor_Data_Multi.fromPartial(e.multi):void 0,n}};var g={mode:0};t.SignatureDescriptor_Data_Single={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return 0!==e.mode&&t.uint32(8).int32(e.mode),0!==e.signature.length&&t.uint32(18).bytes(e.signature),t},decode:function(e,t){var n=e instanceof s.default.Reader?e:new s.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},g);for(i.signature=new Uint8Array;n.pos>>3){case 1:i.mode=n.int32();break;case 2:i.signature=n.bytes();break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t=Object.assign({},g);return t.mode=void 0!==e.mode&&null!==e.mode?l(e.mode):0,t.signature=void 0!==e.signature&&null!==e.signature?function(e){for(var t=A(e),n=new Uint8Array(t.length),r=0;r1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();void 0!==e.bitarray&&c.CompactBitArray.encode(e.bitarray,n.uint32(10).fork()).ldelim();var i,o=r(e.signatures);try{for(o.s();!(i=o.n()).done;){var a=i.value;t.SignatureDescriptor_Data.encode(a,n.uint32(18).fork()).ldelim()}}catch(u){o.e(u)}finally{o.f()}return n},decode:function(e,n){var r=e instanceof s.default.Reader?e:new s.default.Reader(e),i=void 0===n?r.len:r.pos+n,o=Object.assign({},v);for(o.signatures=[];r.pos>>3){case 1:o.bitarray=c.CompactBitArray.decode(r,r.uint32());break;case 2:o.signatures.push(t.SignatureDescriptor_Data.decode(r,r.uint32()));break;default:r.skipType(7&a)}}return o},fromJSON:function(e){var n,r=Object.assign({},v);return r.bitarray=void 0!==e.bitarray&&null!==e.bitarray?c.CompactBitArray.fromJSON(e.bitarray):void 0,r.signatures=(null!==(n=e.signatures)&&void 0!==n?n:[]).map((function(e){return t.SignatureDescriptor_Data.fromJSON(e)})),r},toJSON:function(e){var n={};return void 0!==e.bitarray&&(n.bitarray=e.bitarray?c.CompactBitArray.toJSON(e.bitarray):void 0),e.signatures?n.signatures=e.signatures.map((function(e){return e?t.SignatureDescriptor_Data.toJSON(e):void 0})):n.signatures=[],n},fromPartial:function(e){var n,r=Object.assign({},v);return r.bitarray=void 0!==e.bitarray&&null!==e.bitarray?c.CompactBitArray.fromPartial(e.bitarray):void 0,r.signatures=(null===(n=e.signatures)||void 0===n?void 0:n.map((function(e){return t.SignatureDescriptor_Data.fromPartial(e)})))||[],r}};var m=function(){if("undefined"!==typeof m)return m;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof e)return e;throw"Unable to locate global object"}(),A=m.atob||function(e){return m.Buffer.from(e,"base64").toString("binary")};var y=m.btoa||function(e){return m.Buffer.from(e,"binary").toString("base64")};s.default.util.Long!==a.default&&(s.default.util.Long=a.default,s.default.configure())}).call(this,n(20))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.stakingTypes=t.isMsgUndelegateEncodeObject=t.isMsgDelegateEncodeObject=t.isAminoMsgUndelegate=t.isAminoMsgEditValidator=t.isAminoMsgDelegate=t.isAminoMsgCreateValidator=t.isAminoMsgBeginRedelegate=t.createStakingAminoConverters=t.setupSlashingExtension=t.isAminoMsgUnjail=t.createSlashingAminoConverters=t.setupMintExtension=t.setupIbcExtension=t.isMsgTransferEncodeObject=t.ibcTypes=t.isAminoMsgTransfer=t.createIbcAminoConverters=t.setupGovExtension=t.isMsgVoteEncodeObject=t.isMsgSubmitProposalEncodeObject=t.isMsgDepositEncodeObject=t.govTypes=t.isAminoMsgVote=t.isAminoMsgSubmitProposal=t.isAminoMsgDeposit=t.createGovAminoConverters=t.feegrantTypes=t.createFreegrantAminoConverters=t.isAminoMsgSubmitEvidence=t.createEvidenceAminoConverters=t.setupDistributionExtension=t.isMsgWithdrawDelegatorRewardEncodeObject=t.distributionTypes=t.isAminoMsgWithdrawValidatorCommission=t.isAminoMsgWithdrawDelegatorReward=t.isAminoMsgSetWithdrawAddress=t.isAminoMsgFundCommunityPool=t.createDistributionAminoConverters=t.isAminoMsgVerifyInvariant=t.createCrysisAminoConverters=t.setupBankExtension=t.isMsgSendEncodeObject=t.bankTypes=t.isAminoMsgSend=t.isAminoMsgMultiSend=t.createBankAminoConverters=t.authzTypes=t.createAuthzAminoConverters=t.setupAuthExtension=void 0,t.vestingTypes=t.createVestingAminoConverters=t.setupTxExtension=t.setupStakingExtension=void 0;var r=n(981);Object.defineProperty(t,"setupAuthExtension",{enumerable:!0,get:function(){return r.setupAuthExtension}});var i=n(1006);Object.defineProperty(t,"createAuthzAminoConverters",{enumerable:!0,get:function(){return i.createAuthzAminoConverters}});var o=n(1007);Object.defineProperty(t,"authzTypes",{enumerable:!0,get:function(){return o.authzTypes}});var a=n(1010);Object.defineProperty(t,"createBankAminoConverters",{enumerable:!0,get:function(){return a.createBankAminoConverters}}),Object.defineProperty(t,"isAminoMsgMultiSend",{enumerable:!0,get:function(){return a.isAminoMsgMultiSend}}),Object.defineProperty(t,"isAminoMsgSend",{enumerable:!0,get:function(){return a.isAminoMsgSend}});var s=n(1011);Object.defineProperty(t,"bankTypes",{enumerable:!0,get:function(){return s.bankTypes}}),Object.defineProperty(t,"isMsgSendEncodeObject",{enumerable:!0,get:function(){return s.isMsgSendEncodeObject}});var u=n(1012);Object.defineProperty(t,"setupBankExtension",{enumerable:!0,get:function(){return u.setupBankExtension}});var c=n(1014);Object.defineProperty(t,"createCrysisAminoConverters",{enumerable:!0,get:function(){return c.createCrysisAminoConverters}}),Object.defineProperty(t,"isAminoMsgVerifyInvariant",{enumerable:!0,get:function(){return c.isAminoMsgVerifyInvariant}});var l=n(1015);Object.defineProperty(t,"createDistributionAminoConverters",{enumerable:!0,get:function(){return l.createDistributionAminoConverters}}),Object.defineProperty(t,"isAminoMsgFundCommunityPool",{enumerable:!0,get:function(){return l.isAminoMsgFundCommunityPool}}),Object.defineProperty(t,"isAminoMsgSetWithdrawAddress",{enumerable:!0,get:function(){return l.isAminoMsgSetWithdrawAddress}}),Object.defineProperty(t,"isAminoMsgWithdrawDelegatorReward",{enumerable:!0,get:function(){return l.isAminoMsgWithdrawDelegatorReward}}),Object.defineProperty(t,"isAminoMsgWithdrawValidatorCommission",{enumerable:!0,get:function(){return l.isAminoMsgWithdrawValidatorCommission}});var f=n(1016);Object.defineProperty(t,"distributionTypes",{enumerable:!0,get:function(){return f.distributionTypes}}),Object.defineProperty(t,"isMsgWithdrawDelegatorRewardEncodeObject",{enumerable:!0,get:function(){return f.isMsgWithdrawDelegatorRewardEncodeObject}});var d=n(1017);Object.defineProperty(t,"setupDistributionExtension",{enumerable:!0,get:function(){return d.setupDistributionExtension}});var h=n(1020);Object.defineProperty(t,"createEvidenceAminoConverters",{enumerable:!0,get:function(){return h.createEvidenceAminoConverters}}),Object.defineProperty(t,"isAminoMsgSubmitEvidence",{enumerable:!0,get:function(){return h.isAminoMsgSubmitEvidence}});var p=n(1021);Object.defineProperty(t,"createFreegrantAminoConverters",{enumerable:!0,get:function(){return p.createFreegrantAminoConverters}});var g=n(1022);Object.defineProperty(t,"feegrantTypes",{enumerable:!0,get:function(){return g.feegrantTypes}});var v=n(1024);Object.defineProperty(t,"createGovAminoConverters",{enumerable:!0,get:function(){return v.createGovAminoConverters}}),Object.defineProperty(t,"isAminoMsgDeposit",{enumerable:!0,get:function(){return v.isAminoMsgDeposit}}),Object.defineProperty(t,"isAminoMsgSubmitProposal",{enumerable:!0,get:function(){return v.isAminoMsgSubmitProposal}}),Object.defineProperty(t,"isAminoMsgVote",{enumerable:!0,get:function(){return v.isAminoMsgVote}});var m=n(1025);Object.defineProperty(t,"govTypes",{enumerable:!0,get:function(){return m.govTypes}}),Object.defineProperty(t,"isMsgDepositEncodeObject",{enumerable:!0,get:function(){return m.isMsgDepositEncodeObject}}),Object.defineProperty(t,"isMsgSubmitProposalEncodeObject",{enumerable:!0,get:function(){return m.isMsgSubmitProposalEncodeObject}}),Object.defineProperty(t,"isMsgVoteEncodeObject",{enumerable:!0,get:function(){return m.isMsgVoteEncodeObject}});var A=n(1027);Object.defineProperty(t,"setupGovExtension",{enumerable:!0,get:function(){return A.setupGovExtension}});var y=n(1029);Object.defineProperty(t,"createIbcAminoConverters",{enumerable:!0,get:function(){return y.createIbcAminoConverters}}),Object.defineProperty(t,"isAminoMsgTransfer",{enumerable:!0,get:function(){return y.isAminoMsgTransfer}});var b=n(1030);Object.defineProperty(t,"ibcTypes",{enumerable:!0,get:function(){return b.ibcTypes}}),Object.defineProperty(t,"isMsgTransferEncodeObject",{enumerable:!0,get:function(){return b.isMsgTransferEncodeObject}});var w=n(1034);Object.defineProperty(t,"setupIbcExtension",{enumerable:!0,get:function(){return w.setupIbcExtension}});var _=n(1042);Object.defineProperty(t,"setupMintExtension",{enumerable:!0,get:function(){return _.setupMintExtension}});var E=n(1045);Object.defineProperty(t,"createSlashingAminoConverters",{enumerable:!0,get:function(){return E.createSlashingAminoConverters}}),Object.defineProperty(t,"isAminoMsgUnjail",{enumerable:!0,get:function(){return E.isAminoMsgUnjail}});var k=n(1046);Object.defineProperty(t,"setupSlashingExtension",{enumerable:!0,get:function(){return k.setupSlashingExtension}});var I=n(1049);Object.defineProperty(t,"createStakingAminoConverters",{enumerable:!0,get:function(){return I.createStakingAminoConverters}}),Object.defineProperty(t,"isAminoMsgBeginRedelegate",{enumerable:!0,get:function(){return I.isAminoMsgBeginRedelegate}}),Object.defineProperty(t,"isAminoMsgCreateValidator",{enumerable:!0,get:function(){return I.isAminoMsgCreateValidator}}),Object.defineProperty(t,"isAminoMsgDelegate",{enumerable:!0,get:function(){return I.isAminoMsgDelegate}}),Object.defineProperty(t,"isAminoMsgEditValidator",{enumerable:!0,get:function(){return I.isAminoMsgEditValidator}}),Object.defineProperty(t,"isAminoMsgUndelegate",{enumerable:!0,get:function(){return I.isAminoMsgUndelegate}});var C=n(1050);Object.defineProperty(t,"isMsgDelegateEncodeObject",{enumerable:!0,get:function(){return C.isMsgDelegateEncodeObject}}),Object.defineProperty(t,"isMsgUndelegateEncodeObject",{enumerable:!0,get:function(){return C.isMsgUndelegateEncodeObject}}),Object.defineProperty(t,"stakingTypes",{enumerable:!0,get:function(){return C.stakingTypes}});var S=n(1051);Object.defineProperty(t,"setupStakingExtension",{enumerable:!0,get:function(){return S.setupStakingExtension}});var x=n(1053);Object.defineProperty(t,"setupTxExtension",{enumerable:!0,get:function(){return x.setupTxExtension}});var B=n(1058);Object.defineProperty(t,"createVestingAminoConverters",{enumerable:!0,get:function(){return B.createVestingAminoConverters}});var O=n(1059);Object.defineProperty(t,"vestingTypes",{enumerable:!0,get:function(){return O.vestingTypes}})},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Duration=t.protobufPackage=void 0;var i=r(n(18)),o=r(n(21));t.protobufPackage="google.protobuf";var a={seconds:i.default.ZERO,nanos:0};t.Duration={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.default.Writer.create();return e.seconds.isZero()||t.uint32(8).int64(e.seconds),0!==e.nanos&&t.uint32(16).int32(e.nanos),t},decode:function(e,t){for(var n=e instanceof o.default.Reader?e:new o.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},a);n.pos>>3){case 1:i.seconds=n.int64();break;case 2:i.nanos=n.int32();break;default:n.skipType(7&s)}}return i},fromJSON:function(e){var t=Object.assign({},a);return t.seconds=void 0!==e.seconds&&null!==e.seconds?i.default.fromString(e.seconds):i.default.ZERO,t.nanos=void 0!==e.nanos&&null!==e.nanos?Number(e.nanos):0,t},toJSON:function(e){var t={};return void 0!==e.seconds&&(t.seconds=(e.seconds||i.default.ZERO).toString()),void 0!==e.nanos&&(t.nanos=e.nanos),t},fromPartial:function(e){var t,n=Object.assign({},a);return n.seconds=void 0!==e.seconds&&null!==e.seconds?i.default.fromValue(e.seconds):i.default.ZERO,n.nanos=null!==(t=e.nanos)&&void 0!==t?t:0,n}},o.default.util.Long!==i.default&&(o.default.util.Long=i.default,o.default.configure())},function(e,t,n){"use strict";var r=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,i=Math.ceil,o=Math.floor,a="[BigNumber Error] ",s=a+"Number primitive has more than 15 significant digits: ",u=1e14,c=14,l=9007199254740991,f=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],d=1e7,h=1e9;function p(e){var t=0|e;return e>0||e===t?t:t-1}function g(e){for(var t,n,r=1,i=e.length,o=e[0]+"";rc^n?1:-1;for(s=(u=i.length)<(c=o.length)?u:c,a=0;ao[a]^n?1:-1;return u==c?0:u>c^n?1:-1}function m(e,t,n,r){if(en||e!==o(e))throw Error(a+(r||"Argument")+("number"==typeof e?en?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function A(e){var t=e.c.length-1;return p(e.e/c)==t&&e.c[t]%2!=0}function y(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function b(e,t,n){var r,i;if(t<0){for(i=n+".";++t;i+=n);e=i+e}else if(++t>(r=e.length)){for(i=n,t-=r;--t;i+=n);e+=i}else tO?g.c=g.e=null:e.e=10;f/=10,u++);return void(u>O?g.c=g.e=null:(g.e=u,g.c=[e]))}p=String(e)}else{if(!r.test(p=String(e)))return _(g,p,d);g.s=45==p.charCodeAt(0)?(p=p.slice(1),-1):1}(u=p.indexOf("."))>-1&&(p=p.replace(".","")),(f=p.search(/e/i))>0?(u<0&&(u=f),u+=+p.slice(f+1),p=p.substring(0,f)):u<0&&(u=p.length)}else{if(m(t,2,T.length,"Base"),10==t&&Q)return F(g=new D(e),I+g.e+1,C);if(p=String(e),d="number"==typeof e){if(0*e!=0)return _(g,p,d,t);if(g.s=1/e<0?(p=p.slice(1),-1):1,D.DEBUG&&p.replace(/^0\.0*|\./,"").length>15)throw Error(s+e)}else g.s=45===p.charCodeAt(0)?(p=p.slice(1),-1):1;for(n=T.slice(0,t),u=f=0,h=p.length;fu){u=h;continue}}else if(!a&&(p==p.toUpperCase()&&(p=p.toLowerCase())||p==p.toLowerCase()&&(p=p.toUpperCase()))){a=!0,f=-1,u=0;continue}return _(g,String(e),d,t)}d=!1,(u=(p=w(p,t,10,g.s)).indexOf("."))>-1?p=p.replace(".",""):u=p.length}for(f=0;48===p.charCodeAt(f);f++);for(h=p.length;48===p.charCodeAt(--h););if(p=p.slice(f,++h)){if(h-=f,d&&D.DEBUG&&h>15&&(e>l||e!==o(e)))throw Error(s+g.s*e);if((u=u-f-1)>O)g.c=g.e=null;else if(u=x)?y(u,a):b(u,a,"0");else if(o=(e=F(new D(e),t,n)).e,s=(u=g(e.c)).length,1==r||2==r&&(t<=o||o<=S)){for(;ss){if(--t>0)for(u+=".";t--;u+="0");}else if((t+=o-s)>0)for(o+1==s&&(u+=".");t--;u+="0");return e.s<0&&i?"-"+u:u}function U(e,t){for(var n,r=1,i=new D(e[0]);r=10;i/=10,r++);return(n=r+n*c-1)>O?e.c=e.e=null:n=10;d/=10,a++);if((s=t-a)<0)s+=c,l=t,g=(h=v[p=0])/m[a-l-1]%10|0;else if((p=i((s+1)/c))>=v.length){if(!r)break e;for(;v.length<=p;v.push(0));h=g=0,a=1,l=(s%=c)-c+1}else{for(h=d=v[p],a=1;d>=10;d/=10,a++);g=(l=(s%=c)-c+a)<0?0:h/m[a-l-1]%10|0}if(r=r||t<0||null!=v[p+1]||(l<0?h:h%m[a-l-1]),r=n<4?(g||r)&&(0==n||n==(e.s<0?3:2)):g>5||5==g&&(4==n||r||6==n&&(s>0?l>0?h/m[a-l]:0:v[p-1])%10&1||n==(e.s<0?8:7)),t<1||!v[0])return v.length=0,r?(t-=e.e+1,v[0]=m[(c-t%c)%c],e.e=-t||0):v[0]=e.e=0,e;if(0==s?(v.length=p,d=1,p--):(v.length=p+1,d=m[c-s],v[p]=l>0?o(h/m[a-l]%m[l])*d:0),r)for(;;){if(0==p){for(s=1,l=v[0];l>=10;l/=10,s++);for(l=v[0]+=d,d=1;l>=10;l/=10,d++);s!=d&&(e.e++,v[0]==u&&(v[0]=1));break}if(v[p]+=d,v[p]!=u)break;v[p--]=0,d=1}for(s=v.length;0===v[--s];v.pop());}e.e>O?e.c=e.e=null:e.e=x?y(t,n):b(t,n,"0"),e.s<0?"-"+t:t)}return D.clone=e,D.ROUND_UP=0,D.ROUND_DOWN=1,D.ROUND_CEIL=2,D.ROUND_FLOOR=3,D.ROUND_HALF_UP=4,D.ROUND_HALF_DOWN=5,D.ROUND_HALF_EVEN=6,D.ROUND_HALF_CEIL=7,D.ROUND_HALF_FLOOR=8,D.EUCLID=9,D.config=D.set=function(e){var t,n;if(null!=e){if("object"!=typeof e)throw Error(a+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(m(n=e[t],0,h,t),I=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(m(n=e[t],0,8,t),C=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(m(n[0],-h,0,t),m(n[1],0,h,t),S=n[0],x=n[1]):(m(n,-h,h,t),S=-(x=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)m(n[0],-h,-1,t),m(n[1],1,h,t),B=n[0],O=n[1];else{if(m(n,-h,h,t),!n)throw Error(a+t+" cannot be zero: "+n);B=-(O=n<0?-n:n)}if(e.hasOwnProperty(t="CRYPTO")){if((n=e[t])!==!!n)throw Error(a+t+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw M=!n,Error(a+"crypto unavailable");M=n}else M=n}if(e.hasOwnProperty(t="MODULO_MODE")&&(m(n=e[t],0,9,t),P=n),e.hasOwnProperty(t="POW_PRECISION")&&(m(n=e[t],0,h,t),R=n),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(n=e[t]))throw Error(a+t+" not an object: "+n);N=n}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(n))throw Error(a+t+" invalid: "+n);Q="0123456789"==n.slice(0,10),T=n}}return{DECIMAL_PLACES:I,ROUNDING_MODE:C,EXPONENTIAL_AT:[S,x],RANGE:[B,O],CRYPTO:M,MODULO_MODE:P,POW_PRECISION:R,FORMAT:N,ALPHABET:T}},D.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!D.DEBUG)return!0;var t,n,r=e.c,i=e.e,s=e.s;e:if("[object Array]"=={}.toString.call(r)){if((1===s||-1===s)&&i>=-h&&i<=h&&i===o(i)){if(0===r[0]){if(0===i&&1===r.length)return!0;break e}if((t=(i+1)%c)<1&&(t+=c),String(r[0]).length==t){for(t=0;t=u||n!==o(n))break e;if(0!==n)return!0}}}else if(null===r&&null===i&&(null===s||1===s||-1===s))return!0;throw Error(a+"Invalid BigNumber: "+e)},D.maximum=D.max=function(){return U(arguments,E.lt)},D.minimum=D.min=function(){return U(arguments,E.gt)},D.random=function(){var e=9007199254740992,t=Math.random()*e&2097151?function(){return o(Math.random()*e)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};return function(e){var n,r,s,u,l,d=0,p=[],g=new D(k);if(null==e?e=I:m(e,0,h),u=i(e/c),M)if(crypto.getRandomValues){for(n=crypto.getRandomValues(new Uint32Array(u*=2));d>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),n[d]=r[0],n[d+1]=r[1]):(p.push(l%1e14),d+=2);d=u/2}else{if(!crypto.randomBytes)throw M=!1,Error(a+"crypto unavailable");for(n=crypto.randomBytes(u*=7);d=9e15?crypto.randomBytes(7).copy(n,d):(p.push(l%1e14),d+=7);d=u/7}if(!M)for(;d=10;l/=10,d++);dn-1&&(null==a[i+1]&&(a[i+1]=0),a[i+1]+=a[i]/n|0,a[i]%=n)}return a.reverse()}return function(r,i,o,a,s){var u,c,l,f,d,h,p,v,m=r.indexOf("."),A=I,y=C;for(m>=0&&(f=R,R=0,r=r.replace(".",""),h=(v=new D(i)).pow(r.length-m),R=f,v.c=t(b(g(h.c),h.e,"0"),10,o,e),v.e=v.c.length),l=f=(p=t(r,i,o,s?(u=T,e):(u=e,T))).length;0==p[--f];p.pop());if(!p[0])return u.charAt(0);if(m<0?--l:(h.c=p,h.e=l,h.s=a,p=(h=n(h,v,A,y,o)).c,d=h.r,l=h.e),m=p[c=l+A+1],f=o/2,d=d||c<0||null!=p[c+1],d=y<4?(null!=m||d)&&(0==y||y==(h.s<0?3:2)):m>f||m==f&&(4==y||d||6==y&&1&p[c-1]||y==(h.s<0?8:7)),c<1||!p[0])r=d?b(u.charAt(1),-A,u.charAt(0)):u.charAt(0);else{if(p.length=c,d)for(--o;++p[--c]>o;)p[c]=0,c||(++l,p=[1].concat(p));for(f=p.length;!p[--f];);for(m=0,r="";m<=f;r+=u.charAt(p[m++]));r=b(r,l,u.charAt(0))}return r}}(),n=function(){function e(e,t,n){var r,i,o,a,s=0,u=e.length,c=t%d,l=t/d|0;for(e=e.slice();u--;)s=((i=c*(o=e[u]%d)+(r=l*o+(a=e[u]/d|0)*c)%d*d+s)/n|0)+(r/d|0)+l*a,e[u]=i%n;return s&&(e=[s].concat(e)),e}function t(e,t,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;it[i]?1:-1;break}return o}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]1;e.splice(0,1));}return function(r,i,a,s,l){var f,d,h,g,v,m,A,y,b,w,_,E,k,I,C,S,x,B=r.s==i.s?1:-1,O=r.c,M=i.c;if(!O||!O[0]||!M||!M[0])return new D(r.s&&i.s&&(O?!M||O[0]!=M[0]:M)?O&&0==O[0]||!M?0*B:B/0:NaN);for(b=(y=new D(B)).c=[],B=a+(d=r.e-i.e)+1,l||(l=u,d=p(r.e/c)-p(i.e/c),B=B/c|0),h=0;M[h]==(O[h]||0);h++);if(M[h]>(O[h]||0)&&d--,B<0)b.push(1),g=!0;else{for(I=O.length,S=M.length,h=0,B+=2,(v=o(l/(M[0]+1)))>1&&(M=e(M,v,l),O=e(O,v,l),S=M.length,I=O.length),k=S,_=(w=O.slice(0,S)).length;_=l/2&&C++;do{if(v=0,(f=t(M,w,S,_))<0){if(E=w[0],S!=_&&(E=E*l+(w[1]||0)),(v=o(E/C))>1)for(v>=l&&(v=l-1),A=(m=e(M,v,l)).length,_=w.length;1==t(m,w,A,_);)v--,n(m,S=10;B/=10,h++);F(y,a+(y.e=h+d*c-1)+1,s,g)}else y.e=d,y.r=+g;return y}}(),_=function(){var e=/^(-?)0([xbo])(?=\w[\w.]*$)/i,t=/^([^.]+)\.$/,n=/^\.([^.]+)$/,r=/^-?(Infinity|NaN)$/,i=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(o,s,u,c){var l,f=u?s:s.replace(i,"");if(r.test(f))o.s=isNaN(f)?null:f<0?-1:1;else{if(!u&&(f=f.replace(e,(function(e,t,n){return l="x"==(n=n.toLowerCase())?16:"b"==n?2:8,c&&c!=l?e:t})),c&&(l=c,f=f.replace(t,"$1").replace(n,"0.$1")),s!=f))return new D(f,l);if(D.DEBUG)throw Error(a+"Not a"+(c?" base "+c:"")+" number: "+s);o.s=null}o.c=o.e=null}}(),E.absoluteValue=E.abs=function(){var e=new D(this);return e.s<0&&(e.s=1),e},E.comparedTo=function(e,t){return v(this,new D(e,t))},E.decimalPlaces=E.dp=function(e,t){var n,r,i,o=this;if(null!=e)return m(e,0,h),null==t?t=C:m(t,0,8),F(new D(o),e+o.e+1,t);if(!(n=o.c))return null;if(r=((i=n.length-1)-p(this.e/c))*c,i=n[i])for(;i%10==0;i/=10,r--);return r<0&&(r=0),r},E.dividedBy=E.div=function(e,t){return n(this,new D(e,t),I,C)},E.dividedToIntegerBy=E.idiv=function(e,t){return n(this,new D(e,t),0,1)},E.exponentiatedBy=E.pow=function(e,t){var n,r,s,u,l,f,d,h,p=this;if((e=new D(e)).c&&!e.isInteger())throw Error(a+"Exponent not an integer: "+H(e));if(null!=t&&(t=new D(t)),l=e.e>14,!p.c||!p.c[0]||1==p.c[0]&&!p.e&&1==p.c.length||!e.c||!e.c[0])return h=new D(Math.pow(+H(p),l?2-A(e):+H(e))),t?h.mod(t):h;if(f=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new D(NaN);(r=!f&&p.isInteger()&&t.isInteger())&&(p=p.mod(t))}else{if(e.e>9&&(p.e>0||p.e<-1||(0==p.e?p.c[0]>1||l&&p.c[1]>=24e7:p.c[0]<8e13||l&&p.c[0]<=9999975e7)))return u=p.s<0&&A(e)?-0:0,p.e>-1&&(u=1/u),new D(f?1/u:u);R&&(u=i(R/c+2))}for(l?(n=new D(.5),f&&(e.s=1),d=A(e)):d=(s=Math.abs(+H(e)))%2,h=new D(k);;){if(d){if(!(h=h.times(p)).c)break;u?h.c.length>u&&(h.c.length=u):r&&(h=h.mod(t))}if(s){if(0===(s=o(s/2)))break;d=s%2}else if(F(e=e.times(n),e.e+1,1),e.e>14)d=A(e);else{if(0===(s=+H(e)))break;d=s%2}p=p.times(p),u?p.c&&p.c.length>u&&(p.c.length=u):r&&(p=p.mod(t))}return r?h:(f&&(h=k.div(h)),t?h.mod(t):u?F(h,R,C,undefined):h)},E.integerValue=function(e){var t=new D(this);return null==e?e=C:m(e,0,8),F(t,t.e+1,e)},E.isEqualTo=E.eq=function(e,t){return 0===v(this,new D(e,t))},E.isFinite=function(){return!!this.c},E.isGreaterThan=E.gt=function(e,t){return v(this,new D(e,t))>0},E.isGreaterThanOrEqualTo=E.gte=function(e,t){return 1===(t=v(this,new D(e,t)))||0===t},E.isInteger=function(){return!!this.c&&p(this.e/c)>this.c.length-2},E.isLessThan=E.lt=function(e,t){return v(this,new D(e,t))<0},E.isLessThanOrEqualTo=E.lte=function(e,t){return-1===(t=v(this,new D(e,t)))||0===t},E.isNaN=function(){return!this.s},E.isNegative=function(){return this.s<0},E.isPositive=function(){return this.s>0},E.isZero=function(){return!!this.c&&0==this.c[0]},E.minus=function(e,t){var n,r,i,o,a=this,s=a.s;if(t=(e=new D(e,t)).s,!s||!t)return new D(NaN);if(s!=t)return e.s=-t,a.plus(e);var l=a.e/c,f=e.e/c,d=a.c,h=e.c;if(!l||!f){if(!d||!h)return d?(e.s=-t,e):new D(h?a:NaN);if(!d[0]||!h[0])return h[0]?(e.s=-t,e):new D(d[0]?a:3==C?-0:0)}if(l=p(l),f=p(f),d=d.slice(),s=l-f){for((o=s<0)?(s=-s,i=d):(f=l,i=h),i.reverse(),t=s;t--;i.push(0));i.reverse()}else for(r=(o=(s=d.length)<(t=h.length))?s:t,s=t=0;t0)for(;t--;d[n++]=0);for(t=u-1;r>s;){if(d[--r]=0;){for(n=0,v=E[i]%b,m=E[i]/b|0,o=i+(a=l);o>i;)n=((f=v*(f=_[--a]%b)+(s=m*f+(h=_[a]/b|0)*v)%b*b+A[o]+n)/y|0)+(s/b|0)+m*h,A[o--]=f%y;A[o]=n}return n?++r:A.splice(0,1),L(e,A,r)},E.negated=function(){var e=new D(this);return e.s=-e.s||null,e},E.plus=function(e,t){var n,r=this,i=r.s;if(t=(e=new D(e,t)).s,!i||!t)return new D(NaN);if(i!=t)return e.s=-t,r.minus(e);var o=r.e/c,a=e.e/c,s=r.c,l=e.c;if(!o||!a){if(!s||!l)return new D(i/0);if(!s[0]||!l[0])return l[0]?e:new D(s[0]?r:0*i)}if(o=p(o),a=p(a),s=s.slice(),i=o-a){for(i>0?(a=o,n=l):(i=-i,n=s),n.reverse();i--;n.push(0));n.reverse()}for((i=s.length)-(t=l.length)<0&&(n=l,l=s,s=n,t=i),i=0;t;)i=(s[--t]=s[t]+l[t]+i)/u|0,s[t]=u===s[t]?0:s[t]%u;return i&&(s=[i].concat(s),++a),L(e,s,a)},E.precision=E.sd=function(e,t){var n,r,i,o=this;if(null!=e&&e!==!!e)return m(e,1,h),null==t?t=C:m(t,0,8),F(new D(o),e,t);if(!(n=o.c))return null;if(r=(i=n.length-1)*c+1,i=n[i]){for(;i%10==0;i/=10,r--);for(i=n[0];i>=10;i/=10,r++);}return e&&o.e+1>r&&(r=o.e+1),r},E.shiftedBy=function(e){return m(e,-9007199254740991,l),this.times("1e"+e)},E.squareRoot=E.sqrt=function(){var e,t,r,i,o,a=this,s=a.c,u=a.s,c=a.e,l=I+4,f=new D("0.5");if(1!==u||!s||!s[0])return new D(!u||u<0&&(!s||s[0])?NaN:s?a:1/0);if(0==(u=Math.sqrt(+H(a)))||u==1/0?(((t=g(s)).length+c)%2==0&&(t+="0"),u=Math.sqrt(+t),c=p((c+1)/2)-(c<0||c%2),r=new D(t=u==1/0?"5e"+c:(t=u.toExponential()).slice(0,t.indexOf("e")+1)+c)):r=new D(u+""),r.c[0])for((u=(c=r.e)+l)<3&&(u=0);;)if(o=r,r=f.times(o.plus(n(a,o,l,1))),g(o.c).slice(0,u)===(t=g(r.c)).slice(0,u)){if(r.e0&&g>0){for(o=g%u||u,f=p.substr(0,o);o0&&(f+=l+p.slice(o)),h&&(f="-"+f)}r=d?f+(n.decimalSeparator||"")+((c=+n.fractionGroupSize)?d.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):d):f}return(n.prefix||"")+r+(n.suffix||"")},E.toFraction=function(e){var t,r,i,o,s,u,l,d,h,p,v,m,A=this,y=A.c;if(null!=e&&(!(l=new D(e)).isInteger()&&(l.c||1!==l.s)||l.lt(k)))throw Error(a+"Argument "+(l.isInteger()?"out of range: ":"not an integer: ")+H(l));if(!y)return new D(A);for(t=new D(k),h=r=new D(k),i=d=new D(k),m=g(y),s=t.e=m.length-A.e-1,t.c[0]=f[(u=s%c)<0?c+u:u],e=!e||l.comparedTo(t)>0?s>0?t:h:l,u=O,O=1/0,l=new D(m),d.c[0]=0;p=n(l,t,0,1),1!=(o=r.plus(p.times(i))).comparedTo(e);)r=i,i=o,h=d.plus(p.times(o=h)),d=o,t=l.minus(p.times(o=t)),l=o;return o=n(e.minus(r),i,0,1),d=d.plus(o.times(h)),r=r.plus(o.times(i)),d.s=h.s=A.s,v=n(h,i,s*=2,C).minus(A).abs().comparedTo(n(d,r,s,C).minus(A).abs())<1?[h,i]:[d,r],O=u,v},E.toNumber=function(){return+H(this)},E.toPrecision=function(e,t){return null!=e&&m(e,1,h),j(this,e,t,2)},E.toString=function(e){var t,n=this,r=n.s,i=n.e;return null===i?r?(t="Infinity",r<0&&(t="-"+t)):t="NaN":(null==e?t=i<=S||i>=x?y(g(n.c),i):b(g(n.c),i,"0"):10===e&&Q?t=b(g((n=F(new D(n),I+i+1,C)).c),n.e,"0"):(m(e,2,T.length,"Base"),t=w(b(g(n.c),i,"0"),10,e,r,!0)),r<0&&n.c[0]&&(t="-"+t)),t},E.valueOf=E.toJSON=function(){return H(this)},E._isBigNumber=!0,E[Symbol.toStringTag]="BigNumber",E[Symbol.for("nodejs.util.inspect.custom")]=E.valueOf,null!=t&&D.set(t),D}();t.a=w},,,function(e,t,n){"use strict";e.exports=n(648)},,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(7),i=n(6),o=Object(r.a)((function e(){Object(i.a)(this,e)}))},function(e,t,n){"use strict";var r=n(343);n.o(r,"isConstantTime")&&n.d(t,"isConstantTime",(function(){return r.isConstantTime}));n(344);var i=n(345);n.o(i,"isConstantTime")&&n.d(t,"isConstantTime",(function(){return i.isConstantTime}));var o=n(346);n.d(t,"isConstantTime",(function(){return o.a}))},function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0})))}),(function(){return!1}))):Promise.resolve(!1)}catch(e){return Promise.reject(e)}},t}(r.a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return h}));var r=n(102);function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,a(e,t)}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}function a(e,t){return a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},a(e,t)}function s(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function u(e,t,n){return u=s()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&a(i,n.prototype),i},u.apply(null,arguments)}function c(e){var t="function"===typeof Map?new Map:void 0;return c=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return u(e,arguments,o(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),a(r,e)},c(e)}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var f=function(e){function t(){var t;return(t=e.call(this)||this).name=t.constructor.name,t.message="The user rejected the request.",t}return i(t,e),t}(c(Error));function d(e){var t=e.supportedChainIds,n=e.rpc;return t||(n?Object.keys(n).map((function(e){return Number(e)})):void 0)}var h=function(e){function t(t){var n;return(n=e.call(this,{supportedChainIds:d(t)})||this).config=t,n.handleChainChanged=n.handleChainChanged.bind(l(n)),n.handleAccountsChanged=n.handleAccountsChanged.bind(l(n)),n.handleDisconnect=n.handleDisconnect.bind(l(n)),n}i(t,e);var r=t.prototype;return r.handleChainChanged=function(e){this.emitUpdate({chainId:e})},r.handleAccountsChanged=function(e){this.emitUpdate({account:e[0]})},r.handleDisconnect=function(){this.emitDeactivate(),this.walletConnectProvider&&(this.walletConnectProvider.stop(),this.walletConnectProvider.removeListener("chainChanged",this.handleChainChanged),this.walletConnectProvider.removeListener("accountsChanged",this.handleAccountsChanged),this.walletConnectProvider=void 0),this.emitDeactivate()},r.activate=function(){try{var e=this,t=function(){function t(){return Promise.resolve(e.walletConnectProvider.enable().then((function(e){return e[0]})).catch((function(e){if("User closed modal"===e.message)throw new f;throw e}))).then((function(t){return e.walletConnectProvider.on("disconnect",e.handleDisconnect),e.walletConnectProvider.on("chainChanged",e.handleChainChanged),e.walletConnectProvider.on("accountsChanged",e.handleAccountsChanged),{provider:e.walletConnectProvider,account:t}}))}var n=function(){if(!e.walletConnectProvider.wc.connected)return Promise.resolve(e.walletConnectProvider.wc.createSession({chainId:e.supportedChainIds&&e.supportedChainIds.length>0?e.supportedChainIds[0]:1})).then((function(){e.emit("URI_AVAILABLE",e.walletConnectProvider.wc.uri)}))}();return n&&n.then?n.then(t):t()},r=function(){if(!e.walletConnectProvider)return Promise.resolve(Promise.all([n.e(10),n.e(24)]).then(n.bind(null,1122)).then((function(e){var t;return null!=(t=null==e?void 0:e.default)?t:e}))).then((function(t){e.walletConnectProvider=new t(e.config)}))}();return Promise.resolve(r&&r.then?r.then(t):t())}catch(i){return Promise.reject(i)}},r.getProvider=function(){try{return Promise.resolve(this.walletConnectProvider)}catch(e){return Promise.reject(e)}},r.getChainId=function(){try{return Promise.resolve(this.walletConnectProvider.send("eth_chainId"))}catch(e){return Promise.reject(e)}},r.getAccount=function(){try{return Promise.resolve(this.walletConnectProvider.send("eth_accounts").then((function(e){return e[0]})))}catch(e){return Promise.reject(e)}},r.deactivate=function(){this.walletConnectProvider&&(this.walletConnectProvider.stop(),this.walletConnectProvider.removeListener("disconnect",this.handleDisconnect),this.walletConnectProvider.removeListener("chainChanged",this.handleChainChanged),this.walletConnectProvider.removeListener("accountsChanged",this.handleAccountsChanged))},r.close=function(){try{var e;return Promise.resolve(null==(e=this.walletConnectProvider)?void 0:e.close()).then((function(){}))}catch(t){return Promise.reject(t)}},t}(r.a)},function(e,t,n){(function(e){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function o(e,t,n){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var a;"object"===typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{a=n(662).Buffer}catch(k){}function s(e,t,n){for(var r=0,i=Math.min(e.length,n),o=t;o=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return r}function u(e,t,n,r){for(var i=0,o=Math.min(e.length,n),a=t;a=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(e){return e instanceof o||null!==e&&"object"===typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,n){if("number"===typeof e)return this._initNumber(e,t,n);if("object"===typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this.strip(),"le"===n&&this._initArray(this.toArray(),t,n)},o.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),t,n)},o.prototype._initArray=function(e,t,n){if(r("number"===typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===n)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=6)i=s(e,n,n+6),this.words[r]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,r++);n+6!==t&&(i=s(e,t,n+6),this.words[r]|=i<>>26-o&4194303),this.strip()},o.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var o=e.length-n,a=o%r,s=Math.min(o,o-a)+n,c=0,l=n;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},o.prototype.inspect=function(){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"],l=[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],f=[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 d(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,u=a/67108864|0;n.words[0]=s;for(var c=1;c>>26,f=67108863&u,d=Math.min(c,t.length-1),h=Math.max(0,c-e.length+1);h<=d;h++){var p=c-h|0;l+=(a=(i=0|e.words[p])*(o=0|t.words[h])+f)/67108864|0,f=67108863&a}n.words[c]=0|f,u=0|l}return 0!==u?n.words[c]=0|u:n.length--,n.strip()}o.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?c[6-u.length]+u+n:u+n,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(n=o.toString(16)+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var d=l[e],h=f[e];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var g=p.modn(h).toString(e);n=(p=p.idivn(h)).isZero()?g+n:c[d-g.length]+g+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return r("undefined"!==typeof a),this.toArrayLike(a,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,n){var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===t,c=new e(o),l=this.clone();if(u){for(s=0;!l.isZero();s++)a=l.andln(255),l.iushrn(8),c[s]=a;for(;s=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0===(8191&t)&&(n+=13,t>>>=13),0===(127&t)&&(n+=7,t>>>=7),0===(15&t)&&(n+=4,t>>>=4),0===(3&t)&&(n+=2,t>>>=2),0===(1&t)&&n++,n},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;ne.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;re.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){r("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){r("number"===typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(n=this,r=e):(n=e,r=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var o=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==o&&a>26,this.words[a]=67108863&t;if(0===o&&a>>13,h=0|a[1],p=8191&h,g=h>>>13,v=0|a[2],m=8191&v,A=v>>>13,y=0|a[3],b=8191&y,w=y>>>13,_=0|a[4],E=8191&_,k=_>>>13,I=0|a[5],C=8191&I,S=I>>>13,x=0|a[6],B=8191&x,O=x>>>13,M=0|a[7],P=8191&M,R=M>>>13,N=0|a[8],T=8191&N,Q=N>>>13,D=0|a[9],j=8191&D,U=D>>>13,L=0|s[0],F=8191&L,H=L>>>13,J=0|s[1],q=8191&J,G=J>>>13,z=0|s[2],V=8191&z,W=z>>>13,K=0|s[3],Y=8191&K,Z=K>>>13,X=0|s[4],$=8191&X,ee=X>>>13,te=0|s[5],ne=8191&te,re=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ue=8191&se,ce=se>>>13,le=0|s[8],fe=8191&le,de=le>>>13,he=0|s[9],pe=8191&he,ge=he>>>13;n.negative=e.negative^t.negative,n.length=19;var ve=(c+(r=Math.imul(f,F))|0)+((8191&(i=(i=Math.imul(f,H))+Math.imul(d,F)|0))<<13)|0;c=((o=Math.imul(d,H))+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(p,F),i=(i=Math.imul(p,H))+Math.imul(g,F)|0,o=Math.imul(g,H);var me=(c+(r=r+Math.imul(f,q)|0)|0)+((8191&(i=(i=i+Math.imul(f,G)|0)+Math.imul(d,q)|0))<<13)|0;c=((o=o+Math.imul(d,G)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(m,F),i=(i=Math.imul(m,H))+Math.imul(A,F)|0,o=Math.imul(A,H),r=r+Math.imul(p,q)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(g,q)|0,o=o+Math.imul(g,G)|0;var Ae=(c+(r=r+Math.imul(f,V)|0)|0)+((8191&(i=(i=i+Math.imul(f,W)|0)+Math.imul(d,V)|0))<<13)|0;c=((o=o+Math.imul(d,W)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(b,F),i=(i=Math.imul(b,H))+Math.imul(w,F)|0,o=Math.imul(w,H),r=r+Math.imul(m,q)|0,i=(i=i+Math.imul(m,G)|0)+Math.imul(A,q)|0,o=o+Math.imul(A,G)|0,r=r+Math.imul(p,V)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,W)|0;var ye=(c+(r=r+Math.imul(f,Y)|0)|0)+((8191&(i=(i=i+Math.imul(f,Z)|0)+Math.imul(d,Y)|0))<<13)|0;c=((o=o+Math.imul(d,Z)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(E,F),i=(i=Math.imul(E,H))+Math.imul(k,F)|0,o=Math.imul(k,H),r=r+Math.imul(b,q)|0,i=(i=i+Math.imul(b,G)|0)+Math.imul(w,q)|0,o=o+Math.imul(w,G)|0,r=r+Math.imul(m,V)|0,i=(i=i+Math.imul(m,W)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,W)|0,r=r+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(g,Y)|0,o=o+Math.imul(g,Z)|0;var be=(c+(r=r+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,ee)|0)+Math.imul(d,$)|0))<<13)|0;c=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(C,F),i=(i=Math.imul(C,H))+Math.imul(S,F)|0,o=Math.imul(S,H),r=r+Math.imul(E,q)|0,i=(i=i+Math.imul(E,G)|0)+Math.imul(k,q)|0,o=o+Math.imul(k,G)|0,r=r+Math.imul(b,V)|0,i=(i=i+Math.imul(b,W)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,W)|0,r=r+Math.imul(m,Y)|0,i=(i=i+Math.imul(m,Z)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,Z)|0,r=r+Math.imul(p,$)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(g,$)|0,o=o+Math.imul(g,ee)|0;var we=(c+(r=r+Math.imul(f,ne)|0)|0)+((8191&(i=(i=i+Math.imul(f,re)|0)+Math.imul(d,ne)|0))<<13)|0;c=((o=o+Math.imul(d,re)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(B,F),i=(i=Math.imul(B,H))+Math.imul(O,F)|0,o=Math.imul(O,H),r=r+Math.imul(C,q)|0,i=(i=i+Math.imul(C,G)|0)+Math.imul(S,q)|0,o=o+Math.imul(S,G)|0,r=r+Math.imul(E,V)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(k,V)|0,o=o+Math.imul(k,W)|0,r=r+Math.imul(b,Y)|0,i=(i=i+Math.imul(b,Z)|0)+Math.imul(w,Y)|0,o=o+Math.imul(w,Z)|0,r=r+Math.imul(m,$)|0,i=(i=i+Math.imul(m,ee)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,ee)|0,r=r+Math.imul(p,ne)|0,i=(i=i+Math.imul(p,re)|0)+Math.imul(g,ne)|0,o=o+Math.imul(g,re)|0;var _e=(c+(r=r+Math.imul(f,oe)|0)|0)+((8191&(i=(i=i+Math.imul(f,ae)|0)+Math.imul(d,oe)|0))<<13)|0;c=((o=o+Math.imul(d,ae)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(P,F),i=(i=Math.imul(P,H))+Math.imul(R,F)|0,o=Math.imul(R,H),r=r+Math.imul(B,q)|0,i=(i=i+Math.imul(B,G)|0)+Math.imul(O,q)|0,o=o+Math.imul(O,G)|0,r=r+Math.imul(C,V)|0,i=(i=i+Math.imul(C,W)|0)+Math.imul(S,V)|0,o=o+Math.imul(S,W)|0,r=r+Math.imul(E,Y)|0,i=(i=i+Math.imul(E,Z)|0)+Math.imul(k,Y)|0,o=o+Math.imul(k,Z)|0,r=r+Math.imul(b,$)|0,i=(i=i+Math.imul(b,ee)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,ee)|0,r=r+Math.imul(m,ne)|0,i=(i=i+Math.imul(m,re)|0)+Math.imul(A,ne)|0,o=o+Math.imul(A,re)|0,r=r+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(g,oe)|0,o=o+Math.imul(g,ae)|0;var Ee=(c+(r=r+Math.imul(f,ue)|0)|0)+((8191&(i=(i=i+Math.imul(f,ce)|0)+Math.imul(d,ue)|0))<<13)|0;c=((o=o+Math.imul(d,ce)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(T,F),i=(i=Math.imul(T,H))+Math.imul(Q,F)|0,o=Math.imul(Q,H),r=r+Math.imul(P,q)|0,i=(i=i+Math.imul(P,G)|0)+Math.imul(R,q)|0,o=o+Math.imul(R,G)|0,r=r+Math.imul(B,V)|0,i=(i=i+Math.imul(B,W)|0)+Math.imul(O,V)|0,o=o+Math.imul(O,W)|0,r=r+Math.imul(C,Y)|0,i=(i=i+Math.imul(C,Z)|0)+Math.imul(S,Y)|0,o=o+Math.imul(S,Z)|0,r=r+Math.imul(E,$)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,ee)|0,r=r+Math.imul(b,ne)|0,i=(i=i+Math.imul(b,re)|0)+Math.imul(w,ne)|0,o=o+Math.imul(w,re)|0,r=r+Math.imul(m,oe)|0,i=(i=i+Math.imul(m,ae)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,ae)|0,r=r+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(g,ue)|0,o=o+Math.imul(g,ce)|0;var ke=(c+(r=r+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,de)|0)+Math.imul(d,fe)|0))<<13)|0;c=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(j,F),i=(i=Math.imul(j,H))+Math.imul(U,F)|0,o=Math.imul(U,H),r=r+Math.imul(T,q)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(Q,q)|0,o=o+Math.imul(Q,G)|0,r=r+Math.imul(P,V)|0,i=(i=i+Math.imul(P,W)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,W)|0,r=r+Math.imul(B,Y)|0,i=(i=i+Math.imul(B,Z)|0)+Math.imul(O,Y)|0,o=o+Math.imul(O,Z)|0,r=r+Math.imul(C,$)|0,i=(i=i+Math.imul(C,ee)|0)+Math.imul(S,$)|0,o=o+Math.imul(S,ee)|0,r=r+Math.imul(E,ne)|0,i=(i=i+Math.imul(E,re)|0)+Math.imul(k,ne)|0,o=o+Math.imul(k,re)|0,r=r+Math.imul(b,oe)|0,i=(i=i+Math.imul(b,ae)|0)+Math.imul(w,oe)|0,o=o+Math.imul(w,ae)|0,r=r+Math.imul(m,ue)|0,i=(i=i+Math.imul(m,ce)|0)+Math.imul(A,ue)|0,o=o+Math.imul(A,ce)|0,r=r+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(g,fe)|0,o=o+Math.imul(g,de)|0;var Ie=(c+(r=r+Math.imul(f,pe)|0)|0)+((8191&(i=(i=i+Math.imul(f,ge)|0)+Math.imul(d,pe)|0))<<13)|0;c=((o=o+Math.imul(d,ge)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(j,q),i=(i=Math.imul(j,G))+Math.imul(U,q)|0,o=Math.imul(U,G),r=r+Math.imul(T,V)|0,i=(i=i+Math.imul(T,W)|0)+Math.imul(Q,V)|0,o=o+Math.imul(Q,W)|0,r=r+Math.imul(P,Y)|0,i=(i=i+Math.imul(P,Z)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,Z)|0,r=r+Math.imul(B,$)|0,i=(i=i+Math.imul(B,ee)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,ee)|0,r=r+Math.imul(C,ne)|0,i=(i=i+Math.imul(C,re)|0)+Math.imul(S,ne)|0,o=o+Math.imul(S,re)|0,r=r+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,ae)|0,r=r+Math.imul(b,ue)|0,i=(i=i+Math.imul(b,ce)|0)+Math.imul(w,ue)|0,o=o+Math.imul(w,ce)|0,r=r+Math.imul(m,fe)|0,i=(i=i+Math.imul(m,de)|0)+Math.imul(A,fe)|0,o=o+Math.imul(A,de)|0;var Ce=(c+(r=r+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,ge)|0)+Math.imul(g,pe)|0))<<13)|0;c=((o=o+Math.imul(g,ge)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(j,V),i=(i=Math.imul(j,W))+Math.imul(U,V)|0,o=Math.imul(U,W),r=r+Math.imul(T,Y)|0,i=(i=i+Math.imul(T,Z)|0)+Math.imul(Q,Y)|0,o=o+Math.imul(Q,Z)|0,r=r+Math.imul(P,$)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,ee)|0,r=r+Math.imul(B,ne)|0,i=(i=i+Math.imul(B,re)|0)+Math.imul(O,ne)|0,o=o+Math.imul(O,re)|0,r=r+Math.imul(C,oe)|0,i=(i=i+Math.imul(C,ae)|0)+Math.imul(S,oe)|0,o=o+Math.imul(S,ae)|0,r=r+Math.imul(E,ue)|0,i=(i=i+Math.imul(E,ce)|0)+Math.imul(k,ue)|0,o=o+Math.imul(k,ce)|0,r=r+Math.imul(b,fe)|0,i=(i=i+Math.imul(b,de)|0)+Math.imul(w,fe)|0,o=o+Math.imul(w,de)|0;var Se=(c+(r=r+Math.imul(m,pe)|0)|0)+((8191&(i=(i=i+Math.imul(m,ge)|0)+Math.imul(A,pe)|0))<<13)|0;c=((o=o+Math.imul(A,ge)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(j,Y),i=(i=Math.imul(j,Z))+Math.imul(U,Y)|0,o=Math.imul(U,Z),r=r+Math.imul(T,$)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(Q,$)|0,o=o+Math.imul(Q,ee)|0,r=r+Math.imul(P,ne)|0,i=(i=i+Math.imul(P,re)|0)+Math.imul(R,ne)|0,o=o+Math.imul(R,re)|0,r=r+Math.imul(B,oe)|0,i=(i=i+Math.imul(B,ae)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,ae)|0,r=r+Math.imul(C,ue)|0,i=(i=i+Math.imul(C,ce)|0)+Math.imul(S,ue)|0,o=o+Math.imul(S,ce)|0,r=r+Math.imul(E,fe)|0,i=(i=i+Math.imul(E,de)|0)+Math.imul(k,fe)|0,o=o+Math.imul(k,de)|0;var xe=(c+(r=r+Math.imul(b,pe)|0)|0)+((8191&(i=(i=i+Math.imul(b,ge)|0)+Math.imul(w,pe)|0))<<13)|0;c=((o=o+Math.imul(w,ge)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(j,$),i=(i=Math.imul(j,ee))+Math.imul(U,$)|0,o=Math.imul(U,ee),r=r+Math.imul(T,ne)|0,i=(i=i+Math.imul(T,re)|0)+Math.imul(Q,ne)|0,o=o+Math.imul(Q,re)|0,r=r+Math.imul(P,oe)|0,i=(i=i+Math.imul(P,ae)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,ae)|0,r=r+Math.imul(B,ue)|0,i=(i=i+Math.imul(B,ce)|0)+Math.imul(O,ue)|0,o=o+Math.imul(O,ce)|0,r=r+Math.imul(C,fe)|0,i=(i=i+Math.imul(C,de)|0)+Math.imul(S,fe)|0,o=o+Math.imul(S,de)|0;var Be=(c+(r=r+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,ge)|0)+Math.imul(k,pe)|0))<<13)|0;c=((o=o+Math.imul(k,ge)|0)+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,r=Math.imul(j,ne),i=(i=Math.imul(j,re))+Math.imul(U,ne)|0,o=Math.imul(U,re),r=r+Math.imul(T,oe)|0,i=(i=i+Math.imul(T,ae)|0)+Math.imul(Q,oe)|0,o=o+Math.imul(Q,ae)|0,r=r+Math.imul(P,ue)|0,i=(i=i+Math.imul(P,ce)|0)+Math.imul(R,ue)|0,o=o+Math.imul(R,ce)|0,r=r+Math.imul(B,fe)|0,i=(i=i+Math.imul(B,de)|0)+Math.imul(O,fe)|0,o=o+Math.imul(O,de)|0;var Oe=(c+(r=r+Math.imul(C,pe)|0)|0)+((8191&(i=(i=i+Math.imul(C,ge)|0)+Math.imul(S,pe)|0))<<13)|0;c=((o=o+Math.imul(S,ge)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(j,oe),i=(i=Math.imul(j,ae))+Math.imul(U,oe)|0,o=Math.imul(U,ae),r=r+Math.imul(T,ue)|0,i=(i=i+Math.imul(T,ce)|0)+Math.imul(Q,ue)|0,o=o+Math.imul(Q,ce)|0,r=r+Math.imul(P,fe)|0,i=(i=i+Math.imul(P,de)|0)+Math.imul(R,fe)|0,o=o+Math.imul(R,de)|0;var Me=(c+(r=r+Math.imul(B,pe)|0)|0)+((8191&(i=(i=i+Math.imul(B,ge)|0)+Math.imul(O,pe)|0))<<13)|0;c=((o=o+Math.imul(O,ge)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(j,ue),i=(i=Math.imul(j,ce))+Math.imul(U,ue)|0,o=Math.imul(U,ce),r=r+Math.imul(T,fe)|0,i=(i=i+Math.imul(T,de)|0)+Math.imul(Q,fe)|0,o=o+Math.imul(Q,de)|0;var Pe=(c+(r=r+Math.imul(P,pe)|0)|0)+((8191&(i=(i=i+Math.imul(P,ge)|0)+Math.imul(R,pe)|0))<<13)|0;c=((o=o+Math.imul(R,ge)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(j,fe),i=(i=Math.imul(j,de))+Math.imul(U,fe)|0,o=Math.imul(U,de);var Re=(c+(r=r+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,ge)|0)+Math.imul(Q,pe)|0))<<13)|0;c=((o=o+Math.imul(Q,ge)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ne=(c+(r=Math.imul(j,pe))|0)+((8191&(i=(i=Math.imul(j,ge))+Math.imul(U,pe)|0))<<13)|0;return c=((o=Math.imul(U,ge))+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,u[0]=ve,u[1]=me,u[2]=Ae,u[3]=ye,u[4]=be,u[5]=we,u[6]=_e,u[7]=Ee,u[8]=ke,u[9]=Ie,u[10]=Ce,u[11]=Se,u[12]=xe,u[13]=Be,u[14]=Oe,u[15]=Me,u[16]=Pe,u[17]=Re,u[18]=Ne,0!==c&&(u[19]=c,n.length++),n};function p(e,t,n){return(new g).mulp(e,t,n)}function g(e,t){this.x=e,this.y=t}Math.imul||(h=d),o.prototype.mulTo=function(e,t){var n,r=this.length+e.length;return n=10===this.length&&10===e.length?h(this,e,t):r<63?d(this,e,t):r<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}n.words[o]=s,r=a,a=i}return 0!==r?n.words[o]=r:n.length--,n.strip()}(this,e,t):p(this,e,t),n},g.prototype.makeRBT=function(e){for(var t=new Array(e),n=o.prototype._countBits(e)-1,r=0;r>=1;return r},g.prototype.permute=function(e,t,n,r,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,n[2*a+1]=8191&o,o>>>=13;for(a=2*t;a>=26,t+=i/67108864|0,t+=o>>>26,this.words[n]=67108863&o}return 0!==t&&(this.words[n]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n>>i}return t}(e);if(0===t.length)return new o(1);for(var n=this,r=0;r=0);var t,n=e%26,i=(e-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(t=0;t>>26-n}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==l||c>=i);c--){var f=0|this.words[c];this.words[c]=l<<26-o|f>>>o,l=f&s}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(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){r("number"===typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(r("number"===typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(u/67108864|0),this.words[i+n]=67108863&o}for(;i>26,this.words[i+n]=67108863&o;if(0===s)return this.strip();for(r(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),i=e,a=0|i.words[i.length-1];0!==(n=26-this._countBits(a))&&(i=i.ushln(n),r.iushln(n),a=0|i.words[i.length-1]);var s,u=r.length-i.length;if("mod"!==t){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c=0;f--){var d=67108864*(0|r.words[i.length+f])+(0|r.words[i.length+f-1]);for(d=Math.min(d/a|0,67108863),r._ishlnsubmul(i,d,f);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(i,1,f),r.isZero()||(r.negative^=1);s&&(s.words[f]=d)}return s&&s.strip(),r.strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:s||null,mod:r}},o.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),o=n.cmp(r);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){r(e<=67108863);for(var t=(1<<26)%e,n=0,i=this.length-1;i>=0;i--)n=(t*n+(0|this.words[i]))%e;return n},o.prototype.idivn=function(e){r(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*t;this.words[n]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++c;for(var l=n.clone(),f=t.clone();!t.isZero();){for(var d=0,h=1;0===(t.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(l),a.isub(f)),i.iushrn(1),a.iushrn(1);for(var p=0,g=1;0===(n.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(l),u.isub(f)),s.iushrn(1),u.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(s),a.isub(u)):(n.isub(t),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:n.iushln(c)}},o.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),s=new o(0),u=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,l=1;0===(t.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var f=0,d=1;0===(n.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(n.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(s)):(n.isub(t),s.isub(a))}return(i=0===t.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var o=t;t=n,n=o}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){r("number"===typeof e);var t=e%26,n=(e-t)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){ri&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new _(e)},o.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function m(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function A(){m.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){m.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function b(){m.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){m.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(e){if("string"===typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function E(e){_.call(this,e),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)}m.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},m.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t0?n.isub(this.p):n.strip(),n},m.prototype.split=function(e,t){e.iushrn(this.n,0,t)},m.prototype.imulK=function(e){return e.imul(this.k)},i(A,m),A.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},A.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new A;else if("p224"===e)t=new y;else if("p192"===e)t=new b;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new w}return v[e]=t,t},_.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},_.prototype._verify2=function(e,t){r(0===(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},_.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},_.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},_.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},_.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},_.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},_.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},_.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},_.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},_.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},_.prototype.isqr=function(e){return this.imul(e,e.clone())},_.prototype.sqr=function(e){return this.mul(e,e)},_.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2===1),3===t){var n=this.m.add(new o(1)).iushrn(2);return this.pow(e,n)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);r(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,c).cmp(u);)l.redIAdd(u);for(var f=this.pow(l,i),d=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=a;0!==h.cmp(s);){for(var g=h,v=0;0!==g.cmp(s);v++)g=g.redSqr();r(v=0;r--){for(var c=t.words[r],l=u-1;l>=0;l--){var f=c>>l&1;i!==n[0]&&(i=this.sqr(i)),0!==f||0!==a?(a<<=1,a|=f,(4===++s||0===r&&0===l)&&(i=this.mul(i,n[a]),s=0,a=0)):s=0}u=26}return i},_.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},_.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new E(e)},i(E,_),E.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},E.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},E.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},E.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},E.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,n(77)(e))},,function(e,t,n){var r=n(318),i=n(311);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},function(e,t,n){var r=n(193),i=n(194);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},function(e,t,n){var r=n(233),i=n(617),o=n(618),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?i(e):o(e)}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},,function(e,t,n){(function(e){var r="undefined"!==typeof e&&e||"undefined"!==typeof self&&self||window,i=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(i.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new o(i.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(615),t.setImmediate="undefined"!==typeof self&&self.setImmediate||"undefined"!==typeof e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!==typeof self&&self.clearImmediate||"undefined"!==typeof e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(20))},function(e,t,n){var r=n(308)(Object,"create");e.exports=r},function(e,t,n){var r=n(585);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},function(e,t,n){var r=n(639);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(222),i=n(23);function o(e,t){if(t&&("object"===Object(r.a)(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Object(i.a)(e)}},function(e,t,n){"use strict";(function(t){"undefined"===typeof t||!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports={nextTick:function(e,n,r,i){if("function"!==typeof e)throw new TypeError('"callback" argument must be a function');var o,a,s=arguments.length;switch(s){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick((function(){e.call(null,n)}));case 3:return t.nextTick((function(){e.call(null,n,r)}));case 4:return t.nextTick((function(){e.call(null,n,r,i)}));default:for(o=new Array(s-1),a=0;a0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function c(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=u,u.prototype.point=function(){throw new Error("Not implemented")},u.prototype.validate=function(){throw new Error("Not implemented")},u.prototype._fixedNafMul=function(e,t){s(e.precomputed);var n=e._getDoubles(),r=o(t,1,this._bitLength),i=(1<=a;l--)u=(u<<1)+r[l];c.push(u)}for(var f=this.jpoint(null,null,null),d=this.jpoint(null,null,null),h=i;h>0;h--){for(a=0;a=0;c--){for(var l=0;c>=0&&0===a[c];c--)l++;if(c>=0&&l++,u=u.dblp(l),c<0)break;var f=a[c];s(0!==f),u="affine"===e.type?f>0?u.mixedAdd(i[f-1>>1]):u.mixedAdd(i[-f-1>>1].neg()):f>0?u.add(i[f-1>>1]):u.add(i[-f-1>>1].neg())}return"affine"===e.type?u.toP():u},u.prototype._wnafMulAdd=function(e,t,n,r,i){var s,u,c,l=this._wnafT1,f=this._wnafT2,d=this._wnafT3,h=0;for(s=0;s=1;s-=2){var g=s-1,v=s;if(1===l[g]&&1===l[v]){var m=[t[g],null,null,t[v]];0===t[g].y.cmp(t[v].y)?(m[1]=t[g].add(t[v]),m[2]=t[g].toJ().mixedAdd(t[v].neg())):0===t[g].y.cmp(t[v].y.redNeg())?(m[1]=t[g].toJ().mixedAdd(t[v]),m[2]=t[g].add(t[v].neg())):(m[1]=t[g].toJ().mixedAdd(t[v]),m[2]=t[g].toJ().mixedAdd(t[v].neg()));var A=[-3,-1,-5,-7,0,7,5,1,3],y=a(n[g],n[v]);for(h=Math.max(y[0].length,h),d[g]=new Array(h),d[v]=new Array(h),u=0;u=0;s--){for(var k=0;s>=0;){var I=!0;for(u=0;u=0&&k++,_=_.dblp(k),s<0)break;for(u=0;u0?c=f[u][C-1>>1]:C<0&&(c=f[u][-C-1>>1].neg()),_="affine"===c.type?_.mixedAdd(c):_.add(c))}}for(s=0;s=Math.ceil((e.bitLength()+1)/t.step)},c.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],r=this,i=0;it.length)throw new Error("invalid rlp: total length is larger than the data");if(0===(a=t.slice(r,f)).length)throw new Error("invalid rlp, List has a invalid length");for(;a.length;)u=s(a),c.push(u.data),a=u.remainder;return{data:c,remainder:t.slice(f)}}function u(e){return"0x"===e.slice(0,2)}function c(e){if(e<0)throw new Error("Invalid integer as argument, must be unsigned!");var t=e.toString(16);return t.length%2?"0"+t:t}function l(t){if(!e.isBuffer(t)){if("string"===typeof t)return u(t)?e.from((n="string"!==typeof(r=t)?r:u(r)?r.slice(2):r).length%2?"0"+n:n,"hex"):e.from(t);if("number"===typeof t||"bigint"===typeof t)return t?function(t){var n=c(t);return e.from(n,"hex")}(t):e.from([]);if(null===t||void 0===t)return e.from([]);if(t instanceof Uint8Array)return e.from(t);if(i.default.isBN(t))return e.from(t.toArray());throw new Error("invalid type")}var n,r;return t}t.encode=function t(n){if(Array.isArray(n)){for(var r=[],i=0;i1?t-1:0),r=1;r0&&!n.includes(e.length))throw new TypeError("Expected Uint8Array of length ".concat(n,", not of length=").concat(e.length))}function a(e){if("function"!==typeof e||"function"!==typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");r(e.outputLen),r(e.blockLen)}function s(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function u(e,t){o(e);var n=t.outputLen;if(e.length>>24]^l[p>>>16&255]^f[g>>>8&255]^d[255&v]^t[m++],a=c[p>>>24]^l[g>>>16&255]^f[v>>>8&255]^d[255&h]^t[m++],s=c[g>>>24]^l[v>>>16&255]^f[h>>>8&255]^d[255&p]^t[m++],u=c[v>>>24]^l[h>>>16&255]^f[p>>>8&255]^d[255&g]^t[m++],h=o,p=a,g=s,v=u;return o=(r[h>>>24]<<24|r[p>>>16&255]<<16|r[g>>>8&255]<<8|r[255&v])^t[m++],a=(r[p>>>24]<<24|r[g>>>16&255]<<16|r[v>>>8&255]<<8|r[255&h])^t[m++],s=(r[g>>>24]<<24|r[v>>>16&255]<<16|r[h>>>8&255]<<8|r[255&p])^t[m++],u=(r[v>>>24]<<24|r[h>>>16&255]<<16|r[p>>>8&255]<<8|r[255&g])^t[m++],[o>>>=0,a>>>=0,s>>>=0,u>>>=0]}var s=[0,1,2,4,8,16,32,64,128,27,54],u=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var n=[],r=[],i=[[],[],[],[]],o=[[],[],[],[]],a=0,s=0,u=0;u<256;++u){var c=s^s<<1^s<<2^s<<3^s<<4;c=c>>>8^255&c^99,n[a]=c,r[c]=a;var l=e[a],f=e[l],d=e[f],h=257*e[c]^16843008*c;i[0][a]=h<<24|h>>>8,i[1][a]=h<<16|h>>>16,i[2][a]=h<<8|h>>>24,i[3][a]=h,h=16843009*d^65537*f^257*l^16843008*a,o[0][c]=h<<24|h>>>8,o[1][c]=h<<16|h>>>16,o[2][c]=h<<8|h>>>24,o[3][c]=h,0===a?a=s=1:(a=l^e[e[e[d^l]]],s^=e[e[s]])}return{SBOX:n,INV_SBOX:r,SUB_MIX:i,INV_SUB_MIX:o}}();function c(e){this._key=i(e),this._reset()}c.blockSize=16,c.keySize=32,c.prototype.blockSize=c.blockSize,c.prototype.keySize=c.keySize,c.prototype._reset=function(){for(var e=this._key,t=e.length,n=t+6,r=4*(n+1),i=[],o=0;o>>24,a=u.SBOX[a>>>24]<<24|u.SBOX[a>>>16&255]<<16|u.SBOX[a>>>8&255]<<8|u.SBOX[255&a],a^=s[o/t|0]<<24):t>6&&o%t===4&&(a=u.SBOX[a>>>24]<<24|u.SBOX[a>>>16&255]<<16|u.SBOX[a>>>8&255]<<8|u.SBOX[255&a]),i[o]=i[o-t]^a}for(var c=[],l=0;l>>24]]^u.INV_SUB_MIX[1][u.SBOX[d>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[d>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&d]]}this._nRounds=n,this._keySchedule=i,this._invKeySchedule=c},c.prototype.encryptBlockRaw=function(e){return a(e=i(e),this._keySchedule,u.SUB_MIX,u.SBOX,this._nRounds)},c.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),n=r.allocUnsafe(16);return n.writeUInt32BE(t[0],0),n.writeUInt32BE(t[1],4),n.writeUInt32BE(t[2],8),n.writeUInt32BE(t[3],12),n},c.prototype.decryptBlock=function(e){var t=(e=i(e))[1];e[1]=e[3],e[3]=t;var n=a(e,this._invKeySchedule,u.INV_SUB_MIX,u.INV_SBOX,this._nRounds),o=r.allocUnsafe(16);return o.writeUInt32BE(n[0],0),o.writeUInt32BE(n[3],4),o.writeUInt32BE(n[2],8),o.writeUInt32BE(n[1],12),o},c.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},e.exports.AES=c},function(e,t,n){var r=n(37).Buffer,i=n(250);e.exports=function(e,t,n,o){if(r.isBuffer(e)||(e=r.from(e,"binary")),t&&(r.isBuffer(t)||(t=r.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var a=n/8,s=r.alloc(a),u=r.alloc(o||0),c=r.alloc(0);a>0||o>0;){var l=new i;l.update(c),l.update(e),t&&l.update(t),c=l.digest();var f=0;if(a>0){var d=s.length-a;f=Math.min(a,c.length),c.copy(s,d,0,f),a-=f}if(f0){var h=u.length-o,p=Math.min(o,c.length-f);c.copy(u,h,f,f+p),o-=p}}return c.fill(0),{key:s,iv:u}}},function(e,t,n){var r=n(920),i=n(927),o=n(928),a=n(268),s=n(411),u=n(37).Buffer;function c(e){var t;"object"!==typeof e||u.isBuffer(e)||(t=e.passphrase,e=e.key),"string"===typeof e&&(e=u.from(e));var n,c,l=o(e,t),f=l.tag,d=l.data;switch(f){case"CERTIFICATE":c=r.certificate.decode(d,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(c||(c=r.PublicKey.decode(d,"der")),n=c.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return r.RSAPublicKey.decode(c.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return c.subjectPrivateKey=c.subjectPublicKey,{type:"ec",data:c};case"1.2.840.10040.4.1":return c.algorithm.params.pub_key=r.DSAparam.decode(c.subjectPublicKey.data,"der"),{type:"dsa",data:c.algorithm.params};default:throw new Error("unknown key id "+n)}case"ENCRYPTED PRIVATE KEY":d=function(e,t){var n=e.algorithm.decrypt.kde.kdeparams.salt,r=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),o=i[e.algorithm.decrypt.cipher.algo.join(".")],c=e.algorithm.decrypt.cipher.iv,l=e.subjectPrivateKey,f=parseInt(o.split("-")[1],10)/8,d=s.pbkdf2Sync(t,n,r,f,"sha1"),h=a.createDecipheriv(o,d,c),p=[];return p.push(h.update(l)),p.push(h.final()),u.concat(p)}(d=r.EncryptedPrivateKey.decode(d,"der"),t);case"PRIVATE KEY":switch(n=(c=r.PrivateKey.decode(d,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return r.RSAPrivateKey.decode(c.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:c.algorithm.curve,privateKey:r.ECPrivateKey.decode(c.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return c.algorithm.params.priv_key=r.DSAparam.decode(c.subjectPrivateKey,"der"),{type:"dsa",params:c.algorithm.params};default:throw new Error("unknown key id "+n)}case"RSA PUBLIC KEY":return r.RSAPublicKey.decode(d,"der");case"RSA PRIVATE KEY":return r.RSAPrivateKey.decode(d,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:r.DSAPrivateKey.decode(d,"der")};case"EC PRIVATE KEY":return{curve:(d=r.ECPrivateKey.decode(d,"der")).parameters.value,privateKey:d.privateKey};default:throw new Error("unknown key type "+f)}}e.exports=c,c.signature=r.signature},function(e,t,n){(function(e){function n(e,t){for(var n=0,r=e.length-1;r>=0;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function r(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r=-1&&!i;o--){var a=o>=0?arguments[o]:e.cwd();if("string"!==typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(t=a+"/"+t,i="/"===a.charAt(0))}return(i?"/":"")+(t=n(r(t.split("/"),(function(e){return!!e})),!i).join("/"))||"."},t.normalize=function(e){var o=t.isAbsolute(e),a="/"===i(e,-1);return(e=n(r(e.split("/"),(function(e){return!!e})),!o).join("/"))||o||(e="."),e&&a&&(e+="/"),(o?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(r(e,(function(e,t){if("string"!==typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},t.relative=function(e,n){function r(e){for(var t=0;t=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=t.resolve(e).substr(1),n=t.resolve(n).substr(1);for(var i=r(e.split("/")),o=r(n.split("/")),a=Math.min(i.length,o.length),s=a,u=0;u=1;--o)if(47===(t=e.charCodeAt(o))){if(!i){r=o;break}}else i=!1;return-1===r?n?"/":".":n&&1===r?"/":e.slice(0,r)},t.basename=function(e,t){var n=function(e){"string"!==typeof e&&(e+="");var t,n=0,r=-1,i=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!i){n=t+1;break}}else-1===r&&(i=!1,r=t+1);return-1===r?"":e.slice(n,r)}(e);return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},t.extname=function(e){"string"!==typeof e&&(e+="");for(var t=-1,n=0,r=-1,i=!0,o=0,a=e.length-1;a>=0;--a){var s=e.charCodeAt(a);if(47!==s)-1===r&&(i=!1,r=a+1),46===s?-1===t?t=a:1!==o&&(o=1):-1!==t&&(o=-1);else if(!i){n=a+1;break}}return-1===t||-1===r||0===o||1===o&&t===r-1&&t===n+1?"":e.slice(t,r)};var i="b"==="ab".substr(-1)?function(e,t,n){return e.substr(t,n)}:function(e,t,n){return t<0&&(t=e.length+t),e.substr(t,n)}}).call(this,n(35))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isMultisigThresholdPubkey=t.isSinglePubkey=t.pubkeyType=t.isSecp256k1Pubkey=t.isEd25519Pubkey=void 0,t.isEd25519Pubkey=function(e){return"tendermint/PubKeyEd25519"===e.type},t.isSecp256k1Pubkey=function(e){return"tendermint/PubKeySecp256k1"===e.type},t.pubkeyType={secp256k1:"tendermint/PubKeySecp256k1",ed25519:"tendermint/PubKeyEd25519",sr25519:"tendermint/PubKeySr25519",multisigThreshold:"tendermint/PubKeyMultisigThreshold"},t.isSinglePubkey=function(e){return[t.pubkeyType.ed25519,t.pubkeyType.secp256k1,t.pubkeyType.sr25519].includes(e.type)},t.isMultisigThresholdPubkey=function(e){return"tendermint/PubKeyMultisigThreshold"===e.type}},function(e,t,n){"use strict";var r=n(21),i=r.Reader,o=r.Writer,a=r.util,s=r.roots.default||(r.roots.default={});s.ics23=function(){var e={};return e.HashOp=function(){var e={},t=Object.create(e);return t[e[0]="NO_HASH"]=0,t[e[1]="SHA256"]=1,t[e[2]="SHA512"]=2,t[e[3]="KECCAK"]=3,t[e[4]="RIPEMD160"]=4,t[e[5]="BITCOIN"]=5,t[e[6]="SHA512_256"]=6,t}(),e.LengthOp=function(){var e={},t=Object.create(e);return t[e[0]="NO_PREFIX"]=0,t[e[1]="VAR_PROTO"]=1,t[e[2]="VAR_RLP"]=2,t[e[3]="FIXED32_BIG"]=3,t[e[4]="FIXED32_LITTLE"]=4,t[e[5]="FIXED64_BIG"]=5,t[e[6]="FIXED64_LITTLE"]=6,t[e[7]="REQUIRE_32_BYTES"]=7,t[e[8]="REQUIRE_64_BYTES"]=8,t}(),e.ExistenceProof=function(){function e(e){if(this.path=[],e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.key=e.bytes();break;case 2:r.value=e.bytes();break;case 3:r.leaf=s.ics23.LeafOp.decode(e,e.uint32());break;case 4:r.path&&r.path.length||(r.path=[]),r.path.push(s.ics23.InnerOp.decode(e,e.uint32()));break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==typeof e||null===e)return"object expected";if(null!=e.key&&e.hasOwnProperty("key")&&!(e.key&&"number"===typeof e.key.length||a.isString(e.key)))return"key: buffer expected";if(null!=e.value&&e.hasOwnProperty("value")&&!(e.value&&"number"===typeof e.value.length||a.isString(e.value)))return"value: buffer expected";if(null!=e.leaf&&e.hasOwnProperty("leaf")&&(n=s.ics23.LeafOp.verify(e.leaf)))return"leaf."+n;if(null!=e.path&&e.hasOwnProperty("path")){if(!Array.isArray(e.path))return"path: array expected";for(var t=0;t>>3){case 1:r.key=e.bytes();break;case 2:r.left=s.ics23.ExistenceProof.decode(e,e.uint32());break;case 3:r.right=s.ics23.ExistenceProof.decode(e,e.uint32());break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==typeof e||null===e)return"object expected";if(null!=e.key&&e.hasOwnProperty("key")&&!(e.key&&"number"===typeof e.key.length||a.isString(e.key)))return"key: buffer expected";var t;if(null!=e.left&&e.hasOwnProperty("left")&&(t=s.ics23.ExistenceProof.verify(e.left)))return"left."+t;if(null!=e.right&&e.hasOwnProperty("right")&&(t=s.ics23.ExistenceProof.verify(e.right)))return"right."+t;return null},e.fromObject=function(e){if(e instanceof s.ics23.NonExistenceProof)return e;var t=new s.ics23.NonExistenceProof;if(null!=e.key&&("string"===typeof e.key?a.base64.decode(e.key,t.key=a.newBuffer(a.base64.length(e.key)),0):e.key.length&&(t.key=e.key)),null!=e.left){if("object"!==typeof e.left)throw TypeError(".ics23.NonExistenceProof.left: object expected");t.left=s.ics23.ExistenceProof.fromObject(e.left)}if(null!=e.right){if("object"!==typeof e.right)throw TypeError(".ics23.NonExistenceProof.right: object expected");t.right=s.ics23.ExistenceProof.fromObject(e.right)}return t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(t.bytes===String?n.key="":(n.key=[],t.bytes!==Array&&(n.key=a.newBuffer(n.key))),n.left=null,n.right=null),null!=e.key&&e.hasOwnProperty("key")&&(n.key=t.bytes===String?a.base64.encode(e.key,0,e.key.length):t.bytes===Array?Array.prototype.slice.call(e.key):e.key),null!=e.left&&e.hasOwnProperty("left")&&(n.left=s.ics23.ExistenceProof.toObject(e.left,t)),null!=e.right&&e.hasOwnProperty("right")&&(n.right=s.ics23.ExistenceProof.toObject(e.right,t)),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,r.util.toJSONOptions)},e}(),e.CommitmentProof=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.exist=s.ics23.ExistenceProof.decode(e,e.uint32());break;case 2:r.nonexist=s.ics23.NonExistenceProof.decode(e,e.uint32());break;case 3:r.batch=s.ics23.BatchProof.decode(e,e.uint32());break;case 4:r.compressed=s.ics23.CompressedBatchProof.decode(e,e.uint32());break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==typeof e||null===e)return"object expected";var t={};if(null!=e.exist&&e.hasOwnProperty("exist")&&(t.proof=1,n=s.ics23.ExistenceProof.verify(e.exist)))return"exist."+n;if(null!=e.nonexist&&e.hasOwnProperty("nonexist")){if(1===t.proof)return"proof: multiple values";if(t.proof=1,n=s.ics23.NonExistenceProof.verify(e.nonexist))return"nonexist."+n}if(null!=e.batch&&e.hasOwnProperty("batch")){if(1===t.proof)return"proof: multiple values";if(t.proof=1,n=s.ics23.BatchProof.verify(e.batch))return"batch."+n}if(null!=e.compressed&&e.hasOwnProperty("compressed")){if(1===t.proof)return"proof: multiple values";var n;if(t.proof=1,n=s.ics23.CompressedBatchProof.verify(e.compressed))return"compressed."+n}return null},e.fromObject=function(e){if(e instanceof s.ics23.CommitmentProof)return e;var t=new s.ics23.CommitmentProof;if(null!=e.exist){if("object"!==typeof e.exist)throw TypeError(".ics23.CommitmentProof.exist: object expected");t.exist=s.ics23.ExistenceProof.fromObject(e.exist)}if(null!=e.nonexist){if("object"!==typeof e.nonexist)throw TypeError(".ics23.CommitmentProof.nonexist: object expected");t.nonexist=s.ics23.NonExistenceProof.fromObject(e.nonexist)}if(null!=e.batch){if("object"!==typeof e.batch)throw TypeError(".ics23.CommitmentProof.batch: object expected");t.batch=s.ics23.BatchProof.fromObject(e.batch)}if(null!=e.compressed){if("object"!==typeof e.compressed)throw TypeError(".ics23.CommitmentProof.compressed: object expected");t.compressed=s.ics23.CompressedBatchProof.fromObject(e.compressed)}return t},e.toObject=function(e,t){t||(t={});var n={};return null!=e.exist&&e.hasOwnProperty("exist")&&(n.exist=s.ics23.ExistenceProof.toObject(e.exist,t),t.oneofs&&(n.proof="exist")),null!=e.nonexist&&e.hasOwnProperty("nonexist")&&(n.nonexist=s.ics23.NonExistenceProof.toObject(e.nonexist,t),t.oneofs&&(n.proof="nonexist")),null!=e.batch&&e.hasOwnProperty("batch")&&(n.batch=s.ics23.BatchProof.toObject(e.batch,t),t.oneofs&&(n.proof="batch")),null!=e.compressed&&e.hasOwnProperty("compressed")&&(n.compressed=s.ics23.CompressedBatchProof.toObject(e.compressed,t),t.oneofs&&(n.proof="compressed")),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,r.util.toJSONOptions)},e}(),e.LeafOp=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.hash=e.int32();break;case 2:r.prehashKey=e.int32();break;case 3:r.prehashValue=e.int32();break;case 4:r.length=e.int32();break;case 5:r.prefix=e.bytes();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==typeof e||null===e)return"object expected";if(null!=e.hash&&e.hasOwnProperty("hash"))switch(e.hash){default:return"hash: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:}if(null!=e.prehashKey&&e.hasOwnProperty("prehashKey"))switch(e.prehashKey){default:return"prehashKey: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:}if(null!=e.prehashValue&&e.hasOwnProperty("prehashValue"))switch(e.prehashValue){default:return"prehashValue: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:}if(null!=e.length&&e.hasOwnProperty("length"))switch(e.length){default:return"length: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:}return null!=e.prefix&&e.hasOwnProperty("prefix")&&!(e.prefix&&"number"===typeof e.prefix.length||a.isString(e.prefix))?"prefix: buffer expected":null},e.fromObject=function(e){if(e instanceof s.ics23.LeafOp)return e;var t=new s.ics23.LeafOp;switch(e.hash){case"NO_HASH":case 0:t.hash=0;break;case"SHA256":case 1:t.hash=1;break;case"SHA512":case 2:t.hash=2;break;case"KECCAK":case 3:t.hash=3;break;case"RIPEMD160":case 4:t.hash=4;break;case"BITCOIN":case 5:t.hash=5;break;case"SHA512_256":case 6:t.hash=6}switch(e.prehashKey){case"NO_HASH":case 0:t.prehashKey=0;break;case"SHA256":case 1:t.prehashKey=1;break;case"SHA512":case 2:t.prehashKey=2;break;case"KECCAK":case 3:t.prehashKey=3;break;case"RIPEMD160":case 4:t.prehashKey=4;break;case"BITCOIN":case 5:t.prehashKey=5;break;case"SHA512_256":case 6:t.prehashKey=6}switch(e.prehashValue){case"NO_HASH":case 0:t.prehashValue=0;break;case"SHA256":case 1:t.prehashValue=1;break;case"SHA512":case 2:t.prehashValue=2;break;case"KECCAK":case 3:t.prehashValue=3;break;case"RIPEMD160":case 4:t.prehashValue=4;break;case"BITCOIN":case 5:t.prehashValue=5;break;case"SHA512_256":case 6:t.prehashValue=6}switch(e.length){case"NO_PREFIX":case 0:t.length=0;break;case"VAR_PROTO":case 1:t.length=1;break;case"VAR_RLP":case 2:t.length=2;break;case"FIXED32_BIG":case 3:t.length=3;break;case"FIXED32_LITTLE":case 4:t.length=4;break;case"FIXED64_BIG":case 5:t.length=5;break;case"FIXED64_LITTLE":case 6:t.length=6;break;case"REQUIRE_32_BYTES":case 7:t.length=7;break;case"REQUIRE_64_BYTES":case 8:t.length=8}return null!=e.prefix&&("string"===typeof e.prefix?a.base64.decode(e.prefix,t.prefix=a.newBuffer(a.base64.length(e.prefix)),0):e.prefix.length&&(t.prefix=e.prefix)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.hash=t.enums===String?"NO_HASH":0,n.prehashKey=t.enums===String?"NO_HASH":0,n.prehashValue=t.enums===String?"NO_HASH":0,n.length=t.enums===String?"NO_PREFIX":0,t.bytes===String?n.prefix="":(n.prefix=[],t.bytes!==Array&&(n.prefix=a.newBuffer(n.prefix)))),null!=e.hash&&e.hasOwnProperty("hash")&&(n.hash=t.enums===String?s.ics23.HashOp[e.hash]:e.hash),null!=e.prehashKey&&e.hasOwnProperty("prehashKey")&&(n.prehashKey=t.enums===String?s.ics23.HashOp[e.prehashKey]:e.prehashKey),null!=e.prehashValue&&e.hasOwnProperty("prehashValue")&&(n.prehashValue=t.enums===String?s.ics23.HashOp[e.prehashValue]:e.prehashValue),null!=e.length&&e.hasOwnProperty("length")&&(n.length=t.enums===String?s.ics23.LengthOp[e.length]:e.length),null!=e.prefix&&e.hasOwnProperty("prefix")&&(n.prefix=t.bytes===String?a.base64.encode(e.prefix,0,e.prefix.length):t.bytes===Array?Array.prototype.slice.call(e.prefix):e.prefix),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,r.util.toJSONOptions)},e}(),e.InnerOp=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.hash=e.int32();break;case 2:r.prefix=e.bytes();break;case 3:r.suffix=e.bytes();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==typeof e||null===e)return"object expected";if(null!=e.hash&&e.hasOwnProperty("hash"))switch(e.hash){default:return"hash: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:}return null!=e.prefix&&e.hasOwnProperty("prefix")&&!(e.prefix&&"number"===typeof e.prefix.length||a.isString(e.prefix))?"prefix: buffer expected":null!=e.suffix&&e.hasOwnProperty("suffix")&&!(e.suffix&&"number"===typeof e.suffix.length||a.isString(e.suffix))?"suffix: buffer expected":null},e.fromObject=function(e){if(e instanceof s.ics23.InnerOp)return e;var t=new s.ics23.InnerOp;switch(e.hash){case"NO_HASH":case 0:t.hash=0;break;case"SHA256":case 1:t.hash=1;break;case"SHA512":case 2:t.hash=2;break;case"KECCAK":case 3:t.hash=3;break;case"RIPEMD160":case 4:t.hash=4;break;case"BITCOIN":case 5:t.hash=5;break;case"SHA512_256":case 6:t.hash=6}return null!=e.prefix&&("string"===typeof e.prefix?a.base64.decode(e.prefix,t.prefix=a.newBuffer(a.base64.length(e.prefix)),0):e.prefix.length&&(t.prefix=e.prefix)),null!=e.suffix&&("string"===typeof e.suffix?a.base64.decode(e.suffix,t.suffix=a.newBuffer(a.base64.length(e.suffix)),0):e.suffix.length&&(t.suffix=e.suffix)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.hash=t.enums===String?"NO_HASH":0,t.bytes===String?n.prefix="":(n.prefix=[],t.bytes!==Array&&(n.prefix=a.newBuffer(n.prefix))),t.bytes===String?n.suffix="":(n.suffix=[],t.bytes!==Array&&(n.suffix=a.newBuffer(n.suffix)))),null!=e.hash&&e.hasOwnProperty("hash")&&(n.hash=t.enums===String?s.ics23.HashOp[e.hash]:e.hash),null!=e.prefix&&e.hasOwnProperty("prefix")&&(n.prefix=t.bytes===String?a.base64.encode(e.prefix,0,e.prefix.length):t.bytes===Array?Array.prototype.slice.call(e.prefix):e.prefix),null!=e.suffix&&e.hasOwnProperty("suffix")&&(n.suffix=t.bytes===String?a.base64.encode(e.suffix,0,e.suffix.length):t.bytes===Array?Array.prototype.slice.call(e.suffix):e.suffix),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,r.util.toJSONOptions)},e}(),e.ProofSpec=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.leafSpec=s.ics23.LeafOp.decode(e,e.uint32());break;case 2:r.innerSpec=s.ics23.InnerSpec.decode(e,e.uint32());break;case 3:r.maxDepth=e.int32();break;case 4:r.minDepth=e.int32();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==typeof e||null===e)return"object expected";var t;if(null!=e.leafSpec&&e.hasOwnProperty("leafSpec")&&(t=s.ics23.LeafOp.verify(e.leafSpec)))return"leafSpec."+t;if(null!=e.innerSpec&&e.hasOwnProperty("innerSpec")&&(t=s.ics23.InnerSpec.verify(e.innerSpec)))return"innerSpec."+t;return null!=e.maxDepth&&e.hasOwnProperty("maxDepth")&&!a.isInteger(e.maxDepth)?"maxDepth: integer expected":null!=e.minDepth&&e.hasOwnProperty("minDepth")&&!a.isInteger(e.minDepth)?"minDepth: integer expected":null},e.fromObject=function(e){if(e instanceof s.ics23.ProofSpec)return e;var t=new s.ics23.ProofSpec;if(null!=e.leafSpec){if("object"!==typeof e.leafSpec)throw TypeError(".ics23.ProofSpec.leafSpec: object expected");t.leafSpec=s.ics23.LeafOp.fromObject(e.leafSpec)}if(null!=e.innerSpec){if("object"!==typeof e.innerSpec)throw TypeError(".ics23.ProofSpec.innerSpec: object expected");t.innerSpec=s.ics23.InnerSpec.fromObject(e.innerSpec)}return null!=e.maxDepth&&(t.maxDepth=0|e.maxDepth),null!=e.minDepth&&(t.minDepth=0|e.minDepth),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.leafSpec=null,n.innerSpec=null,n.maxDepth=0,n.minDepth=0),null!=e.leafSpec&&e.hasOwnProperty("leafSpec")&&(n.leafSpec=s.ics23.LeafOp.toObject(e.leafSpec,t)),null!=e.innerSpec&&e.hasOwnProperty("innerSpec")&&(n.innerSpec=s.ics23.InnerSpec.toObject(e.innerSpec,t)),null!=e.maxDepth&&e.hasOwnProperty("maxDepth")&&(n.maxDepth=e.maxDepth),null!=e.minDepth&&e.hasOwnProperty("minDepth")&&(n.minDepth=e.minDepth),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,r.util.toJSONOptions)},e}(),e.InnerSpec=function(){function e(e){if(this.childOrder=[],e)for(var t=Object.keys(e),n=0;n>>3){case 1:if(r.childOrder&&r.childOrder.length||(r.childOrder=[]),2===(7&o))for(var a=e.uint32()+e.pos;e.pos>>3===1)r.entries&&r.entries.length||(r.entries=[]),r.entries.push(s.ics23.BatchEntry.decode(e,e.uint32()));else e.skipType(7&o)}return r},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==typeof e||null===e)return"object expected";if(null!=e.entries&&e.hasOwnProperty("entries")){if(!Array.isArray(e.entries))return"entries: array expected";for(var t=0;t>>3){case 1:r.exist=s.ics23.ExistenceProof.decode(e,e.uint32());break;case 2:r.nonexist=s.ics23.NonExistenceProof.decode(e,e.uint32());break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==typeof e||null===e)return"object expected";var t={};if(null!=e.exist&&e.hasOwnProperty("exist")&&(t.proof=1,n=s.ics23.ExistenceProof.verify(e.exist)))return"exist."+n;if(null!=e.nonexist&&e.hasOwnProperty("nonexist")){if(1===t.proof)return"proof: multiple values";var n;if(t.proof=1,n=s.ics23.NonExistenceProof.verify(e.nonexist))return"nonexist."+n}return null},e.fromObject=function(e){if(e instanceof s.ics23.BatchEntry)return e;var t=new s.ics23.BatchEntry;if(null!=e.exist){if("object"!==typeof e.exist)throw TypeError(".ics23.BatchEntry.exist: object expected");t.exist=s.ics23.ExistenceProof.fromObject(e.exist)}if(null!=e.nonexist){if("object"!==typeof e.nonexist)throw TypeError(".ics23.BatchEntry.nonexist: object expected");t.nonexist=s.ics23.NonExistenceProof.fromObject(e.nonexist)}return t},e.toObject=function(e,t){t||(t={});var n={};return null!=e.exist&&e.hasOwnProperty("exist")&&(n.exist=s.ics23.ExistenceProof.toObject(e.exist,t),t.oneofs&&(n.proof="exist")),null!=e.nonexist&&e.hasOwnProperty("nonexist")&&(n.nonexist=s.ics23.NonExistenceProof.toObject(e.nonexist,t),t.oneofs&&(n.proof="nonexist")),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,r.util.toJSONOptions)},e}(),e.CompressedBatchProof=function(){function e(e){if(this.entries=[],this.lookupInners=[],e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.entries&&r.entries.length||(r.entries=[]),r.entries.push(s.ics23.CompressedBatchEntry.decode(e,e.uint32()));break;case 2:r.lookupInners&&r.lookupInners.length||(r.lookupInners=[]),r.lookupInners.push(s.ics23.InnerOp.decode(e,e.uint32()));break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==typeof e||null===e)return"object expected";if(null!=e.entries&&e.hasOwnProperty("entries")){if(!Array.isArray(e.entries))return"entries: array expected";for(var t=0;t>>3){case 1:r.exist=s.ics23.CompressedExistenceProof.decode(e,e.uint32());break;case 2:r.nonexist=s.ics23.CompressedNonExistenceProof.decode(e,e.uint32());break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==typeof e||null===e)return"object expected";var t={};if(null!=e.exist&&e.hasOwnProperty("exist")&&(t.proof=1,n=s.ics23.CompressedExistenceProof.verify(e.exist)))return"exist."+n;if(null!=e.nonexist&&e.hasOwnProperty("nonexist")){if(1===t.proof)return"proof: multiple values";var n;if(t.proof=1,n=s.ics23.CompressedNonExistenceProof.verify(e.nonexist))return"nonexist."+n}return null},e.fromObject=function(e){if(e instanceof s.ics23.CompressedBatchEntry)return e;var t=new s.ics23.CompressedBatchEntry;if(null!=e.exist){if("object"!==typeof e.exist)throw TypeError(".ics23.CompressedBatchEntry.exist: object expected");t.exist=s.ics23.CompressedExistenceProof.fromObject(e.exist)}if(null!=e.nonexist){if("object"!==typeof e.nonexist)throw TypeError(".ics23.CompressedBatchEntry.nonexist: object expected");t.nonexist=s.ics23.CompressedNonExistenceProof.fromObject(e.nonexist)}return t},e.toObject=function(e,t){t||(t={});var n={};return null!=e.exist&&e.hasOwnProperty("exist")&&(n.exist=s.ics23.CompressedExistenceProof.toObject(e.exist,t),t.oneofs&&(n.proof="exist")),null!=e.nonexist&&e.hasOwnProperty("nonexist")&&(n.nonexist=s.ics23.CompressedNonExistenceProof.toObject(e.nonexist,t),t.oneofs&&(n.proof="nonexist")),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,r.util.toJSONOptions)},e}(),e.CompressedExistenceProof=function(){function e(e){if(this.path=[],e)for(var t=Object.keys(e),n=0;n>>3){case 1:r.key=e.bytes();break;case 2:r.value=e.bytes();break;case 3:r.leaf=s.ics23.LeafOp.decode(e,e.uint32());break;case 4:if(r.path&&r.path.length||(r.path=[]),2===(7&o))for(var a=e.uint32()+e.pos;e.pos>>3){case 1:r.key=e.bytes();break;case 2:r.left=s.ics23.CompressedExistenceProof.decode(e,e.uint32());break;case 3:r.right=s.ics23.CompressedExistenceProof.decode(e,e.uint32());break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!==typeof e||null===e)return"object expected";if(null!=e.key&&e.hasOwnProperty("key")&&!(e.key&&"number"===typeof e.key.length||a.isString(e.key)))return"key: buffer expected";var t;if(null!=e.left&&e.hasOwnProperty("left")&&(t=s.ics23.CompressedExistenceProof.verify(e.left)))return"left."+t;if(null!=e.right&&e.hasOwnProperty("right")&&(t=s.ics23.CompressedExistenceProof.verify(e.right)))return"right."+t;return null},e.fromObject=function(e){if(e instanceof s.ics23.CompressedNonExistenceProof)return e;var t=new s.ics23.CompressedNonExistenceProof;if(null!=e.key&&("string"===typeof e.key?a.base64.decode(e.key,t.key=a.newBuffer(a.base64.length(e.key)),0):e.key.length&&(t.key=e.key)),null!=e.left){if("object"!==typeof e.left)throw TypeError(".ics23.CompressedNonExistenceProof.left: object expected");t.left=s.ics23.CompressedExistenceProof.fromObject(e.left)}if(null!=e.right){if("object"!==typeof e.right)throw TypeError(".ics23.CompressedNonExistenceProof.right: object expected");t.right=s.ics23.CompressedExistenceProof.fromObject(e.right)}return t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(t.bytes===String?n.key="":(n.key=[],t.bytes!==Array&&(n.key=a.newBuffer(n.key))),n.left=null,n.right=null),null!=e.key&&e.hasOwnProperty("key")&&(n.key=t.bytes===String?a.base64.encode(e.key,0,e.key.length):t.bytes===Array?Array.prototype.slice.call(e.key):e.key),null!=e.left&&e.hasOwnProperty("left")&&(n.left=s.ics23.CompressedExistenceProof.toObject(e.left,t)),null!=e.right&&e.hasOwnProperty("right")&&(n.right=s.ics23.CompressedExistenceProof.toObject(e.right,t)),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,r.util.toJSONOptions)},e}(),e}(),e.exports=s},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.ValueAndUpdates=t.toListPromise=t.fromListPromise=t.firstEvent=t.dropDuplicates=t.DefaultValueProducer=t.concat=void 0;var o=n(988);Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return o.concat}});var a=n(1e3);Object.defineProperty(t,"DefaultValueProducer",{enumerable:!0,get:function(){return a.DefaultValueProducer}});var s=n(1001);Object.defineProperty(t,"dropDuplicates",{enumerable:!0,get:function(){return s.dropDuplicates}});var u=n(1002);Object.defineProperty(t,"firstEvent",{enumerable:!0,get:function(){return u.firstEvent}}),Object.defineProperty(t,"fromListPromise",{enumerable:!0,get:function(){return u.fromListPromise}}),Object.defineProperty(t,"toListPromise",{enumerable:!0,get:function(){return u.toListPromise}}),i(n(1003),t);var c=n(1004);Object.defineProperty(t,"ValueAndUpdates",{enumerable:!0,get:function(){return c.ValueAndUpdates}})},,function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r="NOT_FOUND";var i=function(e,t){return e===t};function o(e,t){var n="object"===typeof t?t:{equalityCheck:t},o=n.equalityCheck,a=void 0===o?i:o,s=n.maxSize,u=void 0===s?1:s,c=n.resultEqualityCheck,l=function(e){return function(t,n){if(null===t||null===n||t.length!==n.length)return!1;for(var r=t.length,i=0;i-1){var o=n[i];return i>0&&(n.splice(i,1),n.unshift(o)),o.value}return r}return{get:i,put:function(t,o){i(t)===r&&(n.unshift({key:t,value:o}),n.length>e&&n.pop())},getEntries:function(){return n},clear:function(){n=[]}}}(u,l);function d(){var t=f.get(arguments);if(t===r){if(t=e.apply(null,arguments),c){var n=f.getEntries(),i=n.find((function(e){return c(e.value,t)}));i&&(t=i.value)}f.put(arguments,t)}return t}return d.clearCache=function(){return f.clear()},d}function a(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every((function(e){return"function"===typeof e}))){var n=t.map((function(e){return"function"===typeof e?"function "+(e.name||"unnamed")+"()":typeof e})).join(", ");throw new Error("createSelector expects all input-selectors to be functions, but received the following types: ["+n+"]")}return t}function s(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r>25;return(33554431&e)<<5^996825010&-(t>>0&1)^642813549&-(t>>1&1)^513874426&-(t>>2&1)^1027748829&-(t>>3&1)^705979059&-(t>>4&1)}function u(e){for(var t=1,n=0;n126)return"Invalid prefix ("+e+")";t=s(t)^r>>5}for(t=s(t),n=0;nt)return"Exceeds length limit";var n=e.toLowerCase(),r=e.toUpperCase();if(e!==n&&e!==r)return"Mixed-case string "+e;var o=(e=n).lastIndexOf("1");if(-1===o)return"No separator character for "+e;if(0===o)return"Missing prefix for "+e;var a=e.slice(0,o),c=e.slice(o+1);if(c.length<6)return"Data too short";var l=u(a);if("string"===typeof l)return l;for(var f=[],d=0;d=c.length||f.push(p)}return 1!==l?"Invalid checksum for "+e:{prefix:a,words:f}}function l(e,t,n,r){for(var i=0,o=0,a=(1<=n;)o-=n,s.push(i>>o&a);if(r)o>0&&s.push(i<=t)return"Excess padding";if(i<n)throw new TypeError("Exceeds length limit");var i=u(e=e.toLowerCase());if("string"===typeof i)throw new Error(i);for(var o=e+"1",a=0;a>5!==0)throw new Error("Non 5-bit word");i=s(i)^c,o+=r.charAt(c)}for(a=0;a<6;++a)i=s(i);for(i^=1,a=0;a<6;++a){o+=r.charAt(i>>5*(5-a)&31)}return o},toWordsUnsafe:function(e){var t=l(e,8,5,!0);if(Array.isArray(t))return t},toWords:function(e){var t=l(e,8,5,!0);if(Array.isArray(t))return t;throw new Error(t)},fromWordsUnsafe:function(e){var t=l(e,5,8,!1);if(Array.isArray(t))return t},fromWords:function(e){var t=l(e,5,8,!1);if(Array.isArray(t))return t;throw new Error(t)}}},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return a}));var r=n(51),i=n(102);function o(e){return e.hasOwnProperty("result")?e.result:e}var a=function(e){function t(){var t=e.call(this)||this;return t.name=t.constructor.name,t.message="No BSC provider was found on window.BinanceChain.",t}return Object(r.c)(t,e),t}(Error),s=function(e){function t(){var t=e.call(this)||this;return t.name=t.constructor.name,t.message="The user rejected the request.",t}return Object(r.c)(t,e),t}(Error),u=function(e){function t(t){var n=e.call(this,t)||this;return n.handleNetworkChanged=n.handleNetworkChanged.bind(n),n.handleChainChanged=n.handleChainChanged.bind(n),n.handleAccountsChanged=n.handleAccountsChanged.bind(n),n.handleClose=n.handleClose.bind(n),n}return Object(r.c)(t,e),t.prototype.handleChainChanged=function(e){this.emitUpdate({chainId:e,provider:window.BinanceChain})},t.prototype.handleAccountsChanged=function(e){0===e.length?this.emitDeactivate():this.emitUpdate({account:e[0]})},t.prototype.handleClose=function(e,t){this.emitDeactivate()},t.prototype.handleNetworkChanged=function(e){this.emitUpdate({chainId:e,provider:window.BinanceChain})},t.prototype.activate=function(){return Object(r.b)(this,void 0,void 0,(function(){var e;return Object(r.d)(this,(function(t){switch(t.label){case 0:if(!window.BinanceChain)throw new a;window.BinanceChain.on&&(window.BinanceChain.on("chainChanged",this.handleChainChanged),window.BinanceChain.on("accountsChanged",this.handleAccountsChanged),window.BinanceChain.on("close",this.handleClose),window.BinanceChain.on("networkChanged",this.handleNetworkChanged)),window.BinanceChain.isMetaMask&&(window.BinanceChain.autoRefreshOnNetworkChange=!1),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,window.BinanceChain.send("eth_requestAccounts").then((function(e){return o(e)[0]}))];case 2:return e=t.sent(),[3,4];case 3:if(4001===t.sent().code)throw new s;return[3,4];case 4:return e?[3,6]:[4,window.BinanceChain.enable().then((function(e){return e&&o(e)[0]}))];case 5:e=t.sent(),t.label=6;case 6:return[2,Object(r.a)({provider:window.BinanceChain},e?{account:e}:{})]}}))}))},t.prototype.getProvider=function(){return Object(r.b)(this,void 0,void 0,(function(){return Object(r.d)(this,(function(e){return[2,window.BinanceChain]}))}))},t.prototype.getChainId=function(){return Object(r.b)(this,void 0,void 0,(function(){var e;return Object(r.d)(this,(function(t){switch(t.label){case 0:if(!window.BinanceChain)throw new a;t.label=1;case 1:return t.trys.push([1,3,,4]),[4,window.BinanceChain.send("eth_chainId").then(o)];case 2:return e=t.sent(),[3,4];case 3:return t.sent(),[3,4];case 4:if(e)return[3,8];t.label=5;case 5:return t.trys.push([5,7,,8]),[4,window.BinanceChain.send("net_version").then(o)];case 6:return e=t.sent(),[3,8];case 7:return t.sent(),[3,8];case 8:if(!e)try{e=o(window.BinanceChain.send({method:"net_version"}))}catch(n){}return e||(e=window.BinanceChain.isDapper?o(window.BinanceChain.cachedResults.net_version):window.BinanceChain.chainId||window.BinanceChain.netVersion||window.BinanceChain.networkVersion||window.BinanceChain._chainId),[2,e]}}))}))},t.prototype.getAccount=function(){return Object(r.b)(this,void 0,void 0,(function(){var e;return Object(r.d)(this,(function(t){switch(t.label){case 0:if(!window.BinanceChain)throw new a;t.label=1;case 1:return t.trys.push([1,3,,4]),[4,window.BinanceChain.send("eth_accounts").then((function(e){return o(e)[0]}))];case 2:return e=t.sent(),[3,4];case 3:return t.sent(),[3,4];case 4:if(e)return[3,8];t.label=5;case 5:return t.trys.push([5,7,,8]),[4,window.BinanceChain.enable().then((function(e){return o(e)[0]}))];case 6:return e=t.sent(),[3,8];case 7:return t.sent(),[3,8];case 8:return e||(e=o(window.BinanceChain.send({method:"eth_accounts"}))[0]),[2,e]}}))}))},t.prototype.deactivate=function(){window.BinanceChain&&window.BinanceChain.removeListener&&(window.BinanceChain.removeListener("chainChanged",this.handleChainChanged),window.BinanceChain.removeListener("accountsChanged",this.handleAccountsChanged),window.BinanceChain.removeListener("close",this.handleClose),window.BinanceChain.removeListener("networkChanged",this.handleNetworkChanged))},t.prototype.isAuthorized=function(){return Object(r.b)(this,void 0,void 0,(function(){return Object(r.d)(this,(function(e){switch(e.label){case 0:if(!window.BinanceChain)return[2,!1];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,window.BinanceChain.send("eth_accounts").then((function(e){return o(e).length>0}))];case 2:return[2,e.sent()];case 3:return e.sent(),[2,!1];case 4:return[2]}}))}))},t}(i.a)},function(e,t,n){"use strict";n.r(t),n.d(t,"generateKey",(function(){return u})),n.d(t,"verifyHmac",(function(){return l})),n.d(t,"encrypt",(function(){return d})),n.d(t,"decrypt",(function(){return p}));var r=n(1),i=n(4),o=n(157),a=n(22),s=n(16);function u(e){return c.apply(this,arguments)}function c(){return(c=Object(i.a)(Object(r.a)().mark((function e(t){var n,i,u;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(t||256)/8,i=o.randomBytes(n),u=Object(s.d)(a.arrayToBuffer(i)),e.abrupt("return",u);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function l(e,t){return f.apply(this,arguments)}function f(){return(f=Object(i.a)(Object(r.a)().mark((function e(t,n){var i,s,u,c,l,f,d;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=a.hexToArray(t.data),s=a.hexToArray(t.iv),u=a.hexToArray(t.hmac),c=a.arrayToHex(u,!1),l=a.concatArrays(i,s),e.next=7,o.hmacSha256Sign(n,l);case 7:if(f=e.sent,d=a.arrayToHex(f,!1),a.removeHexPrefix(c)!==a.removeHexPrefix(d)){e.next=11;break}return e.abrupt("return",!0);case 11:return e.abrupt("return",!1);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function d(e,t,n){return h.apply(this,arguments)}function h(){return(h=Object(i.a)(Object(r.a)().mark((function e(t,n,i){var c,l,f,d,h,p,g,v,m,A,y;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(c=a.bufferToArray(Object(s.b)(n)),e.t0=i,e.t0){e.next=6;break}return e.next=5,u(128);case 5:e.t0=e.sent;case 6:return l=e.t0,f=a.bufferToArray(Object(s.b)(l)),d=a.arrayToHex(f,!1),h=JSON.stringify(t),p=a.utf8ToArray(h),e.next=13,o.aesCbcEncrypt(f,c,p);case 13:return g=e.sent,v=a.arrayToHex(g,!1),m=a.concatArrays(g,f),e.next=18,o.hmacSha256Sign(c,m);case 18:return A=e.sent,y=a.arrayToHex(A,!1),e.abrupt("return",{data:v,hmac:y,iv:d});case 21:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function p(e,t){return g.apply(this,arguments)}function g(){return(g=Object(i.a)(Object(r.a)().mark((function e(t,n){var i,u,c,f,d,h;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=a.bufferToArray(Object(s.b)(n))){e.next=3;break}throw new Error("Missing key: required for decryption");case 3:return e.next=5,l(t,i);case 5:if(e.sent){e.next=8;break}return e.abrupt("return",null);case 8:return u=a.hexToArray(t.data),c=a.hexToArray(t.iv),e.next=12,o.aesCbcDecrypt(c,i,u);case 12:f=e.sent,d=a.arrayToUtf8(f),e.prev=14,h=JSON.parse(d),e.next=21;break;case 18:return e.prev=18,e.t0=e.catch(14),e.abrupt("return",null);case 21:return e.abrupt("return",h);case 22:case"end":return e.stop()}}),e,null,[[14,18]])})))).apply(this,arguments)}},,function(e,t,n){"use strict";var r=n(1),i=n(4),o=n(45),a=n(6),s=n(7),u=n(16),c=n(562),l="Session currently connected",f="Session currently disconnected",d="JSON RPC response format is invalid",h="User close QRCode Modal",p=function(){function e(){Object(a.a)(this,e),this._eventEmitters=[]}return Object(s.a)(e,[{key:"subscribe",value:function(e){this._eventEmitters.push(e)}},{key:"unsubscribe",value:function(e){this._eventEmitters=this._eventEmitters.filter((function(t){return t.event!==e}))}},{key:"trigger",value:function(e){var t,n=[];(t=Object(u.q)(e)?e.method:Object(u.s)(e)||Object(u.r)(e)?"response:".concat(e.id):Object(u.p)(e)?e.event:"")&&(n=this._eventEmitters.filter((function(e){return e.event===t}))),n&&n.length||Object(u.u)(t)||Object(u.p)(t)||(n=this._eventEmitters.filter((function(e){return"call_request"===e.event}))),n.forEach((function(t){if(Object(u.r)(e)){var n=new Error(e.error.message);t.callback(n,null)}else t.callback(null,e)}))}}]),e}(),g=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"walletconnect";Object(a.a)(this,e),this.storageId=t}return Object(s.a)(e,[{key:"getSession",value:function(){var e=null,t=Object(u.k)(this.storageId);return t&&Object(u.w)(t)&&(e=t),e}},{key:"setSession",value:function(e){return Object(u.D)(this.storageId,e),e}},{key:"removeSession",value:function(){Object(u.C)(this.storageId)}}]),e}(),v=g,m="abcdefghijklmnopqrstuvwxyz0123456789".split("").map((function(e){return"https://".concat(e,".bridge.walletconnect.org")}));function A(){return m[Math.floor(Math.random()*m.length)]}var y=function(){function e(t){if(Object(a.a)(this,e),this.protocol="wc",this.version=3,this._bridge="",this._key=null,this._clientId="",this._clientMeta=null,this._peerId="",this._peerMeta=null,this._handshakeId=0,this._handshakeTopic="",this._connected=!1,this._accounts=[],this._chainId="",this._chainType="",this._rpcUrl="",this._selectedWalletId="",this._wallets=[],this._eventManager=new p,this._clientMeta=t.connectorOpts.clientMeta||Object(u.i)()||null,this._cryptoLib=t.cryptoLib,this._sessionStorage=t.sessionStorage||new v(t.connectorOpts.storageId),this._qrcodeModal=t.connectorOpts.qrcodeModal,this._qrcodeModalOptions=t.connectorOpts.qrcodeModalOptions,this._signingMethods=[].concat(Object(o.a)(u.E),Object(o.a)(t.connectorOpts.signingMethods||[])),!t.connectorOpts.bridge&&!t.connectorOpts.uri&&!t.connectorOpts.session)throw new Error("Missing one of the required parameters: bridge / uri / session");var n;t.connectorOpts.bridge&&(this.bridge=function(e){return"walletconnect.org"===function(e){return function(e){var t=e.indexOf("//")>-1?e.split("/")[2]:e.split("/")[0];return(t=t.split(":")[0]).split("?")[0]}(e).split(".").slice(-2).join(".")}(e)}(n=t.connectorOpts.bridge)?A():n),t.connectorOpts.uri&&(this.uri=t.connectorOpts.uri);var r=t.connectorOpts.session||this._getStorageSession();r&&(this.session=r),this.handshakeId&&this._subscribeToSessionResponse(this.handshakeId,"Session request rejected"),this._transport=t.transport||new c.a({protocol:this.protocol,version:this.version,url:this.bridge,subscriptions:[this.clientId]}),this._subscribeToInternalEvents(),this._initTransport(),t.connectorOpts.uri&&this._subscribeToSessionRequest(),t.pushServerOpts&&this._registerPushServer(t.pushServerOpts)}return Object(s.a)(e,[{key:"bridge",get:function(){return this._bridge},set:function(e){e&&(this._bridge=e)}},{key:"key",get:function(){return this._key?Object(u.c)(this._key,!0):""},set:function(e){if(e){var t=Object(u.e)(e);this._key=t}}},{key:"clientId",get:function(){var e=this._clientId;return e||(e=this._clientId=Object(u.F)()),this._clientId},set:function(e){e&&(this._clientId=e)}},{key:"peerId",get:function(){return this._peerId},set:function(e){e&&(this._peerId=e)}},{key:"clientMeta",get:function(){var e=this._clientMeta;return e||(e=this._clientMeta=Object(u.i)()),e},set:function(e){}},{key:"peerMeta",get:function(){return this._peerMeta},set:function(e){this._peerMeta=e}},{key:"selectedWalletId",get:function(){return this._selectedWalletId},set:function(e){this._selectedWalletId=e}},{key:"wallets",get:function(){return this._wallets},set:function(e){this._wallets=e}},{key:"handshakeTopic",get:function(){return this._handshakeTopic},set:function(e){e&&(this._handshakeTopic=e)}},{key:"handshakeId",get:function(){return this._handshakeId},set:function(e){e&&(this._handshakeId=e)}},{key:"uri",get:function(){return this._formatUri()},set:function(e){if(e){var t=this._parseUri(e),n=t.handshakeTopic,r=t.bridge,i=t.key;this.handshakeTopic=n,this.bridge=r,this.key=i}}},{key:"chainId",get:function(){return this._chainId},set:function(e){this._chainId=e}},{key:"chainType",get:function(){return this._chainType},set:function(e){this._chainType=e}},{key:"accounts",get:function(){return this._accounts},set:function(e){this._accounts=e}},{key:"rpcUrl",get:function(){return this._rpcUrl},set:function(e){this._rpcUrl=e}},{key:"connected",get:function(){return this._connected},set:function(e){}},{key:"pending",get:function(){return!!this._handshakeTopic},set:function(e){}},{key:"session",get:function(){return{connected:this.connected,accounts:this.accounts,chainId:this.chainId,chainType:this.chainType,bridge:this.bridge,key:this.key,clientId:this.clientId,clientMeta:this.clientMeta,peerId:this.peerId,peerMeta:this.peerMeta,handshakeId:this.handshakeId,handshakeTopic:this.handshakeTopic,selectedWalletId:this.selectedWalletId,wallets:this.wallets}},set:function(e){e&&(this._connected=e.connected,this.accounts=e.accounts,this.chainId=e.chainId,this.chainType=e.chainType,this.bridge=e.bridge,this.key=e.key,this.clientId=e.clientId,this.clientMeta=e.clientMeta,this.peerId=e.peerId,this.peerMeta=e.peerMeta,this.handshakeId=e.handshakeId,this.handshakeTopic=e.handshakeTopic,this.selectedWalletId=e.selectedWalletId,this.wallets=e.wallets)}},{key:"on",value:function(e,t){var n={event:e,callback:t};this._eventManager.subscribe(n)}},{key:"off",value:function(e){this._eventManager.unsubscribe(e)}},{key:"createInstantRequest",value:function(){var e=Object(i.a)(Object(r.a)().mark((function e(t){var n,i,o,a=this;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._generateKey();case 2:return this._key=e.sent,n=this._formatRequest({method:"dc_instantRequest",params:[{peerId:this.clientId,peerMeta:this.clientMeta,request:this._formatRequest(t)}]}),this.handshakeId=n.id,this.handshakeTopic=Object(u.F)(),this._eventManager.trigger({event:"display_uri",params:[this.uri]}),this.on("modal_closed",(function(){throw new Error(h)})),i=function(){a.killSession()},e.prev=9,e.next=12,this._sendCallRequest(n);case 12:return(o=e.sent)&&i(),e.abrupt("return",o);case 17:throw e.prev=17,e.t0=e.catch(9),i(),e.t0;case 21:case"end":return e.stop()}}),e,this,[[9,17]])})));return function(t){return e.apply(this,arguments)}}()},{key:"connect",value:function(){var e=Object(i.a)(Object(r.a)().mark((function e(t){var n=this;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._qrcodeModal){e.next=2;break}throw new Error("QRCode Modal not provided");case 2:if(!this.connected){e.next=4;break}return e.abrupt("return",{chainId:this.chainId,chainType:this.chainType,accounts:this.accounts,selectedWalletId:this.selectedWalletId,wallets:this.wallets});case 4:return e.next=6,this.createSession(t);case 6:return e.abrupt("return",new Promise(function(){var e=Object(i.a)(Object(r.a)().mark((function e(t,i){return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n.on("modal_closed",(function(){return i(new Error(h))})),n.on("connect",(function(e,n){if(e)return i(e);t(n.params[0])}));case 2:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()));case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"createSession",value:function(){var e=Object(i.a)(Object(r.a)().mark((function e(t){var n,i,o,a;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._connected){e.next=2;break}throw new Error(l);case 2:if(!this.pending){e.next=4;break}return e.abrupt("return");case 4:return e.next=6,this._generateKey();case 6:this._key=e.sent,a=this._formatRequest({method:"dc_sessionRequest",params:[{peerId:this.clientId,peerMeta:this.clientMeta,chainId:null!==(n=null===t||void 0===t?void 0:t.chainId)&&void 0!==n?n:null,chainType:null!==(i=null===t||void 0===t?void 0:t.chainType)&&void 0!==i?i:null,accountTypes:null!==(o=null===t||void 0===t?void 0:t.accountTypes)&&void 0!==o?o:["eth","cro","tcro"]}]}),this.handshakeId=a.id,this.handshakeTopic=Object(u.F)(),this._sendSessionRequest(a,"Session update rejected",{topic:this.handshakeTopic}),this._eventManager.trigger({event:"display_uri",params:[this.uri]});case 12:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"approveSession",value:function(e){if(this._connected)throw new Error(l);this.chainId=e.chainId,this.accounts=e.accounts,this.chainType=e.chainType||"eth",this.rpcUrl=e.rpcUrl||"",this.selectedWalletId=e.selectedWalletId,this.wallets=e.wallets;var t={approved:!0,chainId:this.chainId,chainType:this.chainType,accounts:this.accounts,rpcUrl:this.rpcUrl,peerId:this.clientId,peerMeta:this.clientMeta,selectedWalletId:this.selectedWalletId,wallets:this.wallets},n={id:this.handshakeId,jsonrpc:"2.1",result:t};this._sendResponse(n),this._connected=!0,this._setStorageSession(),this._eventManager.trigger({event:"connect",params:[{peerId:this.peerId,peerMeta:this.peerMeta,chainId:this.chainId,chainType:this.chainType,accounts:this.accounts,selectedWalletId:this.selectedWalletId,wallets:this.wallets}]})}},{key:"rejectSession",value:function(e){if(this._connected)throw new Error(l);var t=e&&e.message?e.message:"Session Rejected",n=this._formatResponse({id:this.handshakeId,error:{message:t}});this._sendResponse(n),this._connected=!1,this._eventManager.trigger({event:"disconnect",params:[{message:t}]}),this._removeStorageSession()}},{key:"updateSession",value:function(e){if(!this._connected)throw new Error(f);this.chainId=e.chainId,this.accounts=e.accounts,this.chainType=e.chainType||"",this.rpcUrl=e.rpcUrl||"",this.selectedWalletId=e.selectedWalletId,this.wallets=e.wallets;var t={approved:!0,chainId:this.chainId,chainType:this.chainType,accounts:this.accounts,rpcUrl:this.rpcUrl,selectedWalletId:this.selectedWalletId,wallets:this.wallets},n=this._formatRequest({method:"dc_sessionUpdate",params:[t]});this._sendSessionRequest(n,"Session update rejected"),this._eventManager.trigger({event:"session_update",params:[{chainId:this.chainId,chainType:this.chainType,accounts:this.accounts,selectedWalletId:this.selectedWalletId,wallets:this.wallets}]}),this._manageStorageSession()}},{key:"killSession",value:function(){var e=Object(i.a)(Object(r.a)().mark((function e(t){var n,i,o;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t?t.message:"Session Disconnected",i={approved:!1,chainId:null,chainType:null,accounts:null,selectedWalletId:null,wallets:[]},o=this._formatRequest({method:"dc_sessionUpdate",params:[i]}),e.next=5,this._sendRequest(o);case 5:this._handleSessionDisconnect(n);case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"sendTransaction",value:function(){var e=Object(i.a)(Object(r.a)().mark((function e(t){var n,i,o;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._connected){e.next=2;break}throw new Error(f);case 2:return n=Object(u.z)(t),i=this._formatRequest({method:"eth_sendTransaction",params:[n]}),e.next=6,this._sendCallRequest(i);case 6:return o=e.sent,e.abrupt("return",o);case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"sendJSONRequest",value:function(){var e=Object(i.a)(Object(r.a)().mark((function e(t,n){var i,o,a,s,c,l,f;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a={id:Object(u.B)(),jsonrpc:"2.1",method:t.method,params:null!==(i=t.params)&&void 0!==i?i:[],session:t.session},e.next=3,this._encrypt(a);case 3:return s=e.sent,c=this.peerId,l=JSON.stringify(s),f=null!==(o=!(null===n||void 0===n?void 0:n.forcePushNotification))&&void 0!==o?o:Object(u.v)(a),this._transport.send(l,c,f),this._eventManager.trigger({event:"call_request_sent",params:[{request:a,options:n}]}),e.abrupt("return",this._subscribeToCallResponse(a.id));case 10:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"signTransaction",value:function(){var e=Object(i.a)(Object(r.a)().mark((function e(t){var n,i,o;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._connected){e.next=2;break}throw new Error(f);case 2:return n=Object(u.z)(t),i=this._formatRequest({method:"eth_signTransaction",params:[n]}),e.next=6,this._sendCallRequest(i);case 6:return o=e.sent,e.abrupt("return",o);case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"signMessage",value:function(){var e=Object(i.a)(Object(r.a)().mark((function e(t){var n,i;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._connected){e.next=2;break}throw new Error(f);case 2:return n=this._formatRequest({method:"eth_sign",params:t}),e.next=5,this._sendCallRequest(n);case 5:return i=e.sent,e.abrupt("return",i);case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"signPersonalMessage",value:function(){var e=Object(i.a)(Object(r.a)().mark((function e(t){var n,i;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._connected){e.next=2;break}throw new Error(f);case 2:return t=Object(u.y)(t),n=this._formatRequest({method:"personal_sign",params:t}),e.next=6,this._sendCallRequest(n);case 6:return i=e.sent,e.abrupt("return",i);case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"signTypedData",value:function(){var e=Object(i.a)(Object(r.a)().mark((function e(t){var n,i;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._connected){e.next=2;break}throw new Error(f);case 2:return n=this._formatRequest({method:"eth_signTypedData",params:t}),e.next=5,this._sendCallRequest(n);case 5:return i=e.sent,e.abrupt("return",i);case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"updateChain",value:function(){var e=Object(i.a)(Object(r.a)().mark((function e(t){var n,i;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._connected){e.next=2;break}throw new Error("Session currently disconnected");case 2:return n=this._formatRequest({method:"wallet_updateChain",params:[t]}),e.next=5,this._sendCallRequest(n);case 5:return i=e.sent,e.abrupt("return",i);case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"unsafeSend",value:function(e,t){var n=this;return this._sendRequest(e,t),this._eventManager.trigger({event:"call_request_sent",params:[{request:e,options:t}]}),new Promise((function(t,r){n._subscribeToResponse(e.id,(function(e,n){if(e)r(e);else{if(!n)throw new Error("Missing JSON RPC response");t(n)}}))}))}},{key:"sendCustomRequest",value:function(){var e=Object(i.a)(Object(r.a)().mark((function e(t,n){var i,o;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._connected){e.next=2;break}throw new Error(f);case 2:e.t0=t.method,e.next="eth_accounts"===e.t0?5:"eth_chainId"===e.t0?6:"eth_sendTransaction"===e.t0||"eth_signTransaction"===e.t0?7:"personal_sign"===e.t0?9:11;break;case 5:return e.abrupt("return",this.accounts);case 6:return e.abrupt("return",Object(u.f)(this.chainId));case 7:return t.params&&(t.params[0]=Object(u.z)(t.params[0])),e.abrupt("break",12);case 9:return t.params&&(t.params=Object(u.y)(t.params)),e.abrupt("break",12);case 11:return e.abrupt("break",12);case 12:return i=this._formatRequest(t),e.next=15,this._sendCallRequest(i,n);case 15:return o=e.sent,e.abrupt("return",o);case 17:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"approveRequest",value:function(e){if(!Object(u.s)(e))throw new Error('JSON-RPC success response must include "result" field');var t=this._formatResponse(e);this._sendResponse(t)}},{key:"rejectRequest",value:function(e){if(!Object(u.r)(e))throw new Error('JSON-RPC error response must include "error" field');var t=this._formatResponse(e);this._sendResponse(t)}},{key:"transportClose",value:function(){this._transport.close()}},{key:"_sendRequest",value:function(){var e=Object(i.a)(Object(r.a)().mark((function e(t,n){var i,o,a,s,c;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=this._formatRequest(t),e.next=3,this._encrypt(i);case 3:o=e.sent,a="undefined"!==typeof(null===n||void 0===n?void 0:n.topic)?n.topic:this.peerId,s=JSON.stringify(o),c="undefined"!==typeof(null===n||void 0===n?void 0:n.forcePushNotification)?!n.forcePushNotification:Object(u.v)(i),this._transport.send(s,a,c);case 8:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"_sendResponse",value:function(){var e=Object(i.a)(Object(r.a)().mark((function e(t){var n,i,o;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._encrypt(t);case 2:n=e.sent,i=this.peerId,o=JSON.stringify(n),!0,this._transport.send(o,i,true);case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_sendSessionRequest",value:function(){var e=Object(i.a)(Object(r.a)().mark((function e(t,n,i){return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this._sendRequest(t,i),this._subscribeToSessionResponse(t.id,n);case 2:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"_sendCallRequest",value:function(e,t){return this._sendRequest(e,t),this._eventManager.trigger({event:"call_request_sent",params:[{request:e,options:t}]}),this._subscribeToCallResponse(e.id)}},{key:"_formatRequest",value:function(e){if("undefined"===typeof e.method)throw new Error('JSON RPC request must have valid "method" value');return{id:"undefined"===typeof e.id?Object(u.B)():e.id,jsonrpc:"2.1",method:e.method,params:"undefined"===typeof e.params?[]:e.params,session:{chainId:"".concat(this.session.chainId),chainType:"".concat(this.session.chainType),account:this.session.accounts[0]}}}},{key:"_formatResponse",value:function(e){if("undefined"===typeof e.id)throw new Error('JSON RPC request must have valid "id" value');var t={id:e.id,jsonrpc:"2.1"};if(Object(u.r)(e)){var n=Object(u.h)(e.error);return Object.assign(Object.assign(Object.assign({},t),e),{error:n})}if(Object(u.s)(e))return Object.assign(Object.assign({},t),e);throw new Error(d)}},{key:"_handleSessionDisconnect",value:function(e){var t=e||"Session Disconnected";this._connected||(this._qrcodeModal&&this._qrcodeModal.close(),Object(u.C)(u.x)),this._connected&&(this._connected=!1),this._handshakeId&&(this._handshakeId=0),this._handshakeTopic&&(this._handshakeTopic=""),this._eventManager.trigger({event:"disconnect",params:[{message:t}]}),this._removeStorageSession(),this.transportClose()}},{key:"_handleSessionResponse",value:function(e,t){t&&t.approved?(this._connected?(t.chainId&&(this.chainId=t.chainId),t.chainType&&(this.chainType=t.chainType),t.accounts&&(this.accounts=t.accounts),t.wallets&&(this.wallets=t.wallets),t.selectedWalletId&&(this.selectedWalletId=t.selectedWalletId),t.peerMeta&&!this.peerMeta&&(this.peerMeta=t.peerMeta),this._eventManager.trigger({event:"session_update",params:[{chainId:this.chainId,chainType:this.chainType,accounts:this.accounts,selectedWalletId:this.selectedWalletId,wallets:this.wallets}]})):(this._connected=!0,t.chainId&&(this.chainId=t.chainId),t.chainType&&(this.chainType=t.chainType),t.accounts&&(this.accounts=t.accounts),t.wallets&&(this.wallets=t.wallets),t.selectedWalletId&&(this.selectedWalletId=t.selectedWalletId),t.peerId&&!this.peerId&&(this.peerId=t.peerId),t.peerMeta&&!this.peerMeta&&(this.peerMeta=t.peerMeta),t.wallets&&!this.wallets&&(this.wallets=t.wallets),this._eventManager.trigger({event:"connect",params:[{peerId:this.peerId,peerMeta:this.peerMeta,chainId:this.chainId,chainType:this.chainType,accounts:this.accounts,selectedWalletId:this.selectedWalletId,wallets:this.wallets}]})),this._manageStorageSession()):this._handleSessionDisconnect(e)}},{key:"_handleIncomingMessages",value:function(){var e=Object(i.a)(Object(r.a)().mark((function e(t){var n,i;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if([this.clientId,this.handshakeTopic].includes(t.topic)){e.next=3;break}return e.abrupt("return");case 3:e.prev=3,n=JSON.parse(t.payload),e.next=10;break;case 7:return e.prev=7,e.t0=e.catch(3),e.abrupt("return");case 10:return e.next=12,this._decrypt(n);case 12:(i=e.sent)&&this._eventManager.trigger(i);case 14:case"end":return e.stop()}}),e,this,[[3,7]])})));return function(t){return e.apply(this,arguments)}}()},{key:"_subscribeToSessionRequest",value:function(){this._transport.subscribe(this.handshakeTopic)}},{key:"_subscribeToResponse",value:function(e,t){this.on("response:".concat(e),t)}},{key:"_subscribeToSessionResponse",value:function(e,t){var n=this;this._subscribeToResponse(e,(function(e,r){e?n._handleSessionResponse(e.message):r.result?n._handleSessionResponse(t,r.result):r.error&&r.error.message?n._handleSessionResponse(r.error.message):n._handleSessionResponse(t)}))}},{key:"_subscribeToCallResponse",value:function(e){var t=this;return new Promise((function(n,r){t._subscribeToResponse(e,(function(e,t){e?r(e):t.result?n(t.result):t.error&&t.error.message?r(new Error(t.error.message)):r(new Error(d))}))}))}},{key:"_subscribeToInternalEvents",value:function(){var e=this;this.on("display_uri",(function(){e._qrcodeModal&&e._qrcodeModal.open(e.uri,(function(){e._eventManager.trigger({event:"modal_closed",params:[]})}),e._qrcodeModalOptions)})),this.on("connect",(function(){e._qrcodeModal&&e._qrcodeModal.close()})),this.on("call_request_sent",(function(t,n){var r=n.params[0].request;if(Object(u.t)()&&e._signingMethods.includes(r.method)){var i=Object(u.k)(u.x);i&&(window.location.href=i.href)}})),this.on("dc_sessionRequest",(function(t,n){t&&e._eventManager.trigger({event:"error",params:[{code:"SESSION_REQUEST_ERROR",message:t.toString()}]}),e.handshakeId=n.id,e.peerId=n.params[0].peerId,e.peerMeta=n.params[0].peerMeta;var r=Object.assign(Object.assign({},n),{method:"session_request"});e._eventManager.trigger(r)})),this.on("dc_sessionUpdate",(function(t,n){t&&e._handleSessionResponse(t.message),e._handleSessionResponse("Session disconnected",n.params[0])}))}},{key:"_initTransport",value:function(){var e=this;this._transport.on("message",(function(t){return e._handleIncomingMessages(t)})),this._transport.on("open",(function(){return e._eventManager.trigger({event:"transport_open",params:[]})})),this._transport.on("close",(function(){return e._eventManager.trigger({event:"transport_close",params:[]})})),this._transport.on("error",(function(){return e._eventManager.trigger({event:"transport_error",params:["Websocket connection failed"]})})),this._transport.open()}},{key:"_formatUri",value:function(){var e=this.protocol,t=this.handshakeTopic,n=this.version,r=encodeURIComponent(this.bridge),i=this.key;return"".concat(e,":").concat(t,"@").concat(n,"?bridge=").concat(r,"&key=").concat(i)}},{key:"_parseUri",value:function(e){var t=Object(u.A)(e);if(t.protocol===this.protocol){if(!t.handshakeTopic)throw Error("Invalid or missing handshakeTopic parameter value");var n=t.handshakeTopic;if(!t.bridge)throw Error("Invalid or missing bridge url parameter value");var r=decodeURIComponent(t.bridge);if(!t.key)throw Error("Invalid or missing key parameter value");return{handshakeTopic:n,bridge:r,key:t.key}}throw new Error("URI format is invalid")}},{key:"_generateKey",value:function(){var e=Object(i.a)(Object(r.a)().mark((function e(){var t;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._cryptoLib){e.next=5;break}return e.next=3,this._cryptoLib.generateKey();case 3:return t=e.sent,e.abrupt("return",t);case 5:return e.abrupt("return",null);case 6:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_encrypt",value:function(){var e=Object(i.a)(Object(r.a)().mark((function e(t){var n,i;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this._key,!this._cryptoLib||!n){e.next=6;break}return e.next=4,this._cryptoLib.encrypt(t,n);case 4:return i=e.sent,e.abrupt("return",i);case 6:return e.abrupt("return",null);case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_decrypt",value:function(){var e=Object(i.a)(Object(r.a)().mark((function e(t){var n,i;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this._key,!this._cryptoLib||!n){e.next=6;break}return e.next=4,this._cryptoLib.decrypt(t,n);case 4:return i=e.sent,e.abrupt("return",i);case 6:return e.abrupt("return",null);case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_getStorageSession",value:function(){var e=null;return this._sessionStorage&&(e=this._sessionStorage.getSession()),e}},{key:"_setStorageSession",value:function(){this._sessionStorage&&this._sessionStorage.setSession(this.session)}},{key:"_removeStorageSession",value:function(){this._sessionStorage&&this._sessionStorage.removeSession()}},{key:"_manageStorageSession",value:function(){this._connected?this._setStorageSession():this._removeStorageSession()}},{key:"_registerPushServer",value:function(e){if(!e.url||"string"!==typeof e.url)throw Error("Invalid or missing pushServerOpts.url parameter value");if(!e.type||"string"!==typeof e.type)throw Error("Invalid or missing pushServerOpts.type parameter value");if(!e.token||"string"!==typeof e.token)throw Error("Invalid or missing pushServerOpts.token parameter value");var t={bridge:this.bridge,topic:this.clientId,type:e.type,token:e.token,peerName:"",language:e.language||""};this.on("connect",function(){var n=Object(i.a)(Object(r.a)().mark((function n(i,o){var a,s;return Object(r.a)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!i){n.next=2;break}throw i;case 2:return e.peerMeta&&(a=o.params[0].peerMeta.name,t.peerName=a),n.prev=3,n.next=6,fetch("".concat(e.url,"/new"),{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(t)});case 6:return s=n.sent,n.next=9,s.json();case 9:if(n.sent.success){n.next=12;break}throw Error("Failed to register in Push Server");case 12:n.next=17;break;case 14:throw n.prev=14,n.t0=n.catch(3),Error("Failed to register in Push Server");case 17:case"end":return n.stop()}}),n,null,[[3,14]])})));return function(e,t){return n.apply(this,arguments)}}())}}]),e}();t.a=y},function(e,t,n){"use strict";(function(t){!function(n){var r=2147483647;function i(e){var t=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),n=1779033703,r=3144134277,i=1013904242,o=2773480762,a=1359893119,s=2600822924,u=528734635,c=1541459225,l=new Uint32Array(64);function f(e){for(var f=0,d=e.length;d>=64;){var h=n,p=r,g=i,v=o,m=a,A=s,y=u,b=c,w=void 0,_=void 0,E=void 0,k=void 0,I=void 0;for(_=0;_<16;_++)E=f+4*_,l[_]=(255&e[E])<<24|(255&e[E+1])<<16|(255&e[E+2])<<8|255&e[E+3];for(_=16;_<64;_++)k=((w=l[_-2])>>>17|w<<15)^(w>>>19|w<<13)^w>>>10,I=((w=l[_-15])>>>7|w<<25)^(w>>>18|w<<14)^w>>>3,l[_]=(k+l[_-7]|0)+(I+l[_-16]|0)|0;for(_=0;_<64;_++)k=(((m>>>6|m<<26)^(m>>>11|m<<21)^(m>>>25|m<<7))+(m&A^~m&y)|0)+(b+(t[_]+l[_]|0)|0)|0,I=((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+(h&p^h&g^p&g)|0,b=y,y=A,A=m,m=v+k|0,v=g,g=p,p=h,h=k+I|0;n=n+h|0,r=r+p|0,i=i+g|0,o=o+v|0,a=a+m|0,s=s+A|0,u=u+y|0,c=c+b|0,f+=64,d-=64}}f(e);var d,h=e.length%64,p=e.length/536870912|0,g=e.length<<3,v=h<56?56:120,m=e.slice(e.length-h,e.length);for(m.push(128),d=h+1;d>>24&255),m.push(p>>>16&255),m.push(p>>>8&255),m.push(p>>>0&255),m.push(g>>>24&255),m.push(g>>>16&255),m.push(g>>>8&255),m.push(g>>>0&255),f(m),[n>>>24&255,n>>>16&255,n>>>8&255,n>>>0&255,r>>>24&255,r>>>16&255,r>>>8&255,r>>>0&255,i>>>24&255,i>>>16&255,i>>>8&255,i>>>0&255,o>>>24&255,o>>>16&255,o>>>8&255,o>>>0&255,a>>>24&255,a>>>16&255,a>>>8&255,a>>>0&255,s>>>24&255,s>>>16&255,s>>>8&255,s>>>0&255,u>>>24&255,u>>>16&255,u>>>8&255,u>>>0&255,c>>>24&255,c>>>16&255,c>>>8&255,c>>>0&255]}function o(e,t,n){e=e.length<=64?e:i(e);var r,o=64+t.length+4,a=new Array(o),s=new Array(64),u=[];for(r=0;r<64;r++)a[r]=54;for(r=0;r=o-4;e--){if(a[e]++,a[e]<=255)return;a[e]=0}}for(;n>=32;)c(),u=u.concat(i(s.concat(i(a)))),n-=32;return n>0&&(c(),u=u.concat(i(s.concat(i(a))).slice(0,n))),u}function a(e,t,n,r,i){var o;for(l(e,16*(2*n-1),i,0,16),o=0;o<2*n;o++)c(e,16*o,i,16),u(i,r),l(i,0,e,t+16*o,16);for(o=0;o>>32-t}function u(e,t){l(e,0,t,0,16);for(var n=8;n>0;n-=2)t[4]^=s(t[0]+t[12],7),t[8]^=s(t[4]+t[0],9),t[12]^=s(t[8]+t[4],13),t[0]^=s(t[12]+t[8],18),t[9]^=s(t[5]+t[1],7),t[13]^=s(t[9]+t[5],9),t[1]^=s(t[13]+t[9],13),t[5]^=s(t[1]+t[13],18),t[14]^=s(t[10]+t[6],7),t[2]^=s(t[14]+t[10],9),t[6]^=s(t[2]+t[14],13),t[10]^=s(t[6]+t[2],18),t[3]^=s(t[15]+t[11],7),t[7]^=s(t[3]+t[15],9),t[11]^=s(t[7]+t[3],13),t[15]^=s(t[11]+t[7],18),t[1]^=s(t[0]+t[3],7),t[2]^=s(t[1]+t[0],9),t[3]^=s(t[2]+t[1],13),t[0]^=s(t[3]+t[2],18),t[6]^=s(t[5]+t[4],7),t[7]^=s(t[6]+t[5],9),t[4]^=s(t[7]+t[6],13),t[5]^=s(t[4]+t[7],18),t[11]^=s(t[10]+t[9],7),t[8]^=s(t[11]+t[10],9),t[9]^=s(t[8]+t[11],13),t[10]^=s(t[9]+t[8],18),t[12]^=s(t[15]+t[14],7),t[13]^=s(t[12]+t[15],9),t[14]^=s(t[13]+t[12],13),t[15]^=s(t[14]+t[13],18);for(var r=0;r<16;++r)e[r]+=t[r]}function c(e,t,n,r){for(var i=0;i=256)return!1}return!0}function d(e,t){if("number"!==typeof e||e%1)throw new Error("invalid "+t);return e}function h(e,n,i,s,u,h,p){if(i=d(i,"N"),s=d(s,"r"),u=d(u,"p"),h=d(h,"dkLen"),0===i||0!==(i&i-1))throw new Error("N must be power of 2");if(i>r/128/s)throw new Error("N too large");if(s>r/128/u)throw new Error("r too large");if(!f(e))throw new Error("password must be an array or buffer");if(e=Array.prototype.slice.call(e),!f(n))throw new Error("salt must be an array or buffer");n=Array.prototype.slice.call(n);for(var g=o(e,n,128*u*s),v=new Uint32Array(32*u*s),m=0;mP&&(n=P);for(var r=0;rP&&(n=P);for(var d=0;d>0&255),g.push(v[N]>>8&255),g.push(v[N]>>16&255),g.push(v[N]>>24&255);var T=o(e,g,h);return p&&p(null,1,T),T}p&&R(t)};if(!p)for(;;){var T=N();if(void 0!=T)return T}N()}var p={scrypt:function(e,t,n,r,i,o,a){return new Promise((function(s,u){var c=0;a&&a(0),h(e,t,n,r,i,o,(function(e,t,n){if(e)u(e);else if(n)a&&1!==c&&a(1),s(new Uint8Array(n));else if(a&&t!==c)return c=t,a(t)}))}))},syncScrypt:function(e,t,n,r,i,o){return new Uint8Array(h(e,t,n,r,i,o))}};e.exports=p}()}).call(this,n(196).setImmediate)},function(e,t,n){var r=n(169),i=n(245),o=n(812),a=n(813);function s(t){var n="function"===typeof Map?new Map:void 0;return e.exports=s=function(e){if(null===e||!o(e))return e;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return a(e,arguments,r(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),i(t,e)},e.exports.__esModule=!0,e.exports.default=e.exports,s(t)}e.exports=s,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(162).Symbol;e.exports=r},function(e,t,n){(t=e.exports=function(e){e=e.toLowerCase();var n=t[e];if(!n)throw new Error(e+" is not supported (we accept pull requests)");return new n}).sha=n(764),t.sha1=n(765),t.sha224=n(766),t.sha256=n(382),t.sha384=n(767),t.sha512=n(383)},function(e,t,n){"use strict";var r=n(9).default,i=n(10).default,o=n(30).default,a=n(31).default;function s(e,t,n){try{Reflect.apply(e,t,n)}catch(r){setTimeout((function(){throw r}))}}function u(e){for(var t=e.length,n=new Array(t),r=0;r1?r-1:0),o=1;o0&&(a=i[0]),a instanceof Error)throw a;var c=new Error("Unhandled error.".concat(a?" (".concat(a.message,")"):""));throw c.context=a,c}var l=n[e];if(void 0===l)return!1;if("function"===typeof l)s(l,this,i);else for(var f=l.length,d=u(l),h=0;h=t||n<0||v&&e-p>=l}function w(){var e=i();if(b(e))return _(e);d=setTimeout(w,function(e){var n=t-(e-h);return v?s(n,l-(e-p)):n}(e))}function _(e){return d=void 0,m&&u?A(e):(u=c=void 0,f)}function E(){var e=i(),n=b(e);if(u=arguments,c=this,h=e,n){if(void 0===d)return y(h);if(v)return clearTimeout(d),d=setTimeout(w,t),A(h)}return void 0===d&&(d=setTimeout(w,t)),f}return t=o(t)||0,r(n)&&(g=!!n.leading,l=(v="maxWait"in n)?a(o(n.maxWait)||0,t):l,m="trailing"in n?!!n.trailing:m),E.cancel=function(){void 0!==d&&clearTimeout(d),p=0,u=h=c=d=void 0},E.flush=function(){return void 0===d?f:_(i())},E}},function(e,t,n){var r=n(339);e.exports=function(e,t){if(e){if("string"===typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2},t.isValid=function(e){return e&&"undefined"!==typeof e.bit&&e.bit>=0&&e.bit<4},t.from=function(e,n){if(t.isValid(e))return e;try{return function(e){if("string"!==typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+e)}}(e)}catch(r){return n}}},function(e,t,n){var r=n(26),i=r.Buffer;function o(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(o(r,t),t.Buffer=a),o(i,a),a.from=function(e,t,n){if("number"===typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},a.alloc=function(e,t,n){if("number"!==typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"===typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,n){"use strict";(function(t,r,i){var o=n(201);function a(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;e.entry=null;for(;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=A;var s,u=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?r:o.nextTick;A.WritableState=m;var c=Object.create(n(167));c.inherits=n(24);var l={deprecate:n(202)},f=n(358),d=n(241).Buffer,h=i.Uint8Array||function(){};var p,g=n(359);function v(){}function m(e,t){s=s||n(125),e=e||{};var r=t instanceof s;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,c=e.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(c||0===c)?c:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var f=!1===e.decodeStrings;this.decodeStrings=!f,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,i){--t.pendingcb,n?(o.nextTick(i,r),o.nextTick(k,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(i(r),e._writableState.errorEmitted=!0,e.emit("error",r),k(e,t))}(e,n,r,t,i);else{var a=_(n);a||n.corked||n.bufferProcessing||!n.bufferedRequest||w(e,n),r?u(b,e,n,a,i):b(e,n,a,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}function A(e){if(s=s||n(125),!p.call(A,this)&&!(this instanceof s))return new A(e);this._writableState=new m(e,this),this.writable=!0,e&&("function"===typeof e.write&&(this._write=e.write),"function"===typeof e.writev&&(this._writev=e.writev),"function"===typeof e.destroy&&(this._destroy=e.destroy),"function"===typeof e.final&&(this._final=e.final)),f.call(this)}function y(e,t,n,r,i,o,a){t.writelen=r,t.writecb=a,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function b(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),k(e,t)}function w(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),o=t.corkedRequestsFree;o.entry=n;for(var s=0,u=!0;n;)i[s]=n,n.isBuf||(u=!1),n=n.next,s+=1;i.allBuffers=u,y(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new a(t),t.bufferedRequestCount=0}else{for(;n;){var c=n.chunk,l=n.encoding,f=n.callback;if(y(e,t,!1,t.objectMode?1:c.length,c,l,f),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function _(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function E(e,t){e._final((function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),k(e,t)}))}function k(e,t){var n=_(t);return n&&(!function(e,t){t.prefinished||t.finalCalled||("function"===typeof e._final?(t.pendingcb++,t.finalCalled=!0,o.nextTick(E,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}c.inherits(A,f),m.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(m.prototype,"buffer",{get:l.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"===typeof Symbol&&Symbol.hasInstance&&"function"===typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(A,Symbol.hasInstance,{value:function(e){return!!p.call(this,e)||this===A&&(e&&e._writableState instanceof m)}})):p=function(e){return e instanceof this},A.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},A.prototype.write=function(e,t,n){var r,i=this._writableState,a=!1,s=!i.objectMode&&(r=e,d.isBuffer(r)||r instanceof h);return s&&!d.isBuffer(e)&&(e=function(e){return d.from(e)}(e)),"function"===typeof t&&(n=t,t=null),s?t="buffer":t||(t=i.defaultEncoding),"function"!==typeof n&&(n=v),i.ended?function(e,t){var n=new Error("write after end");e.emit("error",n),o.nextTick(t,n)}(this,n):(s||function(e,t,n,r){var i=!0,a=!1;return null===n?a=new TypeError("May not write null values to stream"):"string"===typeof n||void 0===n||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),o.nextTick(r,a),i=!1),i}(this,i,e,n))&&(i.pendingcb++,a=function(e,t,n,r,i,o){if(!n){var a=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!==typeof t||(t=d.from(t,n));return t}(t,r,i);r!==a&&(n=!0,i="buffer",r=a)}var s=t.objectMode?1:r.length;t.length+=s;var u=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),A.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},A.prototype._writev=null,A.prototype.end=function(e,t,n){var r=this._writableState;"function"===typeof e?(n=e,e=null,t=null):"function"===typeof t&&(n=t,t=null),null!==e&&void 0!==e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(e,t,n){t.ending=!0,k(e,t),n&&(t.finished?o.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,r,n)},Object.defineProperty(A.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),A.prototype.destroy=g.destroy,A.prototype._undestroy=g.undestroy,A.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,n(35),n(196).setImmediate,n(20))},function(e,t,n){"use strict";var r=n(707),i=n(708);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=y,t.resolve=function(e,t){return y(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?y(e,!1,!0).resolveObject(t):t},t.format=function(e){i.isString(e)&&(e=y(e));return e instanceof o?e.format():o.prototype.format.call(e)},t.Url=o;var a=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),l=["'"].concat(c),f=["%","/","?",";","#"].concat(l),d=["/","?","#"],h=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,g={javascript:!0,"javascript:":!0},v={javascript:!0,"javascript:":!0},m={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},A=n(709);function y(e,t,n){if(e&&i.isObject(e)&&e instanceof o)return e;var r=new o;return r.parse(e,t,n),r}o.prototype.parse=function(e,t,n){if(!i.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var o=e.indexOf("?"),s=-1!==o&&o127?R+="x":R+=P[N];if(!R.match(h)){var Q=O.slice(0,S),D=O.slice(S+1),j=P.match(p);j&&(Q.push(j[1]),D.unshift(j[2])),D.length&&(y="/"+D.join(".")+y),this.hostname=Q.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),B||(this.hostname=r.toASCII(this.hostname));var U=this.port?":"+this.port:"",L=this.hostname||"";this.host=L+U,this.href+=this.host,B&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==y[0]&&(y="/"+y))}if(!g[_])for(S=0,M=l.length;S0)&&n.host.split("@"))&&(n.auth=B.shift(),n.host=n.hostname=B.shift());return n.search=e.search,n.query=e.query,i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!E.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var I=E.slice(-1)[0],C=(n.host||e.host||E.length>1)&&("."===I||".."===I)||""===I,S=0,x=E.length;x>=0;x--)"."===(I=E[x])?E.splice(x,1):".."===I?(E.splice(x,1),S++):S&&(E.splice(x,1),S--);if(!w&&!_)for(;S--;S)E.unshift("..");!w||""===E[0]||E[0]&&"/"===E[0].charAt(0)||E.unshift(""),C&&"/"!==E.join("/").substr(-1)&&E.push("");var B,O=""===E[0]||E[0]&&"/"===E[0].charAt(0);k&&(n.hostname=n.host=O?"":E.length?E.shift():"",(B=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=B.shift(),n.host=n.hostname=B.shift()));return(w=w||n.host&&E.length)&&!O&&E.unshift(""),E.length?n.pathname=E.join("/"):(n.pathname=null,n.path=null),i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},o.prototype.parseHost=function(){var e=this.host,t=s.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){this.listeners={}}return e.prototype.addEventListener=function(e,t){e=e.toLowerCase(),this.listeners[e]=this.listeners[e]||[],this.listeners[e].push(t.handleEvent||t)},e.prototype.removeEventListener=function(e,t){if(e=e.toLowerCase(),this.listeners[e]){var n=this.listeners[e].indexOf(t.handleEvent||t);n<0||this.listeners[e].splice(n,1)}},e.prototype.dispatchEvent=function(e){var t=e.type.toLowerCase();if(e.target=this,this.listeners[t])for(var n=0,r=this.listeners[t];n=0;c--)if(l[c]!==f[c])return!1;for(c=l.length-1;c>=0;c--)if(!y(e[s=l[c]],t[s],n,r))return!1;return!0}(e,t,n,r))}return n?e===t:e==t}function b(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function w(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(n){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function _(e,t,n,r){var i;if("function"!==typeof t)throw new TypeError('"block" argument must be a function');"string"===typeof n&&(r=n,n=null),i=function(e){var t;try{e()}catch(n){t=n}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!i&&m(i,n,"Missing expected exception"+r);var o="string"===typeof r,s=!e&&i&&!n;if((!e&&a.isError(i)&&o&&w(i,n)||s)&&m(i,n,"Got unwanted exception"+r),e&&i&&n&&!w(i,n)||!e&&i)throw i}d.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=function(e){return g(v(e.actual),128)+" "+e.operator+" "+g(v(e.expected),128)}(this),this.generatedMessage=!0);var t=e.stackStartFunction||m;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,i=p(t),o=r.indexOf("\n"+i);if(o>=0){var a=r.indexOf("\n",o+1);r=r.substring(a+1)}this.stack=r}}},a.inherits(d.AssertionError,Error),d.fail=m,d.ok=A,d.equal=function(e,t,n){e!=t&&m(e,t,n,"==",d.equal)},d.notEqual=function(e,t,n){e==t&&m(e,t,n,"!=",d.notEqual)},d.deepEqual=function(e,t,n){y(e,t,!1)||m(e,t,n,"deepEqual",d.deepEqual)},d.deepStrictEqual=function(e,t,n){y(e,t,!0)||m(e,t,n,"deepStrictEqual",d.deepStrictEqual)},d.notDeepEqual=function(e,t,n){y(e,t,!1)&&m(e,t,n,"notDeepEqual",d.notDeepEqual)},d.notDeepStrictEqual=function e(t,n,r){y(t,n,!0)&&m(t,n,r,"notDeepStrictEqual",e)},d.strictEqual=function(e,t,n){e!==t&&m(e,t,n,"===",d.strictEqual)},d.notStrictEqual=function(e,t,n){e===t&&m(e,t,n,"!==",d.notStrictEqual)},d.throws=function(e,t,n){_(!0,e,t,n)},d.doesNotThrow=function(e,t,n){_(!1,e,t,n)},d.ifError=function(e){if(e)throw e},d.strict=r((function e(t,n){t||m(t,!0,n,"==",e)}),d,{equal:d.strictEqual,deepEqual:d.deepStrictEqual,notEqual:d.notStrictEqual,notDeepEqual:d.notDeepStrictEqual}),d.strict.strict=d.strict;var E=Object.keys||function(e){var t=[];for(var n in e)s.call(e,n)&&t.push(n);return t}}).call(this,n(20))},function(e,t,n){"use strict";var r=n(24),i=n(375),o=n(37).Buffer,a=new Array(16);function s(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function u(e,t){return e<>>32-t}function c(e,t,n,r,i,o,a){return u(e+(t&n|~t&r)+i+o|0,a)+t|0}function l(e,t,n,r,i,o,a){return u(e+(t&r|n&~r)+i+o|0,a)+t|0}function f(e,t,n,r,i,o,a){return u(e+(t^n^r)+i+o|0,a)+t|0}function d(e,t,n,r,i,o,a){return u(e+(n^(t|~r))+i+o|0,a)+t|0}r(s,i),s.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var n=this._a,r=this._b,i=this._c,o=this._d;n=c(n,r,i,o,e[0],3614090360,7),o=c(o,n,r,i,e[1],3905402710,12),i=c(i,o,n,r,e[2],606105819,17),r=c(r,i,o,n,e[3],3250441966,22),n=c(n,r,i,o,e[4],4118548399,7),o=c(o,n,r,i,e[5],1200080426,12),i=c(i,o,n,r,e[6],2821735955,17),r=c(r,i,o,n,e[7],4249261313,22),n=c(n,r,i,o,e[8],1770035416,7),o=c(o,n,r,i,e[9],2336552879,12),i=c(i,o,n,r,e[10],4294925233,17),r=c(r,i,o,n,e[11],2304563134,22),n=c(n,r,i,o,e[12],1804603682,7),o=c(o,n,r,i,e[13],4254626195,12),i=c(i,o,n,r,e[14],2792965006,17),n=l(n,r=c(r,i,o,n,e[15],1236535329,22),i,o,e[1],4129170786,5),o=l(o,n,r,i,e[6],3225465664,9),i=l(i,o,n,r,e[11],643717713,14),r=l(r,i,o,n,e[0],3921069994,20),n=l(n,r,i,o,e[5],3593408605,5),o=l(o,n,r,i,e[10],38016083,9),i=l(i,o,n,r,e[15],3634488961,14),r=l(r,i,o,n,e[4],3889429448,20),n=l(n,r,i,o,e[9],568446438,5),o=l(o,n,r,i,e[14],3275163606,9),i=l(i,o,n,r,e[3],4107603335,14),r=l(r,i,o,n,e[8],1163531501,20),n=l(n,r,i,o,e[13],2850285829,5),o=l(o,n,r,i,e[2],4243563512,9),i=l(i,o,n,r,e[7],1735328473,14),n=f(n,r=l(r,i,o,n,e[12],2368359562,20),i,o,e[5],4294588738,4),o=f(o,n,r,i,e[8],2272392833,11),i=f(i,o,n,r,e[11],1839030562,16),r=f(r,i,o,n,e[14],4259657740,23),n=f(n,r,i,o,e[1],2763975236,4),o=f(o,n,r,i,e[4],1272893353,11),i=f(i,o,n,r,e[7],4139469664,16),r=f(r,i,o,n,e[10],3200236656,23),n=f(n,r,i,o,e[13],681279174,4),o=f(o,n,r,i,e[0],3936430074,11),i=f(i,o,n,r,e[3],3572445317,16),r=f(r,i,o,n,e[6],76029189,23),n=f(n,r,i,o,e[9],3654602809,4),o=f(o,n,r,i,e[12],3873151461,11),i=f(i,o,n,r,e[15],530742520,16),n=d(n,r=f(r,i,o,n,e[2],3299628645,23),i,o,e[0],4096336452,6),o=d(o,n,r,i,e[7],1126891415,10),i=d(i,o,n,r,e[14],2878612391,15),r=d(r,i,o,n,e[5],4237533241,21),n=d(n,r,i,o,e[12],1700485571,6),o=d(o,n,r,i,e[3],2399980690,10),i=d(i,o,n,r,e[10],4293915773,15),r=d(r,i,o,n,e[1],2240044497,21),n=d(n,r,i,o,e[8],1873313359,6),o=d(o,n,r,i,e[15],4264355552,10),i=d(i,o,n,r,e[6],2734768916,15),r=d(r,i,o,n,e[13],1309151649,21),n=d(n,r,i,o,e[4],4149444226,6),o=d(o,n,r,i,e[11],3174756917,10),i=d(i,o,n,r,e[2],718787259,15),r=d(r,i,o,n,e[9],3951481745,21),this._a=this._a+n|0,this._b=this._b+r|0,this._c=this._c+i|0,this._d=this._d+o|0},s.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=o.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},e.exports=s},function(e,t,n){"use strict";var r=n(145).codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,n,o){if("function"===typeof n)return e(t,null,n);n||(n={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=new Array(n),i=0;i>>32-t}function g(e,t,n,r,i,o,a,s){return p(e+(t^n^r)+o+a|0,s)+i|0}function v(e,t,n,r,i,o,a,s){return p(e+(t&n|~t&r)+o+a|0,s)+i|0}function m(e,t,n,r,i,o,a,s){return p(e+((t|~n)^r)+o+a|0,s)+i|0}function A(e,t,n,r,i,o,a,s){return p(e+(t&r|n&~r)+o+a|0,s)+i|0}function y(e,t,n,r,i,o,a,s){return p(e+(t^(n|~r))+o+a|0,s)+i|0}i(h,o),h.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var n=0|this._a,r=0|this._b,i=0|this._c,o=0|this._d,h=0|this._e,b=0|this._a,w=0|this._b,_=0|this._c,E=0|this._d,k=0|this._e,I=0;I<80;I+=1){var C,S;I<16?(C=g(n,r,i,o,h,e[s[I]],f[0],c[I]),S=y(b,w,_,E,k,e[u[I]],d[0],l[I])):I<32?(C=v(n,r,i,o,h,e[s[I]],f[1],c[I]),S=A(b,w,_,E,k,e[u[I]],d[1],l[I])):I<48?(C=m(n,r,i,o,h,e[s[I]],f[2],c[I]),S=m(b,w,_,E,k,e[u[I]],d[2],l[I])):I<64?(C=A(n,r,i,o,h,e[s[I]],f[3],c[I]),S=v(b,w,_,E,k,e[u[I]],d[3],l[I])):(C=y(n,r,i,o,h,e[s[I]],f[4],c[I]),S=g(b,w,_,E,k,e[u[I]],d[4],l[I])),n=h,h=o,o=p(i,10),i=r,r=C,b=k,k=E,E=p(_,10),_=w,w=S}var x=this._b+i+E|0;this._b=this._c+o+k|0,this._c=this._d+h+b|0,this._d=this._e+n+w|0,this._e=this._a+r+_|0,this._a=x},h.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=r.alloc?r.alloc(20):new r(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},e.exports=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(){if(null!==e){var t=e;e=null,t.apply(this,arguments)}}},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(){if(null===e)throw new Error("Callback was already called.");var t=e;e=null,t.apply(this,arguments)}},e.exports=t.default},function(e,t,n){var r=n(804),i=n(203);e.exports=function(e){return i({id:r(),jsonrpc:"2.0",params:[]},e)}},function(e,t,n){var r=n(9).default,i=n(10).default,o=n(30).default,a=n(31).default,s=function(e){"use strict";o(n,e);var t=a(n);function n(e){var i;if(r(this,n),i=t.call(this),!e)throw new Error("JsonRpcEngineMiddlewareSubprovider - no constructorFn specified");return i._constructorFn=e,i}return i(n,[{key:"setEngine",value:function(e){if(this.middleware)throw new Error("JsonRpcEngineMiddlewareSubprovider - subprovider added to engine twice");var t=e._blockTracker,n=this._constructorFn({engine:e,provider:e,blockTracker:t});if(!n)throw new Error("JsonRpcEngineMiddlewareSubprovider - _constructorFn did not return middleware");if("function"!==typeof n)throw new Error("JsonRpcEngineMiddlewareSubprovider - specified middleware is not a function");this.middleware=n}},{key:"handleRequest",value:function(e,t,n){var r={id:e.id};this.middleware(e,r,(function(e){t((function(t,n,i){t?(delete r.result,r.error={message:t.message||t}):r.result=n,e?e(i):i()}))}),(function(e){if(e)return n(e);n(null,r.result)}))}}]),n}(n(207));e.exports=s},function(e,t,n){"use strict";var r=n(9).default,i=n(10).default,o=n(30).default,a=n(31).default,s=n(232).default;Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumProviderError=t.EthereumRpcError=void 0;var u=n(600),c=function(e){o(n,e);var t=a(n);function n(e,i,o){var a;if(r(this,n),!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!i||"string"!==typeof i)throw new Error('"message" must be a nonempty string.');return(a=t.call(this,i)).code=e,void 0!==o&&(a.data=o),a}return i(n,[{key:"serialize",value:function(){var e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data),this.stack&&(e.stack=this.stack),e}},{key:"toString",value:function(){return u.default(this.serialize(),f,2)}}]),n}(s(Error));t.EthereumRpcError=c;var l=function(e){o(n,e);var t=a(n);function n(e,i,o){if(r(this,n),!function(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');return t.call(this,e,i,o)}return i(n)}(c);function f(e,t){if("[Circular]"!==t)return t}t.EthereumProviderError=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.errorValues=t.errorCodes=void 0,t.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}},t.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}}},function(e,t,n){var r=n(28).default,i=n(29).default,o=n(9).default,a=n(10).default,s=n(30).default,u=n(31).default,c=function(e){"use strict";s(n,e);var t=u(n);function n(){var e;return o(this,n),(e=t.call(this)).updates=[],e}return a(n,[{key:"initialize",value:function(){var e=i(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},{key:"update",value:function(){var e=i(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:throw new Error("BaseFilter - no update method specified");case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},{key:"addResults",value:function(e){var t=this;this.updates=this.updates.concat(e),e.forEach((function(e){return t.emit("update",e)}))}},{key:"addInitialResults",value:function(e){}},{key:"getChangesAndClear",value:function(){var e=this.updates;return this.updates=[],e}}]),n}(n(235).default);e.exports=c},function(e,t,n){var r=n(28).default,i=n(29).default;function o(){return(o=i(r().mark((function e(t){var n,i,o,c,l,f,d;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.provider,i=t.fromBlock,o=t.toBlock,i||(i=o),c=a(i),l=a(o),f=Array(l-c+1).fill().map((function(e,t){return c+t})).map(s),e.next=8,Promise.all(f.map((function(e){return u(n,"eth_getBlockByNumber",[e,!1])})));case 8:return d=e.sent,e.abrupt("return",d);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function a(e){return void 0===e||null===e?e:Number.parseInt(e,16)}function s(e){return void 0===e||null===e?e:"0x"+e.toString(16)}function u(e,t,n){return new Promise((function(r,i){e.sendAsync({id:1,jsonrpc:"2.0",method:t,params:n},(function(e,t){if(e)return i(e);r(t.result)}))}))}e.exports=function(e){return o.apply(this,arguments)}},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.ecdhUnsafe=t.ecdh=t.recover=t.verify=t.sign=t.signatureImportLax=t.signatureImport=t.signatureExport=t.signatureNormalize=t.publicKeyCombine=t.publicKeyTweakMul=t.publicKeyTweakAdd=t.publicKeyVerify=t.publicKeyConvert=t.publicKeyCreate=t.privateKeyTweakMul=t.privateKeyTweakAdd=t.privateKeyModInverse=t.privateKeyNegate=t.privateKeyImport=t.privateKeyExport=t.privateKeyVerify=void 0;var r=n(371),i=n(829),o=n(830);t.privateKeyVerify=function(e){return 32===e.length&&r.privateKeyVerify(Uint8Array.from(e))},t.privateKeyExport=function(e,t){if(32!==e.length)throw new RangeError("private key length is invalid");var n=i.privateKeyExport(e,t);return o.privateKeyExport(e,n,t)},t.privateKeyImport=function(e){if(null!==(e=o.privateKeyImport(e))&&32===e.length&&t.privateKeyVerify(e))return e;throw new Error("couldn't import from DER format")},t.privateKeyNegate=function(t){return e.from(r.privateKeyNegate(Uint8Array.from(t)))},t.privateKeyModInverse=function(t){if(32!==t.length)throw new Error("private key length is invalid");return e.from(i.privateKeyModInverse(Uint8Array.from(t)))},t.privateKeyTweakAdd=function(t,n){return e.from(r.privateKeyTweakAdd(Uint8Array.from(t),n))},t.privateKeyTweakMul=function(t,n){return e.from(r.privateKeyTweakMul(Uint8Array.from(t),Uint8Array.from(n)))},t.publicKeyCreate=function(t,n){return e.from(r.publicKeyCreate(Uint8Array.from(t),n))},t.publicKeyConvert=function(t,n){return e.from(r.publicKeyConvert(Uint8Array.from(t),n))},t.publicKeyVerify=function(e){return(33===e.length||65===e.length)&&r.publicKeyVerify(Uint8Array.from(e))},t.publicKeyTweakAdd=function(t,n,i){return e.from(r.publicKeyTweakAdd(Uint8Array.from(t),Uint8Array.from(n),i))},t.publicKeyTweakMul=function(t,n,i){return e.from(r.publicKeyTweakMul(Uint8Array.from(t),Uint8Array.from(n),i))},t.publicKeyCombine=function(t,n){var i=[];return t.forEach((function(e){i.push(Uint8Array.from(e))})),e.from(r.publicKeyCombine(i,n))},t.signatureNormalize=function(t){return e.from(r.signatureNormalize(Uint8Array.from(t)))},t.signatureExport=function(t){return e.from(r.signatureExport(Uint8Array.from(t)))},t.signatureImport=function(t){return e.from(r.signatureImport(Uint8Array.from(t)))},t.signatureImportLax=function(e){if(0===e.length)throw new RangeError("signature length is invalid");var t=o.signatureImportLax(e);if(null===t)throw new Error("couldn't parse DER signature");return i.signatureImport(t)},t.sign=function(t,n,i){if(null===i)throw new TypeError("options should be an Object");var o=void 0;if(i){if(o={},null===i.data)throw new TypeError("options.data should be a Buffer");if(i.data){if(32!=i.data.length)throw new RangeError("options.data length is invalid");o.data=new Uint8Array(i.data)}if(null===i.noncefn)throw new TypeError("options.noncefn should be a Function");i.noncefn&&(o.noncefn=function(t,n,r,o,a){var s=null!=r?e.from(r):null,u=null!=o?e.from(o):null,c=e.from("");return i.noncefn&&(c=i.noncefn(e.from(t),e.from(n),s,u,a)),new Uint8Array(c)})}var a=r.ecdsaSign(Uint8Array.from(t),Uint8Array.from(n),o);return{signature:e.from(a.signature),recovery:a.recid}},t.verify=function(e,t,n){return r.ecdsaVerify(Uint8Array.from(t),Uint8Array.from(e),n)},t.recover=function(t,n,i,o){return e.from(r.ecdsaRecover(Uint8Array.from(n),i,Uint8Array.from(t),o))},t.ecdh=function(t,n){return e.from(r.ecdh(Uint8Array.from(t),Uint8Array.from(n),{}))},t.ecdhUnsafe=function(t,n,r){if(33!==t.length&&65!==t.length)throw new RangeError("public key length is invalid");if(32!==n.length)throw new RangeError("private key length is invalid");return e.from(i.ecdhUnsafe(Uint8Array.from(t),Uint8Array.from(n),r))}}).call(this,n(26).Buffer)},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.rlphash=t.ripemd160=t.sha256=t.keccak256=t.keccak=void 0;var r=n(361),i=r.keccak224,o=r.keccak384,a=r.keccak256,s=r.keccak512,u=n(128),c=n(148),l=n(205),f=n(171);t.keccak=function(t,n){switch(void 0===n&&(n=256),t="string"!==typeof t||c.isHexString(t)?f.toBuffer(t):e.from(t,"utf8"),n||(n=256),n){case 224:return i(t);case 256:return a(t);case 384:return o(t);case 512:return s(t);default:throw new Error("Invald algorithm: keccak"+n)}},t.keccak256=function(e){return t.keccak(e)},t.sha256=function(e){return e=f.toBuffer(e),u("sha256").update(e).digest()},t.ripemd160=function(e,t){e=f.toBuffer(e);var n=u("rmd160").update(e).digest();return!0===t?f.setLength(n,32):n},t.rlphash=function(e){return t.keccak(l.encode(e))}}).call(this,n(26).Buffer)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canUseDOM=t.SafeNodeList=t.SafeHTMLCollection=void 0;var r,i=n(847);var o=((r=i)&&r.__esModule?r:{default:r}).default,a=o.canUseDOM?window.HTMLElement:{};t.SafeHTMLCollection=o.canUseDOM?window.HTMLCollection:{},t.SafeNodeList=o.canUseDOM?window.NodeList:{},t.canUseDOM=o.canUseDOM;t.default=a},function(e,t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2},t.isValid=function(e){return e&&"undefined"!==typeof e.bit&&e.bit>=0&&e.bit<4},t.from=function(e,n){if(t.isValid(e))return e;try{return function(e){if("string"!==typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+e)}}(e)}catch(r){return n}}},function(e,t,n){"use strict";var r=n(9).default,i=n(10).default,o=n(30).default,a=n(31).default,s=n(73).default;Object.defineProperty(t,"__esModule",{value:!0}),t.sha384=t.sha512_256=t.sha512=t.SHA512=void 0;var u=n(266),c=n(407),l=n(132),f=s(c.default.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map((function(e){return BigInt(e)}))),2),d=f[0],h=f[1],p=new Uint32Array(80),g=new Uint32Array(80),v=function(e){o(n,e);var t=a(n);function n(){var e;return r(this,n),(e=t.call(this,128,64,16,!1)).Ah=1779033703,e.Al=-205731576,e.Bh=-1150833019,e.Bl=-2067093701,e.Ch=1013904242,e.Cl=-23791573,e.Dh=-1521486534,e.Dl=1595750129,e.Eh=1359893119,e.El=-1377402159,e.Fh=-1694144372,e.Fl=725511199,e.Gh=528734635,e.Gl=-79577749,e.Hh=1541459225,e.Hl=327033209,e}return i(n,[{key:"get",value:function(){return[this.Ah,this.Al,this.Bh,this.Bl,this.Ch,this.Cl,this.Dh,this.Dl,this.Eh,this.El,this.Fh,this.Fl,this.Gh,this.Gl,this.Hh,this.Hl]}},{key:"set",value:function(e,t,n,r,i,o,a,s,u,c,l,f,d,h,p,g){this.Ah=0|e,this.Al=0|t,this.Bh=0|n,this.Bl=0|r,this.Ch=0|i,this.Cl=0|o,this.Dh=0|a,this.Dl=0|s,this.Eh=0|u,this.El=0|c,this.Fh=0|l,this.Fl=0|f,this.Gh=0|d,this.Gl=0|h,this.Hh=0|p,this.Hl=0|g}},{key:"process",value:function(e,t){for(var n=0;n<16;n++,t+=4)p[n]=e.getUint32(t),g[n]=e.getUint32(t+=4);for(var r=16;r<80;r++){var i=0|p[r-15],o=0|g[r-15],a=c.default.rotrSH(i,o,1)^c.default.rotrSH(i,o,8)^c.default.shrSH(i,o,7),s=c.default.rotrSL(i,o,1)^c.default.rotrSL(i,o,8)^c.default.shrSL(i,o,7),u=0|p[r-2],l=0|g[r-2],f=c.default.rotrSH(u,l,19)^c.default.rotrBH(u,l,61)^c.default.shrSH(u,l,6),v=c.default.rotrSL(u,l,19)^c.default.rotrBL(u,l,61)^c.default.shrSL(u,l,6),m=c.default.add4L(s,v,g[r-7],g[r-16]),A=c.default.add4H(m,a,f,p[r-7],p[r-16]);p[r]=0|A,g[r]=0|m}var y=this.Ah,b=this.Al,w=this.Bh,_=this.Bl,E=this.Ch,k=this.Cl,I=this.Dh,C=this.Dl,S=this.Eh,x=this.El,B=this.Fh,O=this.Fl,M=this.Gh,P=this.Gl,R=this.Hh,N=this.Hl;for(n=0;n<80;n++){var T=c.default.rotrSH(S,x,14)^c.default.rotrSH(S,x,18)^c.default.rotrBH(S,x,41),Q=c.default.rotrSL(S,x,14)^c.default.rotrSL(S,x,18)^c.default.rotrBL(S,x,41),D=S&B^~S&M,j=x&O^~x&P,U=c.default.add5L(N,Q,j,h[n],g[n]),L=c.default.add5H(U,R,T,D,d[n],p[n]),F=0|U,H=c.default.rotrSH(y,b,28)^c.default.rotrBH(y,b,34)^c.default.rotrBH(y,b,39),J=c.default.rotrSL(y,b,28)^c.default.rotrBL(y,b,34)^c.default.rotrBL(y,b,39),q=y&w^y&E^w&E,G=b&_^b&k^_&k;R=0|M,N=0|P,M=0|B,P=0|O,B=0|S,O=0|x;var z=c.default.add(0|I,0|C,0|L,0|F);S=z.h,x=z.l,I=0|E,C=0|k,E=0|w,k=0|_,w=0|y,_=0|b;var V=c.default.add3L(F,J,G);y=c.default.add3H(V,L,H,q),b=0|V}var W=c.default.add(0|this.Ah,0|this.Al,0|y,0|b);y=W.h,b=W.l;var K=c.default.add(0|this.Bh,0|this.Bl,0|w,0|_);w=K.h,_=K.l;var Y=c.default.add(0|this.Ch,0|this.Cl,0|E,0|k);E=Y.h,k=Y.l;var Z=c.default.add(0|this.Dh,0|this.Dl,0|I,0|C);I=Z.h,C=Z.l;var X=c.default.add(0|this.Eh,0|this.El,0|S,0|x);S=X.h,x=X.l;var $=c.default.add(0|this.Fh,0|this.Fl,0|B,0|O);B=$.h,O=$.l;var ee=c.default.add(0|this.Gh,0|this.Gl,0|M,0|P);M=ee.h,P=ee.l;var te=c.default.add(0|this.Hh,0|this.Hl,0|R,0|N);R=te.h,N=te.l,this.set(y,b,w,_,E,k,I,C,S,x,B,O,M,P,R,N)}},{key:"roundClean",value:function(){p.fill(0),g.fill(0)}},{key:"destroy",value:function(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}]),n}(u.SHA2);t.SHA512=v;var m=function(e){o(n,e);var t=a(n);function n(){var e;return r(this,n),(e=t.call(this)).Ah=573645204,e.Al=-64227540,e.Bh=-1621794909,e.Bl=-934517566,e.Ch=596883563,e.Cl=1867755857,e.Dh=-1774684391,e.Dl=1497426621,e.Eh=-1775747358,e.El=-1467023389,e.Fh=-1101128155,e.Fl=1401305490,e.Gh=721525244,e.Gl=746961066,e.Hh=246885852,e.Hl=-2117784414,e.outputLen=32,e}return i(n)}(v),A=function(e){o(n,e);var t=a(n);function n(){var e;return r(this,n),(e=t.call(this)).Ah=-876896931,e.Al=-1056596264,e.Bh=1654270250,e.Bl=914150663,e.Ch=-1856437926,e.Cl=812702999,e.Dh=355462360,e.Dl=-150054599,e.Eh=1731405415,e.El=-4191439,e.Fh=-1900787065,e.Fl=1750603025,e.Gh=-619958771,e.Gl=1694076839,e.Hh=1203062813,e.Hl=-1090891868,e.outputLen=48,e}return i(n)}(v);t.sha512=(0,l.wrapConstructor)((function(){return new v})),t.sha512_256=(0,l.wrapConstructor)((function(){return new m})),t.sha384=(0,l.wrapConstructor)((function(){return new A}))},function(e,t,n){"use strict";var r=n(44).default,i=n(9).default,o=n(10).default,a=n(30).default,s=n(31).default;Object.defineProperty(t,"__esModule",{value:!0}),t.SHA2=void 0;var u=n(209),c=n(132);var l=function(e){a(n,e);var t=s(n);function n(e,r,o,a){var s;return i(this,n),(s=t.call(this)).blockLen=e,s.outputLen=r,s.padOffset=o,s.isLE=a,s.finished=!1,s.length=0,s.pos=0,s.destroyed=!1,s.buffer=new Uint8Array(e),s.view=(0,c.createView)(s.buffer),s}return o(n,[{key:"update",value:function(e){u.default.exists(this);for(var t=this.view,n=this.buffer,r=this.blockLen,i=(e=(0,c.toBytes)(e)).length,o=0;or-o&&(this.process(n,0),o=0);for(var a=o;a>i&o),s=Number(n&o),u=r?4:0,c=r?0:4;e.setUint32(t+u,a,r),e.setUint32(t+c,s,r)}(n,r-8,BigInt(8*this.length),i),this.process(n,0);var s=(0,c.createView)(e);this.get().forEach((function(e,t){return s.setUint32(4*t,e,i)}))}},{key:"digest",value:function(){var e=this.buffer,t=this.outputLen;this.digestInto(e);var n=e.slice(0,t);return this.destroy(),n}},{key:"_cloneInto",value:function(e){var t;e||(e=new this.constructor),(t=e).set.apply(t,r(this.get()));var n=this.blockLen,i=this.buffer,o=this.length,a=this.finished,s=this.destroyed,u=this.pos;return e.length=o,e.pos=u,e.finished=a,e.destroyed=s,o%n&&e.buffer.set(i),e}}]),n}(c.Hash);t.SHA2=l},function(e,t,n){"use strict";var r=n(85);function i(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}e.exports=i,i.prototype._init=function(){},i.prototype.update=function(e){return 0===e.length?[]:"decrypt"===this.type?this._updateDecrypt(e):this._updateEncrypt(e)},i.prototype._buffer=function(e,t){for(var n=Math.min(this.buffer.length-this.bufferOff,e.length-t),r=0;r0;r--)t+=this._buffer(e,t),n+=this._flushBuffer(i,n);return t+=this._buffer(e,t),i},i.prototype.final=function(e){var t,n;return e&&(t=this.update(e)),n="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(n):n},i.prototype._pad=function(e,t){if(0===t)return!1;for(;t=0||!t.umod(e.prime1)||!t.umod(e.prime2));return t}function a(e,n){var i=function(e){var t=o(e);return{blinder:t.toRed(r.mont(e.modulus)).redPow(new r(e.publicExponent)).fromRed(),unblinder:t.invm(e.modulus)}}(n),a=n.modulus.byteLength(),s=new r(e).mul(i.blinder).umod(n.modulus),u=s.toRed(r.mont(n.prime1)),c=s.toRed(r.mont(n.prime2)),l=n.coefficient,f=n.prime1,d=n.prime2,h=u.redPow(n.exponent1).fromRed(),p=c.redPow(n.exponent2).fromRed(),g=h.isub(p).imul(l).umod(f).imul(d);return p.iadd(g).imul(i.unblinder).umod(n.modulus).toArrayLike(t,"be",a)}a.getr=o,e.exports=a}).call(this,n(26).Buffer)},function(e,t,n){"use strict";(function(t){var r,i=n(26),o=i.Buffer,a={};for(r in i)i.hasOwnProperty(r)&&"SlowBuffer"!==r&&"Buffer"!==r&&(a[r]=i[r]);var s=a.Buffer={};for(r in o)o.hasOwnProperty(r)&&"allocUnsafe"!==r&&"allocUnsafeSlow"!==r&&(s[r]=o[r]);if(a.Buffer.prototype=o.prototype,s.from&&s.from!==Uint8Array.from||(s.from=function(e,t,n){if("number"===typeof e)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof e);if(e&&"undefined"===typeof e.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);return o(e,t,n)}),s.alloc||(s.alloc=function(e,t,n){if("number"!==typeof e)throw new TypeError('The "size" argument must be of type number. Received type '+typeof e);if(e<0||e>=2*(1<<30))throw new RangeError('The value "'+e+'" is invalid for option "size"');var r=o(e);return t&&0!==t.length?"string"===typeof n?r.fill(t,n):r.fill(t):r.fill(0),r}),!a.kStringMaxLength)try{a.kStringMaxLength=t.binding("buffer").kStringMaxLength}catch(u){}a.constants||(a.constants={MAX_LENGTH:a.kMaxLength},a.kStringMaxLength&&(a.constants.MAX_STRING_LENGTH=a.kStringMaxLength)),e.exports=a}).call(this,n(35))},function(e,t,n){"use strict";var r=n(274).Reporter,i=n(173).EncoderBuffer,o=n(173).DecoderBuffer,a=n(85),s=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],u=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(s);function c(e,t,n){var r={};this._baseState=r,r.name=n,r.enc=e,r.parent=t||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}e.exports=c;var l=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];c.prototype.clone=function(){var e=this._baseState,t={};l.forEach((function(n){t[n]=e[n]}));var n=new this.constructor(t.parent);return n._baseState=t,n},c.prototype._wrap=function(){var e=this._baseState;u.forEach((function(t){this[t]=function(){var n=new this.constructor(this);return e.children.push(n),n[t].apply(n,arguments)}}),this)},c.prototype._init=function(e){var t=this._baseState;a(null===t.parent),e.call(this),t.children=t.children.filter((function(e){return e._baseState.parent===this}),this),a.equal(t.children.length,1,"Root node can have only one child")},c.prototype._useArgs=function(e){var t=this._baseState,n=e.filter((function(e){return e instanceof this.constructor}),this);e=e.filter((function(e){return!(e instanceof this.constructor)}),this),0!==n.length&&(a(null===t.children),t.children=n,n.forEach((function(e){e._baseState.parent=this}),this)),0!==e.length&&(a(null===t.args),t.args=e,t.reverseArgs=e.map((function(e){if("object"!==typeof e||e.constructor!==Object)return e;var t={};return Object.keys(e).forEach((function(n){n==(0|n)&&(n|=0);var r=e[n];t[r]=n})),t})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(e){c.prototype[e]=function(){var t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}})),s.forEach((function(e){c.prototype[e]=function(){var t=this._baseState,n=Array.prototype.slice.call(arguments);return a(null===t.tag),t.tag=e,this._useArgs(n),this}})),c.prototype.use=function(e){a(e);var t=this._baseState;return a(null===t.use),t.use=e,this},c.prototype.optional=function(){return this._baseState.optional=!0,this},c.prototype.def=function(e){var t=this._baseState;return a(null===t.default),t.default=e,t.optional=!0,this},c.prototype.explicit=function(e){var t=this._baseState;return a(null===t.explicit&&null===t.implicit),t.explicit=e,this},c.prototype.implicit=function(e){var t=this._baseState;return a(null===t.explicit&&null===t.implicit),t.implicit=e,this},c.prototype.obj=function(){var e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},c.prototype.key=function(e){var t=this._baseState;return a(null===t.key),t.key=e,this},c.prototype.any=function(){return this._baseState.any=!0,this},c.prototype.choice=function(e){var t=this._baseState;return a(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map((function(t){return e[t]}))),this},c.prototype.contains=function(e){var t=this._baseState;return a(null===t.use),t.contains=e,this},c.prototype._decode=function(e,t){var n=this._baseState;if(null===n.parent)return e.wrapResult(n.children[0]._decode(e,t));var r,i=n.default,a=!0,s=null;if(null!==n.key&&(s=e.enterKey(n.key)),n.optional){var u=null;if(null!==n.explicit?u=n.explicit:null!==n.implicit?u=n.implicit:null!==n.tag&&(u=n.tag),null!==u||n.any){if(a=this._peekTag(e,u,n.any),e.isError(a))return a}else{var c=e.save();try{null===n.choice?this._decodeGeneric(n.tag,e,t):this._decodeChoice(e,t),a=!0}catch(g){a=!1}e.restore(c)}}if(n.obj&&a&&(r=e.enterObject()),a){if(null!==n.explicit){var l=this._decodeTag(e,n.explicit);if(e.isError(l))return l;e=l}var f=e.offset;if(null===n.use&&null===n.choice){var d;n.any&&(d=e.save());var h=this._decodeTag(e,null!==n.implicit?n.implicit:n.tag,n.any);if(e.isError(h))return h;n.any?i=e.raw(d):e=h}if(t&&t.track&&null!==n.tag&&t.track(e.path(),f,e.length,"tagged"),t&&t.track&&null!==n.tag&&t.track(e.path(),e.offset,e.length,"content"),n.any||(i=null===n.choice?this._decodeGeneric(n.tag,e,t):this._decodeChoice(e,t)),e.isError(i))return i;if(n.any||null!==n.choice||null===n.children||n.children.forEach((function(n){n._decode(e,t)})),n.contains&&("octstr"===n.tag||"bitstr"===n.tag)){var p=new o(i);i=this._getUse(n.contains,e._reporterState.obj)._decode(p,t)}}return n.obj&&a&&(i=e.leaveObject(r)),null===n.key||null===i&&!0!==a?null!==s&&e.exitKey(s):e.leaveKey(s,n.key,i),i},c.prototype._decodeGeneric=function(e,t,n){var r=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,r.args[0],n):/str$/.test(e)?this._decodeStr(t,e,n):"objid"===e&&r.args?this._decodeObjid(t,r.args[0],r.args[1],n):"objid"===e?this._decodeObjid(t,null,null,n):"gentime"===e||"utctime"===e?this._decodeTime(t,e,n):"null_"===e?this._decodeNull(t,n):"bool"===e?this._decodeBool(t,n):"objDesc"===e?this._decodeStr(t,e,n):"int"===e||"enum"===e?this._decodeInt(t,r.args&&r.args[0],n):null!==r.use?this._getUse(r.use,t._reporterState.obj)._decode(t,n):t.error("unknown tag: "+e)},c.prototype._getUse=function(e,t){var n=this._baseState;return n.useDecoder=this._use(e,t),a(null===n.useDecoder._baseState.parent),n.useDecoder=n.useDecoder._baseState.children[0],n.implicit!==n.useDecoder._baseState.implicit&&(n.useDecoder=n.useDecoder.clone(),n.useDecoder._baseState.implicit=n.implicit),n.useDecoder},c.prototype._decodeChoice=function(e,t){var n=this._baseState,r=null,i=!1;return Object.keys(n.choice).some((function(o){var a=e.save(),s=n.choice[o];try{var u=s._decode(e,t);if(e.isError(u))return!1;r={type:o,value:u},i=!0}catch(c){return e.restore(a),!1}return!0}),this),i?r:e.error("Choice not matched")},c.prototype._createEncoderBuffer=function(e){return new i(e,this.reporter)},c.prototype._encode=function(e,t,n){var r=this._baseState;if(null===r.default||r.default!==e){var i=this._encodeValue(e,t,n);if(void 0!==i&&!this._skipDefault(i,t,n))return i}},c.prototype._encodeValue=function(e,t,n){var i=this._baseState;if(null===i.parent)return i.children[0]._encode(e,t||new r);var o=null;if(this.reporter=t,i.optional&&void 0===e){if(null===i.default)return;e=i.default}var a=null,s=!1;if(i.any)o=this._createEncoderBuffer(e);else if(i.choice)o=this._encodeChoice(e,t);else if(i.contains)a=this._getUse(i.contains,n)._encode(e,t),s=!0;else if(i.children)a=i.children.map((function(n){if("null_"===n._baseState.tag)return n._encode(null,t,e);if(null===n._baseState.key)return t.error("Child should have a key");var r=t.enterKey(n._baseState.key);if("object"!==typeof e)return t.error("Child expected, but input is not object");var i=n._encode(e[n._baseState.key],t,e);return t.leaveKey(r),i}),this).filter((function(e){return e})),a=this._createEncoderBuffer(a);else if("seqof"===i.tag||"setof"===i.tag){if(!i.args||1!==i.args.length)return t.error("Too many args for : "+i.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");var u=this.clone();u._baseState.implicit=null,a=this._createEncoderBuffer(e.map((function(n){var r=this._baseState;return this._getUse(r.args[0],e)._encode(n,t)}),u))}else null!==i.use?o=this._getUse(i.use,n)._encode(e,t):(a=this._encodePrimitive(i.tag,e),s=!0);if(!i.any&&null===i.choice){var c=null!==i.implicit?i.implicit:i.tag,l=null===i.implicit?"universal":"context";null===c?null===i.use&&t.error("Tag could be omitted only for .use()"):null===i.use&&(o=this._encodeComposite(c,s,l,a))}return null!==i.explicit&&(o=this._encodeComposite(i.explicit,!1,"context",o)),o},c.prototype._encodeChoice=function(e,t){var n=this._baseState,r=n.choice[e.type];return r||a(!1,e.type+" not found in "+JSON.stringify(Object.keys(n.choice))),r._encode(e.value,t)},c.prototype._encodePrimitive=function(e,t){var n=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&n.args)return this._encodeObjid(t,n.reverseArgs[0],n.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,n.args&&n.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},c.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},c.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(e)}},function(e,t,n){"use strict";var r=n(24);function i(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function o(e,t){this.path=e,this.rethrow(t)}t.Reporter=i,i.prototype.isError=function(e){return e instanceof o},i.prototype.save=function(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},i.prototype.restore=function(e){var t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},i.prototype.enterKey=function(e){return this._reporterState.path.push(e)},i.prototype.exitKey=function(e){var t=this._reporterState;t.path=t.path.slice(0,e-1)},i.prototype.leaveKey=function(e,t,n){var r=this._reporterState;this.exitKey(e),null!==r.obj&&(r.obj[t]=n)},i.prototype.path=function(){return this._reporterState.path.join("/")},i.prototype.enterObject=function(){var e=this._reporterState,t=e.obj;return e.obj={},t},i.prototype.leaveObject=function(e){var t=this._reporterState,n=t.obj;return t.obj=e,n},i.prototype.error=function(e){var t,n=this._reporterState,r=e instanceof o;if(t=r?e:new o(n.path.map((function(e){return"["+JSON.stringify(e)+"]"})).join(""),e.message||e,e.stack),!n.options.partial)throw t;return r||n.errors.push(t),t},i.prototype.wrapResult=function(e){var t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},r(o,Error),o.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,o),!this.stack)try{throw new Error(this.message)}catch(t){this.stack=t.stack}return this}},function(e,t,n){"use strict";function r(e){var t={};return Object.keys(e).forEach((function(n){(0|n)==n&&(n|=0);var r=e[n];t[r]=n})),t}t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=r(t.tagClass),t.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},t.tagByName=r(t.tag)},function(e,t,n){"use strict";var r=n(9).default,i=n(10).default;Object.defineProperty(t,"__esModule",{value:!0}),t.sha512=t.Sha512=t.sha256=t.Sha256=void 0;var o=n(441),a=n(265),s=n(277),u=function(){function e(t){r(this,e),this.blockSize=64,this.impl=o.sha256.create(),t&&this.update(t)}return i(e,[{key:"update",value:function(e){return this.impl.update((0,s.toRealUint8Array)(e)),this}},{key:"digest",value:function(){return this.impl.digest()}}]),e}();t.Sha256=u,t.sha256=function(e){return new u(e).digest()};var c=function(){function e(t){r(this,e),this.blockSize=128,this.impl=a.sha512.create(),t&&this.update(t)}return i(e,[{key:"update",value:function(e){return this.impl.update((0,s.toRealUint8Array)(e)),this}},{key:"digest",value:function(){return this.impl.digest()}}]),e}();t.Sha512=c,t.sha512=function(e){return new c(e).digest()}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toRealUint8Array=void 0,t.toRealUint8Array=function(e){return e instanceof Uint8Array?e:Uint8Array.from(e)}},function(e,t,n){"use strict";var r=n(19).default,i=n(44).default,o=n(73).default;Object.defineProperty(t,"__esModule",{value:!0}),t.encodeBech32Pubkey=t.encodeAminoPubkey=t.decodeBech32Pubkey=t.decodeAminoPubkey=t.encodeSecp256k1Pubkey=void 0;var a=n(41),s=n(70),u=n(69),c=n(215);t.encodeSecp256k1Pubkey=function(e){if(33!==e.length||2!==e[0]&&3!==e[0])throw new Error("Public key must be compressed secp256k1, i.e. 33 bytes starting with 0x02 or 0x03");return{type:c.pubkeyType.secp256k1,value:(0,a.toBase64)(e)}};var l=(0,a.fromHex)("eb5ae98721"),f=(0,a.fromHex)("1624de6420"),d=(0,a.fromHex)("0dfb100520"),h=(0,a.fromHex)("22c1f7e2");function p(e){if((0,u.arrayContentStartsWith)(e,l)){var t=e.slice(l.length);if(33!==t.length)throw new Error("Invalid rest data length. Expected 33 bytes (compressed secp256k1 pubkey).");return{type:c.pubkeyType.secp256k1,value:(0,a.toBase64)(t)}}if((0,u.arrayContentStartsWith)(e,f)){var n=e.slice(f.length);if(32!==n.length)throw new Error("Invalid rest data length. Expected 32 bytes (Ed25519 pubkey).");return{type:c.pubkeyType.ed25519,value:(0,a.toBase64)(n)}}if((0,u.arrayContentStartsWith)(e,d)){var r=e.slice(d.length);if(32!==r.length)throw new Error("Invalid rest data length. Expected 32 bytes (Sr25519 pubkey).");return{type:c.pubkeyType.sr25519,value:(0,a.toBase64)(r)}}if((0,u.arrayContentStartsWith)(e,h))return function(e){var t=Array.from(e),n=t.splice(0,h.length);if(!(0,u.arrayContentStartsWith)(n,h))throw new Error("Invalid multisig prefix.");if(8!=t.shift())throw new Error("Invalid multisig data. Expecting 0x08 prefix before threshold.");var r=g(t),i=o(r,2),a=i[0],s=i[1];t.splice(0,s);var l=[];for(;t.length>0;){if(18!=t.shift())throw new Error("Invalid multisig data. Expecting 0x12 prefix before participant pubkey length.");var f=g(t),d=o(f,2),v=d[0],m=d[1];if(t.splice(0,m),t.length127)throw new Error("Decoding numbers > 127 is not supported here. Please tell those lazy CosmJS maintainers to port the binary.Varint implementation from the Go standard library and write some tests.");return[e[0],1]}function v(e){var t=s.Uint53.fromString(e.toString()).toNumber();if(t>127)throw new Error("Encoding numbers > 127 is not supported here. Please tell those lazy CosmJS maintainers to port the binary.PutUvarint implementation from the Go standard library and write some tests.");return[t]}function m(e){if((0,c.isMultisigThresholdPubkey)(e)){var t=Array.from(h);t.push(8),t.push.apply(t,i(v(e.value.threshold)));var n,o=r(e.value.pubkeys.map((function(e){return m(e)})));try{for(o.s();!(n=o.n()).done;){var s=n.value;t.push(18),t.push.apply(t,i(v(s.length))),t.push.apply(t,i(s))}}catch(u){o.e(u)}finally{o.f()}return new Uint8Array(t)}if((0,c.isEd25519Pubkey)(e))return new Uint8Array([].concat(i(f),i((0,a.fromBase64)(e.value))));if((0,c.isSecp256k1Pubkey)(e))return new Uint8Array([].concat(i(l),i((0,a.fromBase64)(e.value))));throw new Error("Unsupported pubkey type")}t.decodeAminoPubkey=p,t.decodeBech32Pubkey=function(e){return p((0,a.fromBech32)(e).data)},t.encodeAminoPubkey=m,t.encodeBech32Pubkey=function(e,t){return(0,a.toBech32)(t,m(e))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeSignature=t.encodeSecp256k1Signature=void 0;var r=n(41),i=n(278),o=n(215);t.encodeSecp256k1Signature=function(e,t){if(64!==t.length)throw new Error("Signature must be 64 bytes long. Cosmos SDK uses a 2x32 byte fixed length encoding for the secp256k1 signature integers r and s.");return{pub_key:(0,i.encodeSecp256k1Pubkey)(e),signature:(0,r.toBase64)(t)}},t.decodeSignature=function(e){if(e.pub_key.type===o.pubkeyType.secp256k1)return{pubkey:(0,r.fromBase64)(e.pub_key.value),signature:(0,r.fromBase64)(e.signature)};throw new Error("Unsupported pubkey type")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeSignDoc=t.makeSignDoc=t.sortedJsonStringify=void 0;var r=n(41),i=n(70);function o(e){if("object"!==typeof e||null===e)return e;if(Array.isArray(e))return e.map(o);var t=Object.keys(e).sort(),n={};return t.forEach((function(t){n[t]=o(e[t])})),n}function a(e){return JSON.stringify(o(e))}t.sortedJsonStringify=a,t.makeSignDoc=function(e,t,n,r,o,a){return{chain_id:n,account_number:i.Uint53.fromString(o.toString()).toString(),sequence:i.Uint53.fromString(a.toString()).toString(),fee:t,msgs:e,memo:r||""}},t.serializeSignDoc=function(e){return(0,r.toUtf8)(a(e))}},function(e,t,n){"use strict";(function(e){var r=n(19).default,i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CompactBitArray=t.MultiSignature=t.protobufPackage=void 0;var o=i(n(18)),a=i(n(21));t.protobufPackage="cosmos.crypto.multisig.v1beta1";var s={};t.MultiSignature={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create(),i=r(e.signatures);try{for(i.s();!(t=i.n()).done;){var o=t.value;n.uint32(10).bytes(o)}}catch(s){i.e(s)}finally{i.f()}return n},decode:function(e,t){var n=e instanceof a.default.Reader?e:new a.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},s);for(i.signatures=[];n.pos>>3===1)i.signatures.push(n.bytes());else n.skipType(7&o)}return i},fromJSON:function(e){var t,n=Object.assign({},s);return n.signatures=(null!==(t=e.signatures)&&void 0!==t?t:[]).map((function(e){return f(e)})),n},toJSON:function(e){var t={};return e.signatures?t.signatures=e.signatures.map((function(e){return h(void 0!==e?e:new Uint8Array)})):t.signatures=[],t},fromPartial:function(e){var t,n=Object.assign({},s);return n.signatures=(null===(t=e.signatures)||void 0===t?void 0:t.map((function(e){return e})))||[],n}};var u={extraBitsStored:0};t.CompactBitArray={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return 0!==e.extraBitsStored&&t.uint32(8).uint32(e.extraBitsStored),0!==e.elems.length&&t.uint32(18).bytes(e.elems),t},decode:function(e,t){var n=e instanceof a.default.Reader?e:new a.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},u);for(i.elems=new Uint8Array;n.pos>>3){case 1:i.extraBitsStored=n.uint32();break;case 2:i.elems=n.bytes();break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t=Object.assign({},u);return t.extraBitsStored=void 0!==e.extraBitsStored&&null!==e.extraBitsStored?Number(e.extraBitsStored):0,t.elems=void 0!==e.elems&&null!==e.elems?f(e.elems):new Uint8Array,t},toJSON:function(e){var t={};return void 0!==e.extraBitsStored&&(t.extraBitsStored=e.extraBitsStored),void 0!==e.elems&&(t.elems=h(void 0!==e.elems?e.elems:new Uint8Array)),t},fromPartial:function(e){var t,n,r=Object.assign({},u);return r.extraBitsStored=null!==(t=e.extraBitsStored)&&void 0!==t?t:0,r.elems=null!==(n=e.elems)&&void 0!==n?n:new Uint8Array,r}};var c=function(){if("undefined"!==typeof c)return c;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof e)return e;throw"Unable to locate global object"}(),l=c.atob||function(e){return c.Buffer.from(e,"base64").toString("binary")};function f(e){for(var t=l(e),n=new Uint8Array(t.length),r=0;r3&&void 0!==arguments[3]?arguments[3]:o.SignMode.SIGN_MODE_DIRECT,c={signerInfos:u(e,i),fee:{amount:r(t),gasLimit:s.default.fromNumber(n)}};return a.AuthInfo.encode(a.AuthInfo.fromPartial(c)).finish()},t.makeSignDoc=function(e,t,n,r){return{bodyBytes:e,authInfoBytes:t,chainId:n,accountNumber:s.default.fromNumber(r)}},t.makeSignBytes=function(e){var t=e.accountNumber,n=e.authInfoBytes,r=e.bodyBytes,i=e.chainId,o=a.SignDoc.fromPartial({accountNumber:t,authInfoBytes:n,bodyBytes:r,chainId:i});return a.SignDoc.encode(o).finish()}},function(e,t,n){"use strict";var r=n(19).default,i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Params=t.ModuleAccount=t.BaseAccount=t.protobufPackage=void 0;var o=i(n(18)),a=i(n(21)),s=n(55);t.protobufPackage="cosmos.auth.v1beta1";var u={address:"",accountNumber:o.default.UZERO,sequence:o.default.UZERO};t.BaseAccount={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return""!==e.address&&t.uint32(10).string(e.address),void 0!==e.pubKey&&s.Any.encode(e.pubKey,t.uint32(18).fork()).ldelim(),e.accountNumber.isZero()||t.uint32(24).uint64(e.accountNumber),e.sequence.isZero()||t.uint32(32).uint64(e.sequence),t},decode:function(e,t){for(var n=e instanceof a.default.Reader?e:new a.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},u);n.pos>>3){case 1:i.address=n.string();break;case 2:i.pubKey=s.Any.decode(n,n.uint32());break;case 3:i.accountNumber=n.uint64();break;case 4:i.sequence=n.uint64();break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t=Object.assign({},u);return t.address=void 0!==e.address&&null!==e.address?String(e.address):"",t.pubKey=void 0!==e.pubKey&&null!==e.pubKey?s.Any.fromJSON(e.pubKey):void 0,t.accountNumber=void 0!==e.accountNumber&&null!==e.accountNumber?o.default.fromString(e.accountNumber):o.default.UZERO,t.sequence=void 0!==e.sequence&&null!==e.sequence?o.default.fromString(e.sequence):o.default.UZERO,t},toJSON:function(e){var t={};return void 0!==e.address&&(t.address=e.address),void 0!==e.pubKey&&(t.pubKey=e.pubKey?s.Any.toJSON(e.pubKey):void 0),void 0!==e.accountNumber&&(t.accountNumber=(e.accountNumber||o.default.UZERO).toString()),void 0!==e.sequence&&(t.sequence=(e.sequence||o.default.UZERO).toString()),t},fromPartial:function(e){var t,n=Object.assign({},u);return n.address=null!==(t=e.address)&&void 0!==t?t:"",n.pubKey=void 0!==e.pubKey&&null!==e.pubKey?s.Any.fromPartial(e.pubKey):void 0,n.accountNumber=void 0!==e.accountNumber&&null!==e.accountNumber?o.default.fromValue(e.accountNumber):o.default.UZERO,n.sequence=void 0!==e.sequence&&null!==e.sequence?o.default.fromValue(e.sequence):o.default.UZERO,n}};var c={name:"",permissions:""};t.ModuleAccount={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();void 0!==e.baseAccount&&t.BaseAccount.encode(e.baseAccount,n.uint32(10).fork()).ldelim(),""!==e.name&&n.uint32(18).string(e.name);var i,o=r(e.permissions);try{for(o.s();!(i=o.n()).done;){var s=i.value;n.uint32(26).string(s)}}catch(u){o.e(u)}finally{o.f()}return n},decode:function(e,n){var r=e instanceof a.default.Reader?e:new a.default.Reader(e),i=void 0===n?r.len:r.pos+n,o=Object.assign({},c);for(o.permissions=[];r.pos>>3){case 1:o.baseAccount=t.BaseAccount.decode(r,r.uint32());break;case 2:o.name=r.string();break;case 3:o.permissions.push(r.string());break;default:r.skipType(7&s)}}return o},fromJSON:function(e){var n,r=Object.assign({},c);return r.baseAccount=void 0!==e.baseAccount&&null!==e.baseAccount?t.BaseAccount.fromJSON(e.baseAccount):void 0,r.name=void 0!==e.name&&null!==e.name?String(e.name):"",r.permissions=(null!==(n=e.permissions)&&void 0!==n?n:[]).map((function(e){return String(e)})),r},toJSON:function(e){var n={};return void 0!==e.baseAccount&&(n.baseAccount=e.baseAccount?t.BaseAccount.toJSON(e.baseAccount):void 0),void 0!==e.name&&(n.name=e.name),e.permissions?n.permissions=e.permissions.map((function(e){return e})):n.permissions=[],n},fromPartial:function(e){var n,r,i=Object.assign({},c);return i.baseAccount=void 0!==e.baseAccount&&null!==e.baseAccount?t.BaseAccount.fromPartial(e.baseAccount):void 0,i.name=null!==(n=e.name)&&void 0!==n?n:"",i.permissions=(null===(r=e.permissions)||void 0===r?void 0:r.map((function(e){return e})))||[],i}};var l={maxMemoCharacters:o.default.UZERO,txSigLimit:o.default.UZERO,txSizeCostPerByte:o.default.UZERO,sigVerifyCostEd25519:o.default.UZERO,sigVerifyCostSecp256k1:o.default.UZERO};t.Params={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return e.maxMemoCharacters.isZero()||t.uint32(8).uint64(e.maxMemoCharacters),e.txSigLimit.isZero()||t.uint32(16).uint64(e.txSigLimit),e.txSizeCostPerByte.isZero()||t.uint32(24).uint64(e.txSizeCostPerByte),e.sigVerifyCostEd25519.isZero()||t.uint32(32).uint64(e.sigVerifyCostEd25519),e.sigVerifyCostSecp256k1.isZero()||t.uint32(40).uint64(e.sigVerifyCostSecp256k1),t},decode:function(e,t){for(var n=e instanceof a.default.Reader?e:new a.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},l);n.pos>>3){case 1:i.maxMemoCharacters=n.uint64();break;case 2:i.txSigLimit=n.uint64();break;case 3:i.txSizeCostPerByte=n.uint64();break;case 4:i.sigVerifyCostEd25519=n.uint64();break;case 5:i.sigVerifyCostSecp256k1=n.uint64();break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t=Object.assign({},l);return t.maxMemoCharacters=void 0!==e.maxMemoCharacters&&null!==e.maxMemoCharacters?o.default.fromString(e.maxMemoCharacters):o.default.UZERO,t.txSigLimit=void 0!==e.txSigLimit&&null!==e.txSigLimit?o.default.fromString(e.txSigLimit):o.default.UZERO,t.txSizeCostPerByte=void 0!==e.txSizeCostPerByte&&null!==e.txSizeCostPerByte?o.default.fromString(e.txSizeCostPerByte):o.default.UZERO,t.sigVerifyCostEd25519=void 0!==e.sigVerifyCostEd25519&&null!==e.sigVerifyCostEd25519?o.default.fromString(e.sigVerifyCostEd25519):o.default.UZERO,t.sigVerifyCostSecp256k1=void 0!==e.sigVerifyCostSecp256k1&&null!==e.sigVerifyCostSecp256k1?o.default.fromString(e.sigVerifyCostSecp256k1):o.default.UZERO,t},toJSON:function(e){var t={};return void 0!==e.maxMemoCharacters&&(t.maxMemoCharacters=(e.maxMemoCharacters||o.default.UZERO).toString()),void 0!==e.txSigLimit&&(t.txSigLimit=(e.txSigLimit||o.default.UZERO).toString()),void 0!==e.txSizeCostPerByte&&(t.txSizeCostPerByte=(e.txSizeCostPerByte||o.default.UZERO).toString()),void 0!==e.sigVerifyCostEd25519&&(t.sigVerifyCostEd25519=(e.sigVerifyCostEd25519||o.default.UZERO).toString()),void 0!==e.sigVerifyCostSecp256k1&&(t.sigVerifyCostSecp256k1=(e.sigVerifyCostSecp256k1||o.default.UZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},l);return t.maxMemoCharacters=void 0!==e.maxMemoCharacters&&null!==e.maxMemoCharacters?o.default.fromValue(e.maxMemoCharacters):o.default.UZERO,t.txSigLimit=void 0!==e.txSigLimit&&null!==e.txSigLimit?o.default.fromValue(e.txSigLimit):o.default.UZERO,t.txSizeCostPerByte=void 0!==e.txSizeCostPerByte&&null!==e.txSizeCostPerByte?o.default.fromValue(e.txSizeCostPerByte):o.default.UZERO,t.sigVerifyCostEd25519=void 0!==e.sigVerifyCostEd25519&&null!==e.sigVerifyCostEd25519?o.default.fromValue(e.sigVerifyCostEd25519):o.default.UZERO,t.sigVerifyCostSecp256k1=void 0!==e.sigVerifyCostSecp256k1&&null!==e.sigVerifyCostSecp256k1?o.default.fromValue(e.sigVerifyCostSecp256k1):o.default.UZERO,t}},a.default.util.Long!==o.default&&(a.default.util.Long=o.default,a.default.configure())},function(e,t,n){"use strict";(function(e){var r=n(19).default,i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.TallyParams=t.VotingParams=t.DepositParams=t.Vote=t.TallyResult=t.Proposal=t.Deposit=t.TextProposal=t.WeightedVoteOption=t.proposalStatusToJSON=t.proposalStatusFromJSON=t.ProposalStatus=t.voteOptionToJSON=t.voteOptionFromJSON=t.VoteOption=t.protobufPackage=void 0;var o,a,s=i(n(18)),u=i(n(21)),c=n(55),l=n(112),f=n(176),d=n(68);function h(e){switch(e){case 0:case"VOTE_OPTION_UNSPECIFIED":return o.VOTE_OPTION_UNSPECIFIED;case 1:case"VOTE_OPTION_YES":return o.VOTE_OPTION_YES;case 2:case"VOTE_OPTION_ABSTAIN":return o.VOTE_OPTION_ABSTAIN;case 3:case"VOTE_OPTION_NO":return o.VOTE_OPTION_NO;case 4:case"VOTE_OPTION_NO_WITH_VETO":return o.VOTE_OPTION_NO_WITH_VETO;default:return o.UNRECOGNIZED}}function p(e){switch(e){case o.VOTE_OPTION_UNSPECIFIED:return"VOTE_OPTION_UNSPECIFIED";case o.VOTE_OPTION_YES:return"VOTE_OPTION_YES";case o.VOTE_OPTION_ABSTAIN:return"VOTE_OPTION_ABSTAIN";case o.VOTE_OPTION_NO:return"VOTE_OPTION_NO";case o.VOTE_OPTION_NO_WITH_VETO:return"VOTE_OPTION_NO_WITH_VETO";default:return"UNKNOWN"}}function g(e){switch(e){case 0:case"PROPOSAL_STATUS_UNSPECIFIED":return a.PROPOSAL_STATUS_UNSPECIFIED;case 1:case"PROPOSAL_STATUS_DEPOSIT_PERIOD":return a.PROPOSAL_STATUS_DEPOSIT_PERIOD;case 2:case"PROPOSAL_STATUS_VOTING_PERIOD":return a.PROPOSAL_STATUS_VOTING_PERIOD;case 3:case"PROPOSAL_STATUS_PASSED":return a.PROPOSAL_STATUS_PASSED;case 4:case"PROPOSAL_STATUS_REJECTED":return a.PROPOSAL_STATUS_REJECTED;case 5:case"PROPOSAL_STATUS_FAILED":return a.PROPOSAL_STATUS_FAILED;default:return a.UNRECOGNIZED}}function v(e){switch(e){case a.PROPOSAL_STATUS_UNSPECIFIED:return"PROPOSAL_STATUS_UNSPECIFIED";case a.PROPOSAL_STATUS_DEPOSIT_PERIOD:return"PROPOSAL_STATUS_DEPOSIT_PERIOD";case a.PROPOSAL_STATUS_VOTING_PERIOD:return"PROPOSAL_STATUS_VOTING_PERIOD";case a.PROPOSAL_STATUS_PASSED:return"PROPOSAL_STATUS_PASSED";case a.PROPOSAL_STATUS_REJECTED:return"PROPOSAL_STATUS_REJECTED";case a.PROPOSAL_STATUS_FAILED:return"PROPOSAL_STATUS_FAILED";default:return"UNKNOWN"}}t.protobufPackage="cosmos.gov.v1beta1",function(e){e[e.VOTE_OPTION_UNSPECIFIED=0]="VOTE_OPTION_UNSPECIFIED",e[e.VOTE_OPTION_YES=1]="VOTE_OPTION_YES",e[e.VOTE_OPTION_ABSTAIN=2]="VOTE_OPTION_ABSTAIN",e[e.VOTE_OPTION_NO=3]="VOTE_OPTION_NO",e[e.VOTE_OPTION_NO_WITH_VETO=4]="VOTE_OPTION_NO_WITH_VETO",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(o=t.VoteOption||(t.VoteOption={})),t.voteOptionFromJSON=h,t.voteOptionToJSON=p,function(e){e[e.PROPOSAL_STATUS_UNSPECIFIED=0]="PROPOSAL_STATUS_UNSPECIFIED",e[e.PROPOSAL_STATUS_DEPOSIT_PERIOD=1]="PROPOSAL_STATUS_DEPOSIT_PERIOD",e[e.PROPOSAL_STATUS_VOTING_PERIOD=2]="PROPOSAL_STATUS_VOTING_PERIOD",e[e.PROPOSAL_STATUS_PASSED=3]="PROPOSAL_STATUS_PASSED",e[e.PROPOSAL_STATUS_REJECTED=4]="PROPOSAL_STATUS_REJECTED",e[e.PROPOSAL_STATUS_FAILED=5]="PROPOSAL_STATUS_FAILED",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(a=t.ProposalStatus||(t.ProposalStatus={})),t.proposalStatusFromJSON=g,t.proposalStatusToJSON=v;var m={option:0,weight:""};t.WeightedVoteOption={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return 0!==e.option&&t.uint32(8).int32(e.option),""!==e.weight&&t.uint32(18).string(e.weight),t},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},m);n.pos>>3){case 1:i.option=n.int32();break;case 2:i.weight=n.string();break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t=Object.assign({},m);return t.option=void 0!==e.option&&null!==e.option?h(e.option):0,t.weight=void 0!==e.weight&&null!==e.weight?String(e.weight):"",t},toJSON:function(e){var t={};return void 0!==e.option&&(t.option=p(e.option)),void 0!==e.weight&&(t.weight=e.weight),t},fromPartial:function(e){var t,n,r=Object.assign({},m);return r.option=null!==(t=e.option)&&void 0!==t?t:0,r.weight=null!==(n=e.weight)&&void 0!==n?n:"",r}};var A={title:"",description:""};t.TextProposal={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return""!==e.title&&t.uint32(10).string(e.title),""!==e.description&&t.uint32(18).string(e.description),t},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},A);n.pos>>3){case 1:i.title=n.string();break;case 2:i.description=n.string();break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t=Object.assign({},A);return t.title=void 0!==e.title&&null!==e.title?String(e.title):"",t.description=void 0!==e.description&&null!==e.description?String(e.description):"",t},toJSON:function(e){var t={};return void 0!==e.title&&(t.title=e.title),void 0!==e.description&&(t.description=e.description),t},fromPartial:function(e){var t,n,r=Object.assign({},A);return r.title=null!==(t=e.title)&&void 0!==t?t:"",r.description=null!==(n=e.description)&&void 0!==n?n:"",r}};var y={proposalId:s.default.UZERO,depositor:""};t.Deposit={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();e.proposalId.isZero()||t.uint32(8).uint64(e.proposalId),""!==e.depositor&&t.uint32(18).string(e.depositor);var n,i=r(e.amount);try{for(i.s();!(n=i.n()).done;){var o=n.value;d.Coin.encode(o,t.uint32(26).fork()).ldelim()}}catch(a){i.e(a)}finally{i.f()}return t},decode:function(e,t){var n=e instanceof u.default.Reader?e:new u.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},y);for(i.amount=[];n.pos>>3){case 1:i.proposalId=n.uint64();break;case 2:i.depositor=n.string();break;case 3:i.amount.push(d.Coin.decode(n,n.uint32()));break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t,n=Object.assign({},y);return n.proposalId=void 0!==e.proposalId&&null!==e.proposalId?s.default.fromString(e.proposalId):s.default.UZERO,n.depositor=void 0!==e.depositor&&null!==e.depositor?String(e.depositor):"",n.amount=(null!==(t=e.amount)&&void 0!==t?t:[]).map((function(e){return d.Coin.fromJSON(e)})),n},toJSON:function(e){var t={};return void 0!==e.proposalId&&(t.proposalId=(e.proposalId||s.default.UZERO).toString()),void 0!==e.depositor&&(t.depositor=e.depositor),e.amount?t.amount=e.amount.map((function(e){return e?d.Coin.toJSON(e):void 0})):t.amount=[],t},fromPartial:function(e){var t,n,r=Object.assign({},y);return r.proposalId=void 0!==e.proposalId&&null!==e.proposalId?s.default.fromValue(e.proposalId):s.default.UZERO,r.depositor=null!==(t=e.depositor)&&void 0!==t?t:"",r.amount=(null===(n=e.amount)||void 0===n?void 0:n.map((function(e){return d.Coin.fromPartial(e)})))||[],r}};var b={proposalId:s.default.UZERO,status:0};t.Proposal={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();e.proposalId.isZero()||n.uint32(8).uint64(e.proposalId),void 0!==e.content&&c.Any.encode(e.content,n.uint32(18).fork()).ldelim(),0!==e.status&&n.uint32(24).int32(e.status),void 0!==e.finalTallyResult&&t.TallyResult.encode(e.finalTallyResult,n.uint32(34).fork()).ldelim(),void 0!==e.submitTime&&l.Timestamp.encode(e.submitTime,n.uint32(42).fork()).ldelim(),void 0!==e.depositEndTime&&l.Timestamp.encode(e.depositEndTime,n.uint32(50).fork()).ldelim();var i,o=r(e.totalDeposit);try{for(o.s();!(i=o.n()).done;){var a=i.value;d.Coin.encode(a,n.uint32(58).fork()).ldelim()}}catch(s){o.e(s)}finally{o.f()}return void 0!==e.votingStartTime&&l.Timestamp.encode(e.votingStartTime,n.uint32(66).fork()).ldelim(),void 0!==e.votingEndTime&&l.Timestamp.encode(e.votingEndTime,n.uint32(74).fork()).ldelim(),n},decode:function(e,n){var r=e instanceof u.default.Reader?e:new u.default.Reader(e),i=void 0===n?r.len:r.pos+n,o=Object.assign({},b);for(o.totalDeposit=[];r.pos>>3){case 1:o.proposalId=r.uint64();break;case 2:o.content=c.Any.decode(r,r.uint32());break;case 3:o.status=r.int32();break;case 4:o.finalTallyResult=t.TallyResult.decode(r,r.uint32());break;case 5:o.submitTime=l.Timestamp.decode(r,r.uint32());break;case 6:o.depositEndTime=l.Timestamp.decode(r,r.uint32());break;case 7:o.totalDeposit.push(d.Coin.decode(r,r.uint32()));break;case 8:o.votingStartTime=l.Timestamp.decode(r,r.uint32());break;case 9:o.votingEndTime=l.Timestamp.decode(r,r.uint32());break;default:r.skipType(7&a)}}return o},fromJSON:function(e){var n,r=Object.assign({},b);return r.proposalId=void 0!==e.proposalId&&null!==e.proposalId?s.default.fromString(e.proposalId):s.default.UZERO,r.content=void 0!==e.content&&null!==e.content?c.Any.fromJSON(e.content):void 0,r.status=void 0!==e.status&&null!==e.status?g(e.status):0,r.finalTallyResult=void 0!==e.finalTallyResult&&null!==e.finalTallyResult?t.TallyResult.fromJSON(e.finalTallyResult):void 0,r.submitTime=void 0!==e.submitTime&&null!==e.submitTime?R(e.submitTime):void 0,r.depositEndTime=void 0!==e.depositEndTime&&null!==e.depositEndTime?R(e.depositEndTime):void 0,r.totalDeposit=(null!==(n=e.totalDeposit)&&void 0!==n?n:[]).map((function(e){return d.Coin.fromJSON(e)})),r.votingStartTime=void 0!==e.votingStartTime&&null!==e.votingStartTime?R(e.votingStartTime):void 0,r.votingEndTime=void 0!==e.votingEndTime&&null!==e.votingEndTime?R(e.votingEndTime):void 0,r},toJSON:function(e){var n={};return void 0!==e.proposalId&&(n.proposalId=(e.proposalId||s.default.UZERO).toString()),void 0!==e.content&&(n.content=e.content?c.Any.toJSON(e.content):void 0),void 0!==e.status&&(n.status=v(e.status)),void 0!==e.finalTallyResult&&(n.finalTallyResult=e.finalTallyResult?t.TallyResult.toJSON(e.finalTallyResult):void 0),void 0!==e.submitTime&&(n.submitTime=P(e.submitTime).toISOString()),void 0!==e.depositEndTime&&(n.depositEndTime=P(e.depositEndTime).toISOString()),e.totalDeposit?n.totalDeposit=e.totalDeposit.map((function(e){return e?d.Coin.toJSON(e):void 0})):n.totalDeposit=[],void 0!==e.votingStartTime&&(n.votingStartTime=P(e.votingStartTime).toISOString()),void 0!==e.votingEndTime&&(n.votingEndTime=P(e.votingEndTime).toISOString()),n},fromPartial:function(e){var n,r,i=Object.assign({},b);return i.proposalId=void 0!==e.proposalId&&null!==e.proposalId?s.default.fromValue(e.proposalId):s.default.UZERO,i.content=void 0!==e.content&&null!==e.content?c.Any.fromPartial(e.content):void 0,i.status=null!==(n=e.status)&&void 0!==n?n:0,i.finalTallyResult=void 0!==e.finalTallyResult&&null!==e.finalTallyResult?t.TallyResult.fromPartial(e.finalTallyResult):void 0,i.submitTime=void 0!==e.submitTime&&null!==e.submitTime?l.Timestamp.fromPartial(e.submitTime):void 0,i.depositEndTime=void 0!==e.depositEndTime&&null!==e.depositEndTime?l.Timestamp.fromPartial(e.depositEndTime):void 0,i.totalDeposit=(null===(r=e.totalDeposit)||void 0===r?void 0:r.map((function(e){return d.Coin.fromPartial(e)})))||[],i.votingStartTime=void 0!==e.votingStartTime&&null!==e.votingStartTime?l.Timestamp.fromPartial(e.votingStartTime):void 0,i.votingEndTime=void 0!==e.votingEndTime&&null!==e.votingEndTime?l.Timestamp.fromPartial(e.votingEndTime):void 0,i}};var w={yes:"",abstain:"",no:"",noWithVeto:""};t.TallyResult={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return""!==e.yes&&t.uint32(10).string(e.yes),""!==e.abstain&&t.uint32(18).string(e.abstain),""!==e.no&&t.uint32(26).string(e.no),""!==e.noWithVeto&&t.uint32(34).string(e.noWithVeto),t},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},w);n.pos>>3){case 1:i.yes=n.string();break;case 2:i.abstain=n.string();break;case 3:i.no=n.string();break;case 4:i.noWithVeto=n.string();break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t=Object.assign({},w);return t.yes=void 0!==e.yes&&null!==e.yes?String(e.yes):"",t.abstain=void 0!==e.abstain&&null!==e.abstain?String(e.abstain):"",t.no=void 0!==e.no&&null!==e.no?String(e.no):"",t.noWithVeto=void 0!==e.noWithVeto&&null!==e.noWithVeto?String(e.noWithVeto):"",t},toJSON:function(e){var t={};return void 0!==e.yes&&(t.yes=e.yes),void 0!==e.abstain&&(t.abstain=e.abstain),void 0!==e.no&&(t.no=e.no),void 0!==e.noWithVeto&&(t.noWithVeto=e.noWithVeto),t},fromPartial:function(e){var t,n,r,i,o=Object.assign({},w);return o.yes=null!==(t=e.yes)&&void 0!==t?t:"",o.abstain=null!==(n=e.abstain)&&void 0!==n?n:"",o.no=null!==(r=e.no)&&void 0!==r?r:"",o.noWithVeto=null!==(i=e.noWithVeto)&&void 0!==i?i:"",o}};var _={proposalId:s.default.UZERO,voter:"",option:0};t.Vote={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();e.proposalId.isZero()||n.uint32(8).uint64(e.proposalId),""!==e.voter&&n.uint32(18).string(e.voter),0!==e.option&&n.uint32(24).int32(e.option);var i,o=r(e.options);try{for(o.s();!(i=o.n()).done;){var a=i.value;t.WeightedVoteOption.encode(a,n.uint32(34).fork()).ldelim()}}catch(s){o.e(s)}finally{o.f()}return n},decode:function(e,n){var r=e instanceof u.default.Reader?e:new u.default.Reader(e),i=void 0===n?r.len:r.pos+n,o=Object.assign({},_);for(o.options=[];r.pos>>3){case 1:o.proposalId=r.uint64();break;case 2:o.voter=r.string();break;case 3:o.option=r.int32();break;case 4:o.options.push(t.WeightedVoteOption.decode(r,r.uint32()));break;default:r.skipType(7&a)}}return o},fromJSON:function(e){var n,r=Object.assign({},_);return r.proposalId=void 0!==e.proposalId&&null!==e.proposalId?s.default.fromString(e.proposalId):s.default.UZERO,r.voter=void 0!==e.voter&&null!==e.voter?String(e.voter):"",r.option=void 0!==e.option&&null!==e.option?h(e.option):0,r.options=(null!==(n=e.options)&&void 0!==n?n:[]).map((function(e){return t.WeightedVoteOption.fromJSON(e)})),r},toJSON:function(e){var n={};return void 0!==e.proposalId&&(n.proposalId=(e.proposalId||s.default.UZERO).toString()),void 0!==e.voter&&(n.voter=e.voter),void 0!==e.option&&(n.option=p(e.option)),e.options?n.options=e.options.map((function(e){return e?t.WeightedVoteOption.toJSON(e):void 0})):n.options=[],n},fromPartial:function(e){var n,r,i,o=Object.assign({},_);return o.proposalId=void 0!==e.proposalId&&null!==e.proposalId?s.default.fromValue(e.proposalId):s.default.UZERO,o.voter=null!==(n=e.voter)&&void 0!==n?n:"",o.option=null!==(r=e.option)&&void 0!==r?r:0,o.options=(null===(i=e.options)||void 0===i?void 0:i.map((function(e){return t.WeightedVoteOption.fromPartial(e)})))||[],o}};var E={};t.DepositParams={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create(),i=r(e.minDeposit);try{for(i.s();!(t=i.n()).done;){var o=t.value;d.Coin.encode(o,n.uint32(10).fork()).ldelim()}}catch(a){i.e(a)}finally{i.f()}return void 0!==e.maxDepositPeriod&&f.Duration.encode(e.maxDepositPeriod,n.uint32(18).fork()).ldelim(),n},decode:function(e,t){var n=e instanceof u.default.Reader?e:new u.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},E);for(i.minDeposit=[];n.pos>>3){case 1:i.minDeposit.push(d.Coin.decode(n,n.uint32()));break;case 2:i.maxDepositPeriod=f.Duration.decode(n,n.uint32());break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t,n=Object.assign({},E);return n.minDeposit=(null!==(t=e.minDeposit)&&void 0!==t?t:[]).map((function(e){return d.Coin.fromJSON(e)})),n.maxDepositPeriod=void 0!==e.maxDepositPeriod&&null!==e.maxDepositPeriod?f.Duration.fromJSON(e.maxDepositPeriod):void 0,n},toJSON:function(e){var t={};return e.minDeposit?t.minDeposit=e.minDeposit.map((function(e){return e?d.Coin.toJSON(e):void 0})):t.minDeposit=[],void 0!==e.maxDepositPeriod&&(t.maxDepositPeriod=e.maxDepositPeriod?f.Duration.toJSON(e.maxDepositPeriod):void 0),t},fromPartial:function(e){var t,n=Object.assign({},E);return n.minDeposit=(null===(t=e.minDeposit)||void 0===t?void 0:t.map((function(e){return d.Coin.fromPartial(e)})))||[],n.maxDepositPeriod=void 0!==e.maxDepositPeriod&&null!==e.maxDepositPeriod?f.Duration.fromPartial(e.maxDepositPeriod):void 0,n}};var k={};t.VotingParams={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return void 0!==e.votingPeriod&&f.Duration.encode(e.votingPeriod,t.uint32(10).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},k);n.pos>>3===1)i.votingPeriod=f.Duration.decode(n,n.uint32());else n.skipType(7&o)}return i},fromJSON:function(e){var t=Object.assign({},k);return t.votingPeriod=void 0!==e.votingPeriod&&null!==e.votingPeriod?f.Duration.fromJSON(e.votingPeriod):void 0,t},toJSON:function(e){var t={};return void 0!==e.votingPeriod&&(t.votingPeriod=e.votingPeriod?f.Duration.toJSON(e.votingPeriod):void 0),t},fromPartial:function(e){var t=Object.assign({},k);return t.votingPeriod=void 0!==e.votingPeriod&&null!==e.votingPeriod?f.Duration.fromPartial(e.votingPeriod):void 0,t}};var I={};t.TallyParams={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return 0!==e.quorum.length&&t.uint32(10).bytes(e.quorum),0!==e.threshold.length&&t.uint32(18).bytes(e.threshold),0!==e.vetoThreshold.length&&t.uint32(26).bytes(e.vetoThreshold),t},decode:function(e,t){var n=e instanceof u.default.Reader?e:new u.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},I);for(i.quorum=new Uint8Array,i.threshold=new Uint8Array,i.vetoThreshold=new Uint8Array;n.pos>>3){case 1:i.quorum=n.bytes();break;case 2:i.threshold=n.bytes();break;case 3:i.vetoThreshold=n.bytes();break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t=Object.assign({},I);return t.quorum=void 0!==e.quorum&&null!==e.quorum?x(e.quorum):new Uint8Array,t.threshold=void 0!==e.threshold&&null!==e.threshold?x(e.threshold):new Uint8Array,t.vetoThreshold=void 0!==e.vetoThreshold&&null!==e.vetoThreshold?x(e.vetoThreshold):new Uint8Array,t},toJSON:function(e){var t={};return void 0!==e.quorum&&(t.quorum=O(void 0!==e.quorum?e.quorum:new Uint8Array)),void 0!==e.threshold&&(t.threshold=O(void 0!==e.threshold?e.threshold:new Uint8Array)),void 0!==e.vetoThreshold&&(t.vetoThreshold=O(void 0!==e.vetoThreshold?e.vetoThreshold:new Uint8Array)),t},fromPartial:function(e){var t,n,r,i=Object.assign({},I);return i.quorum=null!==(t=e.quorum)&&void 0!==t?t:new Uint8Array,i.threshold=null!==(n=e.threshold)&&void 0!==n?n:new Uint8Array,i.vetoThreshold=null!==(r=e.vetoThreshold)&&void 0!==r?r:new Uint8Array,i}};var C=function(){if("undefined"!==typeof C)return C;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof e)return e;throw"Unable to locate global object"}(),S=C.atob||function(e){return C.Buffer.from(e,"base64").toString("binary")};function x(e){for(var t=S(e),n=new Uint8Array(t.length),r=0;r1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();0!==e.state&&n.uint32(8).int32(e.state),0!==e.ordering&&n.uint32(16).int32(e.ordering),void 0!==e.counterparty&&t.Counterparty.encode(e.counterparty,n.uint32(26).fork()).ldelim();var i,o=r(e.connectionHops);try{for(o.s();!(i=o.n()).done;){var a=i.value;n.uint32(34).string(a)}}catch(s){o.e(s)}finally{o.f()}return""!==e.version&&n.uint32(42).string(e.version),n},decode:function(e,n){var r=e instanceof u.default.Reader?e:new u.default.Reader(e),i=void 0===n?r.len:r.pos+n,o=Object.assign({},p);for(o.connectionHops=[];r.pos>>3){case 1:o.state=r.int32();break;case 2:o.ordering=r.int32();break;case 3:o.counterparty=t.Counterparty.decode(r,r.uint32());break;case 4:o.connectionHops.push(r.string());break;case 5:o.version=r.string();break;default:r.skipType(7&a)}}return o},fromJSON:function(e){var n,r=Object.assign({},p);return r.state=void 0!==e.state&&null!==e.state?l(e.state):0,r.ordering=void 0!==e.ordering&&null!==e.ordering?d(e.ordering):0,r.counterparty=void 0!==e.counterparty&&null!==e.counterparty?t.Counterparty.fromJSON(e.counterparty):void 0,r.connectionHops=(null!==(n=e.connectionHops)&&void 0!==n?n:[]).map((function(e){return String(e)})),r.version=void 0!==e.version&&null!==e.version?String(e.version):"",r},toJSON:function(e){var n={};return void 0!==e.state&&(n.state=f(e.state)),void 0!==e.ordering&&(n.ordering=h(e.ordering)),void 0!==e.counterparty&&(n.counterparty=e.counterparty?t.Counterparty.toJSON(e.counterparty):void 0),e.connectionHops?n.connectionHops=e.connectionHops.map((function(e){return e})):n.connectionHops=[],void 0!==e.version&&(n.version=e.version),n},fromPartial:function(e){var n,r,i,o,a=Object.assign({},p);return a.state=null!==(n=e.state)&&void 0!==n?n:0,a.ordering=null!==(r=e.ordering)&&void 0!==r?r:0,a.counterparty=void 0!==e.counterparty&&null!==e.counterparty?t.Counterparty.fromPartial(e.counterparty):void 0,a.connectionHops=(null===(i=e.connectionHops)||void 0===i?void 0:i.map((function(e){return e})))||[],a.version=null!==(o=e.version)&&void 0!==o?o:"",a}};var g={state:0,ordering:0,connectionHops:"",version:"",portId:"",channelId:""};t.IdentifiedChannel={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();0!==e.state&&n.uint32(8).int32(e.state),0!==e.ordering&&n.uint32(16).int32(e.ordering),void 0!==e.counterparty&&t.Counterparty.encode(e.counterparty,n.uint32(26).fork()).ldelim();var i,o=r(e.connectionHops);try{for(o.s();!(i=o.n()).done;){var a=i.value;n.uint32(34).string(a)}}catch(s){o.e(s)}finally{o.f()}return""!==e.version&&n.uint32(42).string(e.version),""!==e.portId&&n.uint32(50).string(e.portId),""!==e.channelId&&n.uint32(58).string(e.channelId),n},decode:function(e,n){var r=e instanceof u.default.Reader?e:new u.default.Reader(e),i=void 0===n?r.len:r.pos+n,o=Object.assign({},g);for(o.connectionHops=[];r.pos>>3){case 1:o.state=r.int32();break;case 2:o.ordering=r.int32();break;case 3:o.counterparty=t.Counterparty.decode(r,r.uint32());break;case 4:o.connectionHops.push(r.string());break;case 5:o.version=r.string();break;case 6:o.portId=r.string();break;case 7:o.channelId=r.string();break;default:r.skipType(7&a)}}return o},fromJSON:function(e){var n,r=Object.assign({},g);return r.state=void 0!==e.state&&null!==e.state?l(e.state):0,r.ordering=void 0!==e.ordering&&null!==e.ordering?d(e.ordering):0,r.counterparty=void 0!==e.counterparty&&null!==e.counterparty?t.Counterparty.fromJSON(e.counterparty):void 0,r.connectionHops=(null!==(n=e.connectionHops)&&void 0!==n?n:[]).map((function(e){return String(e)})),r.version=void 0!==e.version&&null!==e.version?String(e.version):"",r.portId=void 0!==e.portId&&null!==e.portId?String(e.portId):"",r.channelId=void 0!==e.channelId&&null!==e.channelId?String(e.channelId):"",r},toJSON:function(e){var n={};return void 0!==e.state&&(n.state=f(e.state)),void 0!==e.ordering&&(n.ordering=h(e.ordering)),void 0!==e.counterparty&&(n.counterparty=e.counterparty?t.Counterparty.toJSON(e.counterparty):void 0),e.connectionHops?n.connectionHops=e.connectionHops.map((function(e){return e})):n.connectionHops=[],void 0!==e.version&&(n.version=e.version),void 0!==e.portId&&(n.portId=e.portId),void 0!==e.channelId&&(n.channelId=e.channelId),n},fromPartial:function(e){var n,r,i,o,a,s,u=Object.assign({},g);return u.state=null!==(n=e.state)&&void 0!==n?n:0,u.ordering=null!==(r=e.ordering)&&void 0!==r?r:0,u.counterparty=void 0!==e.counterparty&&null!==e.counterparty?t.Counterparty.fromPartial(e.counterparty):void 0,u.connectionHops=(null===(i=e.connectionHops)||void 0===i?void 0:i.map((function(e){return e})))||[],u.version=null!==(o=e.version)&&void 0!==o?o:"",u.portId=null!==(a=e.portId)&&void 0!==a?a:"",u.channelId=null!==(s=e.channelId)&&void 0!==s?s:"",u}};var v={portId:"",channelId:""};t.Counterparty={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),t},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},v);n.pos>>3){case 1:i.portId=n.string();break;case 2:i.channelId=n.string();break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t=Object.assign({},v);return t.portId=void 0!==e.portId&&null!==e.portId?String(e.portId):"",t.channelId=void 0!==e.channelId&&null!==e.channelId?String(e.channelId):"",t},toJSON:function(e){var t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),t},fromPartial:function(e){var t,n,r=Object.assign({},v);return r.portId=null!==(t=e.portId)&&void 0!==t?t:"",r.channelId=null!==(n=e.channelId)&&void 0!==n?n:"",r}};var m={sequence:s.default.UZERO,sourcePort:"",sourceChannel:"",destinationPort:"",destinationChannel:"",timeoutTimestamp:s.default.UZERO};t.Packet={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return e.sequence.isZero()||t.uint32(8).uint64(e.sequence),""!==e.sourcePort&&t.uint32(18).string(e.sourcePort),""!==e.sourceChannel&&t.uint32(26).string(e.sourceChannel),""!==e.destinationPort&&t.uint32(34).string(e.destinationPort),""!==e.destinationChannel&&t.uint32(42).string(e.destinationChannel),0!==e.data.length&&t.uint32(50).bytes(e.data),void 0!==e.timeoutHeight&&c.Height.encode(e.timeoutHeight,t.uint32(58).fork()).ldelim(),e.timeoutTimestamp.isZero()||t.uint32(64).uint64(e.timeoutTimestamp),t},decode:function(e,t){var n=e instanceof u.default.Reader?e:new u.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},m);for(i.data=new Uint8Array;n.pos>>3){case 1:i.sequence=n.uint64();break;case 2:i.sourcePort=n.string();break;case 3:i.sourceChannel=n.string();break;case 4:i.destinationPort=n.string();break;case 5:i.destinationChannel=n.string();break;case 6:i.data=n.bytes();break;case 7:i.timeoutHeight=c.Height.decode(n,n.uint32());break;case 8:i.timeoutTimestamp=n.uint64();break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t=Object.assign({},m);return t.sequence=void 0!==e.sequence&&null!==e.sequence?s.default.fromString(e.sequence):s.default.UZERO,t.sourcePort=void 0!==e.sourcePort&&null!==e.sourcePort?String(e.sourcePort):"",t.sourceChannel=void 0!==e.sourceChannel&&null!==e.sourceChannel?String(e.sourceChannel):"",t.destinationPort=void 0!==e.destinationPort&&null!==e.destinationPort?String(e.destinationPort):"",t.destinationChannel=void 0!==e.destinationChannel&&null!==e.destinationChannel?String(e.destinationChannel):"",t.data=void 0!==e.data&&null!==e.data?_(e.data):new Uint8Array,t.timeoutHeight=void 0!==e.timeoutHeight&&null!==e.timeoutHeight?c.Height.fromJSON(e.timeoutHeight):void 0,t.timeoutTimestamp=void 0!==e.timeoutTimestamp&&null!==e.timeoutTimestamp?s.default.fromString(e.timeoutTimestamp):s.default.UZERO,t},toJSON:function(e){var t={};return void 0!==e.sequence&&(t.sequence=(e.sequence||s.default.UZERO).toString()),void 0!==e.sourcePort&&(t.sourcePort=e.sourcePort),void 0!==e.sourceChannel&&(t.sourceChannel=e.sourceChannel),void 0!==e.destinationPort&&(t.destinationPort=e.destinationPort),void 0!==e.destinationChannel&&(t.destinationChannel=e.destinationChannel),void 0!==e.data&&(t.data=k(void 0!==e.data?e.data:new Uint8Array)),void 0!==e.timeoutHeight&&(t.timeoutHeight=e.timeoutHeight?c.Height.toJSON(e.timeoutHeight):void 0),void 0!==e.timeoutTimestamp&&(t.timeoutTimestamp=(e.timeoutTimestamp||s.default.UZERO).toString()),t},fromPartial:function(e){var t,n,r,i,o,a=Object.assign({},m);return a.sequence=void 0!==e.sequence&&null!==e.sequence?s.default.fromValue(e.sequence):s.default.UZERO,a.sourcePort=null!==(t=e.sourcePort)&&void 0!==t?t:"",a.sourceChannel=null!==(n=e.sourceChannel)&&void 0!==n?n:"",a.destinationPort=null!==(r=e.destinationPort)&&void 0!==r?r:"",a.destinationChannel=null!==(i=e.destinationChannel)&&void 0!==i?i:"",a.data=null!==(o=e.data)&&void 0!==o?o:new Uint8Array,a.timeoutHeight=void 0!==e.timeoutHeight&&null!==e.timeoutHeight?c.Height.fromPartial(e.timeoutHeight):void 0,a.timeoutTimestamp=void 0!==e.timeoutTimestamp&&null!==e.timeoutTimestamp?s.default.fromValue(e.timeoutTimestamp):s.default.UZERO,a}};var A={portId:"",channelId:"",sequence:s.default.UZERO};t.PacketState={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return""!==e.portId&&t.uint32(10).string(e.portId),""!==e.channelId&&t.uint32(18).string(e.channelId),e.sequence.isZero()||t.uint32(24).uint64(e.sequence),0!==e.data.length&&t.uint32(34).bytes(e.data),t},decode:function(e,t){var n=e instanceof u.default.Reader?e:new u.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},A);for(i.data=new Uint8Array;n.pos>>3){case 1:i.portId=n.string();break;case 2:i.channelId=n.string();break;case 3:i.sequence=n.uint64();break;case 4:i.data=n.bytes();break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t=Object.assign({},A);return t.portId=void 0!==e.portId&&null!==e.portId?String(e.portId):"",t.channelId=void 0!==e.channelId&&null!==e.channelId?String(e.channelId):"",t.sequence=void 0!==e.sequence&&null!==e.sequence?s.default.fromString(e.sequence):s.default.UZERO,t.data=void 0!==e.data&&null!==e.data?_(e.data):new Uint8Array,t},toJSON:function(e){var t={};return void 0!==e.portId&&(t.portId=e.portId),void 0!==e.channelId&&(t.channelId=e.channelId),void 0!==e.sequence&&(t.sequence=(e.sequence||s.default.UZERO).toString()),void 0!==e.data&&(t.data=k(void 0!==e.data?e.data:new Uint8Array)),t},fromPartial:function(e){var t,n,r,i=Object.assign({},A);return i.portId=null!==(t=e.portId)&&void 0!==t?t:"",i.channelId=null!==(n=e.channelId)&&void 0!==n?n:"",i.sequence=void 0!==e.sequence&&null!==e.sequence?s.default.fromValue(e.sequence):s.default.UZERO,i.data=null!==(r=e.data)&&void 0!==r?r:new Uint8Array,i}};var y={};t.Acknowledgement={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return void 0!==e.result&&t.uint32(170).bytes(e.result),void 0!==e.error&&t.uint32(178).string(e.error),t},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},y);n.pos>>3){case 21:i.result=n.bytes();break;case 22:i.error=n.string();break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t=Object.assign({},y);return t.result=void 0!==e.result&&null!==e.result?_(e.result):void 0,t.error=void 0!==e.error&&null!==e.error?String(e.error):void 0,t},toJSON:function(e){var t={};return void 0!==e.result&&(t.result=void 0!==e.result?k(e.result):void 0),void 0!==e.error&&(t.error=e.error),t},fromPartial:function(e){var t,n,r=Object.assign({},y);return r.result=null!==(t=e.result)&&void 0!==t?t:void 0,r.error=null!==(n=e.error)&&void 0!==n?n:void 0,r}};var b=function(){if("undefined"!==typeof b)return b;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof e)return e;throw"Unable to locate global object"}(),w=b.atob||function(e){return b.Buffer.from(e,"base64").toString("binary")};function _(e){for(var t=w(e),n=new Uint8Array(t.length),r=0;r1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return 0!==e.total&&t.uint32(8).uint32(e.total),0!==e.hash.length&&t.uint32(18).bytes(e.hash),t},decode:function(e,t){var n=e instanceof u.default.Reader?e:new u.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},m);for(i.hash=new Uint8Array;n.pos>>3){case 1:i.total=n.uint32();break;case 2:i.hash=n.bytes();break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t=Object.assign({},m);return t.total=void 0!==e.total&&null!==e.total?Number(e.total):0,t.hash=void 0!==e.hash&&null!==e.hash?P(e.hash):new Uint8Array,t},toJSON:function(e){var t={};return void 0!==e.total&&(t.total=e.total),void 0!==e.hash&&(t.hash=N(void 0!==e.hash?e.hash:new Uint8Array)),t},fromPartial:function(e){var t,n,r=Object.assign({},m);return r.total=null!==(t=e.total)&&void 0!==t?t:0,r.hash=null!==(n=e.hash)&&void 0!==n?n:new Uint8Array,r}};var A={index:0};t.Part={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return 0!==e.index&&t.uint32(8).uint32(e.index),0!==e.bytes.length&&t.uint32(18).bytes(e.bytes),void 0!==e.proof&&c.Proof.encode(e.proof,t.uint32(26).fork()).ldelim(),t},decode:function(e,t){var n=e instanceof u.default.Reader?e:new u.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},A);for(i.bytes=new Uint8Array;n.pos>>3){case 1:i.index=n.uint32();break;case 2:i.bytes=n.bytes();break;case 3:i.proof=c.Proof.decode(n,n.uint32());break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t=Object.assign({},A);return t.index=void 0!==e.index&&null!==e.index?Number(e.index):0,t.bytes=void 0!==e.bytes&&null!==e.bytes?P(e.bytes):new Uint8Array,t.proof=void 0!==e.proof&&null!==e.proof?c.Proof.fromJSON(e.proof):void 0,t},toJSON:function(e){var t={};return void 0!==e.index&&(t.index=e.index),void 0!==e.bytes&&(t.bytes=N(void 0!==e.bytes?e.bytes:new Uint8Array)),void 0!==e.proof&&(t.proof=e.proof?c.Proof.toJSON(e.proof):void 0),t},fromPartial:function(e){var t,n,r=Object.assign({},A);return r.index=null!==(t=e.index)&&void 0!==t?t:0,r.bytes=null!==(n=e.bytes)&&void 0!==n?n:new Uint8Array,r.proof=void 0!==e.proof&&null!==e.proof?c.Proof.fromPartial(e.proof):void 0,r}};var y={};t.BlockID={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return 0!==e.hash.length&&n.uint32(10).bytes(e.hash),void 0!==e.partSetHeader&&t.PartSetHeader.encode(e.partSetHeader,n.uint32(18).fork()).ldelim(),n},decode:function(e,n){var r=e instanceof u.default.Reader?e:new u.default.Reader(e),i=void 0===n?r.len:r.pos+n,o=Object.assign({},y);for(o.hash=new Uint8Array;r.pos>>3){case 1:o.hash=r.bytes();break;case 2:o.partSetHeader=t.PartSetHeader.decode(r,r.uint32());break;default:r.skipType(7&a)}}return o},fromJSON:function(e){var n=Object.assign({},y);return n.hash=void 0!==e.hash&&null!==e.hash?P(e.hash):new Uint8Array,n.partSetHeader=void 0!==e.partSetHeader&&null!==e.partSetHeader?t.PartSetHeader.fromJSON(e.partSetHeader):void 0,n},toJSON:function(e){var n={};return void 0!==e.hash&&(n.hash=N(void 0!==e.hash?e.hash:new Uint8Array)),void 0!==e.partSetHeader&&(n.partSetHeader=e.partSetHeader?t.PartSetHeader.toJSON(e.partSetHeader):void 0),n},fromPartial:function(e){var n,r=Object.assign({},y);return r.hash=null!==(n=e.hash)&&void 0!==n?n:new Uint8Array,r.partSetHeader=void 0!==e.partSetHeader&&null!==e.partSetHeader?t.PartSetHeader.fromPartial(e.partSetHeader):void 0,r}};var b={chainId:"",height:s.default.ZERO};t.Header={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return void 0!==e.version&&l.Consensus.encode(e.version,n.uint32(10).fork()).ldelim(),""!==e.chainId&&n.uint32(18).string(e.chainId),e.height.isZero()||n.uint32(24).int64(e.height),void 0!==e.time&&f.Timestamp.encode(e.time,n.uint32(34).fork()).ldelim(),void 0!==e.lastBlockId&&t.BlockID.encode(e.lastBlockId,n.uint32(42).fork()).ldelim(),0!==e.lastCommitHash.length&&n.uint32(50).bytes(e.lastCommitHash),0!==e.dataHash.length&&n.uint32(58).bytes(e.dataHash),0!==e.validatorsHash.length&&n.uint32(66).bytes(e.validatorsHash),0!==e.nextValidatorsHash.length&&n.uint32(74).bytes(e.nextValidatorsHash),0!==e.consensusHash.length&&n.uint32(82).bytes(e.consensusHash),0!==e.appHash.length&&n.uint32(90).bytes(e.appHash),0!==e.lastResultsHash.length&&n.uint32(98).bytes(e.lastResultsHash),0!==e.evidenceHash.length&&n.uint32(106).bytes(e.evidenceHash),0!==e.proposerAddress.length&&n.uint32(114).bytes(e.proposerAddress),n},decode:function(e,n){var r=e instanceof u.default.Reader?e:new u.default.Reader(e),i=void 0===n?r.len:r.pos+n,o=Object.assign({},b);for(o.lastCommitHash=new Uint8Array,o.dataHash=new Uint8Array,o.validatorsHash=new Uint8Array,o.nextValidatorsHash=new Uint8Array,o.consensusHash=new Uint8Array,o.appHash=new Uint8Array,o.lastResultsHash=new Uint8Array,o.evidenceHash=new Uint8Array,o.proposerAddress=new Uint8Array;r.pos>>3){case 1:o.version=l.Consensus.decode(r,r.uint32());break;case 2:o.chainId=r.string();break;case 3:o.height=r.int64();break;case 4:o.time=f.Timestamp.decode(r,r.uint32());break;case 5:o.lastBlockId=t.BlockID.decode(r,r.uint32());break;case 6:o.lastCommitHash=r.bytes();break;case 7:o.dataHash=r.bytes();break;case 8:o.validatorsHash=r.bytes();break;case 9:o.nextValidatorsHash=r.bytes();break;case 10:o.consensusHash=r.bytes();break;case 11:o.appHash=r.bytes();break;case 12:o.lastResultsHash=r.bytes();break;case 13:o.evidenceHash=r.bytes();break;case 14:o.proposerAddress=r.bytes();break;default:r.skipType(7&a)}}return o},fromJSON:function(e){var n=Object.assign({},b);return n.version=void 0!==e.version&&null!==e.version?l.Consensus.fromJSON(e.version):void 0,n.chainId=void 0!==e.chainId&&null!==e.chainId?String(e.chainId):"",n.height=void 0!==e.height&&null!==e.height?s.default.fromString(e.height):s.default.ZERO,n.time=void 0!==e.time&&null!==e.time?D(e.time):void 0,n.lastBlockId=void 0!==e.lastBlockId&&null!==e.lastBlockId?t.BlockID.fromJSON(e.lastBlockId):void 0,n.lastCommitHash=void 0!==e.lastCommitHash&&null!==e.lastCommitHash?P(e.lastCommitHash):new Uint8Array,n.dataHash=void 0!==e.dataHash&&null!==e.dataHash?P(e.dataHash):new Uint8Array,n.validatorsHash=void 0!==e.validatorsHash&&null!==e.validatorsHash?P(e.validatorsHash):new Uint8Array,n.nextValidatorsHash=void 0!==e.nextValidatorsHash&&null!==e.nextValidatorsHash?P(e.nextValidatorsHash):new Uint8Array,n.consensusHash=void 0!==e.consensusHash&&null!==e.consensusHash?P(e.consensusHash):new Uint8Array,n.appHash=void 0!==e.appHash&&null!==e.appHash?P(e.appHash):new Uint8Array,n.lastResultsHash=void 0!==e.lastResultsHash&&null!==e.lastResultsHash?P(e.lastResultsHash):new Uint8Array,n.evidenceHash=void 0!==e.evidenceHash&&null!==e.evidenceHash?P(e.evidenceHash):new Uint8Array,n.proposerAddress=void 0!==e.proposerAddress&&null!==e.proposerAddress?P(e.proposerAddress):new Uint8Array,n},toJSON:function(e){var n={};return void 0!==e.version&&(n.version=e.version?l.Consensus.toJSON(e.version):void 0),void 0!==e.chainId&&(n.chainId=e.chainId),void 0!==e.height&&(n.height=(e.height||s.default.ZERO).toString()),void 0!==e.time&&(n.time=Q(e.time).toISOString()),void 0!==e.lastBlockId&&(n.lastBlockId=e.lastBlockId?t.BlockID.toJSON(e.lastBlockId):void 0),void 0!==e.lastCommitHash&&(n.lastCommitHash=N(void 0!==e.lastCommitHash?e.lastCommitHash:new Uint8Array)),void 0!==e.dataHash&&(n.dataHash=N(void 0!==e.dataHash?e.dataHash:new Uint8Array)),void 0!==e.validatorsHash&&(n.validatorsHash=N(void 0!==e.validatorsHash?e.validatorsHash:new Uint8Array)),void 0!==e.nextValidatorsHash&&(n.nextValidatorsHash=N(void 0!==e.nextValidatorsHash?e.nextValidatorsHash:new Uint8Array)),void 0!==e.consensusHash&&(n.consensusHash=N(void 0!==e.consensusHash?e.consensusHash:new Uint8Array)),void 0!==e.appHash&&(n.appHash=N(void 0!==e.appHash?e.appHash:new Uint8Array)),void 0!==e.lastResultsHash&&(n.lastResultsHash=N(void 0!==e.lastResultsHash?e.lastResultsHash:new Uint8Array)),void 0!==e.evidenceHash&&(n.evidenceHash=N(void 0!==e.evidenceHash?e.evidenceHash:new Uint8Array)),void 0!==e.proposerAddress&&(n.proposerAddress=N(void 0!==e.proposerAddress?e.proposerAddress:new Uint8Array)),n},fromPartial:function(e){var n,r,i,o,a,u,c,d,h,p,g=Object.assign({},b);return g.version=void 0!==e.version&&null!==e.version?l.Consensus.fromPartial(e.version):void 0,g.chainId=null!==(n=e.chainId)&&void 0!==n?n:"",g.height=void 0!==e.height&&null!==e.height?s.default.fromValue(e.height):s.default.ZERO,g.time=void 0!==e.time&&null!==e.time?f.Timestamp.fromPartial(e.time):void 0,g.lastBlockId=void 0!==e.lastBlockId&&null!==e.lastBlockId?t.BlockID.fromPartial(e.lastBlockId):void 0,g.lastCommitHash=null!==(r=e.lastCommitHash)&&void 0!==r?r:new Uint8Array,g.dataHash=null!==(i=e.dataHash)&&void 0!==i?i:new Uint8Array,g.validatorsHash=null!==(o=e.validatorsHash)&&void 0!==o?o:new Uint8Array,g.nextValidatorsHash=null!==(a=e.nextValidatorsHash)&&void 0!==a?a:new Uint8Array,g.consensusHash=null!==(u=e.consensusHash)&&void 0!==u?u:new Uint8Array,g.appHash=null!==(c=e.appHash)&&void 0!==c?c:new Uint8Array,g.lastResultsHash=null!==(d=e.lastResultsHash)&&void 0!==d?d:new Uint8Array,g.evidenceHash=null!==(h=e.evidenceHash)&&void 0!==h?h:new Uint8Array,g.proposerAddress=null!==(p=e.proposerAddress)&&void 0!==p?p:new Uint8Array,g}};var w={};t.Data={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create(),i=r(e.txs);try{for(i.s();!(t=i.n()).done;){var o=t.value;n.uint32(10).bytes(o)}}catch(a){i.e(a)}finally{i.f()}return n},decode:function(e,t){var n=e instanceof u.default.Reader?e:new u.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},w);for(i.txs=[];n.pos>>3===1)i.txs.push(n.bytes());else n.skipType(7&o)}return i},fromJSON:function(e){var t,n=Object.assign({},w);return n.txs=(null!==(t=e.txs)&&void 0!==t?t:[]).map((function(e){return P(e)})),n},toJSON:function(e){var t={};return e.txs?t.txs=e.txs.map((function(e){return N(void 0!==e?e:new Uint8Array)})):t.txs=[],t},fromPartial:function(e){var t,n=Object.assign({},w);return n.txs=(null===(t=e.txs)||void 0===t?void 0:t.map((function(e){return e})))||[],n}};var _={type:0,height:s.default.ZERO,round:0,validatorIndex:0};t.Vote={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return 0!==e.type&&n.uint32(8).int32(e.type),e.height.isZero()||n.uint32(16).int64(e.height),0!==e.round&&n.uint32(24).int32(e.round),void 0!==e.blockId&&t.BlockID.encode(e.blockId,n.uint32(34).fork()).ldelim(),void 0!==e.timestamp&&f.Timestamp.encode(e.timestamp,n.uint32(42).fork()).ldelim(),0!==e.validatorAddress.length&&n.uint32(50).bytes(e.validatorAddress),0!==e.validatorIndex&&n.uint32(56).int32(e.validatorIndex),0!==e.signature.length&&n.uint32(66).bytes(e.signature),n},decode:function(e,n){var r=e instanceof u.default.Reader?e:new u.default.Reader(e),i=void 0===n?r.len:r.pos+n,o=Object.assign({},_);for(o.validatorAddress=new Uint8Array,o.signature=new Uint8Array;r.pos>>3){case 1:o.type=r.int32();break;case 2:o.height=r.int64();break;case 3:o.round=r.int32();break;case 4:o.blockId=t.BlockID.decode(r,r.uint32());break;case 5:o.timestamp=f.Timestamp.decode(r,r.uint32());break;case 6:o.validatorAddress=r.bytes();break;case 7:o.validatorIndex=r.int32();break;case 8:o.signature=r.bytes();break;default:r.skipType(7&a)}}return o},fromJSON:function(e){var n=Object.assign({},_);return n.type=void 0!==e.type&&null!==e.type?g(e.type):0,n.height=void 0!==e.height&&null!==e.height?s.default.fromString(e.height):s.default.ZERO,n.round=void 0!==e.round&&null!==e.round?Number(e.round):0,n.blockId=void 0!==e.blockId&&null!==e.blockId?t.BlockID.fromJSON(e.blockId):void 0,n.timestamp=void 0!==e.timestamp&&null!==e.timestamp?D(e.timestamp):void 0,n.validatorAddress=void 0!==e.validatorAddress&&null!==e.validatorAddress?P(e.validatorAddress):new Uint8Array,n.validatorIndex=void 0!==e.validatorIndex&&null!==e.validatorIndex?Number(e.validatorIndex):0,n.signature=void 0!==e.signature&&null!==e.signature?P(e.signature):new Uint8Array,n},toJSON:function(e){var n={};return void 0!==e.type&&(n.type=v(e.type)),void 0!==e.height&&(n.height=(e.height||s.default.ZERO).toString()),void 0!==e.round&&(n.round=e.round),void 0!==e.blockId&&(n.blockId=e.blockId?t.BlockID.toJSON(e.blockId):void 0),void 0!==e.timestamp&&(n.timestamp=Q(e.timestamp).toISOString()),void 0!==e.validatorAddress&&(n.validatorAddress=N(void 0!==e.validatorAddress?e.validatorAddress:new Uint8Array)),void 0!==e.validatorIndex&&(n.validatorIndex=e.validatorIndex),void 0!==e.signature&&(n.signature=N(void 0!==e.signature?e.signature:new Uint8Array)),n},fromPartial:function(e){var n,r,i,o,a,u=Object.assign({},_);return u.type=null!==(n=e.type)&&void 0!==n?n:0,u.height=void 0!==e.height&&null!==e.height?s.default.fromValue(e.height):s.default.ZERO,u.round=null!==(r=e.round)&&void 0!==r?r:0,u.blockId=void 0!==e.blockId&&null!==e.blockId?t.BlockID.fromPartial(e.blockId):void 0,u.timestamp=void 0!==e.timestamp&&null!==e.timestamp?f.Timestamp.fromPartial(e.timestamp):void 0,u.validatorAddress=null!==(i=e.validatorAddress)&&void 0!==i?i:new Uint8Array,u.validatorIndex=null!==(o=e.validatorIndex)&&void 0!==o?o:0,u.signature=null!==(a=e.signature)&&void 0!==a?a:new Uint8Array,u}};var E={height:s.default.ZERO,round:0};t.Commit={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();e.height.isZero()||n.uint32(8).int64(e.height),0!==e.round&&n.uint32(16).int32(e.round),void 0!==e.blockId&&t.BlockID.encode(e.blockId,n.uint32(26).fork()).ldelim();var i,o=r(e.signatures);try{for(o.s();!(i=o.n()).done;){var a=i.value;t.CommitSig.encode(a,n.uint32(34).fork()).ldelim()}}catch(s){o.e(s)}finally{o.f()}return n},decode:function(e,n){var r=e instanceof u.default.Reader?e:new u.default.Reader(e),i=void 0===n?r.len:r.pos+n,o=Object.assign({},E);for(o.signatures=[];r.pos>>3){case 1:o.height=r.int64();break;case 2:o.round=r.int32();break;case 3:o.blockId=t.BlockID.decode(r,r.uint32());break;case 4:o.signatures.push(t.CommitSig.decode(r,r.uint32()));break;default:r.skipType(7&a)}}return o},fromJSON:function(e){var n,r=Object.assign({},E);return r.height=void 0!==e.height&&null!==e.height?s.default.fromString(e.height):s.default.ZERO,r.round=void 0!==e.round&&null!==e.round?Number(e.round):0,r.blockId=void 0!==e.blockId&&null!==e.blockId?t.BlockID.fromJSON(e.blockId):void 0,r.signatures=(null!==(n=e.signatures)&&void 0!==n?n:[]).map((function(e){return t.CommitSig.fromJSON(e)})),r},toJSON:function(e){var n={};return void 0!==e.height&&(n.height=(e.height||s.default.ZERO).toString()),void 0!==e.round&&(n.round=e.round),void 0!==e.blockId&&(n.blockId=e.blockId?t.BlockID.toJSON(e.blockId):void 0),e.signatures?n.signatures=e.signatures.map((function(e){return e?t.CommitSig.toJSON(e):void 0})):n.signatures=[],n},fromPartial:function(e){var n,r,i=Object.assign({},E);return i.height=void 0!==e.height&&null!==e.height?s.default.fromValue(e.height):s.default.ZERO,i.round=null!==(n=e.round)&&void 0!==n?n:0,i.blockId=void 0!==e.blockId&&null!==e.blockId?t.BlockID.fromPartial(e.blockId):void 0,i.signatures=(null===(r=e.signatures)||void 0===r?void 0:r.map((function(e){return t.CommitSig.fromPartial(e)})))||[],i}};var k={blockIdFlag:0};t.CommitSig={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return 0!==e.blockIdFlag&&t.uint32(8).int32(e.blockIdFlag),0!==e.validatorAddress.length&&t.uint32(18).bytes(e.validatorAddress),void 0!==e.timestamp&&f.Timestamp.encode(e.timestamp,t.uint32(26).fork()).ldelim(),0!==e.signature.length&&t.uint32(34).bytes(e.signature),t},decode:function(e,t){var n=e instanceof u.default.Reader?e:new u.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},k);for(i.validatorAddress=new Uint8Array,i.signature=new Uint8Array;n.pos>>3){case 1:i.blockIdFlag=n.int32();break;case 2:i.validatorAddress=n.bytes();break;case 3:i.timestamp=f.Timestamp.decode(n,n.uint32());break;case 4:i.signature=n.bytes();break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t=Object.assign({},k);return t.blockIdFlag=void 0!==e.blockIdFlag&&null!==e.blockIdFlag?h(e.blockIdFlag):0,t.validatorAddress=void 0!==e.validatorAddress&&null!==e.validatorAddress?P(e.validatorAddress):new Uint8Array,t.timestamp=void 0!==e.timestamp&&null!==e.timestamp?D(e.timestamp):void 0,t.signature=void 0!==e.signature&&null!==e.signature?P(e.signature):new Uint8Array,t},toJSON:function(e){var t={};return void 0!==e.blockIdFlag&&(t.blockIdFlag=p(e.blockIdFlag)),void 0!==e.validatorAddress&&(t.validatorAddress=N(void 0!==e.validatorAddress?e.validatorAddress:new Uint8Array)),void 0!==e.timestamp&&(t.timestamp=Q(e.timestamp).toISOString()),void 0!==e.signature&&(t.signature=N(void 0!==e.signature?e.signature:new Uint8Array)),t},fromPartial:function(e){var t,n,r,i=Object.assign({},k);return i.blockIdFlag=null!==(t=e.blockIdFlag)&&void 0!==t?t:0,i.validatorAddress=null!==(n=e.validatorAddress)&&void 0!==n?n:new Uint8Array,i.timestamp=void 0!==e.timestamp&&null!==e.timestamp?f.Timestamp.fromPartial(e.timestamp):void 0,i.signature=null!==(r=e.signature)&&void 0!==r?r:new Uint8Array,i}};var I={type:0,height:s.default.ZERO,round:0,polRound:0};t.Proposal={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return 0!==e.type&&n.uint32(8).int32(e.type),e.height.isZero()||n.uint32(16).int64(e.height),0!==e.round&&n.uint32(24).int32(e.round),0!==e.polRound&&n.uint32(32).int32(e.polRound),void 0!==e.blockId&&t.BlockID.encode(e.blockId,n.uint32(42).fork()).ldelim(),void 0!==e.timestamp&&f.Timestamp.encode(e.timestamp,n.uint32(50).fork()).ldelim(),0!==e.signature.length&&n.uint32(58).bytes(e.signature),n},decode:function(e,n){var r=e instanceof u.default.Reader?e:new u.default.Reader(e),i=void 0===n?r.len:r.pos+n,o=Object.assign({},I);for(o.signature=new Uint8Array;r.pos>>3){case 1:o.type=r.int32();break;case 2:o.height=r.int64();break;case 3:o.round=r.int32();break;case 4:o.polRound=r.int32();break;case 5:o.blockId=t.BlockID.decode(r,r.uint32());break;case 6:o.timestamp=f.Timestamp.decode(r,r.uint32());break;case 7:o.signature=r.bytes();break;default:r.skipType(7&a)}}return o},fromJSON:function(e){var n=Object.assign({},I);return n.type=void 0!==e.type&&null!==e.type?g(e.type):0,n.height=void 0!==e.height&&null!==e.height?s.default.fromString(e.height):s.default.ZERO,n.round=void 0!==e.round&&null!==e.round?Number(e.round):0,n.polRound=void 0!==e.polRound&&null!==e.polRound?Number(e.polRound):0,n.blockId=void 0!==e.blockId&&null!==e.blockId?t.BlockID.fromJSON(e.blockId):void 0,n.timestamp=void 0!==e.timestamp&&null!==e.timestamp?D(e.timestamp):void 0,n.signature=void 0!==e.signature&&null!==e.signature?P(e.signature):new Uint8Array,n},toJSON:function(e){var n={};return void 0!==e.type&&(n.type=v(e.type)),void 0!==e.height&&(n.height=(e.height||s.default.ZERO).toString()),void 0!==e.round&&(n.round=e.round),void 0!==e.polRound&&(n.polRound=e.polRound),void 0!==e.blockId&&(n.blockId=e.blockId?t.BlockID.toJSON(e.blockId):void 0),void 0!==e.timestamp&&(n.timestamp=Q(e.timestamp).toISOString()),void 0!==e.signature&&(n.signature=N(void 0!==e.signature?e.signature:new Uint8Array)),n},fromPartial:function(e){var n,r,i,o,a=Object.assign({},I);return a.type=null!==(n=e.type)&&void 0!==n?n:0,a.height=void 0!==e.height&&null!==e.height?s.default.fromValue(e.height):s.default.ZERO,a.round=null!==(r=e.round)&&void 0!==r?r:0,a.polRound=null!==(i=e.polRound)&&void 0!==i?i:0,a.blockId=void 0!==e.blockId&&null!==e.blockId?t.BlockID.fromPartial(e.blockId):void 0,a.timestamp=void 0!==e.timestamp&&null!==e.timestamp?f.Timestamp.fromPartial(e.timestamp):void 0,a.signature=null!==(o=e.signature)&&void 0!==o?o:new Uint8Array,a}};var C={};t.SignedHeader={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return void 0!==e.header&&t.Header.encode(e.header,n.uint32(10).fork()).ldelim(),void 0!==e.commit&&t.Commit.encode(e.commit,n.uint32(18).fork()).ldelim(),n},decode:function(e,n){for(var r=e instanceof u.default.Reader?e:new u.default.Reader(e),i=void 0===n?r.len:r.pos+n,o=Object.assign({},C);r.pos>>3){case 1:o.header=t.Header.decode(r,r.uint32());break;case 2:o.commit=t.Commit.decode(r,r.uint32());break;default:r.skipType(7&a)}}return o},fromJSON:function(e){var n=Object.assign({},C);return n.header=void 0!==e.header&&null!==e.header?t.Header.fromJSON(e.header):void 0,n.commit=void 0!==e.commit&&null!==e.commit?t.Commit.fromJSON(e.commit):void 0,n},toJSON:function(e){var n={};return void 0!==e.header&&(n.header=e.header?t.Header.toJSON(e.header):void 0),void 0!==e.commit&&(n.commit=e.commit?t.Commit.toJSON(e.commit):void 0),n},fromPartial:function(e){var n=Object.assign({},C);return n.header=void 0!==e.header&&null!==e.header?t.Header.fromPartial(e.header):void 0,n.commit=void 0!==e.commit&&null!==e.commit?t.Commit.fromPartial(e.commit):void 0,n}};var S={};t.LightBlock={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return void 0!==e.signedHeader&&t.SignedHeader.encode(e.signedHeader,n.uint32(10).fork()).ldelim(),void 0!==e.validatorSet&&d.ValidatorSet.encode(e.validatorSet,n.uint32(18).fork()).ldelim(),n},decode:function(e,n){for(var r=e instanceof u.default.Reader?e:new u.default.Reader(e),i=void 0===n?r.len:r.pos+n,o=Object.assign({},S);r.pos>>3){case 1:o.signedHeader=t.SignedHeader.decode(r,r.uint32());break;case 2:o.validatorSet=d.ValidatorSet.decode(r,r.uint32());break;default:r.skipType(7&a)}}return o},fromJSON:function(e){var n=Object.assign({},S);return n.signedHeader=void 0!==e.signedHeader&&null!==e.signedHeader?t.SignedHeader.fromJSON(e.signedHeader):void 0,n.validatorSet=void 0!==e.validatorSet&&null!==e.validatorSet?d.ValidatorSet.fromJSON(e.validatorSet):void 0,n},toJSON:function(e){var n={};return void 0!==e.signedHeader&&(n.signedHeader=e.signedHeader?t.SignedHeader.toJSON(e.signedHeader):void 0),void 0!==e.validatorSet&&(n.validatorSet=e.validatorSet?d.ValidatorSet.toJSON(e.validatorSet):void 0),n},fromPartial:function(e){var n=Object.assign({},S);return n.signedHeader=void 0!==e.signedHeader&&null!==e.signedHeader?t.SignedHeader.fromPartial(e.signedHeader):void 0,n.validatorSet=void 0!==e.validatorSet&&null!==e.validatorSet?d.ValidatorSet.fromPartial(e.validatorSet):void 0,n}};var x={blockSize:s.default.ZERO,numTxs:s.default.ZERO};t.BlockMeta={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return void 0!==e.blockId&&t.BlockID.encode(e.blockId,n.uint32(10).fork()).ldelim(),e.blockSize.isZero()||n.uint32(16).int64(e.blockSize),void 0!==e.header&&t.Header.encode(e.header,n.uint32(26).fork()).ldelim(),e.numTxs.isZero()||n.uint32(32).int64(e.numTxs),n},decode:function(e,n){for(var r=e instanceof u.default.Reader?e:new u.default.Reader(e),i=void 0===n?r.len:r.pos+n,o=Object.assign({},x);r.pos>>3){case 1:o.blockId=t.BlockID.decode(r,r.uint32());break;case 2:o.blockSize=r.int64();break;case 3:o.header=t.Header.decode(r,r.uint32());break;case 4:o.numTxs=r.int64();break;default:r.skipType(7&a)}}return o},fromJSON:function(e){var n=Object.assign({},x);return n.blockId=void 0!==e.blockId&&null!==e.blockId?t.BlockID.fromJSON(e.blockId):void 0,n.blockSize=void 0!==e.blockSize&&null!==e.blockSize?s.default.fromString(e.blockSize):s.default.ZERO,n.header=void 0!==e.header&&null!==e.header?t.Header.fromJSON(e.header):void 0,n.numTxs=void 0!==e.numTxs&&null!==e.numTxs?s.default.fromString(e.numTxs):s.default.ZERO,n},toJSON:function(e){var n={};return void 0!==e.blockId&&(n.blockId=e.blockId?t.BlockID.toJSON(e.blockId):void 0),void 0!==e.blockSize&&(n.blockSize=(e.blockSize||s.default.ZERO).toString()),void 0!==e.header&&(n.header=e.header?t.Header.toJSON(e.header):void 0),void 0!==e.numTxs&&(n.numTxs=(e.numTxs||s.default.ZERO).toString()),n},fromPartial:function(e){var n=Object.assign({},x);return n.blockId=void 0!==e.blockId&&null!==e.blockId?t.BlockID.fromPartial(e.blockId):void 0,n.blockSize=void 0!==e.blockSize&&null!==e.blockSize?s.default.fromValue(e.blockSize):s.default.ZERO,n.header=void 0!==e.header&&null!==e.header?t.Header.fromPartial(e.header):void 0,n.numTxs=void 0!==e.numTxs&&null!==e.numTxs?s.default.fromValue(e.numTxs):s.default.ZERO,n}};var B={};t.TxProof={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return 0!==e.rootHash.length&&t.uint32(10).bytes(e.rootHash),0!==e.data.length&&t.uint32(18).bytes(e.data),void 0!==e.proof&&c.Proof.encode(e.proof,t.uint32(26).fork()).ldelim(),t},decode:function(e,t){var n=e instanceof u.default.Reader?e:new u.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},B);for(i.rootHash=new Uint8Array,i.data=new Uint8Array;n.pos>>3){case 1:i.rootHash=n.bytes();break;case 2:i.data=n.bytes();break;case 3:i.proof=c.Proof.decode(n,n.uint32());break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t=Object.assign({},B);return t.rootHash=void 0!==e.rootHash&&null!==e.rootHash?P(e.rootHash):new Uint8Array,t.data=void 0!==e.data&&null!==e.data?P(e.data):new Uint8Array,t.proof=void 0!==e.proof&&null!==e.proof?c.Proof.fromJSON(e.proof):void 0,t},toJSON:function(e){var t={};return void 0!==e.rootHash&&(t.rootHash=N(void 0!==e.rootHash?e.rootHash:new Uint8Array)),void 0!==e.data&&(t.data=N(void 0!==e.data?e.data:new Uint8Array)),void 0!==e.proof&&(t.proof=e.proof?c.Proof.toJSON(e.proof):void 0),t},fromPartial:function(e){var t,n,r=Object.assign({},B);return r.rootHash=null!==(t=e.rootHash)&&void 0!==t?t:new Uint8Array,r.data=null!==(n=e.data)&&void 0!==n?n:new Uint8Array,r.proof=void 0!==e.proof&&null!==e.proof?c.Proof.fromPartial(e.proof):void 0,r}};var O=function(){if("undefined"!==typeof O)return O;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof e)return e;throw"Unable to locate global object"}(),M=O.atob||function(e){return O.Buffer.from(e,"base64").toString("binary")};function P(e){for(var t=M(e),n=new Uint8Array(t.length),r=0;r=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){u.headers[e]=r.merge(a)})),e.exports=u}).call(this,n(35))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasProtocol=t.instanceOfRpcStreamingClient=void 0,t.instanceOfRpcStreamingClient=function(e){return"function"===typeof e.listen},t.hasProtocol=function(e){return-1!==e.search("://")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Tendermint34Client=t.VoteType=t.broadcastTxSyncSuccess=t.broadcastTxCommitSuccess=t.SubscriptionEventType=t.Method=void 0;var r=n(290);Object.defineProperty(t,"Method",{enumerable:!0,get:function(){return r.Method}}),Object.defineProperty(t,"SubscriptionEventType",{enumerable:!0,get:function(){return r.SubscriptionEventType}});var i=n(1092);Object.defineProperty(t,"broadcastTxCommitSuccess",{enumerable:!0,get:function(){return i.broadcastTxCommitSuccess}}),Object.defineProperty(t,"broadcastTxSyncSuccess",{enumerable:!0,get:function(){return i.broadcastTxSyncSuccess}}),Object.defineProperty(t,"VoteType",{enumerable:!0,get:function(){return i.VoteType}});var o=n(1093);Object.defineProperty(t,"Tendermint34Client",{enumerable:!0,get:function(){return o.Tendermint34Client}})},function(e,t,n){"use strict";var r=n(44).default;Object.defineProperty(t,"__esModule",{value:!0}),t.buildQuery=t.SubscriptionEventType=t.Method=void 0,function(e){e.AbciInfo="abci_info",e.AbciQuery="abci_query",e.Block="block",e.Blockchain="blockchain",e.BlockResults="block_results",e.BlockSearch="block_search",e.BroadcastTxAsync="broadcast_tx_async",e.BroadcastTxSync="broadcast_tx_sync",e.BroadcastTxCommit="broadcast_tx_commit",e.Commit="commit",e.Genesis="genesis",e.Health="health",e.NumUnconfirmedTxs="num_unconfirmed_txs",e.Status="status",e.Subscribe="subscribe",e.Tx="tx",e.TxSearch="tx_search",e.Validators="validators",e.Unsubscribe="unsubscribe"}(t.Method||(t.Method={})),function(e){e.NewBlock="NewBlock",e.NewBlockHeader="NewBlockHeader",e.Tx="Tx"}(t.SubscriptionEventType||(t.SubscriptionEventType={})),t.buildQuery=function(e){var t=(e.tags?e.tags:[]).map((function(e){return"".concat(e.key,"='").concat(e.value,"'")})),n=e.raw?[e.raw]:[];return[].concat(r(t),n).join(" AND ")}},function(e,t,n){"use strict";var r=n(44).default,i=n(9).default,o=n(10).default;Object.defineProperty(t,"__esModule",{value:!0}),t.encodeBlockId=t.encodeVersion=t.encodeBytes=t.encodeTime=t.encodeInt=t.encodeString=t.Integer=t.dictionaryToStringMap=t.may=t.optional=t.assertNotEmpty=t.assertObject=t.assertArray=t.assertNumber=t.assertString=t.assertBoolean=t.assertSet=void 0;var a=n(41),s=n(70);function u(e){if(void 0===e)throw new Error("Value must not be undefined");if(null===e)throw new Error("Value must not be null");return e}t.assertSet=u,t.assertBoolean=function(e){if(u(e),"boolean"!==typeof e)throw new Error("Value must be a boolean");return e},t.assertString=function(e){if(u(e),"string"!==typeof e)throw new Error("Value must be a string");return e},t.assertNumber=function(e){if(u(e),"number"!==typeof e)throw new Error("Value must be a number");return e},t.assertArray=function(e){if(u(e),!Array.isArray(e))throw new Error("Value must be a an array");return e},t.assertObject=function(e){if(u(e),"object"!==typeof e)throw new Error("Value must be an object");if("[object Object]"!==Object.prototype.toString.call(e))throw new Error("Value must be a simple object");return e},t.assertNotEmpty=function(e){if(u(e),"number"===typeof e&&0===e)throw new Error("must provide a non-zero value");if(0===e.length)throw new Error("must provide a non-empty value");return e},t.optional=function(e,t){return void 0===e||null===e?t:e},t.may=function(e,t){return void 0===t||null===t?void 0:e(t)},t.dictionaryToStringMap=function(e){for(var t=new Map,n=0,r=Object.keys(e);n=128?Uint8Array.from([255&e|128].concat(r(l(e>>7)))):Uint8Array.from([255&e])}t.Integer=c,t.encodeString=function(e){var t=(0,a.toUtf8)(e);return Uint8Array.from([t.length].concat(r(t)))},t.encodeInt=l,t.encodeTime=function(e){var t=e.getTime(),n=Math.floor(t/1e3),i=n?[8].concat(r(l(n))):new Uint8Array,o=(e.nanoseconds||0)+t%1e3*1e6,a=o?[16].concat(r(l(o))):new Uint8Array;return Uint8Array.from([].concat(r(i),r(a)))},t.encodeBytes=function(e){if(e.length>=128)throw new Error("Not implemented for byte arrays of length 128 or more");return e.length?Uint8Array.from([e.length].concat(r(e))):new Uint8Array},t.encodeVersion=function(e){var t=e.block?Uint8Array.from([8].concat(r(l(e.block)))):new Uint8Array,n=e.app?Uint8Array.from([16].concat(r(l(e.app)))):new Uint8Array;return Uint8Array.from([].concat(r(t),r(n)))},t.encodeBlockId=function(e){return Uint8Array.from([10,e.hash.length].concat(r(e.hash),[18,e.parts.hash.length+4,8,e.parts.total,18,e.parts.hash.length],r(e.parts.hash)))}},function(e,t,n){"use strict";(function(t){var r=n(80),i=n(1104),o=n(500),a={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var u={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:function(){var e;return("undefined"!==typeof XMLHttpRequest||"undefined"!==typeof t&&"[object process]"===Object.prototype.toString.call(t))&&(e=n(501)),e}(),transformRequest:[function(e,t){return i(t,"Accept"),i(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)||t&&"application/json"===t["Content-Type"]?(s(t,"application/json"),JSON.stringify(e)):e}],transformResponse:[function(e){var t=this.transitional,n=t&&t.silentJSONParsing,i=t&&t.forcedJSONParsing,a=!n&&"json"===this.responseType;if(a||i&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(s){if(a){if("SyntaxError"===s.name)throw o(s,this,"E_JSON_PARSE");throw s}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){u.headers[e]=r.merge(a)})),e.exports=u}).call(this,n(35))},function(e,t,n){"use strict";n.r(t),n.d(t,"detectEnv",(function(){return a})),n.d(t,"detectOS",(function(){return s})),n.d(t,"isAndroid",(function(){return u})),n.d(t,"isIOS",(function(){return c})),n.d(t,"isMobile",(function(){return l})),n.d(t,"isNode",(function(){return f})),n.d(t,"isBrowser",(function(){return d})),n.d(t,"getFromWindow",(function(){return h})),n.d(t,"getFromWindowOrThrow",(function(){return p})),n.d(t,"getDocumentOrThrow",(function(){return g})),n.d(t,"getDocument",(function(){return v})),n.d(t,"getNavigatorOrThrow",(function(){return m})),n.d(t,"getNavigator",(function(){return A})),n.d(t,"getLocationOrThrow",(function(){return y})),n.d(t,"getLocation",(function(){return b})),n.d(t,"getCryptoOrThrow",(function(){return w})),n.d(t,"getCrypto",(function(){return _})),n.d(t,"getLocalStorageOrThrow",(function(){return E})),n.d(t,"getLocalStorage",(function(){return k})),n.d(t,"getClientMeta",(function(){return I})),n.d(t,"safeJsonParse",(function(){return S})),n.d(t,"safeJsonStringify",(function(){return x})),n.d(t,"setLocal",(function(){return B})),n.d(t,"getLocal",(function(){return O})),n.d(t,"removeLocal",(function(){return M})),n.d(t,"mobileLinkChoiceKey",(function(){return P})),n.d(t,"formatIOSMobile",(function(){return R})),n.d(t,"saveMobileLinkInfo",(function(){return N})),n.d(t,"getMobileRegistryEntry",(function(){return T})),n.d(t,"getMobileLinkRegistry",(function(){return Q})),n.d(t,"getWalletRegistryUrl",(function(){return j})),n.d(t,"getDappRegistryUrl",(function(){return U})),n.d(t,"getAppLogoUrl",(function(){return L})),n.d(t,"formatMobileRegistryEntry",(function(){return F})),n.d(t,"formatMobileRegistry",(function(){return H}));var r=n(325),i=n(75),o=n(326);function a(e){return Object(o.a)(e)}function s(){var e=a();return e&&e.os?e.os:void 0}function u(){var e=s();return!!e&&e.toLowerCase().includes("android")}function c(){var e=s();return!!e&&(e.toLowerCase().includes("ios")||e.toLowerCase().includes("mac")&&navigator.maxTouchPoints>1)}function l(){return!!s()&&(u()||c())}function f(){var e=a();return!(!e||!e.name)&&"node"===e.name.toLowerCase()}function d(){return!f()&&!!A()}var h=i.getFromWindow,p=i.getFromWindowOrThrow,g=i.getDocumentOrThrow,v=i.getDocument,m=i.getNavigatorOrThrow,A=i.getNavigator,y=i.getLocationOrThrow,b=i.getLocation,w=i.getCryptoOrThrow,_=i.getCrypto,E=i.getLocalStorageOrThrow,k=i.getLocalStorage;function I(){return r.getWindowMetadata()}var C=n(294),S=C.a,x=C.b;function B(e,t){var n=x(t),r=k();r&&r.setItem(e,n)}function O(e){var t=null,n=k();return n&&(t=n.getItem(e)),t?S(t):t}function M(e){var t=k();t&&t.removeItem(e)}var P="WALLETCONNECT_DEEPLINK_CHOICE";function R(e,t){var n=encodeURIComponent(e);return t.universalLink?"".concat(t.universalLink,"/wc?uri=").concat(n):t.deepLink?"".concat(t.deepLink).concat(t.deepLink.endsWith(":")?"//":"/","wc?uri=").concat(n):""}function N(e){var t=e.href.split("?")[0];B(P,Object.assign(Object.assign({},e),{href:t}))}function T(e,t){return e.filter((function(e){return e.name.toLowerCase().includes(t.toLowerCase())}))[0]}function Q(e,t){var n=e;return t&&(n=t.map((function(t){return T(e,t)})).filter(Boolean)),n}var D="https://registry.walletconnect.org";function j(){return D+"/data/wallets.json"}function U(){return D+"/data/dapps.json"}function L(e){return D+"/logo/sm/"+e+".jpeg"}function F(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"mobile";return{name:e.name||"",shortName:e.metadata.shortName||"",color:e.metadata.colors.primary||"",logo:e.id?L(e.id):"",universalLink:e[t].universal||"",deepLink:e[t].native||""}}function H(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"mobile";return Object.values(e).filter((function(e){return!!e[t].universal||!!e[t].native})).map((function(e){return F(e,t)}))}},function(e,t,n){"use strict";function r(e){if("string"!==typeof e)throw new Error("Cannot safe json parse value of type ".concat(typeof e));try{return JSON.parse(e)}catch(t){return e}}function i(e){return"string"===typeof e?e:JSON.stringify(e)}n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i}))},function(e,t){e.exports=i,i.strict=o,i.loose=a;var n=Object.prototype.toString,r={"[object Int8Array]":!0,"[object Int16Array]":!0,"[object Int32Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Uint16Array]":!0,"[object Uint32Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0};function i(e){return o(e)||a(e)}function o(e){return e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Uint16Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array}function a(e){return r[n.call(e)]}},function(e,t,n){"use strict";var r=n(73).default,i=n(19).default,o=n(44).default,a=n(673),s=n(674),u=n(675);function c(e){if("string"!==typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function l(e,t){return t.encode?t.strict?a(e):encodeURIComponent(e):e}function f(e,t){return t.decode?s(e):e}function d(e){return Array.isArray(e)?e.sort():"object"===typeof e?d(Object.keys(e)).sort((function(e,t){return Number(e)-Number(t)})).map((function(t){return e[t]})):e}function h(e){var t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function p(e){var t=(e=h(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function g(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"===typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function v(e,t){c((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);var n=function(e){var t;switch(e.arrayFormat){case"index":return function(e,n,r){t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return function(e,n,r){t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};case"comma":case"separator":return function(t,n,r){var i="string"===typeof n&&n.split("").indexOf(e.arrayFormatSeparator)>-1?n.split(e.arrayFormatSeparator).map((function(t){return f(t,e)})):null===n?n:f(n,e);r[t]=i};default:return function(e,t,n){void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}(t),o=Object.create(null);if("string"!==typeof e)return o;if(!(e=e.trim().replace(/^[?#&]/,"")))return o;var a,s=i(e.split("&"));try{for(s.s();!(a=s.n()).done;){var l=a.value,h=u(t.decode?l.replace(/\+/g," "):l,"="),p=r(h,2),v=p[0],m=p[1];m=void 0===m?null:["comma","separator"].includes(t.arrayFormat)?m:f(m,t),n(f(v,t),m,o)}}catch(I){s.e(I)}finally{s.f()}for(var A=0,y=Object.keys(o);A0})).join("&")},t.parseUrl=function(e,t){t=Object.assign({decode:!0},t);var n=u(e,"#"),i=r(n,2),o=i[0],a=i[1];return Object.assign({url:o.split("?")[0]||"",query:v(p(e),t)},t&&t.parseFragmentIdentifier&&a?{fragmentIdentifier:f(a,t)}:{})},t.stringifyUrl=function(e,n){n=Object.assign({encode:!0,strict:!0},n);var r=h(e.url).split("?")[0]||"",i=t.extract(e.url),o=t.parse(i,{sort:!1}),a=Object.assign(o,e.query),s=t.stringify(a,n);s&&(s="?".concat(s));var u=function(e){var t="",n=e.indexOf("#");return-1!==n&&(t=e.slice(n)),t}(e.url);return e.fragmentIdentifier&&(u="#".concat(l(e.fragmentIdentifier,n))),"".concat(r).concat(s).concat(u)}},function(e,t,n){"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(840)},function(e,t,n){var r=n(651);e.exports=h,e.exports.parse=o,e.exports.compile=function(e,t){return s(o(e,t),t)},e.exports.tokensToFunction=s,e.exports.tokensToRegExp=d;var i=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function o(e,t){for(var n,r=[],o=0,a=0,s="",l=t&&t.delimiter||"/";null!=(n=i.exec(e));){var f=n[0],d=n[1],h=n.index;if(s+=e.slice(a,h),a=h+f.length,d)s+=d[1];else{var p=e[a],g=n[2],v=n[3],m=n[4],A=n[5],y=n[6],b=n[7];s&&(r.push(s),s="");var w=null!=g&&null!=p&&p!==g,_="+"===y||"*"===y,E="?"===y||"*"===y,k=n[2]||l,I=m||A;r.push({name:v||o++,prefix:g||"",delimiter:k,optional:E,repeat:_,partial:w,asterisk:!!b,pattern:I?c(I):b?".*":"[^"+u(k)+"]+?"})}}return a"']/g,Z=RegExp(K.source),X=RegExp(Y.source),$=/<%-([\s\S]+?)%>/g,ee=/<%([\s\S]+?)%>/g,te=/<%=([\s\S]+?)%>/g,ne=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,re=/^\w*$/,ie=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,oe=/[\\^$.*+?()[\]{}|]/g,ae=RegExp(oe.source),se=/^\s+/,ue=/\s/,ce=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,le=/\{\n\/\* \[wrapped with (.+)\] \*/,fe=/,? & /,de=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,he=/[()=,{}\[\]\/\s]/,pe=/\\(\\)?/g,ge=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ve=/\w*$/,me=/^[-+]0x[0-9a-f]+$/i,Ae=/^0b[01]+$/i,ye=/^\[object .+?Constructor\]$/,be=/^0o[0-7]+$/i,we=/^(?:0|[1-9]\d*)$/,_e=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ee=/($^)/,ke=/['\n\r\u2028\u2029\\]/g,Ie="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ce="\\u2700-\\u27bf",Se="a-z\\xdf-\\xf6\\xf8-\\xff",xe="A-Z\\xc0-\\xd6\\xd8-\\xde",Be="\\ufe0e\\ufe0f",Oe="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Me="['\u2019]",Pe="[\\ud800-\\udfff]",Re="["+Oe+"]",Ne="["+Ie+"]",Te="\\d+",Qe="[\\u2700-\\u27bf]",De="["+Se+"]",je="[^\\ud800-\\udfff"+Oe+Te+Ce+Se+xe+"]",Ue="\\ud83c[\\udffb-\\udfff]",Le="[^\\ud800-\\udfff]",Fe="(?:\\ud83c[\\udde6-\\uddff]){2}",He="[\\ud800-\\udbff][\\udc00-\\udfff]",Je="["+xe+"]",qe="(?:"+De+"|"+je+")",Ge="(?:"+Je+"|"+je+")",ze="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",Ve="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",We="(?:"+Ne+"|"+Ue+")"+"?",Ke="[\\ufe0e\\ufe0f]?",Ye=Ke+We+("(?:\\u200d(?:"+[Le,Fe,He].join("|")+")"+Ke+We+")*"),Ze="(?:"+[Qe,Fe,He].join("|")+")"+Ye,Xe="(?:"+[Le+Ne+"?",Ne,Fe,He,Pe].join("|")+")",$e=RegExp(Me,"g"),et=RegExp(Ne,"g"),tt=RegExp(Ue+"(?="+Ue+")|"+Xe+Ye,"g"),nt=RegExp([Je+"?"+De+"+"+ze+"(?="+[Re,Je,"$"].join("|")+")",Ge+"+"+Ve+"(?="+[Re,Je+qe,"$"].join("|")+")",Je+"?"+qe+"+"+ze,Je+"+"+Ve,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Te,Ze].join("|"),"g"),rt=RegExp("[\\u200d\\ud800-\\udfff"+Ie+Be+"]"),it=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ot=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],at=-1,st={};st[D]=st[j]=st[U]=st[L]=st[F]=st[H]=st[J]=st[q]=st[G]=!0,st[y]=st[b]=st[T]=st[w]=st[Q]=st[_]=st[E]=st[k]=st[C]=st[S]=st[x]=st[O]=st[M]=st[P]=st[N]=!1;var ut={};ut[y]=ut[b]=ut[T]=ut[Q]=ut[w]=ut[_]=ut[D]=ut[j]=ut[U]=ut[L]=ut[F]=ut[C]=ut[S]=ut[x]=ut[O]=ut[M]=ut[P]=ut[R]=ut[H]=ut[J]=ut[q]=ut[G]=!0,ut[E]=ut[k]=ut[N]=!1;var ct={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},lt=parseFloat,ft=parseInt,dt="object"==typeof e&&e&&e.Object===Object&&e,ht="object"==typeof self&&self&&self.Object===Object&&self,pt=dt||ht||Function("return this")(),gt=t&&!t.nodeType&&t,vt=gt&&"object"==typeof r&&r&&!r.nodeType&&r,mt=vt&&vt.exports===gt,At=mt&&dt.process,yt=function(){try{var e=vt&&vt.require&&vt.require("util").types;return e||At&&At.binding&&At.binding("util")}catch(t){}}(),bt=yt&&yt.isArrayBuffer,wt=yt&&yt.isDate,_t=yt&&yt.isMap,Et=yt&&yt.isRegExp,kt=yt&&yt.isSet,It=yt&&yt.isTypedArray;function Ct(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function St(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i-1}function Rt(e,t,n){for(var r=-1,i=null==e?0:e.length;++r-1;);return n}function nn(e,t){for(var n=e.length;n--&&Ht(t,e[n],0)>-1;);return n}function rn(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var on=Vt({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),an=Vt({"&":"&","<":"<",">":">",'"':""","'":"'"});function sn(e){return"\\"+ct[e]}function un(e){return rt.test(e)}function cn(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function ln(e,t){return function(n){return e(t(n))}}function fn(e,t){for(var n=-1,r=e.length,i=0,o=[];++n",""":'"',"'":"'"});var An=function e(t){var n=(t=null==t?pt:An.defaults(pt.Object(),t,An.pick(pt,ot))).Array,r=t.Date,i=t.Error,ue=t.Function,Ie=t.Math,Ce=t.Object,Se=t.RegExp,xe=t.String,Be=t.TypeError,Oe=n.prototype,Me=ue.prototype,Pe=Ce.prototype,Re=t["__core-js_shared__"],Ne=Me.toString,Te=Pe.hasOwnProperty,Qe=0,De=function(){var e=/[^.]+$/.exec(Re&&Re.keys&&Re.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),je=Pe.toString,Ue=Ne.call(Ce),Le=pt._,Fe=Se("^"+Ne.call(Te).replace(oe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),He=mt?t.Buffer:o,Je=t.Symbol,qe=t.Uint8Array,Ge=He?He.allocUnsafe:o,ze=ln(Ce.getPrototypeOf,Ce),Ve=Ce.create,We=Pe.propertyIsEnumerable,Ke=Oe.splice,Ye=Je?Je.isConcatSpreadable:o,Ze=Je?Je.iterator:o,Xe=Je?Je.toStringTag:o,tt=function(){try{var e=ho(Ce,"defineProperty");return e({},"",{}),e}catch(t){}}(),rt=t.clearTimeout!==pt.clearTimeout&&t.clearTimeout,ct=r&&r.now!==pt.Date.now&&r.now,dt=t.setTimeout!==pt.setTimeout&&t.setTimeout,ht=Ie.ceil,gt=Ie.floor,vt=Ce.getOwnPropertySymbols,At=He?He.isBuffer:o,yt=t.isFinite,Ut=Oe.join,Vt=ln(Ce.keys,Ce),yn=Ie.max,bn=Ie.min,wn=r.now,_n=t.parseInt,En=Ie.random,kn=Oe.reverse,In=ho(t,"DataView"),Cn=ho(t,"Map"),Sn=ho(t,"Promise"),xn=ho(t,"Set"),Bn=ho(t,"WeakMap"),On=ho(Ce,"create"),Mn=Bn&&new Bn,Pn={},Rn=Lo(In),Nn=Lo(Cn),Tn=Lo(Sn),Qn=Lo(xn),Dn=Lo(Bn),jn=Je?Je.prototype:o,Un=jn?jn.valueOf:o,Ln=jn?jn.toString:o;function Fn(e){if(rs(e)&&!za(e)&&!(e instanceof Gn)){if(e instanceof qn)return e;if(Te.call(e,"__wrapped__"))return Fo(e)}return new qn(e)}var Hn=function(){function e(){}return function(t){if(!ns(t))return{};if(Ve)return Ve(t);e.prototype=t;var n=new e;return e.prototype=o,n}}();function Jn(){}function qn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=o}function Gn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=m,this.__views__=[]}function zn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function cr(e,t,n,r,i,a){var s,u=1&t,c=2&t,l=4&t;if(n&&(s=i?n(e,r,i,a):n(e)),s!==o)return s;if(!ns(e))return e;var f=za(e);if(f){if(s=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&Te.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!u)return Oi(e,s)}else{var d=vo(e),h=d==k||d==I;if(Ya(e))return ki(e,u);if(d==x||d==y||h&&!i){if(s=c||h?{}:Ao(e),!u)return c?function(e,t){return Mi(e,go(e),t)}(e,function(e,t){return e&&Mi(t,Ns(t),e)}(s,e)):function(e,t){return Mi(e,po(e),t)}(e,or(s,e))}else{if(!ut[d])return i?e:{};s=function(e,t,n){var r=e.constructor;switch(t){case T:return Ii(e);case w:case _:return new r(+e);case Q:return function(e,t){var n=t?Ii(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case D:case j:case U:case L:case F:case H:case J:case q:case G:return Ci(e,n);case C:return new r;case S:case P:return new r(e);case O:return function(e){var t=new e.constructor(e.source,ve.exec(e));return t.lastIndex=e.lastIndex,t}(e);case M:return new r;case R:return i=e,Un?Ce(Un.call(i)):{}}var i}(e,d,u)}}a||(a=new Yn);var p=a.get(e);if(p)return p;a.set(e,s),us(e)?e.forEach((function(r){s.add(cr(r,t,n,r,e,a))})):is(e)&&e.forEach((function(r,i){s.set(i,cr(r,t,n,i,e,a))}));var g=f?o:(l?c?oo:io:c?Ns:Rs)(e);return xt(g||e,(function(r,i){g&&(r=e[i=r]),nr(s,i,cr(r,t,n,i,e,a))})),s}function lr(e,t,n){var r=n.length;if(null==e)return!r;for(e=Ce(e);r--;){var i=n[r],a=t[i],s=e[i];if(s===o&&!(i in e)||!a(s))return!1}return!0}function fr(e,t,n){if("function"!=typeof e)throw new Be(a);return Ro((function(){e.apply(o,n)}),t)}function dr(e,t,n,r){var i=-1,o=Pt,a=!0,s=e.length,u=[],c=t.length;if(!s)return u;n&&(t=Nt(t,Xt(n))),r?(o=Rt,a=!1):t.length>=200&&(o=en,a=!1,t=new Kn(t));e:for(;++i-1},Vn.prototype.set=function(e,t){var n=this.__data__,r=rr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Wn.prototype.clear=function(){this.size=0,this.__data__={hash:new zn,map:new(Cn||Vn),string:new zn}},Wn.prototype.delete=function(e){var t=lo(this,e).delete(e);return this.size-=t?1:0,t},Wn.prototype.get=function(e){return lo(this,e).get(e)},Wn.prototype.has=function(e){return lo(this,e).has(e)},Wn.prototype.set=function(e,t){var n=lo(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Kn.prototype.add=Kn.prototype.push=function(e){return this.__data__.set(e,s),this},Kn.prototype.has=function(e){return this.__data__.has(e)},Yn.prototype.clear=function(){this.__data__=new Vn,this.size=0},Yn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Yn.prototype.get=function(e){return this.__data__.get(e)},Yn.prototype.has=function(e){return this.__data__.has(e)},Yn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Vn){var r=n.__data__;if(!Cn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Wn(r)}return n.set(e,t),this.size=n.size,this};var hr=Ni(wr),pr=Ni(_r,!0);function gr(e,t){var n=!0;return hr(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function vr(e,t,n){for(var r=-1,i=e.length;++r0&&n(s)?t>1?Ar(s,t-1,n,r,i):Tt(i,s):r||(i[i.length]=s)}return i}var yr=Ti(),br=Ti(!0);function wr(e,t){return e&&yr(e,t,Rs)}function _r(e,t){return e&&br(e,t,Rs)}function Er(e,t){return Mt(t,(function(t){return $a(e[t])}))}function kr(e,t){for(var n=0,r=(t=bi(t,e)).length;null!=e&&nt}function xr(e,t){return null!=e&&Te.call(e,t)}function Br(e,t){return null!=e&&t in Ce(e)}function Or(e,t,r){for(var i=r?Rt:Pt,a=e[0].length,s=e.length,u=s,c=n(s),l=1/0,f=[];u--;){var d=e[u];u&&t&&(d=Nt(d,Xt(t))),l=bn(d.length,l),c[u]=!r&&(t||a>=120&&d.length>=120)?new Kn(u&&d):o}d=e[0];var h=-1,p=c[0];e:for(;++h=s?u:u*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}))}function zr(e,t,n){for(var r=-1,i=t.length,o={};++r-1;)s!==e&&Ke.call(s,u,1),Ke.call(e,u,1);return e}function Wr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;bo(i)?Ke.call(e,i,1):di(e,i)}}return e}function Kr(e,t){return e+gt(En()*(t-e+1))}function Yr(e,t){var n="";if(!e||t<1||t>g)return n;do{t%2&&(n+=e),(t=gt(t/2))&&(e+=e)}while(t);return n}function Zr(e,t){return No(xo(e,t,ou),e+"")}function Xr(e){return Xn(Hs(e))}function $r(e,t){var n=Hs(e);return Do(n,ur(t,0,n.length))}function ei(e,t,n,r){if(!ns(e))return e;for(var i=-1,a=(t=bi(t,e)).length,s=a-1,u=e;null!=u&&++io?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var a=n(o);++i>>1,a=e[o];null!==a&&!ls(a)&&(n?a<=t:a=200){var c=t?null:Yi(e);if(c)return dn(c);a=!1,i=en,u=new Kn}else u=t?[]:s;e:for(;++r=r?e:ii(e,t,n)}var Ei=rt||function(e){return pt.clearTimeout(e)};function ki(e,t){if(t)return e.slice();var n=e.length,r=Ge?Ge(n):new e.constructor(n);return e.copy(r),r}function Ii(e){var t=new e.constructor(e.byteLength);return new qe(t).set(new qe(e)),t}function Ci(e,t){var n=t?Ii(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Si(e,t){if(e!==t){var n=e!==o,r=null===e,i=e===e,a=ls(e),s=t!==o,u=null===t,c=t===t,l=ls(t);if(!u&&!l&&!a&&e>t||a&&s&&c&&!u&&!l||r&&s&&c||!n&&c||!i)return 1;if(!r&&!a&&!l&&e1?n[i-1]:o,s=i>2?n[2]:o;for(a=e.length>3&&"function"==typeof a?(i--,a):o,s&&wo(n[0],n[1],s)&&(a=i<3?o:a,i=1),t=Ce(t);++r-1?i[a?t[s]:s]:o}}function Li(e){return ro((function(t){var n=t.length,r=n,i=qn.prototype.thru;for(e&&t.reverse();r--;){var s=t[r];if("function"!=typeof s)throw new Be(a);if(i&&!u&&"wrapper"==so(s))var u=new qn([],!0)}for(r=u?r:n;++r1&&y.reverse(),h&&lu))return!1;var l=a.get(e),f=a.get(t);if(l&&f)return l==t&&f==e;var d=-1,h=!0,p=2&n?new Kn:o;for(a.set(e,t),a.set(t,e);++d-1&&e%1==0&&e1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(ce,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return xt(A,(function(n){var r="_."+n[0];t&n[1]&&!Pt(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(le);return t?t[1].split(fe):[]}(r),n)))}function Qo(e){var t=0,n=0;return function(){var r=wn(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(o,arguments)}}function Do(e,t){var n=-1,r=e.length,i=r-1;for(t=t===o?r:t;++n1?e[t-1]:o;return n="function"==typeof n?(e.pop(),n):o,sa(e,n)}));function pa(e){var t=Fn(e);return t.__chain__=!0,t}function ga(e,t){return t(e)}var va=ro((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,i=function(t){return sr(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Gn&&bo(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:ga,args:[i],thisArg:o}),new qn(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(o),e}))):this.thru(i)}));var ma=Pi((function(e,t,n){Te.call(e,n)?++e[n]:ar(e,n,1)}));var Aa=Ui(Go),ya=Ui(zo);function ba(e,t){return(za(e)?xt:hr)(e,co(t,3))}function wa(e,t){return(za(e)?Bt:pr)(e,co(t,3))}var _a=Pi((function(e,t,n){Te.call(e,n)?e[n].push(t):ar(e,n,[t])}));var Ea=Zr((function(e,t,r){var i=-1,o="function"==typeof t,a=Wa(e)?n(e.length):[];return hr(e,(function(e){a[++i]=o?Ct(t,e,r):Mr(e,t,r)})),a})),ka=Pi((function(e,t,n){ar(e,n,t)}));function Ia(e,t){return(za(e)?Nt:Lr)(e,co(t,3))}var Ca=Pi((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var Sa=Zr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&wo(e,t[0],t[1])?t=[]:n>2&&wo(t[0],t[1],t[2])&&(t=[t[0]]),Gr(e,Ar(t,1),[])})),xa=ct||function(){return pt.Date.now()};function Ba(e,t,n){return t=n?o:t,t=e&&null==t?e.length:t,Xi(e,d,o,o,o,o,t)}function Oa(e,t){var n;if("function"!=typeof t)throw new Be(a);return e=vs(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=o),n}}var Ma=Zr((function(e,t,n){var r=1;if(n.length){var i=fn(n,uo(Ma));r|=l}return Xi(e,r,t,n,i)})),Pa=Zr((function(e,t,n){var r=3;if(n.length){var i=fn(n,uo(Pa));r|=l}return Xi(t,r,e,n,i)}));function Ra(e,t,n){var r,i,s,u,c,l,f=0,d=!1,h=!1,p=!0;if("function"!=typeof e)throw new Be(a);function g(t){var n=r,a=i;return r=i=o,f=t,u=e.apply(a,n)}function v(e){return f=e,c=Ro(A,t),d?g(e):u}function m(e){var n=e-l;return l===o||n>=t||n<0||h&&e-f>=s}function A(){var e=xa();if(m(e))return y(e);c=Ro(A,function(e){var n=t-(e-l);return h?bn(n,s-(e-f)):n}(e))}function y(e){return c=o,p&&r?g(e):(r=i=o,u)}function b(){var e=xa(),n=m(e);if(r=arguments,i=this,l=e,n){if(c===o)return v(l);if(h)return Ei(c),c=Ro(A,t),g(l)}return c===o&&(c=Ro(A,t)),u}return t=As(t)||0,ns(n)&&(d=!!n.leading,s=(h="maxWait"in n)?yn(As(n.maxWait)||0,t):s,p="trailing"in n?!!n.trailing:p),b.cancel=function(){c!==o&&Ei(c),f=0,r=l=i=c=o},b.flush=function(){return c===o?u:y(xa())},b}var Na=Zr((function(e,t){return fr(e,1,t)})),Ta=Zr((function(e,t,n){return fr(e,As(t)||0,n)}));function Qa(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Be(a);var n=function n(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Qa.Cache||Wn),n}function Da(e){if("function"!=typeof e)throw new Be(a);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Qa.Cache=Wn;var ja=wi((function(e,t){var n=(t=1==t.length&&za(t[0])?Nt(t[0],Xt(co())):Nt(Ar(t,1),Xt(co()))).length;return Zr((function(r){for(var i=-1,o=bn(r.length,n);++i=t})),Ga=Pr(function(){return arguments}())?Pr:function(e){return rs(e)&&Te.call(e,"callee")&&!We.call(e,"callee")},za=n.isArray,Va=bt?Xt(bt):function(e){return rs(e)&&Cr(e)==T};function Wa(e){return null!=e&&ts(e.length)&&!$a(e)}function Ka(e){return rs(e)&&Wa(e)}var Ya=At||Au,Za=wt?Xt(wt):function(e){return rs(e)&&Cr(e)==_};function Xa(e){if(!rs(e))return!1;var t=Cr(e);return t==E||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!as(e)}function $a(e){if(!ns(e))return!1;var t=Cr(e);return t==k||t==I||"[object AsyncFunction]"==t||"[object Proxy]"==t}function es(e){return"number"==typeof e&&e==vs(e)}function ts(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=g}function ns(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function rs(e){return null!=e&&"object"==typeof e}var is=_t?Xt(_t):function(e){return rs(e)&&vo(e)==C};function os(e){return"number"==typeof e||rs(e)&&Cr(e)==S}function as(e){if(!rs(e)||Cr(e)!=x)return!1;var t=ze(e);if(null===t)return!0;var n=Te.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Ne.call(n)==Ue}var ss=Et?Xt(Et):function(e){return rs(e)&&Cr(e)==O};var us=kt?Xt(kt):function(e){return rs(e)&&vo(e)==M};function cs(e){return"string"==typeof e||!za(e)&&rs(e)&&Cr(e)==P}function ls(e){return"symbol"==typeof e||rs(e)&&Cr(e)==R}var fs=It?Xt(It):function(e){return rs(e)&&ts(e.length)&&!!st[Cr(e)]};var ds=Vi(Ur),hs=Vi((function(e,t){return e<=t}));function ps(e){if(!e)return[];if(Wa(e))return cs(e)?gn(e):Oi(e);if(Ze&&e[Ze])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Ze]());var t=vo(e);return(t==C?cn:t==M?dn:Hs)(e)}function gs(e){return e?(e=As(e))===p||e===-1/0?17976931348623157e292*(e<0?-1:1):e===e?e:0:0===e?e:0}function vs(e){var t=gs(e),n=t%1;return t===t?n?t-n:t:0}function ms(e){return e?ur(vs(e),0,m):0}function As(e){if("number"==typeof e)return e;if(ls(e))return v;if(ns(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ns(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Zt(e);var n=Ae.test(e);return n||be.test(e)?ft(e.slice(2),n?2:8):me.test(e)?v:+e}function ys(e){return Mi(e,Ns(e))}function bs(e){return null==e?"":li(e)}var ws=Ri((function(e,t){if(Io(t)||Wa(t))Mi(t,Rs(t),e);else for(var n in t)Te.call(t,n)&&nr(e,n,t[n])})),_s=Ri((function(e,t){Mi(t,Ns(t),e)})),Es=Ri((function(e,t,n,r){Mi(t,Ns(t),e,r)})),ks=Ri((function(e,t,n,r){Mi(t,Rs(t),e,r)})),Is=ro(sr);var Cs=Zr((function(e,t){e=Ce(e);var n=-1,r=t.length,i=r>2?t[2]:o;for(i&&wo(t[0],t[1],i)&&(r=1);++n1),t})),Mi(e,oo(e),n),r&&(n=cr(n,7,to));for(var i=t.length;i--;)di(n,t[i]);return n}));var js=ro((function(e,t){return null==e?{}:function(e,t){return zr(e,t,(function(t,n){return Bs(e,n)}))}(e,t)}));function Us(e,t){if(null==e)return{};var n=Nt(oo(e),(function(e){return[e]}));return t=co(t),zr(e,n,(function(e,n){return t(e,n[0])}))}var Ls=Zi(Rs),Fs=Zi(Ns);function Hs(e){return null==e?[]:$t(e,Rs(e))}var Js=Di((function(e,t,n){return t=t.toLowerCase(),e+(n?qs(t):t)}));function qs(e){return Xs(bs(e).toLowerCase())}function Gs(e){return(e=bs(e))&&e.replace(_e,on).replace(et,"")}var zs=Di((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Vs=Di((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Ws=Qi("toLowerCase");var Ks=Di((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Ys=Di((function(e,t,n){return e+(n?" ":"")+Xs(t)}));var Zs=Di((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Xs=Qi("toUpperCase");function $s(e,t,n){return e=bs(e),(t=n?o:t)===o?function(e){return it.test(e)}(e)?function(e){return e.match(nt)||[]}(e):function(e){return e.match(de)||[]}(e):e.match(t)||[]}var eu=Zr((function(e,t){try{return Ct(e,o,t)}catch(n){return Xa(n)?n:new i(n)}})),tu=ro((function(e,t){return xt(t,(function(t){t=Uo(t),ar(e,t,Ma(e[t],e))})),e}));function nu(e){return function(){return e}}var ru=Li(),iu=Li(!0);function ou(e){return e}function au(e){return Qr("function"==typeof e?e:cr(e,1))}var su=Zr((function(e,t){return function(n){return Mr(n,e,t)}})),uu=Zr((function(e,t){return function(n){return Mr(e,n,t)}}));function cu(e,t,n){var r=Rs(t),i=Er(t,r);null!=n||ns(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=Er(t,Rs(t)));var o=!(ns(n)&&"chain"in n)||!!n.chain,a=$a(e);return xt(i,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__),i=n.__actions__=Oi(this.__actions__);return i.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Tt([this.value()],arguments))})})),e}function lu(){}var fu=qi(Nt),du=qi(Ot),hu=qi(jt);function pu(e){return _o(e)?zt(Uo(e)):function(e){return function(t){return kr(t,e)}}(e)}var gu=zi(),vu=zi(!0);function mu(){return[]}function Au(){return!1}var yu=Ji((function(e,t){return e+t}),0),bu=Ki("ceil"),wu=Ji((function(e,t){return e/t}),1),_u=Ki("floor");var Eu=Ji((function(e,t){return e*t}),1),ku=Ki("round"),Iu=Ji((function(e,t){return e-t}),0);return Fn.after=function(e,t){if("function"!=typeof t)throw new Be(a);return e=vs(e),function(){if(--e<1)return t.apply(this,arguments)}},Fn.ary=Ba,Fn.assign=ws,Fn.assignIn=_s,Fn.assignInWith=Es,Fn.assignWith=ks,Fn.at=Is,Fn.before=Oa,Fn.bind=Ma,Fn.bindAll=tu,Fn.bindKey=Pa,Fn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return za(e)?e:[e]},Fn.chain=pa,Fn.chunk=function(e,t,r){t=(r?wo(e,t,r):t===o)?1:yn(vs(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var a=0,s=0,u=n(ht(i/t));ai?0:i+n),(r=r===o||r>i?i:vs(r))<0&&(r+=i),r=n>r?0:ms(r);n>>0)?(e=bs(e))&&("string"==typeof t||null!=t&&!ss(t))&&!(t=li(t))&&un(e)?_i(gn(e),0,n):e.split(t,n):[]},Fn.spread=function(e,t){if("function"!=typeof e)throw new Be(a);return t=null==t?0:yn(vs(t),0),Zr((function(n){var r=n[t],i=_i(n,0,t);return r&&Tt(i,r),Ct(e,this,i)}))},Fn.tail=function(e){var t=null==e?0:e.length;return t?ii(e,1,t):[]},Fn.take=function(e,t,n){return e&&e.length?ii(e,0,(t=n||t===o?1:vs(t))<0?0:t):[]},Fn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?ii(e,(t=r-(t=n||t===o?1:vs(t)))<0?0:t,r):[]},Fn.takeRightWhile=function(e,t){return e&&e.length?pi(e,co(t,3),!1,!0):[]},Fn.takeWhile=function(e,t){return e&&e.length?pi(e,co(t,3)):[]},Fn.tap=function(e,t){return t(e),e},Fn.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new Be(a);return ns(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Ra(e,t,{leading:r,maxWait:t,trailing:i})},Fn.thru=ga,Fn.toArray=ps,Fn.toPairs=Ls,Fn.toPairsIn=Fs,Fn.toPath=function(e){return za(e)?Nt(e,Uo):ls(e)?[e]:Oi(jo(bs(e)))},Fn.toPlainObject=ys,Fn.transform=function(e,t,n){var r=za(e),i=r||Ya(e)||fs(e);if(t=co(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:ns(e)&&$a(o)?Hn(ze(e)):{}}return(i?xt:wr)(e,(function(e,r,i){return t(n,e,r,i)})),n},Fn.unary=function(e){return Ba(e,1)},Fn.union=ra,Fn.unionBy=ia,Fn.unionWith=oa,Fn.uniq=function(e){return e&&e.length?fi(e):[]},Fn.uniqBy=function(e,t){return e&&e.length?fi(e,co(t,2)):[]},Fn.uniqWith=function(e,t){return t="function"==typeof t?t:o,e&&e.length?fi(e,o,t):[]},Fn.unset=function(e,t){return null==e||di(e,t)},Fn.unzip=aa,Fn.unzipWith=sa,Fn.update=function(e,t,n){return null==e?e:hi(e,t,yi(n))},Fn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:o,null==e?e:hi(e,t,yi(n),r)},Fn.values=Hs,Fn.valuesIn=function(e){return null==e?[]:$t(e,Ns(e))},Fn.without=ua,Fn.words=$s,Fn.wrap=function(e,t){return Ua(yi(t),e)},Fn.xor=ca,Fn.xorBy=la,Fn.xorWith=fa,Fn.zip=da,Fn.zipObject=function(e,t){return mi(e||[],t||[],nr)},Fn.zipObjectDeep=function(e,t){return mi(e||[],t||[],ei)},Fn.zipWith=ha,Fn.entries=Ls,Fn.entriesIn=Fs,Fn.extend=_s,Fn.extendWith=Es,cu(Fn,Fn),Fn.add=yu,Fn.attempt=eu,Fn.camelCase=Js,Fn.capitalize=qs,Fn.ceil=bu,Fn.clamp=function(e,t,n){return n===o&&(n=t,t=o),n!==o&&(n=(n=As(n))===n?n:0),t!==o&&(t=(t=As(t))===t?t:0),ur(As(e),t,n)},Fn.clone=function(e){return cr(e,4)},Fn.cloneDeep=function(e){return cr(e,5)},Fn.cloneDeepWith=function(e,t){return cr(e,5,t="function"==typeof t?t:o)},Fn.cloneWith=function(e,t){return cr(e,4,t="function"==typeof t?t:o)},Fn.conformsTo=function(e,t){return null==t||lr(e,t,Rs(t))},Fn.deburr=Gs,Fn.defaultTo=function(e,t){return null==e||e!==e?t:e},Fn.divide=wu,Fn.endsWith=function(e,t,n){e=bs(e),t=li(t);var r=e.length,i=n=n===o?r:ur(vs(n),0,r);return(n-=t.length)>=0&&e.slice(n,i)==t},Fn.eq=Ha,Fn.escape=function(e){return(e=bs(e))&&X.test(e)?e.replace(Y,an):e},Fn.escapeRegExp=function(e){return(e=bs(e))&&ae.test(e)?e.replace(oe,"\\$&"):e},Fn.every=function(e,t,n){var r=za(e)?Ot:gr;return n&&wo(e,t,n)&&(t=o),r(e,co(t,3))},Fn.find=Aa,Fn.findIndex=Go,Fn.findKey=function(e,t){return Lt(e,co(t,3),wr)},Fn.findLast=ya,Fn.findLastIndex=zo,Fn.findLastKey=function(e,t){return Lt(e,co(t,3),_r)},Fn.floor=_u,Fn.forEach=ba,Fn.forEachRight=wa,Fn.forIn=function(e,t){return null==e?e:yr(e,co(t,3),Ns)},Fn.forInRight=function(e,t){return null==e?e:br(e,co(t,3),Ns)},Fn.forOwn=function(e,t){return e&&wr(e,co(t,3))},Fn.forOwnRight=function(e,t){return e&&_r(e,co(t,3))},Fn.get=xs,Fn.gt=Ja,Fn.gte=qa,Fn.has=function(e,t){return null!=e&&mo(e,t,xr)},Fn.hasIn=Bs,Fn.head=Wo,Fn.identity=ou,Fn.includes=function(e,t,n,r){e=Wa(e)?e:Hs(e),n=n&&!r?vs(n):0;var i=e.length;return n<0&&(n=yn(i+n,0)),cs(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Ht(e,t,n)>-1},Fn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:vs(n);return i<0&&(i=yn(r+i,0)),Ht(e,t,i)},Fn.inRange=function(e,t,n){return t=gs(t),n===o?(n=t,t=0):n=gs(n),function(e,t,n){return e>=bn(t,n)&&e=-9007199254740991&&e<=g},Fn.isSet=us,Fn.isString=cs,Fn.isSymbol=ls,Fn.isTypedArray=fs,Fn.isUndefined=function(e){return e===o},Fn.isWeakMap=function(e){return rs(e)&&vo(e)==N},Fn.isWeakSet=function(e){return rs(e)&&"[object WeakSet]"==Cr(e)},Fn.join=function(e,t){return null==e?"":Ut.call(e,t)},Fn.kebabCase=zs,Fn.last=Xo,Fn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=vs(n))<0?yn(r+i,0):bn(i,r-1)),t===t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):Ft(e,qt,i,!0)},Fn.lowerCase=Vs,Fn.lowerFirst=Ws,Fn.lt=ds,Fn.lte=hs,Fn.max=function(e){return e&&e.length?vr(e,ou,Sr):o},Fn.maxBy=function(e,t){return e&&e.length?vr(e,co(t,2),Sr):o},Fn.mean=function(e){return Gt(e,ou)},Fn.meanBy=function(e,t){return Gt(e,co(t,2))},Fn.min=function(e){return e&&e.length?vr(e,ou,Ur):o},Fn.minBy=function(e,t){return e&&e.length?vr(e,co(t,2),Ur):o},Fn.stubArray=mu,Fn.stubFalse=Au,Fn.stubObject=function(){return{}},Fn.stubString=function(){return""},Fn.stubTrue=function(){return!0},Fn.multiply=Eu,Fn.nth=function(e,t){return e&&e.length?qr(e,vs(t)):o},Fn.noConflict=function(){return pt._===this&&(pt._=Le),this},Fn.noop=lu,Fn.now=xa,Fn.pad=function(e,t,n){e=bs(e);var r=(t=vs(t))?pn(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Gi(gt(i),n)+e+Gi(ht(i),n)},Fn.padEnd=function(e,t,n){e=bs(e);var r=(t=vs(t))?pn(e):0;return t&&rt){var r=e;e=t,t=r}if(n||e%1||t%1){var i=En();return bn(e+i*(t-e+lt("1e-"+((i+"").length-1))),t)}return Kr(e,t)},Fn.reduce=function(e,t,n){var r=za(e)?Qt:Wt,i=arguments.length<3;return r(e,co(t,4),n,i,hr)},Fn.reduceRight=function(e,t,n){var r=za(e)?Dt:Wt,i=arguments.length<3;return r(e,co(t,4),n,i,pr)},Fn.repeat=function(e,t,n){return t=(n?wo(e,t,n):t===o)?1:vs(t),Yr(bs(e),t)},Fn.replace=function(){var e=arguments,t=bs(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Fn.result=function(e,t,n){var r=-1,i=(t=bi(t,e)).length;for(i||(i=1,e=o);++rg)return[];var n=m,r=bn(e,m);t=co(t),e-=m;for(var i=Yt(r,t);++n=a)return e;var u=n-pn(r);if(u<1)return r;var c=s?_i(s,0,u).join(""):e.slice(0,u);if(i===o)return c+r;if(s&&(u+=c.length-u),ss(i)){if(e.slice(u).search(i)){var l,f=c;for(i.global||(i=Se(i.source,bs(ve.exec(i))+"g")),i.lastIndex=0;l=i.exec(f);)var d=l.index;c=c.slice(0,d===o?u:d)}}else if(e.indexOf(li(i),u)!=u){var h=c.lastIndexOf(i);h>-1&&(c=c.slice(0,h))}return c+r},Fn.unescape=function(e){return(e=bs(e))&&Z.test(e)?e.replace(K,mn):e},Fn.uniqueId=function(e){var t=++Qe;return bs(e)+t},Fn.upperCase=Zs,Fn.upperFirst=Xs,Fn.each=ba,Fn.eachRight=wa,Fn.first=Wo,cu(Fn,function(){var e={};return wr(Fn,(function(t,n){Te.call(Fn.prototype,n)||(e[n]=t)})),e}(),{chain:!1}),Fn.VERSION="4.17.21",xt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Fn[e].placeholder=Fn})),xt(["drop","take"],(function(e,t){Gn.prototype[e]=function(n){n=n===o?1:yn(vs(n),0);var r=this.__filtered__&&!t?new Gn(this):this.clone();return r.__filtered__?r.__takeCount__=bn(n,r.__takeCount__):r.__views__.push({size:bn(n,m),type:e+(r.__dir__<0?"Right":"")}),r},Gn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),xt(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Gn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:co(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),xt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Gn.prototype[e]=function(){return this[n](1).value()[0]}})),xt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Gn.prototype[e]=function(){return this.__filtered__?new Gn(this):this[n](1)}})),Gn.prototype.compact=function(){return this.filter(ou)},Gn.prototype.find=function(e){return this.filter(e).head()},Gn.prototype.findLast=function(e){return this.reverse().find(e)},Gn.prototype.invokeMap=Zr((function(e,t){return"function"==typeof e?new Gn(this):this.map((function(n){return Mr(n,e,t)}))})),Gn.prototype.reject=function(e){return this.filter(Da(co(e)))},Gn.prototype.slice=function(e,t){e=vs(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Gn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==o&&(n=(t=vs(t))<0?n.dropRight(-t):n.take(t-e)),n)},Gn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Gn.prototype.toArray=function(){return this.take(m)},wr(Gn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=Fn[r?"take"+("last"==t?"Right":""):t],a=r||/^find/.test(t);i&&(Fn.prototype[t]=function(){var t=this.__wrapped__,s=r?[1]:arguments,u=t instanceof Gn,c=s[0],l=u||za(t),f=function(e){var t=i.apply(Fn,Tt([e],s));return r&&d?t[0]:t};l&&n&&"function"==typeof c&&1!=c.length&&(u=l=!1);var d=this.__chain__,h=!!this.__actions__.length,p=a&&!d,g=u&&!h;if(!a&&l){t=g?t:new Gn(this);var v=e.apply(t,s);return v.__actions__.push({func:ga,args:[f],thisArg:o}),new qn(v,d)}return p&&g?e.apply(this,s):(v=this.thru(f),p?r?v.value()[0]:v.value():v)})})),xt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Oe[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Fn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(za(i)?i:[],e)}return this[n]((function(n){return t.apply(za(n)?n:[],e)}))}})),wr(Gn.prototype,(function(e,t){var n=Fn[t];if(n){var r=n.name+"";Te.call(Pn,r)||(Pn[r]=[]),Pn[r].push({name:t,func:n})}})),Pn[Fi(o,2).name]=[{name:"wrapper",func:o}],Gn.prototype.clone=function(){var e=new Gn(this.__wrapped__);return e.__actions__=Oi(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Oi(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Oi(this.__views__),e},Gn.prototype.reverse=function(){if(this.__filtered__){var e=new Gn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Gn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=za(e),r=t<0,i=n?e.length:0,o=function(e,t,n){var r=-1,i=n.length;for(;++r=this.__values__.length;return{done:e,value:e?o:this.__values__[this.__index__++]}},Fn.prototype.plant=function(e){for(var t,n=this;n instanceof Jn;){var r=Fo(n);r.__index__=0,r.__values__=o,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t},Fn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Gn){var t=e;return this.__actions__.length&&(t=new Gn(this)),(t=t.reverse()).__actions__.push({func:ga,args:[na],thisArg:o}),new qn(t,this.__chain__)}return this.thru(na)},Fn.prototype.toJSON=Fn.prototype.valueOf=Fn.prototype.value=function(){return gi(this.__wrapped__,this.__actions__)},Fn.prototype.first=Fn.prototype.head,Ze&&(Fn.prototype[Ze]=function(){return this}),Fn}();pt._=An,(i=function(){return An}.call(t,n,t,r))===o||(r.exports=i)}).call(this)}).call(this,n(20),n(77)(e))},function(e,t,n){var r=n(625),i=n(628);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(56);function i(e,t){if(null==e)return{};var n,i,o=Object(r.a)(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},function(e,t,n){"use strict";var r=n(997);e.exports=Function.prototype.bind||r},,,,function(e,t,n){var r=n(578);e.exports=function(e,t,n){var i=null==e?void 0:r(e,t);return void 0===i?n:i}},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(this,n(20))},function(e,t,n){var r=n(193),i=n(141);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},function(e,t,n){var r=n(643);e.exports=function(e){return null==e?"":r(e)}},function(e,t,n){var r=n(319),i=0;e.exports=function(e){var t=++i;return r(e)+t}},function(e,t,n){"use strict";var r=n(99).rotr32;function i(e,t,n){return e&t^~e&n}function o(e,t,n){return e&t^e&n^t&n}function a(e,t,n){return e^t^n}t.ft_1=function(e,t,n,r){return 0===e?i(t,n,r):1===e||3===e?a(t,n,r):2===e?o(t,n,r):void 0},t.ch32=i,t.maj32=o,t.p32=a,t.s0_256=function(e){return r(e,2)^r(e,13)^r(e,22)},t.s1_256=function(e){return r(e,6)^r(e,11)^r(e,25)},t.g0_256=function(e){return r(e,7)^r(e,18)^e>>>3},t.g1_256=function(e){return r(e,17)^r(e,19)^e>>>10}},function(e,t,n){"use strict";var r=n(99),i=n(165),o=n(321),a=n(85),s=r.sum32,u=r.sum32_4,c=r.sum32_5,l=o.ch32,f=o.maj32,d=o.s0_256,h=o.s1_256,p=o.g0_256,g=o.g1_256,v=i.BlockHash,m=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function A(){if(!(this instanceof A))return new A;v.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=m,this.W=new Array(64)}r.inherits(A,v),e.exports=A,A.blockSize=512,A.outSize=256,A.hmacStrength=192,A.padLength=64,A.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r-1){var s=o.getAttribute("href");if(s)if(-1===s.toLowerCase().indexOf("https:")&&-1===s.toLowerCase().indexOf("http:")&&0!==s.indexOf("//")){var u=t.protocol+"//"+t.host;if(0===s.indexOf("/"))u+=s;else{var c=t.pathname.split("/");c.pop(),u+=c.join("/")+"/"+s}r.push(u)}else if(0===s.indexOf("//")){var l=t.protocol+s;r.push(l)}else r.push(s)}}return r}(),name:i}}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return d}));var r=function(){for(var e=0,t=0,n=arguments.length;t0?a-4:a;for(n=0;n>16&255,u[l++]=t>>8&255,u[l++]=255&t;2===s&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,u[l++]=255&t);1===s&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t);return u},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=16383,s=0,u=n-i;su?u:s+a));1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return o.join("")};for(var r=[],i=[],o="undefined"!==typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function l(e,t,n){for(var i,o,a=[],s=t;s>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t,n){"use strict";n(65),n(139);var r=n(329);n.o(r,"payloadId")&&n.d(t,"payloadId",(function(){return r.payloadId}));var i=n(330);n.d(t,"payloadId",(function(){return i.a}));n(331),n(332),n(337),n(338)},function(e,t,n){"use strict";var r=n(67);n.o(r,"payloadId")&&n.d(t,"payloadId",(function(){return r.payloadId}));r.isNode},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(139),n(65);function r(){return Date.now()*Math.pow(10,3)+Math.floor(Math.random()*Math.pow(10,3))}},function(e,t,n){"use strict"},function(e,t,n){"use strict";n(333)},function(e,t,n){"use strict";n(334),n(182),n(335),n(336)},function(e,t){},function(e,t,n){"use strict";var r=n(7),i=n(6),o=n(13),a=n(14),s=n(182);s.a,s.a},function(e,t){},function(e,t,n){"use strict"},function(e,t,n){"use strict"},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=1&&e<=40}},function(e,t){var n="[0-9]+",r="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+",i="(?:(?![A-Z0-9 $%*+\\-./:]|"+(r=r.replace(/u/g,"\\u"))+")(?:.|[\r\n]))+";t.KANJI=new RegExp(r,"g"),t.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),t.BYTE=new RegExp(i,"g"),t.NUMERIC=new RegExp(n,"g"),t.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");var o=new RegExp("^"+r+"$"),a=new RegExp("^[0-9]+$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");t.testKanji=function(e){return o.test(e)},t.testNumeric=function(e){return a.test(e)},t.testAlphanumeric=function(e){return s.test(e)}},function(e,t,n){"use strict";var r={single_source_shortest_paths:function(e,t,n){var i={},o={};o[t]=0;var a,s,u,c,l,f,d,h=r.PriorityQueue.make();for(h.push(t,0);!h.empty();)for(u in s=(a=h.pop()).value,c=a.cost,l=e[s]||{})l.hasOwnProperty(u)&&(f=c+l[u],d=o[u],("undefined"===typeof o[u]||d>f)&&(o[u]=f,h.push(u,f),i[u]=s));if("undefined"!==typeof n&&"undefined"===typeof o[n]){var p=["Could not find a path from ",t," to ",n,"."].join("");throw new Error(p)}return i},extract_shortest_path_from_predecessor_list:function(e,t){for(var n=[],r=t;r;)n.push(r),e[r],r=e[r];return n.reverse(),n},find_path:function(e,t,n){var i=r.single_source_shortest_paths(e,t,n);return r.extract_shortest_path_from_predecessor_list(i,n)},PriorityQueue:{make:function(e){var t,n=r.PriorityQueue,i={};for(t in e=e||{},n)n.hasOwnProperty(t)&&(i[t]=n[t]);return i.queue=[],i.sorter=e.sorter||n.default_sorter,i},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var n={value:e,cost:t};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};e.exports=r},function(e,t){function n(e){if("number"===typeof e&&(e=e.toString()),"string"!==typeof e)throw new Error("Color should be defined as hex string");var t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw new Error("Invalid hex color: "+e);3!==t.length&&4!==t.length||(t=Array.prototype.concat.apply([],t.map((function(e){return[e,e]})))),6===t.length&&t.push("F","F");var n=parseInt(t.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+t.slice(0,6).join("")}}t.getOptions=function(e){e||(e={}),e.color||(e.color={});var t="undefined"===typeof e.margin||null===e.margin||e.margin<0?4:e.margin,r=e.width&&e.width>=21?e.width:void 0,i=e.scale||4;return{width:r,scale:r?4:i,margin:t,color:{dark:n(e.color.dark||"#000000ff"),light:n(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},t.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},t.getImageWidth=function(e,n){var r=t.getScale(e,n);return Math.floor((e+2*n.margin)*r)},t.qrToImageData=function(e,n,r){for(var i=n.modules.size,o=n.modules.data,a=t.getScale(i,r),s=Math.floor((i+2*r.margin)*a),u=r.margin*a,c=[r.color.light,r.color.dark],l=0;l=u&&f>=u&&le._pos){var o=n.substr(e._pos);if("x-user-defined"===e._charset){for(var a=new i(o.length),s=0;se._pos&&(e.push(new i(new Uint8Array(c.result.slice(e._pos)))),e._pos=c.result.byteLength)},c.onload=function(){e.push(null)},c.readAsArrayBuffer(n)}e._xhr.readyState===u.DONE&&"ms-stream"!==e._mode&&e.push(null)}}).call(this,n(35),n(20),n(26).Buffer)},function(e,t,n){"use strict";(function(t,r){var i=n(201);e.exports=y;var o,a=n(700);y.ReadableState=A;n(66).EventEmitter;var s=function(e,t){return e.listeners(t).length},u=n(358),c=n(241).Buffer,l=t.Uint8Array||function(){};var f=Object.create(n(167));f.inherits=n(24);var d=n(701),h=void 0;h=d&&d.debuglog?d.debuglog("stream"):function(){};var p,g=n(702),v=n(359);f.inherits(y,u);var m=["error","close","destroy","pause","resume"];function A(e,t){e=e||{};var r=t instanceof(o=o||n(125));this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,a=e.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(a||0===a)?a:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new g,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(p||(p=n(104).StringDecoder),this.decoder=new p(e.encoding),this.encoding=e.encoding)}function y(e){if(o=o||n(125),!(this instanceof y))return new y(e);this._readableState=new A(e,this),this.readable=!0,e&&("function"===typeof e.read&&(this._read=e.read),"function"===typeof e.destroy&&(this._destroy=e.destroy)),u.call(this)}function b(e,t,n,r,i){var o,a=e._readableState;null===t?(a.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,k(e)}(e,a)):(i||(o=function(e,t){var n;r=t,c.isBuffer(r)||r instanceof l||"string"===typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk"));var r;return n}(a,t)),o?e.emit("error",o):a.objectMode||t&&t.length>0?("string"===typeof t||a.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=function(e){return c.from(e)}(t)),r?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):w(e,a,t,!0):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!n?(t=a.decoder.write(t),a.objectMode||0!==t.length?w(e,a,t,!1):C(e,a)):w(e,a,t,!1))):r||(a.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=_?e=_:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function k(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(h("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(I,e):I(e))}function I(e){h("emit readable"),e.emit("readable"),O(e)}function C(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(S,e,t))}function S(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=function(e,t,n){var r;eo.length?o.length:e;if(a===o.length?i+=o:i+=o.slice(0,e),0===(e-=a)){a===o.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(a));break}++r}return t.length-=r,i}(e,t):function(e,t){var n=c.allocUnsafe(e),r=t.head,i=1;r.data.copy(n),e-=r.data.length;for(;r=r.next;){var o=r.data,a=e>o.length?o.length:e;if(o.copy(n,n.length-e,0,a),0===(e-=a)){a===o.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(a));break}++i}return t.length-=i,n}(e,t);return r}(e,t.buffer,t.decoder),n);var n}function P(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(R,t,e))}function R(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function N(e,t){for(var n=0,r=e.length;n=t.highWaterMark||t.ended))return h("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?P(this):k(this),null;if(0===(e=E(e,t))&&t.ended)return 0===t.length&&P(this),null;var r,i=t.needReadable;return h("need readable",i),(0===t.length||t.length-e0?M(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&P(this)),null!==r&&this.emit("data",r),r},y.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},y.prototype.pipe=function(e,t){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,h("pipe count=%d opts=%j",o.pipesCount,t);var u=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?l:y;function c(t,r){h("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,h("cleanup"),e.removeListener("close",m),e.removeListener("finish",A),e.removeListener("drain",f),e.removeListener("error",v),e.removeListener("unpipe",c),n.removeListener("end",l),n.removeListener("end",y),n.removeListener("data",g),d=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||f())}function l(){h("onend"),e.end()}o.endEmitted?i.nextTick(u):n.once("end",u),e.on("unpipe",c);var f=function(e){return function(){var t=e._readableState;h("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,O(e))}}(n);e.on("drain",f);var d=!1;var p=!1;function g(t){h("ondata"),p=!1,!1!==e.write(t)||p||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==N(o.pipes,e))&&!d&&(h("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,p=!0),n.pause())}function v(t){h("onerror",t),y(),e.removeListener("error",v),0===s(e,"error")&&e.emit("error",t)}function m(){e.removeListener("finish",A),y()}function A(){h("onfinish"),e.removeListener("close",m),y()}function y(){h("unpipe"),n.unpipe(e)}return n.on("data",g),function(e,t,n){if("function"===typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?a(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",v),e.once("close",m),e.once("finish",A),e.emit("pipe",n),o.flowing||(h("pipe resume"),n.resume()),e},y.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o0)if("string"===typeof t||a.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=function(e){return s.from(e)}(t)),r)a.endEmitted?_(e,new w):S(e,a,t,!0);else if(a.ended)_(e,new y);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!n?(t=a.decoder.write(t),a.objectMode||0!==t.length?S(e,a,t,!1):P(e,a)):S(e,a,t,!1)}else r||(a.reading=!1,P(e,a));return!a.ended&&(a.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=x?e=x:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function O(e){var t=e._readableState;c("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(c("emitReadable",t.flowing),t.emittedReadable=!0,r.nextTick(M,e))}function M(e){var t=e._readableState;c("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,D(e)}function P(e,t){t.readingMore||(t.readingMore=!0,r.nextTick(R,e,t))}function R(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function T(e){c("readable nexttick read 0"),e.read(0)}function Q(e,t){c("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),D(e),t.flowing&&!t.reading&&e.read(0)}function D(e){var t=e._readableState;for(c("flow",t.flowing);t.flowing&&null!==e.read(););}function j(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function U(e){var t=e._readableState;c("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,r.nextTick(L,t,e))}function L(e,t){if(c("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function F(e,t){for(var n=0,r=e.length;n=t.highWaterMark:t.length>0)||t.ended))return c("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?U(this):O(this),null;if(0===(e=B(e,t))&&t.ended)return 0===t.length&&U(this),null;var r,i=t.needReadable;return c("need readable",i),(0===t.length||t.length-e0?j(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&U(this)),null!==r&&this.emit("data",r),r},I.prototype._read=function(e){_(this,new b("_read()"))},I.prototype.pipe=function(e,t){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,c("pipe count=%d opts=%j",i.pipesCount,t);var a=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?u:v;function s(t,r){c("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,c("cleanup"),e.removeListener("close",p),e.removeListener("finish",g),e.removeListener("drain",l),e.removeListener("error",h),e.removeListener("unpipe",s),n.removeListener("end",u),n.removeListener("end",v),n.removeListener("data",d),f=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}function u(){c("onend"),e.end()}i.endEmitted?r.nextTick(a):n.once("end",a),e.on("unpipe",s);var l=function(e){return function(){var t=e._readableState;c("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,D(e))}}(n);e.on("drain",l);var f=!1;function d(t){c("ondata");var r=e.write(t);c("dest.write",r),!1===r&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==F(i.pipes,e))&&!f&&(c("false write response, pause",i.awaitDrain),i.awaitDrain++),n.pause())}function h(t){c("onerror",t),v(),e.removeListener("error",h),0===o(e,"error")&&_(e,t)}function p(){e.removeListener("finish",g),v()}function g(){c("onfinish"),e.removeListener("close",p),v()}function v(){c("unpipe"),n.unpipe(e)}return n.on("data",d),function(e,t,n){if("function"===typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",h),e.once("close",p),e.once("finish",g),e.emit("pipe",n),i.flowing||(c("pipe resume"),n.resume()),e},I.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,c("on readable",i.length,i.reading),i.length?O(this):i.reading||r.nextTick(T,this))),n},I.prototype.addListener=I.prototype.on,I.prototype.removeListener=function(e,t){var n=a.prototype.removeListener.call(this,e,t);return"readable"===e&&r.nextTick(N,this),n},I.prototype.removeAllListeners=function(e){var t=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||r.nextTick(N,this),t},I.prototype.resume=function(){var e=this._readableState;return e.flowing||(c("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,r.nextTick(Q,e,t))}(this,e)),e.paused=!1,this},I.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},I.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",(function(){if(c("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(c("wrapped data"),n.decoder&&(i=n.decoder.write(i)),!n.objectMode||null!==i&&void 0!==i)&&((n.objectMode||i&&i.length)&&(t.push(i)||(r=!0,e.pause())))})),e)void 0===this[i]&&"function"===typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o-1))throw new w(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(I.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(I.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),I.prototype._write=function(e,t,n){n(new g("_write()"))},I.prototype._writev=null,I.prototype.end=function(e,t,n){var i=this._writableState;return"function"===typeof e?(n=e,e=null,t=null):"function"===typeof t&&(n=t,t=null),null!==e&&void 0!==e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,n){t.ending=!0,M(e,t),n&&(t.finished?r.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,i,n),this},Object.defineProperty(I.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(I.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),I.prototype.destroy=f.destroy,I.prototype._undestroy=f.undestroy,I.prototype._destroy=function(e,t){t(e)}}).call(this,n(20),n(35))},function(e,t,n){"use strict";e.exports=l;var r=n(143).codes,i=r.ERR_METHOD_NOT_IMPLEMENTED,o=r.ERR_MULTIPLE_CALLBACK,a=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=r.ERR_TRANSFORM_WITH_LENGTH_0,u=n(144);function c(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(null===r)return this.emit("error",new o);n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]>8,a=255&i;o?n.push(o,a):n.push(a)}return n},r.zero2=i,r.toHex=o,r.encode=function(e,t){return"hex"===t?o(e):e}},function(e,t,n){"use strict";var r=t;r.base=n(204),r.short=n(740),r.mont=n(741),r.edwards=n(742)},function(e,t,n){"use strict";var r=n(37).Buffer,i=n(756).Transform;function o(e){i.call(this),this._block=r.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}n(24)(o,i),o.prototype._transform=function(e,t,n){var r=null;try{this.update(e,t)}catch(i){r=i}n(r)},o.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(n){t=n}e(t)},o.prototype.update=function(e,t){if(function(e,t){if(!r.isBuffer(e)&&"string"!==typeof e)throw new TypeError(t+" must be a string or a buffer")}(e,"Data"),this._finalized)throw new Error("Digest already called");r.isBuffer(e)||(e=r.from(e,t));for(var n=this._block,i=0;this._blockOffset+e.length-i>=this._blockSize;){for(var o=this._blockOffset;o0;++a)this._length[a]+=s,(s=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294967296*s);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var n=0;n<4;++n)this._length[n]=0;return t},o.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=o},function(e,t,n){"use strict";(function(t,r){var i;e.exports=I,I.ReadableState=k;n(66).EventEmitter;var o=function(e,t){return e.listeners(t).length},a=n(377),s=n(26).Buffer,u=t.Uint8Array||function(){};var c,l=n(757);c=l&&l.debuglog?l.debuglog("stream"):function(){};var f,d,h,p=n(758),g=n(378),v=n(379).getHighWaterMark,m=n(145).codes,A=m.ERR_INVALID_ARG_TYPE,y=m.ERR_STREAM_PUSH_AFTER_EOF,b=m.ERR_METHOD_NOT_IMPLEMENTED,w=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;n(24)(I,a);var _=g.errorOrDestroy,E=["error","close","destroy","pause","resume"];function k(e,t,r){i=i||n(146),e=e||{},"boolean"!==typeof r&&(r=t instanceof i),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=v(this,e,"readableHighWaterMark",r),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(f||(f=n(104).StringDecoder),this.decoder=new f(e.encoding),this.encoding=e.encoding)}function I(e){if(i=i||n(146),!(this instanceof I))return new I(e);var t=this instanceof i;this._readableState=new k(e,this,t),this.readable=!0,e&&("function"===typeof e.read&&(this._read=e.read),"function"===typeof e.destroy&&(this._destroy=e.destroy)),a.call(this)}function C(e,t,n,r,i){c("readableAddChunk",t);var o,a=e._readableState;if(null===t)a.reading=!1,function(e,t){if(c("onEofChunk"),t.ended)return;if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,t.sync?O(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,M(e)))}(e,a);else if(i||(o=function(e,t){var n;r=t,s.isBuffer(r)||r instanceof u||"string"===typeof t||void 0===t||e.objectMode||(n=new A("chunk",["string","Buffer","Uint8Array"],t));var r;return n}(a,t)),o)_(e,o);else if(a.objectMode||t&&t.length>0)if("string"===typeof t||a.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=function(e){return s.from(e)}(t)),r)a.endEmitted?_(e,new w):S(e,a,t,!0);else if(a.ended)_(e,new y);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!n?(t=a.decoder.write(t),a.objectMode||0!==t.length?S(e,a,t,!1):P(e,a)):S(e,a,t,!1)}else r||(a.reading=!1,P(e,a));return!a.ended&&(a.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=x?e=x:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function O(e){var t=e._readableState;c("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(c("emitReadable",t.flowing),t.emittedReadable=!0,r.nextTick(M,e))}function M(e){var t=e._readableState;c("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,D(e)}function P(e,t){t.readingMore||(t.readingMore=!0,r.nextTick(R,e,t))}function R(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function T(e){c("readable nexttick read 0"),e.read(0)}function Q(e,t){c("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),D(e),t.flowing&&!t.reading&&e.read(0)}function D(e){var t=e._readableState;for(c("flow",t.flowing);t.flowing&&null!==e.read(););}function j(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function U(e){var t=e._readableState;c("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,r.nextTick(L,t,e))}function L(e,t){if(c("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function F(e,t){for(var n=0,r=e.length;n=t.highWaterMark:t.length>0)||t.ended))return c("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?U(this):O(this),null;if(0===(e=B(e,t))&&t.ended)return 0===t.length&&U(this),null;var r,i=t.needReadable;return c("need readable",i),(0===t.length||t.length-e0?j(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&U(this)),null!==r&&this.emit("data",r),r},I.prototype._read=function(e){_(this,new b("_read()"))},I.prototype.pipe=function(e,t){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,c("pipe count=%d opts=%j",i.pipesCount,t);var a=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?u:v;function s(t,r){c("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,c("cleanup"),e.removeListener("close",p),e.removeListener("finish",g),e.removeListener("drain",l),e.removeListener("error",h),e.removeListener("unpipe",s),n.removeListener("end",u),n.removeListener("end",v),n.removeListener("data",d),f=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}function u(){c("onend"),e.end()}i.endEmitted?r.nextTick(a):n.once("end",a),e.on("unpipe",s);var l=function(e){return function(){var t=e._readableState;c("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,D(e))}}(n);e.on("drain",l);var f=!1;function d(t){c("ondata");var r=e.write(t);c("dest.write",r),!1===r&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==F(i.pipes,e))&&!f&&(c("false write response, pause",i.awaitDrain),i.awaitDrain++),n.pause())}function h(t){c("onerror",t),v(),e.removeListener("error",h),0===o(e,"error")&&_(e,t)}function p(){e.removeListener("finish",g),v()}function g(){c("onfinish"),e.removeListener("close",p),v()}function v(){c("unpipe"),n.unpipe(e)}return n.on("data",d),function(e,t,n){if("function"===typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",h),e.once("close",p),e.once("finish",g),e.emit("pipe",n),i.flowing||(c("pipe resume"),n.resume()),e},I.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,c("on readable",i.length,i.reading),i.length?O(this):i.reading||r.nextTick(T,this))),n},I.prototype.addListener=I.prototype.on,I.prototype.removeListener=function(e,t){var n=a.prototype.removeListener.call(this,e,t);return"readable"===e&&r.nextTick(N,this),n},I.prototype.removeAllListeners=function(e){var t=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||r.nextTick(N,this),t},I.prototype.resume=function(){var e=this._readableState;return e.flowing||(c("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,r.nextTick(Q,e,t))}(this,e)),e.paused=!1,this},I.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},I.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",(function(){if(c("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(c("wrapped data"),n.decoder&&(i=n.decoder.write(i)),!n.objectMode||null!==i&&void 0!==i)&&((n.objectMode||i&&i.length)&&(t.push(i)||(r=!0,e.pause())))})),e)void 0===this[i]&&"function"===typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o-1))throw new w(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(I.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(I.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),I.prototype._write=function(e,t,n){n(new g("_write()"))},I.prototype._writev=null,I.prototype.end=function(e,t,n){var i=this._writableState;return"function"===typeof e?(n=e,e=null,t=null):"function"===typeof t&&(n=t,t=null),null!==e&&void 0!==e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,n){t.ending=!0,M(e,t),n&&(t.finished?r.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,i,n),this},Object.defineProperty(I.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(I.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),I.prototype.destroy=f.destroy,I.prototype._undestroy=f.undestroy,I.prototype._destroy=function(e,t){t(e)}}).call(this,n(20),n(35))},function(e,t,n){"use strict";e.exports=l;var r=n(145).codes,i=r.ERR_METHOD_NOT_IMPLEMENTED,o=r.ERR_MULTIPLE_CALLBACK,a=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=r.ERR_TRANSFORM_WITH_LENGTH_0,u=n(146);function c(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(null===r)return this.emit("error",new o);n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function d(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function h(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}r(u,i),u.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},u.prototype._update=function(e){for(var t,n=this._w,r=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,p=0|this._f,g=0|this._g,v=0|this._h,m=0;m<16;++m)n[m]=e.readInt32BE(4*m);for(;m<64;++m)n[m]=0|(((t=n[m-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+n[m-7]+h(n[m-15])+n[m-16];for(var A=0;A<64;++A){var y=v+d(u)+c(u,p,g)+a[A]+n[A]|0,b=f(r)+l(r,i,o)|0;v=g,g=p,p=u,u=s+y|0,s=o,o=i,i=r,r=y+b|0}this._a=r+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0,this._f=p+this._f|0,this._g=g+this._g|0,this._h=v+this._h|0},u.prototype._hash=function(){var e=o.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=u},function(e,t,n){var r=n(24),i=n(147),o=n(37).Buffer,a=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],s=new Array(160);function u(){this.init(),this._w=s,i.call(this,128,112)}function c(e,t,n){return n^e&(t^n)}function l(e,t,n){return e&t|n&(e|t)}function f(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function d(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function h(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function g(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function v(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function m(e,t){return e>>>0>>0?1:0}r(u,i),u.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},u.prototype._update=function(e){for(var t=this._w,n=0|this._ah,r=0|this._bh,i=0|this._ch,o=0|this._dh,s=0|this._eh,u=0|this._fh,A=0|this._gh,y=0|this._hh,b=0|this._al,w=0|this._bl,_=0|this._cl,E=0|this._dl,k=0|this._el,I=0|this._fl,C=0|this._gl,S=0|this._hl,x=0;x<32;x+=2)t[x]=e.readInt32BE(4*x),t[x+1]=e.readInt32BE(4*x+4);for(;x<160;x+=2){var B=t[x-30],O=t[x-30+1],M=h(B,O),P=p(O,B),R=g(B=t[x-4],O=t[x-4+1]),N=v(O,B),T=t[x-14],Q=t[x-14+1],D=t[x-32],j=t[x-32+1],U=P+Q|0,L=M+T+m(U,P)|0;L=(L=L+R+m(U=U+N|0,N)|0)+D+m(U=U+j|0,j)|0,t[x]=L,t[x+1]=U}for(var F=0;F<160;F+=2){L=t[F],U=t[F+1];var H=l(n,r,i),J=l(b,w,_),q=f(n,b),G=f(b,n),z=d(s,k),V=d(k,s),W=a[F],K=a[F+1],Y=c(s,u,A),Z=c(k,I,C),X=S+V|0,$=y+z+m(X,S)|0;$=($=($=$+Y+m(X=X+Z|0,Z)|0)+W+m(X=X+K|0,K)|0)+L+m(X=X+U|0,U)|0;var ee=G+J|0,te=q+H+m(ee,G)|0;y=A,S=C,A=u,C=I,u=s,I=k,s=o+$+m(k=E+X|0,E)|0,o=i,E=_,i=r,_=w,r=n,w=b,n=$+te+m(b=X+ee|0,X)|0}this._al=this._al+b|0,this._bl=this._bl+w|0,this._cl=this._cl+_|0,this._dl=this._dl+E|0,this._el=this._el+k|0,this._fl=this._fl+I|0,this._gl=this._gl+C|0,this._hl=this._hl+S|0,this._ah=this._ah+n+m(this._al,b)|0,this._bh=this._bh+r+m(this._bl,w)|0,this._ch=this._ch+i+m(this._cl,_)|0,this._dh=this._dh+o+m(this._dl,E)|0,this._eh=this._eh+s+m(this._el,k)|0,this._fh=this._fh+u+m(this._fl,I)|0,this._gh=this._gh+A+m(this._gl,C)|0,this._hh=this._hh+y+m(this._hl,S)|0},u.prototype._hash=function(){var e=o.allocUnsafe(64);function t(t,n,r){e.writeInt32BE(t,r),e.writeInt32BE(n,r+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=u},function(e,t){e.exports=function(e){if("string"!==typeof e)throw new Error("[is-hex-prefixed] value must be type 'string', is currently type "+typeof e+", while checking isHexPrefixed.");return"0x"===e.slice(0,2)}},function(e,t,n){"use strict";var r=function(e,t){return function(){for(var n=this,r=t.promiseModule,i=new Array(arguments.length),o=0;o=e.params.length?e.params:"eth_getBlockByNumber"===e.method?e.params.slice(1):e.params.slice(0,t)}function a(e){switch(e.method){case"eth_getStorageAt":return 2;case"eth_getBalance":case"eth_getCode":case"eth_getTransactionCount":case"eth_call":case"eth_estimateGas":return 1;case"eth_getBlockByNumber":return 0;default:return}}function s(e){switch(e.method){case"web3_clientVersion":case"web3_sha3":case"eth_protocolVersion":case"eth_getBlockTransactionCountByHash":case"eth_getUncleCountByBlockHash":case"eth_getCode":case"eth_getBlockByHash":case"eth_getTransactionByHash":case"eth_getTransactionByBlockHashAndIndex":case"eth_getTransactionReceipt":case"eth_getUncleByBlockHashAndIndex":case"eth_getCompilers":case"eth_compileLLL":case"eth_compileSolidity":case"eth_compileSerpent":case"shh_version":return"perma";case"eth_getBlockByNumber":case"eth_getBlockTransactionCountByNumber":case"eth_getUncleCountByBlockNumber":case"eth_getTransactionByBlockNumberAndIndex":case"eth_getUncleByBlockNumberAndIndex":return"fork";case"eth_gasPrice":case"eth_getBalance":case"eth_getStorageAt":case"eth_getTransactionCount":case"eth_call":case"eth_estimateGas":case"eth_getFilterLogs":case"eth_getLogs":case"eth_blockNumber":return"block";case"net_version":case"net_peerCount":case"net_listening":case"eth_syncing":case"eth_sign":case"eth_coinbase":case"eth_mining":case"eth_hashrate":case"eth_accounts":case"eth_sendTransaction":case"eth_sendRawTransaction":case"eth_newFilter":case"eth_newBlockFilter":case"eth_newPendingTransactionFilter":case"eth_uninstallFilter":case"eth_getFilterChanges":case"eth_getWork":case"eth_submitWork":case"eth_submitHashrate":case"db_putString":case"db_getString":case"db_putHex":case"db_getHex":case"shh_post":case"shh_newIdentity":case"shh_hasIdentity":case"shh_newGroup":case"shh_addToGroup":case"shh_newFilter":case"shh_uninstallFilter":case"shh_getFilterChanges":case"shh_getMessages":return"never"}}e.exports={cacheIdentifierForPayload:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!i(e))return null;var n=t.includeBlockRef,a=n?e.params:o(e);return e.method+":"+r(a)},canCache:i,blockTagForPayload:function(e){var t=a(e);if(t>=e.params.length)return null;return e.params[t]},paramsWithoutBlockTag:o,blockTagParamIndex:a,cacheTypeForPayload:s}},function(e,t,n){var r="undefined"!==typeof JSON?JSON:n(801);e.exports=function(e,t){t||(t={}),"function"===typeof t&&(t={cmp:t});var n=t.space||"";"number"===typeof n&&(n=Array(n+1).join(" "));var a,s="boolean"===typeof t.cycles&&t.cycles,u=t.replacer||function(e,t){return t},c=t.cmp&&(a=t.cmp,function(e){return function(t,n){var r={key:t,value:e[t]},i={key:n,value:e[n]};return a(r,i)}}),l=[];return function e(t,a,f,d){var h=n?"\n"+new Array(d+1).join(n):"",p=n?": ":":";if(f&&f.toJSON&&"function"===typeof f.toJSON&&(f=f.toJSON()),void 0!==(f=u.call(t,a,f))){if("object"!==typeof f||null===f)return r.stringify(f);if(i(f)){for(var g=[],v=0;v0?t.on("sync",b):n>0&&0===r&&t.removeListener("sync",b)}}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(808),t),i(n(809),t),i(n(810),t),i(n(396),t),i(n(397),t),i(n(815),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getUniqueId=void 0;var r=4294967295,i=Math.floor(Math.random()*r);t.getUniqueId=function(){return i=(i+1)%r}},function(e,t,n){"use strict";var r=n(19).default,i=n(28).default,o=n(73).default,a=n(29).default,s=n(9).default,u=n(10).default,c=n(30).default,l=n(31).default,f=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.JsonRpcEngine=void 0;var d=f(n(235)),h=n(811),p=function(e){c(n,e);var t=l(n);function n(){var e;return s(this,n),(e=t.call(this))._middleware=[],e}return u(n,[{key:"push",value:function(e){this._middleware.push(e)}},{key:"handle",value:function(e,t){if(t&&"function"!==typeof t)throw new Error('"callback" must be a function if provided.');return Array.isArray(e)?t?this._handleBatch(e,t):this._handleBatch(e):t?this._handle(e,t):this._promiseHandle(e)}},{key:"asMiddleware",value:function(){var e=this;return function(){var t=a(i().mark((function t(r,s,u,c){var l,f,d,h,p;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,n._runAllMiddleware(r,s,e._middleware);case 3:if(l=t.sent,f=o(l,3),d=f[0],h=f[1],p=f[2],!h){t.next=12;break}return t.next=11,n._runReturnHandlers(p);case 11:return t.abrupt("return",c(d));case 12:return t.abrupt("return",u(function(){var e=a(i().mark((function e(t){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n._runReturnHandlers(p);case 3:e.next=8;break;case 5:return e.prev=5,e.t0=e.catch(0),e.abrupt("return",t(e.t0));case 8:return e.abrupt("return",t());case 9:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(t){return e.apply(this,arguments)}}()));case 15:return t.prev=15,t.t0=t.catch(0),t.abrupt("return",c(t.t0));case 18:case"end":return t.stop()}}),t,null,[[0,15]])})));return function(e,n,r,i){return t.apply(this,arguments)}}()}},{key:"_handleBatch",value:function(){var e=a(i().mark((function e(t,n){var r;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Promise.all(t.map(this._promiseHandle.bind(this)));case 3:if(r=e.sent,!n){e.next=6;break}return e.abrupt("return",n(null,r));case 6:return e.abrupt("return",r);case 9:if(e.prev=9,e.t0=e.catch(0),!n){e.next=13;break}return e.abrupt("return",n(e.t0));case 13:throw e.t0;case 14:case"end":return e.stop()}}),e,this,[[0,9]])})));return function(t,n){return e.apply(this,arguments)}}()},{key:"_promiseHandle",value:function(e){var t=this;return new Promise((function(n){t._handle(e,(function(e,t){n(t)}))}))}},{key:"_handle",value:function(){var e=a(i().mark((function e(t,n){var r,o,a,s,u;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&!Array.isArray(t)&&"object"===typeof t){e.next=3;break}return r=new h.EthereumRpcError(h.errorCodes.rpc.invalidRequest,"Requests must be plain objects. Received: ".concat(typeof t),{request:t}),e.abrupt("return",n(r,{id:void 0,jsonrpc:"2.0",error:r}));case 3:if("string"===typeof t.method){e.next=6;break}return o=new h.EthereumRpcError(h.errorCodes.rpc.invalidRequest,"Must specify a string method. Received: ".concat(typeof t.method),{request:t}),e.abrupt("return",n(o,{id:t.id,jsonrpc:"2.0",error:o}));case 6:return a=Object.assign({},t),s={id:a.id,jsonrpc:a.jsonrpc},u=null,e.prev=9,e.next=12,this._processRequest(a,s);case 12:e.next=17;break;case 14:e.prev=14,e.t0=e.catch(9),u=e.t0;case 17:return u&&(delete s.result,s.error||(s.error=h.serializeError(u))),e.abrupt("return",n(u,s));case 19:case"end":return e.stop()}}),e,this,[[9,14]])})));return function(t,n){return e.apply(this,arguments)}}()},{key:"_processRequest",value:function(){var e=a(i().mark((function e(t,r){var a,s,u,c,l;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n._runAllMiddleware(t,r,this._middleware);case 2:return a=e.sent,s=o(a,3),u=s[0],c=s[1],l=s[2],n._checkForCompletion(t,r,c),e.next=10,n._runReturnHandlers(l);case 10:if(!u){e.next=12;break}throw u;case 12:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()}],[{key:"_runAllMiddleware",value:function(){var e=a(i().mark((function e(t,a,s){var u,c,l,f,d,h,p,g;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:u=[],c=null,l=!1,f=r(s),e.prev=4,f.s();case 6:if((d=f.n()).done){e.next=18;break}return h=d.value,e.next=10,n._runMiddleware(t,a,h,u);case 10:if(p=e.sent,g=o(p,2),c=g[0],!(l=g[1])){e.next=16;break}return e.abrupt("break",18);case 16:e.next=6;break;case 18:e.next=23;break;case 20:e.prev=20,e.t0=e.catch(4),f.e(e.t0);case 23:return e.prev=23,f.f(),e.finish(23);case 26:return e.abrupt("return",[c,l,u.reverse()]);case 27:case"end":return e.stop()}}),e,null,[[4,20,23,26]])})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"_runMiddleware",value:function(e,t,n,r){return new Promise((function(i){var o=function(e){var n=e||t.error;n&&(t.error=h.serializeError(n)),i([n,!0])};try{n(e,t,(function(n){t.error?o(t.error):(n&&("function"!==typeof n&&o(new h.EthereumRpcError(h.errorCodes.rpc.internal,'JsonRpcEngine: "next" return handlers must be functions. '+'Received "'.concat(typeof n,'" for request:\n').concat(g(e)),{request:e})),r.push(n)),i([null,!1]))}),o)}catch(a){o(a)}}))}},{key:"_runReturnHandlers",value:function(){var e=a(i().mark((function e(t){var n,o,a;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=r(t),e.prev=1,a=i().mark((function e(){var t;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=o.value,e.next=3,new Promise((function(e,n){t((function(t){return t?n(t):e()}))}));case 3:case"end":return e.stop()}}),e)})),n.s();case 4:if((o=n.n()).done){e.next=8;break}return e.delegateYield(a(),"t0",6);case 6:e.next=4;break;case 8:e.next=13;break;case 10:e.prev=10,e.t1=e.catch(1),n.e(e.t1);case 13:return e.prev=13,n.f(),e.finish(13);case 16:case"end":return e.stop()}}),e,null,[[1,10,13,16]])})));return function(t){return e.apply(this,arguments)}}()},{key:"_checkForCompletion",value:function(e,t,n){if(!("result"in t)&&!("error"in t))throw new h.EthereumRpcError(h.errorCodes.rpc.internal,"JsonRpcEngine: Response has no error or result for request:\n".concat(g(e)),{request:e});if(!n)throw new h.EthereumRpcError(h.errorCodes.rpc.internal,"JsonRpcEngine: Nothing ended request:\n".concat(g(e)),{request:e})}}]),n}(d.default);function g(e){return JSON.stringify(e,null,2)}t.JsonRpcEngine=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeError=t.isValidCode=t.getMessageFromCode=t.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;var r=n(258),i=n(257),o=r.errorCodes.rpc.internal,a="Unspecified error message. This is a bug, please report it.",s={code:o,message:u(o)};function u(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a;if(Number.isInteger(e)){var i=e.toString();if(d(r.errorValues,i))return r.errorValues[i].message;if(l(e))return t.JSON_RPC_SERVER_ERROR_MESSAGE}return n}function c(e){if(!Number.isInteger(e))return!1;var t=e.toString();return!!r.errorValues[t]||!!l(e)}function l(e){return e>=-32099&&e<=-32e3}function f(e){return e&&"object"===typeof e&&!Array.isArray(e)?Object.assign({},e):e}function d(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",t.getMessageFromCode=u,t.isValidCode=c,t.serializeError=function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=r.fallbackError,a=void 0===o?s:o,l=r.shouldIncludeStack,h=void 0!==l&&l;if(!a||!Number.isInteger(a.code)||"string"!==typeof a.message)throw new Error("Must provide fallback error with integer number code and string message.");if(e instanceof i.EthereumRpcError)return e.serialize();var p={};if(e&&"object"===typeof e&&!Array.isArray(e)&&d(e,"code")&&c(e.code)){var g=e;p.code=g.code,g.message&&"string"===typeof g.message?(p.message=g.message,d(g,"data")&&(p.data=g.data)):(p.message=u(p.code),p.data={originalError:f(e)})}else{p.code=a.code;var v=null===(t=e)||void 0===t?void 0:t.message;p.message=v&&"string"===typeof v?v:a.message,p.data={originalError:f(e)}}var m=null===(n=e)||void 0===n?void 0:n.stack;return h&&e&&m&&"string"===typeof m&&(p.stack=m),p}},function(e,t,n){e.exports=n(816)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){var n=[].slice.call(t.querySelectorAll("*"),0).reduce((function(t,n){return t.concat(n.shadowRoot?e(n.shadowRoot):[n])}),[]);return n.filter(a)};var r=/input|select|textarea|button|object|iframe/;function i(e){var t=e.offsetWidth<=0&&e.offsetHeight<=0;if(t&&!e.innerHTML)return!0;try{var n=window.getComputedStyle(e);return t?"visible"!==n.getPropertyValue("overflow")||e.scrollWidth<=0&&e.scrollHeight<=0:"none"==n.getPropertyValue("display")}catch(r){return console.warn("Failed to inspect element style"),!1}}function o(e,t){var n=e.nodeName.toLowerCase();return(r.test(n)&&!e.disabled||"a"===n&&e.href||t)&&function(e){for(var t=e,n=e.getRootNode&&e.getRootNode();t&&t!==document.body;){if(n&&t===n&&(t=n.host.parentNode),i(t))return!1;t=t.parentNode}return!0}(e)}function a(e){var t=e.getAttribute("tabindex");null===t&&(t=void 0);var n=isNaN(t);return(n||t>=0)&&o(e,!n)}e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){s&&(s.removeAttribute?s.removeAttribute("aria-hidden"):null!=s.length?s.forEach((function(e){return e.removeAttribute("aria-hidden")})):document.querySelectorAll(s).forEach((function(e){return e.removeAttribute("aria-hidden")})));s=null},t.log=function(){0},t.assertNodeList=u,t.setElement=function(e){var t=e;if("string"===typeof t&&a.canUseDOM){var n=document.querySelectorAll(t);u(n,t),t=n}return s=t||s},t.validateElement=c,t.hide=function(e){var t=!0,n=!1,r=void 0;try{for(var i,o=c(e)[Symbol.iterator]();!(t=(i=o.next()).done);t=!0){i.value.setAttribute("aria-hidden","true")}}catch(a){n=!0,r=a}finally{try{!t&&o.return&&o.return()}finally{if(n)throw r}}},t.show=function(e){var t=!0,n=!1,r=void 0;try{for(var i,o=c(e)[Symbol.iterator]();!(t=(i=o.next()).done);t=!0){i.value.removeAttribute("aria-hidden")}}catch(a){n=!0,r=a}finally{try{!t&&o.return&&o.return()}finally{if(n)throw r}}},t.documentNotReadyOrSSRTesting=function(){s=null};var r,i=n(576),o=(r=i)&&r.__esModule?r:{default:r},a=n(263);var s=null;function u(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function c(e){var t=e||s;return t?Array.isArray(t)||t instanceof HTMLCollection||t instanceof NodeList?t:[t]:((0,o.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),[])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.log=function(){console.log("portalOpenInstances ----------"),console.log(i.openInstances.length),i.openInstances.forEach((function(e){return console.log(e)})),console.log("end portalOpenInstances ----------")},t.resetState=function(){i=new r};var r=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.register=function(e){-1===t.openInstances.indexOf(e)&&(t.openInstances.push(e),t.emit("register"))},this.deregister=function(e){var n=t.openInstances.indexOf(e);-1!==n&&(t.openInstances.splice(n,1),t.emit("deregister"))},this.subscribe=function(e){t.subscribers.push(e)},this.emit=function(e){t.subscribers.forEach((function(n){return n(e,t.openInstances.slice())}))},this.openInstances=[],this.subscribers=[]},i=new r;t.default=i},function(e,t,n){var r=n(264),i=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],o=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];t.getBlocksCount=function(e,t){switch(t){case r.L:return i[4*(e-1)+0];case r.M:return i[4*(e-1)+1];case r.Q:return i[4*(e-1)+2];case r.H:return i[4*(e-1)+3];default:return}},t.getTotalCodewordsCount=function(e,t){switch(t){case r.L:return o[4*(e-1)+0];case r.M:return o[4*(e-1)+1];case r.Q:return o[4*(e-1)+2];case r.H:return o[4*(e-1)+3];default:return}}},function(e,t){t.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}},function(e,t){var n="[0-9]+",r="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+",i="(?:(?![A-Z0-9 $%*+\\-./:]|"+(r=r.replace(/u/g,"\\u"))+")(?:.|[\r\n]))+";t.KANJI=new RegExp(r,"g"),t.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),t.BYTE=new RegExp(i,"g"),t.NUMERIC=new RegExp(n,"g"),t.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");var o=new RegExp("^"+r+"$"),a=new RegExp("^[0-9]+$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");t.testKanji=function(e){return o.test(e)},t.testNumeric=function(e){return a.test(e)},t.testAlphanumeric=function(e){return s.test(e)}},function(e,t){function n(e){if("number"===typeof e&&(e=e.toString()),"string"!==typeof e)throw new Error("Color should be defined as hex string");var t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw new Error("Invalid hex color: "+e);3!==t.length&&4!==t.length||(t=Array.prototype.concat.apply([],t.map((function(e){return[e,e]})))),6===t.length&&t.push("F","F");var n=parseInt(t.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+t.slice(0,6).join("")}}t.getOptions=function(e){e||(e={}),e.color||(e.color={});var t="undefined"===typeof e.margin||null===e.margin||e.margin<0?4:e.margin,r=e.width&&e.width>=21?e.width:void 0,i=e.scale||4;return{width:r,scale:r?4:i,margin:t,color:{dark:n(e.color.dark||"#000000ff"),light:n(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},t.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},t.getImageWidth=function(e,n){var r=t.getScale(e,n);return Math.floor((e+2*n.margin)*r)},t.qrToImageData=function(e,n,r){for(var i=n.modules.size,o=n.modules.data,a=t.getScale(i,r),s=Math.floor((i+2*r.margin)*a),u=r.margin*a,c=[r.color.light,r.color.dark],l=0;l=u&&f>=u&&l1&&void 0!==arguments[1]&&arguments[1];return t?{h:Number(e&r),l:Number(e>>i&r)}:{h:0|Number(e>>i&r),l:0|Number(e&r)}}function a(e){for(var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=new Uint32Array(e.length),r=new Uint32Array(e.length),i=0;i>>0)<>>0)};function s(e,t,n,r){var i=(t>>>0)+(r>>>0);return{h:e+n+(i/Math.pow(2,32)|0)|0,l:0|i}}t.add=s;var u={fromBig:o,split:a,toBig:t.toBig,shrSH:function(e,t,n){return e>>>n},shrSL:function(e,t,n){return e<<32-n|t>>>n},rotrSH:function(e,t,n){return e>>>n|t<<32-n},rotrSL:function(e,t,n){return e<<32-n|t>>>n},rotrBH:function(e,t,n){return e<<64-n|t>>>n-32},rotrBL:function(e,t,n){return e>>>n-32|t<<64-n},rotr32H:function(e,t){return t},rotr32L:function(e,t){return e},rotlSH:function(e,t,n){return e<>>32-n},rotlSL:function(e,t,n){return t<>>32-n},rotlBH:function(e,t,n){return t<>>64-n},rotlBL:function(e,t,n){return e<>>64-n},add:s,add3L:function(e,t,n){return(e>>>0)+(t>>>0)+(n>>>0)},add3H:function(e,t,n,r){return t+n+r+(e/Math.pow(2,32)|0)|0},add4L:function(e,t,n,r){return(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)},add4H:function(e,t,n,r,i){return t+n+r+i+(e/Math.pow(2,32)|0)|0},add5H:function(e,t,n,r,i,o){return t+n+r+i+o+(e/Math.pow(2,32)|0)|0},add5L:function(e,t,n,r,i){return(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(i>>>0)}};t.default=u},function(e,t,n){"use strict";var r=n(24),i=n(886),o=n(110),a=n(37).Buffer,s=n(409),u=n(252),c=n(234),l=a.alloc(128);function f(e,t){o.call(this,"digest"),"string"===typeof t&&(t=a.from(t));var n="sha512"===e||"sha384"===e?128:64;(this._alg=e,this._key=t,t.length>n)?t=("rmd160"===e?new u:c(e)).update(t).digest():t.lengthn||t!==t)throw new TypeError("Bad key length")}},function(e,t,n){(function(t,n){var r;if(t.process&&t.process.browser)r="utf-8";else if(t.process&&t.process.version){r=parseInt(n.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}else r="utf-8";e.exports=r}).call(this,n(20),n(35))},function(e,t,n){var r=n(409),i=n(252),o=n(234),a=n(37).Buffer,s=n(412),u=n(413),c=n(415),l=a.alloc(128),f={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function d(e,t,n){var s=function(e){function t(t){return o(e).update(t).digest()}function n(e){return(new i).update(e).digest()}return"rmd160"===e||"ripemd160"===e?n:"md5"===e?r:t}(e),u="sha512"===e||"sha384"===e?128:64;t.length>u?t=s(t):t.length>>0},t.writeUInt32BE=function(e,t,n){e[0+n]=t>>>24,e[1+n]=t>>>16&255,e[2+n]=t>>>8&255,e[3+n]=255&t},t.ip=function(e,t,n,r){for(var i=0,o=0,a=6;a>=0;a-=2){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=e>>>s+a&1}for(a=6;a>=0;a-=2){for(s=1;s<=25;s+=8)o<<=1,o|=t>>>s+a&1;for(s=1;s<=25;s+=8)o<<=1,o|=e>>>s+a&1}n[r+0]=i>>>0,n[r+1]=o>>>0},t.rip=function(e,t,n,r){for(var i=0,o=0,a=0;a<4;a++)for(var s=24;s>=0;s-=8)i<<=1,i|=t>>>s+a&1,i<<=1,i|=e>>>s+a&1;for(a=4;a<8;a++)for(s=24;s>=0;s-=8)o<<=1,o|=t>>>s+a&1,o<<=1,o|=e>>>s+a&1;n[r+0]=i>>>0,n[r+1]=o>>>0},t.pc1=function(e,t,n,r){for(var i=0,o=0,a=7;a>=5;a--){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=e>>s+a&1}for(s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1;for(a=1;a<=3;a++){for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1;for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1}for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1;n[r+0]=i>>>0,n[r+1]=o>>>0},t.r28shl=function(e,t){return e<>>28-t};var r=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];t.pc2=function(e,t,n,i){for(var o=0,a=0,s=r.length>>>1,u=0;u>>r[u]&1;for(u=s;u>>r[u]&1;n[i+0]=o>>>0,n[i+1]=a>>>0},t.expand=function(e,t,n){var r=0,i=0;r=(1&e)<<5|e>>>27;for(var o=23;o>=15;o-=4)r<<=6,r|=e>>>o&63;for(o=11;o>=3;o-=4)i|=e>>>o&63,i<<=6;i|=(31&e)<<1|e>>>31,t[n+0]=r>>>0,t[n+1]=i>>>0};var i=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];t.substitute=function(e,t){for(var n=0,r=0;r<4;r++){n<<=4,n|=i[64*r+(e>>>18-6*r&63)]}for(r=0;r<4;r++){n<<=4,n|=i[256+64*r+(t>>>18-6*r&63)]}return n>>>0};var o=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];t.permute=function(e){for(var t=0,n=0;n>>o[n]&1;return t>>>0},t.padSplit=function(e,t,n){for(var r=e.toString(2);r.length>>1];n=o.r28shl(n,s),i=o.r28shl(i,s),o.pc2(n,i,e.keys,a)}},u.prototype._update=function(e,t,n,r){var i=this._desState,a=o.readUInt32BE(e,t),s=o.readUInt32BE(e,t+4);o.ip(a,s,i.tmp,0),a=i.tmp[0],s=i.tmp[1],"encrypt"===this.type?this._encrypt(i,a,s,i.tmp,0):this._decrypt(i,a,s,i.tmp,0),a=i.tmp[0],s=i.tmp[1],o.writeUInt32BE(n,a,r),o.writeUInt32BE(n,s,r+4)},u.prototype._pad=function(e,t){for(var n=e.length-t,r=t;r>>0,a=d}o.rip(s,a,r,i)},u.prototype._decrypt=function(e,t,n,r,i){for(var a=n,s=t,u=e.keys.length-2;u>=0;u-=2){var c=e.keys[u],l=e.keys[u+1];o.expand(a,e.tmp,0),c^=e.tmp[0],l^=e.tmp[1];var f=o.substitute(c,l),d=a;a=(s^o.permute(f))>>>0,s=d}o.rip(a,s,r,i)}},function(e,t,n){var r=n(172),i=n(37).Buffer,o=n(419);function a(e){var t=e._cipher.encryptBlockRaw(e._prev);return o(e._prev),t}t.encrypt=function(e,t){var n=Math.ceil(t.length/16),o=e._cache.length;e._cache=i.concat([e._cache,i.allocUnsafe(16*n)]);for(var s=0;se;)n.ishrn(1);if(n.isEven()&&n.iadd(s),n.testn(1)||n.iadd(u),t.cmp(u)){if(!t.cmp(c))for(;n.mod(l).cmp(f);)n.iadd(h)}else for(;n.mod(o).cmp(d);)n.iadd(h);if(v(p=n.shrn(1))&&v(n)&&m(p)&&m(n)&&a.test(p)&&a.test(n))return n}}},function(e,t,n){var r=n(47),i=n(247);function o(e){this.rand=e||new i.Rand}e.exports=o,o.create=function(e){return new o(e)},o.prototype._randbelow=function(e){var t=e.bitLength(),n=Math.ceil(t/8);do{var i=new r(this.rand.generate(n))}while(i.cmp(e)>=0);return i},o.prototype._randrange=function(e,t){var n=t.sub(e);return e.add(this._randbelow(n))},o.prototype.test=function(e,t,n){var i=e.bitLength(),o=r.mont(e),a=new r(1).toRed(o);t||(t=Math.max(1,i/48|0));for(var s=e.subn(1),u=0;!s.testn(u);u++);for(var c=e.shrn(u),l=s.toRed(o);t>0;t--){var f=this._randrange(new r(2),s);n&&n(f);var d=f.toRed(o).redPow(c);if(0!==d.cmp(a)&&0!==d.cmp(l)){for(var h=1;h0;t--){var l=this._randrange(new r(2),a),f=e.gcd(l);if(0!==f.cmpn(1))return f;var d=l.toRed(i).redPow(u);if(0!==d.cmp(o)&&0!==d.cmp(c)){for(var h=1;h0)if("string"===typeof t||a.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=function(e){return s.from(e)}(t)),r)a.endEmitted?_(e,new w):S(e,a,t,!0);else if(a.ended)_(e,new y);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!n?(t=a.decoder.write(t),a.objectMode||0!==t.length?S(e,a,t,!1):P(e,a)):S(e,a,t,!1)}else r||(a.reading=!1,P(e,a));return!a.ended&&(a.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=x?e=x:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function O(e){var t=e._readableState;c("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(c("emitReadable",t.flowing),t.emittedReadable=!0,r.nextTick(M,e))}function M(e){var t=e._readableState;c("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,D(e)}function P(e,t){t.readingMore||(t.readingMore=!0,r.nextTick(R,e,t))}function R(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function T(e){c("readable nexttick read 0"),e.read(0)}function Q(e,t){c("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),D(e),t.flowing&&!t.reading&&e.read(0)}function D(e){var t=e._readableState;for(c("flow",t.flowing);t.flowing&&null!==e.read(););}function j(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function U(e){var t=e._readableState;c("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,r.nextTick(L,t,e))}function L(e,t){if(c("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function F(e,t){for(var n=0,r=e.length;n=t.highWaterMark:t.length>0)||t.ended))return c("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?U(this):O(this),null;if(0===(e=B(e,t))&&t.ended)return 0===t.length&&U(this),null;var r,i=t.needReadable;return c("need readable",i),(0===t.length||t.length-e0?j(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&U(this)),null!==r&&this.emit("data",r),r},I.prototype._read=function(e){_(this,new b("_read()"))},I.prototype.pipe=function(e,t){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,c("pipe count=%d opts=%j",i.pipesCount,t);var a=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?u:v;function s(t,r){c("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,c("cleanup"),e.removeListener("close",p),e.removeListener("finish",g),e.removeListener("drain",l),e.removeListener("error",h),e.removeListener("unpipe",s),n.removeListener("end",u),n.removeListener("end",v),n.removeListener("data",d),f=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}function u(){c("onend"),e.end()}i.endEmitted?r.nextTick(a):n.once("end",a),e.on("unpipe",s);var l=function(e){return function(){var t=e._readableState;c("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,D(e))}}(n);e.on("drain",l);var f=!1;function d(t){c("ondata");var r=e.write(t);c("dest.write",r),!1===r&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==F(i.pipes,e))&&!f&&(c("false write response, pause",i.awaitDrain),i.awaitDrain++),n.pause())}function h(t){c("onerror",t),v(),e.removeListener("error",h),0===o(e,"error")&&_(e,t)}function p(){e.removeListener("finish",g),v()}function g(){c("onfinish"),e.removeListener("close",p),v()}function v(){c("unpipe"),n.unpipe(e)}return n.on("data",d),function(e,t,n){if("function"===typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",h),e.once("close",p),e.once("finish",g),e.emit("pipe",n),i.flowing||(c("pipe resume"),n.resume()),e},I.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,c("on readable",i.length,i.reading),i.length?O(this):i.reading||r.nextTick(T,this))),n},I.prototype.addListener=I.prototype.on,I.prototype.removeListener=function(e,t){var n=a.prototype.removeListener.call(this,e,t);return"readable"===e&&r.nextTick(N,this),n},I.prototype.removeAllListeners=function(e){var t=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||r.nextTick(N,this),t},I.prototype.resume=function(){var e=this._readableState;return e.flowing||(c("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,r.nextTick(Q,e,t))}(this,e)),e.paused=!1,this},I.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},I.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",(function(){if(c("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(c("wrapped data"),n.decoder&&(i=n.decoder.write(i)),!n.objectMode||null!==i&&void 0!==i)&&((n.objectMode||i&&i.length)&&(t.push(i)||(r=!0,e.pause())))})),e)void 0===this[i]&&"function"===typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o-1))throw new w(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(I.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(I.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),I.prototype._write=function(e,t,n){n(new g("_write()"))},I.prototype._writev=null,I.prototype.end=function(e,t,n){var i=this._writableState;return"function"===typeof e?(n=e,e=null,t=null):"function"===typeof t&&(n=t,t=null),null!==e&&void 0!==e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,n){t.ending=!0,M(e,t),n&&(t.finished?r.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,i,n),this},Object.defineProperty(I.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(I.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),I.prototype.destroy=f.destroy,I.prototype._undestroy=f.undestroy,I.prototype._destroy=function(e,t){t(e)}}).call(this,n(20),n(35))},function(e,t,n){"use strict";e.exports=l;var r=n(149).codes,i=r.ERR_METHOD_NOT_IMPLEMENTED,o=r.ERR_MULTIPLE_CALLBACK,a=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=r.ERR_TRANSFORM_WITH_LENGTH_0,u=n(150);function c(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(null===r)return this.emit("error",new o);n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:void r(!1,"Invalid character in "+e)}function u(e,t,n){var r=s(e,n);return n-1>=t&&(r|=s(e,n-1)<<4),r}function c(e,t,n,i){for(var o=0,a=0,s=Math.min(e.length,n),u=t;u=49?c-49+10:c>=17?c-17+10:c,r(c>=0&&a0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,n){if("number"===typeof e)return this._initNumber(e,t,n);if("object"===typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===n)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this._strip()},o.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r=t;r-=2)i=u(e,t,r)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(r=(e.length-t)%2===0?t+1:t;r=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var o=e.length-n,a=o%r,s=Math.min(o,o-a)+n,u=0,l=n;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(x){o.prototype.inspect=f}else o.prototype.inspect=f;function f(){return(this.red?""}var d=["","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"],h=[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],p=[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];o.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var i=0,o=0,a=0;a>>24-i&16777215,(i+=2)>=26&&(i-=26,a--),n=0!==o||a!==this.length-1?d[6-u.length]+u+n:u+n}for(0!==o&&(n=o.toString(16)+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var c=h[e],l=p[e];n="";var f=this.clone();for(f.negative=0;!f.isZero();){var g=f.modrn(l).toString(e);n=(f=f.idivn(l)).isZero()?g+n:d[c-g.length]+g+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},a&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(a,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function g(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,u=a/67108864|0;n.words[0]=s;for(var c=1;c>>26,f=67108863&u,d=Math.min(c,t.length-1),h=Math.max(0,c-e.length+1);h<=d;h++){var p=c-h|0;l+=(a=(i=0|e.words[p])*(o=0|t.words[h])+f)/67108864|0,f=67108863&a}n.words[c]=0|f,u=0|l}return 0!==u?n.words[c]=0|u:n.length--,n._strip()}o.prototype.toArrayLike=function(e,t,n){this._strip();var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0");var a=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](a,i),a},o.prototype._toArrayLikeLE=function(e,t){for(var n=0,r=0,i=0,o=0;i>8&255),n>16&255),6===o?(n>24&255),r=0,o=0):(r=a>>>24,o+=2)}if(n=0&&(e[n--]=a>>8&255),n>=0&&(e[n--]=a>>16&255),6===o?(n>=0&&(e[n--]=a>>24&255),r=0,o=0):(r=a>>>24,o+=2)}if(n>=0)for(e[n--]=r;n>=0;)e[n--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0===(8191&t)&&(n+=13,t>>>=13),0===(127&t)&&(n+=7,t>>>=7),0===(15&t)&&(n+=4,t>>>=4),0===(3&t)&&(n+=2,t>>>=2),0===(1&t)&&n++,n},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;ne.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;re.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){r("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-n),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){r("number"===typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(n=this,r=e):(n=e,r=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var o=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==o&&a>26,this.words[a]=67108863&t;if(0===o&&a>>13,h=0|a[1],p=8191&h,g=h>>>13,v=0|a[2],m=8191&v,A=v>>>13,y=0|a[3],b=8191&y,w=y>>>13,_=0|a[4],E=8191&_,k=_>>>13,I=0|a[5],C=8191&I,S=I>>>13,x=0|a[6],B=8191&x,O=x>>>13,M=0|a[7],P=8191&M,R=M>>>13,N=0|a[8],T=8191&N,Q=N>>>13,D=0|a[9],j=8191&D,U=D>>>13,L=0|s[0],F=8191&L,H=L>>>13,J=0|s[1],q=8191&J,G=J>>>13,z=0|s[2],V=8191&z,W=z>>>13,K=0|s[3],Y=8191&K,Z=K>>>13,X=0|s[4],$=8191&X,ee=X>>>13,te=0|s[5],ne=8191&te,re=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ue=8191&se,ce=se>>>13,le=0|s[8],fe=8191&le,de=le>>>13,he=0|s[9],pe=8191&he,ge=he>>>13;n.negative=e.negative^t.negative,n.length=19;var ve=(c+(r=Math.imul(f,F))|0)+((8191&(i=(i=Math.imul(f,H))+Math.imul(d,F)|0))<<13)|0;c=((o=Math.imul(d,H))+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(p,F),i=(i=Math.imul(p,H))+Math.imul(g,F)|0,o=Math.imul(g,H);var me=(c+(r=r+Math.imul(f,q)|0)|0)+((8191&(i=(i=i+Math.imul(f,G)|0)+Math.imul(d,q)|0))<<13)|0;c=((o=o+Math.imul(d,G)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(m,F),i=(i=Math.imul(m,H))+Math.imul(A,F)|0,o=Math.imul(A,H),r=r+Math.imul(p,q)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(g,q)|0,o=o+Math.imul(g,G)|0;var Ae=(c+(r=r+Math.imul(f,V)|0)|0)+((8191&(i=(i=i+Math.imul(f,W)|0)+Math.imul(d,V)|0))<<13)|0;c=((o=o+Math.imul(d,W)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(b,F),i=(i=Math.imul(b,H))+Math.imul(w,F)|0,o=Math.imul(w,H),r=r+Math.imul(m,q)|0,i=(i=i+Math.imul(m,G)|0)+Math.imul(A,q)|0,o=o+Math.imul(A,G)|0,r=r+Math.imul(p,V)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,W)|0;var ye=(c+(r=r+Math.imul(f,Y)|0)|0)+((8191&(i=(i=i+Math.imul(f,Z)|0)+Math.imul(d,Y)|0))<<13)|0;c=((o=o+Math.imul(d,Z)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(E,F),i=(i=Math.imul(E,H))+Math.imul(k,F)|0,o=Math.imul(k,H),r=r+Math.imul(b,q)|0,i=(i=i+Math.imul(b,G)|0)+Math.imul(w,q)|0,o=o+Math.imul(w,G)|0,r=r+Math.imul(m,V)|0,i=(i=i+Math.imul(m,W)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,W)|0,r=r+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(g,Y)|0,o=o+Math.imul(g,Z)|0;var be=(c+(r=r+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,ee)|0)+Math.imul(d,$)|0))<<13)|0;c=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(C,F),i=(i=Math.imul(C,H))+Math.imul(S,F)|0,o=Math.imul(S,H),r=r+Math.imul(E,q)|0,i=(i=i+Math.imul(E,G)|0)+Math.imul(k,q)|0,o=o+Math.imul(k,G)|0,r=r+Math.imul(b,V)|0,i=(i=i+Math.imul(b,W)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,W)|0,r=r+Math.imul(m,Y)|0,i=(i=i+Math.imul(m,Z)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,Z)|0,r=r+Math.imul(p,$)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(g,$)|0,o=o+Math.imul(g,ee)|0;var we=(c+(r=r+Math.imul(f,ne)|0)|0)+((8191&(i=(i=i+Math.imul(f,re)|0)+Math.imul(d,ne)|0))<<13)|0;c=((o=o+Math.imul(d,re)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(B,F),i=(i=Math.imul(B,H))+Math.imul(O,F)|0,o=Math.imul(O,H),r=r+Math.imul(C,q)|0,i=(i=i+Math.imul(C,G)|0)+Math.imul(S,q)|0,o=o+Math.imul(S,G)|0,r=r+Math.imul(E,V)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(k,V)|0,o=o+Math.imul(k,W)|0,r=r+Math.imul(b,Y)|0,i=(i=i+Math.imul(b,Z)|0)+Math.imul(w,Y)|0,o=o+Math.imul(w,Z)|0,r=r+Math.imul(m,$)|0,i=(i=i+Math.imul(m,ee)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,ee)|0,r=r+Math.imul(p,ne)|0,i=(i=i+Math.imul(p,re)|0)+Math.imul(g,ne)|0,o=o+Math.imul(g,re)|0;var _e=(c+(r=r+Math.imul(f,oe)|0)|0)+((8191&(i=(i=i+Math.imul(f,ae)|0)+Math.imul(d,oe)|0))<<13)|0;c=((o=o+Math.imul(d,ae)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(P,F),i=(i=Math.imul(P,H))+Math.imul(R,F)|0,o=Math.imul(R,H),r=r+Math.imul(B,q)|0,i=(i=i+Math.imul(B,G)|0)+Math.imul(O,q)|0,o=o+Math.imul(O,G)|0,r=r+Math.imul(C,V)|0,i=(i=i+Math.imul(C,W)|0)+Math.imul(S,V)|0,o=o+Math.imul(S,W)|0,r=r+Math.imul(E,Y)|0,i=(i=i+Math.imul(E,Z)|0)+Math.imul(k,Y)|0,o=o+Math.imul(k,Z)|0,r=r+Math.imul(b,$)|0,i=(i=i+Math.imul(b,ee)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,ee)|0,r=r+Math.imul(m,ne)|0,i=(i=i+Math.imul(m,re)|0)+Math.imul(A,ne)|0,o=o+Math.imul(A,re)|0,r=r+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(g,oe)|0,o=o+Math.imul(g,ae)|0;var Ee=(c+(r=r+Math.imul(f,ue)|0)|0)+((8191&(i=(i=i+Math.imul(f,ce)|0)+Math.imul(d,ue)|0))<<13)|0;c=((o=o+Math.imul(d,ce)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(T,F),i=(i=Math.imul(T,H))+Math.imul(Q,F)|0,o=Math.imul(Q,H),r=r+Math.imul(P,q)|0,i=(i=i+Math.imul(P,G)|0)+Math.imul(R,q)|0,o=o+Math.imul(R,G)|0,r=r+Math.imul(B,V)|0,i=(i=i+Math.imul(B,W)|0)+Math.imul(O,V)|0,o=o+Math.imul(O,W)|0,r=r+Math.imul(C,Y)|0,i=(i=i+Math.imul(C,Z)|0)+Math.imul(S,Y)|0,o=o+Math.imul(S,Z)|0,r=r+Math.imul(E,$)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,ee)|0,r=r+Math.imul(b,ne)|0,i=(i=i+Math.imul(b,re)|0)+Math.imul(w,ne)|0,o=o+Math.imul(w,re)|0,r=r+Math.imul(m,oe)|0,i=(i=i+Math.imul(m,ae)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,ae)|0,r=r+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(g,ue)|0,o=o+Math.imul(g,ce)|0;var ke=(c+(r=r+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,de)|0)+Math.imul(d,fe)|0))<<13)|0;c=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(j,F),i=(i=Math.imul(j,H))+Math.imul(U,F)|0,o=Math.imul(U,H),r=r+Math.imul(T,q)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(Q,q)|0,o=o+Math.imul(Q,G)|0,r=r+Math.imul(P,V)|0,i=(i=i+Math.imul(P,W)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,W)|0,r=r+Math.imul(B,Y)|0,i=(i=i+Math.imul(B,Z)|0)+Math.imul(O,Y)|0,o=o+Math.imul(O,Z)|0,r=r+Math.imul(C,$)|0,i=(i=i+Math.imul(C,ee)|0)+Math.imul(S,$)|0,o=o+Math.imul(S,ee)|0,r=r+Math.imul(E,ne)|0,i=(i=i+Math.imul(E,re)|0)+Math.imul(k,ne)|0,o=o+Math.imul(k,re)|0,r=r+Math.imul(b,oe)|0,i=(i=i+Math.imul(b,ae)|0)+Math.imul(w,oe)|0,o=o+Math.imul(w,ae)|0,r=r+Math.imul(m,ue)|0,i=(i=i+Math.imul(m,ce)|0)+Math.imul(A,ue)|0,o=o+Math.imul(A,ce)|0,r=r+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(g,fe)|0,o=o+Math.imul(g,de)|0;var Ie=(c+(r=r+Math.imul(f,pe)|0)|0)+((8191&(i=(i=i+Math.imul(f,ge)|0)+Math.imul(d,pe)|0))<<13)|0;c=((o=o+Math.imul(d,ge)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(j,q),i=(i=Math.imul(j,G))+Math.imul(U,q)|0,o=Math.imul(U,G),r=r+Math.imul(T,V)|0,i=(i=i+Math.imul(T,W)|0)+Math.imul(Q,V)|0,o=o+Math.imul(Q,W)|0,r=r+Math.imul(P,Y)|0,i=(i=i+Math.imul(P,Z)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,Z)|0,r=r+Math.imul(B,$)|0,i=(i=i+Math.imul(B,ee)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,ee)|0,r=r+Math.imul(C,ne)|0,i=(i=i+Math.imul(C,re)|0)+Math.imul(S,ne)|0,o=o+Math.imul(S,re)|0,r=r+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,ae)|0,r=r+Math.imul(b,ue)|0,i=(i=i+Math.imul(b,ce)|0)+Math.imul(w,ue)|0,o=o+Math.imul(w,ce)|0,r=r+Math.imul(m,fe)|0,i=(i=i+Math.imul(m,de)|0)+Math.imul(A,fe)|0,o=o+Math.imul(A,de)|0;var Ce=(c+(r=r+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,ge)|0)+Math.imul(g,pe)|0))<<13)|0;c=((o=o+Math.imul(g,ge)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(j,V),i=(i=Math.imul(j,W))+Math.imul(U,V)|0,o=Math.imul(U,W),r=r+Math.imul(T,Y)|0,i=(i=i+Math.imul(T,Z)|0)+Math.imul(Q,Y)|0,o=o+Math.imul(Q,Z)|0,r=r+Math.imul(P,$)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,ee)|0,r=r+Math.imul(B,ne)|0,i=(i=i+Math.imul(B,re)|0)+Math.imul(O,ne)|0,o=o+Math.imul(O,re)|0,r=r+Math.imul(C,oe)|0,i=(i=i+Math.imul(C,ae)|0)+Math.imul(S,oe)|0,o=o+Math.imul(S,ae)|0,r=r+Math.imul(E,ue)|0,i=(i=i+Math.imul(E,ce)|0)+Math.imul(k,ue)|0,o=o+Math.imul(k,ce)|0,r=r+Math.imul(b,fe)|0,i=(i=i+Math.imul(b,de)|0)+Math.imul(w,fe)|0,o=o+Math.imul(w,de)|0;var Se=(c+(r=r+Math.imul(m,pe)|0)|0)+((8191&(i=(i=i+Math.imul(m,ge)|0)+Math.imul(A,pe)|0))<<13)|0;c=((o=o+Math.imul(A,ge)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(j,Y),i=(i=Math.imul(j,Z))+Math.imul(U,Y)|0,o=Math.imul(U,Z),r=r+Math.imul(T,$)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(Q,$)|0,o=o+Math.imul(Q,ee)|0,r=r+Math.imul(P,ne)|0,i=(i=i+Math.imul(P,re)|0)+Math.imul(R,ne)|0,o=o+Math.imul(R,re)|0,r=r+Math.imul(B,oe)|0,i=(i=i+Math.imul(B,ae)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,ae)|0,r=r+Math.imul(C,ue)|0,i=(i=i+Math.imul(C,ce)|0)+Math.imul(S,ue)|0,o=o+Math.imul(S,ce)|0,r=r+Math.imul(E,fe)|0,i=(i=i+Math.imul(E,de)|0)+Math.imul(k,fe)|0,o=o+Math.imul(k,de)|0;var xe=(c+(r=r+Math.imul(b,pe)|0)|0)+((8191&(i=(i=i+Math.imul(b,ge)|0)+Math.imul(w,pe)|0))<<13)|0;c=((o=o+Math.imul(w,ge)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(j,$),i=(i=Math.imul(j,ee))+Math.imul(U,$)|0,o=Math.imul(U,ee),r=r+Math.imul(T,ne)|0,i=(i=i+Math.imul(T,re)|0)+Math.imul(Q,ne)|0,o=o+Math.imul(Q,re)|0,r=r+Math.imul(P,oe)|0,i=(i=i+Math.imul(P,ae)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,ae)|0,r=r+Math.imul(B,ue)|0,i=(i=i+Math.imul(B,ce)|0)+Math.imul(O,ue)|0,o=o+Math.imul(O,ce)|0,r=r+Math.imul(C,fe)|0,i=(i=i+Math.imul(C,de)|0)+Math.imul(S,fe)|0,o=o+Math.imul(S,de)|0;var Be=(c+(r=r+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,ge)|0)+Math.imul(k,pe)|0))<<13)|0;c=((o=o+Math.imul(k,ge)|0)+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,r=Math.imul(j,ne),i=(i=Math.imul(j,re))+Math.imul(U,ne)|0,o=Math.imul(U,re),r=r+Math.imul(T,oe)|0,i=(i=i+Math.imul(T,ae)|0)+Math.imul(Q,oe)|0,o=o+Math.imul(Q,ae)|0,r=r+Math.imul(P,ue)|0,i=(i=i+Math.imul(P,ce)|0)+Math.imul(R,ue)|0,o=o+Math.imul(R,ce)|0,r=r+Math.imul(B,fe)|0,i=(i=i+Math.imul(B,de)|0)+Math.imul(O,fe)|0,o=o+Math.imul(O,de)|0;var Oe=(c+(r=r+Math.imul(C,pe)|0)|0)+((8191&(i=(i=i+Math.imul(C,ge)|0)+Math.imul(S,pe)|0))<<13)|0;c=((o=o+Math.imul(S,ge)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(j,oe),i=(i=Math.imul(j,ae))+Math.imul(U,oe)|0,o=Math.imul(U,ae),r=r+Math.imul(T,ue)|0,i=(i=i+Math.imul(T,ce)|0)+Math.imul(Q,ue)|0,o=o+Math.imul(Q,ce)|0,r=r+Math.imul(P,fe)|0,i=(i=i+Math.imul(P,de)|0)+Math.imul(R,fe)|0,o=o+Math.imul(R,de)|0;var Me=(c+(r=r+Math.imul(B,pe)|0)|0)+((8191&(i=(i=i+Math.imul(B,ge)|0)+Math.imul(O,pe)|0))<<13)|0;c=((o=o+Math.imul(O,ge)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(j,ue),i=(i=Math.imul(j,ce))+Math.imul(U,ue)|0,o=Math.imul(U,ce),r=r+Math.imul(T,fe)|0,i=(i=i+Math.imul(T,de)|0)+Math.imul(Q,fe)|0,o=o+Math.imul(Q,de)|0;var Pe=(c+(r=r+Math.imul(P,pe)|0)|0)+((8191&(i=(i=i+Math.imul(P,ge)|0)+Math.imul(R,pe)|0))<<13)|0;c=((o=o+Math.imul(R,ge)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(j,fe),i=(i=Math.imul(j,de))+Math.imul(U,fe)|0,o=Math.imul(U,de);var Re=(c+(r=r+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,ge)|0)+Math.imul(Q,pe)|0))<<13)|0;c=((o=o+Math.imul(Q,ge)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ne=(c+(r=Math.imul(j,pe))|0)+((8191&(i=(i=Math.imul(j,ge))+Math.imul(U,pe)|0))<<13)|0;return c=((o=Math.imul(U,ge))+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,u[0]=ve,u[1]=me,u[2]=Ae,u[3]=ye,u[4]=be,u[5]=we,u[6]=_e,u[7]=Ee,u[8]=ke,u[9]=Ie,u[10]=Ce,u[11]=Se,u[12]=xe,u[13]=Be,u[14]=Oe,u[15]=Me,u[16]=Pe,u[17]=Re,u[18]=Ne,0!==c&&(u[19]=c,n.length++),n};function m(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}n.words[o]=s,r=a,a=i}return 0!==r?n.words[o]=r:n.length--,n._strip()}function A(e,t,n){return m(e,t,n)}function y(e,t){this.x=e,this.y=t}Math.imul||(v=g),o.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?v(this,e,t):n<63?g(this,e,t):n<1024?m(this,e,t):A(this,e,t)},y.prototype.makeRBT=function(e){for(var t=new Array(e),n=o.prototype._countBits(e)-1,r=0;r>=1;return r},y.prototype.permute=function(e,t,n,r,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,n[2*a+1]=8191&o,o>>>=13;for(a=2*t;a>=26,n+=o/67108864|0,n+=a>>>26,this.words[i]=67108863&a}return 0!==n&&(this.words[i]=n,this.length++),t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n>>i&1}return t}(e);if(0===t.length)return new o(1);for(var n=this,r=0;r=0);var t,n=e%26,i=(e-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(t=0;t>>26-n}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==l||c>=i);c--){var f=0|this.words[c];this.words[c]=l<<26-o|f>>>o,l=f&s}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(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){r("number"===typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(r("number"===typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(u/67108864|0),this.words[i+n]=67108863&o}for(;i>26,this.words[i+n]=67108863&o;if(0===s)return this._strip();for(r(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),i=e,a=0|i.words[i.length-1];0!==(n=26-this._countBits(a))&&(i=i.ushln(n),r.iushln(n),a=0|i.words[i.length-1]);var s,u=r.length-i.length;if("mod"!==t){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c=0;f--){var d=67108864*(0|r.words[i.length+f])+(0|r.words[i.length+f-1]);for(d=Math.min(d/a|0,67108863),r._ishlnsubmul(i,d,f);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(i,1,f),r.isZero()||(r.negative^=1);s&&(s.words[f]=d)}return s&&s._strip(),r._strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:s||null,mod:r}},o.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),o=n.cmp(r);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=(1<<26)%e,i=0,o=this.length-1;o>=0;o--)i=(n*i+(0|this.words[o]))%e;return t?-i:i},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*n;this.words[i]=o/e|0,n=o%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++c;for(var l=n.clone(),f=t.clone();!t.isZero();){for(var d=0,h=1;0===(t.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(l),a.isub(f)),i.iushrn(1),a.iushrn(1);for(var p=0,g=1;0===(n.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(l),u.isub(f)),s.iushrn(1),u.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(s),a.isub(u)):(n.isub(t),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:n.iushln(c)}},o.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),s=new o(0),u=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,l=1;0===(t.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var f=0,d=1;0===(n.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(n.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(s)):(n.isub(t),s.isub(a))}return(i=0===t.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var o=t;t=n,n=o}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){r("number"===typeof e);var t=e%26,n=(e-t)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){ri&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new C(e)},o.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var b={k256:null,p224:null,p192:null,p25519:null};function w(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function k(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function I(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function C(e){if("string"===typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function S(e){C.call(this,e),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)}w.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},w.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},w.prototype.split=function(e,t){e.iushrn(this.n,0,t)},w.prototype.imulK=function(e){return e.imul(this.k)},i(_,w),_.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},_.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(b[e])return b[e];var t;if("k256"===e)t=new _;else if("p224"===e)t=new E;else if("p192"===e)t=new k;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new I}return b[e]=t,t},C.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},C.prototype._verify2=function(e,t){r(0===(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},C.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(l(e,e.umod(this.m)._forceRed(this)),e)},C.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},C.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},C.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},C.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},C.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},C.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},C.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},C.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},C.prototype.isqr=function(e){return this.imul(e,e.clone())},C.prototype.sqr=function(e){return this.mul(e,e)},C.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2===1),3===t){var n=this.m.add(new o(1)).iushrn(2);return this.pow(e,n)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);r(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,c).cmp(u);)l.redIAdd(u);for(var f=this.pow(l,i),d=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=a;0!==h.cmp(s);){for(var g=h,v=0;0!==g.cmp(s);v++)g=g.redSqr();r(v=0;r--){for(var c=t.words[r],l=u-1;l>=0;l--){var f=c>>l&1;i!==n[0]&&(i=this.sqr(i)),0!==f||0!==a?(a<<=1,a|=f,(4===++s||0===r&&0===l)&&(i=this.mul(i,n[a]),s=0,a=0)):s=0}u=26}return i},C.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},C.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new S(e)},i(S,C),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,n(77)(e))},function(e,t,n){"use strict";var r=t;r.bignum=n(47),r.define=n(921).define,r.base=n(924),r.constants=n(925),r.decoders=n(435),r.encoders=n(433)},function(e,t,n){"use strict";var r=t;r.der=n(434),r.pem=n(922)},function(e,t,n){"use strict";var r=n(24),i=n(272).Buffer,o=n(273),a=n(275);function s(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new u,this.tree._init(e.body)}function u(e){o.call(this,"der",e)}function c(e){return e<10?"0"+e:e}e.exports=s,s.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},r(u,o),u.prototype._encodeComposite=function(e,t,n,r){var o=function(e,t,n,r){var i;"seqof"===e?e="seq":"setof"===e&&(e="set");if(a.tagByName.hasOwnProperty(e))i=a.tagByName[e];else{if("number"!==typeof e||(0|e)!==e)return r.error("Unknown tag: "+e);i=e}if(i>=31)return r.error("Multi-octet tag encoding unsupported");t||(i|=32);return i|=a.tagClassByName[n||"universal"]<<6}(e,t,n,this.reporter);if(r.length<128){var s=i.alloc(2);return s[0]=o,s[1]=r.length,this._createEncoderBuffer([s,r])}for(var u=1,c=r.length;c>=256;c>>=8)u++;var l=i.alloc(2+u);l[0]=o,l[1]=128|u;for(var f=1+u,d=r.length;d>0;f--,d>>=8)l[f]=255&d;return this._createEncoderBuffer([l,r])},u.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){for(var n=i.alloc(2*e.length),r=0;r=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}for(var a=0,s=0;s=128;u>>=7)a++}for(var c=i.alloc(a),l=c.length-1,f=e.length-1;f>=0;f--){var d=e[f];for(c[l--]=127&d;(d>>=7)>0;)c[l--]=128|127&d}return this._createEncoderBuffer(c)},u.prototype._encodeTime=function(e,t){var n,r=new Date(e);return"gentime"===t?n=[c(r.getUTCFullYear()),c(r.getUTCMonth()+1),c(r.getUTCDate()),c(r.getUTCHours()),c(r.getUTCMinutes()),c(r.getUTCSeconds()),"Z"].join(""):"utctime"===t?n=[c(r.getUTCFullYear()%100),c(r.getUTCMonth()+1),c(r.getUTCDate()),c(r.getUTCHours()),c(r.getUTCMinutes()),c(r.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(n,"octstr")},u.prototype._encodeNull=function(){return this._createEncoderBuffer("")},u.prototype._encodeInt=function(e,t){if("string"===typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!==typeof e&&!i.isBuffer(e)){var n=e.toArray();!e.sign&&128&n[0]&&n.unshift(0),e=i.from(n)}if(i.isBuffer(e)){var r=e.length;0===e.length&&r++;var o=i.alloc(r);return e.copy(o),0===e.length&&(o[0]=0),this._createEncoderBuffer(o)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);for(var a=1,s=e;s>=256;s>>=8)a++;for(var u=new Array(a),c=u.length-1;c>=0;c--)u[c]=255&e,e>>=8;return 128&u[0]&&u.unshift(0),this._createEncoderBuffer(i.from(u))},u.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},u.prototype._use=function(e,t){return"function"===typeof e&&(e=e(t)),e._getEncoder("der").tree},u.prototype._skipDefault=function(e,t,n){var r,i=this._baseState;if(null===i.default)return!1;var o=e.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,t,n).join()),o.length!==i.defaultBuffer.length)return!1;for(r=0;r>6],i=0===(32&n);if(31===(31&n)){var o=n;for(n=0;128===(128&o);){if(o=e.readUInt8(t),e.isError(o))return o;n<<=7,n|=127&o}}else n&=31;return{cls:r,primitive:i,tag:n,tagStr:s.tag[n]}}function f(e,t,n){var r=e.readUInt8(n);if(e.isError(r))return r;if(!t&&128===r)return null;if(0===(128&r))return r;var i=127&r;if(i>4)return e.error("length octect is too long");r=0;for(var o=0;o>>3,s=(0,u.rotr)(o,17)^(0,u.rotr)(o,19)^o>>>10;d[r]=s+d[r-7]+a+d[r-16]|0}var f,h=this.A,p=this.B,g=this.C,v=this.D,m=this.E,A=this.F,y=this.G,b=this.H;for(n=0;n<64;n++){var w=b+((0,u.rotr)(m,6)^(0,u.rotr)(m,11)^(0,u.rotr)(m,25))+((f=m)&A^~f&y)+l[n]+d[n]|0,_=((0,u.rotr)(h,2)^(0,u.rotr)(h,13)^(0,u.rotr)(h,22))+c(h,p,g)|0;b=y,y=A,A=m,m=v+w|0,v=g,g=p,p=h,h=w+_|0}h=h+this.A|0,p=p+this.B|0,g=g+this.C|0,v=v+this.D|0,m=m+this.E|0,A=A+this.F|0,y=y+this.G|0,b=b+this.H|0,this.set(h,p,g,v,m,A,y,b)}},{key:"roundClean",value:function(){d.fill(0)}},{key:"destroy",value:function(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}]),n}(s.SHA2);t.sha256=(0,u.wrapConstructor)((function(){return new h}))},function(e,t,n){"use strict";var r=n(44).default,i=n(9).default,o=n(10).default;Object.defineProperty(t,"__esModule",{value:!0}),t.Hmac=void 0;var a=function(){function e(t,n){i(this,e);var o=(new t).blockSize;this.hash=function(e){return(new t).update(e).digest()};var a=n;if(a.length>o&&(a=this.hash(a)),a.length>>32-t};function k(e,t,n,r){return 0===e?t^n^r:1===e?t&n|~t&r:2===e?(t|~n)^r:3===e?t&r|n&~r:t^(n|~r)}var I=new Uint32Array(16),C=function(e){o(n,e);var t=a(n);function n(){var e;return r(this,n),(e=t.call(this,64,20,8,!0)).h0=1732584193,e.h1=-271733879,e.h2=-1732584194,e.h3=271733878,e.h4=-1009589776,e}return i(n,[{key:"get",value:function(){return[this.h0,this.h1,this.h2,this.h3,this.h4]}},{key:"set",value:function(e,t,n,r,i){this.h0=0|e,this.h1=0|t,this.h2=0|n,this.h3=0|r,this.h4=0|i}},{key:"process",value:function(e,t){for(var n=0;n<16;n++,t+=4)I[n]=e.getUint32(t,!0);for(var r=0|this.h0,i=r,o=0|this.h1,a=o,s=0|this.h2,u=s,c=0|this.h3,l=c,f=0|this.h4,p=f,g=0;g<5;g++){for(var v=4-g,m=w[g],A=_[g],C=d[g],S=h[g],x=y[g],B=b[g],O=0;O<16;O++){var M=E(r+k(g,o,s,c)+I[C[O]]+m,x[O])+f|0;r=f,f=c,c=0|E(s,10),s=o,o=M}for(var P=0;P<16;P++){var R=E(i+k(v,a,u,l)+I[S[P]]+A,B[P])+p|0;i=p,p=l,l=0|E(u,10),u=a,a=R}}this.set(this.h1+s+l|0,this.h2+c+p|0,this.h3+f+i|0,this.h4+r+a|0,this.h0+o+u|0)}},{key:"roundClean",value:function(){I.fill(0)}},{key:"destroy",value:function(){this.destroyed=!0,this.buffer.fill(0),this.set(0,0,0,0,0)}}]),n}(s.SHA2);t.RIPEMD160=C,t.ripemd160=(0,u.wrapConstructor)((function(){return new C}))},function(e,t,n){(function(e){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function o(e,t,n){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var a;"object"===typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:n(943).Buffer}catch(x){}function s(e,t){var n=e.charCodeAt(t);return n>=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:void r(!1,"Invalid character in "+e)}function u(e,t,n){var r=s(e,n);return n-1>=t&&(r|=s(e,n-1)<<4),r}function c(e,t,n,i){for(var o=0,a=0,s=Math.min(e.length,n),u=t;u=49?c-49+10:c>=17?c-17+10:c,r(c>=0&&a0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,n){if("number"===typeof e)return this._initNumber(e,t,n);if("object"===typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===n)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this._strip()},o.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r=t;r-=2)i=u(e,t,r)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(r=(e.length-t)%2===0?t+1:t;r=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var o=e.length-n,a=o%r,s=Math.min(o,o-a)+n,u=0,l=n;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(x){o.prototype.inspect=f}else o.prototype.inspect=f;function f(){return(this.red?""}var d=["","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"],h=[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],p=[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];o.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var i=0,o=0,a=0;a>>24-i&16777215,(i+=2)>=26&&(i-=26,a--),n=0!==o||a!==this.length-1?d[6-u.length]+u+n:u+n}for(0!==o&&(n=o.toString(16)+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var c=h[e],l=p[e];n="";var f=this.clone();for(f.negative=0;!f.isZero();){var g=f.modrn(l).toString(e);n=(f=f.idivn(l)).isZero()?g+n:d[c-g.length]+g+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},a&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(a,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function g(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,u=a/67108864|0;n.words[0]=s;for(var c=1;c>>26,f=67108863&u,d=Math.min(c,t.length-1),h=Math.max(0,c-e.length+1);h<=d;h++){var p=c-h|0;l+=(a=(i=0|e.words[p])*(o=0|t.words[h])+f)/67108864|0,f=67108863&a}n.words[c]=0|f,u=0|l}return 0!==u?n.words[c]=0|u:n.length--,n._strip()}o.prototype.toArrayLike=function(e,t,n){this._strip();var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0");var a=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](a,i),a},o.prototype._toArrayLikeLE=function(e,t){for(var n=0,r=0,i=0,o=0;i>8&255),n>16&255),6===o?(n>24&255),r=0,o=0):(r=a>>>24,o+=2)}if(n=0&&(e[n--]=a>>8&255),n>=0&&(e[n--]=a>>16&255),6===o?(n>=0&&(e[n--]=a>>24&255),r=0,o=0):(r=a>>>24,o+=2)}if(n>=0)for(e[n--]=r;n>=0;)e[n--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0===(8191&t)&&(n+=13,t>>>=13),0===(127&t)&&(n+=7,t>>>=7),0===(15&t)&&(n+=4,t>>>=4),0===(3&t)&&(n+=2,t>>>=2),0===(1&t)&&n++,n},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;ne.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;re.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){r("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-n),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){r("number"===typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(n=this,r=e):(n=e,r=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var o=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==o&&a>26,this.words[a]=67108863&t;if(0===o&&a>>13,h=0|a[1],p=8191&h,g=h>>>13,v=0|a[2],m=8191&v,A=v>>>13,y=0|a[3],b=8191&y,w=y>>>13,_=0|a[4],E=8191&_,k=_>>>13,I=0|a[5],C=8191&I,S=I>>>13,x=0|a[6],B=8191&x,O=x>>>13,M=0|a[7],P=8191&M,R=M>>>13,N=0|a[8],T=8191&N,Q=N>>>13,D=0|a[9],j=8191&D,U=D>>>13,L=0|s[0],F=8191&L,H=L>>>13,J=0|s[1],q=8191&J,G=J>>>13,z=0|s[2],V=8191&z,W=z>>>13,K=0|s[3],Y=8191&K,Z=K>>>13,X=0|s[4],$=8191&X,ee=X>>>13,te=0|s[5],ne=8191&te,re=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ue=8191&se,ce=se>>>13,le=0|s[8],fe=8191&le,de=le>>>13,he=0|s[9],pe=8191&he,ge=he>>>13;n.negative=e.negative^t.negative,n.length=19;var ve=(c+(r=Math.imul(f,F))|0)+((8191&(i=(i=Math.imul(f,H))+Math.imul(d,F)|0))<<13)|0;c=((o=Math.imul(d,H))+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(p,F),i=(i=Math.imul(p,H))+Math.imul(g,F)|0,o=Math.imul(g,H);var me=(c+(r=r+Math.imul(f,q)|0)|0)+((8191&(i=(i=i+Math.imul(f,G)|0)+Math.imul(d,q)|0))<<13)|0;c=((o=o+Math.imul(d,G)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(m,F),i=(i=Math.imul(m,H))+Math.imul(A,F)|0,o=Math.imul(A,H),r=r+Math.imul(p,q)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(g,q)|0,o=o+Math.imul(g,G)|0;var Ae=(c+(r=r+Math.imul(f,V)|0)|0)+((8191&(i=(i=i+Math.imul(f,W)|0)+Math.imul(d,V)|0))<<13)|0;c=((o=o+Math.imul(d,W)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(b,F),i=(i=Math.imul(b,H))+Math.imul(w,F)|0,o=Math.imul(w,H),r=r+Math.imul(m,q)|0,i=(i=i+Math.imul(m,G)|0)+Math.imul(A,q)|0,o=o+Math.imul(A,G)|0,r=r+Math.imul(p,V)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,W)|0;var ye=(c+(r=r+Math.imul(f,Y)|0)|0)+((8191&(i=(i=i+Math.imul(f,Z)|0)+Math.imul(d,Y)|0))<<13)|0;c=((o=o+Math.imul(d,Z)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(E,F),i=(i=Math.imul(E,H))+Math.imul(k,F)|0,o=Math.imul(k,H),r=r+Math.imul(b,q)|0,i=(i=i+Math.imul(b,G)|0)+Math.imul(w,q)|0,o=o+Math.imul(w,G)|0,r=r+Math.imul(m,V)|0,i=(i=i+Math.imul(m,W)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,W)|0,r=r+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(g,Y)|0,o=o+Math.imul(g,Z)|0;var be=(c+(r=r+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,ee)|0)+Math.imul(d,$)|0))<<13)|0;c=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(C,F),i=(i=Math.imul(C,H))+Math.imul(S,F)|0,o=Math.imul(S,H),r=r+Math.imul(E,q)|0,i=(i=i+Math.imul(E,G)|0)+Math.imul(k,q)|0,o=o+Math.imul(k,G)|0,r=r+Math.imul(b,V)|0,i=(i=i+Math.imul(b,W)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,W)|0,r=r+Math.imul(m,Y)|0,i=(i=i+Math.imul(m,Z)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,Z)|0,r=r+Math.imul(p,$)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(g,$)|0,o=o+Math.imul(g,ee)|0;var we=(c+(r=r+Math.imul(f,ne)|0)|0)+((8191&(i=(i=i+Math.imul(f,re)|0)+Math.imul(d,ne)|0))<<13)|0;c=((o=o+Math.imul(d,re)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(B,F),i=(i=Math.imul(B,H))+Math.imul(O,F)|0,o=Math.imul(O,H),r=r+Math.imul(C,q)|0,i=(i=i+Math.imul(C,G)|0)+Math.imul(S,q)|0,o=o+Math.imul(S,G)|0,r=r+Math.imul(E,V)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(k,V)|0,o=o+Math.imul(k,W)|0,r=r+Math.imul(b,Y)|0,i=(i=i+Math.imul(b,Z)|0)+Math.imul(w,Y)|0,o=o+Math.imul(w,Z)|0,r=r+Math.imul(m,$)|0,i=(i=i+Math.imul(m,ee)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,ee)|0,r=r+Math.imul(p,ne)|0,i=(i=i+Math.imul(p,re)|0)+Math.imul(g,ne)|0,o=o+Math.imul(g,re)|0;var _e=(c+(r=r+Math.imul(f,oe)|0)|0)+((8191&(i=(i=i+Math.imul(f,ae)|0)+Math.imul(d,oe)|0))<<13)|0;c=((o=o+Math.imul(d,ae)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(P,F),i=(i=Math.imul(P,H))+Math.imul(R,F)|0,o=Math.imul(R,H),r=r+Math.imul(B,q)|0,i=(i=i+Math.imul(B,G)|0)+Math.imul(O,q)|0,o=o+Math.imul(O,G)|0,r=r+Math.imul(C,V)|0,i=(i=i+Math.imul(C,W)|0)+Math.imul(S,V)|0,o=o+Math.imul(S,W)|0,r=r+Math.imul(E,Y)|0,i=(i=i+Math.imul(E,Z)|0)+Math.imul(k,Y)|0,o=o+Math.imul(k,Z)|0,r=r+Math.imul(b,$)|0,i=(i=i+Math.imul(b,ee)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,ee)|0,r=r+Math.imul(m,ne)|0,i=(i=i+Math.imul(m,re)|0)+Math.imul(A,ne)|0,o=o+Math.imul(A,re)|0,r=r+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(g,oe)|0,o=o+Math.imul(g,ae)|0;var Ee=(c+(r=r+Math.imul(f,ue)|0)|0)+((8191&(i=(i=i+Math.imul(f,ce)|0)+Math.imul(d,ue)|0))<<13)|0;c=((o=o+Math.imul(d,ce)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(T,F),i=(i=Math.imul(T,H))+Math.imul(Q,F)|0,o=Math.imul(Q,H),r=r+Math.imul(P,q)|0,i=(i=i+Math.imul(P,G)|0)+Math.imul(R,q)|0,o=o+Math.imul(R,G)|0,r=r+Math.imul(B,V)|0,i=(i=i+Math.imul(B,W)|0)+Math.imul(O,V)|0,o=o+Math.imul(O,W)|0,r=r+Math.imul(C,Y)|0,i=(i=i+Math.imul(C,Z)|0)+Math.imul(S,Y)|0,o=o+Math.imul(S,Z)|0,r=r+Math.imul(E,$)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,ee)|0,r=r+Math.imul(b,ne)|0,i=(i=i+Math.imul(b,re)|0)+Math.imul(w,ne)|0,o=o+Math.imul(w,re)|0,r=r+Math.imul(m,oe)|0,i=(i=i+Math.imul(m,ae)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,ae)|0,r=r+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(g,ue)|0,o=o+Math.imul(g,ce)|0;var ke=(c+(r=r+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,de)|0)+Math.imul(d,fe)|0))<<13)|0;c=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(j,F),i=(i=Math.imul(j,H))+Math.imul(U,F)|0,o=Math.imul(U,H),r=r+Math.imul(T,q)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(Q,q)|0,o=o+Math.imul(Q,G)|0,r=r+Math.imul(P,V)|0,i=(i=i+Math.imul(P,W)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,W)|0,r=r+Math.imul(B,Y)|0,i=(i=i+Math.imul(B,Z)|0)+Math.imul(O,Y)|0,o=o+Math.imul(O,Z)|0,r=r+Math.imul(C,$)|0,i=(i=i+Math.imul(C,ee)|0)+Math.imul(S,$)|0,o=o+Math.imul(S,ee)|0,r=r+Math.imul(E,ne)|0,i=(i=i+Math.imul(E,re)|0)+Math.imul(k,ne)|0,o=o+Math.imul(k,re)|0,r=r+Math.imul(b,oe)|0,i=(i=i+Math.imul(b,ae)|0)+Math.imul(w,oe)|0,o=o+Math.imul(w,ae)|0,r=r+Math.imul(m,ue)|0,i=(i=i+Math.imul(m,ce)|0)+Math.imul(A,ue)|0,o=o+Math.imul(A,ce)|0,r=r+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(g,fe)|0,o=o+Math.imul(g,de)|0;var Ie=(c+(r=r+Math.imul(f,pe)|0)|0)+((8191&(i=(i=i+Math.imul(f,ge)|0)+Math.imul(d,pe)|0))<<13)|0;c=((o=o+Math.imul(d,ge)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(j,q),i=(i=Math.imul(j,G))+Math.imul(U,q)|0,o=Math.imul(U,G),r=r+Math.imul(T,V)|0,i=(i=i+Math.imul(T,W)|0)+Math.imul(Q,V)|0,o=o+Math.imul(Q,W)|0,r=r+Math.imul(P,Y)|0,i=(i=i+Math.imul(P,Z)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,Z)|0,r=r+Math.imul(B,$)|0,i=(i=i+Math.imul(B,ee)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,ee)|0,r=r+Math.imul(C,ne)|0,i=(i=i+Math.imul(C,re)|0)+Math.imul(S,ne)|0,o=o+Math.imul(S,re)|0,r=r+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,ae)|0,r=r+Math.imul(b,ue)|0,i=(i=i+Math.imul(b,ce)|0)+Math.imul(w,ue)|0,o=o+Math.imul(w,ce)|0,r=r+Math.imul(m,fe)|0,i=(i=i+Math.imul(m,de)|0)+Math.imul(A,fe)|0,o=o+Math.imul(A,de)|0;var Ce=(c+(r=r+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,ge)|0)+Math.imul(g,pe)|0))<<13)|0;c=((o=o+Math.imul(g,ge)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(j,V),i=(i=Math.imul(j,W))+Math.imul(U,V)|0,o=Math.imul(U,W),r=r+Math.imul(T,Y)|0,i=(i=i+Math.imul(T,Z)|0)+Math.imul(Q,Y)|0,o=o+Math.imul(Q,Z)|0,r=r+Math.imul(P,$)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,ee)|0,r=r+Math.imul(B,ne)|0,i=(i=i+Math.imul(B,re)|0)+Math.imul(O,ne)|0,o=o+Math.imul(O,re)|0,r=r+Math.imul(C,oe)|0,i=(i=i+Math.imul(C,ae)|0)+Math.imul(S,oe)|0,o=o+Math.imul(S,ae)|0,r=r+Math.imul(E,ue)|0,i=(i=i+Math.imul(E,ce)|0)+Math.imul(k,ue)|0,o=o+Math.imul(k,ce)|0,r=r+Math.imul(b,fe)|0,i=(i=i+Math.imul(b,de)|0)+Math.imul(w,fe)|0,o=o+Math.imul(w,de)|0;var Se=(c+(r=r+Math.imul(m,pe)|0)|0)+((8191&(i=(i=i+Math.imul(m,ge)|0)+Math.imul(A,pe)|0))<<13)|0;c=((o=o+Math.imul(A,ge)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(j,Y),i=(i=Math.imul(j,Z))+Math.imul(U,Y)|0,o=Math.imul(U,Z),r=r+Math.imul(T,$)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(Q,$)|0,o=o+Math.imul(Q,ee)|0,r=r+Math.imul(P,ne)|0,i=(i=i+Math.imul(P,re)|0)+Math.imul(R,ne)|0,o=o+Math.imul(R,re)|0,r=r+Math.imul(B,oe)|0,i=(i=i+Math.imul(B,ae)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,ae)|0,r=r+Math.imul(C,ue)|0,i=(i=i+Math.imul(C,ce)|0)+Math.imul(S,ue)|0,o=o+Math.imul(S,ce)|0,r=r+Math.imul(E,fe)|0,i=(i=i+Math.imul(E,de)|0)+Math.imul(k,fe)|0,o=o+Math.imul(k,de)|0;var xe=(c+(r=r+Math.imul(b,pe)|0)|0)+((8191&(i=(i=i+Math.imul(b,ge)|0)+Math.imul(w,pe)|0))<<13)|0;c=((o=o+Math.imul(w,ge)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(j,$),i=(i=Math.imul(j,ee))+Math.imul(U,$)|0,o=Math.imul(U,ee),r=r+Math.imul(T,ne)|0,i=(i=i+Math.imul(T,re)|0)+Math.imul(Q,ne)|0,o=o+Math.imul(Q,re)|0,r=r+Math.imul(P,oe)|0,i=(i=i+Math.imul(P,ae)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,ae)|0,r=r+Math.imul(B,ue)|0,i=(i=i+Math.imul(B,ce)|0)+Math.imul(O,ue)|0,o=o+Math.imul(O,ce)|0,r=r+Math.imul(C,fe)|0,i=(i=i+Math.imul(C,de)|0)+Math.imul(S,fe)|0,o=o+Math.imul(S,de)|0;var Be=(c+(r=r+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,ge)|0)+Math.imul(k,pe)|0))<<13)|0;c=((o=o+Math.imul(k,ge)|0)+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,r=Math.imul(j,ne),i=(i=Math.imul(j,re))+Math.imul(U,ne)|0,o=Math.imul(U,re),r=r+Math.imul(T,oe)|0,i=(i=i+Math.imul(T,ae)|0)+Math.imul(Q,oe)|0,o=o+Math.imul(Q,ae)|0,r=r+Math.imul(P,ue)|0,i=(i=i+Math.imul(P,ce)|0)+Math.imul(R,ue)|0,o=o+Math.imul(R,ce)|0,r=r+Math.imul(B,fe)|0,i=(i=i+Math.imul(B,de)|0)+Math.imul(O,fe)|0,o=o+Math.imul(O,de)|0;var Oe=(c+(r=r+Math.imul(C,pe)|0)|0)+((8191&(i=(i=i+Math.imul(C,ge)|0)+Math.imul(S,pe)|0))<<13)|0;c=((o=o+Math.imul(S,ge)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(j,oe),i=(i=Math.imul(j,ae))+Math.imul(U,oe)|0,o=Math.imul(U,ae),r=r+Math.imul(T,ue)|0,i=(i=i+Math.imul(T,ce)|0)+Math.imul(Q,ue)|0,o=o+Math.imul(Q,ce)|0,r=r+Math.imul(P,fe)|0,i=(i=i+Math.imul(P,de)|0)+Math.imul(R,fe)|0,o=o+Math.imul(R,de)|0;var Me=(c+(r=r+Math.imul(B,pe)|0)|0)+((8191&(i=(i=i+Math.imul(B,ge)|0)+Math.imul(O,pe)|0))<<13)|0;c=((o=o+Math.imul(O,ge)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(j,ue),i=(i=Math.imul(j,ce))+Math.imul(U,ue)|0,o=Math.imul(U,ce),r=r+Math.imul(T,fe)|0,i=(i=i+Math.imul(T,de)|0)+Math.imul(Q,fe)|0,o=o+Math.imul(Q,de)|0;var Pe=(c+(r=r+Math.imul(P,pe)|0)|0)+((8191&(i=(i=i+Math.imul(P,ge)|0)+Math.imul(R,pe)|0))<<13)|0;c=((o=o+Math.imul(R,ge)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(j,fe),i=(i=Math.imul(j,de))+Math.imul(U,fe)|0,o=Math.imul(U,de);var Re=(c+(r=r+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,ge)|0)+Math.imul(Q,pe)|0))<<13)|0;c=((o=o+Math.imul(Q,ge)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ne=(c+(r=Math.imul(j,pe))|0)+((8191&(i=(i=Math.imul(j,ge))+Math.imul(U,pe)|0))<<13)|0;return c=((o=Math.imul(U,ge))+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,u[0]=ve,u[1]=me,u[2]=Ae,u[3]=ye,u[4]=be,u[5]=we,u[6]=_e,u[7]=Ee,u[8]=ke,u[9]=Ie,u[10]=Ce,u[11]=Se,u[12]=xe,u[13]=Be,u[14]=Oe,u[15]=Me,u[16]=Pe,u[17]=Re,u[18]=Ne,0!==c&&(u[19]=c,n.length++),n};function m(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}n.words[o]=s,r=a,a=i}return 0!==r?n.words[o]=r:n.length--,n._strip()}function A(e,t,n){return m(e,t,n)}function y(e,t){this.x=e,this.y=t}Math.imul||(v=g),o.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?v(this,e,t):n<63?g(this,e,t):n<1024?m(this,e,t):A(this,e,t)},y.prototype.makeRBT=function(e){for(var t=new Array(e),n=o.prototype._countBits(e)-1,r=0;r>=1;return r},y.prototype.permute=function(e,t,n,r,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,n[2*a+1]=8191&o,o>>>=13;for(a=2*t;a>=26,n+=o/67108864|0,n+=a>>>26,this.words[i]=67108863&a}return 0!==n&&(this.words[i]=n,this.length++),t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n>>i&1}return t}(e);if(0===t.length)return new o(1);for(var n=this,r=0;r=0);var t,n=e%26,i=(e-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(t=0;t>>26-n}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==l||c>=i);c--){var f=0|this.words[c];this.words[c]=l<<26-o|f>>>o,l=f&s}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(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){r("number"===typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(r("number"===typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(u/67108864|0),this.words[i+n]=67108863&o}for(;i>26,this.words[i+n]=67108863&o;if(0===s)return this._strip();for(r(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),i=e,a=0|i.words[i.length-1];0!==(n=26-this._countBits(a))&&(i=i.ushln(n),r.iushln(n),a=0|i.words[i.length-1]);var s,u=r.length-i.length;if("mod"!==t){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c=0;f--){var d=67108864*(0|r.words[i.length+f])+(0|r.words[i.length+f-1]);for(d=Math.min(d/a|0,67108863),r._ishlnsubmul(i,d,f);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(i,1,f),r.isZero()||(r.negative^=1);s&&(s.words[f]=d)}return s&&s._strip(),r._strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:s||null,mod:r}},o.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),o=n.cmp(r);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=(1<<26)%e,i=0,o=this.length-1;o>=0;o--)i=(n*i+(0|this.words[o]))%e;return t?-i:i},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*n;this.words[i]=o/e|0,n=o%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++c;for(var l=n.clone(),f=t.clone();!t.isZero();){for(var d=0,h=1;0===(t.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(l),a.isub(f)),i.iushrn(1),a.iushrn(1);for(var p=0,g=1;0===(n.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(l),u.isub(f)),s.iushrn(1),u.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(s),a.isub(u)):(n.isub(t),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:n.iushln(c)}},o.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),s=new o(0),u=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,l=1;0===(t.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var f=0,d=1;0===(n.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(n.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(s)):(n.isub(t),s.isub(a))}return(i=0===t.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var o=t;t=n,n=o}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){r("number"===typeof e);var t=e%26,n=(e-t)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){ri&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new C(e)},o.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var b={k256:null,p224:null,p192:null,p25519:null};function w(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function k(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function I(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function C(e){if("string"===typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function S(e){C.call(this,e),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)}w.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},w.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},w.prototype.split=function(e,t){e.iushrn(this.n,0,t)},w.prototype.imulK=function(e){return e.imul(this.k)},i(_,w),_.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},_.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(b[e])return b[e];var t;if("k256"===e)t=new _;else if("p224"===e)t=new E;else if("p192"===e)t=new k;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new I}return b[e]=t,t},C.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},C.prototype._verify2=function(e,t){r(0===(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},C.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(l(e,e.umod(this.m)._forceRed(this)),e)},C.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},C.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},C.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},C.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},C.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},C.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},C.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},C.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},C.prototype.isqr=function(e){return this.imul(e,e.clone())},C.prototype.sqr=function(e){return this.mul(e,e)},C.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2===1),3===t){var n=this.m.add(new o(1)).iushrn(2);return this.pow(e,n)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);r(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,c).cmp(u);)l.redIAdd(u);for(var f=this.pow(l,i),d=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=a;0!==h.cmp(s);){for(var g=h,v=0;0!==g.cmp(s);v++)g=g.redSqr();r(v=0;r--){for(var c=t.words[r],l=u-1;l>=0;l--){var f=c>>l&1;i!==n[0]&&(i=this.sqr(i)),0!==f||0!==a?(a<<=1,a|=f,(4===++s||0===r&&0===l)&&(i=this.mul(i,n[a]),s=0,a=0)):s=0}u=26}return i},C.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},C.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new S(e)},i(S,C),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,n(77)(e))},function(e,t,n){"use strict";var r=n(30).default,i=n(31).default,o=n(44).default,a=n(9).default,s=n(10).default,u=n(19).default;function c(e){var t,n=0,r=u(e);try{for(r.s();!(t=r.n()).done;){if(0!==t.value)break;n++}}catch(i){r.e(i)}finally{r.f()}return e.slice(n)}Object.defineProperty(t,"__esModule",{value:!0}),t.ExtendedSecp256k1Signature=t.Secp256k1Signature=void 0;var l=2,f=function(){function e(t,n){if(a(this,e),t.length>32||0===t.length||0===t[0])throw new Error("Unsigned integer r must be encoded as unpadded big endian.");if(n.length>32||0===n.length||0===n[0])throw new Error("Unsigned integer s must be encoded as unpadded big endian.");this.data={r:t,s:n}}return s(e,[{key:"r",value:function(e){if(void 0===e)return this.data.r;var t=e-this.data.r.length;if(t<0)throw new Error("Length too small to hold parameter r");var n=new Uint8Array(t);return new Uint8Array([].concat(o(n),o(this.data.r)))}},{key:"s",value:function(e){if(void 0===e)return this.data.s;var t=e-this.data.s.length;if(t<0)throw new Error("Length too small to hold parameter s");var n=new Uint8Array(t);return new Uint8Array([].concat(o(n),o(this.data.s)))}},{key:"toFixedLength",value:function(){return new Uint8Array([].concat(o(this.r(32)),o(this.s(32))))}},{key:"toDer",value:function(){var e=this.data.r[0]>=128?new Uint8Array([0].concat(o(this.data.r))):this.data.r,t=this.data.s[0]>=128?new Uint8Array([0].concat(o(this.data.s))):this.data.s,n=e.length,r=t.length,i=new Uint8Array([l,n].concat(o(e),[l,r],o(t)));return new Uint8Array([48,i.length].concat(o(i)))}}],[{key:"fromFixedLength",value:function(t){if(64!==t.length)throw new Error("Got invalid data length: ".concat(t.length,". Expected 2x 32 bytes for the pair (r, s)"));return new e(c(t.slice(0,32)),c(t.slice(32,64)))}},{key:"fromDer",value:function(t){var n=0;if(48!==t[n++])throw new Error("Prefix 0x30 expected");var r=t[n++];if(t.length-n!==r)throw new Error("Data length mismatch detected");if(t[n++]!==l)throw new Error("INTEGER tag expected");var i=t[n++];if(i>=128)throw new Error("Decoding length values above 127 not supported");var o=t.slice(n,n+i);if(n+=i,t[n++]!==l)throw new Error("INTEGER tag expected");var a=t[n++];if(a>=128)throw new Error("Decoding length values above 127 not supported");var s=t.slice(n,n+a);return n+=a,new e(c(o),c(s))}}]),e}();t.Secp256k1Signature=f;var d=function(e){r(n,e);var t=i(n);function n(e,r,i){var o;if(a(this,n),o=t.call(this,e,r),!Number.isInteger(i))throw new Error("The recovery parameter must be an integer.");if(i<0||i>4)throw new Error("The recovery parameter must be one of 0, 1, 2, 3.");return o.recovery=i,o}return s(n,[{key:"toFixedLength",value:function(){return new Uint8Array([].concat(o(this.r(32)),o(this.s(32)),[this.recovery]))}}],[{key:"fromFixedLength",value:function(e){if(65!==e.length)throw new Error("Got invalid data length ".concat(e.length,". Expected 32 + 32 + 1"));return new n(c(e.slice(0,32)),c(e.slice(32,64)),e[64])}}]),n}(f);t.ExtendedSecp256k1Signature=d},function(e,t,n){(function(e){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function o(e,t,n){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var a;"object"===typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:n(946).Buffer}catch(x){}function s(e,t){var n=e.charCodeAt(t);return n>=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:void r(!1,"Invalid character in "+e)}function u(e,t,n){var r=s(e,n);return n-1>=t&&(r|=s(e,n-1)<<4),r}function c(e,t,n,i){for(var o=0,a=0,s=Math.min(e.length,n),u=t;u=49?c-49+10:c>=17?c-17+10:c,r(c>=0&&a0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,n){if("number"===typeof e)return this._initNumber(e,t,n);if("object"===typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===n)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this._strip()},o.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r=t;r-=2)i=u(e,t,r)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(r=(e.length-t)%2===0?t+1:t;r=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var o=e.length-n,a=o%r,s=Math.min(o,o-a)+n,u=0,l=n;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(x){o.prototype.inspect=f}else o.prototype.inspect=f;function f(){return(this.red?""}var d=["","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"],h=[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],p=[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];o.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var i=0,o=0,a=0;a>>24-i&16777215,(i+=2)>=26&&(i-=26,a--),n=0!==o||a!==this.length-1?d[6-u.length]+u+n:u+n}for(0!==o&&(n=o.toString(16)+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var c=h[e],l=p[e];n="";var f=this.clone();for(f.negative=0;!f.isZero();){var g=f.modrn(l).toString(e);n=(f=f.idivn(l)).isZero()?g+n:d[c-g.length]+g+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},a&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(a,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function g(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,u=a/67108864|0;n.words[0]=s;for(var c=1;c>>26,f=67108863&u,d=Math.min(c,t.length-1),h=Math.max(0,c-e.length+1);h<=d;h++){var p=c-h|0;l+=(a=(i=0|e.words[p])*(o=0|t.words[h])+f)/67108864|0,f=67108863&a}n.words[c]=0|f,u=0|l}return 0!==u?n.words[c]=0|u:n.length--,n._strip()}o.prototype.toArrayLike=function(e,t,n){this._strip();var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0");var a=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](a,i),a},o.prototype._toArrayLikeLE=function(e,t){for(var n=0,r=0,i=0,o=0;i>8&255),n>16&255),6===o?(n>24&255),r=0,o=0):(r=a>>>24,o+=2)}if(n=0&&(e[n--]=a>>8&255),n>=0&&(e[n--]=a>>16&255),6===o?(n>=0&&(e[n--]=a>>24&255),r=0,o=0):(r=a>>>24,o+=2)}if(n>=0)for(e[n--]=r;n>=0;)e[n--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0===(8191&t)&&(n+=13,t>>>=13),0===(127&t)&&(n+=7,t>>>=7),0===(15&t)&&(n+=4,t>>>=4),0===(3&t)&&(n+=2,t>>>=2),0===(1&t)&&n++,n},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;ne.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;re.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){r("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-n),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){r("number"===typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(n=this,r=e):(n=e,r=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var o=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==o&&a>26,this.words[a]=67108863&t;if(0===o&&a>>13,h=0|a[1],p=8191&h,g=h>>>13,v=0|a[2],m=8191&v,A=v>>>13,y=0|a[3],b=8191&y,w=y>>>13,_=0|a[4],E=8191&_,k=_>>>13,I=0|a[5],C=8191&I,S=I>>>13,x=0|a[6],B=8191&x,O=x>>>13,M=0|a[7],P=8191&M,R=M>>>13,N=0|a[8],T=8191&N,Q=N>>>13,D=0|a[9],j=8191&D,U=D>>>13,L=0|s[0],F=8191&L,H=L>>>13,J=0|s[1],q=8191&J,G=J>>>13,z=0|s[2],V=8191&z,W=z>>>13,K=0|s[3],Y=8191&K,Z=K>>>13,X=0|s[4],$=8191&X,ee=X>>>13,te=0|s[5],ne=8191&te,re=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ue=8191&se,ce=se>>>13,le=0|s[8],fe=8191&le,de=le>>>13,he=0|s[9],pe=8191&he,ge=he>>>13;n.negative=e.negative^t.negative,n.length=19;var ve=(c+(r=Math.imul(f,F))|0)+((8191&(i=(i=Math.imul(f,H))+Math.imul(d,F)|0))<<13)|0;c=((o=Math.imul(d,H))+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(p,F),i=(i=Math.imul(p,H))+Math.imul(g,F)|0,o=Math.imul(g,H);var me=(c+(r=r+Math.imul(f,q)|0)|0)+((8191&(i=(i=i+Math.imul(f,G)|0)+Math.imul(d,q)|0))<<13)|0;c=((o=o+Math.imul(d,G)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(m,F),i=(i=Math.imul(m,H))+Math.imul(A,F)|0,o=Math.imul(A,H),r=r+Math.imul(p,q)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(g,q)|0,o=o+Math.imul(g,G)|0;var Ae=(c+(r=r+Math.imul(f,V)|0)|0)+((8191&(i=(i=i+Math.imul(f,W)|0)+Math.imul(d,V)|0))<<13)|0;c=((o=o+Math.imul(d,W)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(b,F),i=(i=Math.imul(b,H))+Math.imul(w,F)|0,o=Math.imul(w,H),r=r+Math.imul(m,q)|0,i=(i=i+Math.imul(m,G)|0)+Math.imul(A,q)|0,o=o+Math.imul(A,G)|0,r=r+Math.imul(p,V)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,W)|0;var ye=(c+(r=r+Math.imul(f,Y)|0)|0)+((8191&(i=(i=i+Math.imul(f,Z)|0)+Math.imul(d,Y)|0))<<13)|0;c=((o=o+Math.imul(d,Z)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(E,F),i=(i=Math.imul(E,H))+Math.imul(k,F)|0,o=Math.imul(k,H),r=r+Math.imul(b,q)|0,i=(i=i+Math.imul(b,G)|0)+Math.imul(w,q)|0,o=o+Math.imul(w,G)|0,r=r+Math.imul(m,V)|0,i=(i=i+Math.imul(m,W)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,W)|0,r=r+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(g,Y)|0,o=o+Math.imul(g,Z)|0;var be=(c+(r=r+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,ee)|0)+Math.imul(d,$)|0))<<13)|0;c=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(C,F),i=(i=Math.imul(C,H))+Math.imul(S,F)|0,o=Math.imul(S,H),r=r+Math.imul(E,q)|0,i=(i=i+Math.imul(E,G)|0)+Math.imul(k,q)|0,o=o+Math.imul(k,G)|0,r=r+Math.imul(b,V)|0,i=(i=i+Math.imul(b,W)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,W)|0,r=r+Math.imul(m,Y)|0,i=(i=i+Math.imul(m,Z)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,Z)|0,r=r+Math.imul(p,$)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(g,$)|0,o=o+Math.imul(g,ee)|0;var we=(c+(r=r+Math.imul(f,ne)|0)|0)+((8191&(i=(i=i+Math.imul(f,re)|0)+Math.imul(d,ne)|0))<<13)|0;c=((o=o+Math.imul(d,re)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(B,F),i=(i=Math.imul(B,H))+Math.imul(O,F)|0,o=Math.imul(O,H),r=r+Math.imul(C,q)|0,i=(i=i+Math.imul(C,G)|0)+Math.imul(S,q)|0,o=o+Math.imul(S,G)|0,r=r+Math.imul(E,V)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(k,V)|0,o=o+Math.imul(k,W)|0,r=r+Math.imul(b,Y)|0,i=(i=i+Math.imul(b,Z)|0)+Math.imul(w,Y)|0,o=o+Math.imul(w,Z)|0,r=r+Math.imul(m,$)|0,i=(i=i+Math.imul(m,ee)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,ee)|0,r=r+Math.imul(p,ne)|0,i=(i=i+Math.imul(p,re)|0)+Math.imul(g,ne)|0,o=o+Math.imul(g,re)|0;var _e=(c+(r=r+Math.imul(f,oe)|0)|0)+((8191&(i=(i=i+Math.imul(f,ae)|0)+Math.imul(d,oe)|0))<<13)|0;c=((o=o+Math.imul(d,ae)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(P,F),i=(i=Math.imul(P,H))+Math.imul(R,F)|0,o=Math.imul(R,H),r=r+Math.imul(B,q)|0,i=(i=i+Math.imul(B,G)|0)+Math.imul(O,q)|0,o=o+Math.imul(O,G)|0,r=r+Math.imul(C,V)|0,i=(i=i+Math.imul(C,W)|0)+Math.imul(S,V)|0,o=o+Math.imul(S,W)|0,r=r+Math.imul(E,Y)|0,i=(i=i+Math.imul(E,Z)|0)+Math.imul(k,Y)|0,o=o+Math.imul(k,Z)|0,r=r+Math.imul(b,$)|0,i=(i=i+Math.imul(b,ee)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,ee)|0,r=r+Math.imul(m,ne)|0,i=(i=i+Math.imul(m,re)|0)+Math.imul(A,ne)|0,o=o+Math.imul(A,re)|0,r=r+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(g,oe)|0,o=o+Math.imul(g,ae)|0;var Ee=(c+(r=r+Math.imul(f,ue)|0)|0)+((8191&(i=(i=i+Math.imul(f,ce)|0)+Math.imul(d,ue)|0))<<13)|0;c=((o=o+Math.imul(d,ce)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(T,F),i=(i=Math.imul(T,H))+Math.imul(Q,F)|0,o=Math.imul(Q,H),r=r+Math.imul(P,q)|0,i=(i=i+Math.imul(P,G)|0)+Math.imul(R,q)|0,o=o+Math.imul(R,G)|0,r=r+Math.imul(B,V)|0,i=(i=i+Math.imul(B,W)|0)+Math.imul(O,V)|0,o=o+Math.imul(O,W)|0,r=r+Math.imul(C,Y)|0,i=(i=i+Math.imul(C,Z)|0)+Math.imul(S,Y)|0,o=o+Math.imul(S,Z)|0,r=r+Math.imul(E,$)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,ee)|0,r=r+Math.imul(b,ne)|0,i=(i=i+Math.imul(b,re)|0)+Math.imul(w,ne)|0,o=o+Math.imul(w,re)|0,r=r+Math.imul(m,oe)|0,i=(i=i+Math.imul(m,ae)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,ae)|0,r=r+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(g,ue)|0,o=o+Math.imul(g,ce)|0;var ke=(c+(r=r+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,de)|0)+Math.imul(d,fe)|0))<<13)|0;c=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(j,F),i=(i=Math.imul(j,H))+Math.imul(U,F)|0,o=Math.imul(U,H),r=r+Math.imul(T,q)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(Q,q)|0,o=o+Math.imul(Q,G)|0,r=r+Math.imul(P,V)|0,i=(i=i+Math.imul(P,W)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,W)|0,r=r+Math.imul(B,Y)|0,i=(i=i+Math.imul(B,Z)|0)+Math.imul(O,Y)|0,o=o+Math.imul(O,Z)|0,r=r+Math.imul(C,$)|0,i=(i=i+Math.imul(C,ee)|0)+Math.imul(S,$)|0,o=o+Math.imul(S,ee)|0,r=r+Math.imul(E,ne)|0,i=(i=i+Math.imul(E,re)|0)+Math.imul(k,ne)|0,o=o+Math.imul(k,re)|0,r=r+Math.imul(b,oe)|0,i=(i=i+Math.imul(b,ae)|0)+Math.imul(w,oe)|0,o=o+Math.imul(w,ae)|0,r=r+Math.imul(m,ue)|0,i=(i=i+Math.imul(m,ce)|0)+Math.imul(A,ue)|0,o=o+Math.imul(A,ce)|0,r=r+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(g,fe)|0,o=o+Math.imul(g,de)|0;var Ie=(c+(r=r+Math.imul(f,pe)|0)|0)+((8191&(i=(i=i+Math.imul(f,ge)|0)+Math.imul(d,pe)|0))<<13)|0;c=((o=o+Math.imul(d,ge)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(j,q),i=(i=Math.imul(j,G))+Math.imul(U,q)|0,o=Math.imul(U,G),r=r+Math.imul(T,V)|0,i=(i=i+Math.imul(T,W)|0)+Math.imul(Q,V)|0,o=o+Math.imul(Q,W)|0,r=r+Math.imul(P,Y)|0,i=(i=i+Math.imul(P,Z)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,Z)|0,r=r+Math.imul(B,$)|0,i=(i=i+Math.imul(B,ee)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,ee)|0,r=r+Math.imul(C,ne)|0,i=(i=i+Math.imul(C,re)|0)+Math.imul(S,ne)|0,o=o+Math.imul(S,re)|0,r=r+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,ae)|0,r=r+Math.imul(b,ue)|0,i=(i=i+Math.imul(b,ce)|0)+Math.imul(w,ue)|0,o=o+Math.imul(w,ce)|0,r=r+Math.imul(m,fe)|0,i=(i=i+Math.imul(m,de)|0)+Math.imul(A,fe)|0,o=o+Math.imul(A,de)|0;var Ce=(c+(r=r+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,ge)|0)+Math.imul(g,pe)|0))<<13)|0;c=((o=o+Math.imul(g,ge)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(j,V),i=(i=Math.imul(j,W))+Math.imul(U,V)|0,o=Math.imul(U,W),r=r+Math.imul(T,Y)|0,i=(i=i+Math.imul(T,Z)|0)+Math.imul(Q,Y)|0,o=o+Math.imul(Q,Z)|0,r=r+Math.imul(P,$)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,ee)|0,r=r+Math.imul(B,ne)|0,i=(i=i+Math.imul(B,re)|0)+Math.imul(O,ne)|0,o=o+Math.imul(O,re)|0,r=r+Math.imul(C,oe)|0,i=(i=i+Math.imul(C,ae)|0)+Math.imul(S,oe)|0,o=o+Math.imul(S,ae)|0,r=r+Math.imul(E,ue)|0,i=(i=i+Math.imul(E,ce)|0)+Math.imul(k,ue)|0,o=o+Math.imul(k,ce)|0,r=r+Math.imul(b,fe)|0,i=(i=i+Math.imul(b,de)|0)+Math.imul(w,fe)|0,o=o+Math.imul(w,de)|0;var Se=(c+(r=r+Math.imul(m,pe)|0)|0)+((8191&(i=(i=i+Math.imul(m,ge)|0)+Math.imul(A,pe)|0))<<13)|0;c=((o=o+Math.imul(A,ge)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(j,Y),i=(i=Math.imul(j,Z))+Math.imul(U,Y)|0,o=Math.imul(U,Z),r=r+Math.imul(T,$)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(Q,$)|0,o=o+Math.imul(Q,ee)|0,r=r+Math.imul(P,ne)|0,i=(i=i+Math.imul(P,re)|0)+Math.imul(R,ne)|0,o=o+Math.imul(R,re)|0,r=r+Math.imul(B,oe)|0,i=(i=i+Math.imul(B,ae)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,ae)|0,r=r+Math.imul(C,ue)|0,i=(i=i+Math.imul(C,ce)|0)+Math.imul(S,ue)|0,o=o+Math.imul(S,ce)|0,r=r+Math.imul(E,fe)|0,i=(i=i+Math.imul(E,de)|0)+Math.imul(k,fe)|0,o=o+Math.imul(k,de)|0;var xe=(c+(r=r+Math.imul(b,pe)|0)|0)+((8191&(i=(i=i+Math.imul(b,ge)|0)+Math.imul(w,pe)|0))<<13)|0;c=((o=o+Math.imul(w,ge)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(j,$),i=(i=Math.imul(j,ee))+Math.imul(U,$)|0,o=Math.imul(U,ee),r=r+Math.imul(T,ne)|0,i=(i=i+Math.imul(T,re)|0)+Math.imul(Q,ne)|0,o=o+Math.imul(Q,re)|0,r=r+Math.imul(P,oe)|0,i=(i=i+Math.imul(P,ae)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,ae)|0,r=r+Math.imul(B,ue)|0,i=(i=i+Math.imul(B,ce)|0)+Math.imul(O,ue)|0,o=o+Math.imul(O,ce)|0,r=r+Math.imul(C,fe)|0,i=(i=i+Math.imul(C,de)|0)+Math.imul(S,fe)|0,o=o+Math.imul(S,de)|0;var Be=(c+(r=r+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,ge)|0)+Math.imul(k,pe)|0))<<13)|0;c=((o=o+Math.imul(k,ge)|0)+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,r=Math.imul(j,ne),i=(i=Math.imul(j,re))+Math.imul(U,ne)|0,o=Math.imul(U,re),r=r+Math.imul(T,oe)|0,i=(i=i+Math.imul(T,ae)|0)+Math.imul(Q,oe)|0,o=o+Math.imul(Q,ae)|0,r=r+Math.imul(P,ue)|0,i=(i=i+Math.imul(P,ce)|0)+Math.imul(R,ue)|0,o=o+Math.imul(R,ce)|0,r=r+Math.imul(B,fe)|0,i=(i=i+Math.imul(B,de)|0)+Math.imul(O,fe)|0,o=o+Math.imul(O,de)|0;var Oe=(c+(r=r+Math.imul(C,pe)|0)|0)+((8191&(i=(i=i+Math.imul(C,ge)|0)+Math.imul(S,pe)|0))<<13)|0;c=((o=o+Math.imul(S,ge)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(j,oe),i=(i=Math.imul(j,ae))+Math.imul(U,oe)|0,o=Math.imul(U,ae),r=r+Math.imul(T,ue)|0,i=(i=i+Math.imul(T,ce)|0)+Math.imul(Q,ue)|0,o=o+Math.imul(Q,ce)|0,r=r+Math.imul(P,fe)|0,i=(i=i+Math.imul(P,de)|0)+Math.imul(R,fe)|0,o=o+Math.imul(R,de)|0;var Me=(c+(r=r+Math.imul(B,pe)|0)|0)+((8191&(i=(i=i+Math.imul(B,ge)|0)+Math.imul(O,pe)|0))<<13)|0;c=((o=o+Math.imul(O,ge)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(j,ue),i=(i=Math.imul(j,ce))+Math.imul(U,ue)|0,o=Math.imul(U,ce),r=r+Math.imul(T,fe)|0,i=(i=i+Math.imul(T,de)|0)+Math.imul(Q,fe)|0,o=o+Math.imul(Q,de)|0;var Pe=(c+(r=r+Math.imul(P,pe)|0)|0)+((8191&(i=(i=i+Math.imul(P,ge)|0)+Math.imul(R,pe)|0))<<13)|0;c=((o=o+Math.imul(R,ge)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(j,fe),i=(i=Math.imul(j,de))+Math.imul(U,fe)|0,o=Math.imul(U,de);var Re=(c+(r=r+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,ge)|0)+Math.imul(Q,pe)|0))<<13)|0;c=((o=o+Math.imul(Q,ge)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ne=(c+(r=Math.imul(j,pe))|0)+((8191&(i=(i=Math.imul(j,ge))+Math.imul(U,pe)|0))<<13)|0;return c=((o=Math.imul(U,ge))+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,u[0]=ve,u[1]=me,u[2]=Ae,u[3]=ye,u[4]=be,u[5]=we,u[6]=_e,u[7]=Ee,u[8]=ke,u[9]=Ie,u[10]=Ce,u[11]=Se,u[12]=xe,u[13]=Be,u[14]=Oe,u[15]=Me,u[16]=Pe,u[17]=Re,u[18]=Ne,0!==c&&(u[19]=c,n.length++),n};function m(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}n.words[o]=s,r=a,a=i}return 0!==r?n.words[o]=r:n.length--,n._strip()}function A(e,t,n){return m(e,t,n)}function y(e,t){this.x=e,this.y=t}Math.imul||(v=g),o.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?v(this,e,t):n<63?g(this,e,t):n<1024?m(this,e,t):A(this,e,t)},y.prototype.makeRBT=function(e){for(var t=new Array(e),n=o.prototype._countBits(e)-1,r=0;r>=1;return r},y.prototype.permute=function(e,t,n,r,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,n[2*a+1]=8191&o,o>>>=13;for(a=2*t;a>=26,n+=o/67108864|0,n+=a>>>26,this.words[i]=67108863&a}return 0!==n&&(this.words[i]=n,this.length++),t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n>>i&1}return t}(e);if(0===t.length)return new o(1);for(var n=this,r=0;r=0);var t,n=e%26,i=(e-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(t=0;t>>26-n}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==l||c>=i);c--){var f=0|this.words[c];this.words[c]=l<<26-o|f>>>o,l=f&s}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(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){r("number"===typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(r("number"===typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(u/67108864|0),this.words[i+n]=67108863&o}for(;i>26,this.words[i+n]=67108863&o;if(0===s)return this._strip();for(r(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),i=e,a=0|i.words[i.length-1];0!==(n=26-this._countBits(a))&&(i=i.ushln(n),r.iushln(n),a=0|i.words[i.length-1]);var s,u=r.length-i.length;if("mod"!==t){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c=0;f--){var d=67108864*(0|r.words[i.length+f])+(0|r.words[i.length+f-1]);for(d=Math.min(d/a|0,67108863),r._ishlnsubmul(i,d,f);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(i,1,f),r.isZero()||(r.negative^=1);s&&(s.words[f]=d)}return s&&s._strip(),r._strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:s||null,mod:r}},o.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),o=n.cmp(r);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=(1<<26)%e,i=0,o=this.length-1;o>=0;o--)i=(n*i+(0|this.words[o]))%e;return t?-i:i},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*n;this.words[i]=o/e|0,n=o%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++c;for(var l=n.clone(),f=t.clone();!t.isZero();){for(var d=0,h=1;0===(t.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(l),a.isub(f)),i.iushrn(1),a.iushrn(1);for(var p=0,g=1;0===(n.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(l),u.isub(f)),s.iushrn(1),u.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(s),a.isub(u)):(n.isub(t),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:n.iushln(c)}},o.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),s=new o(0),u=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,l=1;0===(t.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var f=0,d=1;0===(n.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(n.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(s)):(n.isub(t),s.isub(a))}return(i=0===t.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var o=t;t=n,n=o}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){r("number"===typeof e);var t=e%26,n=(e-t)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){ri&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new C(e)},o.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var b={k256:null,p224:null,p192:null,p25519:null};function w(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function k(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function I(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function C(e){if("string"===typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function S(e){C.call(this,e),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)}w.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},w.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},w.prototype.split=function(e,t){e.iushrn(this.n,0,t)},w.prototype.imulK=function(e){return e.imul(this.k)},i(_,w),_.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},_.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(b[e])return b[e];var t;if("k256"===e)t=new _;else if("p224"===e)t=new E;else if("p192"===e)t=new k;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new I}return b[e]=t,t},C.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},C.prototype._verify2=function(e,t){r(0===(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},C.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(l(e,e.umod(this.m)._forceRed(this)),e)},C.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},C.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},C.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},C.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},C.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},C.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},C.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},C.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},C.prototype.isqr=function(e){return this.imul(e,e.clone())},C.prototype.sqr=function(e){return this.mul(e,e)},C.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2===1),3===t){var n=this.m.add(new o(1)).iushrn(2);return this.pow(e,n)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);r(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,c).cmp(u);)l.redIAdd(u);for(var f=this.pow(l,i),d=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=a;0!==h.cmp(s);){for(var g=h,v=0;0!==g.cmp(s);v++)g=g.redSqr();r(v=0;r--){for(var c=t.words[r],l=u-1;l>=0;l--){var f=c>>l&1;i!==n[0]&&(i=this.sqr(i)),0!==f||0!==a?(a<<=1,a|=f,(4===++s||0===r&&0===l)&&(i=this.mul(i,n[a]),s=0,a=0)):s=0}u=26}return i},C.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},C.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new S(e)},i(S,C),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,n(77)(e))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.makeCosmoshubPath=void 0;var r=n(93);t.makeCosmoshubPath=function(e){return[r.Slip10RawIndex.hardened(44),r.Slip10RawIndex.hardened(118),r.Slip10RawIndex.hardened(0),r.Slip10RawIndex.normal(0),r.Slip10RawIndex.normal(e)]}},function(e,t,n){"use strict";var r=n(44).default,i=n(28).default,o=n(29).default;Object.defineProperty(t,"__esModule",{value:!0}),t.decrypt=t.encrypt=t.supportedAlgorithms=t.executeKdf=t.cosmjsSalt=void 0;var a=n(93),s=n(41);function u(){return(u=o(i().mark((function e(n,r){var o;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=r.algorithm,e.next="argon2id"===e.t0?3:7;break;case 3:if(o=r.params,(0,a.isArgon2idOptions)(o)){e.next=6;break}throw new Error("Invalid format of argon2id params");case 6:return e.abrupt("return",a.Argon2id.execute(n,t.cosmjsSalt,o));case 7:throw new Error("Unsupported KDF algorithm");case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function c(){return(c=o(i().mark((function e(n,o,s){var u;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=s.algorithm,e.next=e.t0===t.supportedAlgorithms.xchacha20poly1305Ietf?3:14;break;case 3:return u=a.Random.getBytes(a.xchacha20NonceLength),e.t1=Uint8Array,e.t2=[],e.t3=r(u),e.t4=r,e.next=10,a.Xchacha20poly1305Ietf.encrypt(n,o,u);case 10:return e.t5=e.sent,e.t6=(0,e.t4)(e.t5),e.t7=e.t2.concat.call(e.t2,e.t3,e.t6),e.abrupt("return",new e.t1(e.t7));case 14:throw new Error("Unsupported encryption algorithm: '".concat(s.algorithm,"'"));case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function l(){return(l=o(i().mark((function e(n,r,o){var s;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=o.algorithm,e.next=e.t0===t.supportedAlgorithms.xchacha20poly1305Ietf?3:5;break;case 3:return s=n.slice(0,a.xchacha20NonceLength),e.abrupt("return",a.Xchacha20poly1305Ietf.decrypt(n.slice(a.xchacha20NonceLength),r,s));case 5:throw new Error("Unsupported encryption algorithm: '".concat(o.algorithm,"'"));case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}t.cosmjsSalt=(0,s.toAscii)("The CosmJS salt."),t.executeKdf=function(e,t){return u.apply(this,arguments)},t.supportedAlgorithms={xchacha20poly1305Ietf:"xchacha20poly1305-ietf"},t.encrypt=function(e,t,n){return c.apply(this,arguments)},t.decrypt=function(e,t,n){return l.apply(this,arguments)}},function(e,t,n){"use strict";e.exports=f;var r,i=n(133),o=i.LongBits,a=i.base64,s=i.utf8;function u(e,t,n){this.fn=e,this.len=t,this.next=void 0,this.val=n}function c(){}function l(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function f(){this.len=0,this.head=new u(c,0,0),this.tail=this.head,this.states=null}var d=function(){return i.Buffer?function(){return(f.create=function(){return new r})()}:function(){return new f}};function h(e,t,n){t[n]=255&e}function p(e,t){this.len=e,this.next=void 0,this.val=t}function g(e,t,n){for(;e.hi;)t[n++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[n++]=127&e.lo|128,e.lo=e.lo>>>7;t[n++]=e.lo}function v(e,t,n){t[n]=255&e,t[n+1]=e>>>8&255,t[n+2]=e>>>16&255,t[n+3]=e>>>24}f.create=d(),f.alloc=function(e){return new i.Array(e)},i.Array!==Array&&(f.alloc=i.pool(f.alloc,i.Array.prototype.subarray)),f.prototype._push=function(e,t,n){return this.tail=this.tail.next=new u(e,t,n),this.len+=t,this},p.prototype=Object.create(u.prototype),p.prototype.fn=function(e,t,n){for(;e>127;)t[n++]=127&e|128,e>>>=7;t[n]=e},f.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new p((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},f.prototype.int32=function(e){return e<0?this._push(g,10,o.fromNumber(e)):this.uint32(e)},f.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},f.prototype.uint64=function(e){var t=o.from(e);return this._push(g,t.length(),t)},f.prototype.int64=f.prototype.uint64,f.prototype.sint64=function(e){var t=o.from(e).zzEncode();return this._push(g,t.length(),t)},f.prototype.bool=function(e){return this._push(h,1,e?1:0)},f.prototype.fixed32=function(e){return this._push(v,4,e>>>0)},f.prototype.sfixed32=f.prototype.fixed32,f.prototype.fixed64=function(e){var t=o.from(e);return this._push(v,4,t.lo)._push(v,4,t.hi)},f.prototype.sfixed64=f.prototype.fixed64,f.prototype.float=function(e){return this._push(i.float.writeFloatLE,4,e)},f.prototype.double=function(e){return this._push(i.float.writeDoubleLE,8,e)};var m=i.Array.prototype.set?function(e,t,n){t.set(e,n)}:function(e,t,n){for(var r=0;r>>0;if(!t)return this._push(h,1,0);if(i.isString(e)){var n=f.alloc(t=a.length(e));a.decode(e,n,0),e=n}return this.uint32(t)._push(m,t,e)},f.prototype.string=function(e){var t=s.length(e);return t?this.uint32(t)._push(s.write,t,e):this._push(h,1,0)},f.prototype.fork=function(){return this.states=new l(this),this.head=this.tail=new u(c,0,0),this.len=0,this},f.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new u(c,0,0),this.len=0),this},f.prototype.ldelim=function(){var e=this.head,t=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=e.next,this.tail=t,this.len+=n),this},f.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),n=0;e;)e.fn(e.val,t,n),n+=e.len,e=e.next;return t},f._configure=function(e){r=e,f.create=d(),r._configure()}},function(e,t,n){"use strict";e.exports=u;var r,i=n(133),o=i.LongBits,a=i.utf8;function s(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function u(e){this.buf=e,this.pos=0,this.len=e.length}var c="undefined"!==typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new u(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new u(e);throw Error("illegal buffer")},l=function(){return i.Buffer?function(e){return(u.create=function(e){return i.Buffer.isBuffer(e)?new r(e):c(e)})(e)}:c};function f(){var e=new o(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw s(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw s(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function d(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function h(){if(this.pos+8>this.len)throw s(this,8);return new o(d(this.buf,this.pos+=4),d(this.buf,this.pos+=4))}u.create=l(),u.prototype._slice=i.Array.prototype.subarray||i.Array.prototype.slice,u.prototype.uint32=function(){var e=4294967295;return function(){if(e=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return e;if((this.pos+=5)>this.len)throw this.pos=this.len,s(this,10);return e}}(),u.prototype.int32=function(){return 0|this.uint32()},u.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},u.prototype.bool=function(){return 0!==this.uint32()},u.prototype.fixed32=function(){if(this.pos+4>this.len)throw s(this,4);return d(this.buf,this.pos+=4)},u.prototype.sfixed32=function(){if(this.pos+4>this.len)throw s(this,4);return 0|d(this.buf,this.pos+=4)},u.prototype.float=function(){if(this.pos+4>this.len)throw s(this,4);var e=i.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},u.prototype.double=function(){if(this.pos+8>this.len)throw s(this,4);var e=i.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},u.prototype.bytes=function(){var e=this.uint32(),t=this.pos,n=this.pos+e;if(n>this.len)throw s(this,e);return this.pos+=e,Array.isArray(this.buf)?this.buf.slice(t,n):t===n?new this.buf.constructor(0):this._slice.call(this.buf,t,n)},u.prototype.string=function(){var e=this.bytes();return a.read(e,0,e.length)},u.prototype.skip=function(e){if("number"===typeof e){if(this.pos+e>this.len)throw s(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw s(this)}while(128&this.buf[this.pos++]);return this},u.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!==(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},u._configure=function(e){r=e,u.create=l(),r._configure();var t=i.Long?"toLong":"toNumber";i.merge(u.prototype,{int64:function(){return f.call(this)[t](!1)},uint64:function(){return f.call(this)[t](!0)},sint64:function(){return f.call(this).zzDecode()[t](!1)},fixed64:function(){return h.call(this)[t](!0)},sfixed64:function(){return h.call(this)[t](!1)}})}},function(e,t,n){"use strict";(function(e){var r=n(19).default,i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Any=t.protobufPackage=void 0;var o=i(n(18)),a=i(n(21));t.protobufPackage="google.protobuf";var s={typeUrl:""};t.Any={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return""!==e.typeUrl&&t.uint32(10).string(e.typeUrl),0!==e.value.length&&t.uint32(18).bytes(e.value),t},decode:function(e,t){var n=e instanceof a.default.Reader?e:new a.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},s);for(i.value=new Uint8Array;n.pos>>3){case 1:i.typeUrl=n.string();break;case 2:i.value=n.bytes();break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t=Object.assign({},s);return t.value=new Uint8Array,void 0!==e.typeUrl&&null!==e.typeUrl?t.typeUrl=String(e.typeUrl):t.typeUrl="",void 0!==e.value&&null!==e.value&&(t.value=function(e){for(var t=c(e),n=new Uint8Array(t.length),r=0;r1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create(),i=r(e.signatures);try{for(i.s();!(t=i.n()).done;){var o=t.value;n.uint32(10).bytes(o)}}catch(s){i.e(s)}finally{i.f()}return n},decode:function(e,t){var n=e instanceof a.default.Reader?e:new a.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},s);for(i.signatures=[];n.pos>>3===1)i.signatures.push(n.bytes());else n.skipType(7&o)}return i},fromJSON:function(e){var t=Object.assign({},s);if(t.signatures=[],void 0!==e.signatures&&null!==e.signatures){var n,i=r(e.signatures);try{for(i.s();!(n=i.n()).done;){var o=n.value;t.signatures.push(f(o))}}catch(a){i.e(a)}finally{i.f()}}return t},toJSON:function(e){var t={};return e.signatures?t.signatures=e.signatures.map((function(e){return h(void 0!==e?e:new Uint8Array)})):t.signatures=[],t},fromPartial:function(e){var t=Object.assign({},s);if(t.signatures=[],void 0!==e.signatures&&null!==e.signatures){var n,i=r(e.signatures);try{for(i.s();!(n=i.n()).done;){var o=n.value;t.signatures.push(o)}}catch(a){i.e(a)}finally{i.f()}}return t}};var u={extraBitsStored:0};t.CompactBitArray={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return 0!==e.extraBitsStored&&t.uint32(8).uint32(e.extraBitsStored),0!==e.elems.length&&t.uint32(18).bytes(e.elems),t},decode:function(e,t){var n=e instanceof a.default.Reader?e:new a.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},u);for(i.elems=new Uint8Array;n.pos>>3){case 1:i.extraBitsStored=n.uint32();break;case 2:i.elems=n.bytes();break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t=Object.assign({},u);return t.elems=new Uint8Array,void 0!==e.extraBitsStored&&null!==e.extraBitsStored?t.extraBitsStored=Number(e.extraBitsStored):t.extraBitsStored=0,void 0!==e.elems&&null!==e.elems&&(t.elems=f(e.elems)),t},toJSON:function(e){var t={};return void 0!==e.extraBitsStored&&(t.extraBitsStored=e.extraBitsStored),void 0!==e.elems&&(t.elems=h(void 0!==e.elems?e.elems:new Uint8Array)),t},fromPartial:function(e){var t,n,r=Object.assign({},u);return r.extraBitsStored=null!==(t=e.extraBitsStored)&&void 0!==t?t:0,r.elems=null!==(n=e.elems)&&void 0!==n?n:new Uint8Array,r}};var c=function(){if("undefined"!==typeof c)return c;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof e)return e;throw"Unable to locate global object"}(),l=c.atob||function(e){return c.Buffer.from(e,"base64").toString("binary")};function f(e){for(var t=l(e),n=new Uint8Array(t.length),r=0;r1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();""!==e.fromAddress&&t.uint32(10).string(e.fromAddress),""!==e.toAddress&&t.uint32(18).string(e.toAddress);var n,r=o(e.amount);try{for(r.s();!(n=r.n()).done;){var i=n.value;c.Coin.encode(i,t.uint32(26).fork()).ldelim()}}catch(a){r.e(a)}finally{r.f()}return t},decode:function(e,t){var n=e instanceof u.default.Reader?e:new u.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},f);for(i.amount=[];n.pos>>3){case 1:i.fromAddress=n.string();break;case 2:i.toAddress=n.string();break;case 3:i.amount.push(c.Coin.decode(n,n.uint32()));break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t,n=Object.assign({},f);return n.fromAddress=void 0!==e.fromAddress&&null!==e.fromAddress?String(e.fromAddress):"",n.toAddress=void 0!==e.toAddress&&null!==e.toAddress?String(e.toAddress):"",n.amount=(null!==(t=e.amount)&&void 0!==t?t:[]).map((function(e){return c.Coin.fromJSON(e)})),n},toJSON:function(e){var t={};return void 0!==e.fromAddress&&(t.fromAddress=e.fromAddress),void 0!==e.toAddress&&(t.toAddress=e.toAddress),e.amount?t.amount=e.amount.map((function(e){return e?c.Coin.toJSON(e):void 0})):t.amount=[],t},fromPartial:function(e){var t,n,r,i=Object.assign({},f);return i.fromAddress=null!==(t=e.fromAddress)&&void 0!==t?t:"",i.toAddress=null!==(n=e.toAddress)&&void 0!==n?n:"",i.amount=(null===(r=e.amount)||void 0===r?void 0:r.map((function(e){return c.Coin.fromPartial(e)})))||[],i}};var d={};t.MsgSendResponse={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return t},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},d);n.pos1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create(),r=o(e.inputs);try{for(r.s();!(t=r.n()).done;){var i=t.value;l.Input.encode(i,n.uint32(10).fork()).ldelim()}}catch(f){r.e(f)}finally{r.f()}var a,s=o(e.outputs);try{for(s.s();!(a=s.n()).done;){var c=a.value;l.Output.encode(c,n.uint32(18).fork()).ldelim()}}catch(f){s.e(f)}finally{s.f()}return n},decode:function(e,t){var n=e instanceof u.default.Reader?e:new u.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},h);for(i.inputs=[],i.outputs=[];n.pos>>3){case 1:i.inputs.push(l.Input.decode(n,n.uint32()));break;case 2:i.outputs.push(l.Output.decode(n,n.uint32()));break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t,n,r=Object.assign({},h);return r.inputs=(null!==(t=e.inputs)&&void 0!==t?t:[]).map((function(e){return l.Input.fromJSON(e)})),r.outputs=(null!==(n=e.outputs)&&void 0!==n?n:[]).map((function(e){return l.Output.fromJSON(e)})),r},toJSON:function(e){var t={};return e.inputs?t.inputs=e.inputs.map((function(e){return e?l.Input.toJSON(e):void 0})):t.inputs=[],e.outputs?t.outputs=e.outputs.map((function(e){return e?l.Output.toJSON(e):void 0})):t.outputs=[],t},fromPartial:function(e){var t,n,r=Object.assign({},h);return r.inputs=(null===(t=e.inputs)||void 0===t?void 0:t.map((function(e){return l.Input.fromPartial(e)})))||[],r.outputs=(null===(n=e.outputs)||void 0===n?void 0:n.map((function(e){return l.Output.fromPartial(e)})))||[],r}};var p={};t.MsgMultiSendResponse={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return t},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},p);n.pos1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create(),o=r(e.sendEnabled);try{for(o.s();!(n=o.n()).done;){var s=n.value;t.SendEnabled.encode(s,i.uint32(10).fork()).ldelim()}}catch(u){o.e(u)}finally{o.f()}return!0===e.defaultSendEnabled&&i.uint32(16).bool(e.defaultSendEnabled),i},decode:function(e,n){var r=e instanceof a.default.Reader?e:new a.default.Reader(e),i=void 0===n?r.len:r.pos+n,o=Object.assign({},u);for(o.sendEnabled=[];r.pos>>3){case 1:o.sendEnabled.push(t.SendEnabled.decode(r,r.uint32()));break;case 2:o.defaultSendEnabled=r.bool();break;default:r.skipType(7&s)}}return o},fromJSON:function(e){var n,r=Object.assign({},u);return r.sendEnabled=(null!==(n=e.sendEnabled)&&void 0!==n?n:[]).map((function(e){return t.SendEnabled.fromJSON(e)})),r.defaultSendEnabled=void 0!==e.defaultSendEnabled&&null!==e.defaultSendEnabled&&Boolean(e.defaultSendEnabled),r},toJSON:function(e){var n={};return e.sendEnabled?n.sendEnabled=e.sendEnabled.map((function(e){return e?t.SendEnabled.toJSON(e):void 0})):n.sendEnabled=[],void 0!==e.defaultSendEnabled&&(n.defaultSendEnabled=e.defaultSendEnabled),n},fromPartial:function(e){var n,r,i=Object.assign({},u);return i.sendEnabled=(null===(n=e.sendEnabled)||void 0===n?void 0:n.map((function(e){return t.SendEnabled.fromPartial(e)})))||[],i.defaultSendEnabled=null!==(r=e.defaultSendEnabled)&&void 0!==r&&r,i}};var c={denom:"",enabled:!1};t.SendEnabled={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return""!==e.denom&&t.uint32(10).string(e.denom),!0===e.enabled&&t.uint32(16).bool(e.enabled),t},decode:function(e,t){for(var n=e instanceof a.default.Reader?e:new a.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},c);n.pos>>3){case 1:i.denom=n.string();break;case 2:i.enabled=n.bool();break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t=Object.assign({},c);return t.denom=void 0!==e.denom&&null!==e.denom?String(e.denom):"",t.enabled=void 0!==e.enabled&&null!==e.enabled&&Boolean(e.enabled),t},toJSON:function(e){var t={};return void 0!==e.denom&&(t.denom=e.denom),void 0!==e.enabled&&(t.enabled=e.enabled),t},fromPartial:function(e){var t,n,r=Object.assign({},c);return r.denom=null!==(t=e.denom)&&void 0!==t?t:"",r.enabled=null!==(n=e.enabled)&&void 0!==n&&n,r}};var l={address:""};t.Input={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();""!==e.address&&t.uint32(10).string(e.address);var n,i=r(e.coins);try{for(i.s();!(n=i.n()).done;){var o=n.value;s.Coin.encode(o,t.uint32(18).fork()).ldelim()}}catch(u){i.e(u)}finally{i.f()}return t},decode:function(e,t){var n=e instanceof a.default.Reader?e:new a.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},l);for(i.coins=[];n.pos>>3){case 1:i.address=n.string();break;case 2:i.coins.push(s.Coin.decode(n,n.uint32()));break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t,n=Object.assign({},l);return n.address=void 0!==e.address&&null!==e.address?String(e.address):"",n.coins=(null!==(t=e.coins)&&void 0!==t?t:[]).map((function(e){return s.Coin.fromJSON(e)})),n},toJSON:function(e){var t={};return void 0!==e.address&&(t.address=e.address),e.coins?t.coins=e.coins.map((function(e){return e?s.Coin.toJSON(e):void 0})):t.coins=[],t},fromPartial:function(e){var t,n,r=Object.assign({},l);return r.address=null!==(t=e.address)&&void 0!==t?t:"",r.coins=(null===(n=e.coins)||void 0===n?void 0:n.map((function(e){return s.Coin.fromPartial(e)})))||[],r}};var f={address:""};t.Output={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();""!==e.address&&t.uint32(10).string(e.address);var n,i=r(e.coins);try{for(i.s();!(n=i.n()).done;){var o=n.value;s.Coin.encode(o,t.uint32(18).fork()).ldelim()}}catch(u){i.e(u)}finally{i.f()}return t},decode:function(e,t){var n=e instanceof a.default.Reader?e:new a.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},f);for(i.coins=[];n.pos>>3){case 1:i.address=n.string();break;case 2:i.coins.push(s.Coin.decode(n,n.uint32()));break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t,n=Object.assign({},f);return n.address=void 0!==e.address&&null!==e.address?String(e.address):"",n.coins=(null!==(t=e.coins)&&void 0!==t?t:[]).map((function(e){return s.Coin.fromJSON(e)})),n},toJSON:function(e){var t={};return void 0!==e.address&&(t.address=e.address),e.coins?t.coins=e.coins.map((function(e){return e?s.Coin.toJSON(e):void 0})):t.coins=[],t},fromPartial:function(e){var t,n,r=Object.assign({},f);return r.address=null!==(t=e.address)&&void 0!==t?t:"",r.coins=(null===(n=e.coins)||void 0===n?void 0:n.map((function(e){return s.Coin.fromPartial(e)})))||[],r}};var d={};t.Supply={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create(),i=r(e.total);try{for(i.s();!(t=i.n()).done;){var o=t.value;s.Coin.encode(o,n.uint32(10).fork()).ldelim()}}catch(u){i.e(u)}finally{i.f()}return n},decode:function(e,t){var n=e instanceof a.default.Reader?e:new a.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},d);for(i.total=[];n.pos>>3===1)i.total.push(s.Coin.decode(n,n.uint32()));else n.skipType(7&o)}return i},fromJSON:function(e){var t,n=Object.assign({},d);return n.total=(null!==(t=e.total)&&void 0!==t?t:[]).map((function(e){return s.Coin.fromJSON(e)})),n},toJSON:function(e){var t={};return e.total?t.total=e.total.map((function(e){return e?s.Coin.toJSON(e):void 0})):t.total=[],t},fromPartial:function(e){var t,n=Object.assign({},d);return n.total=(null===(t=e.total)||void 0===t?void 0:t.map((function(e){return s.Coin.fromPartial(e)})))||[],n}};var h={denom:"",exponent:0,aliases:""};t.DenomUnit={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();""!==e.denom&&t.uint32(10).string(e.denom),0!==e.exponent&&t.uint32(16).uint32(e.exponent);var n,i=r(e.aliases);try{for(i.s();!(n=i.n()).done;){var o=n.value;t.uint32(26).string(o)}}catch(s){i.e(s)}finally{i.f()}return t},decode:function(e,t){var n=e instanceof a.default.Reader?e:new a.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},h);for(i.aliases=[];n.pos>>3){case 1:i.denom=n.string();break;case 2:i.exponent=n.uint32();break;case 3:i.aliases.push(n.string());break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t,n=Object.assign({},h);return n.denom=void 0!==e.denom&&null!==e.denom?String(e.denom):"",n.exponent=void 0!==e.exponent&&null!==e.exponent?Number(e.exponent):0,n.aliases=(null!==(t=e.aliases)&&void 0!==t?t:[]).map((function(e){return String(e)})),n},toJSON:function(e){var t={};return void 0!==e.denom&&(t.denom=e.denom),void 0!==e.exponent&&(t.exponent=e.exponent),e.aliases?t.aliases=e.aliases.map((function(e){return e})):t.aliases=[],t},fromPartial:function(e){var t,n,r,i=Object.assign({},h);return i.denom=null!==(t=e.denom)&&void 0!==t?t:"",i.exponent=null!==(n=e.exponent)&&void 0!==n?n:0,i.aliases=(null===(r=e.aliases)||void 0===r?void 0:r.map((function(e){return e})))||[],i}};var p={description:"",base:"",display:"",name:"",symbol:""};t.Metadata={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();""!==e.description&&n.uint32(10).string(e.description);var i,o=r(e.denomUnits);try{for(o.s();!(i=o.n()).done;){var s=i.value;t.DenomUnit.encode(s,n.uint32(18).fork()).ldelim()}}catch(u){o.e(u)}finally{o.f()}return""!==e.base&&n.uint32(26).string(e.base),""!==e.display&&n.uint32(34).string(e.display),""!==e.name&&n.uint32(42).string(e.name),""!==e.symbol&&n.uint32(50).string(e.symbol),n},decode:function(e,n){var r=e instanceof a.default.Reader?e:new a.default.Reader(e),i=void 0===n?r.len:r.pos+n,o=Object.assign({},p);for(o.denomUnits=[];r.pos>>3){case 1:o.description=r.string();break;case 2:o.denomUnits.push(t.DenomUnit.decode(r,r.uint32()));break;case 3:o.base=r.string();break;case 4:o.display=r.string();break;case 5:o.name=r.string();break;case 6:o.symbol=r.string();break;default:r.skipType(7&s)}}return o},fromJSON:function(e){var n,r=Object.assign({},p);return r.description=void 0!==e.description&&null!==e.description?String(e.description):"",r.denomUnits=(null!==(n=e.denomUnits)&&void 0!==n?n:[]).map((function(e){return t.DenomUnit.fromJSON(e)})),r.base=void 0!==e.base&&null!==e.base?String(e.base):"",r.display=void 0!==e.display&&null!==e.display?String(e.display):"",r.name=void 0!==e.name&&null!==e.name?String(e.name):"",r.symbol=void 0!==e.symbol&&null!==e.symbol?String(e.symbol):"",r},toJSON:function(e){var n={};return void 0!==e.description&&(n.description=e.description),e.denomUnits?n.denomUnits=e.denomUnits.map((function(e){return e?t.DenomUnit.toJSON(e):void 0})):n.denomUnits=[],void 0!==e.base&&(n.base=e.base),void 0!==e.display&&(n.display=e.display),void 0!==e.name&&(n.name=e.name),void 0!==e.symbol&&(n.symbol=e.symbol),n},fromPartial:function(e){var n,r,i,o,a,s,u=Object.assign({},p);return u.description=null!==(n=e.description)&&void 0!==n?n:"",u.denomUnits=(null===(r=e.denomUnits)||void 0===r?void 0:r.map((function(e){return t.DenomUnit.fromPartial(e)})))||[],u.base=null!==(i=e.base)&&void 0!==i?i:"",u.display=null!==(o=e.display)&&void 0!==o?o:"",u.name=null!==(a=e.name)&&void 0!==a?a:"",u.symbol=null!==(s=e.symbol)&&void 0!==s?s:"",u}},a.default.util.Long!==o.default&&(a.default.util.Long=o.default,a.default.configure())},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.accountFromAny=void 0;var r=n(70),i=n(114),o=n(69),a=n(283),s=n(979);function u(e){return r.Uint64.fromString(e.toString())}function c(e){var t=e.address,n=e.pubKey,r=e.accountNumber,o=e.sequence;return{address:t,pubkey:(0,i.decodePubkey)(n),accountNumber:u(r).toNumber(),sequence:u(o).toNumber()}}t.accountFromAny=function(e){var t,n,r,i,u,l,f,d=e.typeUrl,h=e.value;switch(d){case"/cosmos.auth.v1beta1.BaseAccount":return c(a.BaseAccount.decode(h));case"/cosmos.auth.v1beta1.ModuleAccount":var p=a.ModuleAccount.decode(h).baseAccount;return(0,o.assert)(p),c(p);case"/cosmos.vesting.v1beta1.BaseVestingAccount":var g=null===(t=s.BaseVestingAccount.decode(h))||void 0===t?void 0:t.baseAccount;return(0,o.assert)(g),c(g);case"/cosmos.vesting.v1beta1.ContinuousVestingAccount":var v=null===(r=null===(n=s.ContinuousVestingAccount.decode(h))||void 0===n?void 0:n.baseVestingAccount)||void 0===r?void 0:r.baseAccount;return(0,o.assert)(v),c(v);case"/cosmos.vesting.v1beta1.DelayedVestingAccount":var m=null===(u=null===(i=s.DelayedVestingAccount.decode(h))||void 0===i?void 0:i.baseVestingAccount)||void 0===u?void 0:u.baseAccount;return(0,o.assert)(m),c(m);case"/cosmos.vesting.v1beta1.PeriodicVestingAccount":var A=null===(f=null===(l=s.PeriodicVestingAccount.decode(h))||void 0===l?void 0:l.baseVestingAccount)||void 0===f?void 0:f.baseAccount;return(0,o.assert)(A),c(A);default:throw new Error("Unsupported type: '".concat(d,"'"))}}},function(e,t,n){"use strict";var r=n(73).default,i=n(9).default,o=n(10).default;function a(e){return"string"!==typeof e[1]}Object.defineProperty(t,"__esModule",{value:!0}),t.AminoTypes=void 0;var s=function(){function e(t){i(this,e),this.register=t}return o(e,[{key:"toAmino",value:function(e){var t=e.typeUrl,n=e.value,r=this.register[t];if("not_supported_by_chain"===r)throw new Error("The message type '".concat(t,"' cannot be signed using the Amino JSON sign mode because this is not supported by chain."));if(!r)throw new Error("Type URL '".concat(t,"' does not exist in the Amino message type register. ")+"If you need support for this message type, you can pass in additional entries to the AminoTypes constructor. If you think this message type should be included by default, please open an issue at https://github.com/cosmos/cosmjs/issues.");return{type:r.aminoType,value:r.toAmino(n)}}},{key:"fromAmino",value:function(e){var t=e.type,n=e.value,i=Object.entries(this.register).filter(a).filter((function(e){var n=r(e,2);n[0];return n[1].aminoType===t}));switch(i.length){case 0:throw new Error("Amino type identifier '".concat(t,"' does not exist in the Amino message type register. ")+"If you need support for this message type, you can pass in additional entries to the AminoTypes constructor. If you think this message type should be included by default, please open an issue at https://github.com/cosmos/cosmjs/issues.");case 1:var o=r(i[0],2);return{typeUrl:o[0],value:o[1].fromAmino(n)};default:throw new Error("Multiple types are registered with Amino type identifier '".concat(t,"': '")+i.map((function(e){var t=r(e,2),n=t[0];t[1];return n})).sort().join("', '")+"'. Thus fromAmino cannot be performed.")}}}]),e}();t.AminoTypes=s},function(e,t,n){"use strict";var r=n(73).default,i=n(9).default,o=n(10).default;Object.defineProperty(t,"__esModule",{value:!0}),t.calculateFee=t.GasPrice=void 0;var a=n(70),s=n(114);var u=function(){function e(t,n){i(this,e),this.amount=t,this.denom=n}return o(e,[{key:"toString",value:function(){return this.amount.toString()+this.denom}}],[{key:"fromString",value:function(t){var n=t.match(/^([0-9.]+)([a-z][a-z0-9]*)$/i);if(!n)throw new Error("Invalid gas price string");var i=r(n,3),o=(i[0],i[1]),s=i[2];!function(e){if(e.length<3||e.length>128)throw new Error("Denom must be between 3 and 128 characters")}(s);return new e(a.Decimal.fromUserInput(o,18),s)}}]),e}();t.GasPrice=u,t.calculateFee=function(e,t){var n="string"===typeof t?u.fromString(t):t,r=n.denom,i=n.amount.multiply(new a.Uint53(e)).ceil().toString();return{amount:(0,s.coins)(i,r),gas:e.toString()}}},function(e,t,n){"use strict";var r=n(44).default,i=n(19).default;Object.defineProperty(t,"__esModule",{value:!0}),t.ensureLeftNeighbor=t.ensureSpec=t.calculateExistenceRoot=t.verifyNonExistence=t.verifyExistence=t.smtSpec=t.tendermintSpec=t.iavlSpec=void 0;var o=n(216),a=n(987),s=n(461);function u(e,t,n,r,i){l(e,t);var o=c(e);(0,s.ensureBytesEqual)(o,n),(0,s.ensureBytesEqual)(r,e.key),(0,s.ensureBytesEqual)(i,e.value)}function c(e){if(!e.key||!e.value)throw new Error("Existence proof needs key and value set");if(!e.leaf)throw new Error("Existence proof must start with a leaf operation");var t,n=e.path||[],r=(0,a.applyLeaf)(e.leaf,e.key,e.value),o=i(n);try{for(o.s();!(t=o.n()).done;){var s=t.value;r=(0,a.applyInner)(s,r)}}catch(u){o.e(u)}finally{o.f()}return r}function l(e,t){if(!e.leaf)throw new Error("Existence proof must start with a leaf operation");if(!t.leafSpec)throw new Error("Spec must include leafSpec");if(!t.innerSpec)throw new Error("Spec must include innerSpec");(0,s.ensureLeaf)(e.leaf,t.leafSpec);var n=e.path||[];if(t.minDepth&&n.lengtht.maxDepth)throw new Error("Too many inner nodes ".concat(n.length));var r,o=i(n);try{for(o.s();!(r=o.n()).done;){var a=r.value;(0,s.ensureInner)(a,t.leafSpec.prefix,t.innerSpec)}}catch(u){o.e(u)}finally{o.f()}}function f(e,t){var n,r=v(e,0),o=r.minPrefix,a=r.maxPrefix,s=r.suffix,u=i(t);try{for(u.s();!(n=u.n()).done;){if(!g(n.value,o,a,s))throw new Error("Step not leftmost")}}catch(c){u.e(c)}finally{u.f()}}function d(e,t){var n,r=v(e,e.childOrder.length-1),o=r.minPrefix,a=r.maxPrefix,s=r.suffix,u=i(t);try{for(u.s();!(n=u.n()).done;){if(!g(n.value,o,a,s))throw new Error("Step not leftmost")}}catch(c){u.e(c)}finally{u.f()}}function h(e,t,n){for(var i=r(t),o=r(n),a=i.pop(),u=o.pop();(0,s.bytesEqual)(a.prefix,u.prefix)&&(0,s.bytesEqual)(a.suffix,u.suffix);)a=i.pop(),u=o.pop();if(!function(e,t,n){var r=p(e,t);return p(e,n)===r+1}(e,a,u))throw new Error("Not left neightbor at first divergent step");d(e,i),f(e,o)}function p(e,t){for(var n=0;nn)&&(e.suffix||[]).length===r)}function v(e,t){var n=function(e,t){if(t<0||t>=e.length)throw new Error("Invalid branch: ".concat(t));return e.findIndex((function(e){return e===t}))}(e.childOrder,t),r=n*e.childSize;return{minPrefix:r+e.minPrefixLength,maxPrefix:r+e.maxPrefixLength,suffix:(e.childOrder.length-1-n)*e.childSize}}t.iavlSpec={leafSpec:{prefix:Uint8Array.from([0]),hash:o.ics23.HashOp.SHA256,prehashValue:o.ics23.HashOp.SHA256,prehashKey:o.ics23.HashOp.NO_HASH,length:o.ics23.LengthOp.VAR_PROTO},innerSpec:{childOrder:[0,1],minPrefixLength:4,maxPrefixLength:12,childSize:33,hash:o.ics23.HashOp.SHA256}},t.tendermintSpec={leafSpec:{prefix:Uint8Array.from([0]),hash:o.ics23.HashOp.SHA256,prehashValue:o.ics23.HashOp.SHA256,prehashKey:o.ics23.HashOp.NO_HASH,length:o.ics23.LengthOp.VAR_PROTO},innerSpec:{childOrder:[0,1],minPrefixLength:1,maxPrefixLength:1,childSize:32,hash:o.ics23.HashOp.SHA256}},t.smtSpec={leafSpec:{hash:o.ics23.HashOp.SHA256,prehashKey:o.ics23.HashOp.NO_HASH,prehashValue:o.ics23.HashOp.SHA256,length:o.ics23.LengthOp.NO_PREFIX,prefix:Uint8Array.from([0])},innerSpec:{childOrder:[0,1],childSize:32,minPrefixLength:1,maxPrefixLength:1,emptyChild:new Uint8Array(32),hash:o.ics23.HashOp.SHA256},maxDepth:256},t.verifyExistence=u,t.verifyNonExistence=function(e,t,n,r){var i,o;if(e.left&&(u(e.left,t,n,e.left.key,e.left.value),i=e.left.key),e.right&&(u(e.right,t,n,e.right.key,e.right.value),o=e.right.key),!i&&!o)throw new Error("neither left nor right proof defined");if(i&&(0,s.ensureBytesBefore)(i,r),o&&(0,s.ensureBytesBefore)(r,o),!t.innerSpec)throw new Error("no inner spec");i?o?h(t.innerSpec,e.left.path,e.right.path):d(t.innerSpec,e.left.path):f(t.innerSpec,e.right.path)},t.calculateExistenceRoot=c,t.ensureSpec=l,t.ensureLeftNeighbor=h},function(e,t,n){"use strict";function r(e,t){if(e.length!==t.length)throw new Error("Different lengths ".concat(e.length," vs ").concat(t.length));for(var n=0;nt[r])return!1}return e.length(n.maxPrefixLength||0)+r)throw new Error("Prefix too long: ".concat(e.prefix.length," bytes"))},t.ensureBytesEqual=r,t.bytesEqual=function(e,t){if(e.length!==t.length)return!1;for(var n=0;n2?arguments[2]:{},o=r(t);i&&(o=a.call(o,Object.getOwnPropertySymbols(t)));for(var s=0;s=0&&"[object Function]"===r.call(e.callee)),n}},function(e,t,n){"use strict";"undefined"!==typeof self?e.exports=self:"undefined"!==typeof window?e.exports=window:e.exports=Function("return this")()},function(e,t,n){"use strict";(function(t){var r=n(464);e.exports=function(){return"object"===typeof t&&t&&t.Math===Math&&t.Array===Array?t:r}}).call(this,n(20))},function(e,t,n){"use strict";var r=n(9).default,i=n(10).default,o=n(19).default,a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MsgClientImpl=t.MsgFundCommunityPoolResponse=t.MsgFundCommunityPool=t.MsgWithdrawValidatorCommissionResponse=t.MsgWithdrawValidatorCommission=t.MsgWithdrawDelegatorRewardResponse=t.MsgWithdrawDelegatorReward=t.MsgSetWithdrawAddressResponse=t.MsgSetWithdrawAddress=t.protobufPackage=void 0;var s=a(n(18)),u=a(n(21)),c=n(68);t.protobufPackage="cosmos.distribution.v1beta1";var l={delegatorAddress:"",withdrawAddress:""};t.MsgSetWithdrawAddress={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.withdrawAddress&&t.uint32(18).string(e.withdrawAddress),t},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},l);n.pos>>3){case 1:i.delegatorAddress=n.string();break;case 2:i.withdrawAddress=n.string();break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t=Object.assign({},l);return t.delegatorAddress=void 0!==e.delegatorAddress&&null!==e.delegatorAddress?String(e.delegatorAddress):"",t.withdrawAddress=void 0!==e.withdrawAddress&&null!==e.withdrawAddress?String(e.withdrawAddress):"",t},toJSON:function(e){var t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.withdrawAddress&&(t.withdrawAddress=e.withdrawAddress),t},fromPartial:function(e){var t,n,r=Object.assign({},l);return r.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",r.withdrawAddress=null!==(n=e.withdrawAddress)&&void 0!==n?n:"",r}};var f={};t.MsgSetWithdrawAddressResponse={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return t},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},f);n.pos1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),t},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},d);n.pos>>3){case 1:i.delegatorAddress=n.string();break;case 2:i.validatorAddress=n.string();break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t=Object.assign({},d);return t.delegatorAddress=void 0!==e.delegatorAddress&&null!==e.delegatorAddress?String(e.delegatorAddress):"",t.validatorAddress=void 0!==e.validatorAddress&&null!==e.validatorAddress?String(e.validatorAddress):"",t},toJSON:function(e){var t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),t},fromPartial:function(e){var t,n,r=Object.assign({},d);return r.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",r.validatorAddress=null!==(n=e.validatorAddress)&&void 0!==n?n:"",r}};var h={};t.MsgWithdrawDelegatorRewardResponse={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return t},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},h);n.pos1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return""!==e.validatorAddress&&t.uint32(10).string(e.validatorAddress),t},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},p);n.pos>>3===1)i.validatorAddress=n.string();else n.skipType(7&o)}return i},fromJSON:function(e){var t=Object.assign({},p);return t.validatorAddress=void 0!==e.validatorAddress&&null!==e.validatorAddress?String(e.validatorAddress):"",t},toJSON:function(e){var t={};return void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),t},fromPartial:function(e){var t,n=Object.assign({},p);return n.validatorAddress=null!==(t=e.validatorAddress)&&void 0!==t?t:"",n}};var g={};t.MsgWithdrawValidatorCommissionResponse={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return t},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},g);n.pos1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create(),r=o(e.amount);try{for(r.s();!(t=r.n()).done;){var i=t.value;c.Coin.encode(i,n.uint32(10).fork()).ldelim()}}catch(a){r.e(a)}finally{r.f()}return""!==e.depositor&&n.uint32(18).string(e.depositor),n},decode:function(e,t){var n=e instanceof u.default.Reader?e:new u.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},v);for(i.amount=[];n.pos>>3){case 1:i.amount.push(c.Coin.decode(n,n.uint32()));break;case 2:i.depositor=n.string();break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t,n=Object.assign({},v);return n.amount=(null!==(t=e.amount)&&void 0!==t?t:[]).map((function(e){return c.Coin.fromJSON(e)})),n.depositor=void 0!==e.depositor&&null!==e.depositor?String(e.depositor):"",n},toJSON:function(e){var t={};return e.amount?t.amount=e.amount.map((function(e){return e?c.Coin.toJSON(e):void 0})):t.amount=[],void 0!==e.depositor&&(t.depositor=e.depositor),t},fromPartial:function(e){var t,n,r=Object.assign({},v);return r.amount=(null===(t=e.amount)||void 0===t?void 0:t.map((function(e){return c.Coin.fromPartial(e)})))||[],r.depositor=null!==(n=e.depositor)&&void 0!==n?n:"",r}};var m={};t.MsgFundCommunityPoolResponse={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return t},decode:function(e,t){for(var n=e instanceof u.default.Reader?e:new u.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},m);n.pos1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return""!==e.sourcePort&&t.uint32(10).string(e.sourcePort),""!==e.sourceChannel&&t.uint32(18).string(e.sourceChannel),void 0!==e.token&&u.Coin.encode(e.token,t.uint32(26).fork()).ldelim(),""!==e.sender&&t.uint32(34).string(e.sender),""!==e.receiver&&t.uint32(42).string(e.receiver),void 0!==e.timeoutHeight&&c.Height.encode(e.timeoutHeight,t.uint32(50).fork()).ldelim(),e.timeoutTimestamp.isZero()||t.uint32(56).uint64(e.timeoutTimestamp),t},decode:function(e,t){for(var n=e instanceof s.default.Reader?e:new s.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},l);n.pos>>3){case 1:i.sourcePort=n.string();break;case 2:i.sourceChannel=n.string();break;case 3:i.token=u.Coin.decode(n,n.uint32());break;case 4:i.sender=n.string();break;case 5:i.receiver=n.string();break;case 6:i.timeoutHeight=c.Height.decode(n,n.uint32());break;case 7:i.timeoutTimestamp=n.uint64();break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t=Object.assign({},l);return t.sourcePort=void 0!==e.sourcePort&&null!==e.sourcePort?String(e.sourcePort):"",t.sourceChannel=void 0!==e.sourceChannel&&null!==e.sourceChannel?String(e.sourceChannel):"",t.token=void 0!==e.token&&null!==e.token?u.Coin.fromJSON(e.token):void 0,t.sender=void 0!==e.sender&&null!==e.sender?String(e.sender):"",t.receiver=void 0!==e.receiver&&null!==e.receiver?String(e.receiver):"",t.timeoutHeight=void 0!==e.timeoutHeight&&null!==e.timeoutHeight?c.Height.fromJSON(e.timeoutHeight):void 0,t.timeoutTimestamp=void 0!==e.timeoutTimestamp&&null!==e.timeoutTimestamp?a.default.fromString(e.timeoutTimestamp):a.default.UZERO,t},toJSON:function(e){var t={};return void 0!==e.sourcePort&&(t.sourcePort=e.sourcePort),void 0!==e.sourceChannel&&(t.sourceChannel=e.sourceChannel),void 0!==e.token&&(t.token=e.token?u.Coin.toJSON(e.token):void 0),void 0!==e.sender&&(t.sender=e.sender),void 0!==e.receiver&&(t.receiver=e.receiver),void 0!==e.timeoutHeight&&(t.timeoutHeight=e.timeoutHeight?c.Height.toJSON(e.timeoutHeight):void 0),void 0!==e.timeoutTimestamp&&(t.timeoutTimestamp=(e.timeoutTimestamp||a.default.UZERO).toString()),t},fromPartial:function(e){var t,n,r,i,o=Object.assign({},l);return o.sourcePort=null!==(t=e.sourcePort)&&void 0!==t?t:"",o.sourceChannel=null!==(n=e.sourceChannel)&&void 0!==n?n:"",o.token=void 0!==e.token&&null!==e.token?u.Coin.fromPartial(e.token):void 0,o.sender=null!==(r=e.sender)&&void 0!==r?r:"",o.receiver=null!==(i=e.receiver)&&void 0!==i?i:"",o.timeoutHeight=void 0!==e.timeoutHeight&&null!==e.timeoutHeight?c.Height.fromPartial(e.timeoutHeight):void 0,o.timeoutTimestamp=void 0!==e.timeoutTimestamp&&null!==e.timeoutTimestamp?a.default.fromValue(e.timeoutTimestamp):a.default.UZERO,o}};var f={};t.MsgTransferResponse={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return t},decode:function(e,t){for(var n=e instanceof s.default.Reader?e:new s.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},f);n.pos1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();""!==e.clientId&&n.uint32(10).string(e.clientId);var i,o=r(e.versions);try{for(o.s();!(i=o.n()).done;){var a=i.value;t.Version.encode(a,n.uint32(18).fork()).ldelim()}}catch(u){o.e(u)}finally{o.f()}return 0!==e.state&&n.uint32(24).int32(e.state),void 0!==e.counterparty&&t.Counterparty.encode(e.counterparty,n.uint32(34).fork()).ldelim(),e.delayPeriod.isZero()||n.uint32(40).uint64(e.delayPeriod),n},decode:function(e,n){var r=e instanceof s.default.Reader?e:new s.default.Reader(e),i=void 0===n?r.len:r.pos+n,o=Object.assign({},f);for(o.versions=[];r.pos>>3){case 1:o.clientId=r.string();break;case 2:o.versions.push(t.Version.decode(r,r.uint32()));break;case 3:o.state=r.int32();break;case 4:o.counterparty=t.Counterparty.decode(r,r.uint32());break;case 5:o.delayPeriod=r.uint64();break;default:r.skipType(7&a)}}return o},fromJSON:function(e){var n,r=Object.assign({},f);return r.clientId=void 0!==e.clientId&&null!==e.clientId?String(e.clientId):"",r.versions=(null!==(n=e.versions)&&void 0!==n?n:[]).map((function(e){return t.Version.fromJSON(e)})),r.state=void 0!==e.state&&null!==e.state?c(e.state):0,r.counterparty=void 0!==e.counterparty&&null!==e.counterparty?t.Counterparty.fromJSON(e.counterparty):void 0,r.delayPeriod=void 0!==e.delayPeriod&&null!==e.delayPeriod?a.default.fromString(e.delayPeriod):a.default.UZERO,r},toJSON:function(e){var n={};return void 0!==e.clientId&&(n.clientId=e.clientId),e.versions?n.versions=e.versions.map((function(e){return e?t.Version.toJSON(e):void 0})):n.versions=[],void 0!==e.state&&(n.state=l(e.state)),void 0!==e.counterparty&&(n.counterparty=e.counterparty?t.Counterparty.toJSON(e.counterparty):void 0),void 0!==e.delayPeriod&&(n.delayPeriod=(e.delayPeriod||a.default.UZERO).toString()),n},fromPartial:function(e){var n,r,i,o=Object.assign({},f);return o.clientId=null!==(n=e.clientId)&&void 0!==n?n:"",o.versions=(null===(r=e.versions)||void 0===r?void 0:r.map((function(e){return t.Version.fromPartial(e)})))||[],o.state=null!==(i=e.state)&&void 0!==i?i:0,o.counterparty=void 0!==e.counterparty&&null!==e.counterparty?t.Counterparty.fromPartial(e.counterparty):void 0,o.delayPeriod=void 0!==e.delayPeriod&&null!==e.delayPeriod?a.default.fromValue(e.delayPeriod):a.default.UZERO,o}};var d={id:"",clientId:"",state:0,delayPeriod:a.default.UZERO};t.IdentifiedConnection={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();""!==e.id&&n.uint32(10).string(e.id),""!==e.clientId&&n.uint32(18).string(e.clientId);var i,o=r(e.versions);try{for(o.s();!(i=o.n()).done;){var a=i.value;t.Version.encode(a,n.uint32(26).fork()).ldelim()}}catch(u){o.e(u)}finally{o.f()}return 0!==e.state&&n.uint32(32).int32(e.state),void 0!==e.counterparty&&t.Counterparty.encode(e.counterparty,n.uint32(42).fork()).ldelim(),e.delayPeriod.isZero()||n.uint32(48).uint64(e.delayPeriod),n},decode:function(e,n){var r=e instanceof s.default.Reader?e:new s.default.Reader(e),i=void 0===n?r.len:r.pos+n,o=Object.assign({},d);for(o.versions=[];r.pos>>3){case 1:o.id=r.string();break;case 2:o.clientId=r.string();break;case 3:o.versions.push(t.Version.decode(r,r.uint32()));break;case 4:o.state=r.int32();break;case 5:o.counterparty=t.Counterparty.decode(r,r.uint32());break;case 6:o.delayPeriod=r.uint64();break;default:r.skipType(7&a)}}return o},fromJSON:function(e){var n,r=Object.assign({},d);return r.id=void 0!==e.id&&null!==e.id?String(e.id):"",r.clientId=void 0!==e.clientId&&null!==e.clientId?String(e.clientId):"",r.versions=(null!==(n=e.versions)&&void 0!==n?n:[]).map((function(e){return t.Version.fromJSON(e)})),r.state=void 0!==e.state&&null!==e.state?c(e.state):0,r.counterparty=void 0!==e.counterparty&&null!==e.counterparty?t.Counterparty.fromJSON(e.counterparty):void 0,r.delayPeriod=void 0!==e.delayPeriod&&null!==e.delayPeriod?a.default.fromString(e.delayPeriod):a.default.UZERO,r},toJSON:function(e){var n={};return void 0!==e.id&&(n.id=e.id),void 0!==e.clientId&&(n.clientId=e.clientId),e.versions?n.versions=e.versions.map((function(e){return e?t.Version.toJSON(e):void 0})):n.versions=[],void 0!==e.state&&(n.state=l(e.state)),void 0!==e.counterparty&&(n.counterparty=e.counterparty?t.Counterparty.toJSON(e.counterparty):void 0),void 0!==e.delayPeriod&&(n.delayPeriod=(e.delayPeriod||a.default.UZERO).toString()),n},fromPartial:function(e){var n,r,i,o,s=Object.assign({},d);return s.id=null!==(n=e.id)&&void 0!==n?n:"",s.clientId=null!==(r=e.clientId)&&void 0!==r?r:"",s.versions=(null===(i=e.versions)||void 0===i?void 0:i.map((function(e){return t.Version.fromPartial(e)})))||[],s.state=null!==(o=e.state)&&void 0!==o?o:0,s.counterparty=void 0!==e.counterparty&&null!==e.counterparty?t.Counterparty.fromPartial(e.counterparty):void 0,s.delayPeriod=void 0!==e.delayPeriod&&null!==e.delayPeriod?a.default.fromValue(e.delayPeriod):a.default.UZERO,s}};var h={clientId:"",connectionId:""};t.Counterparty={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return""!==e.clientId&&t.uint32(10).string(e.clientId),""!==e.connectionId&&t.uint32(18).string(e.connectionId),void 0!==e.prefix&&u.MerklePrefix.encode(e.prefix,t.uint32(26).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof s.default.Reader?e:new s.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},h);n.pos>>3){case 1:i.clientId=n.string();break;case 2:i.connectionId=n.string();break;case 3:i.prefix=u.MerklePrefix.decode(n,n.uint32());break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t=Object.assign({},h);return t.clientId=void 0!==e.clientId&&null!==e.clientId?String(e.clientId):"",t.connectionId=void 0!==e.connectionId&&null!==e.connectionId?String(e.connectionId):"",t.prefix=void 0!==e.prefix&&null!==e.prefix?u.MerklePrefix.fromJSON(e.prefix):void 0,t},toJSON:function(e){var t={};return void 0!==e.clientId&&(t.clientId=e.clientId),void 0!==e.connectionId&&(t.connectionId=e.connectionId),void 0!==e.prefix&&(t.prefix=e.prefix?u.MerklePrefix.toJSON(e.prefix):void 0),t},fromPartial:function(e){var t,n,r=Object.assign({},h);return r.clientId=null!==(t=e.clientId)&&void 0!==t?t:"",r.connectionId=null!==(n=e.connectionId)&&void 0!==n?n:"",r.prefix=void 0!==e.prefix&&null!==e.prefix?u.MerklePrefix.fromPartial(e.prefix):void 0,r}};var p={paths:""};t.ClientPaths={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create(),i=r(e.paths);try{for(i.s();!(t=i.n()).done;){var o=t.value;n.uint32(10).string(o)}}catch(a){i.e(a)}finally{i.f()}return n},decode:function(e,t){var n=e instanceof s.default.Reader?e:new s.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},p);for(i.paths=[];n.pos>>3===1)i.paths.push(n.string());else n.skipType(7&o)}return i},fromJSON:function(e){var t,n=Object.assign({},p);return n.paths=(null!==(t=e.paths)&&void 0!==t?t:[]).map((function(e){return String(e)})),n},toJSON:function(e){var t={};return e.paths?t.paths=e.paths.map((function(e){return e})):t.paths=[],t},fromPartial:function(e){var t,n=Object.assign({},p);return n.paths=(null===(t=e.paths)||void 0===t?void 0:t.map((function(e){return e})))||[],n}};var g={clientId:"",paths:""};t.ConnectionPaths={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();""!==e.clientId&&t.uint32(10).string(e.clientId);var n,i=r(e.paths);try{for(i.s();!(n=i.n()).done;){var o=n.value;t.uint32(18).string(o)}}catch(a){i.e(a)}finally{i.f()}return t},decode:function(e,t){var n=e instanceof s.default.Reader?e:new s.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},g);for(i.paths=[];n.pos>>3){case 1:i.clientId=n.string();break;case 2:i.paths.push(n.string());break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t,n=Object.assign({},g);return n.clientId=void 0!==e.clientId&&null!==e.clientId?String(e.clientId):"",n.paths=(null!==(t=e.paths)&&void 0!==t?t:[]).map((function(e){return String(e)})),n},toJSON:function(e){var t={};return void 0!==e.clientId&&(t.clientId=e.clientId),e.paths?t.paths=e.paths.map((function(e){return e})):t.paths=[],t},fromPartial:function(e){var t,n,r=Object.assign({},g);return r.clientId=null!==(t=e.clientId)&&void 0!==t?t:"",r.paths=(null===(n=e.paths)||void 0===n?void 0:n.map((function(e){return e})))||[],r}};var v={identifier:"",features:""};t.Version={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();""!==e.identifier&&t.uint32(10).string(e.identifier);var n,i=r(e.features);try{for(i.s();!(n=i.n()).done;){var o=n.value;t.uint32(18).string(o)}}catch(a){i.e(a)}finally{i.f()}return t},decode:function(e,t){var n=e instanceof s.default.Reader?e:new s.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},v);for(i.features=[];n.pos>>3){case 1:i.identifier=n.string();break;case 2:i.features.push(n.string());break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t,n=Object.assign({},v);return n.identifier=void 0!==e.identifier&&null!==e.identifier?String(e.identifier):"",n.features=(null!==(t=e.features)&&void 0!==t?t:[]).map((function(e){return String(e)})),n},toJSON:function(e){var t={};return void 0!==e.identifier&&(t.identifier=e.identifier),e.features?t.features=e.features.map((function(e){return e})):t.features=[],t},fromPartial:function(e){var t,n,r=Object.assign({},v);return r.identifier=null!==(t=e.identifier)&&void 0!==t?t:"",r.features=(null===(n=e.features)||void 0===n?void 0:n.map((function(e){return e})))||[],r}},s.default.util.Long!==a.default&&(s.default.util.Long=a.default,s.default.configure())},function(e,t,n){"use strict";(function(e){var r=n(19).default,i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MerkleProof=t.MerklePath=t.MerklePrefix=t.MerkleRoot=t.protobufPackage=void 0;var o=i(n(18)),a=i(n(21)),s=n(470);t.protobufPackage="ibc.core.commitment.v1";var u={};t.MerkleRoot={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return 0!==e.hash.length&&t.uint32(10).bytes(e.hash),t},decode:function(e,t){var n=e instanceof a.default.Reader?e:new a.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},u);for(i.hash=new Uint8Array;n.pos>>3===1)i.hash=n.bytes();else n.skipType(7&o)}return i},fromJSON:function(e){var t=Object.assign({},u);return t.hash=void 0!==e.hash&&null!==e.hash?p(e.hash):new Uint8Array,t},toJSON:function(e){var t={};return void 0!==e.hash&&(t.hash=v(void 0!==e.hash?e.hash:new Uint8Array)),t},fromPartial:function(e){var t,n=Object.assign({},u);return n.hash=null!==(t=e.hash)&&void 0!==t?t:new Uint8Array,n}};var c={};t.MerklePrefix={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return 0!==e.keyPrefix.length&&t.uint32(10).bytes(e.keyPrefix),t},decode:function(e,t){var n=e instanceof a.default.Reader?e:new a.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},c);for(i.keyPrefix=new Uint8Array;n.pos>>3===1)i.keyPrefix=n.bytes();else n.skipType(7&o)}return i},fromJSON:function(e){var t=Object.assign({},c);return t.keyPrefix=void 0!==e.keyPrefix&&null!==e.keyPrefix?p(e.keyPrefix):new Uint8Array,t},toJSON:function(e){var t={};return void 0!==e.keyPrefix&&(t.keyPrefix=v(void 0!==e.keyPrefix?e.keyPrefix:new Uint8Array)),t},fromPartial:function(e){var t,n=Object.assign({},c);return n.keyPrefix=null!==(t=e.keyPrefix)&&void 0!==t?t:new Uint8Array,n}};var l={keyPath:""};t.MerklePath={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create(),i=r(e.keyPath);try{for(i.s();!(t=i.n()).done;){var o=t.value;n.uint32(10).string(o)}}catch(s){i.e(s)}finally{i.f()}return n},decode:function(e,t){var n=e instanceof a.default.Reader?e:new a.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},l);for(i.keyPath=[];n.pos>>3===1)i.keyPath.push(n.string());else n.skipType(7&o)}return i},fromJSON:function(e){var t,n=Object.assign({},l);return n.keyPath=(null!==(t=e.keyPath)&&void 0!==t?t:[]).map((function(e){return String(e)})),n},toJSON:function(e){var t={};return e.keyPath?t.keyPath=e.keyPath.map((function(e){return e})):t.keyPath=[],t},fromPartial:function(e){var t,n=Object.assign({},l);return n.keyPath=(null===(t=e.keyPath)||void 0===t?void 0:t.map((function(e){return e})))||[],n}};var f={};t.MerkleProof={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create(),i=r(e.proofs);try{for(i.s();!(t=i.n()).done;){var o=t.value;s.CommitmentProof.encode(o,n.uint32(10).fork()).ldelim()}}catch(u){i.e(u)}finally{i.f()}return n},decode:function(e,t){var n=e instanceof a.default.Reader?e:new a.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},f);for(i.proofs=[];n.pos>>3===1)i.proofs.push(s.CommitmentProof.decode(n,n.uint32()));else n.skipType(7&o)}return i},fromJSON:function(e){var t,n=Object.assign({},f);return n.proofs=(null!==(t=e.proofs)&&void 0!==t?t:[]).map((function(e){return s.CommitmentProof.fromJSON(e)})),n},toJSON:function(e){var t={};return e.proofs?t.proofs=e.proofs.map((function(e){return e?s.CommitmentProof.toJSON(e):void 0})):t.proofs=[],t},fromPartial:function(e){var t,n=Object.assign({},f);return n.proofs=(null===(t=e.proofs)||void 0===t?void 0:t.map((function(e){return s.CommitmentProof.fromPartial(e)})))||[],n}};var d=function(){if("undefined"!==typeof d)return d;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof e)return e;throw"Unable to locate global object"}(),h=d.atob||function(e){return d.Buffer.from(e,"base64").toString("binary")};function p(e){for(var t=h(e),n=new Uint8Array(t.length),r=0;r1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();0!==e.key.length&&n.uint32(10).bytes(e.key),0!==e.value.length&&n.uint32(18).bytes(e.value),void 0!==e.leaf&&t.LeafOp.encode(e.leaf,n.uint32(26).fork()).ldelim();var i,o=r(e.path);try{for(o.s();!(i=o.n()).done;){var a=i.value;t.InnerOp.encode(a,n.uint32(34).fork()).ldelim()}}catch(s){o.e(s)}finally{o.f()}return n},decode:function(e,n){var r=e instanceof u.default.Reader?e:new u.default.Reader(e),i=void 0===n?r.len:r.pos+n,o=Object.assign({},h);for(o.path=[],o.key=new Uint8Array,o.value=new Uint8Array;r.pos>>3){case 1:o.key=r.bytes();break;case 2:o.value=r.bytes();break;case 3:o.leaf=t.LeafOp.decode(r,r.uint32());break;case 4:o.path.push(t.InnerOp.decode(r,r.uint32()));break;default:r.skipType(7&a)}}return o},fromJSON:function(e){var n,r=Object.assign({},h);return r.key=void 0!==e.key&&null!==e.key?x(e.key):new Uint8Array,r.value=void 0!==e.value&&null!==e.value?x(e.value):new Uint8Array,r.leaf=void 0!==e.leaf&&null!==e.leaf?t.LeafOp.fromJSON(e.leaf):void 0,r.path=(null!==(n=e.path)&&void 0!==n?n:[]).map((function(e){return t.InnerOp.fromJSON(e)})),r},toJSON:function(e){var n={};return void 0!==e.key&&(n.key=O(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.value&&(n.value=O(void 0!==e.value?e.value:new Uint8Array)),void 0!==e.leaf&&(n.leaf=e.leaf?t.LeafOp.toJSON(e.leaf):void 0),e.path?n.path=e.path.map((function(e){return e?t.InnerOp.toJSON(e):void 0})):n.path=[],n},fromPartial:function(e){var n,r,i,o=Object.assign({},h);return o.key=null!==(n=e.key)&&void 0!==n?n:new Uint8Array,o.value=null!==(r=e.value)&&void 0!==r?r:new Uint8Array,o.leaf=void 0!==e.leaf&&null!==e.leaf?t.LeafOp.fromPartial(e.leaf):void 0,o.path=(null===(i=e.path)||void 0===i?void 0:i.map((function(e){return t.InnerOp.fromPartial(e)})))||[],o}};var p={};t.NonExistenceProof={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return 0!==e.key.length&&n.uint32(10).bytes(e.key),void 0!==e.left&&t.ExistenceProof.encode(e.left,n.uint32(18).fork()).ldelim(),void 0!==e.right&&t.ExistenceProof.encode(e.right,n.uint32(26).fork()).ldelim(),n},decode:function(e,n){var r=e instanceof u.default.Reader?e:new u.default.Reader(e),i=void 0===n?r.len:r.pos+n,o=Object.assign({},p);for(o.key=new Uint8Array;r.pos>>3){case 1:o.key=r.bytes();break;case 2:o.left=t.ExistenceProof.decode(r,r.uint32());break;case 3:o.right=t.ExistenceProof.decode(r,r.uint32());break;default:r.skipType(7&a)}}return o},fromJSON:function(e){var n=Object.assign({},p);return n.key=void 0!==e.key&&null!==e.key?x(e.key):new Uint8Array,n.left=void 0!==e.left&&null!==e.left?t.ExistenceProof.fromJSON(e.left):void 0,n.right=void 0!==e.right&&null!==e.right?t.ExistenceProof.fromJSON(e.right):void 0,n},toJSON:function(e){var n={};return void 0!==e.key&&(n.key=O(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.left&&(n.left=e.left?t.ExistenceProof.toJSON(e.left):void 0),void 0!==e.right&&(n.right=e.right?t.ExistenceProof.toJSON(e.right):void 0),n},fromPartial:function(e){var n,r=Object.assign({},p);return r.key=null!==(n=e.key)&&void 0!==n?n:new Uint8Array,r.left=void 0!==e.left&&null!==e.left?t.ExistenceProof.fromPartial(e.left):void 0,r.right=void 0!==e.right&&null!==e.right?t.ExistenceProof.fromPartial(e.right):void 0,r}};var g={};t.CommitmentProof={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return void 0!==e.exist&&t.ExistenceProof.encode(e.exist,n.uint32(10).fork()).ldelim(),void 0!==e.nonexist&&t.NonExistenceProof.encode(e.nonexist,n.uint32(18).fork()).ldelim(),void 0!==e.batch&&t.BatchProof.encode(e.batch,n.uint32(26).fork()).ldelim(),void 0!==e.compressed&&t.CompressedBatchProof.encode(e.compressed,n.uint32(34).fork()).ldelim(),n},decode:function(e,n){for(var r=e instanceof u.default.Reader?e:new u.default.Reader(e),i=void 0===n?r.len:r.pos+n,o=Object.assign({},g);r.pos>>3){case 1:o.exist=t.ExistenceProof.decode(r,r.uint32());break;case 2:o.nonexist=t.NonExistenceProof.decode(r,r.uint32());break;case 3:o.batch=t.BatchProof.decode(r,r.uint32());break;case 4:o.compressed=t.CompressedBatchProof.decode(r,r.uint32());break;default:r.skipType(7&a)}}return o},fromJSON:function(e){var n=Object.assign({},g);return n.exist=void 0!==e.exist&&null!==e.exist?t.ExistenceProof.fromJSON(e.exist):void 0,n.nonexist=void 0!==e.nonexist&&null!==e.nonexist?t.NonExistenceProof.fromJSON(e.nonexist):void 0,n.batch=void 0!==e.batch&&null!==e.batch?t.BatchProof.fromJSON(e.batch):void 0,n.compressed=void 0!==e.compressed&&null!==e.compressed?t.CompressedBatchProof.fromJSON(e.compressed):void 0,n},toJSON:function(e){var n={};return void 0!==e.exist&&(n.exist=e.exist?t.ExistenceProof.toJSON(e.exist):void 0),void 0!==e.nonexist&&(n.nonexist=e.nonexist?t.NonExistenceProof.toJSON(e.nonexist):void 0),void 0!==e.batch&&(n.batch=e.batch?t.BatchProof.toJSON(e.batch):void 0),void 0!==e.compressed&&(n.compressed=e.compressed?t.CompressedBatchProof.toJSON(e.compressed):void 0),n},fromPartial:function(e){var n=Object.assign({},g);return n.exist=void 0!==e.exist&&null!==e.exist?t.ExistenceProof.fromPartial(e.exist):void 0,n.nonexist=void 0!==e.nonexist&&null!==e.nonexist?t.NonExistenceProof.fromPartial(e.nonexist):void 0,n.batch=void 0!==e.batch&&null!==e.batch?t.BatchProof.fromPartial(e.batch):void 0,n.compressed=void 0!==e.compressed&&null!==e.compressed?t.CompressedBatchProof.fromPartial(e.compressed):void 0,n}};var v={hash:0,prehashKey:0,prehashValue:0,length:0};t.LeafOp={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return 0!==e.hash&&t.uint32(8).int32(e.hash),0!==e.prehashKey&&t.uint32(16).int32(e.prehashKey),0!==e.prehashValue&&t.uint32(24).int32(e.prehashValue),0!==e.length&&t.uint32(32).int32(e.length),0!==e.prefix.length&&t.uint32(42).bytes(e.prefix),t},decode:function(e,t){var n=e instanceof u.default.Reader?e:new u.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},v);for(i.prefix=new Uint8Array;n.pos>>3){case 1:i.hash=n.int32();break;case 2:i.prehashKey=n.int32();break;case 3:i.prehashValue=n.int32();break;case 4:i.length=n.int32();break;case 5:i.prefix=n.bytes();break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t=Object.assign({},v);return t.hash=void 0!==e.hash&&null!==e.hash?c(e.hash):0,t.prehashKey=void 0!==e.prehashKey&&null!==e.prehashKey?c(e.prehashKey):0,t.prehashValue=void 0!==e.prehashValue&&null!==e.prehashValue?c(e.prehashValue):0,t.length=void 0!==e.length&&null!==e.length?f(e.length):0,t.prefix=void 0!==e.prefix&&null!==e.prefix?x(e.prefix):new Uint8Array,t},toJSON:function(e){var t={};return void 0!==e.hash&&(t.hash=l(e.hash)),void 0!==e.prehashKey&&(t.prehashKey=l(e.prehashKey)),void 0!==e.prehashValue&&(t.prehashValue=l(e.prehashValue)),void 0!==e.length&&(t.length=d(e.length)),void 0!==e.prefix&&(t.prefix=O(void 0!==e.prefix?e.prefix:new Uint8Array)),t},fromPartial:function(e){var t,n,r,i,o,a=Object.assign({},v);return a.hash=null!==(t=e.hash)&&void 0!==t?t:0,a.prehashKey=null!==(n=e.prehashKey)&&void 0!==n?n:0,a.prehashValue=null!==(r=e.prehashValue)&&void 0!==r?r:0,a.length=null!==(i=e.length)&&void 0!==i?i:0,a.prefix=null!==(o=e.prefix)&&void 0!==o?o:new Uint8Array,a}};var m={hash:0};t.InnerOp={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return 0!==e.hash&&t.uint32(8).int32(e.hash),0!==e.prefix.length&&t.uint32(18).bytes(e.prefix),0!==e.suffix.length&&t.uint32(26).bytes(e.suffix),t},decode:function(e,t){var n=e instanceof u.default.Reader?e:new u.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},m);for(i.prefix=new Uint8Array,i.suffix=new Uint8Array;n.pos>>3){case 1:i.hash=n.int32();break;case 2:i.prefix=n.bytes();break;case 3:i.suffix=n.bytes();break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t=Object.assign({},m);return t.hash=void 0!==e.hash&&null!==e.hash?c(e.hash):0,t.prefix=void 0!==e.prefix&&null!==e.prefix?x(e.prefix):new Uint8Array,t.suffix=void 0!==e.suffix&&null!==e.suffix?x(e.suffix):new Uint8Array,t},toJSON:function(e){var t={};return void 0!==e.hash&&(t.hash=l(e.hash)),void 0!==e.prefix&&(t.prefix=O(void 0!==e.prefix?e.prefix:new Uint8Array)),void 0!==e.suffix&&(t.suffix=O(void 0!==e.suffix?e.suffix:new Uint8Array)),t},fromPartial:function(e){var t,n,r,i=Object.assign({},m);return i.hash=null!==(t=e.hash)&&void 0!==t?t:0,i.prefix=null!==(n=e.prefix)&&void 0!==n?n:new Uint8Array,i.suffix=null!==(r=e.suffix)&&void 0!==r?r:new Uint8Array,i}};var A={maxDepth:0,minDepth:0};t.ProofSpec={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return void 0!==e.leafSpec&&t.LeafOp.encode(e.leafSpec,n.uint32(10).fork()).ldelim(),void 0!==e.innerSpec&&t.InnerSpec.encode(e.innerSpec,n.uint32(18).fork()).ldelim(),0!==e.maxDepth&&n.uint32(24).int32(e.maxDepth),0!==e.minDepth&&n.uint32(32).int32(e.minDepth),n},decode:function(e,n){for(var r=e instanceof u.default.Reader?e:new u.default.Reader(e),i=void 0===n?r.len:r.pos+n,o=Object.assign({},A);r.pos>>3){case 1:o.leafSpec=t.LeafOp.decode(r,r.uint32());break;case 2:o.innerSpec=t.InnerSpec.decode(r,r.uint32());break;case 3:o.maxDepth=r.int32();break;case 4:o.minDepth=r.int32();break;default:r.skipType(7&a)}}return o},fromJSON:function(e){var n=Object.assign({},A);return n.leafSpec=void 0!==e.leafSpec&&null!==e.leafSpec?t.LeafOp.fromJSON(e.leafSpec):void 0,n.innerSpec=void 0!==e.innerSpec&&null!==e.innerSpec?t.InnerSpec.fromJSON(e.innerSpec):void 0,n.maxDepth=void 0!==e.maxDepth&&null!==e.maxDepth?Number(e.maxDepth):0,n.minDepth=void 0!==e.minDepth&&null!==e.minDepth?Number(e.minDepth):0,n},toJSON:function(e){var n={};return void 0!==e.leafSpec&&(n.leafSpec=e.leafSpec?t.LeafOp.toJSON(e.leafSpec):void 0),void 0!==e.innerSpec&&(n.innerSpec=e.innerSpec?t.InnerSpec.toJSON(e.innerSpec):void 0),void 0!==e.maxDepth&&(n.maxDepth=e.maxDepth),void 0!==e.minDepth&&(n.minDepth=e.minDepth),n},fromPartial:function(e){var n,r,i=Object.assign({},A);return i.leafSpec=void 0!==e.leafSpec&&null!==e.leafSpec?t.LeafOp.fromPartial(e.leafSpec):void 0,i.innerSpec=void 0!==e.innerSpec&&null!==e.innerSpec?t.InnerSpec.fromPartial(e.innerSpec):void 0,i.maxDepth=null!==(n=e.maxDepth)&&void 0!==n?n:0,i.minDepth=null!==(r=e.minDepth)&&void 0!==r?r:0,i}};var y={childOrder:0,childSize:0,minPrefixLength:0,maxPrefixLength:0,hash:0};t.InnerSpec={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();t.uint32(10).fork();var n,i=r(e.childOrder);try{for(i.s();!(n=i.n()).done;){var o=n.value;t.int32(o)}}catch(a){i.e(a)}finally{i.f()}return t.ldelim(),0!==e.childSize&&t.uint32(16).int32(e.childSize),0!==e.minPrefixLength&&t.uint32(24).int32(e.minPrefixLength),0!==e.maxPrefixLength&&t.uint32(32).int32(e.maxPrefixLength),0!==e.emptyChild.length&&t.uint32(42).bytes(e.emptyChild),0!==e.hash&&t.uint32(48).int32(e.hash),t},decode:function(e,t){var n=e instanceof u.default.Reader?e:new u.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},y);for(i.childOrder=[],i.emptyChild=new Uint8Array;n.pos>>3){case 1:if(2===(7&o))for(var a=n.uint32()+n.pos;n.pos1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create(),o=r(e.entries);try{for(o.s();!(n=o.n()).done;){var a=n.value;t.BatchEntry.encode(a,i.uint32(10).fork()).ldelim()}}catch(s){o.e(s)}finally{o.f()}return i},decode:function(e,n){var r=e instanceof u.default.Reader?e:new u.default.Reader(e),i=void 0===n?r.len:r.pos+n,o=Object.assign({},b);for(o.entries=[];r.pos>>3===1)o.entries.push(t.BatchEntry.decode(r,r.uint32()));else r.skipType(7&a)}return o},fromJSON:function(e){var n,r=Object.assign({},b);return r.entries=(null!==(n=e.entries)&&void 0!==n?n:[]).map((function(e){return t.BatchEntry.fromJSON(e)})),r},toJSON:function(e){var n={};return e.entries?n.entries=e.entries.map((function(e){return e?t.BatchEntry.toJSON(e):void 0})):n.entries=[],n},fromPartial:function(e){var n,r=Object.assign({},b);return r.entries=(null===(n=e.entries)||void 0===n?void 0:n.map((function(e){return t.BatchEntry.fromPartial(e)})))||[],r}};var w={};t.BatchEntry={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return void 0!==e.exist&&t.ExistenceProof.encode(e.exist,n.uint32(10).fork()).ldelim(),void 0!==e.nonexist&&t.NonExistenceProof.encode(e.nonexist,n.uint32(18).fork()).ldelim(),n},decode:function(e,n){for(var r=e instanceof u.default.Reader?e:new u.default.Reader(e),i=void 0===n?r.len:r.pos+n,o=Object.assign({},w);r.pos>>3){case 1:o.exist=t.ExistenceProof.decode(r,r.uint32());break;case 2:o.nonexist=t.NonExistenceProof.decode(r,r.uint32());break;default:r.skipType(7&a)}}return o},fromJSON:function(e){var n=Object.assign({},w);return n.exist=void 0!==e.exist&&null!==e.exist?t.ExistenceProof.fromJSON(e.exist):void 0,n.nonexist=void 0!==e.nonexist&&null!==e.nonexist?t.NonExistenceProof.fromJSON(e.nonexist):void 0,n},toJSON:function(e){var n={};return void 0!==e.exist&&(n.exist=e.exist?t.ExistenceProof.toJSON(e.exist):void 0),void 0!==e.nonexist&&(n.nonexist=e.nonexist?t.NonExistenceProof.toJSON(e.nonexist):void 0),n},fromPartial:function(e){var n=Object.assign({},w);return n.exist=void 0!==e.exist&&null!==e.exist?t.ExistenceProof.fromPartial(e.exist):void 0,n.nonexist=void 0!==e.nonexist&&null!==e.nonexist?t.NonExistenceProof.fromPartial(e.nonexist):void 0,n}};var _={};t.CompressedBatchProof={encode:function(e){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create(),o=r(e.entries);try{for(o.s();!(n=o.n()).done;){var a=n.value;t.CompressedBatchEntry.encode(a,i.uint32(10).fork()).ldelim()}}catch(f){o.e(f)}finally{o.f()}var s,c=r(e.lookupInners);try{for(c.s();!(s=c.n()).done;){var l=s.value;t.InnerOp.encode(l,i.uint32(18).fork()).ldelim()}}catch(f){c.e(f)}finally{c.f()}return i},decode:function(e,n){var r=e instanceof u.default.Reader?e:new u.default.Reader(e),i=void 0===n?r.len:r.pos+n,o=Object.assign({},_);for(o.entries=[],o.lookupInners=[];r.pos>>3){case 1:o.entries.push(t.CompressedBatchEntry.decode(r,r.uint32()));break;case 2:o.lookupInners.push(t.InnerOp.decode(r,r.uint32()));break;default:r.skipType(7&a)}}return o},fromJSON:function(e){var n,r,i=Object.assign({},_);return i.entries=(null!==(n=e.entries)&&void 0!==n?n:[]).map((function(e){return t.CompressedBatchEntry.fromJSON(e)})),i.lookupInners=(null!==(r=e.lookupInners)&&void 0!==r?r:[]).map((function(e){return t.InnerOp.fromJSON(e)})),i},toJSON:function(e){var n={};return e.entries?n.entries=e.entries.map((function(e){return e?t.CompressedBatchEntry.toJSON(e):void 0})):n.entries=[],e.lookupInners?n.lookupInners=e.lookupInners.map((function(e){return e?t.InnerOp.toJSON(e):void 0})):n.lookupInners=[],n},fromPartial:function(e){var n,r,i=Object.assign({},_);return i.entries=(null===(n=e.entries)||void 0===n?void 0:n.map((function(e){return t.CompressedBatchEntry.fromPartial(e)})))||[],i.lookupInners=(null===(r=e.lookupInners)||void 0===r?void 0:r.map((function(e){return t.InnerOp.fromPartial(e)})))||[],i}};var E={};t.CompressedBatchEntry={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return void 0!==e.exist&&t.CompressedExistenceProof.encode(e.exist,n.uint32(10).fork()).ldelim(),void 0!==e.nonexist&&t.CompressedNonExistenceProof.encode(e.nonexist,n.uint32(18).fork()).ldelim(),n},decode:function(e,n){for(var r=e instanceof u.default.Reader?e:new u.default.Reader(e),i=void 0===n?r.len:r.pos+n,o=Object.assign({},E);r.pos>>3){case 1:o.exist=t.CompressedExistenceProof.decode(r,r.uint32());break;case 2:o.nonexist=t.CompressedNonExistenceProof.decode(r,r.uint32());break;default:r.skipType(7&a)}}return o},fromJSON:function(e){var n=Object.assign({},E);return n.exist=void 0!==e.exist&&null!==e.exist?t.CompressedExistenceProof.fromJSON(e.exist):void 0,n.nonexist=void 0!==e.nonexist&&null!==e.nonexist?t.CompressedNonExistenceProof.fromJSON(e.nonexist):void 0,n},toJSON:function(e){var n={};return void 0!==e.exist&&(n.exist=e.exist?t.CompressedExistenceProof.toJSON(e.exist):void 0),void 0!==e.nonexist&&(n.nonexist=e.nonexist?t.CompressedNonExistenceProof.toJSON(e.nonexist):void 0),n},fromPartial:function(e){var n=Object.assign({},E);return n.exist=void 0!==e.exist&&null!==e.exist?t.CompressedExistenceProof.fromPartial(e.exist):void 0,n.nonexist=void 0!==e.nonexist&&null!==e.nonexist?t.CompressedNonExistenceProof.fromPartial(e.nonexist):void 0,n}};var k={path:0};t.CompressedExistenceProof={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();0!==e.key.length&&n.uint32(10).bytes(e.key),0!==e.value.length&&n.uint32(18).bytes(e.value),void 0!==e.leaf&&t.LeafOp.encode(e.leaf,n.uint32(26).fork()).ldelim(),n.uint32(34).fork();var i,o=r(e.path);try{for(o.s();!(i=o.n()).done;){var a=i.value;n.int32(a)}}catch(s){o.e(s)}finally{o.f()}return n.ldelim(),n},decode:function(e,n){var r=e instanceof u.default.Reader?e:new u.default.Reader(e),i=void 0===n?r.len:r.pos+n,o=Object.assign({},k);for(o.path=[],o.key=new Uint8Array,o.value=new Uint8Array;r.pos>>3){case 1:o.key=r.bytes();break;case 2:o.value=r.bytes();break;case 3:o.leaf=t.LeafOp.decode(r,r.uint32());break;case 4:if(2===(7&a))for(var s=r.uint32()+r.pos;r.pos1&&void 0!==arguments[1]?arguments[1]:u.default.Writer.create();return 0!==e.key.length&&n.uint32(10).bytes(e.key),void 0!==e.left&&t.CompressedExistenceProof.encode(e.left,n.uint32(18).fork()).ldelim(),void 0!==e.right&&t.CompressedExistenceProof.encode(e.right,n.uint32(26).fork()).ldelim(),n},decode:function(e,n){var r=e instanceof u.default.Reader?e:new u.default.Reader(e),i=void 0===n?r.len:r.pos+n,o=Object.assign({},I);for(o.key=new Uint8Array;r.pos>>3){case 1:o.key=r.bytes();break;case 2:o.left=t.CompressedExistenceProof.decode(r,r.uint32());break;case 3:o.right=t.CompressedExistenceProof.decode(r,r.uint32());break;default:r.skipType(7&a)}}return o},fromJSON:function(e){var n=Object.assign({},I);return n.key=void 0!==e.key&&null!==e.key?x(e.key):new Uint8Array,n.left=void 0!==e.left&&null!==e.left?t.CompressedExistenceProof.fromJSON(e.left):void 0,n.right=void 0!==e.right&&null!==e.right?t.CompressedExistenceProof.fromJSON(e.right):void 0,n},toJSON:function(e){var n={};return void 0!==e.key&&(n.key=O(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.left&&(n.left=e.left?t.CompressedExistenceProof.toJSON(e.left):void 0),void 0!==e.right&&(n.right=e.right?t.CompressedExistenceProof.toJSON(e.right):void 0),n},fromPartial:function(e){var n,r=Object.assign({},I);return r.key=null!==(n=e.key)&&void 0!==n?n:new Uint8Array,r.left=void 0!==e.left&&null!==e.left?t.CompressedExistenceProof.fromPartial(e.left):void 0,r.right=void 0!==e.right&&null!==e.right?t.CompressedExistenceProof.fromPartial(e.right):void 0,r}};var C=function(){if("undefined"!==typeof C)return C;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof e)return e;throw"Unable to locate global object"}(),S=C.atob||function(e){return C.Buffer.from(e,"base64").toString("binary")};function x(e){for(var t=S(e),n=new Uint8Array(t.length),r=0;r1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();e.total.isZero()||t.uint32(8).int64(e.total),e.index.isZero()||t.uint32(16).int64(e.index),0!==e.leafHash.length&&t.uint32(26).bytes(e.leafHash);var n,i=r(e.aunts);try{for(i.s();!(n=i.n()).done;){var o=n.value;t.uint32(34).bytes(o)}}catch(s){i.e(s)}finally{i.f()}return t},decode:function(e,t){var n=e instanceof a.default.Reader?e:new a.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},s);for(i.aunts=[],i.leafHash=new Uint8Array;n.pos>>3){case 1:i.total=n.int64();break;case 2:i.index=n.int64();break;case 3:i.leafHash=n.bytes();break;case 4:i.aunts.push(n.bytes());break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t,n=Object.assign({},s);return n.total=void 0!==e.total&&null!==e.total?o.default.fromString(e.total):o.default.ZERO,n.index=void 0!==e.index&&null!==e.index?o.default.fromString(e.index):o.default.ZERO,n.leafHash=void 0!==e.leafHash&&null!==e.leafHash?p(e.leafHash):new Uint8Array,n.aunts=(null!==(t=e.aunts)&&void 0!==t?t:[]).map((function(e){return p(e)})),n},toJSON:function(e){var t={};return void 0!==e.total&&(t.total=(e.total||o.default.ZERO).toString()),void 0!==e.index&&(t.index=(e.index||o.default.ZERO).toString()),void 0!==e.leafHash&&(t.leafHash=v(void 0!==e.leafHash?e.leafHash:new Uint8Array)),e.aunts?t.aunts=e.aunts.map((function(e){return v(void 0!==e?e:new Uint8Array)})):t.aunts=[],t},fromPartial:function(e){var t,n,r=Object.assign({},s);return r.total=void 0!==e.total&&null!==e.total?o.default.fromValue(e.total):o.default.ZERO,r.index=void 0!==e.index&&null!==e.index?o.default.fromValue(e.index):o.default.ZERO,r.leafHash=null!==(t=e.leafHash)&&void 0!==t?t:new Uint8Array,r.aunts=(null===(n=e.aunts)||void 0===n?void 0:n.map((function(e){return e})))||[],r}};var u={};t.ValueOp={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return 0!==e.key.length&&n.uint32(10).bytes(e.key),void 0!==e.proof&&t.Proof.encode(e.proof,n.uint32(18).fork()).ldelim(),n},decode:function(e,n){var r=e instanceof a.default.Reader?e:new a.default.Reader(e),i=void 0===n?r.len:r.pos+n,o=Object.assign({},u);for(o.key=new Uint8Array;r.pos>>3){case 1:o.key=r.bytes();break;case 2:o.proof=t.Proof.decode(r,r.uint32());break;default:r.skipType(7&s)}}return o},fromJSON:function(e){var n=Object.assign({},u);return n.key=void 0!==e.key&&null!==e.key?p(e.key):new Uint8Array,n.proof=void 0!==e.proof&&null!==e.proof?t.Proof.fromJSON(e.proof):void 0,n},toJSON:function(e){var n={};return void 0!==e.key&&(n.key=v(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.proof&&(n.proof=e.proof?t.Proof.toJSON(e.proof):void 0),n},fromPartial:function(e){var n,r=Object.assign({},u);return r.key=null!==(n=e.key)&&void 0!==n?n:new Uint8Array,r.proof=void 0!==e.proof&&null!==e.proof?t.Proof.fromPartial(e.proof):void 0,r}};var c={key:"",input:"",output:""};t.DominoOp={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return""!==e.key&&t.uint32(10).string(e.key),""!==e.input&&t.uint32(18).string(e.input),""!==e.output&&t.uint32(26).string(e.output),t},decode:function(e,t){for(var n=e instanceof a.default.Reader?e:new a.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},c);n.pos>>3){case 1:i.key=n.string();break;case 2:i.input=n.string();break;case 3:i.output=n.string();break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t=Object.assign({},c);return t.key=void 0!==e.key&&null!==e.key?String(e.key):"",t.input=void 0!==e.input&&null!==e.input?String(e.input):"",t.output=void 0!==e.output&&null!==e.output?String(e.output):"",t},toJSON:function(e){var t={};return void 0!==e.key&&(t.key=e.key),void 0!==e.input&&(t.input=e.input),void 0!==e.output&&(t.output=e.output),t},fromPartial:function(e){var t,n,r,i=Object.assign({},c);return i.key=null!==(t=e.key)&&void 0!==t?t:"",i.input=null!==(n=e.input)&&void 0!==n?n:"",i.output=null!==(r=e.output)&&void 0!==r?r:"",i}};var l={type:""};t.ProofOp={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return""!==e.type&&t.uint32(10).string(e.type),0!==e.key.length&&t.uint32(18).bytes(e.key),0!==e.data.length&&t.uint32(26).bytes(e.data),t},decode:function(e,t){var n=e instanceof a.default.Reader?e:new a.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},l);for(i.key=new Uint8Array,i.data=new Uint8Array;n.pos>>3){case 1:i.type=n.string();break;case 2:i.key=n.bytes();break;case 3:i.data=n.bytes();break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t=Object.assign({},l);return t.type=void 0!==e.type&&null!==e.type?String(e.type):"",t.key=void 0!==e.key&&null!==e.key?p(e.key):new Uint8Array,t.data=void 0!==e.data&&null!==e.data?p(e.data):new Uint8Array,t},toJSON:function(e){var t={};return void 0!==e.type&&(t.type=e.type),void 0!==e.key&&(t.key=v(void 0!==e.key?e.key:new Uint8Array)),void 0!==e.data&&(t.data=v(void 0!==e.data?e.data:new Uint8Array)),t},fromPartial:function(e){var t,n,r,i=Object.assign({},l);return i.type=null!==(t=e.type)&&void 0!==t?t:"",i.key=null!==(n=e.key)&&void 0!==n?n:new Uint8Array,i.data=null!==(r=e.data)&&void 0!==r?r:new Uint8Array,i}};var f={};t.ProofOps={encode:function(e){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create(),o=r(e.ops);try{for(o.s();!(n=o.n()).done;){var s=n.value;t.ProofOp.encode(s,i.uint32(10).fork()).ldelim()}}catch(u){o.e(u)}finally{o.f()}return i},decode:function(e,n){var r=e instanceof a.default.Reader?e:new a.default.Reader(e),i=void 0===n?r.len:r.pos+n,o=Object.assign({},f);for(o.ops=[];r.pos>>3===1)o.ops.push(t.ProofOp.decode(r,r.uint32()));else r.skipType(7&s)}return o},fromJSON:function(e){var n,r=Object.assign({},f);return r.ops=(null!==(n=e.ops)&&void 0!==n?n:[]).map((function(e){return t.ProofOp.fromJSON(e)})),r},toJSON:function(e){var n={};return e.ops?n.ops=e.ops.map((function(e){return e?t.ProofOp.toJSON(e):void 0})):n.ops=[],n},fromPartial:function(e){var n,r=Object.assign({},f);return r.ops=(null===(n=e.ops)||void 0===n?void 0:n.map((function(e){return t.ProofOp.fromPartial(e)})))||[],r}};var d=function(){if("undefined"!==typeof d)return d;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof e)return e;throw"Unable to locate global object"}(),h=d.atob||function(e){return d.Buffer.from(e,"base64").toString("binary")};function p(e){for(var t=h(e),n=new Uint8Array(t.length),r=0;r1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create(),o=r(e.validators);try{for(o.s();!(n=o.n()).done;){var s=n.value;t.Validator.encode(s,i.uint32(10).fork()).ldelim()}}catch(u){o.e(u)}finally{o.f()}return void 0!==e.proposer&&t.Validator.encode(e.proposer,i.uint32(18).fork()).ldelim(),e.totalVotingPower.isZero()||i.uint32(24).int64(e.totalVotingPower),i},decode:function(e,n){var r=e instanceof a.default.Reader?e:new a.default.Reader(e),i=void 0===n?r.len:r.pos+n,o=Object.assign({},u);for(o.validators=[];r.pos>>3){case 1:o.validators.push(t.Validator.decode(r,r.uint32()));break;case 2:o.proposer=t.Validator.decode(r,r.uint32());break;case 3:o.totalVotingPower=r.int64();break;default:r.skipType(7&s)}}return o},fromJSON:function(e){var n,r=Object.assign({},u);return r.validators=(null!==(n=e.validators)&&void 0!==n?n:[]).map((function(e){return t.Validator.fromJSON(e)})),r.proposer=void 0!==e.proposer&&null!==e.proposer?t.Validator.fromJSON(e.proposer):void 0,r.totalVotingPower=void 0!==e.totalVotingPower&&null!==e.totalVotingPower?o.default.fromString(e.totalVotingPower):o.default.ZERO,r},toJSON:function(e){var n={};return e.validators?n.validators=e.validators.map((function(e){return e?t.Validator.toJSON(e):void 0})):n.validators=[],void 0!==e.proposer&&(n.proposer=e.proposer?t.Validator.toJSON(e.proposer):void 0),void 0!==e.totalVotingPower&&(n.totalVotingPower=(e.totalVotingPower||o.default.ZERO).toString()),n},fromPartial:function(e){var n,r=Object.assign({},u);return r.validators=(null===(n=e.validators)||void 0===n?void 0:n.map((function(e){return t.Validator.fromPartial(e)})))||[],r.proposer=void 0!==e.proposer&&null!==e.proposer?t.Validator.fromPartial(e.proposer):void 0,r.totalVotingPower=void 0!==e.totalVotingPower&&null!==e.totalVotingPower?o.default.fromValue(e.totalVotingPower):o.default.ZERO,r}};var c={votingPower:o.default.ZERO,proposerPriority:o.default.ZERO};t.Validator={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return 0!==e.address.length&&t.uint32(10).bytes(e.address),void 0!==e.pubKey&&s.PublicKey.encode(e.pubKey,t.uint32(18).fork()).ldelim(),e.votingPower.isZero()||t.uint32(24).int64(e.votingPower),e.proposerPriority.isZero()||t.uint32(32).int64(e.proposerPriority),t},decode:function(e,t){var n=e instanceof a.default.Reader?e:new a.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},c);for(i.address=new Uint8Array;n.pos>>3){case 1:i.address=n.bytes();break;case 2:i.pubKey=s.PublicKey.decode(n,n.uint32());break;case 3:i.votingPower=n.int64();break;case 4:i.proposerPriority=n.int64();break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t=Object.assign({},c);return t.address=void 0!==e.address&&null!==e.address?function(e){for(var t=d(e),n=new Uint8Array(t.length),r=0;r1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return void 0!==e.pubKey&&s.PublicKey.encode(e.pubKey,t.uint32(10).fork()).ldelim(),e.votingPower.isZero()||t.uint32(16).int64(e.votingPower),t},decode:function(e,t){for(var n=e instanceof a.default.Reader?e:new a.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},l);n.pos>>3){case 1:i.pubKey=s.PublicKey.decode(n,n.uint32());break;case 2:i.votingPower=n.int64();break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t=Object.assign({},l);return t.pubKey=void 0!==e.pubKey&&null!==e.pubKey?s.PublicKey.fromJSON(e.pubKey):void 0,t.votingPower=void 0!==e.votingPower&&null!==e.votingPower?o.default.fromString(e.votingPower):o.default.ZERO,t},toJSON:function(e){var t={};return void 0!==e.pubKey&&(t.pubKey=e.pubKey?s.PublicKey.toJSON(e.pubKey):void 0),void 0!==e.votingPower&&(t.votingPower=(e.votingPower||o.default.ZERO).toString()),t},fromPartial:function(e){var t=Object.assign({},l);return t.pubKey=void 0!==e.pubKey&&null!==e.pubKey?s.PublicKey.fromPartial(e.pubKey):void 0,t.votingPower=void 0!==e.votingPower&&null!==e.votingPower?o.default.fromValue(e.votingPower):o.default.ZERO,t}};var f=function(){if("undefined"!==typeof f)return f;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof e)return e;throw"Unable to locate global object"}(),d=f.atob||function(e){return f.Buffer.from(e,"base64").toString("binary")};var h=f.btoa||function(e){return f.Buffer.from(e,"binary").toString("base64")};a.default.util.Long!==o.default&&(a.default.util.Long=o.default,a.default.configure())}).call(this,n(20))},function(e,t,n){"use strict";(function(e){var r=n(19).default,i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.PublicKey=t.protobufPackage=void 0;var o=i(n(18)),a=i(n(21));t.protobufPackage="tendermint.crypto";var s={};t.PublicKey={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Writer.create();return void 0!==e.ed25519&&t.uint32(10).bytes(e.ed25519),void 0!==e.secp256k1&&t.uint32(18).bytes(e.secp256k1),t},decode:function(e,t){for(var n=e instanceof a.default.Reader?e:new a.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},s);n.pos>>3){case 1:i.ed25519=n.bytes();break;case 2:i.secp256k1=n.bytes();break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t=Object.assign({},s);return t.ed25519=void 0!==e.ed25519&&null!==e.ed25519?l(e.ed25519):void 0,t.secp256k1=void 0!==e.secp256k1&&null!==e.secp256k1?l(e.secp256k1):void 0,t},toJSON:function(e){var t={};return void 0!==e.ed25519&&(t.ed25519=void 0!==e.ed25519?d(e.ed25519):void 0),void 0!==e.secp256k1&&(t.secp256k1=void 0!==e.secp256k1?d(e.secp256k1):void 0),t},fromPartial:function(e){var t,n,r=Object.assign({},s);return r.ed25519=null!==(t=e.ed25519)&&void 0!==t?t:void 0,r.secp256k1=null!==(n=e.secp256k1)&&void 0!==n?n:void 0,r}};var u=function(){if("undefined"!==typeof u)return u;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof e)return e;throw"Unable to locate global object"}(),c=u.atob||function(e){return u.Buffer.from(e,"base64").toString("binary")};function l(e){for(var t=c(e),n=new Uint8Array(t.length),r=0;r1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return void 0!==e.description&&u.Description.encode(e.description,t.uint32(10).fork()).ldelim(),void 0!==e.commission&&u.CommissionRates.encode(e.commission,t.uint32(18).fork()).ldelim(),""!==e.minSelfDelegation&&t.uint32(26).string(e.minSelfDelegation),""!==e.delegatorAddress&&t.uint32(34).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(42).string(e.validatorAddress),void 0!==e.pubkey&&c.Any.encode(e.pubkey,t.uint32(50).fork()).ldelim(),void 0!==e.value&&l.Coin.encode(e.value,t.uint32(58).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof s.default.Reader?e:new s.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},d);n.pos>>3){case 1:i.description=u.Description.decode(n,n.uint32());break;case 2:i.commission=u.CommissionRates.decode(n,n.uint32());break;case 3:i.minSelfDelegation=n.string();break;case 4:i.delegatorAddress=n.string();break;case 5:i.validatorAddress=n.string();break;case 6:i.pubkey=c.Any.decode(n,n.uint32());break;case 7:i.value=l.Coin.decode(n,n.uint32());break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t=Object.assign({},d);return t.description=void 0!==e.description&&null!==e.description?u.Description.fromJSON(e.description):void 0,t.commission=void 0!==e.commission&&null!==e.commission?u.CommissionRates.fromJSON(e.commission):void 0,t.minSelfDelegation=void 0!==e.minSelfDelegation&&null!==e.minSelfDelegation?String(e.minSelfDelegation):"",t.delegatorAddress=void 0!==e.delegatorAddress&&null!==e.delegatorAddress?String(e.delegatorAddress):"",t.validatorAddress=void 0!==e.validatorAddress&&null!==e.validatorAddress?String(e.validatorAddress):"",t.pubkey=void 0!==e.pubkey&&null!==e.pubkey?c.Any.fromJSON(e.pubkey):void 0,t.value=void 0!==e.value&&null!==e.value?l.Coin.fromJSON(e.value):void 0,t},toJSON:function(e){var t={};return void 0!==e.description&&(t.description=e.description?u.Description.toJSON(e.description):void 0),void 0!==e.commission&&(t.commission=e.commission?u.CommissionRates.toJSON(e.commission):void 0),void 0!==e.minSelfDelegation&&(t.minSelfDelegation=e.minSelfDelegation),void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),void 0!==e.pubkey&&(t.pubkey=e.pubkey?c.Any.toJSON(e.pubkey):void 0),void 0!==e.value&&(t.value=e.value?l.Coin.toJSON(e.value):void 0),t},fromPartial:function(e){var t,n,r,i=Object.assign({},d);return i.description=void 0!==e.description&&null!==e.description?u.Description.fromPartial(e.description):void 0,i.commission=void 0!==e.commission&&null!==e.commission?u.CommissionRates.fromPartial(e.commission):void 0,i.minSelfDelegation=null!==(t=e.minSelfDelegation)&&void 0!==t?t:"",i.delegatorAddress=null!==(n=e.delegatorAddress)&&void 0!==n?n:"",i.validatorAddress=null!==(r=e.validatorAddress)&&void 0!==r?r:"",i.pubkey=void 0!==e.pubkey&&null!==e.pubkey?c.Any.fromPartial(e.pubkey):void 0,i.value=void 0!==e.value&&null!==e.value?l.Coin.fromPartial(e.value):void 0,i}};var h={};t.MsgCreateValidatorResponse={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return t},decode:function(e,t){for(var n=e instanceof s.default.Reader?e:new s.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},h);n.pos1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return void 0!==e.description&&u.Description.encode(e.description,t.uint32(10).fork()).ldelim(),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),""!==e.commissionRate&&t.uint32(26).string(e.commissionRate),""!==e.minSelfDelegation&&t.uint32(34).string(e.minSelfDelegation),t},decode:function(e,t){for(var n=e instanceof s.default.Reader?e:new s.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},p);n.pos>>3){case 1:i.description=u.Description.decode(n,n.uint32());break;case 2:i.validatorAddress=n.string();break;case 3:i.commissionRate=n.string();break;case 4:i.minSelfDelegation=n.string();break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t=Object.assign({},p);return t.description=void 0!==e.description&&null!==e.description?u.Description.fromJSON(e.description):void 0,t.validatorAddress=void 0!==e.validatorAddress&&null!==e.validatorAddress?String(e.validatorAddress):"",t.commissionRate=void 0!==e.commissionRate&&null!==e.commissionRate?String(e.commissionRate):"",t.minSelfDelegation=void 0!==e.minSelfDelegation&&null!==e.minSelfDelegation?String(e.minSelfDelegation):"",t},toJSON:function(e){var t={};return void 0!==e.description&&(t.description=e.description?u.Description.toJSON(e.description):void 0),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),void 0!==e.commissionRate&&(t.commissionRate=e.commissionRate),void 0!==e.minSelfDelegation&&(t.minSelfDelegation=e.minSelfDelegation),t},fromPartial:function(e){var t,n,r,i=Object.assign({},p);return i.description=void 0!==e.description&&null!==e.description?u.Description.fromPartial(e.description):void 0,i.validatorAddress=null!==(t=e.validatorAddress)&&void 0!==t?t:"",i.commissionRate=null!==(n=e.commissionRate)&&void 0!==n?n:"",i.minSelfDelegation=null!==(r=e.minSelfDelegation)&&void 0!==r?r:"",i}};var g={};t.MsgEditValidatorResponse={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return t},decode:function(e,t){for(var n=e instanceof s.default.Reader?e:new s.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},g);n.pos1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),void 0!==e.amount&&l.Coin.encode(e.amount,t.uint32(26).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof s.default.Reader?e:new s.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},v);n.pos>>3){case 1:i.delegatorAddress=n.string();break;case 2:i.validatorAddress=n.string();break;case 3:i.amount=l.Coin.decode(n,n.uint32());break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t=Object.assign({},v);return t.delegatorAddress=void 0!==e.delegatorAddress&&null!==e.delegatorAddress?String(e.delegatorAddress):"",t.validatorAddress=void 0!==e.validatorAddress&&null!==e.validatorAddress?String(e.validatorAddress):"",t.amount=void 0!==e.amount&&null!==e.amount?l.Coin.fromJSON(e.amount):void 0,t},toJSON:function(e){var t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),void 0!==e.amount&&(t.amount=e.amount?l.Coin.toJSON(e.amount):void 0),t},fromPartial:function(e){var t,n,r=Object.assign({},v);return r.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",r.validatorAddress=null!==(n=e.validatorAddress)&&void 0!==n?n:"",r.amount=void 0!==e.amount&&null!==e.amount?l.Coin.fromPartial(e.amount):void 0,r}};var m={};t.MsgDelegateResponse={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return t},decode:function(e,t){for(var n=e instanceof s.default.Reader?e:new s.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},m);n.pos1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorSrcAddress&&t.uint32(18).string(e.validatorSrcAddress),""!==e.validatorDstAddress&&t.uint32(26).string(e.validatorDstAddress),void 0!==e.amount&&l.Coin.encode(e.amount,t.uint32(34).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof s.default.Reader?e:new s.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},A);n.pos>>3){case 1:i.delegatorAddress=n.string();break;case 2:i.validatorSrcAddress=n.string();break;case 3:i.validatorDstAddress=n.string();break;case 4:i.amount=l.Coin.decode(n,n.uint32());break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t=Object.assign({},A);return t.delegatorAddress=void 0!==e.delegatorAddress&&null!==e.delegatorAddress?String(e.delegatorAddress):"",t.validatorSrcAddress=void 0!==e.validatorSrcAddress&&null!==e.validatorSrcAddress?String(e.validatorSrcAddress):"",t.validatorDstAddress=void 0!==e.validatorDstAddress&&null!==e.validatorDstAddress?String(e.validatorDstAddress):"",t.amount=void 0!==e.amount&&null!==e.amount?l.Coin.fromJSON(e.amount):void 0,t},toJSON:function(e){var t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorSrcAddress&&(t.validatorSrcAddress=e.validatorSrcAddress),void 0!==e.validatorDstAddress&&(t.validatorDstAddress=e.validatorDstAddress),void 0!==e.amount&&(t.amount=e.amount?l.Coin.toJSON(e.amount):void 0),t},fromPartial:function(e){var t,n,r,i=Object.assign({},A);return i.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",i.validatorSrcAddress=null!==(n=e.validatorSrcAddress)&&void 0!==n?n:"",i.validatorDstAddress=null!==(r=e.validatorDstAddress)&&void 0!==r?r:"",i.amount=void 0!==e.amount&&null!==e.amount?l.Coin.fromPartial(e.amount):void 0,i}};var y={};t.MsgBeginRedelegateResponse={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return void 0!==e.completionTime&&f.Timestamp.encode(e.completionTime,t.uint32(10).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof s.default.Reader?e:new s.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},y);n.pos>>3===1)i.completionTime=f.Timestamp.decode(n,n.uint32());else n.skipType(7&o)}return i},fromJSON:function(e){var t=Object.assign({},y);return t.completionTime=void 0!==e.completionTime&&null!==e.completionTime?I(e.completionTime):void 0,t},toJSON:function(e){var t={};return void 0!==e.completionTime&&(t.completionTime=k(e.completionTime).toISOString()),t},fromPartial:function(e){var t=Object.assign({},y);return t.completionTime=void 0!==e.completionTime&&null!==e.completionTime?f.Timestamp.fromPartial(e.completionTime):void 0,t}};var b={delegatorAddress:"",validatorAddress:""};t.MsgUndelegate={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),void 0!==e.amount&&l.Coin.encode(e.amount,t.uint32(26).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof s.default.Reader?e:new s.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},b);n.pos>>3){case 1:i.delegatorAddress=n.string();break;case 2:i.validatorAddress=n.string();break;case 3:i.amount=l.Coin.decode(n,n.uint32());break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t=Object.assign({},b);return t.delegatorAddress=void 0!==e.delegatorAddress&&null!==e.delegatorAddress?String(e.delegatorAddress):"",t.validatorAddress=void 0!==e.validatorAddress&&null!==e.validatorAddress?String(e.validatorAddress):"",t.amount=void 0!==e.amount&&null!==e.amount?l.Coin.fromJSON(e.amount):void 0,t},toJSON:function(e){var t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),void 0!==e.amount&&(t.amount=e.amount?l.Coin.toJSON(e.amount):void 0),t},fromPartial:function(e){var t,n,r=Object.assign({},b);return r.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",r.validatorAddress=null!==(n=e.validatorAddress)&&void 0!==n?n:"",r.amount=void 0!==e.amount&&null!==e.amount?l.Coin.fromPartial(e.amount):void 0,r}};var w={};t.MsgUndelegateResponse={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return void 0!==e.completionTime&&f.Timestamp.encode(e.completionTime,t.uint32(10).fork()).ldelim(),t},decode:function(e,t){for(var n=e instanceof s.default.Reader?e:new s.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},w);n.pos>>3===1)i.completionTime=f.Timestamp.decode(n,n.uint32());else n.skipType(7&o)}return i},fromJSON:function(e){var t=Object.assign({},w);return t.completionTime=void 0!==e.completionTime&&null!==e.completionTime?I(e.completionTime):void 0,t},toJSON:function(e){var t={};return void 0!==e.completionTime&&(t.completionTime=k(e.completionTime).toISOString()),t},fromPartial:function(e){var t=Object.assign({},w);return t.completionTime=void 0!==e.completionTime&&null!==e.completionTime?f.Timestamp.fromPartial(e.completionTime):void 0,t}};var _=function(){function e(t){r(this,e),this.rpc=t,this.CreateValidator=this.CreateValidator.bind(this),this.EditValidator=this.EditValidator.bind(this),this.Delegate=this.Delegate.bind(this),this.BeginRedelegate=this.BeginRedelegate.bind(this),this.Undelegate=this.Undelegate.bind(this)}return i(e,[{key:"CreateValidator",value:function(e){var n=t.MsgCreateValidator.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Msg","CreateValidator",n).then((function(e){return t.MsgCreateValidatorResponse.decode(new s.default.Reader(e))}))}},{key:"EditValidator",value:function(e){var n=t.MsgEditValidator.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Msg","EditValidator",n).then((function(e){return t.MsgEditValidatorResponse.decode(new s.default.Reader(e))}))}},{key:"Delegate",value:function(e){var n=t.MsgDelegate.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Msg","Delegate",n).then((function(e){return t.MsgDelegateResponse.decode(new s.default.Reader(e))}))}},{key:"BeginRedelegate",value:function(e){var n=t.MsgBeginRedelegate.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Msg","BeginRedelegate",n).then((function(e){return t.MsgBeginRedelegateResponse.decode(new s.default.Reader(e))}))}},{key:"Undelegate",value:function(e){var n=t.MsgUndelegate.encode(e).finish();return this.rpc.request("cosmos.staking.v1beta1.Msg","Undelegate",n).then((function(e){return t.MsgUndelegateResponse.decode(new s.default.Reader(e))}))}}]),e}();function E(e){var t;return{seconds:(t=e.getTime()/1e3,a.default.fromNumber(t)),nanos:e.getTime()%1e3*1e6}}function k(e){var t=1e3*e.seconds.toNumber();return t+=e.nanos/1e6,new Date(t)}function I(e){return e instanceof Date?E(e):"string"===typeof e?E(new Date(e)):f.Timestamp.fromJSON(e)}t.MsgClientImpl=_,s.default.util.Long!==a.default&&(s.default.util.Long=a.default,s.default.configure())},function(e,t,n){"use strict";var r=n(19).default,i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Pool=t.RedelegationResponse=t.RedelegationEntryResponse=t.DelegationResponse=t.Params=t.Redelegation=t.RedelegationEntry=t.UnbondingDelegationEntry=t.UnbondingDelegation=t.Delegation=t.DVVTriplets=t.DVVTriplet=t.DVPairs=t.DVPair=t.ValAddresses=t.Validator=t.Description=t.Commission=t.CommissionRates=t.HistoricalInfo=t.bondStatusToJSON=t.bondStatusFromJSON=t.BondStatus=t.protobufPackage=void 0;var o,a=i(n(18)),s=i(n(21)),u=n(286),c=n(112),l=n(55),f=n(176),d=n(68);function h(e){switch(e){case 0:case"BOND_STATUS_UNSPECIFIED":return o.BOND_STATUS_UNSPECIFIED;case 1:case"BOND_STATUS_UNBONDED":return o.BOND_STATUS_UNBONDED;case 2:case"BOND_STATUS_UNBONDING":return o.BOND_STATUS_UNBONDING;case 3:case"BOND_STATUS_BONDED":return o.BOND_STATUS_BONDED;default:return o.UNRECOGNIZED}}function p(e){switch(e){case o.BOND_STATUS_UNSPECIFIED:return"BOND_STATUS_UNSPECIFIED";case o.BOND_STATUS_UNBONDED:return"BOND_STATUS_UNBONDED";case o.BOND_STATUS_UNBONDING:return"BOND_STATUS_UNBONDING";case o.BOND_STATUS_BONDED:return"BOND_STATUS_BONDED";default:return"UNKNOWN"}}t.protobufPackage="cosmos.staking.v1beta1",function(e){e[e.BOND_STATUS_UNSPECIFIED=0]="BOND_STATUS_UNSPECIFIED",e[e.BOND_STATUS_UNBONDED=1]="BOND_STATUS_UNBONDED",e[e.BOND_STATUS_UNBONDING=2]="BOND_STATUS_UNBONDING",e[e.BOND_STATUS_BONDED=3]="BOND_STATUS_BONDED",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(o=t.BondStatus||(t.BondStatus={})),t.bondStatusFromJSON=h,t.bondStatusToJSON=p;var g={};t.HistoricalInfo={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();void 0!==e.header&&u.Header.encode(e.header,n.uint32(10).fork()).ldelim();var i,o=r(e.valset);try{for(o.s();!(i=o.n()).done;){var a=i.value;t.Validator.encode(a,n.uint32(18).fork()).ldelim()}}catch(c){o.e(c)}finally{o.f()}return n},decode:function(e,n){var r=e instanceof s.default.Reader?e:new s.default.Reader(e),i=void 0===n?r.len:r.pos+n,o=Object.assign({},g);for(o.valset=[];r.pos>>3){case 1:o.header=u.Header.decode(r,r.uint32());break;case 2:o.valset.push(t.Validator.decode(r,r.uint32()));break;default:r.skipType(7&a)}}return o},fromJSON:function(e){var n,r=Object.assign({},g);return r.header=void 0!==e.header&&null!==e.header?u.Header.fromJSON(e.header):void 0,r.valset=(null!==(n=e.valset)&&void 0!==n?n:[]).map((function(e){return t.Validator.fromJSON(e)})),r},toJSON:function(e){var n={};return void 0!==e.header&&(n.header=e.header?u.Header.toJSON(e.header):void 0),e.valset?n.valset=e.valset.map((function(e){return e?t.Validator.toJSON(e):void 0})):n.valset=[],n},fromPartial:function(e){var n,r=Object.assign({},g);return r.header=void 0!==e.header&&null!==e.header?u.Header.fromPartial(e.header):void 0,r.valset=(null===(n=e.valset)||void 0===n?void 0:n.map((function(e){return t.Validator.fromPartial(e)})))||[],r}};var v={rate:"",maxRate:"",maxChangeRate:""};t.CommissionRates={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return""!==e.rate&&t.uint32(10).string(e.rate),""!==e.maxRate&&t.uint32(18).string(e.maxRate),""!==e.maxChangeRate&&t.uint32(26).string(e.maxChangeRate),t},decode:function(e,t){for(var n=e instanceof s.default.Reader?e:new s.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},v);n.pos>>3){case 1:i.rate=n.string();break;case 2:i.maxRate=n.string();break;case 3:i.maxChangeRate=n.string();break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t=Object.assign({},v);return t.rate=void 0!==e.rate&&null!==e.rate?String(e.rate):"",t.maxRate=void 0!==e.maxRate&&null!==e.maxRate?String(e.maxRate):"",t.maxChangeRate=void 0!==e.maxChangeRate&&null!==e.maxChangeRate?String(e.maxChangeRate):"",t},toJSON:function(e){var t={};return void 0!==e.rate&&(t.rate=e.rate),void 0!==e.maxRate&&(t.maxRate=e.maxRate),void 0!==e.maxChangeRate&&(t.maxChangeRate=e.maxChangeRate),t},fromPartial:function(e){var t,n,r,i=Object.assign({},v);return i.rate=null!==(t=e.rate)&&void 0!==t?t:"",i.maxRate=null!==(n=e.maxRate)&&void 0!==n?n:"",i.maxChangeRate=null!==(r=e.maxChangeRate)&&void 0!==r?r:"",i}};var m={};t.Commission={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return void 0!==e.commissionRates&&t.CommissionRates.encode(e.commissionRates,n.uint32(10).fork()).ldelim(),void 0!==e.updateTime&&c.Timestamp.encode(e.updateTime,n.uint32(18).fork()).ldelim(),n},decode:function(e,n){for(var r=e instanceof s.default.Reader?e:new s.default.Reader(e),i=void 0===n?r.len:r.pos+n,o=Object.assign({},m);r.pos>>3){case 1:o.commissionRates=t.CommissionRates.decode(r,r.uint32());break;case 2:o.updateTime=c.Timestamp.decode(r,r.uint32());break;default:r.skipType(7&a)}}return o},fromJSON:function(e){var n=Object.assign({},m);return n.commissionRates=void 0!==e.commissionRates&&null!==e.commissionRates?t.CommissionRates.fromJSON(e.commissionRates):void 0,n.updateTime=void 0!==e.updateTime&&null!==e.updateTime?D(e.updateTime):void 0,n},toJSON:function(e){var n={};return void 0!==e.commissionRates&&(n.commissionRates=e.commissionRates?t.CommissionRates.toJSON(e.commissionRates):void 0),void 0!==e.updateTime&&(n.updateTime=Q(e.updateTime).toISOString()),n},fromPartial:function(e){var n=Object.assign({},m);return n.commissionRates=void 0!==e.commissionRates&&null!==e.commissionRates?t.CommissionRates.fromPartial(e.commissionRates):void 0,n.updateTime=void 0!==e.updateTime&&null!==e.updateTime?c.Timestamp.fromPartial(e.updateTime):void 0,n}};var A={moniker:"",identity:"",website:"",securityContact:"",details:""};t.Description={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return""!==e.moniker&&t.uint32(10).string(e.moniker),""!==e.identity&&t.uint32(18).string(e.identity),""!==e.website&&t.uint32(26).string(e.website),""!==e.securityContact&&t.uint32(34).string(e.securityContact),""!==e.details&&t.uint32(42).string(e.details),t},decode:function(e,t){for(var n=e instanceof s.default.Reader?e:new s.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},A);n.pos>>3){case 1:i.moniker=n.string();break;case 2:i.identity=n.string();break;case 3:i.website=n.string();break;case 4:i.securityContact=n.string();break;case 5:i.details=n.string();break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t=Object.assign({},A);return t.moniker=void 0!==e.moniker&&null!==e.moniker?String(e.moniker):"",t.identity=void 0!==e.identity&&null!==e.identity?String(e.identity):"",t.website=void 0!==e.website&&null!==e.website?String(e.website):"",t.securityContact=void 0!==e.securityContact&&null!==e.securityContact?String(e.securityContact):"",t.details=void 0!==e.details&&null!==e.details?String(e.details):"",t},toJSON:function(e){var t={};return void 0!==e.moniker&&(t.moniker=e.moniker),void 0!==e.identity&&(t.identity=e.identity),void 0!==e.website&&(t.website=e.website),void 0!==e.securityContact&&(t.securityContact=e.securityContact),void 0!==e.details&&(t.details=e.details),t},fromPartial:function(e){var t,n,r,i,o,a=Object.assign({},A);return a.moniker=null!==(t=e.moniker)&&void 0!==t?t:"",a.identity=null!==(n=e.identity)&&void 0!==n?n:"",a.website=null!==(r=e.website)&&void 0!==r?r:"",a.securityContact=null!==(i=e.securityContact)&&void 0!==i?i:"",a.details=null!==(o=e.details)&&void 0!==o?o:"",a}};var y={operatorAddress:"",jailed:!1,status:0,tokens:"",delegatorShares:"",unbondingHeight:a.default.ZERO,minSelfDelegation:""};t.Validator={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return""!==e.operatorAddress&&n.uint32(10).string(e.operatorAddress),void 0!==e.consensusPubkey&&l.Any.encode(e.consensusPubkey,n.uint32(18).fork()).ldelim(),!0===e.jailed&&n.uint32(24).bool(e.jailed),0!==e.status&&n.uint32(32).int32(e.status),""!==e.tokens&&n.uint32(42).string(e.tokens),""!==e.delegatorShares&&n.uint32(50).string(e.delegatorShares),void 0!==e.description&&t.Description.encode(e.description,n.uint32(58).fork()).ldelim(),e.unbondingHeight.isZero()||n.uint32(64).int64(e.unbondingHeight),void 0!==e.unbondingTime&&c.Timestamp.encode(e.unbondingTime,n.uint32(74).fork()).ldelim(),void 0!==e.commission&&t.Commission.encode(e.commission,n.uint32(82).fork()).ldelim(),""!==e.minSelfDelegation&&n.uint32(90).string(e.minSelfDelegation),n},decode:function(e,n){for(var r=e instanceof s.default.Reader?e:new s.default.Reader(e),i=void 0===n?r.len:r.pos+n,o=Object.assign({},y);r.pos>>3){case 1:o.operatorAddress=r.string();break;case 2:o.consensusPubkey=l.Any.decode(r,r.uint32());break;case 3:o.jailed=r.bool();break;case 4:o.status=r.int32();break;case 5:o.tokens=r.string();break;case 6:o.delegatorShares=r.string();break;case 7:o.description=t.Description.decode(r,r.uint32());break;case 8:o.unbondingHeight=r.int64();break;case 9:o.unbondingTime=c.Timestamp.decode(r,r.uint32());break;case 10:o.commission=t.Commission.decode(r,r.uint32());break;case 11:o.minSelfDelegation=r.string();break;default:r.skipType(7&a)}}return o},fromJSON:function(e){var n=Object.assign({},y);return n.operatorAddress=void 0!==e.operatorAddress&&null!==e.operatorAddress?String(e.operatorAddress):"",n.consensusPubkey=void 0!==e.consensusPubkey&&null!==e.consensusPubkey?l.Any.fromJSON(e.consensusPubkey):void 0,n.jailed=void 0!==e.jailed&&null!==e.jailed&&Boolean(e.jailed),n.status=void 0!==e.status&&null!==e.status?h(e.status):0,n.tokens=void 0!==e.tokens&&null!==e.tokens?String(e.tokens):"",n.delegatorShares=void 0!==e.delegatorShares&&null!==e.delegatorShares?String(e.delegatorShares):"",n.description=void 0!==e.description&&null!==e.description?t.Description.fromJSON(e.description):void 0,n.unbondingHeight=void 0!==e.unbondingHeight&&null!==e.unbondingHeight?a.default.fromString(e.unbondingHeight):a.default.ZERO,n.unbondingTime=void 0!==e.unbondingTime&&null!==e.unbondingTime?D(e.unbondingTime):void 0,n.commission=void 0!==e.commission&&null!==e.commission?t.Commission.fromJSON(e.commission):void 0,n.minSelfDelegation=void 0!==e.minSelfDelegation&&null!==e.minSelfDelegation?String(e.minSelfDelegation):"",n},toJSON:function(e){var n={};return void 0!==e.operatorAddress&&(n.operatorAddress=e.operatorAddress),void 0!==e.consensusPubkey&&(n.consensusPubkey=e.consensusPubkey?l.Any.toJSON(e.consensusPubkey):void 0),void 0!==e.jailed&&(n.jailed=e.jailed),void 0!==e.status&&(n.status=p(e.status)),void 0!==e.tokens&&(n.tokens=e.tokens),void 0!==e.delegatorShares&&(n.delegatorShares=e.delegatorShares),void 0!==e.description&&(n.description=e.description?t.Description.toJSON(e.description):void 0),void 0!==e.unbondingHeight&&(n.unbondingHeight=(e.unbondingHeight||a.default.ZERO).toString()),void 0!==e.unbondingTime&&(n.unbondingTime=Q(e.unbondingTime).toISOString()),void 0!==e.commission&&(n.commission=e.commission?t.Commission.toJSON(e.commission):void 0),void 0!==e.minSelfDelegation&&(n.minSelfDelegation=e.minSelfDelegation),n},fromPartial:function(e){var n,r,i,o,s,u,f=Object.assign({},y);return f.operatorAddress=null!==(n=e.operatorAddress)&&void 0!==n?n:"",f.consensusPubkey=void 0!==e.consensusPubkey&&null!==e.consensusPubkey?l.Any.fromPartial(e.consensusPubkey):void 0,f.jailed=null!==(r=e.jailed)&&void 0!==r&&r,f.status=null!==(i=e.status)&&void 0!==i?i:0,f.tokens=null!==(o=e.tokens)&&void 0!==o?o:"",f.delegatorShares=null!==(s=e.delegatorShares)&&void 0!==s?s:"",f.description=void 0!==e.description&&null!==e.description?t.Description.fromPartial(e.description):void 0,f.unbondingHeight=void 0!==e.unbondingHeight&&null!==e.unbondingHeight?a.default.fromValue(e.unbondingHeight):a.default.ZERO,f.unbondingTime=void 0!==e.unbondingTime&&null!==e.unbondingTime?c.Timestamp.fromPartial(e.unbondingTime):void 0,f.commission=void 0!==e.commission&&null!==e.commission?t.Commission.fromPartial(e.commission):void 0,f.minSelfDelegation=null!==(u=e.minSelfDelegation)&&void 0!==u?u:"",f}};var b={addresses:""};t.ValAddresses={encode:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create(),i=r(e.addresses);try{for(i.s();!(t=i.n()).done;){var o=t.value;n.uint32(10).string(o)}}catch(a){i.e(a)}finally{i.f()}return n},decode:function(e,t){var n=e instanceof s.default.Reader?e:new s.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},b);for(i.addresses=[];n.pos>>3===1)i.addresses.push(n.string());else n.skipType(7&o)}return i},fromJSON:function(e){var t,n=Object.assign({},b);return n.addresses=(null!==(t=e.addresses)&&void 0!==t?t:[]).map((function(e){return String(e)})),n},toJSON:function(e){var t={};return e.addresses?t.addresses=e.addresses.map((function(e){return e})):t.addresses=[],t},fromPartial:function(e){var t,n=Object.assign({},b);return n.addresses=(null===(t=e.addresses)||void 0===t?void 0:t.map((function(e){return e})))||[],n}};var w={delegatorAddress:"",validatorAddress:""};t.DVPair={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),t},decode:function(e,t){for(var n=e instanceof s.default.Reader?e:new s.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},w);n.pos>>3){case 1:i.delegatorAddress=n.string();break;case 2:i.validatorAddress=n.string();break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t=Object.assign({},w);return t.delegatorAddress=void 0!==e.delegatorAddress&&null!==e.delegatorAddress?String(e.delegatorAddress):"",t.validatorAddress=void 0!==e.validatorAddress&&null!==e.validatorAddress?String(e.validatorAddress):"",t},toJSON:function(e){var t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),t},fromPartial:function(e){var t,n,r=Object.assign({},w);return r.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",r.validatorAddress=null!==(n=e.validatorAddress)&&void 0!==n?n:"",r}};var _={};t.DVPairs={encode:function(e){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create(),o=r(e.pairs);try{for(o.s();!(n=o.n()).done;){var a=n.value;t.DVPair.encode(a,i.uint32(10).fork()).ldelim()}}catch(u){o.e(u)}finally{o.f()}return i},decode:function(e,n){var r=e instanceof s.default.Reader?e:new s.default.Reader(e),i=void 0===n?r.len:r.pos+n,o=Object.assign({},_);for(o.pairs=[];r.pos>>3===1)o.pairs.push(t.DVPair.decode(r,r.uint32()));else r.skipType(7&a)}return o},fromJSON:function(e){var n,r=Object.assign({},_);return r.pairs=(null!==(n=e.pairs)&&void 0!==n?n:[]).map((function(e){return t.DVPair.fromJSON(e)})),r},toJSON:function(e){var n={};return e.pairs?n.pairs=e.pairs.map((function(e){return e?t.DVPair.toJSON(e):void 0})):n.pairs=[],n},fromPartial:function(e){var n,r=Object.assign({},_);return r.pairs=(null===(n=e.pairs)||void 0===n?void 0:n.map((function(e){return t.DVPair.fromPartial(e)})))||[],r}};var E={delegatorAddress:"",validatorSrcAddress:"",validatorDstAddress:""};t.DVVTriplet={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorSrcAddress&&t.uint32(18).string(e.validatorSrcAddress),""!==e.validatorDstAddress&&t.uint32(26).string(e.validatorDstAddress),t},decode:function(e,t){for(var n=e instanceof s.default.Reader?e:new s.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},E);n.pos>>3){case 1:i.delegatorAddress=n.string();break;case 2:i.validatorSrcAddress=n.string();break;case 3:i.validatorDstAddress=n.string();break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t=Object.assign({},E);return t.delegatorAddress=void 0!==e.delegatorAddress&&null!==e.delegatorAddress?String(e.delegatorAddress):"",t.validatorSrcAddress=void 0!==e.validatorSrcAddress&&null!==e.validatorSrcAddress?String(e.validatorSrcAddress):"",t.validatorDstAddress=void 0!==e.validatorDstAddress&&null!==e.validatorDstAddress?String(e.validatorDstAddress):"",t},toJSON:function(e){var t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorSrcAddress&&(t.validatorSrcAddress=e.validatorSrcAddress),void 0!==e.validatorDstAddress&&(t.validatorDstAddress=e.validatorDstAddress),t},fromPartial:function(e){var t,n,r,i=Object.assign({},E);return i.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",i.validatorSrcAddress=null!==(n=e.validatorSrcAddress)&&void 0!==n?n:"",i.validatorDstAddress=null!==(r=e.validatorDstAddress)&&void 0!==r?r:"",i}};var k={};t.DVVTriplets={encode:function(e){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create(),o=r(e.triplets);try{for(o.s();!(n=o.n()).done;){var a=n.value;t.DVVTriplet.encode(a,i.uint32(10).fork()).ldelim()}}catch(u){o.e(u)}finally{o.f()}return i},decode:function(e,n){var r=e instanceof s.default.Reader?e:new s.default.Reader(e),i=void 0===n?r.len:r.pos+n,o=Object.assign({},k);for(o.triplets=[];r.pos>>3===1)o.triplets.push(t.DVVTriplet.decode(r,r.uint32()));else r.skipType(7&a)}return o},fromJSON:function(e){var n,r=Object.assign({},k);return r.triplets=(null!==(n=e.triplets)&&void 0!==n?n:[]).map((function(e){return t.DVVTriplet.fromJSON(e)})),r},toJSON:function(e){var n={};return e.triplets?n.triplets=e.triplets.map((function(e){return e?t.DVVTriplet.toJSON(e):void 0})):n.triplets=[],n},fromPartial:function(e){var n,r=Object.assign({},k);return r.triplets=(null===(n=e.triplets)||void 0===n?void 0:n.map((function(e){return t.DVVTriplet.fromPartial(e)})))||[],r}};var I={delegatorAddress:"",validatorAddress:"",shares:""};t.Delegation={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return""!==e.delegatorAddress&&t.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&t.uint32(18).string(e.validatorAddress),""!==e.shares&&t.uint32(26).string(e.shares),t},decode:function(e,t){for(var n=e instanceof s.default.Reader?e:new s.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},I);n.pos>>3){case 1:i.delegatorAddress=n.string();break;case 2:i.validatorAddress=n.string();break;case 3:i.shares=n.string();break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t=Object.assign({},I);return t.delegatorAddress=void 0!==e.delegatorAddress&&null!==e.delegatorAddress?String(e.delegatorAddress):"",t.validatorAddress=void 0!==e.validatorAddress&&null!==e.validatorAddress?String(e.validatorAddress):"",t.shares=void 0!==e.shares&&null!==e.shares?String(e.shares):"",t},toJSON:function(e){var t={};return void 0!==e.delegatorAddress&&(t.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(t.validatorAddress=e.validatorAddress),void 0!==e.shares&&(t.shares=e.shares),t},fromPartial:function(e){var t,n,r,i=Object.assign({},I);return i.delegatorAddress=null!==(t=e.delegatorAddress)&&void 0!==t?t:"",i.validatorAddress=null!==(n=e.validatorAddress)&&void 0!==n?n:"",i.shares=null!==(r=e.shares)&&void 0!==r?r:"",i}};var C={delegatorAddress:"",validatorAddress:""};t.UnbondingDelegation={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();""!==e.delegatorAddress&&n.uint32(10).string(e.delegatorAddress),""!==e.validatorAddress&&n.uint32(18).string(e.validatorAddress);var i,o=r(e.entries);try{for(o.s();!(i=o.n()).done;){var a=i.value;t.UnbondingDelegationEntry.encode(a,n.uint32(26).fork()).ldelim()}}catch(u){o.e(u)}finally{o.f()}return n},decode:function(e,n){var r=e instanceof s.default.Reader?e:new s.default.Reader(e),i=void 0===n?r.len:r.pos+n,o=Object.assign({},C);for(o.entries=[];r.pos>>3){case 1:o.delegatorAddress=r.string();break;case 2:o.validatorAddress=r.string();break;case 3:o.entries.push(t.UnbondingDelegationEntry.decode(r,r.uint32()));break;default:r.skipType(7&a)}}return o},fromJSON:function(e){var n,r=Object.assign({},C);return r.delegatorAddress=void 0!==e.delegatorAddress&&null!==e.delegatorAddress?String(e.delegatorAddress):"",r.validatorAddress=void 0!==e.validatorAddress&&null!==e.validatorAddress?String(e.validatorAddress):"",r.entries=(null!==(n=e.entries)&&void 0!==n?n:[]).map((function(e){return t.UnbondingDelegationEntry.fromJSON(e)})),r},toJSON:function(e){var n={};return void 0!==e.delegatorAddress&&(n.delegatorAddress=e.delegatorAddress),void 0!==e.validatorAddress&&(n.validatorAddress=e.validatorAddress),e.entries?n.entries=e.entries.map((function(e){return e?t.UnbondingDelegationEntry.toJSON(e):void 0})):n.entries=[],n},fromPartial:function(e){var n,r,i,o=Object.assign({},C);return o.delegatorAddress=null!==(n=e.delegatorAddress)&&void 0!==n?n:"",o.validatorAddress=null!==(r=e.validatorAddress)&&void 0!==r?r:"",o.entries=(null===(i=e.entries)||void 0===i?void 0:i.map((function(e){return t.UnbondingDelegationEntry.fromPartial(e)})))||[],o}};var S={creationHeight:a.default.ZERO,initialBalance:"",balance:""};t.UnbondingDelegationEntry={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return e.creationHeight.isZero()||t.uint32(8).int64(e.creationHeight),void 0!==e.completionTime&&c.Timestamp.encode(e.completionTime,t.uint32(18).fork()).ldelim(),""!==e.initialBalance&&t.uint32(26).string(e.initialBalance),""!==e.balance&&t.uint32(34).string(e.balance),t},decode:function(e,t){for(var n=e instanceof s.default.Reader?e:new s.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},S);n.pos>>3){case 1:i.creationHeight=n.int64();break;case 2:i.completionTime=c.Timestamp.decode(n,n.uint32());break;case 3:i.initialBalance=n.string();break;case 4:i.balance=n.string();break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t=Object.assign({},S);return t.creationHeight=void 0!==e.creationHeight&&null!==e.creationHeight?a.default.fromString(e.creationHeight):a.default.ZERO,t.completionTime=void 0!==e.completionTime&&null!==e.completionTime?D(e.completionTime):void 0,t.initialBalance=void 0!==e.initialBalance&&null!==e.initialBalance?String(e.initialBalance):"",t.balance=void 0!==e.balance&&null!==e.balance?String(e.balance):"",t},toJSON:function(e){var t={};return void 0!==e.creationHeight&&(t.creationHeight=(e.creationHeight||a.default.ZERO).toString()),void 0!==e.completionTime&&(t.completionTime=Q(e.completionTime).toISOString()),void 0!==e.initialBalance&&(t.initialBalance=e.initialBalance),void 0!==e.balance&&(t.balance=e.balance),t},fromPartial:function(e){var t,n,r=Object.assign({},S);return r.creationHeight=void 0!==e.creationHeight&&null!==e.creationHeight?a.default.fromValue(e.creationHeight):a.default.ZERO,r.completionTime=void 0!==e.completionTime&&null!==e.completionTime?c.Timestamp.fromPartial(e.completionTime):void 0,r.initialBalance=null!==(t=e.initialBalance)&&void 0!==t?t:"",r.balance=null!==(n=e.balance)&&void 0!==n?n:"",r}};var x={creationHeight:a.default.ZERO,initialBalance:"",sharesDst:""};t.RedelegationEntry={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return e.creationHeight.isZero()||t.uint32(8).int64(e.creationHeight),void 0!==e.completionTime&&c.Timestamp.encode(e.completionTime,t.uint32(18).fork()).ldelim(),""!==e.initialBalance&&t.uint32(26).string(e.initialBalance),""!==e.sharesDst&&t.uint32(34).string(e.sharesDst),t},decode:function(e,t){for(var n=e instanceof s.default.Reader?e:new s.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},x);n.pos>>3){case 1:i.creationHeight=n.int64();break;case 2:i.completionTime=c.Timestamp.decode(n,n.uint32());break;case 3:i.initialBalance=n.string();break;case 4:i.sharesDst=n.string();break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t=Object.assign({},x);return t.creationHeight=void 0!==e.creationHeight&&null!==e.creationHeight?a.default.fromString(e.creationHeight):a.default.ZERO,t.completionTime=void 0!==e.completionTime&&null!==e.completionTime?D(e.completionTime):void 0,t.initialBalance=void 0!==e.initialBalance&&null!==e.initialBalance?String(e.initialBalance):"",t.sharesDst=void 0!==e.sharesDst&&null!==e.sharesDst?String(e.sharesDst):"",t},toJSON:function(e){var t={};return void 0!==e.creationHeight&&(t.creationHeight=(e.creationHeight||a.default.ZERO).toString()),void 0!==e.completionTime&&(t.completionTime=Q(e.completionTime).toISOString()),void 0!==e.initialBalance&&(t.initialBalance=e.initialBalance),void 0!==e.sharesDst&&(t.sharesDst=e.sharesDst),t},fromPartial:function(e){var t,n,r=Object.assign({},x);return r.creationHeight=void 0!==e.creationHeight&&null!==e.creationHeight?a.default.fromValue(e.creationHeight):a.default.ZERO,r.completionTime=void 0!==e.completionTime&&null!==e.completionTime?c.Timestamp.fromPartial(e.completionTime):void 0,r.initialBalance=null!==(t=e.initialBalance)&&void 0!==t?t:"",r.sharesDst=null!==(n=e.sharesDst)&&void 0!==n?n:"",r}};var B={delegatorAddress:"",validatorSrcAddress:"",validatorDstAddress:""};t.Redelegation={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();""!==e.delegatorAddress&&n.uint32(10).string(e.delegatorAddress),""!==e.validatorSrcAddress&&n.uint32(18).string(e.validatorSrcAddress),""!==e.validatorDstAddress&&n.uint32(26).string(e.validatorDstAddress);var i,o=r(e.entries);try{for(o.s();!(i=o.n()).done;){var a=i.value;t.RedelegationEntry.encode(a,n.uint32(34).fork()).ldelim()}}catch(u){o.e(u)}finally{o.f()}return n},decode:function(e,n){var r=e instanceof s.default.Reader?e:new s.default.Reader(e),i=void 0===n?r.len:r.pos+n,o=Object.assign({},B);for(o.entries=[];r.pos>>3){case 1:o.delegatorAddress=r.string();break;case 2:o.validatorSrcAddress=r.string();break;case 3:o.validatorDstAddress=r.string();break;case 4:o.entries.push(t.RedelegationEntry.decode(r,r.uint32()));break;default:r.skipType(7&a)}}return o},fromJSON:function(e){var n,r=Object.assign({},B);return r.delegatorAddress=void 0!==e.delegatorAddress&&null!==e.delegatorAddress?String(e.delegatorAddress):"",r.validatorSrcAddress=void 0!==e.validatorSrcAddress&&null!==e.validatorSrcAddress?String(e.validatorSrcAddress):"",r.validatorDstAddress=void 0!==e.validatorDstAddress&&null!==e.validatorDstAddress?String(e.validatorDstAddress):"",r.entries=(null!==(n=e.entries)&&void 0!==n?n:[]).map((function(e){return t.RedelegationEntry.fromJSON(e)})),r},toJSON:function(e){var n={};return void 0!==e.delegatorAddress&&(n.delegatorAddress=e.delegatorAddress),void 0!==e.validatorSrcAddress&&(n.validatorSrcAddress=e.validatorSrcAddress),void 0!==e.validatorDstAddress&&(n.validatorDstAddress=e.validatorDstAddress),e.entries?n.entries=e.entries.map((function(e){return e?t.RedelegationEntry.toJSON(e):void 0})):n.entries=[],n},fromPartial:function(e){var n,r,i,o,a=Object.assign({},B);return a.delegatorAddress=null!==(n=e.delegatorAddress)&&void 0!==n?n:"",a.validatorSrcAddress=null!==(r=e.validatorSrcAddress)&&void 0!==r?r:"",a.validatorDstAddress=null!==(i=e.validatorDstAddress)&&void 0!==i?i:"",a.entries=(null===(o=e.entries)||void 0===o?void 0:o.map((function(e){return t.RedelegationEntry.fromPartial(e)})))||[],a}};var O={maxValidators:0,maxEntries:0,historicalEntries:0,bondDenom:""};t.Params={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return void 0!==e.unbondingTime&&f.Duration.encode(e.unbondingTime,t.uint32(10).fork()).ldelim(),0!==e.maxValidators&&t.uint32(16).uint32(e.maxValidators),0!==e.maxEntries&&t.uint32(24).uint32(e.maxEntries),0!==e.historicalEntries&&t.uint32(32).uint32(e.historicalEntries),""!==e.bondDenom&&t.uint32(42).string(e.bondDenom),t},decode:function(e,t){for(var n=e instanceof s.default.Reader?e:new s.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},O);n.pos>>3){case 1:i.unbondingTime=f.Duration.decode(n,n.uint32());break;case 2:i.maxValidators=n.uint32();break;case 3:i.maxEntries=n.uint32();break;case 4:i.historicalEntries=n.uint32();break;case 5:i.bondDenom=n.string();break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t=Object.assign({},O);return t.unbondingTime=void 0!==e.unbondingTime&&null!==e.unbondingTime?f.Duration.fromJSON(e.unbondingTime):void 0,t.maxValidators=void 0!==e.maxValidators&&null!==e.maxValidators?Number(e.maxValidators):0,t.maxEntries=void 0!==e.maxEntries&&null!==e.maxEntries?Number(e.maxEntries):0,t.historicalEntries=void 0!==e.historicalEntries&&null!==e.historicalEntries?Number(e.historicalEntries):0,t.bondDenom=void 0!==e.bondDenom&&null!==e.bondDenom?String(e.bondDenom):"",t},toJSON:function(e){var t={};return void 0!==e.unbondingTime&&(t.unbondingTime=e.unbondingTime?f.Duration.toJSON(e.unbondingTime):void 0),void 0!==e.maxValidators&&(t.maxValidators=e.maxValidators),void 0!==e.maxEntries&&(t.maxEntries=e.maxEntries),void 0!==e.historicalEntries&&(t.historicalEntries=e.historicalEntries),void 0!==e.bondDenom&&(t.bondDenom=e.bondDenom),t},fromPartial:function(e){var t,n,r,i,o=Object.assign({},O);return o.unbondingTime=void 0!==e.unbondingTime&&null!==e.unbondingTime?f.Duration.fromPartial(e.unbondingTime):void 0,o.maxValidators=null!==(t=e.maxValidators)&&void 0!==t?t:0,o.maxEntries=null!==(n=e.maxEntries)&&void 0!==n?n:0,o.historicalEntries=null!==(r=e.historicalEntries)&&void 0!==r?r:0,o.bondDenom=null!==(i=e.bondDenom)&&void 0!==i?i:"",o}};var M={};t.DelegationResponse={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return void 0!==e.delegation&&t.Delegation.encode(e.delegation,n.uint32(10).fork()).ldelim(),void 0!==e.balance&&d.Coin.encode(e.balance,n.uint32(18).fork()).ldelim(),n},decode:function(e,n){for(var r=e instanceof s.default.Reader?e:new s.default.Reader(e),i=void 0===n?r.len:r.pos+n,o=Object.assign({},M);r.pos>>3){case 1:o.delegation=t.Delegation.decode(r,r.uint32());break;case 2:o.balance=d.Coin.decode(r,r.uint32());break;default:r.skipType(7&a)}}return o},fromJSON:function(e){var n=Object.assign({},M);return n.delegation=void 0!==e.delegation&&null!==e.delegation?t.Delegation.fromJSON(e.delegation):void 0,n.balance=void 0!==e.balance&&null!==e.balance?d.Coin.fromJSON(e.balance):void 0,n},toJSON:function(e){var n={};return void 0!==e.delegation&&(n.delegation=e.delegation?t.Delegation.toJSON(e.delegation):void 0),void 0!==e.balance&&(n.balance=e.balance?d.Coin.toJSON(e.balance):void 0),n},fromPartial:function(e){var n=Object.assign({},M);return n.delegation=void 0!==e.delegation&&null!==e.delegation?t.Delegation.fromPartial(e.delegation):void 0,n.balance=void 0!==e.balance&&null!==e.balance?d.Coin.fromPartial(e.balance):void 0,n}};var P={balance:""};t.RedelegationEntryResponse={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return void 0!==e.redelegationEntry&&t.RedelegationEntry.encode(e.redelegationEntry,n.uint32(10).fork()).ldelim(),""!==e.balance&&n.uint32(34).string(e.balance),n},decode:function(e,n){for(var r=e instanceof s.default.Reader?e:new s.default.Reader(e),i=void 0===n?r.len:r.pos+n,o=Object.assign({},P);r.pos>>3){case 1:o.redelegationEntry=t.RedelegationEntry.decode(r,r.uint32());break;case 4:o.balance=r.string();break;default:r.skipType(7&a)}}return o},fromJSON:function(e){var n=Object.assign({},P);return n.redelegationEntry=void 0!==e.redelegationEntry&&null!==e.redelegationEntry?t.RedelegationEntry.fromJSON(e.redelegationEntry):void 0,n.balance=void 0!==e.balance&&null!==e.balance?String(e.balance):"",n},toJSON:function(e){var n={};return void 0!==e.redelegationEntry&&(n.redelegationEntry=e.redelegationEntry?t.RedelegationEntry.toJSON(e.redelegationEntry):void 0),void 0!==e.balance&&(n.balance=e.balance),n},fromPartial:function(e){var n,r=Object.assign({},P);return r.redelegationEntry=void 0!==e.redelegationEntry&&null!==e.redelegationEntry?t.RedelegationEntry.fromPartial(e.redelegationEntry):void 0,r.balance=null!==(n=e.balance)&&void 0!==n?n:"",r}};var R={};t.RedelegationResponse={encode:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();void 0!==e.redelegation&&t.Redelegation.encode(e.redelegation,n.uint32(10).fork()).ldelim();var i,o=r(e.entries);try{for(o.s();!(i=o.n()).done;){var a=i.value;t.RedelegationEntryResponse.encode(a,n.uint32(18).fork()).ldelim()}}catch(u){o.e(u)}finally{o.f()}return n},decode:function(e,n){var r=e instanceof s.default.Reader?e:new s.default.Reader(e),i=void 0===n?r.len:r.pos+n,o=Object.assign({},R);for(o.entries=[];r.pos>>3){case 1:o.redelegation=t.Redelegation.decode(r,r.uint32());break;case 2:o.entries.push(t.RedelegationEntryResponse.decode(r,r.uint32()));break;default:r.skipType(7&a)}}return o},fromJSON:function(e){var n,r=Object.assign({},R);return r.redelegation=void 0!==e.redelegation&&null!==e.redelegation?t.Redelegation.fromJSON(e.redelegation):void 0,r.entries=(null!==(n=e.entries)&&void 0!==n?n:[]).map((function(e){return t.RedelegationEntryResponse.fromJSON(e)})),r},toJSON:function(e){var n={};return void 0!==e.redelegation&&(n.redelegation=e.redelegation?t.Redelegation.toJSON(e.redelegation):void 0),e.entries?n.entries=e.entries.map((function(e){return e?t.RedelegationEntryResponse.toJSON(e):void 0})):n.entries=[],n},fromPartial:function(e){var n,r=Object.assign({},R);return r.redelegation=void 0!==e.redelegation&&null!==e.redelegation?t.Redelegation.fromPartial(e.redelegation):void 0,r.entries=(null===(n=e.entries)||void 0===n?void 0:n.map((function(e){return t.RedelegationEntryResponse.fromPartial(e)})))||[],r}};var N={notBondedTokens:"",bondedTokens:""};function T(e){var t;return{seconds:(t=e.getTime()/1e3,a.default.fromNumber(t)),nanos:e.getTime()%1e3*1e6}}function Q(e){var t=1e3*e.seconds.toNumber();return t+=e.nanos/1e6,new Date(t)}function D(e){return e instanceof Date?T(e):"string"===typeof e?T(new Date(e)):c.Timestamp.fromJSON(e)}t.Pool={encode:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.Writer.create();return""!==e.notBondedTokens&&t.uint32(10).string(e.notBondedTokens),""!==e.bondedTokens&&t.uint32(18).string(e.bondedTokens),t},decode:function(e,t){for(var n=e instanceof s.default.Reader?e:new s.default.Reader(e),r=void 0===t?n.len:n.pos+t,i=Object.assign({},N);n.pos>>3){case 1:i.notBondedTokens=n.string();break;case 2:i.bondedTokens=n.string();break;default:n.skipType(7&o)}}return i},fromJSON:function(e){var t=Object.assign({},N);return t.notBondedTokens=void 0!==e.notBondedTokens&&null!==e.notBondedTokens?String(e.notBondedTokens):"",t.bondedTokens=void 0!==e.bondedTokens&&null!==e.bondedTokens?String(e.bondedTokens):"",t},toJSON:function(e){var t={};return void 0!==e.notBondedTokens&&(t.notBondedTokens=e.notBondedTokens),void 0!==e.bondedTokens&&(t.bondedTokens=e.bondedTokens),t},fromPartial:function(e){var t,n,r=Object.assign({},N);return r.notBondedTokens=null!==(t=e.notBondedTokens)&&void 0!==t?t:"",r.bondedTokens=null!==(n=e.bondedTokens)&&void 0!==n?n:"",r}},s.default.util.Long!==a.default&&(s.default.util.Long=a.default,s.default.configure())},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSearchByTagsQuery=t.isSearchBySentFromOrToQuery=t.isSearchByHeightQuery=void 0,t.isSearchByHeightQuery=function(e){return void 0!==e.height},t.isSearchBySentFromOrToQuery=function(e){return void 0!==e.sentFromOrTo},t.isSearchByTagsQuery=function(e){return void 0!==e.tags}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.BlockIdFlag=t.Tendermint34Client=t.tendermint34=t.VoteType=t.SubscriptionEventType=t.Method=t.broadcastTxSyncSuccess=t.broadcastTxCommitSuccess=t.WebsocketClient=t.HttpClient=t.toSeconds=t.toRfc3339WithNanoseconds=t.fromSeconds=t.fromRfc3339WithNanoseconds=t.DateTime=t.rawSecp256k1PubkeyToRawAddress=t.rawEd25519PubkeyToRawAddress=t.pubkeyToRawAddress=t.pubkeyToAddress=void 0;var a=n(1063);Object.defineProperty(t,"pubkeyToAddress",{enumerable:!0,get:function(){return a.pubkeyToAddress}}),Object.defineProperty(t,"pubkeyToRawAddress",{enumerable:!0,get:function(){return a.pubkeyToRawAddress}}),Object.defineProperty(t,"rawEd25519PubkeyToRawAddress",{enumerable:!0,get:function(){return a.rawEd25519PubkeyToRawAddress}}),Object.defineProperty(t,"rawSecp256k1PubkeyToRawAddress",{enumerable:!0,get:function(){return a.rawSecp256k1PubkeyToRawAddress}});var s=n(478);Object.defineProperty(t,"DateTime",{enumerable:!0,get:function(){return s.DateTime}}),Object.defineProperty(t,"fromRfc3339WithNanoseconds",{enumerable:!0,get:function(){return s.fromRfc3339WithNanoseconds}}),Object.defineProperty(t,"fromSeconds",{enumerable:!0,get:function(){return s.fromSeconds}}),Object.defineProperty(t,"toRfc3339WithNanoseconds",{enumerable:!0,get:function(){return s.toRfc3339WithNanoseconds}}),Object.defineProperty(t,"toSeconds",{enumerable:!0,get:function(){return s.toSeconds}});var u=n(479);Object.defineProperty(t,"HttpClient",{enumerable:!0,get:function(){return u.HttpClient}}),Object.defineProperty(t,"WebsocketClient",{enumerable:!0,get:function(){return u.WebsocketClient}});var c=n(289);Object.defineProperty(t,"broadcastTxCommitSuccess",{enumerable:!0,get:function(){return c.broadcastTxCommitSuccess}}),Object.defineProperty(t,"broadcastTxSyncSuccess",{enumerable:!0,get:function(){return c.broadcastTxSyncSuccess}}),Object.defineProperty(t,"Method",{enumerable:!0,get:function(){return c.Method}}),Object.defineProperty(t,"SubscriptionEventType",{enumerable:!0,get:function(){return c.SubscriptionEventType}}),Object.defineProperty(t,"VoteType",{enumerable:!0,get:function(){return c.VoteType}}),t.tendermint34=o(n(289));var l=n(289);Object.defineProperty(t,"Tendermint34Client",{enumerable:!0,get:function(){return l.Tendermint34Client}});var f=n(495);Object.defineProperty(t,"BlockIdFlag",{enumerable:!0,get:function(){return f.BlockIdFlag}})},function(e,t,n){"use strict";var r=n(9).default,i=n(10).default;Object.defineProperty(t,"__esModule",{value:!0}),t.DateTime=t.toSeconds=t.fromSeconds=t.toRfc3339WithNanoseconds=t.fromRfc3339WithNanoseconds=void 0;var o=n(41),a=n(70);function s(e){var t=(0,o.fromRfc3339)(e),n=e.match(/\.(\d+)Z$/),r=n?n[1].slice(3):"";return t.nanoseconds=parseInt(r.padEnd(6,"0"),10),t}function u(e){var t,n,r=e.toISOString(),i=null!==(n=null===(t=e.nanoseconds)||void 0===t?void 0:t.toString())&&void 0!==n?n:"";return"".concat(r.slice(0,-1)).concat(i.padStart(6,"0"),"Z")}t.fromRfc3339WithNanoseconds=s,t.toRfc3339WithNanoseconds=u,t.fromSeconds=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=new a.Uint32(t).toNumber();if(n>999999999)throw new Error("Nano seconds must not exceed 999999999");var r=new Date(1e3*e+Math.floor(n/1e6));return r.nanoseconds=n%1e6,r},t.toSeconds=function(e){var t;return{seconds:Math.floor(e.getTime()/1e3),nanos:e.getTime()%1e3*1e6+(null!==(t=e.nanoseconds)&&void 0!==t?t:0)}};var c=function(){function e(){r(this,e)}return i(e,null,[{key:"decode",value:function(e){return s(e)}},{key:"encode",value:function(e){return u(e)}}]),e}();t.DateTime=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebsocketClient=t.instanceOfRpcStreamingClient=t.HttpClient=void 0;var r=n(1064);Object.defineProperty(t,"HttpClient",{enumerable:!0,get:function(){return r.HttpClient}});var i=n(288);Object.defineProperty(t,"instanceOfRpcStreamingClient",{enumerable:!0,get:function(){return i.instanceOfRpcStreamingClient}});var o=n(1088);Object.defineProperty(t,"WebsocketClient",{enumerable:!0,get:function(){return o.WebsocketClient}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.jsonRpcCode=t.isJsonRpcSuccessResponse=t.isJsonRpcErrorResponse=t.parseJsonRpcSuccessResponse=t.parseJsonRpcResponse=t.parseJsonRpcRequest=t.parseJsonRpcId=t.parseJsonRpcErrorResponse=t.JsonRpcClient=t.makeJsonRpcId=void 0;var r=n(1065);Object.defineProperty(t,"makeJsonRpcId",{enumerable:!0,get:function(){return r.makeJsonRpcId}});var i=n(1066);Object.defineProperty(t,"JsonRpcClient",{enumerable:!0,get:function(){return i.JsonRpcClient}});var o=n(1067);Object.defineProperty(t,"parseJsonRpcErrorResponse",{enumerable:!0,get:function(){return o.parseJsonRpcErrorResponse}}),Object.defineProperty(t,"parseJsonRpcId",{enumerable:!0,get:function(){return o.parseJsonRpcId}}),Object.defineProperty(t,"parseJsonRpcRequest",{enumerable:!0,get:function(){return o.parseJsonRpcRequest}}),Object.defineProperty(t,"parseJsonRpcResponse",{enumerable:!0,get:function(){return o.parseJsonRpcResponse}}),Object.defineProperty(t,"parseJsonRpcSuccessResponse",{enumerable:!0,get:function(){return o.parseJsonRpcSuccessResponse}});var a=n(481);Object.defineProperty(t,"isJsonRpcErrorResponse",{enumerable:!0,get:function(){return a.isJsonRpcErrorResponse}}),Object.defineProperty(t,"isJsonRpcSuccessResponse",{enumerable:!0,get:function(){return a.isJsonRpcSuccessResponse}}),Object.defineProperty(t,"jsonRpcCode",{enumerable:!0,get:function(){return a.jsonRpcCode}})},function(e,t,n){"use strict";function r(e){return"object"===typeof e.error}Object.defineProperty(t,"__esModule",{value:!0}),t.jsonRpcCode=t.isJsonRpcSuccessResponse=t.isJsonRpcErrorResponse=void 0,t.isJsonRpcErrorResponse=r,t.isJsonRpcSuccessResponse=function(e){return!r(e)},t.jsonRpcCode={parseError:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internalError:-32603,serverError:{default:-32e3}}},function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r1&&void 0!==arguments[1]?arguments[1]:1e4,i=arguments.length>2?arguments[2]:void 0;o(this,e),this.queue=[],this.isProcessingQueue=!1,this.url=t,this.timeout=r,this.reconnectedHandler=i;var a={start:function(e){return n.eventProducerListener=e},stop:function(){return n.eventProducerListener=void 0}};this.events=c.Stream.create(a),this.connectionStatusProducer=new u.DefaultValueProducer(s.Unconnected),this.connectionStatus=new u.ValueAndUpdates(this.connectionStatusProducer),this.socket=new l.StreamingSocket(this.url,this.timeout),this.socket.events.subscribe({next:function(e){if(!n.eventProducerListener)throw new Error("No event producer listener set");n.eventProducerListener.next(e)},error:function(){return n.connectionStatusProducer.update(s.Disconnected)}})}return a(e,[{key:"connect",value:function(){var e=this;this.connectionStatusProducer.update(s.Connecting),this.socket.connected.then(i(r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.connectionStatusProducer.update(s.Connected),t.abrupt("return",e.processQueue());case 2:case"end":return t.stop()}}),t)}))),(function(){return e.connectionStatusProducer.update(s.Disconnected)})),this.socket.connect()}},{key:"disconnect",value:function(){this.connectionStatusProducer.update(s.Disconnected),this.socket.disconnect()}},{key:"reconnect",value:function(){var e=this;this.socket=new l.StreamingSocket(this.url,this.timeout),this.socket.events.subscribe({next:function(t){if(!e.eventProducerListener)throw new Error("No event producer listener set");e.eventProducerListener.next(t)},error:function(){return e.connectionStatusProducer.update(s.Disconnected)}}),this.socket.connected.then((function(){e.reconnectedHandler&&e.reconnectedHandler()})),this.connect()}},{key:"getQueueLength",value:function(){return this.queue.length}},{key:"queueRequest",value:function(e){this.queue.push(e),this.processQueue()}},{key:"processQueue",value:function(){var e=i(r().mark((function e(){var t;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.isProcessingQueue&&this.connectionStatus.value===s.Connected){e.next=2;break}return e.abrupt("return");case 2:this.isProcessingQueue=!0;case 3:if(!(t=this.queue.shift())){e.next=17;break}return e.prev=4,e.next=7,this.socket.send(t);case 7:this.isProcessingQueue=!1,e.next=15;break;case 10:return e.prev=10,e.t0=e.catch(4),this.queue.unshift(t),this.isProcessingQueue=!1,e.abrupt("return");case 15:e.next=3;break;case 17:case"end":return e.stop()}}),e,this,[[4,10]])})));return function(){return e.apply(this,arguments)}}()}]),e}();t.QueueingStreamingSocket=f},function(e,t,n){"use strict";var r=n(28).default,i=n(29).default,o=n(9).default,a=n(10).default;Object.defineProperty(t,"__esModule",{value:!0}),t.StreamingSocket=void 0;var s=n(134),u=n(492),c=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e4;o(this,e),this.socket=new u.SocketWrapper(t,(function(e){n.eventProducerListener&&n.eventProducerListener.next(e)}),(function(e){n.eventProducerListener&&n.eventProducerListener.error(e)}),(function(){}),(function(e){n.eventProducerListener&&(e.wasClean?n.eventProducerListener.complete():n.eventProducerListener.error("Socket was closed unclean"))}),r),this.connected=this.socket.connected;var i={start:function(e){return n.eventProducerListener=e},stop:function(){return n.eventProducerListener=void 0}};this.events=s.Stream.create(i)}return a(e,[{key:"connect",value:function(){this.socket.connect()}},{key:"disconnect",value:function(){this.socket.disconnect()}},{key:"send",value:function(){var e=i(r().mark((function e(t){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.socket.send(t));case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),e}();t.StreamingSocket=c},function(e,t,n){"use strict";(function(e){var r=n(28).default,i=n(29).default,o=n(9).default,a=n(10).default,s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SocketWrapper=void 0;var u=s(n(1090));var c=function(){function t(e,n,r,i,a){var s=this,u=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1e4;o(this,t),this.closed=!1,this.connected=new Promise((function(e,t){s.connectedResolver=e,s.connectedRejecter=t})),this.url=e,this.messageHandler=n,this.errorHandler=r,this.openHandler=i,this.closeHandler=a,this.timeout=u}return a(t,[{key:"connect",value:function(){var e=this,t=new u.default(this.url);t.onerror=function(t){e.clearTimeout(),e.errorHandler&&e.errorHandler(t)},t.onmessage=function(t){e.messageHandler({type:t.type,data:t.data})},t.onopen=function(t){e.clearTimeout(),e.connectedResolver(),e.openHandler&&e.openHandler()},t.onclose=function(t){e.closed=!0,e.closeHandler&&e.closeHandler(t)};var n=Date.now();this.timeoutId=setTimeout((function(){t.onmessage=function(){return 0},t.onerror=function(){return 0},t.onopen=function(){return 0},t.onclose=function(){return 0},t.close(),e.socket=void 0;var r=Math.floor(Date.now()-n);e.connectedRejecter("Connection attempt timed out after ".concat(r," ms"))}),this.timeout),this.socket=t}},{key:"disconnect",value:function(){if(!this.socket)throw new Error("Socket undefined. This must be called after connecting.");switch(this.clearTimeout(),this.socket.readyState){case u.default.OPEN:this.socket.close(1e3);break;case u.default.CLOSED:break;case u.default.CONNECTING:this.socket.onopen=function(){return 0},this.socket.onclose=function(){return 0},this.socket.onerror=function(){return 0},this.socket.onmessage=function(){return 0},this.socket=void 0,this.closeHandler&&this.closeHandler({wasClean:!1,code:4001});break;case u.default.CLOSING:break;default:throw new Error("Unknown readyState: ".concat(this.socket.readyState))}}},{key:"send",value:function(){var t=i(r().mark((function t(n){var i=this;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,r){if(!i.socket)throw new Error("Socket undefined. This must be called after connecting.");if(i.closed)throw new Error("Socket was closed, so no data can be sent anymore.");if(i.socket.readyState!==u.default.OPEN)throw new Error("Websocket is not open");"undefined"!==typeof e&&"undefined"!==typeof e.versions&&"undefined"!==typeof e.versions.node?i.socket.send(n,(function(e){return e?r(e):t()})):(i.socket.send(n),t())})));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},{key:"clearTimeout",value:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(){if(!this.timeoutId)throw new Error("Timeout ID not set. This should not happen and usually means connect() was not called.");clearTimeout(this.timeoutId)}))}]),t}();t.SocketWrapper=c}).call(this,n(35))},function(e,t,n){"use strict";var r=n(87).default;Object.defineProperty(t,"__esModule",{value:!0}),t.createJsonRpcRequest=void 0;var i="123456789";function o(){return parseInt(Array.from({length:12}).map((function(){return i[Math.floor(Math.random()*i.length)]})).join(""),10)}t.createJsonRpcRequest=function(e,t){var n=t?r({},t):{};return{jsonrpc:"2.0",id:o(),method:e,params:n}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hashBlock=t.hashTx=void 0;var r=n(93),i=n(291);function o(e){switch(e.length){case 0:throw new Error("Cannot hash empty tree");case 1:return function(e){var t=new r.Sha256(Uint8Array.from([0]));return t.update(e),t.digest()}(e[0]);default:var t=function(e){if(e<1)throw new Error("Cannot split an empty tree");var t=Math.pow(2,Math.floor(Math.log2(e)));return t=").concat(a," AND tx.height<=").concat(s)},n=w.length>1&&void 0!==w[1]?w[1]:{},a=n.minHeight||0,!((s=n.maxHeight||Number.MAX_SAFE_INTEGER)=a&&t.height<=s)){e.next=13;break}return e.next=10,this.txsQuery("tx.height=".concat(t.height));case 10:e.t0=e.sent,e.next=14;break;case 13:e.t0=[];case 14:c=e.t0,e.next=38;break;case 17:if(!(0,b.isSearchBySentFromOrToQuery)(t)){e.next=30;break}return l=u("message.module='bank' AND transfer.sender='".concat(t.sentFromOrTo,"'")),f=u("message.module='bank' AND transfer.recipient='".concat(t.sentFromOrTo,"'")),e.next=22,Promise.all([l,f].map((function(e){return y.txsQuery(e)})));case 22:d=e.sent,h=r(d,2),p=h[0],g=h[1],v=p.map((function(e){return e.hash})),c=[].concat(i(p),i(g.filter((function(e){return!v.includes(e.hash)})))),e.next=38;break;case 30:if(!(0,b.isSearchByTagsQuery)(t)){e.next=37;break}return m=u(t.tags.map((function(e){return"".concat(e.key,"='").concat(e.value,"'")})).join(" AND ")),e.next=34,this.txsQuery(m);case 34:c=e.sent,e.next=38;break;case 37:throw new Error("Unknown query type");case 38:return A=c.filter((function(e){return e.height>=a&&e.height<=s})),e.abrupt("return",A);case 40:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"disconnect",value:function(){this.tmClient&&this.tmClient.disconnect()}},{key:"broadcastTx",value:function(){var e=a(o().mark((function e(t){var n,r,i,s,u,c,l,f=this,d=arguments;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=d.length>1&&void 0!==d[1]?d[1]:6e4,r=d.length>2&&void 0!==d[2]?d[2]:3e3,i=!1,s=setTimeout((function(){i=!0}),n),u=function(){var e=a(o().mark((function e(t){var a;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!i){e.next=2;break}throw new w("Transaction with ID ".concat(t," was submitted but was not yet found on the chain. You might want to check later. There was a wait of ").concat(n/1e3," seconds."),t);case 2:return e.next=4,(0,v.sleep)(r);case 4:return e.next=6,f.getTx(t);case 6:return a=e.sent,e.abrupt("return",a?{code:a.code,height:a.height,rawLog:a.rawLog,transactionHash:t,gasUsed:a.gasUsed,gasWanted:a.gasWanted}:u(t));case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.next=7,this.forceGetTmClient().broadcastTxSync({tx:t});case 7:if(!(c=e.sent).code){e.next=10;break}return e.abrupt("return",Promise.reject(new Error("Broadcasting transaction failed with code ".concat(c.code," (codespace: ").concat(c.codeSpace,"). Log: ").concat(c.log))));case 10:return l=(0,h.toHex)(c.hash).toUpperCase(),e.abrupt("return",new Promise((function(e,t){return u(l).then((function(t){clearTimeout(s),e(t)}),(function(e){clearTimeout(s),t(e)}))})));case 12:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"txsQuery",value:function(){var e=a(o().mark((function e(t){var n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.forceGetTmClient().txSearchAll({query:t});case 2:return n=e.sent,e.abrupt("return",n.txs.map((function(e){return{height:e.height,hash:(0,h.toHex)(e.hash).toUpperCase(),code:e.result.code,rawLog:e.result.log||"",tx:e.tx,gasUsed:e.result.gasUsed,gasWanted:e.result.gasWanted}})));case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}],[{key:"connect",value:function(){var t=a(o().mark((function t(n){var r,i,a=arguments;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=a.length>1&&void 0!==a[1]?a[1]:{},t.next=3,g.Tendermint34Client.connect(n);case 3:return i=t.sent,t.abrupt("return",new e(i,r));case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}]),e}();t.StargateClient=k},function(e,t,n){"use strict";var r=n(9).default,i=n(10).default,o=n(30).default,a=n(31).default;Object.defineProperty(t,"__esModule",{value:!0}),t.Bundles=void 0;var s=function(e){o(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return i(n,[{key:"listBundles",value:function(e,t){var n="".concat(this.url,"/projects/").concat(e,"/bundles");return this.getList(n,null===t||void 0===t?void 0:t.limit,null===t||void 0===t?void 0:t.offset)}},{key:"addBundle",value:function(e,t){var n="".concat(this.url,"/projects/").concat(e,"/bundles");return this.post(n,t,this.defaultConfig())}},{key:"getBundle",value:function(e,t){var n="".concat(this.url,"/projects/").concat(e,"/bundles/").concat(t);return this.get(n,this.defaultConfig())}},{key:"deleteBundle",value:function(e,t){var n="".concat(this.url,"/projects/").concat(e,"/bundles/").concat(t);return this.delete(n,this.defaultConfig())}},{key:"editBundle",value:function(e,t,n){var r="".concat(this.url,"/projects/").concat(e,"/bundles/").concat(t);return this.patch(r,n,this.defaultConfig())}},{key:"listBundleFiles",value:function(e,t,n){var r="".concat(this.url,"/projects/").concat(e,"/bundles/").concat(t,"/files");return this.getList(r,null===n||void 0===n?void 0:n.limit,null===n||void 0===n?void 0:n.offset)}}]),n}(n(49).CrowdinApi);t.Bundles=s},function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r1&&void 0!==arguments[1]?arguments[1]:{},n="".concat(this.url,"/projects/").concat(e,"/strings/reviewed-builds");return this.post(n,t,this.defaultConfig())}},{key:"checkReviewedSourceFilesBuildStatus",value:function(e,t){var n="".concat(this.url,"/projects/").concat(e,"/strings/reviewed-builds/").concat(t);return this.get(n,this.defaultConfig())}},{key:"downloadReviewedSourceFiles",value:function(e,t){var n="".concat(this.url,"/projects/").concat(e,"/strings/reviewed-builds/").concat(t,"/download");return this.get(n,this.defaultConfig())}}]),n}(s.CrowdinApi);t.SourceFiles=u,function(e){!function(e){e[e.ZERO=0]="ZERO",e[e.ONE=1]="ONE",e[e.TWO=2]="TWO",e[e.THREE=3]="THREE"}(e.EscapeQuotes||(e.EscapeQuotes={}))}(t.SourceFilesModel||(t.SourceFilesModel={}))},function(e,t,n){"use strict";var r=n(9).default,i=n(10).default,o=n(30).default,a=n(31).default;Object.defineProperty(t,"__esModule",{value:!0}),t.SourceStringsModel=t.SourceStrings=void 0;var s=n(49),u=function(e){o(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return i(n,[{key:"listProjectStrings",value:function(e,t,n,r,i,o,a,u,c,l,f){var d="".concat(this.url,"/projects/").concat(e,"/strings");return(0,s.isOptionalNumber)(t,"1"in arguments)&&(t={fileId:t,limit:n,offset:r,filter:i,denormalizePlaceholders:o,labelIds:a,scope:u,croql:c,branchId:l,directoryId:f}),d=this.addQueryParam(d,"fileId",t.fileId),d=this.addQueryParam(d,"filter",t.filter),d=this.addQueryParam(d,"denormalizePlaceholders",t.denormalizePlaceholders),d=this.addQueryParam(d,"labelIds",t.labelIds),d=this.addQueryParam(d,"scope",t.scope),d=this.addQueryParam(d,"croql",t.croql),d=this.addQueryParam(d,"branchId",t.branchId),d=this.addQueryParam(d,"directoryId",t.directoryId),this.getList(d,t.limit,t.offset)}},{key:"addString",value:function(e,t){var n="".concat(this.url,"/projects/").concat(e,"/strings");return this.post(n,t,this.defaultConfig())}},{key:"getString",value:function(e,t){var n="".concat(this.url,"/projects/").concat(e,"/strings/").concat(t);return this.get(n,this.defaultConfig())}},{key:"deleteString",value:function(e,t){var n="".concat(this.url,"/projects/").concat(e,"/strings/").concat(t);return this.delete(n,this.defaultConfig())}},{key:"editString",value:function(e,t,n){var r="".concat(this.url,"/projects/").concat(e,"/strings/").concat(t);return this.patch(r,n,this.defaultConfig())}}]),n}(s.CrowdinApi);t.SourceStrings=u,function(e){!function(e){e[e.TEXT=0]="TEXT",e[e.ASSET=1]="ASSET",e[e.ICU=2]="ICU"}(e.Type||(e.Type={}))}(t.SourceStringsModel||(t.SourceStringsModel={}))},function(e,t,n){"use strict";var r=n(9).default,i=n(10).default,o=n(30).default,a=n(31).default;Object.defineProperty(t,"__esModule",{value:!0}),t.StringComments=void 0;var s=n(49),u=function(e){o(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return i(n,[{key:"listStringComments",value:function(e,t,n,r,i,o){var a="".concat(this.url,"/projects/").concat(e,"/comments");return(0,s.isOptionalNumber)(t,"1"in arguments)&&(t={stringId:t,type:n,targetLanguageId:r,issueStatus:o,issueType:i}),a=this.addQueryParam(a,"stringId",t.stringId),a=this.addQueryParam(a,"type",t.type),a=this.addQueryParam(a,"targetLanguageId",t.targetLanguageId),a=this.addQueryParam(a,"issueType",t.issueType),a=this.addQueryParam(a,"issueStatus",t.issueStatus),this.getList(a,t.limit,t.offset)}},{key:"addStringComment",value:function(e,t){var n="".concat(this.url,"/projects/").concat(e,"/comments");return this.post(n,t,this.defaultConfig())}},{key:"getStringComment",value:function(e,t){var n="".concat(this.url,"/projects/").concat(e,"/comments/").concat(t);return this.get(n,this.defaultConfig())}},{key:"deleteStringComment",value:function(e,t){var n="".concat(this.url,"/projects/").concat(e,"/comments/").concat(t);return this.delete(n,this.defaultConfig())}},{key:"editStringComment",value:function(e,t,n){var r="".concat(this.url,"/projects/").concat(e,"/comments/").concat(t);return this.patch(r,n,this.defaultConfig())}}]),n}(s.CrowdinApi);t.StringComments=u},function(e,t,n){"use strict";var r=n(9).default,i=n(10).default,o=n(30).default,a=n(31).default;Object.defineProperty(t,"__esModule",{value:!0}),t.StringTranslations=void 0;var s=n(49),u=function(e){o(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return i(n,[{key:"listTranslationApprovals",value:function(e,t,n,r,i,o,a){var u="".concat(this.url,"/projects/").concat(e,"/approvals");return(0,s.isOptionalNumber)(t,"1"in arguments)&&(t={stringId:t,languageId:n,translationId:r,limit:i,offset:o,fileId:a}),u=this.addQueryParam(u,"stringId",t.stringId),u=this.addQueryParam(u,"languageId",t.languageId),u=this.addQueryParam(u,"translationId",t.translationId),u=this.addQueryParam(u,"fileId",t.fileId),this.getList(u,t.limit,t.offset)}},{key:"addApproval",value:function(e,t){var n="".concat(this.url,"/projects/").concat(e,"/approvals");return this.post(n,t,this.defaultConfig())}},{key:"approvalInfo",value:function(e,t){var n="".concat(this.url,"/projects/").concat(e,"/approvals/").concat(t);return this.get(n,this.defaultConfig())}},{key:"removeApproval",value:function(e,t){var n="".concat(this.url,"/projects/").concat(e,"/approvals/").concat(t);return this.delete(n,this.defaultConfig())}},{key:"listLanguageTranslations",value:function(e,t,n,r,i,o,a,u,c){var l="".concat(this.url,"/projects/").concat(e,"/languages/").concat(t,"/translations");return(0,s.isOptionalString)(n,"2"in arguments)&&(n={stringIds:n,fileId:r,limit:i,offset:o,labelIds:a,denormalizePlaceholders:u,croql:c}),l=this.addQueryParam(l,"stringIds",n.stringIds),l=this.addQueryParam(l,"fileId",n.fileId),l=this.addQueryParam(l,"labelIds",n.labelIds),l=this.addQueryParam(l,"denormalizePlaceholders",n.denormalizePlaceholders),l=this.addQueryParam(l,"croql",n.croql),this.getList(l,n.limit,n.offset)}},{key:"listStringTranslations",value:function(e,t,n,r,i,o){(0,s.isOptionalNumber)(r,"3"in arguments)&&(r={limit:r,offset:i,denormalizePlaceholders:o});var a="".concat(this.url,"/projects/").concat(e,"/translations");return a=this.addQueryParam(a,"stringId",t),a=this.addQueryParam(a,"languageId",n),a=this.addQueryParam(a,"denormalizePlaceholders",r.denormalizePlaceholders),this.getList(a,r.limit,r.offset)}},{key:"addTranslation",value:function(e,t){var n="".concat(this.url,"/projects/").concat(e,"/translations");return this.post(n,t,this.defaultConfig())}},{key:"deleteAllTranslations",value:function(e,t,n){var r="".concat(this.url,"/projects/").concat(e,"/translations");return r=this.addQueryParam(r,"stringId",t),r=this.addQueryParam(r,"languageId",n),this.delete(r,this.defaultConfig())}},{key:"translationInfo",value:function(e,t){var n="".concat(this.url,"/projects/").concat(e,"/translations/").concat(t);return this.get(n,this.defaultConfig())}},{key:"restoreTranslation",value:function(e,t){var n="".concat(this.url,"/projects/").concat(e,"/translations/").concat(t,"/restore");return this.put(n,{},this.defaultConfig())}},{key:"deleteTranslation",value:function(e,t){var n="".concat(this.url,"/projects/").concat(e,"/translations/").concat(t);return this.delete(n,this.defaultConfig())}},{key:"listTranslationVotes",value:function(e,t,n,r,i,o){var a="".concat(this.url,"/projects/").concat(e,"/votes");return(0,s.isOptionalNumber)(t,"1"in arguments)&&(t={stringId:t,languageId:n,translationId:r,limit:i,offset:o}),a=this.addQueryParam(a,"stringId",t.stringId),a=this.addQueryParam(a,"languageId",t.languageId),a=this.addQueryParam(a,"translationId",t.translationId),this.getList(a,t.limit,t.offset)}},{key:"addVote",value:function(e,t){var n="".concat(this.url,"/projects/").concat(e,"/votes");return this.post(n,t,this.defaultConfig())}},{key:"voteInfo",value:function(e,t){var n="".concat(this.url,"/projects/").concat(e,"/votes/").concat(t);return this.get(n,this.defaultConfig())}},{key:"cancelVote",value:function(e,t){var n="".concat(this.url,"/projects/").concat(e,"/votes/").concat(t);return this.delete(n,this.defaultConfig())}}]),n}(s.CrowdinApi);t.StringTranslations=u},function(e,t,n){"use strict";var r=n(9).default,i=n(10).default,o=n(30).default,a=n(31).default;Object.defineProperty(t,"__esModule",{value:!0}),t.TasksModel=t.Tasks=void 0;var s=n(49),u=function(e){o(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return i(n,[{key:"listTasks",value:function(e,t,n,r){(0,s.isOptionalNumber)(t,"1"in arguments)&&(t={limit:t,offset:n,status:r});var i="".concat(this.url,"/projects/").concat(e,"/tasks");return i=this.addQueryParam(i,"status",t.status),this.getList(i,t.limit,t.offset)}},{key:"addTask",value:function(e,t){var n="".concat(this.url,"/projects/").concat(e,"/tasks");return this.post(n,t,this.defaultConfig())}},{key:"exportTaskStrings",value:function(e,t){var n="".concat(this.url,"/projects/").concat(e,"/tasks/").concat(t,"/exports");return this.post(n,{},this.defaultConfig())}},{key:"getTask",value:function(e,t){var n="".concat(this.url,"/projects/").concat(e,"/tasks/").concat(t);return this.get(n,this.defaultConfig())}},{key:"deleteTask",value:function(e,t){var n="".concat(this.url,"/projects/").concat(e,"/tasks/").concat(t);return this.delete(n,this.defaultConfig())}},{key:"editTask",value:function(e,t,n){var r="".concat(this.url,"/projects/").concat(e,"/tasks/").concat(t);return this.patch(r,n,this.defaultConfig())}},{key:"listUserTasks",value:function(e,t,n,r){var i="".concat(this.url,"/user/tasks");return(0,s.isOptionalNumber)(e,"0"in arguments)&&(e={limit:e,offset:t,status:n,isArchived:r}),i=this.addQueryParam(i,"status",e.status),i=this.addQueryParam(i,"isArchived",e.isArchived),this.getList(i,e.limit,e.offset)}},{key:"editTaskArchivedStatus",value:function(e,t,n){var r="".concat(this.url,"/user/tasks/").concat(t);return r=this.addQueryParam(r,"projectId",e),this.patch(r,n,this.defaultConfig())}}]),n}(s.CrowdinApi);t.Tasks=u,function(e){!function(e){e[e.TRANSLATE=0]="TRANSLATE",e[e.PROOFREAD=1]="PROOFREAD",e[e.TRANSLATE_BY_VENDOR=2]="TRANSLATE_BY_VENDOR"}(e.Type||(e.Type={}))}(t.TasksModel||(t.TasksModel={}))},function(e,t,n){"use strict";var r=n(9).default,i=n(10).default,o=n(30).default,a=n(31).default;Object.defineProperty(t,"__esModule",{value:!0}),t.Teams=void 0;var s=n(49),u=function(e){o(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return i(n,[{key:"addTeamToProject",value:function(e,t){var n="".concat(this.url,"/projects/").concat(e,"/teams");return this.post(n,t,this.defaultConfig())}},{key:"listTeams",value:function(e,t){(0,s.isOptionalNumber)(e,"0"in arguments)&&(e={limit:e,offset:t});var n="".concat(this.url,"/teams");return this.getList(n,e.limit,e.offset)}},{key:"addTeam",value:function(e){var t="".concat(this.url,"/teams");return this.post(t,e,this.defaultConfig())}},{key:"getTeam",value:function(e){var t="".concat(this.url,"/teams/").concat(e);return this.get(t,this.defaultConfig())}},{key:"deleteTeam",value:function(e){var t="".concat(this.url,"/teams/").concat(e);return this.delete(t,this.defaultConfig())}},{key:"editTeam",value:function(e,t){var n="".concat(this.url,"/teams/").concat(e);return this.patch(n,t,this.defaultConfig())}},{key:"teamMembersList",value:function(e,t,n){(0,s.isOptionalNumber)(t,"1"in arguments)&&(t={limit:t,offset:n});var r="".concat(this.url,"/teams/").concat(e,"/members");return this.getList(r,t.limit,t.offset)}},{key:"addTeamMembers",value:function(e,t){var n="".concat(this.url,"/teams/").concat(e,"/members");return this.post(n,t,this.defaultConfig())}},{key:"deleteAllTeamMembers",value:function(e){var t="".concat(this.url,"/teams/").concat(e,"/members");return this.delete(t,this.defaultConfig())}},{key:"deleteTeamMember",value:function(e,t){var n="".concat(this.url,"/teams/").concat(e,"/members/").concat(t);return this.delete(n,this.defaultConfig())}}]),n}(s.CrowdinApi);t.Teams=u},function(e,t,n){"use strict";var r=n(9).default,i=n(10).default,o=n(30).default,a=n(31).default;Object.defineProperty(t,"__esModule",{value:!0}),t.TranslationMemory=void 0;var s=n(49),u=function(e){o(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return i(n,[{key:"listTm",value:function(e,t,n){(0,s.isOptionalNumber)(e,"0"in arguments)&&(e={groupId:e,limit:t,offset:n});var r="".concat(this.url,"/tms");return r=this.addQueryParam(r,"groupId",e.groupId),this.getList(r,e.limit,e.offset)}},{key:"addTm",value:function(e){var t="".concat(this.url,"/tms");return this.post(t,e,this.defaultConfig())}},{key:"getTm",value:function(e){var t="".concat(this.url,"/tms/").concat(e);return this.get(t,this.defaultConfig())}},{key:"deleteTm",value:function(e){var t="".concat(this.url,"/tms/").concat(e);return this.delete(t,this.defaultConfig())}},{key:"editTm",value:function(e,t){var n="".concat(this.url,"/tms/").concat(e);return this.patch(n,t,this.defaultConfig())}},{key:"clearTm",value:function(e){var t="".concat(this.url,"/tms/").concat(e,"/segments");return this.delete(t,this.defaultConfig())}},{key:"exportTm",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="".concat(this.url,"/tms/").concat(e,"/exports");return this.post(n,t,this.defaultConfig())}},{key:"checkExportStatus",value:function(e,t){var n="".concat(this.url,"/tms/").concat(e,"/exports/").concat(t);return this.get(n,this.defaultConfig())}},{key:"downloadTm",value:function(e,t){var n="".concat(this.url,"/tms/").concat(e,"/exports/").concat(t,"/download");return this.get(n,this.defaultConfig())}},{key:"importTm",value:function(e,t){var n="".concat(this.url,"/tms/").concat(e,"/imports");return this.post(n,t,this.defaultConfig())}},{key:"checkImportStatus",value:function(e,t){var n="".concat(this.url,"/tms/").concat(e,"/imports/").concat(t);return this.get(n,this.defaultConfig())}}]),n}(s.CrowdinApi);t.TranslationMemory=u},function(e,t,n){"use strict";var r=n(9).default,i=n(10).default,o=n(30).default,a=n(31).default;Object.defineProperty(t,"__esModule",{value:!0}),t.Translations=void 0;var s=n(49),u=function(e){o(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return i(n,[{key:"preTranslationStatus",value:function(e,t){var n="".concat(this.url,"/projects/").concat(e,"/pre-translations/").concat(t);return this.get(n,this.defaultConfig())}},{key:"applyPreTranslation",value:function(e,t){var n="".concat(this.url,"/projects/").concat(e,"/pre-translations");return this.post(n,t,this.defaultConfig())}},{key:"buildProjectDirectoryTranslation",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r="".concat(this.url,"/projects/").concat(e,"/translations/builds/directories/").concat(t),i=this.defaultConfig();return this.post(r,n,i)}},{key:"buildProjectFileTranslation",value:function(e,t,n,r){var i="".concat(this.url,"/projects/").concat(e,"/translations/builds/files/").concat(t),o=this.defaultConfig();return r&&(o.headers["If-None-Match"]=r),this.post(i,n,o)}},{key:"listProjectBuilds",value:function(e,t,n,r){(0,s.isOptionalNumber)(t,"1"in arguments)&&(t={branchId:t,limit:n,offset:r});var i="".concat(this.url,"/projects/").concat(e,"/translations/builds");return i=this.addQueryParam(i,"branchId",t.branchId),this.getList(i,t.limit,t.offset)}},{key:"buildProject",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="".concat(this.url,"/projects/").concat(e,"/translations/builds");return this.post(n,t,this.defaultConfig())}},{key:"uploadTranslation",value:function(e,t,n){var r="".concat(this.url,"/projects/").concat(e,"/translations/").concat(t);return this.post(r,n,this.defaultConfig())}},{key:"downloadTranslations",value:function(e,t){var n="".concat(this.url,"/projects/").concat(e,"/translations/builds/").concat(t,"/download");return this.get(n,this.defaultConfig())}},{key:"checkBuildStatus",value:function(e,t){var n="".concat(this.url,"/projects/").concat(e,"/translations/builds/").concat(t);return this.get(n,this.defaultConfig())}},{key:"cancelBuild",value:function(e,t){var n="".concat(this.url,"/projects/").concat(e,"/translations/builds/").concat(t);return this.delete(n,this.defaultConfig())}},{key:"exportProjectTranslation",value:function(e,t){var n="".concat(this.url,"/projects/").concat(e,"/translations/exports");return this.post(n,t,this.defaultConfig())}}]),n}(s.CrowdinApi);t.Translations=u},function(e,t,n){"use strict";var r=n(9).default,i=n(10).default,o=n(30).default,a=n(31).default;Object.defineProperty(t,"__esModule",{value:!0}),t.TranslationStatus=void 0;var s=n(49),u=function(e){o(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return i(n,[{key:"getBranchProgress",value:function(e,t,n,r){(0,s.isOptionalNumber)(n,"2"in arguments)&&(n={limit:n,offset:r});var i="".concat(this.url,"/projects/").concat(e,"/branches/").concat(t,"/languages/progress");return this.getList(i,n.limit,n.offset)}},{key:"getDirectoryProgress",value:function(e,t,n,r){(0,s.isOptionalNumber)(n,"2"in arguments)&&(n={limit:n,offset:r});var i="".concat(this.url,"/projects/").concat(e,"/directories/").concat(t,"/languages/progress");return this.getList(i,n.limit,n.offset)}},{key:"getFileProgress",value:function(e,t,n,r){(0,s.isOptionalNumber)(n,"2"in arguments)&&(n={limit:n,offset:r});var i="".concat(this.url,"/projects/").concat(e,"/files/").concat(t,"/languages/progress");return this.getList(i,n.limit,n.offset)}},{key:"getLanguageProgress",value:function(e,t,n,r){(0,s.isOptionalNumber)(n,"2"in arguments)&&(n={limit:n,offset:r});var i="".concat(this.url,"/projects/").concat(e,"/languages/").concat(t,"/progress");return this.getList(i,n.limit,n.offset)}},{key:"getProjectProgress",value:function(e,t,n,r){(0,s.isOptionalNumber)(t,"1"in arguments)&&(t={limit:t,offset:n,languageIds:r});var i="".concat(this.url,"/projects/").concat(e,"/languages/progress");return i=this.addQueryParam(i,"languageIds",t.languageIds),this.getList(i,t.limit,t.offset)}},{key:"listQaCheckIssues",value:function(e,t,n,r,i,o){var a="".concat(this.url,"/projects/").concat(e,"/qa-checks");return(0,s.isOptionalNumber)(t,"1"in arguments)&&(t={limit:t,offset:n,category:r,validation:i,languageIds:o}),a=this.addQueryParam(a,"category",t.category),a=this.addQueryParam(a,"validation",t.validation),a=this.addQueryParam(a,"languageIds",t.languageIds),this.getList(a,t.limit,t.offset)}}]),n}(s.CrowdinApi);t.TranslationStatus=u},function(e,t,n){"use strict";var r=n(9).default,i=n(10).default,o=n(30).default,a=n(31).default;Object.defineProperty(t,"__esModule",{value:!0}),t.UploadStorage=void 0;var s=n(49),u={"3dml":"text/vnd.in3d.3dml","3g2":"video/3gpp2","3gp":"video/3gpp","7z":"application/x-7z-compressed",aab:"application/x-authorware-bin",aac:"audio/x-aac",aam:"application/x-authorware-map",aas:"application/x-authorware-seg",abw:"application/x-abiword",ac:"application/pkix-attr-cert",acc:"application/vnd.americandynamics.acc",ace:"application/x-ace-compressed",acu:"application/vnd.acucobol",acutc:"application/vnd.acucorp",adp:"audio/adpcm",aep:"application/vnd.audiograph",afm:"application/x-font-type1",afp:"application/vnd.ibm.modcap",ahead:"application/vnd.ahead.space",ai:"application/postscript",aif:"audio/x-aiff",aifc:"audio/x-aiff",aiff:"audio/x-aiff",air:"application/vnd.adobe.air-application-installer-package+zip",ait:"application/vnd.dvb.ait",ami:"application/vnd.amiga.ami",apk:"application/vnd.android.package-archive",application:"application/x-ms-application",apr:"application/vnd.lotus-approach",asa:"text/plain",asax:"application/octet-stream",asc:"application/pgp-signature",ascx:"text/plain",asf:"video/x-ms-asf",ashx:"text/plain",asm:"text/x-asm",asmx:"text/plain",aso:"application/vnd.accpac.simply.aso",asp:"text/plain",aspx:"text/plain",asx:"video/x-ms-asf",atc:"application/vnd.acucorp",atom:"application/atom+xml",atomcat:"application/atomcat+xml",atomsvc:"application/atomsvc+xml",atx:"application/vnd.antix.game-component",au:"audio/basic",avi:"video/x-msvideo",aw:"application/applixware",axd:"text/plain",azf:"application/vnd.airzip.filesecure.azf",azs:"application/vnd.airzip.filesecure.azs",azw:"application/vnd.amazon.ebook",bat:"application/x-msdownload",bcpio:"application/x-bcpio",bdf:"application/x-font-bdf",bdm:"application/vnd.syncml.dm+wbxml",bed:"application/vnd.realvnc.bed",bh2:"application/vnd.fujitsu.oasysprs",bin:"application/octet-stream",bmi:"application/vnd.bmi",bmp:"image/bmp",book:"application/vnd.framemaker",box:"application/vnd.previewsystems.box",boz:"application/x-bzip2",bpk:"application/octet-stream",btif:"image/prs.btif",bz:"application/x-bzip",bz2:"application/x-bzip2",c:"text/x-c",c11amc:"application/vnd.cluetrust.cartomobile-config",c11amz:"application/vnd.cluetrust.cartomobile-config-pkg",c4d:"application/vnd.clonk.c4group",c4f:"application/vnd.clonk.c4group",c4g:"application/vnd.clonk.c4group",c4p:"application/vnd.clonk.c4group",c4u:"application/vnd.clonk.c4group",cab:"application/vnd.ms-cab-compressed",car:"application/vnd.curl.car",cat:"application/vnd.ms-pki.seccat",cc:"text/x-c",cct:"application/x-director",ccxml:"application/ccxml+xml",cdbcmsg:"application/vnd.contact.cmsg",cdf:"application/x-netcdf",cdkey:"application/vnd.mediastation.cdkey",cdmia:"application/cdmi-capability",cdmic:"application/cdmi-container",cdmid:"application/cdmi-domain",cdmio:"application/cdmi-object",cdmiq:"application/cdmi-queue",cdx:"chemical/x-cdx",cdxml:"application/vnd.chemdraw+xml",cdy:"application/vnd.cinderella",cer:"application/pkix-cert",cfc:"application/x-coldfusion",cfm:"application/x-coldfusion",cgm:"image/cgm",chat:"application/x-chat",chm:"application/vnd.ms-htmlhelp",chrt:"application/vnd.kde.kchart",cif:"chemical/x-cif",cii:"application/vnd.anser-web-certificate-issue-initiation",cil:"application/vnd.ms-artgalry",cla:"application/vnd.claymore",class:"application/java-vm",clkk:"application/vnd.crick.clicker.keyboard",clkp:"application/vnd.crick.clicker.palette",clkt:"application/vnd.crick.clicker.template",clkw:"application/vnd.crick.clicker.wordbank",clkx:"application/vnd.crick.clicker",clp:"application/x-msclip",cmc:"application/vnd.cosmocaller",cmdf:"chemical/x-cmdf",cml:"chemical/x-cml",cmp:"application/vnd.yellowriver-custom-menu",cmx:"image/x-cmx",cod:"application/vnd.rim.cod",com:"application/x-msdownload",conf:"text/plain",cpio:"application/x-cpio",cpp:"text/x-c",cpt:"application/mac-compactpro",crd:"application/x-mscardfile",crl:"application/pkix-crl",crt:"application/x-x509-ca-cert",cryptonote:"application/vnd.rig.cryptonote",cs:"text/plain",csh:"application/x-csh",csml:"chemical/x-csml",csp:"application/vnd.commonspace",css:"text/css",cst:"application/x-director",csv:"text/csv",cu:"application/cu-seeme",curl:"text/vnd.curl",cww:"application/prs.cww",cxt:"application/x-director",cxx:"text/x-c",dae:"model/vnd.collada+xml",daf:"application/vnd.mobius.daf",dataless:"application/vnd.fdsn.seed",davmount:"application/davmount+xml",dcr:"application/x-director",dcurl:"text/vnd.curl.dcurl",dd2:"application/vnd.oma.dd2+xml",ddd:"application/vnd.fujixerox.ddd",deb:"application/x-debian-package",def:"text/plain",deploy:"application/octet-stream",der:"application/x-x509-ca-cert",dfac:"application/vnd.dreamfactory",dic:"text/x-c",dir:"application/x-director",dis:"application/vnd.mobius.dis",dist:"application/octet-stream",distz:"application/octet-stream",djv:"image/vnd.djvu",djvu:"image/vnd.djvu",dll:"application/x-msdownload",dmg:"application/octet-stream",dms:"application/octet-stream",dna:"application/vnd.dna",doc:"application/msword",docm:"application/vnd.ms-word.document.macroenabled.12",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",dot:"application/msword",dotm:"application/vnd.ms-word.template.macroenabled.12",dotx:"application/vnd.openxmlformats-officedocument.wordprocessingml.template",dp:"application/vnd.osgi.dp",dpg:"application/vnd.dpgraph",dra:"audio/vnd.dra",dsc:"text/prs.lines.tag",dssc:"application/dssc+der",dtb:"application/x-dtbook+xml",dtd:"application/xml-dtd",dts:"audio/vnd.dts",dtshd:"audio/vnd.dts.hd",dump:"application/octet-stream",dvi:"application/x-dvi",dwf:"model/vnd.dwf",dwg:"image/vnd.dwg",dxf:"image/vnd.dxf",dxp:"application/vnd.spotfire.dxp",dxr:"application/x-director",ecelp4800:"audio/vnd.nuera.ecelp4800",ecelp7470:"audio/vnd.nuera.ecelp7470",ecelp9600:"audio/vnd.nuera.ecelp9600",ecma:"application/ecmascript",edm:"application/vnd.novadigm.edm",edx:"application/vnd.novadigm.edx",efif:"application/vnd.picsel",ei6:"application/vnd.pg.osasli",elc:"application/octet-stream",eml:"message/rfc822",emma:"application/emma+xml",eol:"audio/vnd.digital-winds",eot:"application/vnd.ms-fontobject",eps:"application/postscript",epub:"application/epub+zip",es3:"application/vnd.eszigno3+xml",esf:"application/vnd.epson.esf",et3:"application/vnd.eszigno3+xml",etx:"text/x-setext",exe:"application/x-msdownload",exi:"application/exi",ext:"application/vnd.novadigm.ext",ez:"application/andrew-inset",ez2:"application/vnd.ezpix-album",ez3:"application/vnd.ezpix-package",f:"text/x-fortran",f4v:"video/x-f4v",f77:"text/x-fortran",f90:"text/x-fortran",fbs:"image/vnd.fastbidsheet",fcs:"application/vnd.isac.fcs",fdf:"application/vnd.fdf",fe_launch:"application/vnd.denovo.fcselayout-link",fg5:"application/vnd.fujitsu.oasysgp",fgd:"application/x-director",fh:"image/x-freehand",fh4:"image/x-freehand",fh5:"image/x-freehand",fh7:"image/x-freehand",fhc:"image/x-freehand",fig:"application/x-xfig",fli:"video/x-fli",flo:"application/vnd.micrografx.flo",flv:"video/x-flv",flw:"application/vnd.kde.kivio",flx:"text/vnd.fmi.flexstor",fly:"text/vnd.fly",fm:"application/vnd.framemaker",fnc:"application/vnd.frogans.fnc",for:"text/x-fortran",fpx:"image/vnd.fpx",frame:"application/vnd.framemaker",fsc:"application/vnd.fsc.weblaunch",fst:"image/vnd.fst",ftc:"application/vnd.fluxtime.clip",fti:"application/vnd.anser-web-funds-transfer-initiation",fvt:"video/vnd.fvt",fxp:"application/vnd.adobe.fxp",fxpl:"application/vnd.adobe.fxp",fzs:"application/vnd.fuzzysheet",g2w:"application/vnd.geoplan",g3:"image/g3fax",g3w:"application/vnd.geospace",gac:"application/vnd.groove-account",gdl:"model/vnd.gdl",geo:"application/vnd.dynageo",gex:"application/vnd.geometry-explorer",ggb:"application/vnd.geogebra.file",ggt:"application/vnd.geogebra.tool",ghf:"application/vnd.groove-help",gif:"image/gif",gim:"application/vnd.groove-identity-message",gmx:"application/vnd.gmx",gnumeric:"application/x-gnumeric",gph:"application/vnd.flographit",gqf:"application/vnd.grafeq",gqs:"application/vnd.grafeq",gram:"application/srgs",gre:"application/vnd.geometry-explorer",grv:"application/vnd.groove-injector",grxml:"application/srgs+xml",gsf:"application/x-font-ghostscript",gtar:"application/x-gtar",gtm:"application/vnd.groove-tool-message",gtw:"model/vnd.gtw",gv:"text/vnd.graphviz",gxt:"application/vnd.geonext",h:"text/x-c",h261:"video/h261",h263:"video/h263",h264:"video/h264",hal:"application/vnd.hal+xml",hbci:"application/vnd.hbci",hdf:"application/x-hdf",hh:"text/x-c",hlp:"application/winhlp",hpgl:"application/vnd.hp-hpgl",hpid:"application/vnd.hp-hpid",hps:"application/vnd.hp-hps",hqx:"application/mac-binhex40",hta:"application/octet-stream",htc:"text/html",htke:"application/vnd.kenameaapp",htm:"text/html",html:"text/html",hvd:"application/vnd.yamaha.hv-dic",hvp:"application/vnd.yamaha.hv-voice",hvs:"application/vnd.yamaha.hv-script",i2g:"application/vnd.intergeo",icc:"application/vnd.iccprofile",ice:"x-conference/x-cooltalk",icm:"application/vnd.iccprofile",ico:"image/x-icon",ics:"text/calendar",ief:"image/ief",ifb:"text/calendar",ifm:"application/vnd.shana.informed.formdata",iges:"model/iges",igl:"application/vnd.igloader",igm:"application/vnd.insors.igm",igs:"model/iges",igx:"application/vnd.micrografx.igx",iif:"application/vnd.shana.informed.interchange",imp:"application/vnd.accpac.simply.imp",ims:"application/vnd.ms-ims",in:"text/plain",ini:"text/plain",ipfix:"application/ipfix",ipk:"application/vnd.shana.informed.package",irm:"application/vnd.ibm.rights-management",irp:"application/vnd.irepository.package+xml",iso:"application/octet-stream",itp:"application/vnd.shana.informed.formtemplate",ivp:"application/vnd.immervision-ivp",ivu:"application/vnd.immervision-ivu",jad:"text/vnd.sun.j2me.app-descriptor",jam:"application/vnd.jam",jar:"application/java-archive",java:"text/x-java-source",jisp:"application/vnd.jisp",jlt:"application/vnd.hp-jlyt",jnlp:"application/x-java-jnlp-file",joda:"application/vnd.joost.joda-archive",jpe:"image/jpeg",jpeg:"image/jpeg",jpg:"image/jpeg",jpgm:"video/jpm",jpgv:"video/jpeg",jpm:"video/jpm",js:"text/javascript",json:"application/json",kar:"audio/midi",karbon:"application/vnd.kde.karbon",kfo:"application/vnd.kde.kformula",kia:"application/vnd.kidspiration",kml:"application/vnd.google-earth.kml+xml",kmz:"application/vnd.google-earth.kmz",kne:"application/vnd.kinar",knp:"application/vnd.kinar",kon:"application/vnd.kde.kontour",kpr:"application/vnd.kde.kpresenter",kpt:"application/vnd.kde.kpresenter",ksp:"application/vnd.kde.kspread",ktr:"application/vnd.kahootz",ktx:"image/ktx",ktz:"application/vnd.kahootz",kwd:"application/vnd.kde.kword",kwt:"application/vnd.kde.kword",lasxml:"application/vnd.las.las+xml",latex:"application/x-latex",lbd:"application/vnd.llamagraphics.life-balance.desktop",lbe:"application/vnd.llamagraphics.life-balance.exchange+xml",les:"application/vnd.hhe.lesson-player",lha:"application/octet-stream",link66:"application/vnd.route66.link66+xml",list:"text/plain",list3820:"application/vnd.ibm.modcap",listafp:"application/vnd.ibm.modcap",log:"text/plain",lostxml:"application/lost+xml",lrf:"application/octet-stream",lrm:"application/vnd.ms-lrm",ltf:"application/vnd.frogans.ltf",lvp:"audio/vnd.lucent.voice",lwp:"application/vnd.lotus-wordpro",lzh:"application/octet-stream",m13:"application/x-msmediaview",m14:"application/x-msmediaview",m1v:"video/mpeg",m21:"application/mp21",m2a:"audio/mpeg",m2v:"video/mpeg",m3a:"audio/mpeg",m3u:"audio/x-mpegurl",m3u8:"application/vnd.apple.mpegurl",m4a:"audio/mp4",m4u:"video/vnd.mpegurl",m4v:"video/mp4",ma:"application/mathematica",mads:"application/mads+xml",mag:"application/vnd.ecowin.chart",maker:"application/vnd.framemaker",man:"text/troff",mathml:"application/mathml+xml",mb:"application/mathematica",mbk:"application/vnd.mobius.mbk",mbox:"application/mbox",mc1:"application/vnd.medcalcdata",mcd:"application/vnd.mcd",mcurl:"text/vnd.curl.mcurl",mdb:"application/x-msaccess",mdi:"image/vnd.ms-modi",me:"text/troff",mesh:"model/mesh",meta4:"application/metalink4+xml",mets:"application/mets+xml",mfm:"application/vnd.mfmp",mgp:"application/vnd.osgeo.mapguide.package",mgz:"application/vnd.proteus.magazine",mid:"audio/midi",midi:"audio/midi",mif:"application/vnd.mif",mime:"message/rfc822",mj2:"video/mj2",mjp2:"video/mj2",mlp:"application/vnd.dolby.mlp",mmd:"application/vnd.chipnuts.karaoke-mmd",mmf:"application/vnd.smaf",mmr:"image/vnd.fujixerox.edmics-mmr",mny:"application/x-msmoney",mobi:"application/x-mobipocket-ebook",mods:"application/mods+xml",mov:"video/quicktime",movie:"video/x-sgi-movie",mp2:"audio/mpeg",mp21:"application/mp21",mp2a:"audio/mpeg",mp3:"audio/mpeg",mp4:"video/mp4",mp4a:"audio/mp4",mp4s:"application/mp4",mp4v:"video/mp4",mpc:"application/vnd.mophun.certificate",mpe:"video/mpeg",mpeg:"video/mpeg",mpg:"video/mpeg",mpg4:"video/mp4",mpga:"audio/mpeg",mpkg:"application/vnd.apple.installer+xml",mpm:"application/vnd.blueice.multipass",mpn:"application/vnd.mophun.application",mpp:"application/vnd.ms-project",mpt:"application/vnd.ms-project",mpy:"application/vnd.ibm.minipay",mqy:"application/vnd.mobius.mqy",mrc:"application/marc",mrcx:"application/marcxml+xml",ms:"text/troff",mscml:"application/mediaservercontrol+xml",mseed:"application/vnd.fdsn.mseed",mseq:"application/vnd.mseq",msf:"application/vnd.epson.msf",msh:"model/mesh",msi:"application/x-msdownload",msl:"application/vnd.mobius.msl",msty:"application/vnd.muvee.style",mts:"model/vnd.mts",mus:"application/vnd.musician",musicxml:"application/vnd.recordare.musicxml+xml",mvb:"application/x-msmediaview",mwf:"application/vnd.mfer",mxf:"application/mxf",mxl:"application/vnd.recordare.musicxml",mxml:"application/xv+xml",mxs:"application/vnd.triscape.mxs",mxu:"video/vnd.mpegurl","n-gage":"application/vnd.nokia.n-gage.symbian.install",n3:"text/n3",nb:"application/mathematica",nbp:"application/vnd.wolfram.player",nc:"application/x-netcdf",ncx:"application/x-dtbncx+xml",ngdat:"application/vnd.nokia.n-gage.data",nlu:"application/vnd.neurolanguage.nlu",nml:"application/vnd.enliven",nnd:"application/vnd.noblenet-directory",nns:"application/vnd.noblenet-sealer",nnw:"application/vnd.noblenet-web",npx:"image/vnd.net-fpx",nsf:"application/vnd.lotus-notes",oa2:"application/vnd.fujitsu.oasys2",oa3:"application/vnd.fujitsu.oasys3",oas:"application/vnd.fujitsu.oasys",obd:"application/x-msbinder",oda:"application/oda",odb:"application/vnd.oasis.opendocument.database",odc:"application/vnd.oasis.opendocument.chart",odf:"application/vnd.oasis.opendocument.formula",odft:"application/vnd.oasis.opendocument.formula-template",odg:"application/vnd.oasis.opendocument.graphics",odi:"application/vnd.oasis.opendocument.image",odm:"application/vnd.oasis.opendocument.text-master",odp:"application/vnd.oasis.opendocument.presentation",ods:"application/vnd.oasis.opendocument.spreadsheet",odt:"application/vnd.oasis.opendocument.text",oga:"audio/ogg",ogg:"audio/ogg",ogv:"video/ogg",ogx:"application/ogg",onepkg:"application/onenote",onetmp:"application/onenote",onetoc:"application/onenote",onetoc2:"application/onenote",opf:"application/oebps-package+xml",oprc:"application/vnd.palm",org:"application/vnd.lotus-organizer",osf:"application/vnd.yamaha.openscoreformat",osfpvg:"application/vnd.yamaha.openscoreformat.osfpvg+xml",otc:"application/vnd.oasis.opendocument.chart-template",otf:"application/x-font-otf",otg:"application/vnd.oasis.opendocument.graphics-template",oth:"application/vnd.oasis.opendocument.text-web",oti:"application/vnd.oasis.opendocument.image-template",otp:"application/vnd.oasis.opendocument.presentation-template",ots:"application/vnd.oasis.opendocument.spreadsheet-template",ott:"application/vnd.oasis.opendocument.text-template",oxt:"application/vnd.openofficeorg.extension",p:"text/x-pascal",p10:"application/pkcs10",p12:"application/x-pkcs12",p7b:"application/x-pkcs7-certificates",p7c:"application/pkcs7-mime",p7m:"application/pkcs7-mime",p7r:"application/x-pkcs7-certreqresp",p7s:"application/pkcs7-signature",p8:"application/pkcs8",pas:"text/x-pascal",paw:"application/vnd.pawaafile",pbd:"application/vnd.powerbuilder6",pbm:"image/x-portable-bitmap",pcf:"application/x-font-pcf",pcl:"application/vnd.hp-pcl",pclxl:"application/vnd.hp-pclxl",pct:"image/x-pict",pcurl:"application/vnd.curl.pcurl",pcx:"image/x-pcx",pdb:"application/vnd.palm",pdf:"application/pdf",pfa:"application/x-font-type1",pfb:"application/x-font-type1",pfm:"application/x-font-type1",pfr:"application/font-tdpfr",pfx:"application/x-pkcs12",pgm:"image/x-portable-graymap",pgn:"application/x-chess-pgn",pgp:"application/pgp-encrypted",php:"text/x-php",phps:"application/x-httpd-phps",pic:"image/x-pict",pkg:"application/octet-stream",pki:"application/pkixcmp",pkipath:"application/pkix-pkipath",plb:"application/vnd.3gpp.pic-bw-large",plc:"application/vnd.mobius.plc",plf:"application/vnd.pocketlearn",pls:"application/pls+xml",pml:"application/vnd.ctc-posml",png:"image/png",pnm:"image/x-portable-anymap",portpkg:"application/vnd.macports.portpkg",pot:"application/vnd.ms-powerpoint",potm:"application/vnd.ms-powerpoint.template.macroenabled.12",potx:"application/vnd.openxmlformats-officedocument.presentationml.template",ppam:"application/vnd.ms-powerpoint.addin.macroenabled.12",ppd:"application/vnd.cups-ppd",ppm:"image/x-portable-pixmap",pps:"application/vnd.ms-powerpoint",ppsm:"application/vnd.ms-powerpoint.slideshow.macroenabled.12",ppsx:"application/vnd.openxmlformats-officedocument.presentationml.slideshow",ppt:"application/vnd.ms-powerpoint",pptm:"application/vnd.ms-powerpoint.presentation.macroenabled.12",pptx:"application/vnd.openxmlformats-officedocument.presentationml.presentation",pqa:"application/vnd.palm",prc:"application/x-mobipocket-ebook",pre:"application/vnd.lotus-freelance",prf:"application/pics-rules",ps:"application/postscript",psb:"application/vnd.3gpp.pic-bw-small",psd:"image/vnd.adobe.photoshop",psf:"application/x-font-linux-psf",pskcxml:"application/pskc+xml",ptid:"application/vnd.pvi.ptid1",pub:"application/x-mspublisher",pvb:"application/vnd.3gpp.pic-bw-var",pwn:"application/vnd.3m.post-it-notes",pya:"audio/vnd.ms-playready.media.pya",pyv:"video/vnd.ms-playready.media.pyv",qam:"application/vnd.epson.quickanime",qbo:"application/vnd.intu.qbo",qfx:"application/vnd.intu.qfx",qps:"application/vnd.publishare-delta-tree",qt:"video/quicktime",qwd:"application/vnd.quark.quarkxpress",qwt:"application/vnd.quark.quarkxpress",qxb:"application/vnd.quark.quarkxpress",qxd:"application/vnd.quark.quarkxpress",qxl:"application/vnd.quark.quarkxpress",qxt:"application/vnd.quark.quarkxpress",ra:"audio/x-pn-realaudio",ram:"audio/x-pn-realaudio",rar:"application/x-rar-compressed",ras:"image/x-cmu-raster",rb:"text/plain",rcprofile:"application/vnd.ipunplugged.rcprofile",rdf:"application/rdf+xml",rdz:"application/vnd.data-vision.rdz",rep:"application/vnd.businessobjects",res:"application/x-dtbresource+xml",resx:"text/xml",rgb:"image/x-rgb",rif:"application/reginfo+xml",rip:"audio/vnd.rip",rl:"application/resource-lists+xml",rlc:"image/vnd.fujixerox.edmics-rlc",rld:"application/resource-lists-diff+xml",rm:"application/vnd.rn-realmedia",rmi:"audio/midi",rmp:"audio/x-pn-realaudio-plugin",rms:"application/vnd.jcp.javame.midlet-rms",rnc:"application/relax-ng-compact-syntax",roff:"text/troff",rp9:"application/vnd.cloanto.rp9",rpss:"application/vnd.nokia.radio-presets",rpst:"application/vnd.nokia.radio-preset",rq:"application/sparql-query",rs:"application/rls-services+xml",rsd:"application/rsd+xml",rss:"application/rss+xml",rtf:"application/rtf",rtx:"text/richtext",s:"text/x-asm",saf:"application/vnd.yamaha.smaf-audio",sbml:"application/sbml+xml",sc:"application/vnd.ibm.secure-container",scd:"application/x-msschedule",scm:"application/vnd.lotus-screencam",scq:"application/scvp-cv-request",scs:"application/scvp-cv-response",scurl:"text/vnd.curl.scurl",sda:"application/vnd.stardivision.draw",sdc:"application/vnd.stardivision.calc",sdd:"application/vnd.stardivision.impress",sdkd:"application/vnd.solent.sdkm+xml",sdkm:"application/vnd.solent.sdkm+xml",sdp:"application/sdp",sdw:"application/vnd.stardivision.writer",see:"application/vnd.seemail",seed:"application/vnd.fdsn.seed",sema:"application/vnd.sema",semd:"application/vnd.semd",semf:"application/vnd.semf",ser:"application/java-serialized-object",setpay:"application/set-payment-initiation",setreg:"application/set-registration-initiation","sfd-hdstx":"application/vnd.hydrostatix.sof-data",sfs:"application/vnd.spotfire.sfs",sgl:"application/vnd.stardivision.writer-global",sgm:"text/sgml",sgml:"text/sgml",sh:"application/x-sh",shar:"application/x-shar",shf:"application/shf+xml",sig:"application/pgp-signature",silo:"model/mesh",sis:"application/vnd.symbian.install",sisx:"application/vnd.symbian.install",sit:"application/x-stuffit",sitx:"application/x-stuffitx",skd:"application/vnd.koan",skm:"application/vnd.koan",skp:"application/vnd.koan",skt:"application/vnd.koan",sldm:"application/vnd.ms-powerpoint.slide.macroenabled.12",sldx:"application/vnd.openxmlformats-officedocument.presentationml.slide",slt:"application/vnd.epson.salt",sm:"application/vnd.stepmania.stepchart",smf:"application/vnd.stardivision.math",smi:"application/smil+xml",smil:"application/smil+xml",snd:"audio/basic",snf:"application/x-font-snf",so:"application/octet-stream",spc:"application/x-pkcs7-certificates",spf:"application/vnd.yamaha.smaf-phrase",spl:"application/x-futuresplash",spot:"text/vnd.in3d.spot",spp:"application/scvp-vp-response",spq:"application/scvp-vp-request",spx:"audio/ogg",src:"application/x-wais-source",srt:"application/octet-stream",sru:"application/sru+xml",srx:"application/sparql-results+xml",sse:"application/vnd.kodak-descriptor",ssf:"application/vnd.epson.ssf",ssml:"application/ssml+xml",st:"application/vnd.sailingtracker.track",stc:"application/vnd.sun.xml.calc.template",std:"application/vnd.sun.xml.draw.template",stf:"application/vnd.wt.stf",sti:"application/vnd.sun.xml.impress.template",stk:"application/hyperstudio",stl:"application/vnd.ms-pki.stl",str:"application/vnd.pg.format",stw:"application/vnd.sun.xml.writer.template",sub:"image/vnd.dvb.subtitle",sus:"application/vnd.sus-calendar",susp:"application/vnd.sus-calendar",sv4cpio:"application/x-sv4cpio",sv4crc:"application/x-sv4crc",svc:"application/vnd.dvb.service",svd:"application/vnd.svd",svg:"image/svg+xml",svgz:"image/svg+xml",swa:"application/x-director",swf:"application/x-shockwave-flash",swi:"application/vnd.aristanetworks.swi",sxc:"application/vnd.sun.xml.calc",sxd:"application/vnd.sun.xml.draw",sxg:"application/vnd.sun.xml.writer.global",sxi:"application/vnd.sun.xml.impress",sxm:"application/vnd.sun.xml.math",sxw:"application/vnd.sun.xml.writer",t:"text/troff",tao:"application/vnd.tao.intent-module-archive",tar:"application/x-tar",tcap:"application/vnd.3gpp2.tcap",tcl:"application/x-tcl",teacher:"application/vnd.smart.teacher",tei:"application/tei+xml",teicorpus:"application/tei+xml",tex:"application/x-tex",texi:"application/x-texinfo",texinfo:"application/x-texinfo",text:"text/plain",tfi:"application/thraud+xml",tfm:"application/x-tex-tfm",thmx:"application/vnd.ms-officetheme",tif:"image/tiff",tiff:"image/tiff",tmo:"application/vnd.tmobile-livetv",torrent:"application/x-bittorrent",tpl:"application/vnd.groove-tool-template",tpt:"application/vnd.trid.tpt",tr:"text/troff",tra:"application/vnd.trueapp",trm:"application/x-msterminal",tsd:"application/timestamped-data",tsv:"text/tab-separated-values",ttc:"application/x-font-ttf",ttf:"application/x-font-ttf",ttl:"text/turtle",twd:"application/vnd.simtech-mindmapper",twds:"application/vnd.simtech-mindmapper",txd:"application/vnd.genomatix.tuxedo",txf:"application/vnd.mobius.txf",txt:"text/plain",u32:"application/x-authorware-bin",udeb:"application/x-debian-package",ufd:"application/vnd.ufdl",ufdl:"application/vnd.ufdl",umj:"application/vnd.umajin",unityweb:"application/vnd.unity",uoml:"application/vnd.uoml+xml",uri:"text/uri-list",uris:"text/uri-list",urls:"text/uri-list",ustar:"application/x-ustar",utz:"application/vnd.uiq.theme",uu:"text/x-uuencode",uva:"audio/vnd.dece.audio",uvd:"application/vnd.dece.data",uvf:"application/vnd.dece.data",uvg:"image/vnd.dece.graphic",uvh:"video/vnd.dece.hd",uvi:"image/vnd.dece.graphic",uvm:"video/vnd.dece.mobile",uvp:"video/vnd.dece.pd",uvs:"video/vnd.dece.sd",uvt:"application/vnd.dece.ttml+xml",uvu:"video/vnd.uvvu.mp4",uvv:"video/vnd.dece.video",uvva:"audio/vnd.dece.audio",uvvd:"application/vnd.dece.data",uvvf:"application/vnd.dece.data",uvvg:"image/vnd.dece.graphic",uvvh:"video/vnd.dece.hd",uvvi:"image/vnd.dece.graphic",uvvm:"video/vnd.dece.mobile",uvvp:"video/vnd.dece.pd",uvvs:"video/vnd.dece.sd",uvvt:"application/vnd.dece.ttml+xml",uvvu:"video/vnd.uvvu.mp4",uvvv:"video/vnd.dece.video",uvvx:"application/vnd.dece.unspecified",uvx:"application/vnd.dece.unspecified",vcd:"application/x-cdlink",vcf:"text/x-vcard",vcg:"application/vnd.groove-vcard",vcs:"text/x-vcalendar",vcx:"application/vnd.vcx",vis:"application/vnd.visionary",viv:"video/vnd.vivo",vor:"application/vnd.stardivision.writer",vox:"application/x-authorware-bin",vrml:"model/vrml",vsd:"application/vnd.visio",vsf:"application/vnd.vsf",vss:"application/vnd.visio",vst:"application/vnd.visio",vsw:"application/vnd.visio",vtu:"model/vnd.vtu",vxml:"application/voicexml+xml",w3d:"application/x-director",wad:"application/x-doom",wav:"audio/x-wav",wax:"audio/x-ms-wax",wbmp:"image/vnd.wap.wbmp",wbs:"application/vnd.criticaltools.wbs+xml",wbxml:"application/vnd.wap.wbxml",wcm:"application/vnd.ms-works",wdb:"application/vnd.ms-works",weba:"audio/webm",webm:"video/webm",webp:"image/webp",wg:"application/vnd.pmi.widget",wgt:"application/widget",wks:"application/vnd.ms-works",wm:"video/x-ms-wm",wma:"audio/x-ms-wma",wmd:"application/x-ms-wmd",wmf:"application/x-msmetafile",wml:"text/vnd.wap.wml",wmlc:"application/vnd.wap.wmlc",wmls:"text/vnd.wap.wmlscript",wmlsc:"application/vnd.wap.wmlscriptc",wmv:"video/x-ms-wmv",wmx:"video/x-ms-wmx",wmz:"application/x-ms-wmz",woff:"application/x-font-woff",wpd:"application/vnd.wordperfect",wpl:"application/vnd.ms-wpl",wps:"application/vnd.ms-works",wqd:"application/vnd.wqd",wri:"application/x-mswrite",wrl:"model/vrml",wsdl:"application/wsdl+xml",wspolicy:"application/wspolicy+xml",wtb:"application/vnd.webturbo",wvx:"video/x-ms-wvx",x32:"application/x-authorware-bin",x3d:"application/vnd.hzn-3d-crossword",xap:"application/x-silverlight-app",xar:"application/vnd.xara",xbap:"application/x-ms-xbap",xbd:"application/vnd.fujixerox.docuworks.binder",xbm:"image/x-xbitmap",xdf:"application/xcap-diff+xml",xdm:"application/vnd.syncml.dm+xml",xdp:"application/vnd.adobe.xdp+xml",xdssc:"application/dssc+xml",xdw:"application/vnd.fujixerox.docuworks",xenc:"application/xenc+xml",xer:"application/patch-ops-error+xml",xfdf:"application/vnd.adobe.xfdf",xfdl:"application/vnd.xfdl",xht:"application/xhtml+xml",xhtml:"application/xhtml+xml",xhvml:"application/xv+xml",xif:"image/vnd.xiff",xla:"application/vnd.ms-excel",xlam:"application/vnd.ms-excel.addin.macroenabled.12",xlc:"application/vnd.ms-excel",xlm:"application/vnd.ms-excel",xls:"application/vnd.ms-excel",xlsb:"application/vnd.ms-excel.sheet.binary.macroenabled.12",xlsm:"application/vnd.ms-excel.sheet.macroenabled.12",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xlt:"application/vnd.ms-excel",xltm:"application/vnd.ms-excel.template.macroenabled.12",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template",xlw:"application/vnd.ms-excel",xml:"application/xml",xo:"application/vnd.olpc-sugar",xop:"application/xop+xml",xpi:"application/x-xpinstall",xpm:"image/x-xpixmap",xpr:"application/vnd.is-xpr",xps:"application/vnd.ms-xpsdocument",xpw:"application/vnd.intercon.formnet",xpx:"application/vnd.intercon.formnet",xsl:"application/xml",xslt:"application/xslt+xml",xsm:"application/vnd.syncml+xml",xspf:"application/xspf+xml",xul:"application/vnd.mozilla.xul+xml",xvm:"application/xv+xml",xvml:"application/xv+xml",xwd:"image/x-xwindowdump",xyz:"chemical/x-xyz",yaml:"text/yaml",yang:"application/yang",yin:"application/yin+xml",yml:"text/yaml",zaz:"application/vnd.zzazz.deck+xml",zip:"application/zip",zir:"application/vnd.zul",zirz:"application/vnd.zul",zmm:"application/vnd.handheld-entertainment+xml",tmx:"application/x-tmx",tbx:"application/x-tbx"},c=function(e){o(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return i(n,[{key:"listStorages",value:function(e,t){(0,s.isOptionalNumber)(e,"0"in arguments)&&(e={limit:e,offset:t});var n="".concat(this.url,"/storages");return this.getList(n,e.limit,e.offset)}},{key:"addStorage",value:function(e,t,n){var r="".concat(this.url,"/storages"),i=this.defaultConfig();if(i.headers["Crowdin-API-FileName"]=e,n)i.headers["Content-Type"]=n;else{var o,a=e.split(".");if(a.length>1){var s=a[a.length-1];o=u[s]}i.headers["Content-Type"]=null!==o&&void 0!==o?o:"application/octet-stream"}return this.post(r,t,i)}},{key:"getStorage",value:function(e){var t="".concat(this.url,"/storages/").concat(e);return this.get(t,this.defaultConfig())}},{key:"deleteStorage",value:function(e){var t="".concat(this.url,"/storages/").concat(e);return this.delete(t,this.defaultConfig())}}]),n}(s.CrowdinApi);t.UploadStorage=c},function(e,t,n){"use strict";var r=n(9).default,i=n(10).default,o=n(30).default,a=n(31).default;Object.defineProperty(t,"__esModule",{value:!0}),t.Users=void 0;var s=n(49),u=function(e){o(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return i(n,[{key:"listProjectMembers",value:function(e,t,n,r,i,o){var a="".concat(this.url,"/projects/").concat(e,"/members");return(0,s.isOptionalString)(t,"1"in arguments)&&(t={search:t,role:n,languageId:r,limit:i,offset:o}),a=this.addQueryParam(a,"search",t.search),a=this.addQueryParam(a,"role",t.role),a=this.addQueryParam(a,"languageId",t.languageId),this.getList(a,t.limit,t.offset)}},{key:"addProjectMember",value:function(e,t){var n="".concat(this.url,"/projects/").concat(e,"/members");return this.post(n,t,this.defaultConfig())}},{key:"getProjectMemberPermissions",value:function(e,t){var n="".concat(this.url,"/projects/").concat(e,"/members/").concat(t);return this.get(n,this.defaultConfig())}},{key:"replaceProjectMemberPermissions",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r="".concat(this.url,"/projects/").concat(e,"/members/").concat(t);return this.put(r,n,this.defaultConfig())}},{key:"deleteMemberFromProject",value:function(e,t){var n="".concat(this.url,"/projects/").concat(e,"/members/").concat(t);return this.delete(n,this.defaultConfig())}},{key:"listUsers",value:function(e,t,n,r,i){var o="".concat(this.url,"/users");return(0,s.isOptionalString)(e,"0"in arguments)&&(e={status:e,search:t,twoFactor:n,limit:r,offset:i}),o=this.addQueryParam(o,"status",e.status),o=this.addQueryParam(o,"search",e.search),o=this.addQueryParam(o,"twoFactor",e.twoFactor),this.getList(o,e.limit,e.offset)}},{key:"inviteUser",value:function(e){var t="".concat(this.url,"/users");return this.post(t,e,this.defaultConfig())}},{key:"getUserInfo",value:function(e){var t="".concat(this.url,"/users/").concat(e);return this.get(t,this.defaultConfig())}},{key:"deleteUser",value:function(e){var t="".concat(this.url,"/users/").concat(e);return this.delete(t,this.defaultConfig())}},{key:"editUser",value:function(e,t){var n="".concat(this.url,"/users/").concat(e);return this.patch(n,t,this.defaultConfig())}},{key:"getAuthenticatedUser",value:function(){var e="".concat(this.url,"/user");return this.get(e,this.defaultConfig())}}]),n}(s.CrowdinApi);t.Users=u},function(e,t,n){"use strict";var r=n(9).default,i=n(10).default,o=n(30).default,a=n(31).default;Object.defineProperty(t,"__esModule",{value:!0}),t.Vendors=void 0;var s=n(49),u=function(e){o(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return i(n,[{key:"listVendors",value:function(e,t){(0,s.isOptionalNumber)(e,"0"in arguments)&&(e={limit:e,offset:t});var n="".concat(this.url,"/vendors");return this.getList(n,e.limit,e.offset)}}]),n}(s.CrowdinApi);t.Vendors=u},function(e,t,n){"use strict";var r=n(9).default,i=n(10).default,o=n(30).default,a=n(31).default;Object.defineProperty(t,"__esModule",{value:!0}),t.Webhooks=void 0;var s=n(49),u=function(e){o(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return i(n,[{key:"listWebhooks",value:function(e,t,n){(0,s.isOptionalNumber)(t,"1"in arguments)&&(t={limit:t,offset:n});var r="".concat(this.url,"/projects/").concat(e,"/webhooks");return this.getList(r,t.limit,t.offset)}},{key:"addWebhook",value:function(e,t){var n="".concat(this.url,"/projects/").concat(e,"/webhooks");return this.post(n,t,this.defaultConfig())}},{key:"getWebhook",value:function(e,t){var n="".concat(this.url,"/projects/").concat(e,"/webhooks/").concat(t);return this.get(n,this.defaultConfig())}},{key:"deleteWebhook",value:function(e,t){var n="".concat(this.url,"/projects/").concat(e,"/webhooks/").concat(t);return this.delete(n,this.defaultConfig())}},{key:"editWebhook",value:function(e,t,n){var r="".concat(this.url,"/projects/").concat(e,"/webhooks/").concat(t);return this.patch(r,n,this.defaultConfig())}}]),n}(s.CrowdinApi);t.Webhooks=u},function(e,t,n){"use strict";var r=n(9).default,i=n(10).default,o=n(30).default,a=n(31).default;Object.defineProperty(t,"__esModule",{value:!0}),t.Workflows=void 0;var s=n(49),u=function(e){o(n,e);var t=a(n);function n(){return r(this,n),t.apply(this,arguments)}return i(n,[{key:"listWorkflowSteps",value:function(e,t,n){(0,s.isOptionalNumber)(t,"1"in arguments)&&(t={limit:t,offset:n});var r="".concat(this.url,"/projects/").concat(e,"/workflow-steps");return this.getList(r,t.limit,t.offset)}},{key:"getWorkflowStep",value:function(e,t){var n="".concat(this.url,"/projects/").concat(e,"/workflow-steps/").concat(t);return this.get(n,this.defaultConfig())}},{key:"listWorkflowTemplates",value:function(e,t,n){var r="".concat(this.url,"/workflow-templates");return(0,s.isOptionalNumber)(e,"0"in arguments)&&(e={groupId:e,limit:t,offset:n}),r=this.addQueryParam(r,"groupId",e.groupId),this.getList(r,e.limit,e.offset)}},{key:"getWorkflowTemplateInfo",value:function(e){var t="".concat(this.url,"/workflow-templates/").concat(e);return this.get(t,this.defaultConfig())}}]),n}(s.CrowdinApi);t.Workflows=u},,function(e,t,n){var r=n(237),i=n(141);e.exports=function(e,t,n){var o=!0,a=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return i(n)&&(o="leading"in n?!!n.leading:o,a="trailing"in n?!!n.trailing:a),r(e,t,{leading:o,maxWait:t,trailing:a})}},function(e,t){e.exports=function(e,t,n,r){var i=n?n.call(r,e,t):void 0;if(void 0!==i)return!!i;if(e===t)return!0;if("object"!==typeof e||!e||"object"!==typeof t||!t)return!1;var o=Object.keys(e),a=Object.keys(t);if(o.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),u=0;uh)&&(U=(H=H.replace(" ",":")).length),0r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(v,"$1"+e.trim());case 58:return e.trim()+t.replace(v,"$1"+e.trim());default:if(0<1*n&&0u.charCodeAt(8))break;case 115:a=a.replace(u,"-webkit-"+u)+";"+a;break;case 207:case 102:a=a.replace(u,"-webkit-"+(102r.charCodeAt(0)&&(r=r.trim()),r=[r],0>8,a=255&i;o?n.push(o,a):n.push(a)}return n},n.zero2=r,n.toHex=i,n.encode=function(e,t){return"hex"===t?i(e):e}})),f=s((function(e,t){var n=t;n.assert=u,n.toArray=l.toArray,n.zero2=l.zero2,n.toHex=l.toHex,n.encode=l.encode,n.getNAF=function(e,t,n){var r=new Array(Math.max(e.bitLength(),n)+1);r.fill(0);for(var i=1<(i>>1)-1?(i>>1)-u:u,o.isubn(s)):s=0,r[a]=s,o.iushrn(1)}return r},n.getJSF=function(e,t){var n=[[],[]];e=e.clone(),t=t.clone();for(var r,i=0,o=0;e.cmpn(-i)>0||t.cmpn(-o)>0;){var a,s,u=e.andln(3)+i&3,c=t.andln(3)+o&3;3===u&&(u=-1),3===c&&(c=-1),a=0===(1&u)?0:3!==(r=e.andln(7)+i&7)&&5!==r||2!==c?u:-u,n[0].push(a),s=0===(1&c)?0:3!==(r=t.andln(7)+o&7)&&5!==r||2!==u?c:-c,n[1].push(s),2*i===a+1&&(i=1-i),2*o===s+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return n},n.cachedProperty=function(e,t,n){var r="_"+t;e.prototype[t]=function(){return void 0!==this[r]?this[r]:this[r]=n.call(this)}},n.parseBytes=function(e){return"string"===typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new i.a(e,"hex","le")}})),d=f.getNAF,h=f.getJSF,p=f.assert;function g(e,t){this.type=e,this.p=new i.a(t.p,16),this.red=t.prime?i.a.red(t.prime):i.a.mont(this.p),this.zero=new i.a(0).toRed(this.red),this.one=new i.a(1).toRed(this.red),this.two=new i.a(2).toRed(this.red),this.n=t.n&&new i.a(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var n=this.n&&this.p.div(this.n);!n||n.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var v=g;function m(e,t){this.curve=e,this.type=t,this.precomputed=null}g.prototype.point=function(){throw new Error("Not implemented")},g.prototype.validate=function(){throw new Error("Not implemented")},g.prototype._fixedNafMul=function(e,t){p(e.precomputed);var n=e._getDoubles(),r=d(t,1,this._bitLength),i=(1<=o;u--)a=(a<<1)+r[u];s.push(a)}for(var c=this.jpoint(null,null,null),l=this.jpoint(null,null,null),f=i;f>0;f--){for(o=0;o=0;s--){for(var u=0;s>=0&&0===o[s];s--)u++;if(s>=0&&u++,a=a.dblp(u),s<0)break;var c=o[s];p(0!==c),a="affine"===e.type?c>0?a.mixedAdd(i[c-1>>1]):a.mixedAdd(i[-c-1>>1].neg()):c>0?a.add(i[c-1>>1]):a.add(i[-c-1>>1].neg())}return"affine"===e.type?a.toP():a},g.prototype._wnafMulAdd=function(e,t,n,r,i){var o,a,s,u=this._wnafT1,c=this._wnafT2,l=this._wnafT3,f=0;for(o=0;o=1;o-=2){var g=o-1,v=o;if(1===u[g]&&1===u[v]){var m=[t[g],null,null,t[v]];0===t[g].y.cmp(t[v].y)?(m[1]=t[g].add(t[v]),m[2]=t[g].toJ().mixedAdd(t[v].neg())):0===t[g].y.cmp(t[v].y.redNeg())?(m[1]=t[g].toJ().mixedAdd(t[v]),m[2]=t[g].add(t[v].neg())):(m[1]=t[g].toJ().mixedAdd(t[v]),m[2]=t[g].toJ().mixedAdd(t[v].neg()));var A=[-3,-1,-5,-7,0,7,5,1,3],y=h(n[g],n[v]);for(f=Math.max(y[0].length,f),l[g]=new Array(f),l[v]=new Array(f),a=0;a=0;o--){for(var k=0;o>=0;){var I=!0;for(a=0;a=0&&k++,_=_.dblp(k),o<0)break;for(a=0;a0?s=c[a][C-1>>1]:C<0&&(s=c[a][-C-1>>1].neg()),_="affine"===s.type?_.mixedAdd(s):_.add(s))}}for(o=0;o=Math.ceil((e.bitLength()+1)/t.step)},m.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],r=this,i=0;i=0&&(a=t,s=n),r.negative&&(r=r.neg(),o=o.neg()),a.negative&&(a=a.neg(),s=s.neg()),[{a:r,b:o},{a:a,b:s}]},b.prototype._endoSplit=function(e){var t=this.endo.basis,n=t[0],r=t[1],i=r.b.mul(e).divRound(this.n),o=n.b.neg().mul(e).divRound(this.n),a=i.mul(n.a),s=o.mul(r.a),u=i.mul(n.b),c=o.mul(r.b);return{k1:e.sub(a).sub(s),k2:u.add(c).neg()}},b.prototype.pointFromX=function(e,t){(e=new i.a(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),r=n.redSqrt();if(0!==r.redSqr().redSub(n).cmp(this.zero))throw new Error("invalid point");var o=r.fromRed().isOdd();return(t&&!o||!t&&o)&&(r=r.redNeg()),this.point(e,r)},b.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,n=e.y,r=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(r).redIAdd(this.b);return 0===n.redSqr().redISub(i).cmpn(0)},b.prototype._endoWnafMulAdd=function(e,t,n){for(var r=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""},_.prototype.isInfinity=function(){return this.inf},_.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var n=t.redSqr().redISub(this.x).redISub(e.x),r=t.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,r)},_.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,n=this.x.redSqr(),r=e.redInvm(),i=n.redAdd(n).redIAdd(n).redIAdd(t).redMul(r),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},_.prototype.getX=function(){return this.x.fromRed()},_.prototype.getY=function(){return this.y.fromRed()},_.prototype.mul=function(e){return e=new i.a(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},_.prototype.mulAdd=function(e,t,n){var r=[this,t],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,i):this.curve._wnafMulAdd(1,r,i,2)},_.prototype.jmulAdd=function(e,t,n){var r=[this,t],i=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,i,!0):this.curve._wnafMulAdd(1,r,i,2,!0)},_.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},_.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,r=function(e){return e.neg()};t.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(r)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(r)}}}return t},_.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},A(E,v.BasePoint),b.prototype.jpoint=function(e,t,n){return new E(this,e,t,n)},E.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),n=this.x.redMul(t),r=this.y.redMul(t).redMul(e);return this.curve.point(n,r)},E.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},E.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),n=this.z.redSqr(),r=this.x.redMul(t),i=e.x.redMul(n),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(n.redMul(this.z)),s=r.redSub(i),u=o.redSub(a);if(0===s.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),l=c.redMul(s),f=r.redMul(c),d=u.redSqr().redIAdd(l).redISub(f).redISub(f),h=u.redMul(f.redISub(d)).redISub(o.redMul(l)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(d,h,p)},E.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),n=this.x,r=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),a=n.redSub(r),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),c=u.redMul(a),l=n.redMul(u),f=s.redSqr().redIAdd(c).redISub(l).redISub(l),d=s.redMul(l.redISub(f)).redISub(i.redMul(c)),h=this.z.redMul(a);return this.curve.jpoint(f,d,h)},E.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var n=this;for(t=0;t=0)return!1;if(n.redIAdd(i),0===this.x.cmp(n))return!0}},E.prototype.inspect=function(){return this.isInfinity()?"":""},E.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var k=s((function(e,t){var n=t;n.base=v,n.short=w,n.mont=null,n.edwards=null})),I=s((function(e,t){var n,r=t,i=f.assert;function o(e){"short"===e.type?this.curve=new k.short(e):"edwards"===e.type?this.curve=new k.edwards(e):this.curve=new k.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,i(this.g.validate(),"Invalid curve"),i(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function s(e,t){Object.defineProperty(r,e,{configurable:!0,enumerable:!0,get:function(){var n=new o(t);return Object.defineProperty(r,e,{configurable:!0,enumerable:!0,value:n}),n}})}r.PresetCurve=o,s("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:a.a.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),s("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:a.a.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),s("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:a.a.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),s("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:a.a.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),s("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:a.a.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),s("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.a.sha256,gRed:!1,g:["9"]}),s("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.a.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=null.crash()}catch(u){n=void 0}s("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:a.a.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})}));function C(e){if(!(this instanceof C))return new C(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=l.toArray(e.entropy,e.entropyEnc||"hex"),n=l.toArray(e.nonce,e.nonceEnc||"hex"),r=l.toArray(e.pers,e.persEnc||"hex");u(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,n,r)}var S=C;C.prototype._init=function(e,t,n){var r=e.concat(t).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1},C.prototype.generate=function(e,t,n,r){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!==typeof t&&(r=n,n=t,t=null),n&&(n=l.toArray(n,r||"hex"),this._update(n));for(var i=[];i.length"};var M=f.assert;function P(e,t){if(e instanceof P)return e;this._importDER(e,t)||(M(e.r&&e.s,"Signature without r or s"),this.r=new i.a(e.r,16),this.s=new i.a(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}var R=P;function N(){this.place=0}function T(e,t){var n=e[t.place++];if(!(128&n))return n;var r=15&n;if(0===r||r>4)return!1;for(var i=0,o=0,a=t.place;o>>=0;return!(i<=127)&&(t.place=a,i)}function Q(e){for(var t=0,n=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|n);--n;)e.push(t>>>(n<<3)&255);e.push(t)}}P.prototype._importDER=function(e,t){e=f.toArray(e,t);var n=new N;if(48!==e[n.place++])return!1;var r=T(e,n);if(!1===r)return!1;if(r+n.place!==e.length)return!1;if(2!==e[n.place++])return!1;var o=T(e,n);if(!1===o)return!1;var a=e.slice(n.place,o+n.place);if(n.place+=o,2!==e[n.place++])return!1;var s=T(e,n);if(!1===s)return!1;if(e.length!==s+n.place)return!1;var u=e.slice(n.place,s+n.place);if(0===a[0]){if(!(128&a[1]))return!1;a=a.slice(1)}if(0===u[0]){if(!(128&u[1]))return!1;u=u.slice(1)}return this.r=new i.a(a),this.s=new i.a(u),this.recoveryParam=null,!0},P.prototype.toDER=function(e){var t=this.r.toArray(),n=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&n[0]&&(n=[0].concat(n)),t=Q(t),n=Q(n);!n[0]&&!(128&n[1]);)n=n.slice(1);var r=[2];D(r,t.length),(r=r.concat(t)).push(2),D(r,n.length);var i=r.concat(n),o=[48];return D(o,i.length),o=o.concat(i),f.encode(o,e)};var j=function(){throw new Error("unsupported")},U=f.assert;function L(e){if(!(this instanceof L))return new L(e);"string"===typeof e&&(U(Object.prototype.hasOwnProperty.call(I,e),"Unknown curve "+e),e=I[e]),e instanceof I.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}var F=L;L.prototype.keyPair=function(e){return new O(this,e)},L.prototype.keyFromPrivate=function(e,t){return O.fromPrivate(this,e,t)},L.prototype.keyFromPublic=function(e,t){return O.fromPublic(this,e,t)},L.prototype.genKeyPair=function(e){e||(e={});for(var t=new S({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||j(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),r=this.n.sub(new i.a(2));;){var o=new i.a(t.generate(n));if(!(o.cmp(r)>0))return o.iaddn(1),this.keyFromPrivate(o)}},L.prototype._truncateToN=function(e,t){var n=8*e.byteLength()-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},L.prototype.sign=function(e,t,n,r){"object"===typeof n&&(r=n,n=null),r||(r={}),t=this.keyFromPrivate(t,n),e=this._truncateToN(new i.a(e,16));for(var o=this.n.byteLength(),a=t.getPrivate().toArray("be",o),s=e.toArray("be",o),u=new S({hash:this.hash,entropy:a,nonce:s,pers:r.pers,persEnc:r.persEnc||"utf8"}),c=this.n.sub(new i.a(1)),l=0;;l++){var f=r.k?r.k(l):new i.a(u.generate(this.n.byteLength()));if(!((f=this._truncateToN(f,!0)).cmpn(1)<=0||f.cmp(c)>=0)){var d=this.g.mul(f);if(!d.isInfinity()){var h=d.getX(),p=h.umod(this.n);if(0!==p.cmpn(0)){var g=f.invm(this.n).mul(p.mul(t.getPrivate()).iadd(e));if(0!==(g=g.umod(this.n)).cmpn(0)){var v=(d.getY().isOdd()?1:0)|(0!==h.cmp(p)?2:0);return r.canonical&&g.cmp(this.nh)>0&&(g=this.n.sub(g),v^=1),new R({r:p,s:g,recoveryParam:v})}}}}}},L.prototype.verify=function(e,t,n,r){e=this._truncateToN(new i.a(e,16)),n=this.keyFromPublic(n,r);var o=(t=new R(t,"hex")).r,a=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s,u=a.invm(this.n),c=u.mul(e).umod(this.n),l=u.mul(o).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(c,n.getPublic(),l)).isInfinity()&&s.eqXToP(o):!(s=this.g.mulAdd(c,n.getPublic(),l)).isInfinity()&&0===s.getX().umod(this.n).cmp(o)},L.prototype.recoverPubKey=function(e,t,n,r){U((3&n)===n,"The recovery param is more than two bits"),t=new R(t,r);var o=this.n,a=new i.a(e),s=t.r,u=t.s,c=1&n,l=n>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");s=l?this.curve.pointFromX(s.add(this.curve.n),c):this.curve.pointFromX(s,c);var f=t.r.invm(o),d=o.sub(a).mul(f).umod(o),h=u.mul(f).umod(o);return this.g.mulAdd(d,s,h)},L.prototype.getKeyRecoveryParam=function(e,t,n,r){if(null!==(t=new R(t,r)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(n))return i}throw new Error("Unable to find valid recovery factor")};var H=s((function(e,t){var n=t;n.version="6.5.4",n.utils=f,n.rand=function(){throw new Error("unsupported")},n.curve=k,n.curves=I,n.ec=F,n.eddsa=null})).ec}).call(this,n(20))},function(e,t,n){(function(e){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function o(e,t,n){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var a;"object"===typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:n(661).Buffer}catch(x){}function s(e,t){var n=e.charCodeAt(t);return n>=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:void r(!1,"Invalid character in "+e)}function u(e,t,n){var r=s(e,n);return n-1>=t&&(r|=s(e,n-1)<<4),r}function c(e,t,n,i){for(var o=0,a=0,s=Math.min(e.length,n),u=t;u=49?c-49+10:c>=17?c-17+10:c,r(c>=0&&a0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,n){if("number"===typeof e)return this._initNumber(e,t,n);if("object"===typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===n)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this._strip()},o.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r=t;r-=2)i=u(e,t,r)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(r=(e.length-t)%2===0?t+1:t;r=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var o=e.length-n,a=o%r,s=Math.min(o,o-a)+n,u=0,l=n;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(x){o.prototype.inspect=f}else o.prototype.inspect=f;function f(){return(this.red?""}var d=["","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"],h=[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],p=[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];o.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var i=0,o=0,a=0;a>>24-i&16777215,(i+=2)>=26&&(i-=26,a--),n=0!==o||a!==this.length-1?d[6-u.length]+u+n:u+n}for(0!==o&&(n=o.toString(16)+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var c=h[e],l=p[e];n="";var f=this.clone();for(f.negative=0;!f.isZero();){var g=f.modrn(l).toString(e);n=(f=f.idivn(l)).isZero()?g+n:d[c-g.length]+g+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},a&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(a,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function g(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,u=a/67108864|0;n.words[0]=s;for(var c=1;c>>26,f=67108863&u,d=Math.min(c,t.length-1),h=Math.max(0,c-e.length+1);h<=d;h++){var p=c-h|0;l+=(a=(i=0|e.words[p])*(o=0|t.words[h])+f)/67108864|0,f=67108863&a}n.words[c]=0|f,u=0|l}return 0!==u?n.words[c]=0|u:n.length--,n._strip()}o.prototype.toArrayLike=function(e,t,n){this._strip();var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0");var a=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](a,i),a},o.prototype._toArrayLikeLE=function(e,t){for(var n=0,r=0,i=0,o=0;i>8&255),n>16&255),6===o?(n>24&255),r=0,o=0):(r=a>>>24,o+=2)}if(n=0&&(e[n--]=a>>8&255),n>=0&&(e[n--]=a>>16&255),6===o?(n>=0&&(e[n--]=a>>24&255),r=0,o=0):(r=a>>>24,o+=2)}if(n>=0)for(e[n--]=r;n>=0;)e[n--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0===(8191&t)&&(n+=13,t>>>=13),0===(127&t)&&(n+=7,t>>>=7),0===(15&t)&&(n+=4,t>>>=4),0===(3&t)&&(n+=2,t>>>=2),0===(1&t)&&n++,n},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;ne.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;re.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){r("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-n),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){r("number"===typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(n=this,r=e):(n=e,r=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var o=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==o&&a>26,this.words[a]=67108863&t;if(0===o&&a>>13,h=0|a[1],p=8191&h,g=h>>>13,v=0|a[2],m=8191&v,A=v>>>13,y=0|a[3],b=8191&y,w=y>>>13,_=0|a[4],E=8191&_,k=_>>>13,I=0|a[5],C=8191&I,S=I>>>13,x=0|a[6],B=8191&x,O=x>>>13,M=0|a[7],P=8191&M,R=M>>>13,N=0|a[8],T=8191&N,Q=N>>>13,D=0|a[9],j=8191&D,U=D>>>13,L=0|s[0],F=8191&L,H=L>>>13,J=0|s[1],q=8191&J,G=J>>>13,z=0|s[2],V=8191&z,W=z>>>13,K=0|s[3],Y=8191&K,Z=K>>>13,X=0|s[4],$=8191&X,ee=X>>>13,te=0|s[5],ne=8191&te,re=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ue=8191&se,ce=se>>>13,le=0|s[8],fe=8191&le,de=le>>>13,he=0|s[9],pe=8191&he,ge=he>>>13;n.negative=e.negative^t.negative,n.length=19;var ve=(c+(r=Math.imul(f,F))|0)+((8191&(i=(i=Math.imul(f,H))+Math.imul(d,F)|0))<<13)|0;c=((o=Math.imul(d,H))+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(p,F),i=(i=Math.imul(p,H))+Math.imul(g,F)|0,o=Math.imul(g,H);var me=(c+(r=r+Math.imul(f,q)|0)|0)+((8191&(i=(i=i+Math.imul(f,G)|0)+Math.imul(d,q)|0))<<13)|0;c=((o=o+Math.imul(d,G)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(m,F),i=(i=Math.imul(m,H))+Math.imul(A,F)|0,o=Math.imul(A,H),r=r+Math.imul(p,q)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(g,q)|0,o=o+Math.imul(g,G)|0;var Ae=(c+(r=r+Math.imul(f,V)|0)|0)+((8191&(i=(i=i+Math.imul(f,W)|0)+Math.imul(d,V)|0))<<13)|0;c=((o=o+Math.imul(d,W)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(b,F),i=(i=Math.imul(b,H))+Math.imul(w,F)|0,o=Math.imul(w,H),r=r+Math.imul(m,q)|0,i=(i=i+Math.imul(m,G)|0)+Math.imul(A,q)|0,o=o+Math.imul(A,G)|0,r=r+Math.imul(p,V)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,W)|0;var ye=(c+(r=r+Math.imul(f,Y)|0)|0)+((8191&(i=(i=i+Math.imul(f,Z)|0)+Math.imul(d,Y)|0))<<13)|0;c=((o=o+Math.imul(d,Z)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(E,F),i=(i=Math.imul(E,H))+Math.imul(k,F)|0,o=Math.imul(k,H),r=r+Math.imul(b,q)|0,i=(i=i+Math.imul(b,G)|0)+Math.imul(w,q)|0,o=o+Math.imul(w,G)|0,r=r+Math.imul(m,V)|0,i=(i=i+Math.imul(m,W)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,W)|0,r=r+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(g,Y)|0,o=o+Math.imul(g,Z)|0;var be=(c+(r=r+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,ee)|0)+Math.imul(d,$)|0))<<13)|0;c=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(C,F),i=(i=Math.imul(C,H))+Math.imul(S,F)|0,o=Math.imul(S,H),r=r+Math.imul(E,q)|0,i=(i=i+Math.imul(E,G)|0)+Math.imul(k,q)|0,o=o+Math.imul(k,G)|0,r=r+Math.imul(b,V)|0,i=(i=i+Math.imul(b,W)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,W)|0,r=r+Math.imul(m,Y)|0,i=(i=i+Math.imul(m,Z)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,Z)|0,r=r+Math.imul(p,$)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(g,$)|0,o=o+Math.imul(g,ee)|0;var we=(c+(r=r+Math.imul(f,ne)|0)|0)+((8191&(i=(i=i+Math.imul(f,re)|0)+Math.imul(d,ne)|0))<<13)|0;c=((o=o+Math.imul(d,re)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(B,F),i=(i=Math.imul(B,H))+Math.imul(O,F)|0,o=Math.imul(O,H),r=r+Math.imul(C,q)|0,i=(i=i+Math.imul(C,G)|0)+Math.imul(S,q)|0,o=o+Math.imul(S,G)|0,r=r+Math.imul(E,V)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(k,V)|0,o=o+Math.imul(k,W)|0,r=r+Math.imul(b,Y)|0,i=(i=i+Math.imul(b,Z)|0)+Math.imul(w,Y)|0,o=o+Math.imul(w,Z)|0,r=r+Math.imul(m,$)|0,i=(i=i+Math.imul(m,ee)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,ee)|0,r=r+Math.imul(p,ne)|0,i=(i=i+Math.imul(p,re)|0)+Math.imul(g,ne)|0,o=o+Math.imul(g,re)|0;var _e=(c+(r=r+Math.imul(f,oe)|0)|0)+((8191&(i=(i=i+Math.imul(f,ae)|0)+Math.imul(d,oe)|0))<<13)|0;c=((o=o+Math.imul(d,ae)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(P,F),i=(i=Math.imul(P,H))+Math.imul(R,F)|0,o=Math.imul(R,H),r=r+Math.imul(B,q)|0,i=(i=i+Math.imul(B,G)|0)+Math.imul(O,q)|0,o=o+Math.imul(O,G)|0,r=r+Math.imul(C,V)|0,i=(i=i+Math.imul(C,W)|0)+Math.imul(S,V)|0,o=o+Math.imul(S,W)|0,r=r+Math.imul(E,Y)|0,i=(i=i+Math.imul(E,Z)|0)+Math.imul(k,Y)|0,o=o+Math.imul(k,Z)|0,r=r+Math.imul(b,$)|0,i=(i=i+Math.imul(b,ee)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,ee)|0,r=r+Math.imul(m,ne)|0,i=(i=i+Math.imul(m,re)|0)+Math.imul(A,ne)|0,o=o+Math.imul(A,re)|0,r=r+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(g,oe)|0,o=o+Math.imul(g,ae)|0;var Ee=(c+(r=r+Math.imul(f,ue)|0)|0)+((8191&(i=(i=i+Math.imul(f,ce)|0)+Math.imul(d,ue)|0))<<13)|0;c=((o=o+Math.imul(d,ce)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(T,F),i=(i=Math.imul(T,H))+Math.imul(Q,F)|0,o=Math.imul(Q,H),r=r+Math.imul(P,q)|0,i=(i=i+Math.imul(P,G)|0)+Math.imul(R,q)|0,o=o+Math.imul(R,G)|0,r=r+Math.imul(B,V)|0,i=(i=i+Math.imul(B,W)|0)+Math.imul(O,V)|0,o=o+Math.imul(O,W)|0,r=r+Math.imul(C,Y)|0,i=(i=i+Math.imul(C,Z)|0)+Math.imul(S,Y)|0,o=o+Math.imul(S,Z)|0,r=r+Math.imul(E,$)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,ee)|0,r=r+Math.imul(b,ne)|0,i=(i=i+Math.imul(b,re)|0)+Math.imul(w,ne)|0,o=o+Math.imul(w,re)|0,r=r+Math.imul(m,oe)|0,i=(i=i+Math.imul(m,ae)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,ae)|0,r=r+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(g,ue)|0,o=o+Math.imul(g,ce)|0;var ke=(c+(r=r+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,de)|0)+Math.imul(d,fe)|0))<<13)|0;c=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(j,F),i=(i=Math.imul(j,H))+Math.imul(U,F)|0,o=Math.imul(U,H),r=r+Math.imul(T,q)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(Q,q)|0,o=o+Math.imul(Q,G)|0,r=r+Math.imul(P,V)|0,i=(i=i+Math.imul(P,W)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,W)|0,r=r+Math.imul(B,Y)|0,i=(i=i+Math.imul(B,Z)|0)+Math.imul(O,Y)|0,o=o+Math.imul(O,Z)|0,r=r+Math.imul(C,$)|0,i=(i=i+Math.imul(C,ee)|0)+Math.imul(S,$)|0,o=o+Math.imul(S,ee)|0,r=r+Math.imul(E,ne)|0,i=(i=i+Math.imul(E,re)|0)+Math.imul(k,ne)|0,o=o+Math.imul(k,re)|0,r=r+Math.imul(b,oe)|0,i=(i=i+Math.imul(b,ae)|0)+Math.imul(w,oe)|0,o=o+Math.imul(w,ae)|0,r=r+Math.imul(m,ue)|0,i=(i=i+Math.imul(m,ce)|0)+Math.imul(A,ue)|0,o=o+Math.imul(A,ce)|0,r=r+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(g,fe)|0,o=o+Math.imul(g,de)|0;var Ie=(c+(r=r+Math.imul(f,pe)|0)|0)+((8191&(i=(i=i+Math.imul(f,ge)|0)+Math.imul(d,pe)|0))<<13)|0;c=((o=o+Math.imul(d,ge)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(j,q),i=(i=Math.imul(j,G))+Math.imul(U,q)|0,o=Math.imul(U,G),r=r+Math.imul(T,V)|0,i=(i=i+Math.imul(T,W)|0)+Math.imul(Q,V)|0,o=o+Math.imul(Q,W)|0,r=r+Math.imul(P,Y)|0,i=(i=i+Math.imul(P,Z)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,Z)|0,r=r+Math.imul(B,$)|0,i=(i=i+Math.imul(B,ee)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,ee)|0,r=r+Math.imul(C,ne)|0,i=(i=i+Math.imul(C,re)|0)+Math.imul(S,ne)|0,o=o+Math.imul(S,re)|0,r=r+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,ae)|0,r=r+Math.imul(b,ue)|0,i=(i=i+Math.imul(b,ce)|0)+Math.imul(w,ue)|0,o=o+Math.imul(w,ce)|0,r=r+Math.imul(m,fe)|0,i=(i=i+Math.imul(m,de)|0)+Math.imul(A,fe)|0,o=o+Math.imul(A,de)|0;var Ce=(c+(r=r+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,ge)|0)+Math.imul(g,pe)|0))<<13)|0;c=((o=o+Math.imul(g,ge)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(j,V),i=(i=Math.imul(j,W))+Math.imul(U,V)|0,o=Math.imul(U,W),r=r+Math.imul(T,Y)|0,i=(i=i+Math.imul(T,Z)|0)+Math.imul(Q,Y)|0,o=o+Math.imul(Q,Z)|0,r=r+Math.imul(P,$)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,ee)|0,r=r+Math.imul(B,ne)|0,i=(i=i+Math.imul(B,re)|0)+Math.imul(O,ne)|0,o=o+Math.imul(O,re)|0,r=r+Math.imul(C,oe)|0,i=(i=i+Math.imul(C,ae)|0)+Math.imul(S,oe)|0,o=o+Math.imul(S,ae)|0,r=r+Math.imul(E,ue)|0,i=(i=i+Math.imul(E,ce)|0)+Math.imul(k,ue)|0,o=o+Math.imul(k,ce)|0,r=r+Math.imul(b,fe)|0,i=(i=i+Math.imul(b,de)|0)+Math.imul(w,fe)|0,o=o+Math.imul(w,de)|0;var Se=(c+(r=r+Math.imul(m,pe)|0)|0)+((8191&(i=(i=i+Math.imul(m,ge)|0)+Math.imul(A,pe)|0))<<13)|0;c=((o=o+Math.imul(A,ge)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(j,Y),i=(i=Math.imul(j,Z))+Math.imul(U,Y)|0,o=Math.imul(U,Z),r=r+Math.imul(T,$)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(Q,$)|0,o=o+Math.imul(Q,ee)|0,r=r+Math.imul(P,ne)|0,i=(i=i+Math.imul(P,re)|0)+Math.imul(R,ne)|0,o=o+Math.imul(R,re)|0,r=r+Math.imul(B,oe)|0,i=(i=i+Math.imul(B,ae)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,ae)|0,r=r+Math.imul(C,ue)|0,i=(i=i+Math.imul(C,ce)|0)+Math.imul(S,ue)|0,o=o+Math.imul(S,ce)|0,r=r+Math.imul(E,fe)|0,i=(i=i+Math.imul(E,de)|0)+Math.imul(k,fe)|0,o=o+Math.imul(k,de)|0;var xe=(c+(r=r+Math.imul(b,pe)|0)|0)+((8191&(i=(i=i+Math.imul(b,ge)|0)+Math.imul(w,pe)|0))<<13)|0;c=((o=o+Math.imul(w,ge)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(j,$),i=(i=Math.imul(j,ee))+Math.imul(U,$)|0,o=Math.imul(U,ee),r=r+Math.imul(T,ne)|0,i=(i=i+Math.imul(T,re)|0)+Math.imul(Q,ne)|0,o=o+Math.imul(Q,re)|0,r=r+Math.imul(P,oe)|0,i=(i=i+Math.imul(P,ae)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,ae)|0,r=r+Math.imul(B,ue)|0,i=(i=i+Math.imul(B,ce)|0)+Math.imul(O,ue)|0,o=o+Math.imul(O,ce)|0,r=r+Math.imul(C,fe)|0,i=(i=i+Math.imul(C,de)|0)+Math.imul(S,fe)|0,o=o+Math.imul(S,de)|0;var Be=(c+(r=r+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,ge)|0)+Math.imul(k,pe)|0))<<13)|0;c=((o=o+Math.imul(k,ge)|0)+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,r=Math.imul(j,ne),i=(i=Math.imul(j,re))+Math.imul(U,ne)|0,o=Math.imul(U,re),r=r+Math.imul(T,oe)|0,i=(i=i+Math.imul(T,ae)|0)+Math.imul(Q,oe)|0,o=o+Math.imul(Q,ae)|0,r=r+Math.imul(P,ue)|0,i=(i=i+Math.imul(P,ce)|0)+Math.imul(R,ue)|0,o=o+Math.imul(R,ce)|0,r=r+Math.imul(B,fe)|0,i=(i=i+Math.imul(B,de)|0)+Math.imul(O,fe)|0,o=o+Math.imul(O,de)|0;var Oe=(c+(r=r+Math.imul(C,pe)|0)|0)+((8191&(i=(i=i+Math.imul(C,ge)|0)+Math.imul(S,pe)|0))<<13)|0;c=((o=o+Math.imul(S,ge)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(j,oe),i=(i=Math.imul(j,ae))+Math.imul(U,oe)|0,o=Math.imul(U,ae),r=r+Math.imul(T,ue)|0,i=(i=i+Math.imul(T,ce)|0)+Math.imul(Q,ue)|0,o=o+Math.imul(Q,ce)|0,r=r+Math.imul(P,fe)|0,i=(i=i+Math.imul(P,de)|0)+Math.imul(R,fe)|0,o=o+Math.imul(R,de)|0;var Me=(c+(r=r+Math.imul(B,pe)|0)|0)+((8191&(i=(i=i+Math.imul(B,ge)|0)+Math.imul(O,pe)|0))<<13)|0;c=((o=o+Math.imul(O,ge)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(j,ue),i=(i=Math.imul(j,ce))+Math.imul(U,ue)|0,o=Math.imul(U,ce),r=r+Math.imul(T,fe)|0,i=(i=i+Math.imul(T,de)|0)+Math.imul(Q,fe)|0,o=o+Math.imul(Q,de)|0;var Pe=(c+(r=r+Math.imul(P,pe)|0)|0)+((8191&(i=(i=i+Math.imul(P,ge)|0)+Math.imul(R,pe)|0))<<13)|0;c=((o=o+Math.imul(R,ge)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(j,fe),i=(i=Math.imul(j,de))+Math.imul(U,fe)|0,o=Math.imul(U,de);var Re=(c+(r=r+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,ge)|0)+Math.imul(Q,pe)|0))<<13)|0;c=((o=o+Math.imul(Q,ge)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Ne=(c+(r=Math.imul(j,pe))|0)+((8191&(i=(i=Math.imul(j,ge))+Math.imul(U,pe)|0))<<13)|0;return c=((o=Math.imul(U,ge))+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,u[0]=ve,u[1]=me,u[2]=Ae,u[3]=ye,u[4]=be,u[5]=we,u[6]=_e,u[7]=Ee,u[8]=ke,u[9]=Ie,u[10]=Ce,u[11]=Se,u[12]=xe,u[13]=Be,u[14]=Oe,u[15]=Me,u[16]=Pe,u[17]=Re,u[18]=Ne,0!==c&&(u[19]=c,n.length++),n};function m(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}n.words[o]=s,r=a,a=i}return 0!==r?n.words[o]=r:n.length--,n._strip()}function A(e,t,n){return m(e,t,n)}function y(e,t){this.x=e,this.y=t}Math.imul||(v=g),o.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?v(this,e,t):n<63?g(this,e,t):n<1024?m(this,e,t):A(this,e,t)},y.prototype.makeRBT=function(e){for(var t=new Array(e),n=o.prototype._countBits(e)-1,r=0;r>=1;return r},y.prototype.permute=function(e,t,n,r,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,n[2*a+1]=8191&o,o>>>=13;for(a=2*t;a>=26,n+=o/67108864|0,n+=a>>>26,this.words[i]=67108863&a}return 0!==n&&(this.words[i]=n,this.length++),t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n>>i&1}return t}(e);if(0===t.length)return new o(1);for(var n=this,r=0;r=0);var t,n=e%26,i=(e-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(t=0;t>>26-n}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==l||c>=i);c--){var f=0|this.words[c];this.words[c]=l<<26-o|f>>>o,l=f&s}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(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){r("number"===typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(r("number"===typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(u/67108864|0),this.words[i+n]=67108863&o}for(;i>26,this.words[i+n]=67108863&o;if(0===s)return this._strip();for(r(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),i=e,a=0|i.words[i.length-1];0!==(n=26-this._countBits(a))&&(i=i.ushln(n),r.iushln(n),a=0|i.words[i.length-1]);var s,u=r.length-i.length;if("mod"!==t){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c=0;f--){var d=67108864*(0|r.words[i.length+f])+(0|r.words[i.length+f-1]);for(d=Math.min(d/a|0,67108863),r._ishlnsubmul(i,d,f);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(i,1,f),r.isZero()||(r.negative^=1);s&&(s.words[f]=d)}return s&&s._strip(),r._strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:s||null,mod:r}},o.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),o=n.cmp(r);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=(1<<26)%e,i=0,o=this.length-1;o>=0;o--)i=(n*i+(0|this.words[o]))%e;return t?-i:i},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*n;this.words[i]=o/e|0,n=o%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++c;for(var l=n.clone(),f=t.clone();!t.isZero();){for(var d=0,h=1;0===(t.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(l),a.isub(f)),i.iushrn(1),a.iushrn(1);for(var p=0,g=1;0===(n.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(l),u.isub(f)),s.iushrn(1),u.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(s),a.isub(u)):(n.isub(t),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:n.iushln(c)}},o.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),s=new o(0),u=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,l=1;0===(t.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var f=0,d=1;0===(n.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(n.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(s)):(n.isub(t),s.isub(a))}return(i=0===t.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var o=t;t=n,n=o}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){r("number"===typeof e);var t=e%26,n=(e-t)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){ri&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new C(e)},o.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var b={k256:null,p224:null,p192:null,p25519:null};function w(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function k(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function I(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function C(e){if("string"===typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function S(e){C.call(this,e),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)}w.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},w.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},w.prototype.split=function(e,t){e.iushrn(this.n,0,t)},w.prototype.imulK=function(e){return e.imul(this.k)},i(_,w),_.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},_.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(b[e])return b[e];var t;if("k256"===e)t=new _;else if("p224"===e)t=new E;else if("p192"===e)t=new k;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new I}return b[e]=t,t},C.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},C.prototype._verify2=function(e,t){r(0===(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},C.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(l(e,e.umod(this.m)._forceRed(this)),e)},C.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},C.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},C.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},C.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},C.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},C.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},C.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},C.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},C.prototype.isqr=function(e){return this.imul(e,e.clone())},C.prototype.sqr=function(e){return this.mul(e,e)},C.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2===1),3===t){var n=this.m.add(new o(1)).iushrn(2);return this.pow(e,n)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);r(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,c).cmp(u);)l.redIAdd(u);for(var f=this.pow(l,i),d=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=a;0!==h.cmp(s);){for(var g=h,v=0;0!==g.cmp(s);v++)g=g.redSqr();r(v=0;r--){for(var c=t.words[r],l=u-1;l>=0;l--){var f=c>>l&1;i!==n[0]&&(i=this.sqr(i)),0!==f||0!==a?(a<<=1,a|=f,(4===++s||0===r&&0===l)&&(i=this.mul(i,n[a]),s=0,a=0)):s=0}u=26}return i},C.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},C.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new S(e)},i(S,C),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,n(77)(e))},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r="random/5.7.0"},,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";(function(e,r){n.d(t,"a",(function(){return Xe}));var i,o,a=n(1),s=n(4),u=n(6),c=n(7),l=n(66),f=n(16),d=(n(676),n(572)),h=n(230),p=n(228),g=n(566),v=n.n(g),m=n(12),A=n.n(m),y=n(297),b=n.n(y),w=n(300),_=n.n(w),E=n(567),k=n.n(E),I=n(101),C=n(41),S=n(159),x=n(114),B=n(568);function O(e,t){for(var n=0;n-1){var s=o.getAttribute("href");if(s)if(-1===s.toLowerCase().indexOf("https:")&&-1===s.toLowerCase().indexOf("http:")&&0!==s.indexOf("//")){var u=t.protocol+"//"+t.host;if(0===s.indexOf("/"))u+=s;else{var c=t.pathname.split("/");c.pop(),u+=c.join("/")+"/"+s}r.push(u)}else 0===s.indexOf("//")?r.push(t.protocol+s):r.push(s)}}return r}(),name:r}}})));var Y=function(e,t,n){this.name=e,this.version=t,this.os=n,this.type="browser"},Z=function(e){this.version=e,this.type="node",this.name="node",this.os=r.platform},X=function(e,t,n,r){this.name=e,this.version=t,this.os=n,this.bot=r,this.type="bot-device"},$=function(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null},ee=function(){this.type="react-native",this.name="react-native",this.version=null,this.os=null},te=/(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,ne=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FBAV\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],re=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function ie(){var e="undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product?new ee:"undefined"!=typeof navigator?function(e){var t=function(e){return""!==e&&ne.reduce((function(t,n){var r=n[0];if(t)return t;var i=n[1].exec(e);return!!i&&[r,i]}),!1)}(e);if(!t)return null;var n=t[0],r=t[1];if("searchbot"===n)return new $;var i=r[1]&&r[1].split(/[._]/).slice(0,3);i?i.length<3&&(i=function(){for(var e=0,t=0,n=arguments.length;t1)}var ae=K;function se(e){var t=e.href.split("?")[0];!function(e,t){var n,r="string"==typeof(n=t)?n:JSON.stringify(n),i=ae();i&&i.setItem("WALLETCONNECT_DEEPLINK_CHOICE",r)}(0,Object.assign(Object.assign({},e),{href:t}))}function ue(e){return Object(m.createElement)("svg",Object.assign({width:60,height:60,viewBox:"5 5 66 66",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Object(m.createElement)("g",{filter:"url(#prefix__filter0_d)"},Object(m.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M42.054 20.5c4.016 0 6.023 0 8.185.683a8.495 8.495 0 015.078 5.078c.683 2.161.683 4.17.683 8.185v12.108c0 4.016 0 6.023-.683 8.185a8.494 8.494 0 01-5.078 5.077c-2.162.684-4.169.684-8.185.684H29.946c-4.016 0-6.024 0-8.185-.684a8.494 8.494 0 01-5.078-5.077C16 52.577 16 50.57 16 46.554V34.446c0-4.016 0-6.024.683-8.185a8.495 8.495 0 015.078-5.078c2.161-.683 4.169-.683 8.185-.683h12.108z",fill:"#fff"}),Object(m.createElement)("mask",{id:"prefix__a",maskUnits:"userSpaceOnUse",x:16,y:20,width:40,height:41},Object(m.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M42.054 20.5c4.016 0 6.023 0 8.185.683a8.495 8.495 0 015.078 5.078c.683 2.161.683 4.17.683 8.185v12.108c0 4.016 0 6.023-.683 8.185a8.494 8.494 0 01-5.078 5.077c-2.162.684-4.169.684-8.185.684H29.946c-4.016 0-6.024 0-8.185-.684a8.494 8.494 0 01-5.078-5.077C16 52.577 16 50.57 16 46.554V34.446c0-4.016 0-6.024.683-8.185a8.495 8.495 0 015.078-5.078c2.161-.683 4.169-.683 8.185-.683h12.108z",fill:"#fff"})),Object(m.createElement)("g",{mask:"url(#prefix__a)",fillRule:"evenodd",clipRule:"evenodd"},Object(m.createElement)("path",{d:"M35.98 24.485l-14.042 8.01v16.023L35.98 56.53l14.043-8.012V32.496L35.98 24.485z",fill:"#FEFEFE"}),Object(m.createElement)("path",{d:"M35.98 24.485l-14.042 8.01v16.023L35.98 56.53l14.043-8.012V32.496L35.98 24.485zm-5.544 6.927h11.051l1.333 5.567H29.154l1.282-5.567zm3.184 9.517l-1.205-3.11h7.156l-1.18 3.11.343 3.474-2.754.012h-2.728l.368-3.486zm3.515 7.16v-1.103l2.474-2.344v-3.7l3.236-2.081 3.693 2.746-5.026 8.652H39.52l-2.385-2.17zm-11.711-6.482l3.704-2.721 3.274 2.056v3.7l2.474 2.344v1.103l-2.385 2.195h-2.018l-5.05-8.677z",fill:"#002D72"}),Object(m.createElement)("path",{d:"M41.512 50.259H39.52l-2.385-2.17v-1.103l2.474-2.345v-3.7l3.236-2.08 3.693 2.746-5.026 8.652zM35.98 24.485v6.927h5.507l1.333 5.567h-6.84v.84h3.591l-1.18 3.11.343 3.474-2.754.012V56.53l14.043-8.012V32.496L35.98 24.485z",fill:"url(#prefix__paint0_linear)",style:{mixBlendMode:"multiply"}}),Object(m.createElement)("path",{d:"M34.876 48.09l-2.385 2.194h-2.018l-5.05-8.677 3.705-2.721 3.274 2.056v3.7l2.474 2.344v1.103zm-1.624-3.675l.368-3.486-1.205-3.11h3.565v-.84h-6.826l1.282-5.567h5.544v-6.927l-14.042 8.01v16.023L35.98 56.53V44.415h-2.728z",fill:"url(#prefix__paint1_linear)",style:{mixBlendMode:"multiply"}}))),Object(m.createElement)("defs",null,Object(m.createElement)("linearGradient",{id:"prefix__paint0_linear",x1:48.526,y1:53.073,x2:48.526,y2:27.863,gradientUnits:"userSpaceOnUse"},Object(m.createElement)("stop",{stopColor:"#002D72"}),Object(m.createElement)("stop",{offset:1,stopColor:"#002D72",stopOpacity:.01})),Object(m.createElement)("linearGradient",{id:"prefix__paint1_linear",x1:34.483,y1:53.073,x2:34.483,y2:27.863,gradientUnits:"userSpaceOnUse"},Object(m.createElement)("stop",{stopColor:"#002D72",stopOpacity:.01}),Object(m.createElement)("stop",{offset:1,stopColor:"#002D72"})),Object(m.createElement)("filter",{id:"prefix__filter0_d",x:-4,y:.5,width:80,height:80,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},Object(m.createElement)("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),Object(m.createElement)("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),Object(m.createElement)("feOffset",null),Object(m.createElement)("feGaussianBlur",{stdDeviation:10}),Object(m.createElement)("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"}),Object(m.createElement)("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow"}),Object(m.createElement)("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"}))))}function ce(e){return Object(m.createElement)("svg",Object.assign({width:20,height:21,viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Object(m.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.586 2.167H2.361a.694.694 0 00-.694.694v6.606h1.389V3.556h5.53v-1.39zm2.828 1.389v-1.39h6.225c.384 0 .694.312.694.695v6.606h-1.388V3.556h-5.53zm0 13.889h5.53v-5.223h1.39v5.917c0 .383-.311.694-.695.694h-6.225v-1.388zm-8.358-5.223v5.223h5.53v1.388H2.361a.695.695 0 01-.694-.694v-5.917h1.389z",fill:"#0B1426"}),Object(m.createElement)("path",{fill:"#0B1426",d:"M5.833 9.667h8.333v1.667H5.833z"}))}function le(){return A.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"27",height:"32",fill:"none",viewBox:"0 0 27 32"},A.a.createElement("path",{fill:"#828FA1",fillRule:"evenodd",d:"M0 8.56v15.237l13.024 7.62 13.021-7.62V8.56L13.024.941 0 8.561zm1.146 14.57V9.23L13.024 2.28 24.903 9.23V23.13l-11.879 6.95-11.878-6.95z",clipRule:"evenodd"}),A.a.createElement("path",{fill:"#828FA1",fillRule:"evenodd",d:"M18.128 7.52H7.894l-1.186 5.287h12.653L18.128 7.52zM9.71 20.083V16.57l-3.032-1.953-3.43 2.584 4.676 8.24h1.868L12 23.357V22.31L9.71 20.083z",clipRule:"evenodd"}),A.a.createElement("path",{fill:"#828FA1",fillRule:"evenodd",d:"M16.348 13.604H9.72l1.116 2.954-.34 3.31h2.526l2.55-.012-.318-3.298 1.093-2.954z",clipRule:"evenodd"}),A.a.createElement("path",{fill:"#828FA1",fillRule:"evenodd",d:"M19.379 14.593l-2.996 1.977v3.513l-2.29 2.227v1.047l2.208 2.06h1.844l4.653-8.216-3.419-2.608z",clipRule:"evenodd"}))}function fe(){return A.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24"},A.a.createElement("path",{fill:"#1199FA",fillRule:"evenodd",d:"M12 1.75C6.34 1.75 1.75 6.34 1.75 12S6.34 22.25 12 22.25 22.25 17.66 22.25 12 17.66 1.75 12 1.75zM.25 12C.25 5.51 5.51.25 12 .25S23.75 5.51 23.75 12 18.49 23.75 12 23.75.25 18.49.25 12z",clipRule:"evenodd"}),A.a.createElement("path",{fill:"#1199FA",fillRule:"evenodd",d:"M12.434.607a.75.75 0 011.059-.073C16.748 3.37 18.75 7.474 18.75 12c0 4.622-1.998 8.732-5.268 11.475a.75.75 0 11-.964-1.15c2.93-2.457 4.732-6.147 4.732-10.325 0-4.073-1.799-7.77-4.743-10.334a.75.75 0 01-.072-1.059zM11.575.618a.75.75 0 01-.093 1.057C8.552 4.132 6.75 7.822 6.75 12c0 4.073 1.798 7.77 4.743 10.334a.75.75 0 01-.986 1.132C7.252 20.63 5.25 16.526 5.25 12c0-4.622 1.998-8.732 5.268-11.475a.75.75 0 011.057.093z",clipRule:"evenodd"}),A.a.createElement("path",{fill:"#1199FA",fillRule:"evenodd",d:"M12 .25a.75.75 0 01.75.75v22a.75.75 0 01-1.5 0V1A.75.75 0 0112 .25z",clipRule:"evenodd"}),A.a.createElement("path",{fill:"#1199FA",fillRule:"evenodd",d:"M1.25 8A.75.75 0 012 7.25h20a.75.75 0 010 1.5H2A.75.75 0 011.25 8zM1.25 16a.75.75 0 01.75-.75h20a.75.75 0 010 1.5H2a.75.75 0 01-.75-.75z",clipRule:"evenodd"}))}function de(){return A.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",fill:"none",viewBox:"0 0 22 22"},A.a.createElement("path",{stroke:"#1199FA",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M10.676 4.651l2.191-2.282c1.826-1.825 4.838-1.825 6.664 0 1.826 1.826 1.826 4.838 0 6.755l-4.2 4.2c-1.825 1.825-4.837 1.825-6.663 0-.274-.274-.822-1.005-1.095-1.37"}),A.a.createElement("path",{stroke:"#1199FA",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M10.676 4.651l2.191-2.282c1.826-1.825 4.838-1.825 6.664 0 1.826 1.826 1.826 4.838 0 6.755l-4.2 4.2c-1.825 1.825-4.837 1.825-6.663 0-.274-.274-.822-1.005-1.095-1.37"}),A.a.createElement("path",{stroke:"#1199FA",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M11.224 17.431l-2.191 2.282c-1.826 1.826-4.838 1.826-6.664 0-1.825-1.825-1.825-4.838 0-6.755l4.2-4.199c1.825-1.826 4.837-1.826 6.663 0 .274.274.822 1.004 1.096 1.37"}))}function he(){return A.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24"},A.a.createElement("path",{fill:"#1199FA",fillRule:"evenodd",d:"M5.778 10.023c-.548 0-1.028.466-1.028 1.068v9.09c0 .603.48 1.069 1.028 1.069h12.444c.548 0 1.028-.466 1.028-1.068V11.09c0-.602-.48-1.068-1.028-1.068H5.778zM3.25 11.09c0-1.398 1.12-2.568 2.528-2.568h12.444c1.408 0 2.528 1.17 2.528 2.568v9.09c0 1.399-1.12 2.569-2.528 2.569H5.778c-1.408 0-2.528-1.17-2.528-2.568V11.09zM12 2.75c-2.059 0-3.694 1.648-3.694 3.795a.75.75 0 11-1.5 0C6.806 3.602 9.08 1.25 12 1.25s5.195 2.352 5.195 5.295a.75.75 0 01-1.5 0c0-2.147-1.636-3.795-3.695-3.795z",clipRule:"evenodd"}),A.a.createElement("path",{fill:"#1199FA",fillRule:"evenodd",d:"M16.444 5.795a.75.75 0 01.75.75V8.91a.75.75 0 01-1.5 0V6.545a.75.75 0 01.75-.75zM7.556 5.795a.75.75 0 01.75.75v2.637a.75.75 0 11-1.5 0V6.545a.75.75 0 01.75-.75z",clipRule:"evenodd"}))}var pe={container:{display:"flex",flexDirection:"row",padding:"80px",background:"linear-gradient(180deg, #021E3F 0%, #002A67 95.76%)",borderRadius:"16px",maxWidth:"1100px",overflow:"hidden"},containerLeft:{display:"flex",flexDirection:"column",marginRight:"40px",flexShrink:1,minWidth:"450px"},header:{display:"flex",alignItems:"center",flexDirection:"row"},headerLogo:{},headerText:{color:"#828FA1",margin:"10px"},headerTextDivide:{backgroundColor:"#828FA1",width:"1px",height:"32px"},title:{color:"#FFFFFF",fontWeight:600,fontSize:"28px",marginTop:"24px",marginBottom:"16px",maxWidth:"500px"},feature:{display:"flex",alignItems:"center",flexDirection:"row",marginTop:"24px"},featureIcon:{},featureText:{marginLeft:"16px",color:"#FFFFFF",fontWeight:600,fontSize:"16px"},installButton:{marginTop:"40px",height:"48px",background:"#1199FA",borderRadius:"8px",padding:"0px 36px",border:"0px solid white",fontWeight:600,fontSize:"18px",color:"#FFFFFF",alignSelf:"flex-start",cursor:"pointer",zIndex:1001},containerRight:{flexShrink:0,display:"flex",flexDirection:"column",justifyContent:"stretch",alignItems:"center",backgroundColor:"#F7F9FA",width:"360px",height:"497px",borderRadius:"16px",overflow:"hidden"},rightQRcode:{flexGrow:0,marginTop:"48px",width:"160px",height:"160px",filter:"drop-shadow(0px 0px 8px rgba(0, 0, 0, 0.16))",borderRadius:"8px"},rightTitle:{fontWeight:600,fontSize:"22px",color:"#323C52",margin:"32px 0px 8px 0px"},stretchContainer:{display:"flex",flex:1,flexGrow:1},rightStep:{container:{display:"flex",flexDirection:"row",marginTop:"8px",alignSelf:"flex-start",marginLeft:"46px"},dot:{},desc:{fontSize:"16px",color:"#5D667B"},camera:{margin:"0px 8px"}},terms:{container:{display:"flex",flexDirection:"row",alignSelf:"stretch",justifyContent:"center",marginBottom:"16px"},text:{fontSize:"10px",color:"#5D667B"},link:{fontSize:"10px",color:"#4399F3",margin:"0px 4px",cursor:"pointer"}}},ge={container:{display:"flex",flexDirection:"row",justifyContent:"stretch",alignItems:"center",alignSelf:"stretch",backgroundColor:"white"},logoIcon:{width:"30px",height:"30px",padding:"5px",backgroundColor:"white",filter:"drop-shadow(0px 0px 8px rgba(0, 0, 0, 0.16))",borderRadius:"6px"},textContainer:{display:"flex",flexDirection:"column",alignItems:"flex-start",flex:1},title:{fontWeight:600,fontSize:"14px",lineHeight:"150%",color:"#323C52"},desc:{fontWeight:500,fontSize:"10px",lineHeight:"150%",color:"#7B849B"},button:{width:"75px",height:"34px",background:"#1199FA",border:"0px solid white",borderRadius:"4px",fontWeight:600,fontSize:"12px",color:"#FFFFFF",marginRight:"12px",cursor:"pointer",zIndex:1001}},ve={name:"Crypto.com DeFi Wallet",shortName:"DeFi Wallet",color:"rgb(17, 153, 250)",logo:"./logos/wallet-crypto-defi.png",universalLink:"https://wallet.crypto.com",deepLink:"cryptowallet:"},me=function(e,t){if(oe())window.open(e);else{var n=!1;window.addEventListener("blur",(function(){n=!0})),window.addEventListener("visibilitychange",(function(){document.hidden&&(n=!0)})),window.location.href=e,setTimeout((function(){n||window.open(t)}),1500)}},Ae={open:function(e,t,n){var r=function(e){return F(e,"CWE")}(e)+"&role=dapp";if(oe()){var i=function(e,t){var n=encodeURIComponent(e);return t.universalLink?"".concat(t.universalLink,"/wc?uri=").concat(n):t.deepLink?"".concat(t.deepLink).concat(t.deepLink.endsWith(":")?"//":"/","wc?uri=").concat(n):""}(r,ve);return se({name:"Crypto.com DeFi Wallet",href:i}),void me(i,"https://bit.ly/3Bk4wzE")}if(function(){var e=ie();return!!e&&e.toLowerCase().includes("android")}()){var o=F(r,"cwe")+"&role=dapp";return se({name:"Unknown",href:o}),void me(o,"https://bit.ly/3Bk4wzE")}var a=document.body,s=document.createElement("div");s.id="cryptoconnect-extension",a.appendChild(s),b.a.render(A.a.createElement(ye,{appElement:s,uri:r,closeCallback:t}),s)},close:function(){window.dispatchEvent(new Event("InstallExtensionQRCodeModal_Event_close"))}},ye=function(e){var t=e.appElement,n=e.uri,r=e.closeCallback,i=Object(m.useState)(!0),o=i[0],a=i[1],s=Object(m.useState)(""),u=s[0],c=s[1];_.a.setAppElement(t);var l=Object(m.useCallback)((function(){var e;null===(e=t.parentElement)||void 0===e||e.removeChild(t),a(!1)}),[t]),f=Object(m.useCallback)((function(){r(),l()}),[r,l]);Object(m.useEffect)((function(){return window.addEventListener("InstallExtensionQRCodeModal_Event_close",l),function(){window.removeEventListener("InstallExtensionQRCodeModal_Event_close",l)}}),[l]),Object(m.useMemo)((function(){k.a.toDataURL(n,(function(e,t){c(t)}))}),[n]);var d=Object(m.useCallback)((function(){window.open("https://wallet.crypto.com/api/v1/extension/install")}),[]),h=Object(m.useCallback)((function(){window.open("https://crypto.com/document/ncw_tnc")}),[]),p=Object(m.useCallback)((function(){window.open("https://crypto.com/privacy/ncw")}),[]),g=Object(m.useCallback)((function(){window.open("https://bit.ly/3Bk4wzE")}),[]);return A.a.createElement(_.a,{isOpen:o,shouldCloseOnOverlayClick:!0,shouldCloseOnEsc:!0,shouldFocusAfterRender:!0,shouldReturnFocusAfterClose:!0,style:{content:{background:"#00000000",border:"none",margin:"40px",display:"flex",position:"relative",padding:"0px"},overlay:{display:"flex",flexDirection:"column",alignItems:"center",background:"rgba(12, 12, 15, 0.7)",zIndex:1e3}},onRequestClose:f},A.a.createElement("div",{style:pe.container},A.a.createElement("div",{style:pe.containerLeft},A.a.createElement("div",{style:pe.header},A.a.createElement(le,null),A.a.createElement("div",{style:pe.headerText},"crypto.com"),A.a.createElement("div",{style:pe.headerTextDivide}),A.a.createElement("div",{style:pe.headerText},"WALLET EXTENSION")),A.a.createElement("div",{style:pe.title},"Access DApps on desktop by connecting DeFi Wallet to Wallet Extension"),A.a.createElement("div",{style:pe.feature},A.a.createElement(de,null),A.a.createElement("div",{style:pe.featureText},"Stable connection to DApps")),A.a.createElement("div",{style:pe.feature},A.a.createElement(he,null),A.a.createElement("div",{style:pe.featureText},"Secure signing via DeFi Wallet")),A.a.createElement("div",{style:pe.feature},A.a.createElement(fe,null),A.a.createElement("div",{style:pe.featureText},"Smooth App navigation with DApp connection")),A.a.createElement("button",{style:pe.installButton,onClick:d},"Install DeFi Wallet Extension")),A.a.createElement("div",{style:pe.containerRight},A.a.createElement("img",{style:pe.rightQRcode,src:u,alt:"qrcode"}),A.a.createElement("span",{style:pe.rightTitle},"Scan to Connect"),A.a.createElement("div",{style:pe.rightStep.container},A.a.createElement("div",{style:pe.rightStep.desc},"\u2022 Open DeFi Wallet Mobile App")),A.a.createElement("div",{style:pe.rightStep.container},A.a.createElement("div",{style:pe.rightStep.desc},"\u2022 Tap"),A.a.createElement(ce,{style:pe.rightStep.camera}),A.a.createElement("div",{style:pe.rightStep.desc},"to switch on the camera")),A.a.createElement("div",{style:pe.rightStep.container},A.a.createElement("div",{style:pe.rightStep.desc},"\u2022 Scan the QR code above")),A.a.createElement("div",{style:pe.stretchContainer}),A.a.createElement("div",{style:pe.terms.container},A.a.createElement("div",{style:pe.terms.text},"Crypto.com DeFi Wallet "),A.a.createElement("div",{style:pe.terms.link,onClick:h},"Terms & Conditions"),A.a.createElement("div",{style:pe.terms.text},"and"),A.a.createElement("div",{style:pe.terms.link,onClick:p},"Privacy Notice")),A.a.createElement(be,{onDownloadClick:g}))))},be=function(e){var t=e.onDownloadClick;return A.a.createElement("div",{style:ge.container},A.a.createElement(ue,null),A.a.createElement("div",{style:ge.textContainer},A.a.createElement("div",{style:ge.title},"Crypto.com DeFi Wallet"),A.a.createElement("div",{style:ge.desc},"Your Keys, Your Crypto.")),A.a.createElement("button",{style:ge.button,onClick:t},"Download"))},we=null;try{we=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(o){}function _e(e,t,n){this.low=0|e,this.high=0|t,this.unsigned=!!n}function Ee(e){return!0===(e&&e.__isLong__)}Object.defineProperty(_e.prototype,"__isLong__",{value:!0}),_e.isLong=Ee;var ke={},Ie={};function Ce(e,t){var n,r,i;return t?(i=0<=(e>>>=0)&&e<256)&&(r=Ie[e])?r:(n=xe(e,(0|e)<0?-1:0,!0),i&&(Ie[e]=n),n):(i=-128<=(e|=0)&&e<128)&&(r=ke[e])?r:(n=xe(e,e<0?-1:0,!1),i&&(ke[e]=n),n)}function Se(e,t){if(isNaN(e))return t?De:Qe;if(t){if(e<0)return De;if(e>=Re)return He}else{if(e<=-Ne)return Je;if(e+1>=Ne)return Fe}return e<0?Se(-e,t).neg():xe(e%Pe|0,e/Pe|0,t)}function xe(e,t,n){return new _e(e,t,n)}_e.fromInt=Ce,_e.fromNumber=Se,_e.fromBits=xe;var Be=Math.pow;function Oe(e,t,n){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return Qe;if("number"==typeof t?(n=t,t=!1):t=!!t,(n=n||10)<2||360)throw Error("interior hyphen");if(0===r)return Oe(e.substring(1),t,n).neg();for(var i=Se(Be(n,8)),o=Qe,a=0;a>>0:this.low},qe.toNumber=function(){return this.unsigned?(this.high>>>0)*Pe+(this.low>>>0):this.high*Pe+(this.low>>>0)},qe.toString=function(e){if((e=e||10)<2||36>>0).toString(e);if((o=s).isZero())return u+a;for(;u.length<6;)u="0"+u;a=""+u+a}},qe.getHighBits=function(){return this.high},qe.getHighBitsUnsigned=function(){return this.high>>>0},qe.getLowBits=function(){return this.low},qe.getLowBitsUnsigned=function(){return this.low>>>0},qe.getNumBitsAbs=function(){if(this.isNegative())return this.eq(Je)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&0==(e&1<=0},qe.isOdd=function(){return 1==(1&this.low)},qe.isEven=function(){return 0==(1&this.low)},qe.equals=function(e){return Ee(e)||(e=Me(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&this.high===e.high&&this.low===e.low},qe.eq=qe.equals,qe.notEquals=function(e){return!this.eq(e)},qe.neq=qe.notEquals,qe.ne=qe.notEquals,qe.lessThan=function(e){return this.comp(e)<0},qe.lt=qe.lessThan,qe.lessThanOrEqual=function(e){return this.comp(e)<=0},qe.lte=qe.lessThanOrEqual,qe.le=qe.lessThanOrEqual,qe.greaterThan=function(e){return this.comp(e)>0},qe.gt=qe.greaterThan,qe.greaterThanOrEqual=function(e){return this.comp(e)>=0},qe.gte=qe.greaterThanOrEqual,qe.ge=qe.greaterThanOrEqual,qe.compare=function(e){if(Ee(e)||(e=Me(e)),this.eq(e))return 0;var t=this.isNegative(),n=e.isNegative();return t&&!n?-1:!t&&n?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},qe.comp=qe.compare,qe.negate=function(){return!this.unsigned&&this.eq(Je)?Je:this.not().add(je)},qe.neg=qe.negate,qe.add=function(e){Ee(e)||(e=Me(e));var t=0,n=0,r=0,i=0;return r+=(i+=(65535&this.low)+(65535&e.low))>>>16,n+=(r+=(this.low>>>16)+(e.low>>>16))>>>16,t+=(n+=(65535&this.high)+(65535&e.high))>>>16,t+=(this.high>>>16)+(e.high>>>16),xe((r&=65535)<<16|(i&=65535),(t&=65535)<<16|(n&=65535),this.unsigned)},qe.subtract=function(e){return Ee(e)||(e=Me(e)),this.add(e.neg())},qe.sub=qe.subtract,qe.multiply=function(e){if(this.isZero())return Qe;if(Ee(e)||(e=Me(e)),we)return xe(we.mul(this.low,this.high,e.low,e.high),we.get_high(),this.unsigned);if(e.isZero())return Qe;if(this.eq(Je))return e.isOdd()?Je:Qe;if(e.eq(Je))return this.isOdd()?Je:Qe;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(Te)&&e.lt(Te))return Se(this.toNumber()*e.toNumber(),this.unsigned);var t=65535&this.high,n=this.low>>>16,r=65535&this.low,i=65535&e.high,o=e.low>>>16,a=65535&e.low,s=0,u=0,c=0,l=0;return c+=(l+=r*a)>>>16,u+=(c+=n*a)>>>16,c&=65535,u+=(c+=r*o)>>>16,s+=(u+=t*a)>>>16,u&=65535,s+=(u+=n*o)>>>16,u&=65535,s+=(u+=r*i)>>>16,s+=(this.high>>>16)*a+t*o+n*i+r*(e.high>>>16),xe((c&=65535)<<16|(l&=65535),(s&=65535)<<16|(u&=65535),this.unsigned)},qe.mul=qe.multiply,qe.divide=function(e){if(Ee(e)||(e=Me(e)),e.isZero())throw Error("division by zero");var t,n,r;if(we)return this.unsigned||-2147483648!==this.high||-1!==e.low||-1!==e.high?xe((this.unsigned?we.div_u:we.div_s)(this.low,this.high,e.low,e.high),we.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?De:Qe;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return De;if(e.gt(this.shru(1)))return Ue;r=De}else{if(this.eq(Je))return e.eq(je)||e.eq(Le)?Je:e.eq(Je)?je:(t=this.shr(1).div(e).shl(1)).eq(Qe)?e.isNegative()?je:Le:(n=this.sub(e.mul(t)),r=t.add(n.div(e)));if(e.eq(Je))return this.unsigned?De:Qe;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();r=Qe}for(n=this;n.gte(e);){t=Math.max(1,Math.floor(n.toNumber()/e.toNumber()));for(var i=Math.ceil(Math.log(t)/Math.LN2),o=i<=48?1:Be(2,i-48),a=Se(t),s=a.mul(e);s.isNegative()||s.gt(n);)s=(a=Se(t-=o,this.unsigned)).mul(e);a.isZero()&&(a=je),r=r.add(a),n=n.sub(s)}return r},qe.div=qe.divide,qe.modulo=function(e){return Ee(e)||(e=Me(e)),we?xe((this.unsigned?we.rem_u:we.rem_s)(this.low,this.high,e.low,e.high),we.get_high(),this.unsigned):this.sub(this.div(e).mul(e))},qe.mod=qe.modulo,qe.rem=qe.modulo,qe.not=function(){return xe(~this.low,~this.high,this.unsigned)},qe.and=function(e){return Ee(e)||(e=Me(e)),xe(this.low&e.low,this.high&e.high,this.unsigned)},qe.or=function(e){return Ee(e)||(e=Me(e)),xe(this.low|e.low,this.high|e.high,this.unsigned)},qe.xor=function(e){return Ee(e)||(e=Me(e)),xe(this.low^e.low,this.high^e.high,this.unsigned)},qe.shiftLeft=function(e){return Ee(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?xe(this.low<>>32-e,this.unsigned):xe(0,this.low<>>e|this.high<<32-e,this.high>>e,this.unsigned):xe(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},qe.shr=qe.shiftRight,qe.shiftRightUnsigned=function(e){if(Ee(e)&&(e=e.toInt()),0==(e&=63))return this;var t=this.high;return e<32?xe(this.low>>>e|t<<32-e,t>>>e,this.unsigned):xe(32===e?t:t>>>e-32,0,this.unsigned)},qe.shru=qe.shiftRightUnsigned,qe.shr_u=qe.shiftRightUnsigned,qe.toSigned=function(){return this.unsigned?xe(this.low,this.high,!1):this},qe.toUnsigned=function(){return this.unsigned?this:xe(this.low,this.high,!0)},qe.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},qe.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},qe.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},_e.fromBytes=function(e,t,n){return n?_e.fromBytesLE(e,t):_e.fromBytesBE(e,t)},_e.fromBytesLE=function(e,t){return new _e(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},_e.fromBytesBE=function(e,t){return new _e(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)};var Ge=function e(t){var n={};if(t instanceof Array)return t.map((function(t){return e(t)}));if(t&&"string"==typeof t.typeUrl&&"string"==typeof t.value)try{var r=function(e){var t,n=null===(t=B.defaultRegistryTypes.find((function(t){return t[0]===e})))||void 0===t?void 0:t[1];if(n&&Object(x.isTsProtoGeneratedType)(n))return n;throw new Error("can not find ProtoGeneratedType for typeUrl:"+e)}(t.typeUrl);return{typeUrl:t.typeUrl,value:e(r.toJSON(r.decode(Object(C.fromBase64)(t.value))))}}catch(e){return t}for(var i in t){var o=t[i];n[i]="object"!=typeof o?o:e(o)}return n};var ze,Ve=function(){function e(e){var t=this,n=this;this.isDeFiCosmosProvider=!0,this.sendTransaction=function(e){try{var n=t.client.connector.session;return Promise.resolve(t.client.connector.sendJSONRequest({method:"cosmos_sendTransaction",params:[e],session:{chainId:n.chainId,chainType:n.chainType,account:t.account}}))}catch(e){return Promise.reject(e)}},this.request=function(e){return Promise.resolve(void 0)},this.send=function(e,t){return Promise.resolve(void 0)},this.stop=function(){return Promise.resolve()},this.close=function(){try{return Promise.resolve(n.client.connector.killSession()).then((function(){return Promise.resolve(n.stop()).then((function(){}))}))}catch(e){return Promise.reject(e)}};var r=e.client;this.config=e,this.client=r}return e.prototype.enable=function(){try{var e=this;return e.client.connector.connected?Promise.resolve(e.client.connector.accounts):Promise.resolve(e.client.connector.connect({chainId:e.config.supportedChainIds[0],chainType:"cosmos"})).then((function(){return e.client.connector.accounts}))}catch(e){return Promise.reject(e)}},M(e,[{key:"account",get:function(){var e;return null!=(e=this.client.connector.session.accounts[0])?e:""}},{key:"currentAccountInfo",get:function(){var e=this,t=Object.entries(this.client.connector.session.wallets[0].addresses).find((function(t){return t[1].address==e.account}));return null==t?void 0:t[1]}},{key:"signer",get:function(){var e,t=this,n=this.currentAccountInfo;if(!n||!n.pubkey)throw new Error("can not get the OfflineSigner, there is an unsupported address type");var r={address:n.address,algo:"secp256k1",pubkey:Object(C.fromBase64)(null!=(e=n.pubkey)?e:"")};return{getAccounts:function(){return Promise.resolve([r])},signDirect:function(e,n){try{return Promise.resolve(t.sendTransaction(function(e,t){var n=S.TxBody.decode(t.bodyBytes),r=S.AuthInfo.decode(t.authInfoBytes);return{signerAddress:e,signDoc:{chainId:t.chainId,accountNumber:t.accountNumber.toString(),body:Ge(S.TxBody.toJSON(n)),authInfo:Ge(S.AuthInfo.toJSON(r))}}}(e,n))).then((function(e){var t=S.TxRaw.decode(Object(C.fromBase64)(e)),i=Object(C.toBase64)(t.signatures[0]);return{signed:{bodyBytes:t.bodyBytes,authInfoBytes:t.authInfoBytes,chainId:n.chainId,accountNumber:n.accountNumber},signature:{pub_key:{type:I.pubkeyType.secp256k1,value:r.pubkey},signature:i}}}))}catch(e){return Promise.reject(e)}}}}}]),e}(),We=function(e){var t=this,n=e.key,r=void 0===n?"DeFiLink_session_storage_dapp":n,i=e.supportedChainIds;this.getSession=function(){var e,n=Object(f.k)(t.key);return(e=n)&&void 0!==e.bridge&&void 0!==e.chainId&&void 0!==e.chainType&&void 0!==e.wallets&&void 0!==e.wallets&&void 0!==e.wallets[0]&&void 0!==e.wallets[0].addresses&&void 0!==e.wallets[0].addresses.eth&&void 0!==e.accounts&&e.accounts.length>0&&t.supportedChainIds.includes(n.chainId)?n:null},this.setSession=function(e){return t.supportedChainIds.includes(e.chainId)&&Object(f.D)(t.key,e),e},this.removeSession=function(){Object(f.C)(t.key)},this.key=r,this.supportedChainIds=i};!function(e){e.Update="DeFiConnectorUpdate",e.Error="DeFiConnectorError",e.Deactivate="DeFiConnectorDeactivate"}(ze||(ze={}));var Ke=function(e){return"eth"===e||"cosmos"===e?e:"eth"},Ye=function(e){function t(t){var n;return(n=e.call(this)||this).eventEmitters=[],n.chainId="",n.chainType="eth",n.accounts=[],n.config=t,n}R(t,e);var n=t.prototype;return n.getProvider=function(){try{return Promise.resolve(this.provider)}catch(e){return Promise.reject(e)}},n.getChainId=function(){try{return Promise.resolve(this.chainId)}catch(e){return Promise.reject(e)}},n.getAccount=function(){try{return Promise.resolve(this.accounts[0])}catch(e){return Promise.reject(e)}},n.generateClient=function(){try{var e,t=function(){return e.connector.on("disconnect",(function(){n.emitDeactivate()})),e.connector.on("session_update",(function(t,r){try{if(t)return n.emitError(t),Promise.resolve();if(null==r||!r.params[0])return Promise.resolve();var i=r.params,o=(i=void 0===i?[]:i)[0],a=o.chainId,s=o.chainType,u=o.accounts;return n.chainId=a,n.chainType=s,n.accounts=u,Promise.resolve(n.generateProvider({chainId:a,chainType:s,connectorClient:e,config:n.config})).then((function(e){var t;return n.provider=e,Promise.resolve(null===(t=n.provider)||void 0===t?void 0:t.enable()).then((function(){n.emitUpdate({account:u[0],chainType:s,chainId:a,provider:n.provider})}))}))}catch(e){return Promise.reject(e)}})),e},n=this,r=function(){if("function"==typeof window.deficonnectClientGenerator)return Promise.resolve(window.deficonnectClientGenerator(n.config)).then((function(t){void 0===(e=t).clearSessionStorage&&(e.clearSessionStorage=V.prototype.clearSessionStorage)}));var t,r={bridge:L(null!=(t=n.config.bridge)?t:"https://wallet-connect.crypto.com/api/v1/ncwconnect/relay/ws",{role:"dapp",dapp_name:n.config.name}),qrcodeModal:Ae},i=new We({supportedChainIds:n._supportedChainIds});e=new V({connectorOpts:r,sessionStorage:i})}();return Promise.resolve(r&&r.then?r.then(t):t())}catch(e){return Promise.reject(e)}},n.generateProvider=function(e){try{var t=function(e){if(n)return e;throw new Error("must provider eth or cosmos config")},n=!1,r=e.chainType,i=e.connectorClient,o="function"==typeof window.deficonnectProviderGenerator?(n=!0,Promise.resolve(window.deficonnectProviderGenerator({chainId:e.chainId,chainType:r,config:this.config,connectorClient:i}))):"eth"===r?(n=!0,new d.a(P({},this.config.eth,{connector:i.connector}))):"cosmos"===r?(n=!0,new Ve({supportedChainIds:null!=(a=null===(s=this.config.cosmos)||void 0===s?void 0:s.supportedChainIds)?a:[],client:i})):void 0;return Promise.resolve(o&&o.then?o.then(t):t(o))}catch(e){return Promise.reject(e)}var a,s},n.activate=function(){try{var e=this;return Promise.resolve(function(t,n){try{var r=function(){function t(){if(0==e.config.supprtedChainTypes.length)throw new Error("must provider supprtedNetworks");var t=e.config.supprtedChainTypes[0],r="1";if("eth"===t){var i;if(null==e.config.eth)throw new Error("must provider eth config");r=""+(null!=(i=e.config.eth.supportedChainIds[0])?i:1)}if("cosmos"===t){var o;if(null==e.config.cosmos)throw new Error("must provider cosmos config");r=""+(null!=(o=e.config.cosmos.supportedChainIds[0])?o:1)}return Promise.resolve(n.connector.connect({chainId:r,chainType:t})).then((function(t){var r=t.chainId,i=t.chainType,o=t.accounts;return e.chainId=r,e.chainType=Ke(i),e.accounts=o,Promise.resolve(e.generateProvider({chainId:r,chainType:i,connectorClient:n,config:e.config})).then((function(t){var a;return e.provider=t,Promise.resolve(null===(a=e.provider)||void 0===a?void 0:a.enable()).then((function(){return e.connectorClient=n,{account:o[0],chainType:Ke(i),chainId:r,provider:e.provider}}))}))}))}var n=e.connectorClient,r=function(){if(!n)return Promise.resolve(e.generateClient()).then((function(e){n=e}))}();return r&&r.then?r.then(t):t()}()}catch(e){return n(e)}return r&&r.then?r.then(void 0,n):r}(0,(function(e){throw console.error("DeFiConnector activate error:",e),e})))}catch(e){return Promise.reject(e)}},n.getAddressList=function(e){var t=this.connectorClient;if(!t)throw new Error("you has not active this connector");return e.map((function(e){return{type:e,address:t.connector.session.wallets[0].addresses[e].address}}))},n.close=function(){try{var e,t=this;null===(e=t.connectorClient)||void 0===e||e.clearSessionStorage();var n=function(e,n){try{var r=Promise.resolve(null===(i=t.provider)||void 0===i?void 0:i.close()).then((function(){}))}catch(e){return n(!0,e)}var i;return r&&r.then?r.then(n.bind(null,!1),n.bind(null,!0)):n(!1,r)}(0,(function(e,n){var r;return Promise.resolve(null===(r=t.connectorClient)||void 0===r?void 0:r.connector.killSession()).then((function(){if(e)throw n;return n}))}));return Promise.resolve(n&&n.then?n.then((function(){})):void 0)}catch(e){return Promise.reject(e)}},n.deactivate=function(){try{var e,t,n;return null===(e=this.connectorClient)||void 0===e||e.clearSessionStorage(),"function"==typeof(null===(t=this.provider)||void 0===t?void 0:t.stop)&&(null===(n=this.provider)||void 0===n||n.stop()),this.emitDeactivate(),Promise.resolve()}catch(e){return Promise.reject(e)}},n.onEvent=function(e,t){var n=this,r={event:e,callback:t};return this.eventEmitters.push(r),function(){n.eventEmitters=n.eventEmitters.filter((function(e){return e!==r}))}},n.emitUpdate=function(e){this.eventEmitters.forEach((function(t){t.event===ze.Update&&t.callback(e,void 0)}))},n.emitError=function(e){this.eventEmitters.forEach((function(t){t.event===ze.Error&&t.callback(void 0,e)}))},n.emitDeactivate=function(){this.eventEmitters.forEach((function(e){e.event===ze.Deactivate&&e.callback(void 0,void 0)})),this.connectorClient=void 0},M(t,[{key:"_supportedChainIds",get:function(){var e,t,n,r,i=null!=(e=null===(t=this.config.eth)||void 0===t?void 0:t.supportedChainIds.map((function(e){return e.toString()})))?e:[],o=null!=(n=null===(r=this.config.cosmos)||void 0===r?void 0:r.supportedChainIds)?n:[];return i.concat(o)}},{key:"provider",get:function(){return this._provider},set:function(e){this._provider=e}}]),t}(U);!function(e){function t(){var t;return(t=e.call(this)||this).name=t.constructor.name,t.message="The user rejected the request.",t}R(t,e)}(j(Error));function Ze(e){try{var t=parseInt(null!=e?e:"0");return isNaN(t)?0:t}catch(e){return 0}}var Xe=function(e){function t(t){var n,r,i,o,a;r=e.call(this,{supportedChainIds:(i=t,o=i.supportedChainIds,a=i.rpc,o||(a?Object.keys(a).map((function(e){return Number(e)})):void 0))})||this;var s=Object(f.i)()||void 0;return r.defiConnector=new Ye({name:null!=(n=null==s?void 0:s.name)?n:"",supprtedChainTypes:["eth"],bridge:t.bridge,eth:t}),r.defiConnector.onEvent(ze.Update,(function(e){if(e){var t=e.provider,n=e.account;r.emitUpdate({chainId:Ze(e.chainId),provider:t,account:n})}})),r.defiConnector.onEvent(ze.Deactivate,(function(){r.emitDeactivate()})),r}R(t,e);var n=t.prototype;return n.activate=function(){try{return Promise.resolve(this.defiConnector.activate()).then((function(e){var t=e.provider,n=e.account;return{chainId:Ze(e.chainId),provider:t,account:n}}))}catch(e){return Promise.reject(e)}},n.getProvider=function(){try{return Promise.resolve(this.defiConnector.provider)}catch(e){return Promise.reject(e)}},n.getChainId=function(){try{return Promise.resolve(Ze(this.defiConnector.chainId))}catch(e){return Promise.reject(e)}},n.getAccount=function(){try{return Promise.resolve(this.getProvider()).then((function(e){return e.send("eth_accounts").then((function(e){return e[0]}))}))}catch(e){return Promise.reject(e)}},n.close=function(){return this.defiConnector.close()},n.deactivate=function(){this.defiConnector.deactivate()},t}(U)}).call(this,n(20),n(35))},function(e,t,n){(function(t){var r=n(295).strict;e.exports=function(e){if(r(e)){var n=t.from(e.buffer);return e.byteLength!==e.buffer.byteLength&&(n=n.slice(e.byteOffset,e.byteOffset+e.byteLength)),n}return t.from(e)}}).call(this,n(26).Buffer)},function(e,t,n){"use strict";(function(e){var r=n(1),i=n(4),o=n(6),a=n(7),s=n(16),u=n(563),c="undefined"!==typeof e.WebSocket?e.WebSocket:n(677),l=function(){function e(t){var n=this;if(Object(o.a)(this,e),this.opts=t,this._queue=[],this._events=[],this._subscriptions=[],this._protocol=t.protocol,this._version=t.version,this._url="",this._netMonitor=null,this._socket=null,this._nextSocket=null,this._subscriptions=t.subscriptions||[],this._netMonitor=t.netMonitor||new u.a,!t.url||"string"!==typeof t.url)throw new Error("Missing or invalid WebSocket url");this._url=t.url,this._netMonitor.on("online",(function(){return n._socketCreate()}))}return Object(a.a)(e,[{key:"readyState",get:function(){return this._socket?this._socket.readyState:-1},set:function(e){}},{key:"connecting",get:function(){return 0===this.readyState},set:function(e){}},{key:"connected",get:function(){return 1===this.readyState},set:function(e){}},{key:"closing",get:function(){return 2===this.readyState},set:function(e){}},{key:"closed",get:function(){return 3===this.readyState},set:function(e){}},{key:"open",value:function(){this._socketCreate()}},{key:"close",value:function(){this._socketClose()}},{key:"send",value:function(e,t,n){if(!t||"string"!==typeof t)throw new Error("Missing or invalid topic field");this._socketSend({topic:t,type:"pub",payload:e,silent:!!n})}},{key:"subscribe",value:function(e){this._socketSend({topic:e,type:"sub",payload:"",silent:!0})}},{key:"on",value:function(e,t){this._events.push({event:e,callback:t})}},{key:"_socketCreate",value:function(){var e=this;if(!this._nextSocket){var t=function(e,t,n){var r,i,o=(e.startsWith("https")?e.replace("https","wss"):e.startsWith("http")?e.replace("http","ws"):e).split("?"),a=Object(s.o)()?{protocol:t,version:n,env:"browser",host:(null===(r=Object(s.l)())||void 0===r?void 0:r.host)||""}:{protocol:t,version:n,env:(null===(i=Object(s.g)())||void 0===i?void 0:i.name)||""},u=Object(s.a)(Object(s.m)("?"+(o[1]||"")),a);return o[0]+"?"+u}(this._url,this._protocol,this._version);if(this._nextSocket=new c(t),!this._nextSocket)throw new Error("Failed to create socket");this._nextSocket.onmessage=function(t){return e._socketReceive(t)},this._nextSocket.onopen=function(){return e._socketOpen()},this._nextSocket.onerror=function(t){return e._socketError(t)},this._nextSocket.onclose=function(){setTimeout((function(){e._nextSocket=null,e._socketCreate()}),1e3)}}}},{key:"_socketOpen",value:function(){this._socketClose(),this._socket=this._nextSocket,this._nextSocket=null,this._queueSubscriptions(),this._pushQueue()}},{key:"_socketClose",value:function(){this._socket&&(this._socket.onclose=function(){},this._socket.close())}},{key:"_socketSend",value:function(e){var t=JSON.stringify(e);this._socket&&1===this._socket.readyState?this._socket.send(t):(this._setToQueue(e),this._socketCreate())}},{key:"_socketReceive",value:function(){var e=Object(i.a)(Object(r.a)().mark((function e(t){var n,i;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.prev=0,n=JSON.parse(t.data),e.next=7;break;case 4:return e.prev=4,e.t0=e.catch(0),e.abrupt("return");case 7:this._socketSend({topic:n.topic,type:"ack",payload:"",silent:!0}),this._socket&&1===this._socket.readyState&&(i=this._events.filter((function(e){return"message"===e.event})),i&&i.length&&i.forEach((function(e){return e.callback(n)})));case 9:case"end":return e.stop()}}),e,this,[[0,4]])})));return function(t){return e.apply(this,arguments)}}()},{key:"_socketError",value:function(e){var t=this._events.filter((function(e){return"error"===e.event}));t&&t.length&&t.forEach((function(t){return t.callback(e)}))}},{key:"_queueSubscriptions",value:function(){var e=this;this._subscriptions.forEach((function(t){return e._queue.push({topic:t,type:"sub",payload:"",silent:!0})})),this._subscriptions=this.opts.subscriptions||[]}},{key:"_setToQueue",value:function(e){this._queue.push(e)}},{key:"_pushQueue",value:function(){var e=this;this._queue.forEach((function(t){return e._socketSend(t)})),this._queue=[]}}]),e}();t.a=l}).call(this,n(20))},function(e,t,n){"use strict";var r=n(6),i=n(7),o=function(){function e(){var t=this;Object(r.a)(this,e),this._eventEmitters=[],"undefined"!==typeof window&&"undefined"!==typeof window.addEventListener&&(window.addEventListener("online",(function(){return t.trigger("online")})),window.addEventListener("offline",(function(){return t.trigger("offline")})))}return Object(i.a)(e,[{key:"on",value:function(e,t){this._eventEmitters.push({event:e,callback:t})}},{key:"trigger",value:function(e){var t=[];e&&(t=this._eventEmitters.filter((function(t){return t.event===e}))),t.forEach((function(e){e.callback()}))}}]),e}();t.a=o},function(e,t,n){(function(t){function r(e){return e&&"object"===typeof e&&"default"in e?e.default:e}var i=n(293),o=r(n(587)),a=r(n(588)),s=n(605);"undefined"!==typeof Symbol&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator"))),"undefined"!==typeof Symbol&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));var u="walletconnect-wrapper",c="walletconnect-style-sheet",l="walletconnect-qrcode-modal",f="walletconnect-qrcode-text";function d(e){return s.createElement("div",{className:"walletconnect-modal__header"},s.createElement("img",{src:"data:image/svg+xml,%3C?xml version='1.0' encoding='UTF-8'?%3E %3Csvg width='300px' height='185px' viewBox='0 0 300 185' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E %3C!-- Generator: Sketch 49.3 (51167) - http://www.bohemiancoding.com/sketch --%3E %3Ctitle%3EWalletConnect%3C/title%3E %3Cdesc%3ECreated with Sketch.%3C/desc%3E %3Cdefs%3E%3C/defs%3E %3Cg id='Page-1' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E %3Cg id='walletconnect-logo-alt' fill='%233B99FC' fill-rule='nonzero'%3E %3Cpath d='M61.4385429,36.2562612 C110.349767,-11.6319051 189.65053,-11.6319051 238.561752,36.2562612 L244.448297,42.0196786 C246.893858,44.4140867 246.893858,48.2961898 244.448297,50.690599 L224.311602,70.406102 C223.088821,71.6033071 221.106302,71.6033071 219.883521,70.406102 L211.782937,62.4749541 C177.661245,29.0669724 122.339051,29.0669724 88.2173582,62.4749541 L79.542302,70.9685592 C78.3195204,72.1657633 76.337001,72.1657633 75.1142214,70.9685592 L54.9775265,51.2530561 C52.5319653,48.8586469 52.5319653,44.9765439 54.9775265,42.5821357 L61.4385429,36.2562612 Z M280.206339,77.0300061 L298.128036,94.5769031 C300.573585,96.9713 300.573599,100.85338 298.128067,103.247793 L217.317896,182.368927 C214.872352,184.763353 210.907314,184.76338 208.461736,182.368989 C208.461726,182.368979 208.461714,182.368967 208.461704,182.368957 L151.107561,126.214385 C150.496171,125.615783 149.504911,125.615783 148.893521,126.214385 C148.893517,126.214389 148.893514,126.214393 148.89351,126.214396 L91.5405888,182.368927 C89.095052,184.763359 85.1300133,184.763399 82.6844276,182.369014 C82.6844133,182.369 82.684398,182.368986 82.6843827,182.36897 L1.87196327,103.246785 C-0.573596939,100.852377 -0.573596939,96.9702735 1.87196327,94.5758653 L19.7936929,77.028998 C22.2392531,74.6345898 26.2042918,74.6345898 28.6498531,77.028998 L86.0048306,133.184355 C86.6162214,133.782957 87.6074796,133.782957 88.2188704,133.184355 C88.2188796,133.184346 88.2188878,133.184338 88.2188969,133.184331 L145.571,77.028998 C148.016505,74.6345347 151.981544,74.6344449 154.427161,77.028798 C154.427195,77.0288316 154.427229,77.0288653 154.427262,77.028899 L211.782164,133.184331 C212.393554,133.782932 213.384814,133.782932 213.996204,133.184331 L271.350179,77.0300061 C273.79574,74.6355969 277.760778,74.6355969 280.206339,77.0300061 Z' id='WalletConnect'%3E%3C/path%3E %3C/g%3E %3C/g%3E %3C/svg%3E",className:"walletconnect-modal__headerLogo"}),s.createElement("p",null,"WalletConnect"),s.createElement("div",{className:"walletconnect-modal__close__wrapper",onClick:e.onClose},s.createElement("div",{id:"walletconnect-qrcode-close",className:"walletconnect-modal__close__icon"},s.createElement("div",{className:"walletconnect-modal__close__line1"}),s.createElement("div",{className:"walletconnect-modal__close__line2"}))))}function h(e){return s.createElement("a",{className:"walletconnect-connect__button",href:e.href,id:"walletconnect-connect-button-"+e.name,onClick:e.onClick,rel:"noopener noreferrer",style:{backgroundColor:e.color},target:"_blank"},e.name)}function p(e){var t=e.color,n=e.href,r=e.name,i=e.logo,o=e.onClick;return s.createElement("a",{className:"walletconnect-modal__base__row",href:n,onClick:o,rel:"noopener noreferrer",target:"_blank"},s.createElement("h3",{className:"walletconnect-modal__base__row__h3"},r),s.createElement("div",{className:"walletconnect-modal__base__row__right"},s.createElement("div",{className:"walletconnect-modal__base__row__right__app-icon",style:{background:"url('"+i+"') "+t,backgroundSize:"100%"}}),s.createElement("img",{src:"data:image/svg+xml,%3Csvg width='8' height='18' viewBox='0 0 8 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M0.586301 0.213898C0.150354 0.552968 0.0718197 1.18124 0.41089 1.61719L5.2892 7.88931C5.57007 8.25042 5.57007 8.75608 5.2892 9.11719L0.410889 15.3893C0.071819 15.8253 0.150353 16.4535 0.586301 16.7926C1.02225 17.1317 1.65052 17.0531 1.98959 16.6172L6.86791 10.3451C7.7105 9.26174 7.7105 7.74476 6.86791 6.66143L1.98959 0.38931C1.65052 -0.0466374 1.02225 -0.125172 0.586301 0.213898Z' fill='%233C4252'/%3E %3C/svg%3E",className:"walletconnect-modal__base__row__right__caret"})))}function g(e){var t=e.color,n=e.href,r=e.name,i=e.logo,o=e.onClick,a=window.innerWidth<768?(r.length>8?2.5:2.7)+"vw":"inherit";return s.createElement("a",{className:"walletconnect-connect__button__icon_anchor",href:n,onClick:o,rel:"noopener noreferrer",target:"_blank"},s.createElement("div",{className:"walletconnect-connect__button__icon",style:{background:"url('"+i+"') "+t,backgroundSize:"100%"}}),s.createElement("div",{style:{fontSize:a},className:"walletconnect-connect__button__text"},r))}function v(e){var t=i.isAndroid(),n=s.useState(1),r=n[0],o=n[1],a=e.links,u=e.errorMessage,c=a.length>5,l=Math.ceil(a.length/12),d=[12*(r-1)+1,12*r],v=a.length?a.filter((function(e,t){return t+1>=d[0]&&t+1<=d[1]})):[];return s.createElement("div",null,s.createElement("p",{id:f,className:"walletconnect-qrcode__text"},t?e.text.connect_mobile_wallet:e.text.choose_preferred_wallet),s.createElement("div",{className:"walletconnect-connect__buttons__wrapper"+(t?"__android":c?"__wrap":"")},t?s.createElement(h,{name:e.text.connect,color:"rgb(64, 153, 255)",href:e.uri,onClick:s.useCallback((function(){i.saveMobileLinkInfo({name:"Unknown",href:e.uri})}),[])}):v.length?v.map((function(t){var n=t.color,r=t.name,o=t.shortName,a=t.logo,u=i.formatIOSMobile(e.uri,t),l=s.useCallback((function(){i.saveMobileLinkInfo({name:r,href:u})}),[v]);return c?s.createElement(g,{color:n,href:u,name:o,logo:a,onClick:l}):s.createElement(p,{color:n,href:u,name:r,logo:a,onClick:l})})):s.createElement(s.Fragment,null,s.createElement("p",null,u.length?e.errorMessage:e.text.loading))),!(t||!(l>1))&&s.createElement("div",{className:"walletconnect-modal__footer"},Array(l).fill(0).map((function(e,t){var n=t+1,i=r===n;return s.createElement("a",{style:{margin:"auto 10px",fontWeight:i?"bold":"normal"},onClick:function(){return o(n)}},n)}))))}function m(e){var t=!!e.message.trim();return s.createElement("div",{className:"walletconnect-qrcode__notification"+(t?" notification__show":"")},e.message)}function A(e){var t=s.useState(""),n=t[0],r=t[1],i=s.useState(""),u=i[0],c=i[1];s.useEffect((function(){try{return Promise.resolve(function(e){try{var t="";return Promise.resolve(o.toString(e,{margin:0,type:"svg"})).then((function(e){return"string"===typeof e&&(t=e.replace("0||s.useEffect((function(){!function(){try{if(t)return Promise.resolve();u(!0);var o=function(e,t){try{var n=e()}catch(r){return t(r)}return n&&n.then?n.then(void 0,t):n}((function(){var t=i.getWalletRegistryUrl();return Promise.resolve(fetch(t).then((function(e){return e.json()}))).then((function(t){var o=n?"mobile":"desktop",a=i.getMobileLinkRegistry(i.formatMobileRegistry(t,o),r);u(!1),h(!0),M(a.length?"":e.text.no_supported_wallets),x(a);var s=1===a.length;s&&(_(i.formatIOSMobile(e.uri,a[0])),m(!0)),I(s)}))}),(function(t){u(!1),h(!0),M(e.text.something_went_wrong),console.error(t)}));Promise.resolve(o&&o.then?o.then((function(){})):void 0)}catch(a){return Promise.reject(a)}}()}))};P();var R=n?g:!g;return s.createElement("div",{id:l,className:"walletconnect-qrcode__base animated fadeIn"},s.createElement("div",{className:"walletconnect-modal__base"},s.createElement(d,{onClose:e.onClose}),k&&g?s.createElement("div",{className:"walletconnect-modal__single_wallet"},s.createElement("a",{onClick:function(){return i.saveMobileLinkInfo({name:S[0].name,href:w})},href:w,rel:"noopener noreferrer",target:"_blank"},e.text.connect_with+" "+(k?S[0].name:"")+" \u203a")):t||a||!a&&S.length?s.createElement("div",{className:"walletconnect-modal__mobile__toggle"+(R?" right__selected":"")},s.createElement("div",{className:"walletconnect-modal__mobile__toggle_selector"}),n?s.createElement(s.Fragment,null,s.createElement("a",{onClick:function(){return m(!1),P()}},e.text.mobile),s.createElement("a",{onClick:function(){return m(!0)}},e.text.qrcode)):s.createElement(s.Fragment,null,s.createElement("a",{onClick:function(){return m(!0)}},e.text.qrcode),s.createElement("a",{onClick:function(){return m(!1),P()}},e.text.desktop))):null,s.createElement("div",null,g||!t&&!a&&!S.length?s.createElement(A,Object.assign({},y)):s.createElement(v,Object.assign({},y,{links:S,errorMessage:O})))))}var b={de:{choose_preferred_wallet:"W\xe4hle bevorzugte Wallet",connect_mobile_wallet:"Verbinde mit Mobile Wallet",scan_qrcode_with_wallet:"Scanne den QR-code mit einer WalletConnect kompatiblen Wallet",connect:"Verbinden",qrcode:"QR-Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"In die Zwischenablage kopieren",copied_to_clipboard:"In die Zwischenablage kopiert!",connect_with:"Verbinden mit Hilfe von",loading:"Laden...",something_went_wrong:"Etwas ist schief gelaufen",no_supported_wallets:"Es gibt noch keine unterst\xfctzten Geldb\xf6rsen"},en:{choose_preferred_wallet:"Choose your preferred wallet",connect_mobile_wallet:"Connect to Mobile Wallet",scan_qrcode_with_wallet:"Scan QR code with a WalletConnect-compatible wallet",connect:"Connect",qrcode:"QR Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"Copy to clipboard",copied_to_clipboard:"Copied to clipboard!",connect_with:"Connect with",loading:"Loading...",something_went_wrong:"Something went wrong",no_supported_wallets:"There are no supported wallets yet"},es:{choose_preferred_wallet:"Elige tu billetera preferida",connect_mobile_wallet:"Conectar a billetera m\xf3vil",scan_qrcode_with_wallet:"Escanea el c\xf3digo QR con una billetera compatible con WalletConnect",connect:"Conectar",qrcode:"C\xf3digo QR",mobile:"M\xf3vil",desktop:"Desktop",copy_to_clipboard:"Copiar",copied_to_clipboard:"Copiado!",connect_with:"Conectar mediante",loading:"Cargando...",something_went_wrong:"Algo sali\xf3 mal",no_supported_wallets:"Todav\xeda no hay monederos compatibles"},fr:{choose_preferred_wallet:"Choisissez votre portefeuille pr\xe9f\xe9r\xe9",connect_mobile_wallet:"Se connecter au portefeuille mobile",scan_qrcode_with_wallet:"Scannez le QR code avec un portefeuille compatible WalletConnect",connect:"Se connecter",qrcode:"QR Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"Copier",copied_to_clipboard:"Copi\xe9!",connect_with:"Connectez-vous \xe0 l'aide de",loading:"Chargement...",something_went_wrong:"Quelque chose a mal tourn\xe9",no_supported_wallets:"Il n'y a pas encore de portefeuilles pris en charge"},ko:{choose_preferred_wallet:"\uc6d0\ud558\ub294 \uc9c0\uac11\uc744 \uc120\ud0dd\ud558\uc138\uc694",connect_mobile_wallet:"\ubaa8\ubc14\uc77c \uc9c0\uac11\uacfc \uc5f0\uacb0",scan_qrcode_with_wallet:"WalletConnect \uc9c0\uc6d0 \uc9c0\uac11\uc5d0\uc11c QR\ucf54\ub4dc\ub97c \uc2a4\uce94\ud558\uc138\uc694",connect:"\uc5f0\uacb0",qrcode:"QR \ucf54\ub4dc",mobile:"\ubaa8\ubc14\uc77c",desktop:"\ub370\uc2a4\ud06c\ud0d1",copy_to_clipboard:"\ud074\ub9bd\ubcf4\ub4dc\uc5d0 \ubcf5\uc0ac",copied_to_clipboard:"\ud074\ub9bd\ubcf4\ub4dc\uc5d0 \ubcf5\uc0ac\ub418\uc5c8\uc2b5\ub2c8\ub2e4!",connect_with:"\uc640 \uc5f0\uacb0\ud558\ub2e4",loading:"\ub85c\ub4dc \uc911...",something_went_wrong:"\ubb38\uc81c\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4.",no_supported_wallets:"\uc544\uc9c1 \uc9c0\uc6d0\ub418\ub294 \uc9c0\uac11\uc774 \uc5c6\uc2b5\ub2c8\ub2e4"},pt:{choose_preferred_wallet:"Escolha sua carteira preferida",connect_mobile_wallet:"Conectar-se \xe0 carteira m\xf3vel",scan_qrcode_with_wallet:"Ler o c\xf3digo QR com uma carteira compat\xedvel com WalletConnect",connect:"Conectar",qrcode:"C\xf3digo QR",mobile:"M\xf3vel",desktop:"Desktop",copy_to_clipboard:"Copiar",copied_to_clipboard:"Copiado!",connect_with:"Ligar por meio de",loading:"Carregamento...",something_went_wrong:"Algo correu mal",no_supported_wallets:"Ainda n\xe3o h\xe1 carteiras suportadas"},zh:{choose_preferred_wallet:"\u9009\u62e9\u4f60\u7684\u94b1\u5305",connect_mobile_wallet:"\u8fde\u63a5\u81f3\u79fb\u52a8\u7aef\u94b1\u5305",scan_qrcode_with_wallet:"\u4f7f\u7528\u517c\u5bb9 WalletConnect \u7684\u94b1\u5305\u626b\u63cf\u4e8c\u7ef4\u7801",connect:"\u8fde\u63a5",qrcode:"\u4e8c\u7ef4\u7801",mobile:"\u79fb\u52a8",desktop:"\u684c\u9762",copy_to_clipboard:"\u590d\u5236\u5230\u526a\u8d34\u677f",copied_to_clipboard:"\u590d\u5236\u5230\u526a\u8d34\u677f\u6210\u529f\uff01",connect_with:"\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u8fde\u63a5",loading:"\u6b63\u5728\u52a0\u8f7d...",something_went_wrong:"\u51fa\u4e86\u95ee\u9898",no_supported_wallets:"\u76ee\u524d\u8fd8\u6ca1\u6709\u652f\u6301\u7684\u94b1\u5305"},fa:{choose_preferred_wallet:"\u06a9\u06cc\u0641 \u067e\u0648\u0644 \u0645\u0648\u0631\u062f \u0646\u0638\u0631 \u062e\u0648\u062f \u0631\u0627 \u0627\u0646\u062a\u062e\u0627\u0628 \u06a9\u0646\u06cc\u062f",connect_mobile_wallet:"\u0628\u0647 \u06a9\u06cc\u0641 \u067e\u0648\u0644 \u0645\u0648\u0628\u0627\u06cc\u0644 \u0648\u0635\u0644 \u0634\u0648\u06cc\u062f",scan_qrcode_with_wallet:"\u06a9\u062f QR \u0631\u0627 \u0628\u0627 \u06cc\u06a9 \u06a9\u06cc\u0641 \u067e\u0648\u0644 \u0633\u0627\u0632\u06af\u0627\u0631 \u0628\u0627 WalletConnect \u0627\u0633\u06a9\u0646 \u06a9\u0646\u06cc\u062f",connect:"\u0627\u062a\u0635\u0627\u0644",qrcode:"\u06a9\u062f QR",mobile:"\u0633\u06cc\u0627\u0631",desktop:"\u062f\u0633\u06a9\u062a\u0627\u067e",copy_to_clipboard:"\u06a9\u067e\u06cc \u0628\u0647 \u06a9\u0644\u06cc\u067e \u0628\u0648\u0631\u062f",copied_to_clipboard:"\u062f\u0631 \u06a9\u0644\u06cc\u067e \u0628\u0648\u0631\u062f \u06a9\u067e\u06cc \u0634\u062f!",connect_with:"\u0627\u0631\u062a\u0628\u0627\u0637 \u0628\u0627",loading:"...\u0628\u0627\u0631\u06af\u0630\u0627\u0631\u06cc",something_went_wrong:"\u0645\u0634\u06a9\u0644\u06cc \u067e\u06cc\u0634 \u0622\u0645\u062f",no_supported_wallets:"\u0647\u0646\u0648\u0632 \u0647\u06cc\u0686 \u06a9\u06cc\u0641 \u067e\u0648\u0644 \u067e\u0634\u062a\u06cc\u0628\u0627\u0646\u06cc \u0634\u062f\u0647 \u0627\u06cc \u0648\u062c\u0648\u062f \u0646\u062f\u0627\u0631\u062f"}};function w(){var e=i.getDocumentOrThrow(),t=e.getElementById(l);t&&(t.className=t.className.replace("fadeIn","fadeOut"),setTimeout((function(){var t=e.getElementById(u);t&&e.body.removeChild(t)}),300))}function _(e){return function(){w(),e&&e()}}function E(){var e=i.getNavigatorOrThrow().language.split("-")[0]||"en";return b[e]||b.en}function k(e,t,n){!function(){var e=i.getDocumentOrThrow(),t=e.getElementById(c);t&&e.head.removeChild(t);var n=e.createElement("style");n.setAttribute("id",c),n.innerText=':root {\n --animation-duration: 300ms;\n}\n\n@keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n@keyframes fadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}\n\n.animated {\n animation-duration: var(--animation-duration);\n animation-fill-mode: both;\n}\n\n.fadeIn {\n animation-name: fadeIn;\n}\n\n.fadeOut {\n animation-name: fadeOut;\n}\n\n#walletconnect-wrapper {\n -webkit-user-select: none;\n align-items: center;\n display: flex;\n height: 100%;\n justify-content: center;\n left: 0;\n pointer-events: none;\n position: fixed;\n top: 0;\n user-select: none;\n width: 100%;\n z-index: 99999999999999;\n}\n\n.walletconnect-modal__headerLogo {\n height: 21px;\n}\n\n.walletconnect-modal__header p {\n color: #ffffff;\n font-size: 20px;\n font-weight: 600;\n margin: 0;\n align-items: flex-start;\n display: flex;\n flex: 1;\n margin-left: 5px;\n}\n\n.walletconnect-modal__close__wrapper {\n position: absolute;\n top: 0px;\n right: 0px;\n z-index: 10000;\n background: white;\n border-radius: 26px;\n padding: 6px;\n box-sizing: border-box;\n width: 26px;\n height: 26px;\n cursor: pointer;\n}\n\n.walletconnect-modal__close__icon {\n position: relative;\n top: 7px;\n right: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n transform: rotate(45deg);\n}\n\n.walletconnect-modal__close__line1 {\n position: absolute;\n width: 100%;\n border: 1px solid rgb(48, 52, 59);\n}\n\n.walletconnect-modal__close__line2 {\n position: absolute;\n width: 100%;\n border: 1px solid rgb(48, 52, 59);\n transform: rotate(90deg);\n}\n\n.walletconnect-qrcode__base {\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n background: rgba(37, 41, 46, 0.95);\n height: 100%;\n left: 0;\n pointer-events: auto;\n position: fixed;\n top: 0;\n transition: 0.4s cubic-bezier(0.19, 1, 0.22, 1);\n width: 100%;\n will-change: opacity;\n padding: 40px;\n box-sizing: border-box;\n}\n\n.walletconnect-qrcode__text {\n color: rgba(60, 66, 82, 0.6);\n font-size: 16px;\n font-weight: 600;\n letter-spacing: 0;\n line-height: 1.1875em;\n margin: 10px 0 30px 0;\n text-align: center;\n width: 100%;\n}\n\n@media only screen and (max-width: 768px) {\n .walletconnect-qrcode__text {\n font-size: 4vw;\n }\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-qrcode__text {\n font-size: 14px;\n }\n}\n\n.walletconnect-qrcode__image {\n width: calc(100% - 30px);\n box-sizing: border-box;\n cursor: none;\n margin: 0 auto;\n}\n\n.walletconnect-qrcode__notification {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n font-size: 16px;\n padding: 16px 20px;\n border-radius: 16px;\n text-align: center;\n transition: all 0.1s ease-in-out;\n background: white;\n color: black;\n margin-bottom: -60px;\n opacity: 0;\n}\n\n.walletconnect-qrcode__notification.notification__show {\n opacity: 1;\n}\n\n@media only screen and (max-width: 768px) {\n .walletconnect-modal__header {\n height: 130px;\n }\n .walletconnect-modal__base {\n overflow: auto;\n }\n}\n\n@media only screen and (min-device-width: 415px) and (max-width: 768px) {\n #content {\n max-width: 768px;\n box-sizing: border-box;\n }\n}\n\n@media only screen and (min-width: 375px) and (max-width: 415px) {\n #content {\n max-width: 414px;\n box-sizing: border-box;\n }\n}\n\n@media only screen and (min-width: 320px) and (max-width: 375px) {\n #content {\n max-width: 375px;\n box-sizing: border-box;\n }\n}\n\n@media only screen and (max-width: 320px) {\n #content {\n max-width: 320px;\n box-sizing: border-box;\n }\n}\n\n.walletconnect-modal__base {\n -webkit-font-smoothing: antialiased;\n background: #ffffff;\n border-radius: 24px;\n box-shadow: 0 10px 50px 5px rgba(0, 0, 0, 0.4);\n font-family: ui-rounded, "SF Pro Rounded", "SF Pro Text", medium-content-sans-serif-font,\n -apple-system, BlinkMacSystemFont, ui-sans-serif, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell,\n "Open Sans", "Helvetica Neue", sans-serif;\n margin-top: 41px;\n padding: 24px 24px 22px;\n pointer-events: auto;\n position: relative;\n text-align: center;\n transition: 0.4s cubic-bezier(0.19, 1, 0.22, 1);\n will-change: transform;\n overflow: visible;\n transform: translateY(-50%);\n top: 50%;\n max-width: 500px;\n margin: auto;\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-modal__base {\n padding: 24px 12px;\n }\n}\n\n.walletconnect-modal__base .hidden {\n transform: translateY(150%);\n transition: 0.125s cubic-bezier(0.4, 0, 1, 1);\n}\n\n.walletconnect-modal__header {\n align-items: center;\n display: flex;\n height: 26px;\n left: 0;\n justify-content: space-between;\n position: absolute;\n top: -42px;\n width: 100%;\n}\n\n.walletconnect-modal__base .wc-logo {\n align-items: center;\n display: flex;\n height: 26px;\n margin-top: 15px;\n padding-bottom: 15px;\n pointer-events: auto;\n}\n\n.walletconnect-modal__base .wc-logo div {\n background-color: #3399ff;\n height: 21px;\n margin-right: 5px;\n mask-image: url("images/wc-logo.svg") center no-repeat;\n width: 32px;\n}\n\n.walletconnect-modal__base .wc-logo p {\n color: #ffffff;\n font-size: 20px;\n font-weight: 600;\n margin: 0;\n}\n\n.walletconnect-modal__base h2 {\n color: rgba(60, 66, 82, 0.6);\n font-size: 16px;\n font-weight: 600;\n letter-spacing: 0;\n line-height: 1.1875em;\n margin: 0 0 19px 0;\n text-align: center;\n width: 100%;\n}\n\n.walletconnect-modal__base__row {\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n align-items: center;\n border-radius: 20px;\n cursor: pointer;\n display: flex;\n height: 56px;\n justify-content: space-between;\n padding: 0 15px;\n position: relative;\n margin: 0px 0px 8px;\n text-align: left;\n transition: 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94);\n will-change: transform;\n text-decoration: none;\n}\n\n.walletconnect-modal__base__row:hover {\n background: rgba(60, 66, 82, 0.06);\n}\n\n.walletconnect-modal__base__row:active {\n background: rgba(60, 66, 82, 0.06);\n transform: scale(0.975);\n transition: 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);\n}\n\n.walletconnect-modal__base__row__h3 {\n color: #25292e;\n font-size: 20px;\n font-weight: 700;\n margin: 0;\n padding-bottom: 3px;\n}\n\n.walletconnect-modal__base__row__right {\n align-items: center;\n display: flex;\n justify-content: center;\n}\n\n.walletconnect-modal__base__row__right__app-icon {\n border-radius: 8px;\n height: 34px;\n margin: 0 11px 2px 0;\n width: 34px;\n background-size: 100%;\n box-shadow: 0 4px 12px 0 rgba(37, 41, 46, 0.25);\n}\n\n.walletconnect-modal__base__row__right__caret {\n height: 18px;\n opacity: 0.3;\n transition: 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);\n width: 8px;\n will-change: opacity;\n}\n\n.walletconnect-modal__base__row:hover .caret,\n.walletconnect-modal__base__row:active .caret {\n opacity: 0.6;\n}\n\n.walletconnect-modal__mobile__toggle {\n width: 80%;\n display: flex;\n margin: 0 auto;\n position: relative;\n overflow: hidden;\n border-radius: 8px;\n margin-bottom: 18px;\n background: #d4d5d9;\n}\n\n.walletconnect-modal__single_wallet {\n display: flex;\n justify-content: center;\n margin-top: 7px;\n margin-bottom: 18px;\n}\n\n.walletconnect-modal__single_wallet a {\n cursor: pointer;\n color: rgb(64, 153, 255);\n font-size: 21px;\n font-weight: 800;\n text-decoration: none !important;\n margin: 0 auto;\n}\n\n.walletconnect-modal__mobile__toggle_selector {\n width: calc(50% - 8px);\n background: white;\n position: absolute;\n border-radius: 5px;\n height: calc(100% - 8px);\n top: 4px;\n transition: all 0.2s ease-in-out;\n transform: translate3d(4px, 0, 0);\n}\n\n.walletconnect-modal__mobile__toggle.right__selected .walletconnect-modal__mobile__toggle_selector {\n transform: translate3d(calc(100% + 12px), 0, 0);\n}\n\n.walletconnect-modal__mobile__toggle a {\n font-size: 12px;\n width: 50%;\n text-align: center;\n padding: 8px;\n margin: 0;\n font-weight: 600;\n z-index: 1;\n}\n\n.walletconnect-modal__footer {\n display: flex;\n justify-content: center;\n margin-top: 20px;\n}\n\n@media only screen and (max-width: 768px) {\n .walletconnect-modal__footer {\n margin-top: 5vw;\n }\n}\n\n.walletconnect-modal__footer a {\n cursor: pointer;\n color: #898d97;\n font-size: 15px;\n margin: 0 auto;\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-modal__footer a {\n font-size: 14px;\n }\n}\n\n.walletconnect-connect__buttons__wrapper {\n max-height: 44vh;\n}\n\n.walletconnect-connect__buttons__wrapper__android {\n margin: 50% 0;\n}\n\n.walletconnect-connect__buttons__wrapper__wrap {\n display: grid;\n grid-template-columns: repeat(4, 1fr);\n margin-top: 20px;\n margin-bottom: 10px;\n}\n\n@media only screen and (min-width: 768px) {\n .walletconnect-connect__buttons__wrapper__wrap {\n margin-top: 40px;\n }\n}\n\n.walletconnect-connect__button {\n background-color: rgb(64, 153, 255);\n padding: 12px;\n border-radius: 8px;\n text-decoration: none;\n color: rgb(255, 255, 255);\n font-weight: 500;\n}\n\n.walletconnect-connect__button__icon_anchor {\n cursor: pointer;\n display: flex;\n justify-content: flex-start;\n align-items: center;\n margin: 8px;\n width: 42px;\n justify-self: center;\n flex-direction: column;\n text-decoration: none !important;\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-connect__button__icon_anchor {\n margin: 4px;\n }\n}\n\n.walletconnect-connect__button__icon {\n border-radius: 10px;\n height: 42px;\n margin: 0;\n width: 42px;\n background-size: cover !important;\n box-shadow: 0 4px 12px 0 rgba(37, 41, 46, 0.25);\n}\n\n.walletconnect-connect__button__text {\n color: #424952;\n font-size: 2.7vw;\n text-decoration: none !important;\n padding: 0;\n margin-top: 1.8vw;\n font-weight: 600;\n}\n\n@media only screen and (min-width: 768px) {\n .walletconnect-connect__button__text {\n font-size: 16px;\n margin-top: 12px;\n }\n}\n',e.head.appendChild(n)}();var r=function(){var e=i.getDocumentOrThrow(),t=e.createElement("div");return t.setAttribute("id",u),e.body.appendChild(t),t}();s.render(s.createElement(y,{text:E(),uri:e,onClose:_(t),qrcodeModalOptions:n}),r)}var I=function(){return"undefined"!==typeof t&&"undefined"!==typeof t.versions&&"undefined"!==typeof t.versions.node};var C={open:function(e,t,n){console.log(e),I()?function(e){o.toString(e,{type:"terminal"}).then(console.log)}(e):k(e,t,n)},close:function(){I()||w()}};e.exports=C}).call(this,n(35))},function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty,i="~";function o(){}function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function s(e,t,n,r,o){if("function"!==typeof n)throw new TypeError("The listener must be a function");var s=new a(n,r||e,o),u=i?i+t:t;return e._events[u]?e._events[u].fn?e._events[u]=[e._events[u],s]:e._events[u].push(s):(e._events[u]=s,e._eventsCount++),e}function u(e,t){0===--e._eventsCount?e._events=new o:delete e._events[t]}function c(){this._events=new o,this._eventsCount=0}Object.create&&(o.prototype=Object.create(null),(new o).__proto__||(i=!1)),c.prototype.eventNames=function(){var e,t,n=[];if(0===this._eventsCount)return n;for(t in e=this._events)r.call(e,t)&&n.push(i?t.slice(1):t);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(e)):n},c.prototype.listeners=function(e){var t=i?i+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,o=n.length,a=new Array(o);r=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),S(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;S(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:B(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}(e.exports);try{regeneratorRuntime=t}catch(n){Function("r","regeneratorRuntime = r")(t)}}));function g(e){return e.hasOwnProperty("result")?e.result:e}var v=function(e){function t(){var t;return(t=e.call(this)||this).name=t.constructor.name,t.message="No Clover provider was found on window.clover.",t}return s(t,e),t}(d(Error)),m=function(e){function t(){var t;return(t=e.call(this)||this).name=t.constructor.name,t.message="The user rejected the request.",t}return s(t,e),t}(d(Error)),A=function(e){function t(t){var n;return(n=e.call(this,t)||this).handleNetworkChanged=n.handleNetworkChanged.bind(h(n)),n.handleChainChanged=n.handleChainChanged.bind(h(n)),n.handleAccountsChanged=n.handleAccountsChanged.bind(h(n)),n.handleClose=n.handleClose.bind(h(n)),n}s(t,e);var n=t.prototype;return n.handleChainChanged=function(e){this.emitUpdate({chainId:e,provider:window.clover})},n.handleAccountsChanged=function(e){0===e.length?this.emitDeactivate():this.emitUpdate({account:e[0]})},n.handleClose=function(e,t){this.emitDeactivate()},n.handleNetworkChanged=function(e){this.emitUpdate({chainId:e,provider:window.clover})},n.activate=function(){var e=o(p.mark((function e(){var t;return p.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(window.clover){e.next=2;break}throw new v;case 2:return window.clover.on&&(window.clover.on("chainChanged",this.handleChainChanged),window.clover.on("accountsChanged",this.handleAccountsChanged),window.clover.on("close",this.handleClose),window.clover.on("networkChanged",this.handleNetworkChanged)),window.clover.isMetaMask&&(window.clover.autoRefreshOnNetworkChange=!1),e.prev=4,e.next=7,window.clover.send("eth_requestAccounts").then((function(e){return g(e)[0]}));case 7:t=e.sent,e.next=15;break;case 10:if(e.prev=10,e.t0=e.catch(4),4001!==e.t0.code){e.next=14;break}throw new m;case 14:case 15:if(t){e.next=19;break}return e.next=18,window.clover.enable().then((function(e){return e&&g(e)[0]}));case 18:t=e.sent;case 19:return e.abrupt("return",a({provider:window.clover},t?{account:t}:{}));case 20:case"end":return e.stop()}}),e,this,[[4,10]])})));return function(){return e.apply(this,arguments)}}(),n.getProvider=function(){var e=o(p.mark((function e(){return p.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",window.clover);case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),n.getChainId=function(){var e=o(p.mark((function e(){var t;return p.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(window.clover){e.next=2;break}throw new v;case 2:return e.prev=2,e.next=5,window.clover.send("eth_chainId").then(g);case 5:t=e.sent,e.next=11;break;case 8:e.prev=8,e.t0=e.catch(2);case 11:if(t){e.next=21;break}return e.prev=12,e.next=15,window.clover.send("net_version").then(g);case 15:t=e.sent,e.next=21;break;case 18:e.prev=18,e.t1=e.catch(12);case 21:if(!t)try{t=g(window.clover.send({method:"net_version"}))}catch(n){}return t||(t=window.clover.isDapper?g(window.clover.cachedResults.net_version):window.clover.chainId||window.clover.netVersion||window.clover.networkVersion||window.clover._chainId),e.abrupt("return",t);case 24:case"end":return e.stop()}}),e,null,[[2,8],[12,18]])})));return function(){return e.apply(this,arguments)}}(),n.getAccount=function(){var e=o(p.mark((function e(){var t;return p.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(window.clover){e.next=2;break}throw new v;case 2:return e.prev=2,e.next=5,window.clover.send("eth_accounts").then((function(e){return g(e)[0]}));case 5:t=e.sent,e.next=11;break;case 8:e.prev=8,e.t0=e.catch(2);case 11:if(t){e.next=21;break}return e.prev=12,e.next=15,window.clover.enable().then((function(e){return g(e)[0]}));case 15:t=e.sent,e.next=21;break;case 18:e.prev=18,e.t1=e.catch(12);case 21:return t||(t=g(window.clover.send({method:"eth_accounts"}))[0]),e.abrupt("return",t);case 23:case"end":return e.stop()}}),e,null,[[2,8],[12,18]])})));return function(){return e.apply(this,arguments)}}(),n.deactivate=function(){window.clover&&window.clover.removeListener&&(window.clover.removeListener("chainChanged",this.handleChainChanged),window.clover.removeListener("accountsChanged",this.handleAccountsChanged),window.clover.removeListener("close",this.handleClose),window.clover.removeListener("networkChanged",this.handleNetworkChanged))},n.isAuthorized=function(){var e=o(p.mark((function e(){return p.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(window.clover){e.next=2;break}return e.abrupt("return",!1);case 2:return e.prev=2,e.next=5,window.clover.send("eth_accounts").then((function(e){return g(e).length>0}));case 5:return e.abrupt("return",e.sent);case 8:return e.prev=8,e.t0=e.catch(2),e.abrupt("return",!1);case 11:case"end":return e.stop()}}),e,null,[[2,8]])})));return function(){return e.apply(this,arguments)}}(),t}(r.a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(102);function i(){return i=Object.assign||function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:-1;return{error:{message:t,code:n},id:e.id,jsonrpc:e.jsonrpc}}},{key:"send",value:function(e,t){var n=this;return new Promise((function(r){if("eth_subscribe"===e.method){var i=n.formatError(e,"Subscriptions are not supported by this HTTP endpoint");return n.emit("error",i),r(i)}var o=new A,a=!1,s=function(i,s){if(!a)if(o.abort(),a=!0,t)t(i,s);else{var u=e.id,c=e.jsonrpc,l=i?{id:u,jsonrpc:c,error:{message:i.message,code:i.code}}:{id:u,jsonrpc:c,result:s};n.emit("payload",l),r(l)}};o.open("POST",n.url,!0),o.setRequestHeader("Content-Type","application/json"),o.timeout=6e4,o.onerror=s,o.ontimeout=s,o.onreadystatechange=function(){if(4===o.readyState)try{var e=JSON.parse(o.responseText);s(e.error,e.result)}catch(t){s(t)}},o.send(JSON.stringify(e))}))}}]),n}(g.a),b=y,w=n(589),_=n(597),E=n(598),k=n(599),I=n(601),C=n(602),S=n(603);function x(e){try{var t=parseInt(null!==e&&void 0!==e?e:"0");return isNaN(t)?"0":null!==e&&void 0!==e?e:"0"}catch(n){return"0"}}var B=function(e){Object(s.a)(n,e);var t=Object(u.a)(n);function n(e){var a;return Object(o.a)(this,n),(a=t.call(this,{pollingInterval:e.pollingInterval||8e3})).bridge="https://bridge.walletconnect.org",a.qrcode=!0,a.qrcodeModal=h.a,a.qrcodeModalOptions=void 0,a.rpc=null,a.infuraId="",a.http=null,a.isConnecting=!1,a.connected=!1,a.connectCallbacks=[],a.accounts=[],a.chainId="1",a.rpcUrl="",a.enable=Object(i.a)(Object(r.a)().mark((function e(){var t;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.getWalletConnector();case 2:if(!(t=e.sent)){e.next=9;break}return a.start(),a.subscribeWalletConnector(),e.abrupt("return",t.accounts);case 9:throw new Error("Failed to connect to WalleConnect");case 10:case"end":return e.stop()}}),e)}))),a.request=function(){var e=Object(i.a)(Object(r.a)().mark((function e(t){return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",a.send(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),a.send=function(){var e=Object(i.a)(Object(r.a)().mark((function e(t,n){var i,o;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("string"!==typeof t){e.next=5;break}return o=n,"personal_sign"===(i=t)&&(o=Object(m.y)(o)),e.abrupt("return",a.sendAsyncPromise(i,o));case 5:if("personal_sign"===(t=Object.assign({id:Object(m.B)(),jsonrpc:"2.1"},t)).method&&(t.params=Object(m.y)(t.params)),!n){e.next=10;break}return a.sendAsync(t,n),e.abrupt("return");case 10:return e.abrupt("return",a.sendAsyncPromise(t.method,t.params));case 11:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),a.onConnect=function(e){a.connectCallbacks.push(e)},a.triggerConnect=function(e){a.connectCallbacks&&a.connectCallbacks.length&&a.connectCallbacks.forEach((function(t){return t(e)}))},a.bridge=e.connector?e.connector.bridge:e.bridge||"https://bridge.walletconnect.org",a.qrcode="undefined"===typeof e.qrcode||!1!==e.qrcode,a.qrcodeModal=e.qrcodeModal||a.qrcodeModal,a.qrcodeModalOptions=e.qrcodeModalOptions,a.wc=e.connector||new f({bridge:a.bridge,qrcodeModal:a.qrcode?a.qrcodeModal:void 0,qrcodeModalOptions:a.qrcodeModalOptions,storageId:null===e||void 0===e?void 0:e.storageId,signingMethods:null===e||void 0===e?void 0:e.signingMethods,clientMeta:null===e||void 0===e?void 0:e.clientMeta}),a.rpc=e.rpc||null,a.infuraId=e.infuraId||"",a.chainId=x((null===e||void 0===e?void 0:e.chainId)||a.chainId),a.initialize(),a}return Object(a.a)(n,[{key:"chainType",get:function(){return this.wc.chainType}},{key:"isWalletConnect",get:function(){return!0}},{key:"connector",get:function(){return this.wc}},{key:"walletMeta",get:function(){return this.wc.peerMeta}},{key:"disconnect",value:function(){var e=Object(i.a)(Object(r.a)().mark((function e(){return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.close();case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"close",value:function(){var e=Object(i.a)(Object(r.a)().mark((function e(){var t;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getWalletConnector({disableSessionCreation:!0});case 2:return t=e.sent,e.next=5,t.killSession();case 5:return e.next=7,this.onDisconnect();case 7:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"handleRequest",value:function(){var e=Object(i.a)(Object(r.a)().mark((function e(t){var n,i,o;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,i=null,e.next=4,this.getWalletConnector({disableSessionCreation:!0});case 4:o=e.sent,e.t0=t.method,e.next="dc_killSession"===e.t0?8:"eth_accounts"===e.t0?12:"eth_coinbase"===e.t0?14:"eth_chainId"===e.t0?16:"net_version"===e.t0?18:"eth_uninstallFilter"===e.t0?20:23;break;case 8:return e.next=10,this.close();case 10:return i=null,e.abrupt("break",26);case 12:return i=o.accounts,e.abrupt("break",26);case 14:return i=o.accounts[0],e.abrupt("break",26);case 16:return i=x(o.chainId),e.abrupt("break",26);case 18:return i=o.chainId,e.abrupt("break",26);case 20:return this.sendAsync(t,(function(e){return e})),i=!0,e.abrupt("break",26);case 23:return e.next=25,this.handleOtherRequests(t);case 25:n=e.sent;case 26:if(!n){e.next=28;break}return e.abrupt("return",n);case 28:return e.abrupt("return",this.formatResponse(t,i));case 31:throw e.prev=31,e.t1=e.catch(0),this.emit("error",e.t1),e.t1;case 35:case"end":return e.stop()}}),e,this,[[0,31]])})));return function(t){return e.apply(this,arguments)}}()},{key:"handleOtherRequests",value:function(){var e=Object(i.a)(Object(r.a)().mark((function e(t){var n,i;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(m.E.includes(t.method)||!t.method.startsWith("eth_")){e.next=2;break}return e.abrupt("return",this.handleReadRequests(t));case 2:return e.next=4,this.getWalletConnector({disableSessionCreation:!0});case 4:return n=e.sent,e.next=7,n.sendCustomRequest(t);case 7:return i=e.sent,e.abrupt("return",this.formatResponse(t,i));case 9:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"handleReadRequests",value:function(){var e=Object(i.a)(Object(r.a)().mark((function e(t){return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.http){e.next=2;break}return e.abrupt("return",this.formatResponse(t,{}));case 2:return e.abrupt("return",this.http.send(t));case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"formatResponse",value:function(e,t){return{id:e.id,jsonrpc:e.jsonrpc,result:t}}},{key:"getWalletConnector",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.disableSessionCreation,r=void 0!==n&&n;return new Promise((function(t,n){var i=e.wc;e.isConnecting?e.onConnect((function(e){return t(e)})):i.connected||r?(e.connected||(e.connected=!0,e.updateState(i.session)),t(i)):(e.isConnecting=!0,i.on("modal_closed",(function(){n(new Error("User closed modal"))})),i.createSession({chainId:e.chainId}).then((function(){i.on("connect",(function(r,o){if(r)return e.isConnecting=!1,n(r);e.isConnecting=!1,e.connected=!0,o&&e.updateState(o.params[0]),e.emit("connect"),e.triggerConnect(i),t(i)}))})).catch((function(t){e.isConnecting=!1,n(t)})))}))}},{key:"subscribeWalletConnector",value:function(){var e=Object(i.a)(Object(r.a)().mark((function e(){var t,n=this;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getWalletConnector();case 2:(t=e.sent).on("disconnect",(function(e){e?n.emit("error",e):n.onDisconnect()})),t.on("session_update",(function(e,t){e?n.emit("error",e):n.updateState(t.params[0])}));case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"onDisconnect",value:function(){var e=Object(i.a)(Object(r.a)().mark((function e(){return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.stop();case 2:this.emit("close",1e3,"Connection closed"),this.emit("disconnect",1e3,"Connection disconnected"),this.connected=!1;case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"updateState",value:function(){var e=Object(i.a)(Object(r.a)().mark((function e(t){var n,i,o,a,s;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.accounts,i=t.chainId,o=t.chainType,a=t.networkId,s=t.rpcUrl,(!this.accounts||n&&this.accounts!==n)&&(this.accounts=n,this.emit("accountsChanged",n)),(!this.chainId||i&&this.chainId!==i)&&(this.chainId=x(i),this.emit("chainChanged",this.chainId)),(!this.networkId||a&&this.networkId!==a)&&(this.networkId=a,this.emit("networkChanged",a)),this.updateRpcUrl(this.chainId,o,s||"");case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"updateRpcUrl",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r={infuraId:this.infuraId,custom:this.rpc||void 0};(n=n||Object(m.n)(e,r))?(this.rpcUrl=n,this.updateHttpConnection()):this.http=null}},{key:"updateHttpConnection",value:function(){var e=this;this.rpcUrl&&(this.http=new b(this.rpcUrl),this.http.on("payload",(function(t){return e.emit("payload",t)})),this.http.on("error",(function(t){return e.emit("error",t)})))}},{key:"sendAsyncPromise",value:function(e,t){var n=this;return new Promise((function(r,i){n.sendAsync({id:Object(m.B)(),jsonrpc:"2.1",method:e,params:t||[]},(function(e,t){e?i(e):r(t.result)}))}))}},{key:"initialize",value:function(){var e=this;this.updateRpcUrl(this.chainId,this.chainType),this.addProvider(new E({eth_hashrate:"0x00",eth_mining:!1,eth_syncing:!0,net_listening:!0,web3_clientVersion:"WalletConnect/v1.x.x/javascript"})),this.addProvider(new _),this.addProvider(new S),this.addProvider(new k),this.addProvider(new C),this.addProvider(new I(this.configWallet())),this.addProvider({handleRequest:function(){var t=Object(i.a)(Object(r.a)().mark((function t(n,i,o){var a,s,u;return Object(r.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.handleRequest(n);case 3:a=t.sent,s=a.error,u=a.result,o(s,u),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(0),o(t.t0);case 12:case"end":return t.stop()}}),t,null,[[0,9]])})));return function(e,n,r){return t.apply(this,arguments)}}(),setEngine:function(e){return e}})}},{key:"configWallet",value:function(){var e=this;return{getAccounts:function(){var t=Object(i.a)(Object(r.a)().mark((function t(n){var i,o;return Object(r.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.getWalletConnector();case 3:i=t.sent,(o=i.accounts)&&o.length?n(null,o):n(new Error("Failed to get accounts")),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(0),n(t.t0);case 11:case"end":return t.stop()}}),t,null,[[0,8]])})));return function(e){return t.apply(this,arguments)}}(),processMessage:function(){var t=Object(i.a)(Object(r.a)().mark((function t(n,i){var o,a;return Object(r.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.getWalletConnector();case 3:return o=t.sent,t.next=6,o.signMessage([n.from,n.data]);case 6:a=t.sent,i(null,a),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(0),i(t.t0);case 13:case"end":return t.stop()}}),t,null,[[0,10]])})));return function(e,n){return t.apply(this,arguments)}}(),processPersonalMessage:function(){var t=Object(i.a)(Object(r.a)().mark((function t(n,i){var o,a;return Object(r.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.getWalletConnector();case 3:return o=t.sent,t.next=6,o.signPersonalMessage([n.data,n.from]);case 6:a=t.sent,i(null,a),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(0),i(t.t0);case 13:case"end":return t.stop()}}),t,null,[[0,10]])})));return function(e,n){return t.apply(this,arguments)}}(),processSignTransaction:function(){var t=Object(i.a)(Object(r.a)().mark((function t(n,i){var o,a;return Object(r.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.getWalletConnector();case 3:return o=t.sent,t.next=6,o.signTransaction(n);case 6:a=t.sent,i(null,a),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(0),i(t.t0);case 13:case"end":return t.stop()}}),t,null,[[0,10]])})));return function(e,n){return t.apply(this,arguments)}}(),processTransaction:function(){var t=Object(i.a)(Object(r.a)().mark((function t(n,i){var o,a;return Object(r.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.getWalletConnector();case 3:return o=t.sent,t.next=6,o.sendTransaction(n);case 6:a=t.sent,i(null,a),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(0),i(t.t0);case 13:case"end":return t.stop()}}),t,null,[[0,10]])})));return function(e,n){return t.apply(this,arguments)}}(),processTypedMessage:function(){var t=Object(i.a)(Object(r.a)().mark((function t(n,i){var o,a;return Object(r.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.getWalletConnector();case 3:return o=t.sent,t.next=6,o.signTypedData([n.from,n.data]);case 6:a=t.sent,i(null,a),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(0),i(t.t0);case 13:case"end":return t.stop()}}),t,null,[[0,10]])})));return function(e,n){return t.apply(this,arguments)}}()}}}]),n}(w);t.a=B},function(e,t,n){var r=n(633),i=n(634),o=n(635),a=n(636),s=n(637);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t1&&"boolean"!==typeof t)throw new a('"allowMissing" argument must be a boolean');if(null===k(/^%?[^%]*%?$/g,e))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=S(e),r=n.length>0?n[0]:"",o=x("%"+r+"%",t),s=o.name,c=o.value,l=!1,f=o.alias;f&&(r=f[0],w(n,b([0,1],f)));for(var d=1,h=!0;d=n.length){var A=u(c,p);c=(h=!!A)&&"get"in A&&!("originalValue"in A.get)?A.get:c[p]}else h=y(c,p),c=c[p];h&&!l&&(g[s]=c)}}return c}},function(e,t,n){var r=n(583),i=n(574);e.exports=function(e,t){for(var n=0,o=(t=r(t,e)).length;null!=e&&n0?(r--,void setTimeout((function(){i()}),1e3)):void t(null,null)}},f.prototype._getBlockByNumber=function(e,t){var n=l({method:"eth_getBlockByNumber",params:[e,!1],skipCache:!0});this._handleAsync(n,(function(e,n){return e?t(e):t(null,n.result)}))},f.prototype._handleAsync=function(e,t){var n=this,r=-1,i=null,o=null,a=[];function s(n,r){o=n,i=r,u(a,(function(e,t){e?e(o,i,t):t()}),(function(){var n={id:e.id,jsonrpc:e.jsonrpc,result:i};null!=o?(n.error={message:o.stack||o.message||o,code:-32e3},t(o,n)):t(null,n)}))}!function t(i){if(r+=1,a.unshift(i),r>=n._providers.length)s(new Error('Request for method "'+e.method+'" not handled by any subprovider. Please check your subprovider configuration to ensure this method is handled.'));else try{n._providers[r].handleRequest(e,t,s)}catch(o){s(o)}}()},f.prototype._setCurrentBlock=function(e){this.currentBlock=e,this.emit("block",e)}},function(e,t,n){e.exports=n(721)(n(732))},function(e,t,n){var r=n(28).default,i=n(29).default,o=n(9).default,a=n(10).default,s=n(30).default,u=n(31).default,c=n(385),l=n(774),f=function(e){"use strict";s(n,e);var t=u(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(o(this,n),!r.provider)throw new Error("PollingBlockTracker - no provider specified.");var i=r.pollingInterval||2e4,a=r.retryTimeout||i/10,s=void 0===r.keepEventLoopActive||r.keepEventLoopActive,u=r.setSkipCacheFlag||!1;return(e=t.call(this,Object.assign({blockResetDuration:i},r)))._provider=r.provider,e._pollingInterval=i,e._retryTimeout=a,e._keepEventLoopActive=s,e._setSkipCacheFlag=u,e}return a(n,[{key:"checkForLatestBlock",value:function(){var e=i(r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._updateLatestBlock();case 2:return e.next=4,this.getLatestBlock();case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_start",value:function(){var e=this;this._performSync().catch((function(t){return e.emit("error",t)}))}},{key:"_performSync",value:function(){var e=i(r().mark((function e(){var t;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._isRunning){e.next=16;break}return e.prev=1,e.next=4,this._updateLatestBlock();case 4:return e.next=6,d(this._pollingInterval,!this._keepEventLoopActive);case 6:e.next=14;break;case 8:e.prev=8,e.t0=e.catch(1),t=new Error("PollingBlockTracker - encountered an error while attempting to update latest block:\n".concat(e.t0.stack));try{this.emit("error",t)}catch(n){console.error(t)}return e.next=14,d(this._retryTimeout,!this._keepEventLoopActive);case 14:e.next=0;break;case 16:case"end":return e.stop()}}),e,this,[[1,8]])})));return function(){return e.apply(this,arguments)}}()},{key:"_updateLatestBlock",value:function(){var e=i(r().mark((function e(){var t;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._fetchLatestBlock();case 2:t=e.sent,this._newPotentialLatest(t);case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_fetchLatestBlock",value:function(){var e=i(r().mark((function e(){var t,n,i=this;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t={jsonrpc:"2.0",id:1,method:"eth_blockNumber",params:[]},this._setSkipCacheFlag&&(t.skipCache=!0),e.next=4,c((function(e){return i._provider.sendAsync(t,e)}))();case 4:if(!(n=e.sent).error){e.next=7;break}throw new Error("PollingBlockTracker - encountered error fetching block:\n".concat(n.error));case 7:return e.abrupt("return",n.result);case 8:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),n}(l);function d(e,t){return new Promise((function(n){var r=setTimeout(n,e);r.unref&&t&&r.unref()}))}e.exports=f},function(e,t,n){var r=n(785),i=n(194),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(e){return i(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=u},function(e,t,n){(function(e){var r=n(162),i=n(786),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,s=a&&a.exports===o?r.Buffer:void 0,u=(s?s.isBuffer:void 0)||i;e.exports=u}).call(this,n(77)(e))},function(e,t){var n=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&n.test(e))&&e>-1&&e%1==0&&el.depthLimit)return void u(n,e,t,a);if("undefined"!==typeof l.edgesLimit&&i+1>l.edgesLimit)return void u(n,e,t,a);if(o.push(e),Array.isArray(e))for(f=0;ft?1:0}function f(e,t,n,r){"undefined"===typeof r&&(r=a());var s,u=d(e,"",0,[],void 0,0,r)||e;try{s=0===o.length?JSON.stringify(u,t,n):JSON.stringify(u,h(t),n)}catch(l){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==i.length;){var c=i.pop();4===c.length?Object.defineProperty(c[0],c[1],c[3]):c[0][c[1]]=c[2]}}return s}function d(e,t,o,a,s,c,f){var h;if(c+=1,"object"===typeof e&&null!==e){for(h=0;hf.depthLimit)return void u(n,e,t,s);if("undefined"!==typeof f.edgesLimit&&o+1>f.edgesLimit)return void u(n,e,t,s);if(a.push(e),Array.isArray(e))for(h=0;h0)for(var r=0;r3)for(n=[n],r=3;r2&&(t.children=f.slice.call(arguments,2)),n={},t)"key"!==r&&"ref"!==r&&(n[r]=t[r]);return v(e.type,n,t.key||e.key,t.ref||e.ref,null)}function j(e){var t={},n={__c:"__cC"+c++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var r,i=this;return this.getChildContext||(r=[],this.getChildContext=function(){return t[n.__c]=i,t},this.shouldComponentUpdate=function(e){i.props.value!==e.value&&r.some((function(t){t.context=e.value,_(t)}))},this.sub=function(e){r.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){r.splice(r.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Consumer.contextType=n,n.Provider.__=n,n}r={__e:function(e,t){for(var n,r;t=t.__;)if((n=t.__c)&&!n.__)try{if(n.constructor&&null!=n.constructor.getDerivedStateFromError&&(r=!0,n.setState(n.constructor.getDerivedStateFromError(e))),null!=n.componentDidCatch&&(r=!0,n.componentDidCatch(e)),r)return _(n.__E=n)}catch(t){e=t}throw e}},y.prototype.setState=function(e,t){var n;n=this.__s!==this.state?this.__s:this.__s=h({},this.state),"function"==typeof e&&(e=e(n,this.props)),e&&h(n,e),null!=e&&this.__v&&(t&&this.__h.push(t),_(this))},y.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),_(this))},y.prototype.render=A,i=[],o=0,a="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,u=l,c=0;var U,L,F,H=0,J=[],q=r.__r,G=r.diffed,z=r.__c,V=r.unmount;function W(e,t){r.__h&&r.__h(L,e,H||t),H=0;var n=L.__H||(L.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function K(e){return H=1,Y(le,e)}function Y(e,t,n){var r=W(U++,2);return r.__c||(r.__c=L,r.__=[n?n(t):le(void 0,t),function(t){var n=e(r.__[0],t);r.__[0]!==n&&(r.__[0]=n,r.__c.setState({}))}]),r.__}function Z(e,t){var n=W(U++,3);!r.__s&&ce(n.__H,t)&&(n.__=e,n.__H=t,L.__H.__h.push(n))}function X(e,t){var n=W(U++,4);!r.__s&&ce(n.__H,t)&&(n.__=e,n.__H=t,L.__h.push(n))}function $(e){return H=5,te((function(){return{current:e}}),[])}function ee(e,t,n){H=6,X((function(){"function"==typeof e?e(t()):e&&(e.current=t())}),null==n?n:n.concat(e))}function te(e,t){var n=W(U++,7);return ce(n.__H,t)?(n.__H=t,n.__h=e,n.__=e()):n.__}function ne(e,t){return H=8,te((function(){return e}),t)}function re(e){var t=L.context[e.__c],n=W(U++,9);return n.__c=e,t?(null==n.__&&(n.__=!0,t.sub(L)),t.props.value):e.__}function ie(e,t){r.useDebugValue&&r.useDebugValue(t?t(e):e)}function oe(e){var t=W(U++,10),n=K();return t.__=e,L.componentDidCatch||(L.componentDidCatch=function(e){t.__&&t.__(e),n[1](e)}),[n[0],function(){n[1](void 0)}]}function ae(){J.some((function(e){if(e.__P)try{e.__H.__h.forEach(se),e.__H.__h.forEach(ue),e.__H.__h=[]}catch(t){return e.__H.__h=[],r.__e(t,e.__v),!0}})),J=[]}function se(e){e.t&&e.t()}function ue(e){var t=e.__();"function"==typeof t&&(e.t=t)}function ce(e,t){return!e||t.some((function(t,n){return t!==e[n]}))}function le(e,t){return"function"==typeof t?t(e):t}function fe(e,t){for(var n in t)e[n]=t[n];return e}function de(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}r.__r=function(e){q&&q(e),U=0,(L=e.__c).__H&&(L.__H.__h.forEach(se),L.__H.__h.forEach(ue),L.__H.__h=[])},r.diffed=function(e){G&&G(e);var t=e.__c;if(t){var n=t.__H;n&&n.__h.length&&(1!==J.push(t)&&F===r.requestAnimationFrame||((F=r.requestAnimationFrame)||function(e){var t,n=function(){clearTimeout(r),cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);"undefined"!=typeof window&&(t=requestAnimationFrame(n))})(ae))}},r.__c=function(e,t){t.some((function(e){try{e.__h.forEach(se),e.__h=e.__h.filter((function(e){return!e.__||ue(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],r.__e(n,e.__v)}})),z&&z(e,t)},r.unmount=function(e){V&&V(e);var t=e.__c;if(t){var n=t.__H;if(n)try{n.__.forEach((function(e){return e.t&&e.t()}))}catch(e){r.__e(e,t.__v)}}};var he=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).isPureReactComponent=!0,n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.shouldComponentUpdate=function(e,t){return de(this.props,e)||de(this.state,t)},r}(y);function pe(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:de(this.props,e)}function r(t){return this.shouldComponentUpdate=n,g(e,fe({},t))}return r.prototype.isReactComponent=!0,r.displayName="Memo("+(e.displayName||e.name)+")",r.t=!0,r}var ge=r.__b;function ve(e){function t(t){var n=fe({},t);return delete n.ref,e(n,t.ref)}return t.prototype.isReactComponent=t.t=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}r.__b=function(e){e.type&&e.type.t&&e.ref&&(e.props.ref=e.ref,e.ref=null),ge&&ge(e)};var me=function(e,t){return e?I(e).reduce((function(e,n,r){return e.concat(t(n,r))}),[]):null},Ae={map:me,forEach:me,count:function(e){return e?I(e).length:0},only:function(e){if(1!==(e=I(e)).length)throw new Error("Children.only() expects only one child.");return e[0]},toArray:I},ye=r.__e;function be(e){return e&&((e=fe({},e)).__c=null,e.__k=e.__k&&e.__k.map(be)),e}function we(){this.__u=0,this.o=null,this.__b=null}function _e(e){var t=e.__.__c;return t&&t.u&&t.u(e)}function Ee(e){var t,n,r;function i(i){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return g(n,i)}return i.displayName="Lazy",i.t=!0,i}function ke(){this.i=null,this.l=null}r.__e=function(e,t,n){if(e.then)for(var r,i=t;i=i.__;)if((r=i.__c)&&r.__c)return r.__c(e,t.__c);ye(e,t,n)},(we.prototype=new y).__c=function(e,t){var n=this;null==n.o&&(n.o=[]),n.o.push(t);var r=_e(n.__v),i=!1,o=function(){i||(i=!0,r?r(a):a())};t.__c=t.componentWillUnmount,t.componentWillUnmount=function(){o(),t.__c&&t.__c()};var a=function(){var e;if(!--n.__u)for(n.__v.__k[0]=n.state.u,n.setState({u:n.__b=null});e=n.o.pop();)e.forceUpdate()};n.__u++||n.setState({u:n.__b=n.__v.__k[0]}),e.then(o,o)},we.prototype.render=function(e,t){return this.__b&&(this.__v.__k[0]=be(this.__b),this.__b=null),[g(y,null,t.u?null:e.children),t.u&&e.fallback]};var Ie=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]