diff --git a/config/session.php b/config/session.php index 6e161a5..a29d0ea 100644 --- a/config/session.php +++ b/config/session.php @@ -164,7 +164,7 @@ return [ | */ - 'secure' => env('SESSION_SECURE_COOKIE', false), + 'secure' => env('SESSION_SECURE_COOKIE', true), /* |-------------------------------------------------------------------------- @@ -192,6 +192,6 @@ return [ | */ - 'same_site' => null, + 'same_site' => 'lax', ]; diff --git a/public/js/walletlink.bundle.js b/public/js/walletlink.bundle.js new file mode 100644 index 0000000..4225001 --- /dev/null +++ b/public/js/walletlink.bundle.js @@ -0,0 +1,2 @@ +/*! For license information please see walletlink.bundle.js.LICENSE.txt */ +(()=>{var __webpack_modules__={9394:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(7187);function i(t,e,n){try{Reflect.apply(t,e,n)}catch(t){setTimeout((()=>{throw t}))}}class o extends r.EventEmitter{emit(t,...e){let n="error"===t;const r=this._events;if(void 0!==r)n=n&&void 0===r.error;else if(!n)return!1;if(n){let t;if(e.length>0&&([t]=e),t instanceof Error)throw t;const n=new Error("Unhandled error."+(t?` (${t.message})`:""));throw n.context=t,n}const o=r[t];if(void 0===o)return!1;if("function"==typeof o)i(o,this,e);else{const t=o.length,n=function(t){const e=t.length,n=new Array(e);for(let r=0;r{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(655),i=n(2403),o=function(){function t(){this._semaphore=new i.default(1)}return t.prototype.acquire=function(){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(t){switch(t.label){case 0:return[4,this._semaphore.acquire()];case 1:return[2,t.sent()[1]]}}))}))},t.prototype.runExclusive=function(t){return this._semaphore.runExclusive((function(){return t()}))},t.prototype.isLocked=function(){return this._semaphore.isLocked()},t.prototype.release=function(){this._semaphore.release()},t}();e.default=o},2403:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(655),i=function(){function t(t){if(this._maxConcurrency=t,this._queue=[],t<=0)throw new Error("semaphore must be initialized to a positive value");this._value=t}return t.prototype.acquire=function(){var t=this,e=this.isLocked(),n=new Promise((function(e){return t._queue.push(e)}));return e||this._dispatch(),n},t.prototype.runExclusive=function(t){return r.__awaiter(this,void 0,void 0,(function(){var e,n,i;return r.__generator(this,(function(r){switch(r.label){case 0:return[4,this.acquire()];case 1:e=r.sent(),n=e[0],i=e[1],r.label=2;case 2:return r.trys.push([2,,4,5]),[4,t(n)];case 3:return[2,r.sent()];case 4:return i(),[7];case 5:return[2]}}))}))},t.prototype.isLocked=function(){return this._value<=0},t.prototype.release=function(){if(this._maxConcurrency>1)throw new Error("this method is unavailabel on semaphores with concurrency > 1; use the scoped release returned by acquire instead");if(this._currentReleaser){var t=this._currentReleaser;this._currentReleaser=void 0,t()}},t.prototype._dispatch=function(){var t=this,e=this._queue.shift();if(e){var n=!1;this._currentReleaser=function(){n||(n=!0,t._value++,t._dispatch())},e([this._value--,this._currentReleaser])}},t}();e.default=i},8125:(t,e,n)=>{"use strict";e.WU=void 0;var r=n(5078);Object.defineProperty(e,"WU",{enumerable:!0,get:function(){return r.default}});n(2403),n(1960)},1960:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.withTimeout=void 0;var r=n(655);e.withTimeout=function(t,e,n){var i=this;return void 0===n&&(n=new Error("timeout")),{acquire:function(){return new Promise((function(o,s){return r.__awaiter(i,void 0,void 0,(function(){var i,a;return r.__generator(this,(function(r){switch(r.label){case 0:return i=!1,setTimeout((function(){i=!0,s(n)}),e),[4,t.acquire()];case 1:return a=r.sent(),i?(Array.isArray(a)?a[1]:a)():o(a),[2]}}))}))}))},runExclusive:function(t){return r.__awaiter(this,void 0,void 0,(function(){var e,n;return r.__generator(this,(function(r){switch(r.label){case 0:e=function(){},r.label=1;case 1:return r.trys.push([1,,7,8]),[4,this.acquire()];case 2:return n=r.sent(),Array.isArray(n)?(e=n[1],[4,t(n[0])]):[3,4];case 3:return[2,r.sent()];case 4:return e=n,[4,t()];case 5:return[2,r.sent()];case 6:return[3,8];case 7:return e(),[7];case 8:return[2]}}))}))},release:function(){t.release()},isLocked:function(){return t.isLocked()}}}},9742:(t,e)=>{"use strict";e.byteLength=function(t){var e=u(t),n=e[0],r=e[1];return 3*(n+r)/4-r},e.toByteArray=function(t){var e,n,o=u(t),s=o[0],a=o[1],c=new i(function(t,e,n){return 3*(e+n)/4-n}(0,s,a)),l=0,h=a>0?s-4:s;for(n=0;n>16&255,c[l++]=e>>8&255,c[l++]=255&e;return 2===a&&(e=r[t.charCodeAt(n)]<<2|r[t.charCodeAt(n+1)]>>4,c[l++]=255&e),1===a&&(e=r[t.charCodeAt(n)]<<10|r[t.charCodeAt(n+1)]<<4|r[t.charCodeAt(n+2)]>>2,c[l++]=e>>8&255,c[l++]=255&e),c},e.fromByteArray=function(t){for(var e,r=t.length,i=r%3,o=[],s=16383,a=0,u=r-i;au?u:a+s));return 1===i?(e=t[r-1],o.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],o.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"=")),o.join("")};for(var n=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,a=o.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function c(t,e,r){for(var i,o,s=[],a=e;a>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return s.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},7056:(t,e)=>{"use strict";var n;function r(t,e,r){if(!r||typeof r.value!==n.typeOfFunction)throw new TypeError("Only methods can be decorated with @bind. <"+e+"> is not a method!");return{configurable:n.boolTrue,get:function(){var t=r.value.bind(this);return Object.defineProperty(this,e,{value:t,configurable:n.boolTrue,writable:n.boolTrue}),t}}}Object.defineProperty(e,"__esModule",{value:!0}),function(t){t.typeOfFunction="function",t.boolTrue=!0}(n||(n={})),e.bind=r,e.default=r},3550:function(t,e,n){!function(t,e){"use strict";function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}function o(t,e,n){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(n=e,e=10),this._init(t||0,e||10,n||"be"))}var s;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:n(6601).Buffer}catch(t){}function a(t,e){var n=t.charCodeAt(e);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 "+t)}function u(t,e,n){var r=a(t,n);return n-1>=e&&(r|=a(t,n-1)<<4),r}function c(t,e,n,i){for(var o=0,s=0,a=Math.min(t.length,n),u=e;u=49?c-49+10:c>=17?c-17+10:c,r(c>=0&&s0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,n){if("number"==typeof t)return this._initNumber(t,e,n);if("object"==typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=s<>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===n)for(i=0,o=0;i>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this._strip()},o.prototype._parseHex=function(t,e,n){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=2)i=u(t,e,r)<=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(r=(t.length-e)%2==0?e+1:e;r=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(t,e,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=e)r++;r--,i=i/e|0;for(var o=t.length-n,s=o%r,a=Math.min(o,o-s)+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")]=h}catch(t){o.prototype.inspect=h}else o.prototype.inspect=h;function h(){return(this.red?""}var f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],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];function y(t,e,n){n.negative=e.negative^t.negative;var r=t.length+e.length|0;n.length=r,r=r-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,u=s/67108864|0;n.words[0]=a;for(var c=1;c>>26,h=67108863&u,f=Math.min(c,e.length-1),d=Math.max(0,c-t.length+1);d<=f;d++){var p=c-d|0;l+=(s=(i=0|t.words[p])*(o=0|e.words[d])+h)/67108864|0,h=67108863&s}n.words[c]=0|h,u=0|l}return 0!==u?n.words[c]=0|u:n.length--,n._strip()}o.prototype.toString=function(t,e){var n;if(e=0|e||1,16===(t=t||10)||"hex"===t){n="";for(var i=0,o=0,s=0;s>>24-i&16777215)||s!==this.length-1?f[6-u.length]+u+n:u+n,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(n=o.toString(16)+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var c=d[t],l=p[t];n="";var h=this.clone();for(h.negative=0;!h.isZero();){var y=h.modrn(l).toString(t);n=(h=h.idivn(l)).isZero()?y+n:f[c-y.length]+y+n}for(this.isZero()&&(n="0"+n);n.length%e!=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 t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16,2)},s&&(o.prototype.toBuffer=function(t,e){return this.toArrayLike(s,t,e)}),o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,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 s=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this["_toArrayLike"+("le"===e?"LE":"BE")](s,i),s},o.prototype._toArrayLikeLE=function(t,e){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=s>>>24,o+=2)}if(n=0&&(t[n--]=s>>8&255),n>=0&&(t[n--]=s>>16&255),6===o?(n>=0&&(t[n--]=s>>24&255),r=0,o=0):(r=s>>>24,o+=2)}if(n>=0)for(t[n--]=r;n>=0;)t[n--]=0},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,n=0;return e>=4096&&(n+=13,e>>>=13),e>=64&&(n+=7,e>>>=7),e>=8&&(n+=4,e>>>=4),e>=2&&(n+=2,e>>>=2),n+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,n=0;return 0==(8191&e)&&(n+=13,e>>>=13),0==(127&e)&&(n+=7,e>>>=7),0==(15&e)&&(n+=4,e>>>=4),0==(3&e)&&(n+=2,e>>>=2),0==(1&e)&&n++,n},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var n=0;nt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,n;this.length>t.length?(e=this,n=t):(e=t,n=this);for(var r=0;rt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-n),this._strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var n=t/26|0,i=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<t.length?(n=this,r=t):(n=t,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(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var n,r,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=t):(n=t,r=this);for(var o=0,s=0;s>26,this.words[s]=67108863&e;for(;0!==o&&s>26,this.words[s]=67108863&e;if(0===o&&s>>13,d=0|s[1],p=8191&d,y=d>>>13,g=0|s[2],b=8191&g,m=g>>>13,v=0|s[3],w=8191&v,_=v>>>13,E=0|s[4],S=8191&E,k=E>>>13,x=0|s[5],M=8191&x,A=x>>>13,T=0|s[6],I=8191&T,C=T>>>13,R=0|s[7],N=8191&R,O=R>>>13,L=0|s[8],j=8191&L,P=L>>>13,B=0|s[9],D=8191&B,U=B>>>13,F=0|a[0],H=8191&F,W=F>>>13,z=0|a[1],q=8191&z,V=z>>>13,Z=0|a[2],G=8191&Z,Y=Z>>>13,$=0|a[3],J=8191&$,K=$>>>13,Q=0|a[4],X=8191&Q,tt=Q>>>13,et=0|a[5],nt=8191&et,rt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ct=at>>>13,lt=0|a[8],ht=8191<,ft=lt>>>13,dt=0|a[9],pt=8191&dt,yt=dt>>>13;n.negative=t.negative^e.negative,n.length=19;var gt=(c+(r=Math.imul(h,H))|0)+((8191&(i=(i=Math.imul(h,W))+Math.imul(f,H)|0))<<13)|0;c=((o=Math.imul(f,W))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,H),i=(i=Math.imul(p,W))+Math.imul(y,H)|0,o=Math.imul(y,W);var bt=(c+(r=r+Math.imul(h,q)|0)|0)+((8191&(i=(i=i+Math.imul(h,V)|0)+Math.imul(f,q)|0))<<13)|0;c=((o=o+Math.imul(f,V)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(b,H),i=(i=Math.imul(b,W))+Math.imul(m,H)|0,o=Math.imul(m,W),r=r+Math.imul(p,q)|0,i=(i=i+Math.imul(p,V)|0)+Math.imul(y,q)|0,o=o+Math.imul(y,V)|0;var mt=(c+(r=r+Math.imul(h,G)|0)|0)+((8191&(i=(i=i+Math.imul(h,Y)|0)+Math.imul(f,G)|0))<<13)|0;c=((o=o+Math.imul(f,Y)|0)+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,r=Math.imul(w,H),i=(i=Math.imul(w,W))+Math.imul(_,H)|0,o=Math.imul(_,W),r=r+Math.imul(b,q)|0,i=(i=i+Math.imul(b,V)|0)+Math.imul(m,q)|0,o=o+Math.imul(m,V)|0,r=r+Math.imul(p,G)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(y,G)|0,o=o+Math.imul(y,Y)|0;var vt=(c+(r=r+Math.imul(h,J)|0)|0)+((8191&(i=(i=i+Math.imul(h,K)|0)+Math.imul(f,J)|0))<<13)|0;c=((o=o+Math.imul(f,K)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(S,H),i=(i=Math.imul(S,W))+Math.imul(k,H)|0,o=Math.imul(k,W),r=r+Math.imul(w,q)|0,i=(i=i+Math.imul(w,V)|0)+Math.imul(_,q)|0,o=o+Math.imul(_,V)|0,r=r+Math.imul(b,G)|0,i=(i=i+Math.imul(b,Y)|0)+Math.imul(m,G)|0,o=o+Math.imul(m,Y)|0,r=r+Math.imul(p,J)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(y,J)|0,o=o+Math.imul(y,K)|0;var wt=(c+(r=r+Math.imul(h,X)|0)|0)+((8191&(i=(i=i+Math.imul(h,tt)|0)+Math.imul(f,X)|0))<<13)|0;c=((o=o+Math.imul(f,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(M,H),i=(i=Math.imul(M,W))+Math.imul(A,H)|0,o=Math.imul(A,W),r=r+Math.imul(S,q)|0,i=(i=i+Math.imul(S,V)|0)+Math.imul(k,q)|0,o=o+Math.imul(k,V)|0,r=r+Math.imul(w,G)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(_,G)|0,o=o+Math.imul(_,Y)|0,r=r+Math.imul(b,J)|0,i=(i=i+Math.imul(b,K)|0)+Math.imul(m,J)|0,o=o+Math.imul(m,K)|0,r=r+Math.imul(p,X)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(y,X)|0,o=o+Math.imul(y,tt)|0;var _t=(c+(r=r+Math.imul(h,nt)|0)|0)+((8191&(i=(i=i+Math.imul(h,rt)|0)+Math.imul(f,nt)|0))<<13)|0;c=((o=o+Math.imul(f,rt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(I,H),i=(i=Math.imul(I,W))+Math.imul(C,H)|0,o=Math.imul(C,W),r=r+Math.imul(M,q)|0,i=(i=i+Math.imul(M,V)|0)+Math.imul(A,q)|0,o=o+Math.imul(A,V)|0,r=r+Math.imul(S,G)|0,i=(i=i+Math.imul(S,Y)|0)+Math.imul(k,G)|0,o=o+Math.imul(k,Y)|0,r=r+Math.imul(w,J)|0,i=(i=i+Math.imul(w,K)|0)+Math.imul(_,J)|0,o=o+Math.imul(_,K)|0,r=r+Math.imul(b,X)|0,i=(i=i+Math.imul(b,tt)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,tt)|0,r=r+Math.imul(p,nt)|0,i=(i=i+Math.imul(p,rt)|0)+Math.imul(y,nt)|0,o=o+Math.imul(y,rt)|0;var Et=(c+(r=r+Math.imul(h,ot)|0)|0)+((8191&(i=(i=i+Math.imul(h,st)|0)+Math.imul(f,ot)|0))<<13)|0;c=((o=o+Math.imul(f,st)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(N,H),i=(i=Math.imul(N,W))+Math.imul(O,H)|0,o=Math.imul(O,W),r=r+Math.imul(I,q)|0,i=(i=i+Math.imul(I,V)|0)+Math.imul(C,q)|0,o=o+Math.imul(C,V)|0,r=r+Math.imul(M,G)|0,i=(i=i+Math.imul(M,Y)|0)+Math.imul(A,G)|0,o=o+Math.imul(A,Y)|0,r=r+Math.imul(S,J)|0,i=(i=i+Math.imul(S,K)|0)+Math.imul(k,J)|0,o=o+Math.imul(k,K)|0,r=r+Math.imul(w,X)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,tt)|0,r=r+Math.imul(b,nt)|0,i=(i=i+Math.imul(b,rt)|0)+Math.imul(m,nt)|0,o=o+Math.imul(m,rt)|0,r=r+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,st)|0)+Math.imul(y,ot)|0,o=o+Math.imul(y,st)|0;var St=(c+(r=r+Math.imul(h,ut)|0)|0)+((8191&(i=(i=i+Math.imul(h,ct)|0)+Math.imul(f,ut)|0))<<13)|0;c=((o=o+Math.imul(f,ct)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(j,H),i=(i=Math.imul(j,W))+Math.imul(P,H)|0,o=Math.imul(P,W),r=r+Math.imul(N,q)|0,i=(i=i+Math.imul(N,V)|0)+Math.imul(O,q)|0,o=o+Math.imul(O,V)|0,r=r+Math.imul(I,G)|0,i=(i=i+Math.imul(I,Y)|0)+Math.imul(C,G)|0,o=o+Math.imul(C,Y)|0,r=r+Math.imul(M,J)|0,i=(i=i+Math.imul(M,K)|0)+Math.imul(A,J)|0,o=o+Math.imul(A,K)|0,r=r+Math.imul(S,X)|0,i=(i=i+Math.imul(S,tt)|0)+Math.imul(k,X)|0,o=o+Math.imul(k,tt)|0,r=r+Math.imul(w,nt)|0,i=(i=i+Math.imul(w,rt)|0)+Math.imul(_,nt)|0,o=o+Math.imul(_,rt)|0,r=r+Math.imul(b,ot)|0,i=(i=i+Math.imul(b,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0,r=r+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(y,ut)|0,o=o+Math.imul(y,ct)|0;var kt=(c+(r=r+Math.imul(h,ht)|0)|0)+((8191&(i=(i=i+Math.imul(h,ft)|0)+Math.imul(f,ht)|0))<<13)|0;c=((o=o+Math.imul(f,ft)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(D,H),i=(i=Math.imul(D,W))+Math.imul(U,H)|0,o=Math.imul(U,W),r=r+Math.imul(j,q)|0,i=(i=i+Math.imul(j,V)|0)+Math.imul(P,q)|0,o=o+Math.imul(P,V)|0,r=r+Math.imul(N,G)|0,i=(i=i+Math.imul(N,Y)|0)+Math.imul(O,G)|0,o=o+Math.imul(O,Y)|0,r=r+Math.imul(I,J)|0,i=(i=i+Math.imul(I,K)|0)+Math.imul(C,J)|0,o=o+Math.imul(C,K)|0,r=r+Math.imul(M,X)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,tt)|0,r=r+Math.imul(S,nt)|0,i=(i=i+Math.imul(S,rt)|0)+Math.imul(k,nt)|0,o=o+Math.imul(k,rt)|0,r=r+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,r=r+Math.imul(b,ut)|0,i=(i=i+Math.imul(b,ct)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ct)|0,r=r+Math.imul(p,ht)|0,i=(i=i+Math.imul(p,ft)|0)+Math.imul(y,ht)|0,o=o+Math.imul(y,ft)|0;var xt=(c+(r=r+Math.imul(h,pt)|0)|0)+((8191&(i=(i=i+Math.imul(h,yt)|0)+Math.imul(f,pt)|0))<<13)|0;c=((o=o+Math.imul(f,yt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(D,q),i=(i=Math.imul(D,V))+Math.imul(U,q)|0,o=Math.imul(U,V),r=r+Math.imul(j,G)|0,i=(i=i+Math.imul(j,Y)|0)+Math.imul(P,G)|0,o=o+Math.imul(P,Y)|0,r=r+Math.imul(N,J)|0,i=(i=i+Math.imul(N,K)|0)+Math.imul(O,J)|0,o=o+Math.imul(O,K)|0,r=r+Math.imul(I,X)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(C,X)|0,o=o+Math.imul(C,tt)|0,r=r+Math.imul(M,nt)|0,i=(i=i+Math.imul(M,rt)|0)+Math.imul(A,nt)|0,o=o+Math.imul(A,rt)|0,r=r+Math.imul(S,ot)|0,i=(i=i+Math.imul(S,st)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,st)|0,r=r+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ct)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ct)|0,r=r+Math.imul(b,ht)|0,i=(i=i+Math.imul(b,ft)|0)+Math.imul(m,ht)|0,o=o+Math.imul(m,ft)|0;var Mt=(c+(r=r+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,yt)|0)+Math.imul(y,pt)|0))<<13)|0;c=((o=o+Math.imul(y,yt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(D,G),i=(i=Math.imul(D,Y))+Math.imul(U,G)|0,o=Math.imul(U,Y),r=r+Math.imul(j,J)|0,i=(i=i+Math.imul(j,K)|0)+Math.imul(P,J)|0,o=o+Math.imul(P,K)|0,r=r+Math.imul(N,X)|0,i=(i=i+Math.imul(N,tt)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,tt)|0,r=r+Math.imul(I,nt)|0,i=(i=i+Math.imul(I,rt)|0)+Math.imul(C,nt)|0,o=o+Math.imul(C,rt)|0,r=r+Math.imul(M,ot)|0,i=(i=i+Math.imul(M,st)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,st)|0,r=r+Math.imul(S,ut)|0,i=(i=i+Math.imul(S,ct)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,ct)|0,r=r+Math.imul(w,ht)|0,i=(i=i+Math.imul(w,ft)|0)+Math.imul(_,ht)|0,o=o+Math.imul(_,ft)|0;var At=(c+(r=r+Math.imul(b,pt)|0)|0)+((8191&(i=(i=i+Math.imul(b,yt)|0)+Math.imul(m,pt)|0))<<13)|0;c=((o=o+Math.imul(m,yt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(D,J),i=(i=Math.imul(D,K))+Math.imul(U,J)|0,o=Math.imul(U,K),r=r+Math.imul(j,X)|0,i=(i=i+Math.imul(j,tt)|0)+Math.imul(P,X)|0,o=o+Math.imul(P,tt)|0,r=r+Math.imul(N,nt)|0,i=(i=i+Math.imul(N,rt)|0)+Math.imul(O,nt)|0,o=o+Math.imul(O,rt)|0,r=r+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,st)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,st)|0,r=r+Math.imul(M,ut)|0,i=(i=i+Math.imul(M,ct)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,ct)|0,r=r+Math.imul(S,ht)|0,i=(i=i+Math.imul(S,ft)|0)+Math.imul(k,ht)|0,o=o+Math.imul(k,ft)|0;var Tt=(c+(r=r+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,yt)|0)+Math.imul(_,pt)|0))<<13)|0;c=((o=o+Math.imul(_,yt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(D,X),i=(i=Math.imul(D,tt))+Math.imul(U,X)|0,o=Math.imul(U,tt),r=r+Math.imul(j,nt)|0,i=(i=i+Math.imul(j,rt)|0)+Math.imul(P,nt)|0,o=o+Math.imul(P,rt)|0,r=r+Math.imul(N,ot)|0,i=(i=i+Math.imul(N,st)|0)+Math.imul(O,ot)|0,o=o+Math.imul(O,st)|0,r=r+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,ct)|0)+Math.imul(C,ut)|0,o=o+Math.imul(C,ct)|0,r=r+Math.imul(M,ht)|0,i=(i=i+Math.imul(M,ft)|0)+Math.imul(A,ht)|0,o=o+Math.imul(A,ft)|0;var It=(c+(r=r+Math.imul(S,pt)|0)|0)+((8191&(i=(i=i+Math.imul(S,yt)|0)+Math.imul(k,pt)|0))<<13)|0;c=((o=o+Math.imul(k,yt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(D,nt),i=(i=Math.imul(D,rt))+Math.imul(U,nt)|0,o=Math.imul(U,rt),r=r+Math.imul(j,ot)|0,i=(i=i+Math.imul(j,st)|0)+Math.imul(P,ot)|0,o=o+Math.imul(P,st)|0,r=r+Math.imul(N,ut)|0,i=(i=i+Math.imul(N,ct)|0)+Math.imul(O,ut)|0,o=o+Math.imul(O,ct)|0,r=r+Math.imul(I,ht)|0,i=(i=i+Math.imul(I,ft)|0)+Math.imul(C,ht)|0,o=o+Math.imul(C,ft)|0;var Ct=(c+(r=r+Math.imul(M,pt)|0)|0)+((8191&(i=(i=i+Math.imul(M,yt)|0)+Math.imul(A,pt)|0))<<13)|0;c=((o=o+Math.imul(A,yt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,r=Math.imul(D,ot),i=(i=Math.imul(D,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),r=r+Math.imul(j,ut)|0,i=(i=i+Math.imul(j,ct)|0)+Math.imul(P,ut)|0,o=o+Math.imul(P,ct)|0,r=r+Math.imul(N,ht)|0,i=(i=i+Math.imul(N,ft)|0)+Math.imul(O,ht)|0,o=o+Math.imul(O,ft)|0;var Rt=(c+(r=r+Math.imul(I,pt)|0)|0)+((8191&(i=(i=i+Math.imul(I,yt)|0)+Math.imul(C,pt)|0))<<13)|0;c=((o=o+Math.imul(C,yt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(D,ut),i=(i=Math.imul(D,ct))+Math.imul(U,ut)|0,o=Math.imul(U,ct),r=r+Math.imul(j,ht)|0,i=(i=i+Math.imul(j,ft)|0)+Math.imul(P,ht)|0,o=o+Math.imul(P,ft)|0;var Nt=(c+(r=r+Math.imul(N,pt)|0)|0)+((8191&(i=(i=i+Math.imul(N,yt)|0)+Math.imul(O,pt)|0))<<13)|0;c=((o=o+Math.imul(O,yt)|0)+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,r=Math.imul(D,ht),i=(i=Math.imul(D,ft))+Math.imul(U,ht)|0,o=Math.imul(U,ft);var Ot=(c+(r=r+Math.imul(j,pt)|0)|0)+((8191&(i=(i=i+Math.imul(j,yt)|0)+Math.imul(P,pt)|0))<<13)|0;c=((o=o+Math.imul(P,yt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863;var Lt=(c+(r=Math.imul(D,pt))|0)+((8191&(i=(i=Math.imul(D,yt))+Math.imul(U,pt)|0))<<13)|0;return c=((o=Math.imul(U,yt))+(i>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,u[0]=gt,u[1]=bt,u[2]=mt,u[3]=vt,u[4]=wt,u[5]=_t,u[6]=Et,u[7]=St,u[8]=kt,u[9]=xt,u[10]=Mt,u[11]=At,u[12]=Tt,u[13]=It,u[14]=Ct,u[15]=Rt,u[16]=Nt,u[17]=Ot,u[18]=Lt,0!==c&&(u[19]=c,n.length++),n};function b(t,e,n){n.negative=e.negative^t.negative,n.length=t.length+e.length;for(var r=0,i=0,o=0;o>>26)|0)>>>26,s&=67108863}n.words[o]=a,r=s,s=i}return 0!==r?n.words[o]=r:n.length--,n._strip()}function m(t,e,n){return b(t,e,n)}function v(t,e){this.x=t,this.y=e}Math.imul||(g=y),o.prototype.mulTo=function(t,e){var n=this.length+t.length;return 10===this.length&&10===t.length?g(this,t,e):n<63?y(this,t,e):n<1024?b(this,t,e):m(this,t,e)},v.prototype.makeRBT=function(t){for(var e=new Array(t),n=o.prototype._countBits(t)-1,r=0;r>=1;return r},v.prototype.permute=function(t,e,n,r,i,o){for(var s=0;s>>=1)i++;return 1<>>=13,n[2*s+1]=8191&o,o>>>=13;for(s=2*e;s>=26,n+=o/67108864|0,n+=s>>>26,this.words[i]=67108863&s}return 0!==n&&(this.words[i]=n,this.length++),e?this.ineg():this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),n=0;n>>i&1}return e}(t);if(0===e.length)return new o(1);for(var n=this,r=0;r=0);var e,n=t%26,i=(t-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var s=0;for(e=0;e>>26-n}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<s)for(this.length-=s,c=0;c=0&&(0!==l||c>=i);c--){var h=0|this.words[c];this.words[c]=l<<26-o|h>>>o,l=h&a}return u&&0!==l&&(u.words[u.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(t,e,n){return r(0===this.negative),this.iushrn(t,e,n)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26,i=1<=0);var e=t%26,n=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(r("number"==typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[i+n]=67108863&o}for(;i>26,this.words[i+n]=67108863&o;if(0===a)return this._strip();for(r(-1===a),a=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,e){var n=(this.length,t.length),r=this.clone(),i=t,s=0|i.words[i.length-1];0!=(n=26-this._countBits(s))&&(i=i.ushln(n),r.iushln(n),s=0|i.words[i.length-1]);var a,u=r.length-i.length;if("mod"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var c=0;c=0;h--){var f=67108864*(0|r.words[i.length+h])+(0|r.words[i.length+h-1]);for(f=Math.min(f/s|0,67108863),r._ishlnsubmul(i,f,h);0!==r.negative;)f--,r.negative=0,r._ishlnsubmul(i,1,h),r.isZero()||(r.negative^=1);a&&(a.words[h]=f)}return a&&a._strip(),r._strip(),"div"!==e&&0!==n&&r.iushrn(n),{div:a||null,mod:r}},o.prototype.divmod=function(t,e,n){return r(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(s=a.mod.neg(),n&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),n&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modrn(t.words[0]))}:this._wordDiv(t,e);var i,s,a},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var n=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),i=t.andln(1),o=n.cmp(r);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modrn=function(t){var e=t<0;e&&(t=-t),r(t<=67108863);for(var n=(1<<26)%t,i=0,o=this.length-1;o>=0;o--)i=(n*i+(0|this.words[o]))%t;return e?-i:i},o.prototype.modn=function(t){return this.modrn(t)},o.prototype.idivn=function(t){var e=t<0;e&&(t=-t),r(t<=67108863);for(var n=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*n;this.words[i]=o/t|0,n=o%t}return this._strip(),e?this.ineg():this},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),c=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++c;for(var l=n.clone(),h=e.clone();!e.isZero();){for(var f=0,d=1;0==(e.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(e.iushrn(f);f-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(l),s.isub(h)),i.iushrn(1),s.iushrn(1);for(var p=0,y=1;0==(n.words[0]&y)&&p<26;++p,y<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(l),u.isub(h)),a.iushrn(1),u.iushrn(1);e.cmp(n)>=0?(e.isub(n),i.isub(a),s.isub(u)):(n.isub(e),a.isub(i),u.isub(s))}return{a,b:u,gcd:n.iushln(c)}},o.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),a=new o(0),u=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,l=1;0==(e.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(e.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var h=0,f=1;0==(n.words[0]&f)&&h<26;++h,f<<=1);if(h>0)for(n.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(n)>=0?(e.isub(n),s.isub(a)):(n.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),n=t.clone();e.negative=0,n.negative=0;for(var r=0;e.isEven()&&n.isEven();r++)e.iushrn(1),n.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=e.cmp(n);if(i<0){var o=e;e=n,n=o}else if(0===i||0===n.cmpn(1))break;e.isub(n)}return n.iushln(r)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){r("number"==typeof t);var e=t%26,n=(t-e)/26,i=1<>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)e=1;else{n&&(t=-t),r(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;n--){var r=0|this.words[n],i=0|t.words[n];if(r!==i){ri&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new M(t)},o.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},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(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var w={k256:null,p224:null,p192:null,p25519:null};function _(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function E(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function S(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function k(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function x(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function A(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}_.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},_.prototype.ireduce=function(t){var e,n=t;do{this.split(n,this.tmp),e=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},_.prototype.split=function(t,e){t.iushrn(this.n,0,e)},_.prototype.imulK=function(t){return t.imul(this.k)},i(E,_),E.prototype.split=function(t,e){for(var n=4194303,r=Math.min(t.length,9),i=0;i>>22,o=s}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},E.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,n=0;n>>=26,t.words[n]=i,e=r}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(w[t])return w[t];var e;if("k256"===t)e=new E;else if("p224"===t)e=new S;else if("p192"===t)e=new k;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new x}return w[t]=e,e},M.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(l(t,t.umod(this.m)._forceRed(this)),t)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var n=t.add(e);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var n=t.iadd(e);return n.cmp(this.m)>=0&&n.isub(this.m),n},M.prototype.sub=function(t,e){this._verify2(t,e);var n=t.sub(e);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var n=t.isub(e);return n.cmpn(0)<0&&n.iadd(this.m),n},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var n=this.m.add(new o(1)).iushrn(2);return this.pow(t,n)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);r(!i.isZero());var a=new o(1).toRed(this),u=a.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 h=this.pow(l,i),f=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=s;0!==d.cmp(a);){for(var y=d,g=0;0!==y.cmp(a);g++)y=y.redSqr();r(g=0;r--){for(var c=e.words[r],l=u-1;l>=0;l--){var h=c>>l&1;i!==n[0]&&(i=this.sqr(i)),0!==h||0!==s?(s<<=1,s|=h,(4==++a||0===r&&0===l)&&(i=this.mul(i,n[s]),a=0,s=0)):a=0}u=26}return i},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new A(t)},i(A,M),A.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},A.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},A.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var n=t.imul(e),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)},A.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var n=t.mul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},A.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=n.nmd(t),this)},8764:(t,e,n)=>{"use strict";const r=n(9742),i=n(645),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=u,e.SlowBuffer=function(t){return+t!=t&&(t=0),u.alloc(+t)},e.INSPECT_MAX_BYTES=50;const s=2147483647;function a(t){if(t>s)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,u.prototype),e}function u(t,e,n){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return h(t)}return c(t,e,n)}function c(t,e,n){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!u.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const n=0|y(t,e);let r=a(n);const i=r.write(t,e);return i!==n&&(r=r.slice(0,i)),r}(t,e);if(ArrayBuffer.isView(t))return function(t){if($(t,Uint8Array)){const e=new Uint8Array(t);return d(e.buffer,e.byteOffset,e.byteLength)}return f(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if($(t,ArrayBuffer)||t&&$(t.buffer,ArrayBuffer))return d(t,e,n);if("undefined"!=typeof SharedArrayBuffer&&($(t,SharedArrayBuffer)||t&&$(t.buffer,SharedArrayBuffer)))return d(t,e,n);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=t.valueOf&&t.valueOf();if(null!=r&&r!==t)return u.from(r,e,n);const i=function(t){if(u.isBuffer(t)){const e=0|p(t.length),n=a(e);return 0===n.length||t.copy(n,0,0,e),n}return void 0!==t.length?"number"!=typeof t.length||J(t.length)?a(0):f(t):"Buffer"===t.type&&Array.isArray(t.data)?f(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return u.from(t[Symbol.toPrimitive]("string"),e,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function h(t){return l(t),a(t<0?0:0|p(t))}function f(t){const e=t.length<0?0:0|p(t.length),n=a(e);for(let r=0;r=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|t}function y(t,e){if(u.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||$(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const n=t.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return Z(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return G(t).length;default:if(i)return r?-1:Z(t).length;e=(""+e).toLowerCase(),i=!0}}function g(t,e,n){let r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return C(this,e,n);case"utf8":case"utf-8":return M(this,e,n);case"ascii":return T(this,e,n);case"latin1":case"binary":return I(this,e,n);case"base64":return x(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function b(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function m(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),J(n=+n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=u.from(e,r)),u.isBuffer(e))return 0===e.length?-1:v(t,e,n,r,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):v(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function v(t,e,n,r,i){let o,s=1,a=t.length,u=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,n/=2}function c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){let r=-1;for(o=n;oa&&(n=a-u),o=n;o>=0;o--){let n=!0;for(let r=0;ri&&(r=i):r=i;const o=e.length;let s;for(r>o/2&&(r=o/2),s=0;s>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function x(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function M(t,e,n){n=Math.min(t.length,n);const r=[];let i=e;for(;i239?4:e>223?3:e>191?2:1;if(i+s<=n){let n,r,a,u;switch(s){case 1:e<128&&(o=e);break;case 2:n=t[i+1],128==(192&n)&&(u=(31&e)<<6|63&n,u>127&&(o=u));break;case 3:n=t[i+1],r=t[i+2],128==(192&n)&&128==(192&r)&&(u=(15&e)<<12|(63&n)<<6|63&r,u>2047&&(u<55296||u>57343)&&(o=u));break;case 4:n=t[i+1],r=t[i+2],a=t[i+3],128==(192&n)&&128==(192&r)&&128==(192&a)&&(u=(15&e)<<18|(63&n)<<12|(63&r)<<6|63&a,u>65535&&u<1114112&&(o=u))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=s}return function(t){const e=t.length;if(e<=A)return String.fromCharCode.apply(String,t);let n="",r=0;for(;rr.length?(u.isBuffer(e)||(e=u.from(e)),e.copy(r,i)):Uint8Array.prototype.set.call(r,e,i);else{if(!u.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(r,i)}i+=e.length}return r},u.byteLength=y,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;en&&(t+=" ... "),""},o&&(u.prototype[o]=u.prototype.inspect),u.prototype.compare=function(t,e,n,r,i){if($(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(this===t)return 0;let o=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(e>>>=0);const a=Math.min(o,s),c=this.slice(r,i),l=t.slice(e,n);for(let t=0;t>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let o=!1;for(;;)switch(r){case"hex":return w(this,t,e,n);case"utf8":case"utf-8":return _(this,t,e,n);case"ascii":case"latin1":case"binary":return E(this,t,e,n);case"base64":return S(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,e,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)}};const A=4096;function T(t,e,n){let r="";n=Math.min(t.length,n);for(let i=e;ir)&&(n=r);let i="";for(let r=e;rn)throw new RangeError("Trying to access beyond buffer length")}function O(t,e,n,r,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function L(t,e,n,r,i){W(e,r,i,t,n,7);let o=Number(e&BigInt(4294967295));t[n++]=o,o>>=8,t[n++]=o,o>>=8,t[n++]=o,o>>=8,t[n++]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[n++]=s,s>>=8,t[n++]=s,s>>=8,t[n++]=s,s>>=8,t[n++]=s,n}function j(t,e,n,r,i){W(e,r,i,t,n,7);let o=Number(e&BigInt(4294967295));t[n+7]=o,o>>=8,t[n+6]=o,o>>=8,t[n+5]=o,o>>=8,t[n+4]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[n+3]=s,s>>=8,t[n+2]=s,s>>=8,t[n+1]=s,s>>=8,t[n]=s,n+8}function P(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function B(t,e,n,r,o){return e=+e,n>>>=0,o||P(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function D(t,e,n,r,o){return e=+e,n>>>=0,o||P(t,0,n,8),i.write(t,e,n,r,52,8),n+8}u.prototype.slice=function(t,e){const n=this.length;(t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e>>=0,e>>>=0,n||N(t,e,this.length);let r=this[t],i=1,o=0;for(;++o>>=0,e>>>=0,n||N(t,e,this.length);let r=this[t+--e],i=1;for(;e>0&&(i*=256);)r+=this[t+--e]*i;return r},u.prototype.readUint8=u.prototype.readUInt8=function(t,e){return t>>>=0,e||N(t,1,this.length),this[t]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(t,e){return t>>>=0,e||N(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(t,e){return t>>>=0,e||N(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(t,e){return t>>>=0,e||N(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(t,e){return t>>>=0,e||N(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readBigUInt64LE=Q((function(t){z(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||q(t,this.length-8);const r=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,i=this[++t]+256*this[++t]+65536*this[++t]+n*2**24;return BigInt(r)+(BigInt(i)<>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||q(t,this.length-8);const r=e*2**24+65536*this[++t]+256*this[++t]+this[++t],i=this[++t]*2**24+65536*this[++t]+256*this[++t]+n;return(BigInt(r)<>>=0,e>>>=0,n||N(t,e,this.length);let r=this[t],i=1,o=0;for(;++o=i&&(r-=Math.pow(2,8*e)),r},u.prototype.readIntBE=function(t,e,n){t>>>=0,e>>>=0,n||N(t,e,this.length);let r=e,i=1,o=this[t+--r];for(;r>0&&(i*=256);)o+=this[t+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return t>>>=0,e||N(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){t>>>=0,e||N(t,2,this.length);const n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(t,e){t>>>=0,e||N(t,2,this.length);const n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(t,e){return t>>>=0,e||N(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return t>>>=0,e||N(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readBigInt64LE=Q((function(t){z(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||q(t,this.length-8);const r=this[t+4]+256*this[t+5]+65536*this[t+6]+(n<<24);return(BigInt(r)<>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||q(t,this.length-8);const r=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(r)<>>=0,e||N(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return t>>>=0,e||N(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return t>>>=0,e||N(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return t>>>=0,e||N(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(t,e,n,r){t=+t,e>>>=0,n>>>=0,r||O(this,t,e,n,Math.pow(2,8*n)-1,0);let i=1,o=0;for(this[e]=255&t;++o>>=0,n>>>=0,r||O(this,t,e,n,Math.pow(2,8*n)-1,0);let i=n-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+n},u.prototype.writeUint8=u.prototype.writeUInt8=function(t,e,n){return t=+t,e>>>=0,n||O(this,t,e,1,255,0),this[e]=255&t,e+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(t,e,n){return t=+t,e>>>=0,n||O(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(t,e,n){return t=+t,e>>>=0,n||O(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(t,e,n){return t=+t,e>>>=0,n||O(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(t,e,n){return t=+t,e>>>=0,n||O(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeBigUInt64LE=Q((function(t,e=0){return L(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeBigUInt64BE=Q((function(t,e=0){return j(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e>>>=0,!r){const r=Math.pow(2,8*n-1);O(this,t,e,n,r-1,-r)}let i=0,o=1,s=0;for(this[e]=255&t;++i>0)-s&255;return e+n},u.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e>>>=0,!r){const r=Math.pow(2,8*n-1);O(this,t,e,n,r-1,-r)}let i=n-1,o=1,s=0;for(this[e+i]=255&t;--i>=0&&(o*=256);)t<0&&0===s&&0!==this[e+i+1]&&(s=1),this[e+i]=(t/o>>0)-s&255;return e+n},u.prototype.writeInt8=function(t,e,n){return t=+t,e>>>=0,n||O(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,n){return t=+t,e>>>=0,n||O(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeInt16BE=function(t,e,n){return t=+t,e>>>=0,n||O(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeInt32LE=function(t,e,n){return t=+t,e>>>=0,n||O(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},u.prototype.writeInt32BE=function(t,e,n){return t=+t,e>>>=0,n||O(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeBigInt64LE=Q((function(t,e=0){return L(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeBigInt64BE=Q((function(t,e=0){return j(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeFloatLE=function(t,e,n){return B(this,t,e,!0,n)},u.prototype.writeFloatBE=function(t,e,n){return B(this,t,e,!1,n)},u.prototype.writeDoubleLE=function(t,e,n){return D(this,t,e,!0,n)},u.prototype.writeDoubleBE=function(t,e,n){return D(this,t,e,!1,n)},u.prototype.copy=function(t,e,n,r){if(!u.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(i=e;i=r+4;n-=3)e=`_${t.slice(n-3,n)}${e}`;return`${t.slice(0,n)}${e}`}function W(t,e,n,r,i,o){if(t>n||t3?0===e||e===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(o+1)}${r}`:`>= -(2${r} ** ${8*(o+1)-1}${r}) and < 2 ** ${8*(o+1)-1}${r}`:`>= ${e}${r} and <= ${n}${r}`,new U.ERR_OUT_OF_RANGE("value",i,t)}!function(t,e,n){z(e,"offset"),void 0!==t[e]&&void 0!==t[e+n]||q(e,t.length-(n+1))}(r,i,o)}function z(t,e){if("number"!=typeof t)throw new U.ERR_INVALID_ARG_TYPE(e,"number",t)}function q(t,e,n){if(Math.floor(t)!==t)throw z(t,n),new U.ERR_OUT_OF_RANGE(n||"offset","an integer",t);if(e<0)throw new U.ERR_BUFFER_OUT_OF_BOUNDS;throw new U.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${e}`,t)}F("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),F("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),F("ERR_OUT_OF_RANGE",(function(t,e,n){let r=`The value of "${t}" is out of range.`,i=n;return Number.isInteger(n)&&Math.abs(n)>2**32?i=H(String(n)):"bigint"==typeof n&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=H(i)),i+="n"),r+=` It must be ${e}. Received ${i}`,r}),RangeError);const V=/[^+/0-9A-Za-z-_]/g;function Z(t,e){let n;e=e||1/0;const r=t.length;let i=null;const o=[];for(let s=0;s55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=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((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function G(t){return r.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(V,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function Y(t,e,n,r){let i;for(i=0;i=e.length||i>=t.length);++i)e[i+n]=t[i];return i}function $(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function J(t){return t!=t}const K=function(){const t="0123456789abcdef",e=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let i=0;i<16;++i)e[r+i]=t[n]+t[i]}return e}();function Q(t){return"undefined"==typeof BigInt?X:t}function X(){throw new Error("BigInt not supported")}},1924:(t,e,n)=>{"use strict";var r=n(210),i=n(5559),o=i(r("String.prototype.indexOf"));t.exports=function(t,e){var n=r(t,!!e);return"function"==typeof n&&o(t,".prototype.")>-1?i(n):n}},5559:(t,e,n)=>{"use strict";var r=n(8612),i=n(210),o=i("%Function.prototype.apply%"),s=i("%Function.prototype.call%"),a=i("%Reflect.apply%",!0)||r.call(s,o),u=i("%Object.getOwnPropertyDescriptor%",!0),c=i("%Object.defineProperty%",!0),l=i("%Math.max%");if(c)try{c({},"a",{value:1})}catch(t){c=null}t.exports=function(t){var e=a(r,s,arguments);if(u&&c){var n=u(e,"length");n.configurable&&c(e,"length",{value:1+l(0,t.length-(arguments.length-1))})}return e};var h=function(){return a(r,o,arguments)};c?c(t.exports,"apply",{value:h}):t.exports.apply=h},6010:(t,e,n)=>{"use strict";function r(t){var e,n,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t)if(Array.isArray(t))for(e=0;ei})},5850:(t,e,n)=>{n(5682),n(2352);const r=n(7253),i=(t,e)=>t+e,o=["sync","latest"];function s(t){return Number.parseInt(t,16)}t.exports=class extends r{constructor(t={}){super(),this._blockResetDuration=t.blockResetDuration||2e4,this._blockResetTimeout,this._currentBlock=null,this._isRunning=!1,this._onNewListener=this._onNewListener.bind(this),this._onRemoveListener=this._onRemoveListener.bind(this),this._resetCurrentBlock=this._resetCurrentBlock.bind(this),this._setupInternalEvents()}isRunning(){return this._isRunning}getCurrentBlock(){return this._currentBlock}async getLatestBlock(){return this._currentBlock?this._currentBlock:await new Promise((t=>this.once("latest",t)))}removeAllListeners(t){t?super.removeAllListeners(t):super.removeAllListeners(),this._setupInternalEvents(),this._onRemoveListener()}_start(){}_end(){}_setupInternalEvents(){this.removeListener("newListener",this._onNewListener),this.removeListener("removeListener",this._onRemoveListener),this.on("newListener",this._onNewListener),this.on("removeListener",this._onRemoveListener)}_onNewListener(t,e){o.includes(t)&&this._maybeStart()}_onRemoveListener(t,e){this._getBlockTrackerEventCount()>0||this._maybeEnd()}_maybeStart(){this._isRunning||(this._isRunning=!0,this._cancelBlockResetTimeout(),this._start())}_maybeEnd(){this._isRunning&&(this._isRunning=!1,this._setupBlockResetTimeout(),this._end())}_getBlockTrackerEventCount(){return o.map((t=>this.listenerCount(t))).reduce(i)}_newPotentialLatest(t){const e=this._currentBlock;e&&s(t)<=s(e)||this._setCurrentBlock(t)}_setCurrentBlock(t){const e=this._currentBlock;this._currentBlock=t,this.emit("latest",t),this.emit("sync",{oldBlock:e,newBlock:t})}_setupBlockResetTimeout(){this._cancelBlockResetTimeout(),this._blockResetTimeout=setTimeout(this._resetCurrentBlock,this._blockResetDuration),this._blockResetTimeout.unref&&this._blockResetTimeout.unref()}_cancelBlockResetTimeout(){clearTimeout(this._blockResetTimeout)}_resetCurrentBlock(){this._currentBlock=null}}},5012:(t,e,n)=>{const r=n(2352),i=n(5850);function o(t,e){return new Promise((n=>{const r=setTimeout(n,t);r.unref&&e&&r.unref()}))}t.exports=class extends i{constructor(t={}){if(!t.provider)throw new Error("PollingBlockTracker - no provider specified.");const e=t.pollingInterval||2e4,n=t.retryTimeout||e/10,r=void 0===t.keepEventLoopActive||t.keepEventLoopActive,i=t.setSkipCacheFlag||!1;super(Object.assign({blockResetDuration:e},t)),this._provider=t.provider,this._pollingInterval=e,this._retryTimeout=n,this._keepEventLoopActive=r,this._setSkipCacheFlag=i}async checkForLatestBlock(){return await this._updateLatestBlock(),await this.getLatestBlock()}_start(){this._performSync().catch((t=>this.emit("error",t)))}async _performSync(){for(;this._isRunning;)try{await this._updateLatestBlock(),await o(this._pollingInterval,!this._keepEventLoopActive)}catch(t){const e=new Error(`PollingBlockTracker - encountered an error while attempting to update latest block:\n${t.stack}`);try{this.emit("error",e)}catch(t){console.error(e)}await o(this._retryTimeout,!this._keepEventLoopActive)}}async _updateLatestBlock(){const t=await this._fetchLatestBlock();this._newPotentialLatest(t)}async _fetchLatestBlock(){const t={jsonrpc:"2.0",id:1,method:"eth_blockNumber",params:[]};this._setSkipCacheFlag&&(t.skipCache=!0);const e=await r((e=>this._provider.sendAsync(t,e)))();if(e.error)throw new Error(`PollingBlockTracker - encountered error fetching block:\n${e.error}`);return e.result}}},3256:(t,e,n)=>{const r=n(6622);t.exports=class extends r{constructor(){super(),this.allResults=[]}async update(){throw new Error("BaseFilterWithHistory - no update method specified")}addResults(t){this.allResults=this.allResults.concat(t),super.addResults(t)}addInitialResults(t){this.allResults=this.allResults.concat(t),super.addInitialResults(t)}getAllResults(){return this.allResults}}},6622:(t,e,n)=>{const r=n(9394).default;t.exports=class extends r{constructor(){super(),this.updates=[]}async initialize(){}async update(){throw new Error("BaseFilter - no update method specified")}addResults(t){this.updates=this.updates.concat(t),t.forEach((t=>this.emit("update",t)))}addInitialResults(t){}getChangesAndClear(){const t=this.updates;return this.updates=[],t}}},2785:(t,e,n)=>{const r=n(6622),i=n(207),{incrementHexInt:o}=n(8112);t.exports=class extends r{constructor({provider:t,params:e}){super(),this.type="block",this.provider=t}async update({oldBlock:t,newBlock:e}){const n=e,r=o(t),s=(await i({provider:this.provider,fromBlock:r,toBlock:n})).map((t=>t.hash));this.addResults(s)}}},207:t=>{function e(t){return null==t?t:Number.parseInt(t,16)}function n(t){return null==t?t:"0x"+t.toString(16)}t.exports=async function({provider:t,fromBlock:r,toBlock:i}){r||(r=i);const o=e(r),s=e(i),a=Array(s-o+1).fill().map(((t,e)=>o+e)).map(n);return await Promise.all(a.map((e=>function(t,e,n){return new Promise(((e,r)=>{t.sendAsync({id:1,jsonrpc:"2.0",method:"eth_getBlockByNumber",params:n},((t,n)=>{if(t)return r(t);e(n.result)}))}))}(t,0,[e,!1]))))}},8112:t=>{function e(t){return t.sort(((t,e)=>"latest"===t||"earliest"===e?1:"latest"===e||"earliest"===t?-1:n(t)-n(e)))}function n(t){return null==t?t:Number.parseInt(t,16)}function r(t){if(null==t)return t;let e=t.toString(16);return e.length%2&&(e="0"+e),"0x"+e}function i(){return Math.floor(16*Math.random()).toString(16)}t.exports={minBlockRef:function(...t){return e(t)[0]},maxBlockRef:function(...t){const n=e(t);return n[n.length-1]},sortBlockRefs:e,bnToHex:function(t){return"0x"+t.toString(16)},blockRefIsNumber:function(t){return t&&!["earliest","latest","pending"].includes(t)},hexToInt:n,incrementHexInt:function(t){return null==t?t:r(n(t)+1)},intToHex:r,unsafeRandomBytes:function(t){let e="0x";for(let n=0;n{const r=n(8125).WU,{createAsyncMiddleware:i}=n(8625),o=n(7688),s=n(1663),a=n(2785),u=n(5792),{intToHex:c,hexToInt:l}=n(8112);function h(t){return f((async(...e)=>{const n=await t(...e);return c(n.id)}))}function f(t){return i((async(e,n)=>{const r=await t.apply(null,e.params);n.result=r}))}function d(t,e){const n=[];for(let e in t)n.push(t[e]);return n}t.exports=function({blockTracker:t,provider:e}){let n=0,i={};const p=new r,y=function({mutex:t}){return e=>async(n,r,i,o)=>{(await t.acquire())(),e(n,r,i,o)}}({mutex:p}),g=o({eth_newFilter:y(h(m)),eth_newBlockFilter:y(h(v)),eth_newPendingTransactionFilter:y(h(w)),eth_uninstallFilter:y(f(S)),eth_getFilterChanges:y(f(_)),eth_getFilterLogs:y(f(E))}),b=async({oldBlock:t,newBlock:e})=>{if(0===i.length)return;const n=await p.acquire();try{await Promise.all(d(i).map((async n=>{try{await n.update({oldBlock:t,newBlock:e})}catch(t){console.error(t)}})))}catch(t){console.error(t)}n()};return g.newLogFilter=m,g.newBlockFilter=v,g.newPendingTransactionFilter=w,g.uninstallFilter=S,g.getFilterChanges=_,g.getFilterLogs=E,g.destroy=()=>{!async function(){const t=d(i).length;i={},x({prevFilterCount:t,newFilterCount:0})}()},g;async function m(t){const n=new s({provider:e,params:t});return await k(n),n}async function v(){const t=new a({provider:e});return await k(t),t}async function w(){const t=new u({provider:e});return await k(t),t}async function _(t){const e=l(t),n=i[e];if(!n)throw new Error(`No filter for index "${e}"`);return n.getChangesAndClear()}async function E(t){const e=l(t),n=i[e];if(!n)throw new Error(`No filter for index "${e}"`);return"log"===n.type?results=n.getAllResults():results=[],results}async function S(t){const e=l(t),n=i[e],r=Boolean(n);return r&&await async function(t){const e=d(i).length;delete i[t];x({prevFilterCount:e,newFilterCount:d(i).length})}(e),r}async function k(e){const r=d(i).length,o=await t.getLatestBlock();return await e.initialize({currentBlock:o}),n++,i[n]=e,e.id=n,e.idHex=c(n),x({prevFilterCount:r,newFilterCount:d(i).length}),n}function x({prevFilterCount:e,newFilterCount:n}){0===e&&n>0?t.on("sync",b):e>0&&0===n&&t.removeListener("sync",b)}}},1663:(t,e,n)=>{const r=n(5682),i=n(6417),o=n(3256),{bnToHex:s,hexToInt:a,incrementHexInt:u,minBlockRef:c,blockRefIsNumber:l}=n(8112);t.exports=class extends o{constructor({provider:t,params:e}){super(),this.type="log",this.ethQuery=new r(t),this.params=Object.assign({fromBlock:"latest",toBlock:"latest",address:void 0,topics:[]},e),this.params.address&&(Array.isArray(this.params.address)||(this.params.address=[this.params.address]),this.params.address=this.params.address.map((t=>t.toLowerCase())))}async initialize({currentBlock:t}){let e=this.params.fromBlock;["latest","pending"].includes(e)&&(e=t),"earliest"===e&&(e="0x0"),this.params.fromBlock=e;const n=c(this.params.toBlock,t),r=Object.assign({},this.params,{toBlock:n}),i=await this._fetchLogs(r);this.addInitialResults(i)}async update({oldBlock:t,newBlock:e}){const n=e;let r;r=t?u(t):e;const i=Object.assign({},this.params,{fromBlock:r,toBlock:n}),o=(await this._fetchLogs(i)).filter((t=>this.matchLog(t)));this.addResults(o)}async _fetchLogs(t){return await i((e=>this.ethQuery.getLogs(t,e)))()}matchLog(t){if(a(this.params.fromBlock)>=a(t.blockNumber))return!1;if(l(this.params.toBlock)&&a(this.params.toBlock)<=a(t.blockNumber))return!1;const e=t.address&&t.address.toLowerCase();return!(this.params.address&&e&&!this.params.address.includes(e))&&this.params.topics.every(((e,n)=>{let r=t.topics[n];if(!r)return!1;r=r.toLowerCase();let i=Array.isArray(e)?e:[e];return!!i.includes(null)||(i=i.map((t=>t.toLowerCase())),i.includes(r))}))}}},6417:t=>{"use strict";const e=(t,e,n,r)=>function(...i){return new(0,e.promiseModule)(((o,s)=>{e.multiArgs?i.push(((...t)=>{e.errorFirst?t[0]?s(t):(t.shift(),o(t)):o(t)})):e.errorFirst?i.push(((t,e)=>{t?s(t):o(e)})):i.push(o);const a=this===n?r:this;Reflect.apply(t,a,i)}))},n=new WeakMap;t.exports=(t,r)=>{r={exclude:[/.+(?:Sync|Stream)$/],errorFirst:!0,promiseModule:Promise,...r};const i=typeof t;if(null===t||"object"!==i&&"function"!==i)throw new TypeError(`Expected \`input\` to be a \`Function\` or \`Object\`, got \`${null===t?"null":i}\``);const o=new WeakMap,s=new Proxy(t,{apply(t,n,i){const a=o.get(t);if(a)return Reflect.apply(a,n,i);const u=r.excludeMain?t:e(t,r,s,t);return o.set(t,u),Reflect.apply(u,n,i)},get(t,i){const a=t[i];if(!((t,e)=>{let i=n.get(t);if(i||(i={},n.set(t,i)),e in i)return i[e];const o=t=>"string"==typeof t||"symbol"==typeof e?e===t:t.test(e),s=Reflect.getOwnPropertyDescriptor(t,e),a=void 0===s||s.writable||s.configurable,u=(r.include?r.include.some(o):!r.exclude.some(o))&&a;return i[e]=u,u})(t,i)||a===Function.prototype[i])return a;const u=o.get(a);if(u)return u;if("function"==typeof a){const n=e(a,r,s,t);return o.set(a,n),n}return a}});return s}},8961:(t,e,n)=>{const r=n(9394).default,i=n(7688),{createAsyncMiddleware:o}=n(8625),s=n(8406),{unsafeRandomBytes:a,incrementHexInt:u}=n(8112),c=n(207);function l(t){return{hash:t.hash,parentHash:t.parentHash,sha3Uncles:t.sha3Uncles,miner:t.miner,stateRoot:t.stateRoot,transactionsRoot:t.transactionsRoot,receiptsRoot:t.receiptsRoot,logsBloom:t.logsBloom,difficulty:t.difficulty,number:t.number,gasLimit:t.gasLimit,gasUsed:t.gasUsed,nonce:t.nonce,mixHash:t.mixHash,timestamp:t.timestamp,extraData:t.extraData}}t.exports=function({blockTracker:t,provider:e}){const n={},h=s({blockTracker:t,provider:e});let f=!1;const d=new r,p=i({eth_subscribe:o((async function(r,i){if(f)throw new Error("SubscriptionManager - attempting to use after destroying");const o=r.params[0],s=a(16);let d;switch(o){case"newHeads":d=function({subId:n}){const r={type:o,destroy:async()=>{t.removeListener("sync",r.update)},update:async({oldBlock:t,newBlock:r})=>{const i=r,o=u(t);(await c({provider:e,fromBlock:o,toBlock:i})).map(l).forEach((t=>{y(n,t)}))}};return t.on("sync",r.update),r}({subId:s});break;case"logs":const n=r.params[1];d=function({subId:t,filter:e}){return e.on("update",(e=>y(t,e))),{type:o,destroy:async()=>await h.uninstallFilter(e.idHex)}}({subId:s,filter:await h.newLogFilter(n)});break;default:throw new Error(`SubscriptionManager - unsupported subscription type "${o}"`)}return n[s]=d,void(i.result=s)})),eth_unsubscribe:o((async function(t,e){if(f)throw new Error("SubscriptionManager - attempting to use after destroying");const r=t.params[0],i=n[r];i?(delete n[r],await i.destroy(),e.result=!0):e.result=!1}))});return p.destroy=function(){d.removeAllListeners();for(const t in n)n[t].destroy(),delete n[t];f=!0},{events:d,middleware:p};function y(t,e){d.emit("notification",{jsonrpc:"2.0",method:"eth_subscription",params:{subscription:t,result:e}})}}},5792:(t,e,n)=>{const r=n(6622),i=n(207),{incrementHexInt:o}=n(8112);t.exports=class extends r{constructor({provider:t}){super(),this.type="tx",this.provider=t}async update({oldBlock:t}){const e=t,n=o(t),r=await i({provider:this.provider,fromBlock:n,toBlock:e}),s=[];for(const t of r)s.push(...t.transactions);this.addResults(s)}}},9721:t=>{t.exports=function(t){return(e,n,r,i)=>{const o=t[e.method];return void 0===o?r():"function"==typeof o?o(e,n,r,i):(n.result=o,i())}}},7688:(t,e,n)=>{t.exports=n(9721)},5682:(t,e,n)=>{const r=n(7529),i=n(3420)();function o(t){this.currentProvider=t}function s(t){return function(){const e=this;var n=[].slice.call(arguments),r=n.pop();e.sendAsync({method:t,params:n},r)}}function a(t,e){return function(){const n=this;var r=[].slice.call(arguments),i=r.pop();r.length{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EthereumProviderError=e.EthereumRpcError=void 0;const r=n(4445);class i extends Error{constructor(t,e,n){if(!Number.isInteger(t))throw new Error('"code" must be an integer.');if(!e||"string"!=typeof e)throw new Error('"message" must be a nonempty string.');super(e),this.code=t,void 0!==n&&(this.data=n)}serialize(){const t={code:this.code,message:this.message};return void 0!==this.data&&(t.data=this.data),this.stack&&(t.stack=this.stack),t}toString(){return r.default(this.serialize(),o,2)}}function o(t,e){if("[Circular]"!==e)return e}e.EthereumRpcError=i,e.EthereumProviderError=class extends i{constructor(t,e,n){if(!function(t){return Number.isInteger(t)&&t>=1e3&&t<=4999}(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,e,n)}}},2662:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.errorValues=e.errorCodes=void 0,e.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}},e.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."}}},8797:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ethErrors=void 0;const r=n(2294),i=n(8753),o=n(2662);function s(t,e){const[n,o]=u(e);return new r.EthereumRpcError(t,n||i.getMessageFromCode(t),o)}function a(t,e){const[n,o]=u(e);return new r.EthereumProviderError(t,n||i.getMessageFromCode(t),o)}function u(t){if(t){if("string"==typeof t)return[t];if("object"==typeof t&&!Array.isArray(t)){const{message:e,data:n}=t;if(e&&"string"!=typeof e)throw new Error("Must specify string message.");return[e||void 0,n]}}return[]}e.ethErrors={rpc:{parse:t=>s(o.errorCodes.rpc.parse,t),invalidRequest:t=>s(o.errorCodes.rpc.invalidRequest,t),invalidParams:t=>s(o.errorCodes.rpc.invalidParams,t),methodNotFound:t=>s(o.errorCodes.rpc.methodNotFound,t),internal:t=>s(o.errorCodes.rpc.internal,t),server:t=>{if(!t||"object"!=typeof t||Array.isArray(t))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:e}=t;if(!Number.isInteger(e)||e>-32005||e<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return s(e,t)},invalidInput:t=>s(o.errorCodes.rpc.invalidInput,t),resourceNotFound:t=>s(o.errorCodes.rpc.resourceNotFound,t),resourceUnavailable:t=>s(o.errorCodes.rpc.resourceUnavailable,t),transactionRejected:t=>s(o.errorCodes.rpc.transactionRejected,t),methodNotSupported:t=>s(o.errorCodes.rpc.methodNotSupported,t),limitExceeded:t=>s(o.errorCodes.rpc.limitExceeded,t)},provider:{userRejectedRequest:t=>a(o.errorCodes.provider.userRejectedRequest,t),unauthorized:t=>a(o.errorCodes.provider.unauthorized,t),unsupportedMethod:t=>a(o.errorCodes.provider.unsupportedMethod,t),disconnected:t=>a(o.errorCodes.provider.disconnected,t),chainDisconnected:t=>a(o.errorCodes.provider.chainDisconnected,t),custom:t=>{if(!t||"object"!=typeof t||Array.isArray(t))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:e,message:n,data:i}=t;if(!n||"string"!=typeof n)throw new Error('"message" must be a nonempty string');return new r.EthereumProviderError(e,n,i)}}}},9826:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getMessageFromCode=e.serializeError=e.EthereumProviderError=e.EthereumRpcError=e.ethErrors=e.errorCodes=void 0;const r=n(2294);Object.defineProperty(e,"EthereumRpcError",{enumerable:!0,get:function(){return r.EthereumRpcError}}),Object.defineProperty(e,"EthereumProviderError",{enumerable:!0,get:function(){return r.EthereumProviderError}});const i=n(8753);Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return i.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return i.getMessageFromCode}});const o=n(8797);Object.defineProperty(e,"ethErrors",{enumerable:!0,get:function(){return o.ethErrors}});const s=n(2662);Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return s.errorCodes}})},8753:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.serializeError=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const r=n(2662),i=n(2294),o=r.errorCodes.rpc.internal,s={code:o,message:a(o)};function a(t,n="Unspecified error message. This is a bug, please report it."){if(Number.isInteger(t)){const n=t.toString();if(h(r.errorValues,n))return r.errorValues[n].message;if(c(t))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return n}function u(t){if(!Number.isInteger(t))return!1;const e=t.toString();return!!r.errorValues[e]||!!c(t)}function c(t){return t>=-32099&&t<=-32e3}function l(t){return t&&"object"==typeof t&&!Array.isArray(t)?Object.assign({},t):t}function h(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",e.getMessageFromCode=a,e.isValidCode=u,e.serializeError=function(t,{fallbackError:e=s,shouldIncludeStack:n=!1}={}){var r,o;if(!e||!Number.isInteger(e.code)||"string"!=typeof e.message)throw new Error("Must provide fallback error with integer number code and string message.");if(t instanceof i.EthereumRpcError)return t.serialize();const c={};if(t&&"object"==typeof t&&!Array.isArray(t)&&h(t,"code")&&u(t.code)){const e=t;c.code=e.code,e.message&&"string"==typeof e.message?(c.message=e.message,h(e,"data")&&(c.data=e.data)):(c.message=a(c.code),c.data={originalError:l(t)})}else{c.code=e.code;const n=null===(r=t)||void 0===r?void 0:r.message;c.message=n&&"string"==typeof n?n:e.message,c.data={originalError:l(t)}}const f=null===(o=t)||void 0===o?void 0:o.stack;return n&&t&&f&&"string"==typeof f&&(c.stack=f),c}},7187:t=>{"use strict";var e,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};e=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var i=Number.isNaN||function(t){return t!=t};function o(){o.init.call(this)}t.exports=o,t.exports.once=function(t,e){return new Promise((function(n,r){function i(n){t.removeListener(e,o),r(n)}function o(){"function"==typeof t.removeListener&&t.removeListener("error",i),n([].slice.call(arguments))}y(t,e,o,{once:!0}),"error"!==e&&function(t,e,n){"function"==typeof t.on&&y(t,"error",e,{once:!0})}(t,i)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function u(t){return void 0===t._maxListeners?o.defaultMaxListeners:t._maxListeners}function c(t,e,n,r){var i,o,s,c;if(a(n),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),o=t._events),s=o[e]),void 0===s)s=o[e]=n,++t._eventsCount;else if("function"==typeof s?s=o[e]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(i=u(t))>0&&s.length>i&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=t,l.type=e,l.count=s.length,c=l,console&&console.warn&&console.warn(c)}return t}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},i=l.bind(r);return i.listener=n,r.wrapFn=i,i}function f(t,e,n){var r=t._events;if(void 0===r)return[];var i=r[e];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(t){for(var e=new Array(t.length),n=0;n0&&(s=e[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=o[t];if(void 0===u)return!1;if("function"==typeof u)r(u,this,e);else{var c=u.length,l=p(u,c);for(n=0;n=0;o--)if(n[o]===e||n[o].listener===e){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(t,e){for(;e+1=0;r--)this.removeListener(t,e[r]);return this},o.prototype.listeners=function(t){return f(this,t,!0)},o.prototype.rawListeners=function(t){return f(this,t,!1)},o.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):d.call(t,e)},o.prototype.listenerCount=d,o.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},4445:t=>{t.exports=s,s.default=s,s.stable=l,s.stableStringify=l;var e="[...]",n="[Circular]",r=[],i=[];function o(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function s(t,e,n,s){var a;void 0===s&&(s=o()),u(t,"",0,[],void 0,0,s);try{a=0===i.length?JSON.stringify(t,e,n):JSON.stringify(t,f(e),n)}catch(t){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==r.length;){var c=r.pop();4===c.length?Object.defineProperty(c[0],c[1],c[3]):c[0][c[1]]=c[2]}}return a}function a(t,e,n,o){var s=Object.getOwnPropertyDescriptor(o,n);void 0!==s.get?s.configurable?(Object.defineProperty(o,n,{value:t}),r.push([o,n,e,s])):i.push([e,n,t]):(o[n]=t,r.push([o,n,e]))}function u(t,r,i,o,s,c,l){var h;if(c+=1,"object"==typeof t&&null!==t){for(h=0;hl.depthLimit)return void a(e,t,r,s);if(void 0!==l.edgesLimit&&i+1>l.edgesLimit)return void a(e,t,r,s);if(o.push(t),Array.isArray(t))for(h=0;he?1:0}function l(t,e,n,s){void 0===s&&(s=o());var a,u=h(t,"",0,[],void 0,0,s)||t;try{a=0===i.length?JSON.stringify(u,e,n):JSON.stringify(u,f(e),n)}catch(t){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==r.length;){var c=r.pop();4===c.length?Object.defineProperty(c[0],c[1],c[3]):c[0][c[1]]=c[2]}}return a}function h(t,i,o,s,u,l,f){var d;if(l+=1,"object"==typeof t&&null!==t){for(d=0;df.depthLimit)return void a(e,t,i,u);if(void 0!==f.edgesLimit&&o+1>f.edgesLimit)return void a(e,t,i,u);if(s.push(t),Array.isArray(t))for(d=0;d0)for(var r=0;r{var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString;t.exports=function(t,r,i){if("[object Function]"!==n.call(r))throw new TypeError("iterator must be a function");var o=t.length;if(o===+o)for(var s=0;s{"use strict";var e="Function.prototype.bind called on incompatible ",n=Array.prototype.slice,r=Object.prototype.toString,i="[object Function]";t.exports=function(t){var o=this;if("function"!=typeof o||r.call(o)!==i)throw new TypeError(e+o);for(var s,a=n.call(arguments,1),u=function(){if(this instanceof s){var e=o.apply(this,a.concat(n.call(arguments)));return Object(e)===e?e:this}return o.apply(t,a.concat(n.call(arguments)))},c=Math.max(0,o.length-a.length),l=[],h=0;h{"use strict";var r=n(7648);t.exports=Function.prototype.bind||r},210:(t,e,n)=>{"use strict";var r,i=SyntaxError,o=Function,s=TypeError,a=function(t){try{return o('"use strict"; return ('+t+").constructor;")()}catch(t){}},u=Object.getOwnPropertyDescriptor;if(u)try{u({},"")}catch(t){u=null}var c=function(){throw new s},l=u?function(){try{return c}catch(t){try{return u(arguments,"callee").get}catch(t){return c}}}():c,h=n(1405)(),f=Object.getPrototypeOf||function(t){return t.__proto__},d={},p="undefined"==typeof Uint8Array?r:f(Uint8Array),y={"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":h?f([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":d,"%AsyncGenerator%":d,"%AsyncGeneratorFunction%":d,"%AsyncIteratorPrototype%":d,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":d,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":h?f(f([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&h?f((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&h?f((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":h?f(""[Symbol.iterator]()):r,"%Symbol%":h?Symbol:r,"%SyntaxError%":i,"%ThrowTypeError%":l,"%TypedArray%":p,"%TypeError%":s,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet},g=function t(e){var n;if("%AsyncFunction%"===e)n=a("async function () {}");else if("%GeneratorFunction%"===e)n=a("function* () {}");else if("%AsyncGeneratorFunction%"===e)n=a("async function* () {}");else if("%AsyncGenerator%"===e){var r=t("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===e){var i=t("%AsyncGenerator%");i&&(n=f(i.prototype))}return y[e]=n,n},b={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},m=n(8612),v=n(7642),w=m.call(Function.call,Array.prototype.concat),_=m.call(Function.apply,Array.prototype.splice),E=m.call(Function.call,String.prototype.replace),S=m.call(Function.call,String.prototype.slice),k=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,x=/\\(\\)?/g,M=function(t){var e=S(t,0,1),n=S(t,-1);if("%"===e&&"%"!==n)throw new i("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==e)throw new i("invalid intrinsic syntax, expected opening `%`");var r=[];return E(t,k,(function(t,e,n,i){r[r.length]=n?E(i,x,"$1"):e||t})),r},A=function(t,e){var n,r=t;if(v(b,r)&&(r="%"+(n=b[r])[0]+"%"),v(y,r)){var o=y[r];if(o===d&&(o=g(r)),void 0===o&&!e)throw new s("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new i("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!=typeof t||0===t.length)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new s('"allowMissing" argument must be a boolean');var n=M(t),r=n.length>0?n[0]:"",o=A("%"+r+"%",e),a=o.name,c=o.value,l=!1,h=o.alias;h&&(r=h[0],_(n,w([0,1],h)));for(var f=1,d=!0;f=n.length){var m=u(c,p);c=(d=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:c[p]}else d=v(c,p),c=c[p];d&&!l&&(y[a]=c)}}return c}},1405:(t,e,n)=>{"use strict";var r="undefined"!=typeof Symbol&&Symbol,i=n(5419);t.exports=function(){return"function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&i()}},5419:t=>{"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),n=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var r=Object.getOwnPropertySymbols(t);if(1!==r.length||r[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(t,e);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},6410:(t,e,n)=>{"use strict";var r=n(5419);t.exports=function(){return r()&&!!Symbol.toStringTag}},7642:(t,e,n)=>{"use strict";var r=n(8612);t.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},645:(t,e)=>{e.read=function(t,e,n,r,i){var o,s,a=8*i-r-1,u=(1<>1,l=-7,h=n?i-1:0,f=n?-1:1,d=t[e+h];for(h+=f,o=d&(1<<-l)-1,d>>=-l,l+=a;l>0;o=256*o+t[e+h],h+=f,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=r;l>0;s=256*s+t[e+h],h+=f,l-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,r),o-=c}return(d?-1:1)*s*Math.pow(2,o-r)},e.write=function(t,e,n,r,i,o){var s,a,u,c=8*o-i-1,l=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,p=r?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+h>=1?f/u:f*Math.pow(2,1-h))*u>=2&&(s++,u/=2),s+h>=l?(a=0,s=l):s+h>=1?(a=(e*u-1)*Math.pow(2,i),s+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;t[n+d]=255&a,d+=p,a/=256,i-=8);for(s=s<0;t[n+d]=255&s,d+=p,s/=256,c-=8);t[n+d-p]|=128*y}},5717:t=>{"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}}},2584:(t,e,n)=>{"use strict";var r=n(6410)(),i=n(1924)("Object.prototype.toString"),o=function(t){return!(r&&t&&"object"==typeof t&&Symbol.toStringTag in t)&&"[object Arguments]"===i(t)},s=function(t){return!!o(t)||null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Array]"!==i(t)&&"[object Function]"===i(t.callee)},a=function(){return o(arguments)}();o.isLegacyArguments=s,t.exports=a?o:s},8662:(t,e,n)=>{"use strict";var r,i=Object.prototype.toString,o=Function.prototype.toString,s=/^\s*(?:function)?\*/,a=n(6410)(),u=Object.getPrototypeOf;t.exports=function(t){if("function"!=typeof t)return!1;if(s.test(o.call(t)))return!0;if(!a)return"[object GeneratorFunction]"===i.call(t);if(!u)return!1;if(void 0===r){var e=function(){if(!a)return!1;try{return Function("return function*() {}")()}catch(t){}}();r=!!e&&u(e)}return u(t)===r}},5692:(t,e,n)=>{"use strict";var r=n(9804),i=n(3083),o=n(1924),s=o("Object.prototype.toString"),a=n(6410)(),u="undefined"==typeof globalThis?n.g:globalThis,c=i(),l=o("Array.prototype.indexOf",!0)||function(t,e){for(var n=0;n-1}return!!d&&function(t){var e=!1;return r(f,(function(n,r){if(!e)try{e=n.call(t)===r}catch(t){}})),e}(t)}},2023:(module,exports,__webpack_require__)=>{var process=__webpack_require__(4155),__WEBPACK_AMD_DEFINE_RESULT__;(function(){"use strict";var ERROR="input is invalid type",WINDOW="object"==typeof window,root=WINDOW?window:{};root.JS_SHA256_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&"object"==typeof self,NODE_JS=!root.JS_SHA256_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;NODE_JS?root=__webpack_require__.g:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_SHA256_NO_COMMON_JS&&module.exports,AMD=__webpack_require__.amdO,ARRAY_BUFFER=!root.JS_SHA256_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,HEX_CHARS="0123456789abcdef".split(""),EXTRA=[-2147483648,8388608,32768,128],SHIFT=[24,16,8,0],K=[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],OUTPUT_TYPES=["hex","array","digest","arrayBuffer"],blocks=[];!root.JS_SHA256_NO_NODE_JS&&Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),!ARRAY_BUFFER||!root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(t){return"object"==typeof t&&t.buffer&&t.buffer.constructor===ArrayBuffer});var createOutputMethod=function(t,e){return function(n){return new Sha256(e,!0).update(n)[t]()}},createMethod=function(t){var e=createOutputMethod("hex",t);NODE_JS&&(e=nodeWrap(e,t)),e.create=function(){return new Sha256(t)},e.update=function(t){return e.create().update(t)};for(var n=0;n>6,s[u++]=128|63&o):o<55296||o>=57344?(s[u++]=224|o>>12,s[u++]=128|o>>6&63,s[u++]=128|63&o):(o=65536+((1023&o)<<10|1023&t.charCodeAt(++r)),s[u++]=240|o>>18,s[u++]=128|o>>12&63,s[u++]=128|o>>6&63,s[u++]=128|63&o);t=s}else{if("object"!==i)throw new Error(ERROR);if(null===t)throw new Error(ERROR);if(ARRAY_BUFFER&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!(Array.isArray(t)||ARRAY_BUFFER&&ArrayBuffer.isView(t)))throw new Error(ERROR)}t.length>64&&(t=new Sha256(e,!0).update(t).array());var c=[],l=[];for(r=0;r<64;++r){var h=t[r]||0;c[r]=92^h,l[r]=54^h}Sha256.call(this,e,n),this.update(l),this.oKeyPad=c,this.inner=!0,this.sharedMemory=n}Sha256.prototype.update=function(t){if(!this.finalized){var e,n=typeof t;if("string"!==n){if("object"!==n)throw new Error(ERROR);if(null===t)throw new Error(ERROR);if(ARRAY_BUFFER&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!(Array.isArray(t)||ARRAY_BUFFER&&ArrayBuffer.isView(t)))throw new Error(ERROR);e=!0}for(var r,i,o=0,s=t.length,a=this.blocks;o>2]|=t[o]<>2]|=r<>2]|=(192|r>>6)<>2]|=(128|63&r)<=57344?(a[i>>2]|=(224|r>>12)<>2]|=(128|r>>6&63)<>2]|=(128|63&r)<>2]|=(240|r>>18)<>2]|=(128|r>>12&63)<>2]|=(128|r>>6&63)<>2]|=(128|63&r)<=64?(this.block=a[16],this.start=i-64,this.hash(),this.hashed=!0):this.start=i}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Sha256.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,e=this.lastByteIndex;t[16]=this.block,t[e>>2]|=EXTRA[3&e],this.block=t[16],e>=56&&(this.hashed||this.hash(),t[0]=this.block,t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=this.hBytes<<3|this.bytes>>>29,t[15]=this.bytes<<3,this.hash()}},Sha256.prototype.hash=function(){var t,e,n,r,i,o,s,a,u,c=this.h0,l=this.h1,h=this.h2,f=this.h3,d=this.h4,p=this.h5,y=this.h6,g=this.h7,b=this.blocks;for(t=16;t<64;++t)e=((i=b[t-15])>>>7|i<<25)^(i>>>18|i<<14)^i>>>3,n=((i=b[t-2])>>>17|i<<15)^(i>>>19|i<<13)^i>>>10,b[t]=b[t-16]+e+b[t-7]+n<<0;for(u=l&h,t=0;t<64;t+=4)this.first?(this.is224?(o=300032,g=(i=b[0]-1413257819)-150054599<<0,f=i+24177077<<0):(o=704751109,g=(i=b[0]-210244248)-1521486534<<0,f=i+143694565<<0),this.first=!1):(e=(c>>>2|c<<30)^(c>>>13|c<<19)^(c>>>22|c<<10),r=(o=c&l)^c&h^u,g=f+(i=g+(n=(d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7))+(d&p^~d&y)+K[t]+b[t])<<0,f=i+(e+r)<<0),e=(f>>>2|f<<30)^(f>>>13|f<<19)^(f>>>22|f<<10),r=(s=f&c)^f&l^o,y=h+(i=y+(n=(g>>>6|g<<26)^(g>>>11|g<<21)^(g>>>25|g<<7))+(g&d^~g&p)+K[t+1]+b[t+1])<<0,e=((h=i+(e+r)<<0)>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10),r=(a=h&f)^h&c^s,p=l+(i=p+(n=(y>>>6|y<<26)^(y>>>11|y<<21)^(y>>>25|y<<7))+(y&g^~y&d)+K[t+2]+b[t+2])<<0,e=((l=i+(e+r)<<0)>>>2|l<<30)^(l>>>13|l<<19)^(l>>>22|l<<10),r=(u=l&h)^l&f^a,d=c+(i=d+(n=(p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+(p&y^~p&g)+K[t+3]+b[t+3])<<0,c=i+(e+r)<<0;this.h0=this.h0+c<<0,this.h1=this.h1+l<<0,this.h2=this.h2+h<<0,this.h3=this.h3+f<<0,this.h4=this.h4+d<<0,this.h5=this.h5+p<<0,this.h6=this.h6+y<<0,this.h7=this.h7+g<<0},Sha256.prototype.hex=function(){this.finalize();var t=this.h0,e=this.h1,n=this.h2,r=this.h3,i=this.h4,o=this.h5,s=this.h6,a=this.h7,u=HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>4&15]+HEX_CHARS[15&t]+HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>4&15]+HEX_CHARS[15&e]+HEX_CHARS[n>>28&15]+HEX_CHARS[n>>24&15]+HEX_CHARS[n>>20&15]+HEX_CHARS[n>>16&15]+HEX_CHARS[n>>12&15]+HEX_CHARS[n>>8&15]+HEX_CHARS[n>>4&15]+HEX_CHARS[15&n]+HEX_CHARS[r>>28&15]+HEX_CHARS[r>>24&15]+HEX_CHARS[r>>20&15]+HEX_CHARS[r>>16&15]+HEX_CHARS[r>>12&15]+HEX_CHARS[r>>8&15]+HEX_CHARS[r>>4&15]+HEX_CHARS[15&r]+HEX_CHARS[i>>28&15]+HEX_CHARS[i>>24&15]+HEX_CHARS[i>>20&15]+HEX_CHARS[i>>16&15]+HEX_CHARS[i>>12&15]+HEX_CHARS[i>>8&15]+HEX_CHARS[i>>4&15]+HEX_CHARS[15&i]+HEX_CHARS[o>>28&15]+HEX_CHARS[o>>24&15]+HEX_CHARS[o>>20&15]+HEX_CHARS[o>>16&15]+HEX_CHARS[o>>12&15]+HEX_CHARS[o>>8&15]+HEX_CHARS[o>>4&15]+HEX_CHARS[15&o]+HEX_CHARS[s>>28&15]+HEX_CHARS[s>>24&15]+HEX_CHARS[s>>20&15]+HEX_CHARS[s>>16&15]+HEX_CHARS[s>>12&15]+HEX_CHARS[s>>8&15]+HEX_CHARS[s>>4&15]+HEX_CHARS[15&s];return this.is224||(u+=HEX_CHARS[a>>28&15]+HEX_CHARS[a>>24&15]+HEX_CHARS[a>>20&15]+HEX_CHARS[a>>16&15]+HEX_CHARS[a>>12&15]+HEX_CHARS[a>>8&15]+HEX_CHARS[a>>4&15]+HEX_CHARS[15&a]),u},Sha256.prototype.toString=Sha256.prototype.hex,Sha256.prototype.digest=function(){this.finalize();var t=this.h0,e=this.h1,n=this.h2,r=this.h3,i=this.h4,o=this.h5,s=this.h6,a=this.h7,u=[t>>24&255,t>>16&255,t>>8&255,255&t,e>>24&255,e>>16&255,e>>8&255,255&e,n>>24&255,n>>16&255,n>>8&255,255&n,r>>24&255,r>>16&255,r>>8&255,255&r,i>>24&255,i>>16&255,i>>8&255,255&i,o>>24&255,o>>16&255,o>>8&255,255&o,s>>24&255,s>>16&255,s>>8&255,255&s];return this.is224||u.push(a>>24&255,a>>16&255,a>>8&255,255&a),u},Sha256.prototype.array=Sha256.prototype.digest,Sha256.prototype.arrayBuffer=function(){this.finalize();var t=new ArrayBuffer(this.is224?28:32),e=new DataView(t);return e.setUint32(0,this.h0),e.setUint32(4,this.h1),e.setUint32(8,this.h2),e.setUint32(12,this.h3),e.setUint32(16,this.h4),e.setUint32(20,this.h5),e.setUint32(24,this.h6),this.is224||e.setUint32(28,this.h7),t},HmacSha256.prototype=new Sha256,HmacSha256.prototype.finalize=function(){if(Sha256.prototype.finalize.call(this),this.inner){this.inner=!1;var t=this.array();Sha256.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(t),Sha256.prototype.finalize.call(this)}};var exports=createMethod();exports.sha256=exports,exports.sha224=createMethod(!0),exports.sha256.hmac=createHmacMethod(),exports.sha224.hmac=createHmacMethod(!0),COMMON_JS?module.exports=exports:(root.sha256=exports.sha256,root.sha224=exports.sha224,AMD&&(__WEBPACK_AMD_DEFINE_RESULT__=function(){return exports}.call(exports,__webpack_require__,exports,module),void 0===__WEBPACK_AMD_DEFINE_RESULT__||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)))})()},7398:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.JsonRpcEngine=void 0;const i=r(n(9394)),o=n(9826);class s extends i.default{constructor(){super(),this._middleware=[]}push(t){this._middleware.push(t)}handle(t,e){if(e&&"function"!=typeof e)throw new Error('"callback" must be a function if provided.');return Array.isArray(t)?e?this._handleBatch(t,e):this._handleBatch(t):e?this._handle(t,e):this._promiseHandle(t)}asMiddleware(){return async(t,e,n,r)=>{try{const[i,o,a]=await s._runAllMiddleware(t,e,this._middleware);return o?(await s._runReturnHandlers(a),r(i)):n((async t=>{try{await s._runReturnHandlers(a)}catch(e){return t(e)}return t()}))}catch(t){return r(t)}}}async _handleBatch(t,e){try{const n=await Promise.all(t.map(this._promiseHandle.bind(this)));return e?e(null,n):n}catch(t){if(e)return e(t);throw t}}_promiseHandle(t){return new Promise((e=>{this._handle(t,((t,n)=>{e(n)}))}))}async _handle(t,e){if(!t||Array.isArray(t)||"object"!=typeof t){const n=new o.EthereumRpcError(o.errorCodes.rpc.invalidRequest,"Requests must be plain objects. Received: "+typeof t,{request:t});return e(n,{id:void 0,jsonrpc:"2.0",error:n})}if("string"!=typeof t.method){const n=new o.EthereumRpcError(o.errorCodes.rpc.invalidRequest,"Must specify a string method. Received: "+typeof t.method,{request:t});return e(n,{id:t.id,jsonrpc:"2.0",error:n})}const n=Object.assign({},t),r={id:n.id,jsonrpc:n.jsonrpc};let i=null;try{await this._processRequest(n,r)}catch(t){i=t}return i&&(delete r.result,r.error||(r.error=o.serializeError(i))),e(i,r)}async _processRequest(t,e){const[n,r,i]=await s._runAllMiddleware(t,e,this._middleware);if(s._checkForCompletion(t,e,r),await s._runReturnHandlers(i),n)throw n}static async _runAllMiddleware(t,e,n){const r=[];let i=null,o=!1;for(const a of n)if([i,o]=await s._runMiddleware(t,e,a,r),o)break;return[i,o,r.reverse()]}static _runMiddleware(t,e,n,r){return new Promise((i=>{const s=t=>{const n=t||e.error;n&&(e.error=o.serializeError(n)),i([n,!0])},u=n=>{e.error?s(e.error):(n&&("function"!=typeof n&&s(new o.EthereumRpcError(o.errorCodes.rpc.internal,`JsonRpcEngine: "next" return handlers must be functions. Received "${typeof n}" for request:\n${a(t)}`,{request:t})),r.push(n)),i([null,!1]))};try{n(t,e,u,s)}catch(t){s(t)}}))}static async _runReturnHandlers(t){for(const e of t)await new Promise(((t,n)=>{e((e=>e?n(e):t()))}))}static _checkForCompletion(t,e,n){if(!("result"in e)&&!("error"in e))throw new o.EthereumRpcError(o.errorCodes.rpc.internal,`JsonRpcEngine: Response has no error or result for request:\n${a(t)}`,{request:t});if(!n)throw new o.EthereumRpcError(o.errorCodes.rpc.internal,`JsonRpcEngine: Nothing ended request:\n${a(t)}`,{request:t})}}function a(t){return JSON.stringify(t,null,2)}e.JsonRpcEngine=s},1841:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createAsyncMiddleware=void 0,e.createAsyncMiddleware=function(t){return async(e,n,r,i)=>{let o;const s=new Promise((t=>{o=t}));let a=null,u=!1;const c=async()=>{u=!0,r((t=>{a=t,o()})),await s};try{await t(e,n,c),u?(await s,a(null)):i(null)}catch(t){a?a(t):i(t)}}}},8508:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createScaffoldMiddleware=void 0,e.createScaffoldMiddleware=function(t){return(e,n,r,i)=>{const o=t[e.method];return void 0===o?r():"function"==typeof o?o(e,n,r,i):(n.result=o,i())}}},3107:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getUniqueId=void 0;const n=4294967295;let r=Math.floor(Math.random()*n);e.getUniqueId=function(){return r=(r+1)%n,r}},5086:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createIdRemapMiddleware=void 0;const r=n(3107);e.createIdRemapMiddleware=function(){return(t,e,n,i)=>{const o=t.id,s=r.getUniqueId();t.id=s,e.id=s,n((n=>{t.id=o,e.id=o,n()}))}}},8625:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),i(n(5086),e),i(n(1841),e),i(n(8508),e),i(n(3107),e),i(n(7398),e),i(n(9962),e)},9962:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.mergeMiddleware=void 0;const r=n(7398);e.mergeMiddleware=function(t){const e=new r.JsonRpcEngine;return t.forEach((t=>e.push(t))),e.asMiddleware()}},3420:t=>{t.exports=function(t){var e=(t=t||{}).max||Number.MAX_SAFE_INTEGER,n=void 0!==t.start?t.start:Math.floor(Math.random()*e);return function(){return n%=e,n++}}},5811:(t,e,n)=>{t.exports=n(6066)(n(9653))},6066:(t,e,n)=>{const r=n(7016),i=n(5675);t.exports=function(t){const e=r(t),n=i(t);return function(t,r){switch("string"==typeof t?t.toLowerCase():t){case"keccak224":return new e(1152,448,null,224,r);case"keccak256":return new e(1088,512,null,256,r);case"keccak384":return new e(832,768,null,384,r);case"keccak512":return new e(576,1024,null,512,r);case"sha3-224":return new e(1152,448,6,224,r);case"sha3-256":return new e(1088,512,6,256,r);case"sha3-384":return new e(832,768,6,384,r);case"sha3-512":return new e(576,1024,6,512,r);case"shake128":return new n(1344,256,31,r);case"shake256":return new n(1088,512,31,r);default:throw new Error("Invald algorithm: "+t)}}}},7016:(t,e,n)=>{var r=n(8764).Buffer;const{Transform:i}=n(5092);t.exports=t=>class e extends i{constructor(e,n,r,i,o){super(o),this._rate=e,this._capacity=n,this._delimitedSuffix=r,this._hashBitLength=i,this._options=o,this._state=new t,this._state.initialize(e,n),this._finalized=!1}_transform(t,e,n){let r=null;try{this.update(t,e)}catch(t){r=t}n(r)}_flush(t){let e=null;try{this.push(this.digest())}catch(t){e=t}t(e)}update(t,e){if(!r.isBuffer(t)&&"string"!=typeof t)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return r.isBuffer(t)||(t=r.from(t,e)),this._state.absorb(t),this}digest(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let e=this._state.squeeze(this._hashBitLength/8);return void 0!==t&&(e=e.toString(t)),this._resetState(),e}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const t=new e(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(t._state),t._finalized=this._finalized,t}}},5675:(t,e,n)=>{var r=n(8764).Buffer;const{Transform:i}=n(5092);t.exports=t=>class e extends i{constructor(e,n,r,i){super(i),this._rate=e,this._capacity=n,this._delimitedSuffix=r,this._options=i,this._state=new t,this._state.initialize(e,n),this._finalized=!1}_transform(t,e,n){let r=null;try{this.update(t,e)}catch(t){r=t}n(r)}_flush(){}_read(t){this.push(this.squeeze(t))}update(t,e){if(!r.isBuffer(t)&&"string"!=typeof t)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return r.isBuffer(t)||(t=r.from(t,e)),this._state.absorb(t),this}squeeze(t,e){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let n=this._state.squeeze(t);return void 0!==e&&(n=n.toString(e)),n}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const t=new e(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(t._state),t._finalized=this._finalized,t}}},4040:(t,e)=>{const n=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];e.p1600=function(t){for(let e=0;e<24;++e){const r=t[0]^t[10]^t[20]^t[30]^t[40],i=t[1]^t[11]^t[21]^t[31]^t[41],o=t[2]^t[12]^t[22]^t[32]^t[42],s=t[3]^t[13]^t[23]^t[33]^t[43],a=t[4]^t[14]^t[24]^t[34]^t[44],u=t[5]^t[15]^t[25]^t[35]^t[45],c=t[6]^t[16]^t[26]^t[36]^t[46],l=t[7]^t[17]^t[27]^t[37]^t[47],h=t[8]^t[18]^t[28]^t[38]^t[48],f=t[9]^t[19]^t[29]^t[39]^t[49];let d=h^(o<<1|s>>>31),p=f^(s<<1|o>>>31);const y=t[0]^d,g=t[1]^p,b=t[10]^d,m=t[11]^p,v=t[20]^d,w=t[21]^p,_=t[30]^d,E=t[31]^p,S=t[40]^d,k=t[41]^p;d=r^(a<<1|u>>>31),p=i^(u<<1|a>>>31);const x=t[2]^d,M=t[3]^p,A=t[12]^d,T=t[13]^p,I=t[22]^d,C=t[23]^p,R=t[32]^d,N=t[33]^p,O=t[42]^d,L=t[43]^p;d=o^(c<<1|l>>>31),p=s^(l<<1|c>>>31);const j=t[4]^d,P=t[5]^p,B=t[14]^d,D=t[15]^p,U=t[24]^d,F=t[25]^p,H=t[34]^d,W=t[35]^p,z=t[44]^d,q=t[45]^p;d=a^(h<<1|f>>>31),p=u^(f<<1|h>>>31);const V=t[6]^d,Z=t[7]^p,G=t[16]^d,Y=t[17]^p,$=t[26]^d,J=t[27]^p,K=t[36]^d,Q=t[37]^p,X=t[46]^d,tt=t[47]^p;d=c^(r<<1|i>>>31),p=l^(i<<1|r>>>31);const et=t[8]^d,nt=t[9]^p,rt=t[18]^d,it=t[19]^p,ot=t[28]^d,st=t[29]^p,at=t[38]^d,ut=t[39]^p,ct=t[48]^d,lt=t[49]^p,ht=y,ft=g,dt=m<<4|b>>>28,pt=b<<4|m>>>28,yt=v<<3|w>>>29,gt=w<<3|v>>>29,bt=E<<9|_>>>23,mt=_<<9|E>>>23,vt=S<<18|k>>>14,wt=k<<18|S>>>14,_t=x<<1|M>>>31,Et=M<<1|x>>>31,St=T<<12|A>>>20,kt=A<<12|T>>>20,xt=I<<10|C>>>22,Mt=C<<10|I>>>22,At=N<<13|R>>>19,Tt=R<<13|N>>>19,It=O<<2|L>>>30,Ct=L<<2|O>>>30,Rt=P<<30|j>>>2,Nt=j<<30|P>>>2,Ot=B<<6|D>>>26,Lt=D<<6|B>>>26,jt=F<<11|U>>>21,Pt=U<<11|F>>>21,Bt=H<<15|W>>>17,Dt=W<<15|H>>>17,Ut=q<<29|z>>>3,Ft=z<<29|q>>>3,Ht=V<<28|Z>>>4,Wt=Z<<28|V>>>4,zt=Y<<23|G>>>9,qt=G<<23|Y>>>9,Vt=$<<25|J>>>7,Zt=J<<25|$>>>7,Gt=K<<21|Q>>>11,Yt=Q<<21|K>>>11,$t=tt<<24|X>>>8,Jt=X<<24|tt>>>8,Kt=et<<27|nt>>>5,Qt=nt<<27|et>>>5,Xt=rt<<20|it>>>12,te=it<<20|rt>>>12,ee=st<<7|ot>>>25,ne=ot<<7|st>>>25,re=at<<8|ut>>>24,ie=ut<<8|at>>>24,oe=ct<<14|lt>>>18,se=lt<<14|ct>>>18;t[0]=ht^~St&jt,t[1]=ft^~kt&Pt,t[10]=Ht^~Xt&yt,t[11]=Wt^~te>,t[20]=_t^~Ot&Vt,t[21]=Et^~Lt&Zt,t[30]=Kt^~dt&xt,t[31]=Qt^~pt&Mt,t[40]=Rt^~zt&ee,t[41]=Nt^~qt&ne,t[2]=St^~jt&Gt,t[3]=kt^~Pt&Yt,t[12]=Xt^~yt&At,t[13]=te^~gt&Tt,t[22]=Ot^~Vt&re,t[23]=Lt^~Zt&ie,t[32]=dt^~xt&Bt,t[33]=pt^~Mt&Dt,t[42]=zt^~ee&bt,t[43]=qt^~ne&mt,t[4]=jt^~Gt&oe,t[5]=Pt^~Yt&se,t[14]=yt^~At&Ut,t[15]=gt^~Tt&Ft,t[24]=Vt^~re&vt,t[25]=Zt^~ie&wt,t[34]=xt^~Bt&$t,t[35]=Mt^~Dt&Jt,t[44]=ee^~bt&It,t[45]=ne^~mt&Ct,t[6]=Gt^~oe&ht,t[7]=Yt^~se&ft,t[16]=At^~Ut&Ht,t[17]=Tt^~Ft&Wt,t[26]=re^~vt&_t,t[27]=ie^~wt&Et,t[36]=Bt^~$t&Kt,t[37]=Dt^~Jt&Qt,t[46]=bt^~It&Rt,t[47]=mt^~Ct&Nt,t[8]=oe^~ht&St,t[9]=se^~ft&kt,t[18]=Ut^~Ht&Xt,t[19]=Ft^~Wt&te,t[28]=vt^~_t&Ot,t[29]=wt^~Et&Lt,t[38]=$t^~Kt&dt,t[39]=Jt^~Qt&pt,t[48]=It^~Rt&zt,t[49]=Ct^~Nt&qt,t[0]^=n[2*e],t[1]^=n[2*e+1]}}},9653:(t,e,n)=>{var r=n(8764).Buffer;const i=n(4040);function o(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}o.prototype.initialize=function(t,e){for(let t=0;t<50;++t)this.state[t]=0;this.blockSize=t/8,this.count=0,this.squeezing=!1},o.prototype.absorb=function(t){for(let e=0;e>>this.count%4*8&255,this.count+=1,this.count===this.blockSize&&(i.p1600(this.state),this.count=0);return e},o.prototype.copy=function(t){for(let e=0;e<50;++e)t.state[e]=this.state[e];t.blockSize=this.blockSize,t.count=this.count,t.squeezing=this.squeezing},t.exports=o},7630:t=>{"use strict";var e={};function n(t,n,r){r||(r=Error);var i=function(t){var e,r;function i(e,r,i){return t.call(this,function(t,e,r){return"string"==typeof n?n:n(t,e,r)}(e,r,i))||this}return r=t,(e=i).prototype=Object.create(r.prototype),e.prototype.constructor=e,e.__proto__=r,i}(r);i.prototype.name=r.name,i.prototype.code=t,e[t]=i}function r(t,e){if(Array.isArray(t)){var n=t.length;return t=t.map((function(t){return String(t)})),n>2?"one of ".concat(e," ").concat(t.slice(0,n-1).join(", "),", or ")+t[n-1]:2===n?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}n("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),n("ERR_INVALID_ARG_TYPE",(function(t,e,n){var i,o,s,a,u;if("string"==typeof e&&(o="not ",e.substr(0,o.length)===o)?(i="must not be",e=e.replace(/^not /,"")):i="must be",function(t,e,n){return(void 0===n||n>t.length)&&(n=t.length),t.substring(n-e.length,n)===e}(t," argument"))s="The ".concat(t," ").concat(i," ").concat(r(e,"type"));else{var c=("number"!=typeof u&&(u=0),u+".".length>(a=t).length||-1===a.indexOf(".",u)?"argument":"property");s='The "'.concat(t,'" ').concat(c," ").concat(i," ").concat(r(e,"type"))}return s+". Received type ".concat(typeof n)}),TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.q=e},7735:(t,e,n)=>{"use strict";var r=n(4155),i=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};t.exports=l;var o=n(3875),s=n(9843);n(5717)(l,o);for(var a=i(s.prototype),u=0;u{"use strict";t.exports=i;var r=n(6311);function i(t){if(!(this instanceof i))return new i(t);r.call(this,t)}n(5717)(i,r),i.prototype._transform=function(t,e,n){n(null,t)}},3875:(t,e,n)=>{"use strict";var r,i=n(4155);t.exports=x,x.ReadableState=k,n(7187).EventEmitter;var o,s=function(t,e){return t.listeners(e).length},a=n(9868),u=n(8764).Buffer,c=n.g.Uint8Array||function(){},l=n(6586);o=l&&l.debuglog?l.debuglog("stream"):function(){};var h,f,d,p=n(7983),y=n(3505),g=n(5482).getHighWaterMark,b=n(7630).q,m=b.ERR_INVALID_ARG_TYPE,v=b.ERR_STREAM_PUSH_AFTER_EOF,w=b.ERR_METHOD_NOT_IMPLEMENTED,_=b.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;n(5717)(x,a);var E=y.errorOrDestroy,S=["error","close","destroy","pause","resume"];function k(t,e,i){r=r||n(7735),t=t||{},"boolean"!=typeof i&&(i=e instanceof r),this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=g(this,t,"readableHighWaterMark",i),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!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(h||(h=n(2553).s),this.decoder=new h(t.encoding),this.encoding=t.encoding)}function x(t){if(r=r||n(7735),!(this instanceof x))return new x(t);var e=this instanceof r;this._readableState=new k(t,this,e),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),a.call(this)}function M(t,e,n,r,i){o("readableAddChunk",e);var s,a=t._readableState;if(null===e)a.reading=!1,function(t,e){if(o("onEofChunk"),!e.ended){if(e.decoder){var n=e.decoder.end();n&&n.length&&(e.buffer.push(n),e.length+=e.objectMode?1:n.length)}e.ended=!0,e.sync?C(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,R(t)))}}(t,a);else if(i||(s=function(t,e){var n,r;return r=e,u.isBuffer(r)||r instanceof c||"string"==typeof e||void 0===e||t.objectMode||(n=new m("chunk",["string","Buffer","Uint8Array"],e)),n}(a,e)),s)E(t,s);else if(a.objectMode||e&&e.length>0)if("string"==typeof e||a.objectMode||Object.getPrototypeOf(e)===u.prototype||(e=function(t){return u.from(t)}(e)),r)a.endEmitted?E(t,new _):A(t,a,e,!0);else if(a.ended)E(t,new v);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!n?(e=a.decoder.write(e),a.objectMode||0!==e.length?A(t,a,e,!1):N(t,a)):A(t,a,e,!1)}else r||(a.reading=!1,N(t,a));return!a.ended&&(a.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=T?t=T:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function C(t){var e=t._readableState;o("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(o("emitReadable",e.flowing),e.emittedReadable=!0,i.nextTick(R,t))}function R(t){var e=t._readableState;o("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,B(t)}function N(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(O,t,e))}function O(t,e){for(;!e.reading&&!e.ended&&(e.length0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function j(t){o("readable nexttick read 0"),t.read(0)}function P(t,e){o("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),B(t),e.flowing&&!e.reading&&t.read(0)}function B(t){var e=t._readableState;for(o("flow",e.flowing);e.flowing&&null!==t.read(););}function D(t,e){return 0===e.length?null:(e.objectMode?n=e.buffer.shift():!t||t>=e.length?(n=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):n=e.buffer.consume(t,e.decoder),n);var n}function U(t){var e=t._readableState;o("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,i.nextTick(F,e,t))}function F(t,e){if(o("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var n=e._writableState;(!n||n.autoDestroy&&n.finished)&&e.destroy()}}function H(t,e){for(var n=0,r=t.length;n=e.highWaterMark:e.length>0)||e.ended))return o("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?U(this):C(this),null;if(0===(t=I(t,e))&&e.ended)return 0===e.length&&U(this),null;var r,i=e.needReadable;return o("need readable",i),(0===e.length||e.length-t0?D(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&U(this)),null!==r&&this.emit("data",r),r},x.prototype._read=function(t){E(this,new w("_read()"))},x.prototype.pipe=function(t,e){var n=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=t;break;case 1:r.pipes=[r.pipes,t];break;default:r.pipes.push(t)}r.pipesCount+=1,o("pipe count=%d opts=%j",r.pipesCount,e);var a=e&&!1===e.end||t===i.stdout||t===i.stderr?y:u;function u(){o("onend"),t.end()}r.endEmitted?i.nextTick(a):n.once("end",a),t.on("unpipe",(function e(i,s){o("onunpipe"),i===n&&s&&!1===s.hasUnpiped&&(s.hasUnpiped=!0,o("cleanup"),t.removeListener("close",d),t.removeListener("finish",p),t.removeListener("drain",c),t.removeListener("error",f),t.removeListener("unpipe",e),n.removeListener("end",u),n.removeListener("end",y),n.removeListener("data",h),l=!0,!r.awaitDrain||t._writableState&&!t._writableState.needDrain||c())}));var c=function(t){return function(){var e=t._readableState;o("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&s(t,"data")&&(e.flowing=!0,B(t))}}(n);t.on("drain",c);var l=!1;function h(e){o("ondata");var i=t.write(e);o("dest.write",i),!1===i&&((1===r.pipesCount&&r.pipes===t||r.pipesCount>1&&-1!==H(r.pipes,t))&&!l&&(o("false write response, pause",r.awaitDrain),r.awaitDrain++),n.pause())}function f(e){o("onerror",e),y(),t.removeListener("error",f),0===s(t,"error")&&E(t,e)}function d(){t.removeListener("finish",p),y()}function p(){o("onfinish"),t.removeListener("close",d),y()}function y(){o("unpipe"),n.unpipe(t)}return n.on("data",h),function(t,e,n){if("function"==typeof t.prependListener)return t.prependListener(e,n);t._events&&t._events.error?Array.isArray(t._events.error)?t._events.error.unshift(n):t._events.error=[n,t._events.error]:t.on(e,n)}(t,"error",f),t.once("close",d),t.once("finish",p),t.emit("pipe",n),r.flowing||(o("pipe resume"),n.resume()),t},x.prototype.unpipe=function(t){var e=this._readableState,n={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,n)),this;if(!t){var r=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o0,!1!==r.flowing&&this.resume()):"readable"===t&&(r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.flowing=!1,r.emittedReadable=!1,o("on readable",r.length,r.reading),r.length?C(this):r.reading||i.nextTick(j,this))),n},x.prototype.addListener=x.prototype.on,x.prototype.removeListener=function(t,e){var n=a.prototype.removeListener.call(this,t,e);return"readable"===t&&i.nextTick(L,this),n},x.prototype.removeAllListeners=function(t){var e=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||i.nextTick(L,this),e},x.prototype.resume=function(){var t=this._readableState;return t.flowing||(o("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,i.nextTick(P,t,e))}(this,t)),t.paused=!1,this},x.prototype.pause=function(){return o("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(o("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},x.prototype.wrap=function(t){var e=this,n=this._readableState,r=!1;for(var i in t.on("end",(function(){if(o("wrapped end"),n.decoder&&!n.ended){var t=n.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){o("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i||(n.objectMode||i&&i.length)&&(e.push(i)||(r=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var s=0;s{"use strict";t.exports=l;var r=n(7630).q,i=r.ERR_METHOD_NOT_IMPLEMENTED,o=r.ERR_MULTIPLE_CALLBACK,s=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=r.ERR_TRANSFORM_WITH_LENGTH_0,u=n(7735);function c(t,e){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!=e&&this.push(e),r(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length{"use strict";var r,i=n(4155);function o(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,n){var r=t.entry;for(t.entry=null;r;){var i=r.callback;e.pendingcb--,i(undefined),r=r.next}e.corkedRequestsFree.next=t}(e,t)}}t.exports=x,x.WritableState=k;var s,a={deprecate:n(4927)},u=n(9868),c=n(8764).Buffer,l=n.g.Uint8Array||function(){},h=n(3505),f=n(5482).getHighWaterMark,d=n(7630).q,p=d.ERR_INVALID_ARG_TYPE,y=d.ERR_METHOD_NOT_IMPLEMENTED,g=d.ERR_MULTIPLE_CALLBACK,b=d.ERR_STREAM_CANNOT_PIPE,m=d.ERR_STREAM_DESTROYED,v=d.ERR_STREAM_NULL_VALUES,w=d.ERR_STREAM_WRITE_AFTER_END,_=d.ERR_UNKNOWN_ENCODING,E=h.errorOrDestroy;function S(){}function k(t,e,s){r=r||n(7735),t=t||{},"boolean"!=typeof s&&(s=e instanceof r),this.objectMode=!!t.objectMode,s&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=f(this,t,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===t.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var n=t._writableState,r=n.sync,o=n.writecb;if("function"!=typeof o)throw new g;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(n),e)!function(t,e,n,r,o){--e.pendingcb,n?(i.nextTick(o,r),i.nextTick(R,t,e),t._writableState.errorEmitted=!0,E(t,r)):(o(r),t._writableState.errorEmitted=!0,E(t,r),R(t,e))}(t,n,r,e,o);else{var s=I(n)||t.destroyed;s||n.corked||n.bufferProcessing||!n.bufferedRequest||T(t,n),r?i.nextTick(A,t,n,s,o):A(t,n,s,o)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function x(t){var e=this instanceof(r=r||n(7735));if(!e&&!s.call(x,this))return new x(t);this._writableState=new k(t,this,e),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),u.call(this)}function M(t,e,n,r,i,o,s){e.writelen=r,e.writecb=s,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new m("write")):n?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function A(t,e,n,r){n||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,r(),R(t,e)}function T(t,e){e.bufferProcessing=!0;var n=e.bufferedRequest;if(t._writev&&n&&n.next){var r=e.bufferedRequestCount,i=new Array(r),s=e.corkedRequestsFree;s.entry=n;for(var a=0,u=!0;n;)i[a]=n,n.isBuf||(u=!1),n=n.next,a+=1;i.allBuffers=u,M(t,e,!0,e.length,i,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new o(e),e.bufferedRequestCount=0}else{for(;n;){var c=n.chunk,l=n.encoding,h=n.callback;if(M(t,e,!1,e.objectMode?1:c.length,c,l,h),n=n.next,e.bufferedRequestCount--,e.writing)break}null===n&&(e.lastBufferedRequest=null)}e.bufferedRequest=n,e.bufferProcessing=!1}function I(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function C(t,e){t._final((function(n){e.pendingcb--,n&&E(t,n),e.prefinished=!0,t.emit("prefinish"),R(t,e)}))}function R(t,e){var n=I(e);if(n&&(function(t,e){e.prefinished||e.finalCalled||("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,i.nextTick(C,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var r=t._readableState;(!r||r.autoDestroy&&r.endEmitted)&&t.destroy()}return n}n(5717)(x,u),k.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(k.prototype,"buffer",{get:a.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(s=Function.prototype[Symbol.hasInstance],Object.defineProperty(x,Symbol.hasInstance,{value:function(t){return!!s.call(this,t)||this===x&&t&&t._writableState instanceof k}})):s=function(t){return t instanceof this},x.prototype.pipe=function(){E(this,new b)},x.prototype.write=function(t,e,n){var r,o=this._writableState,s=!1,a=!o.objectMode&&(r=t,c.isBuffer(r)||r instanceof l);return a&&!c.isBuffer(t)&&(t=function(t){return c.from(t)}(t)),"function"==typeof e&&(n=e,e=null),a?e="buffer":e||(e=o.defaultEncoding),"function"!=typeof n&&(n=S),o.ending?function(t,e){var n=new w;E(t,n),i.nextTick(e,n)}(this,n):(a||function(t,e,n,r){var o;return null===n?o=new v:"string"==typeof n||e.objectMode||(o=new p("chunk",["string","Buffer"],n)),!o||(E(t,o),i.nextTick(r,o),!1)}(this,o,t,n))&&(o.pendingcb++,s=function(t,e,n,r,i,o){if(!n){var s=function(t,e,n){return t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=c.from(e,n)),e}(e,r,i);r!==s&&(n=!0,i="buffer",r=s)}var a=e.objectMode?1:r.length;e.length+=a;var u=e.length-1))throw new _(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(x.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(x.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),x.prototype._write=function(t,e,n){n(new y("_write()"))},x.prototype._writev=null,x.prototype.end=function(t,e,n){var r=this._writableState;return"function"==typeof t?(n=t,t=null,e=null):"function"==typeof e&&(n=e,e=null),null!=t&&this.write(t,e),r.corked&&(r.corked=1,this.uncork()),r.ending||function(t,e,n){e.ending=!0,R(t,e),n&&(e.finished?i.nextTick(n):t.once("finish",n)),e.ended=!0,t.writable=!1}(this,r,n),this},Object.defineProperty(x.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(x.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),x.prototype.destroy=h.destroy,x.prototype._undestroy=h.undestroy,x.prototype._destroy=function(t,e){e(t)}},3471:(t,e,n)=>{"use strict";var r,i=n(4155);function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var s=n(8186),a=Symbol("lastResolve"),u=Symbol("lastReject"),c=Symbol("error"),l=Symbol("ended"),h=Symbol("lastPromise"),f=Symbol("handlePromise"),d=Symbol("stream");function p(t,e){return{value:t,done:e}}function y(t){var e=t[a];if(null!==e){var n=t[d].read();null!==n&&(t[h]=null,t[a]=null,t[u]=null,e(p(n,!1)))}}function g(t){i.nextTick(y,t)}var b=Object.getPrototypeOf((function(){})),m=Object.setPrototypeOf((o(r={get stream(){return this[d]},next:function(){var t=this,e=this[c];if(null!==e)return Promise.reject(e);if(this[l])return Promise.resolve(p(void 0,!0));if(this[d].destroyed)return new Promise((function(e,n){i.nextTick((function(){t[c]?n(t[c]):e(p(void 0,!0))}))}));var n,r=this[h];if(r)n=new Promise(function(t,e){return function(n,r){t.then((function(){e[l]?n(p(void 0,!0)):e[f](n,r)}),r)}}(r,this));else{var o=this[d].read();if(null!==o)return Promise.resolve(p(o,!1));n=new Promise(this[f])}return this[h]=n,n}},Symbol.asyncIterator,(function(){return this})),o(r,"return",(function(){var t=this;return new Promise((function(e,n){t[d].destroy(null,(function(t){t?n(t):e(p(void 0,!0))}))}))})),r),b);t.exports=function(t){var e,n=Object.create(m,(o(e={},d,{value:t,writable:!0}),o(e,a,{value:null,writable:!0}),o(e,u,{value:null,writable:!0}),o(e,c,{value:null,writable:!0}),o(e,l,{value:t._readableState.endEmitted,writable:!0}),o(e,f,{value:function(t,e){var r=n[d].read();r?(n[h]=null,n[a]=null,n[u]=null,t(p(r,!1))):(n[a]=t,n[u]=e)},writable:!0}),e));return n[h]=null,s(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=n[u];return null!==e&&(n[h]=null,n[a]=null,n[u]=null,e(t)),void(n[c]=t)}var r=n[a];null!==r&&(n[h]=null,n[a]=null,n[u]=null,r(p(void 0,!0))),n[l]=!0})),t.on("readable",g.bind(null,n)),n}},7983:(t,e,n)=>{"use strict";function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function o(t,e){for(var n=0;n0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,n=""+e.data;e=e.next;)n+=t+e.data;return n}},{key:"concat",value:function(t){if(0===this.length)return s.alloc(0);for(var e,n,r,i=s.allocUnsafe(t>>>0),o=this.head,a=0;o;)e=o.data,n=i,r=a,s.prototype.copy.call(e,n,r),a+=o.data.length,o=o.next;return i}},{key:"consume",value:function(t,e){var n;return ti.length?i.length:t;if(o===i.length?r+=i:r+=i.slice(0,t),0==(t-=o)){o===i.length?(++n,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(o));break}++n}return this.length-=n,r}},{key:"_getBuffer",value:function(t){var e=s.allocUnsafe(t),n=this.head,r=1;for(n.data.copy(e),t-=n.data.length;n=n.next;){var i=n.data,o=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,o),0==(t-=o)){o===i.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=i.slice(o));break}++r}return this.length-=r,e}},{key:u,value:function(t,e){return a(this,function(t){for(var e=1;e{"use strict";var r=n(4155);function i(t,e){s(t,e),o(t)}function o(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function s(t,e){t.emit("error",e)}t.exports={destroy:function(t,e){var n=this,a=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return a||u?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,r.nextTick(s,this,t)):r.nextTick(s,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!e&&t?n._writableState?n._writableState.errorEmitted?r.nextTick(o,n):(n._writableState.errorEmitted=!0,r.nextTick(i,n,t)):r.nextTick(i,n,t):e?(r.nextTick(o,n),e(t)):r.nextTick(o,n)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(t,e){var n=t._readableState,r=t._writableState;n&&n.autoDestroy||r&&r.autoDestroy?t.destroy(e):t.emit("error",e)}}},8186:(t,e,n)=>{"use strict";var r=n(7630).q.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function t(e,n,o){if("function"==typeof n)return t(e,null,n);n||(n={}),o=function(t){var e=!1;return function(){if(!e){e=!0;for(var n=arguments.length,r=new Array(n),i=0;i{t.exports=function(){throw new Error("Readable.from is not available in the browser")}},9619:(t,e,n)=>{"use strict";var r,i=n(7630).q,o=i.ERR_MISSING_ARGS,s=i.ERR_STREAM_DESTROYED;function a(t){if(t)throw t}function u(t,e,i,o){o=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(o);var a=!1;t.on("close",(function(){a=!0})),void 0===r&&(r=n(8186)),r(t,{readable:e,writable:i},(function(t){if(t)return o(t);a=!0,o()}));var u=!1;return function(e){if(!a&&!u)return u=!0,function(t){return t.setHeader&&"function"==typeof t.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void o(e||new s("pipe"))}}function c(t){t()}function l(t,e){return t.pipe(e)}function h(t){return t.length?"function"!=typeof t[t.length-1]?a:t.pop():a}t.exports=function(){for(var t=arguments.length,e=new Array(t),n=0;n0,(function(t){r||(r=t),t&&s.forEach(c),o||(s.forEach(c),i(r))}))}));return e.reduce(l)}},5482:(t,e,n)=>{"use strict";var r=n(7630).q.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(t,e,n,i){var o=function(t,e,n){return null!=t.highWaterMark?t.highWaterMark:e?t[n]:null}(e,i,n);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new r(i?n:"highWaterMark",o);return Math.floor(o)}return t.objectMode?16:16384}}},9868:(t,e,n)=>{t.exports=n(7187).EventEmitter},5092:(t,e,n)=>{(e=t.exports=n(3875)).Stream=e,e.Readable=e,e.Writable=n(9843),e.Duplex=n(7735),e.Transform=n(6311),e.PassThrough=n(6485),e.finished=n(8186),e.pipeline=n(9619)},2352:t=>{"use strict";const e=(t,e)=>function(){const n=e.promiseModule,r=new Array(arguments.length);for(let t=0;t{e.errorFirst?r.push((function(t,r){if(e.multiArgs){const e=new Array(arguments.length-1);for(let t=1;t{n=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},n);const r=t=>{const e=e=>"string"==typeof e?t===e:e.test(t);return n.include?n.include.some(e):!n.exclude.some(e)};let i;i="function"==typeof t?function(){return n.excludeMain?t.apply(this,arguments):e(t,n).apply(this,arguments)}:Object.create(Object.getPrototypeOf(t));for(const o in t){const s=t[o];i[o]="function"==typeof s&&r(o)?e(s,n):s}return i}},6400:(t,e,n)=>{"use strict";n.r(e),n.d(e,{Component:()=>w,Fragment:()=>v,cloneElement:()=>H,createContext:()=>W,createElement:()=>g,createRef:()=>m,h:()=>g,hydrate:()=>F,isValidElement:()=>s,options:()=>i,render:()=>U,toChildArray:()=>A});var r,i,o,s,a,u,c,l,h={},f=[],d=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function p(t,e){for(var n in e)t[n]=e[n];return t}function y(t){var e=t.parentNode;e&&e.removeChild(t)}function g(t,e,n){var i,o,s,a={};for(s in e)"key"==s?i=e[s]:"ref"==s?o=e[s]:a[s]=e[s];if(arguments.length>2&&(a.children=arguments.length>3?r.call(arguments,2):n),"function"==typeof t&&null!=t.defaultProps)for(s in t.defaultProps)void 0===a[s]&&(a[s]=t.defaultProps[s]);return b(t,a,i,o,null)}function b(t,e,n,r,s){var a={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==s?++o:s};return null==s&&null!=i.vnode&&i.vnode(a),a}function m(){return{current:null}}function v(t){return t.children}function w(t,e){this.props=t,this.context=e}function _(t,e){if(null==e)return t.__?_(t.__,t.__.__k.indexOf(t)+1):null;for(var n;e0?b(y.type,y.props,y.key,null,y.__v):y)){if(y.__=n,y.__b=n.__b+1,null===(p=E[l])||p&&y.key==p.key&&y.type===p.type)E[l]=void 0;else for(d=0;d2&&(a.children=arguments.length>3?r.call(arguments,2):n),b(t.type,a,i||t.key,o||t.ref,null)}function W(t,e){var n={__c:e="__cC"+l++,__:t,Consumer:function(t,e){return t.children(e)},Provider:function(t){var n,r;return this.getChildContext||(n=[],(r={})[e]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(t){this.props.value!==t.value&&n.some(S)},this.sub=function(t){n.push(t);var e=t.componentWillUnmount;t.componentWillUnmount=function(){n.splice(n.indexOf(t),1),e&&e.call(t)}}),t.children}};return n.Provider.__=n.Consumer.contextType=n}r=f.slice,i={__e:function(t,e){for(var n,r,i;e=e.__;)if((n=e.__c)&&!n.__)try{if((r=n.constructor)&&null!=r.getDerivedStateFromError&&(n.setState(r.getDerivedStateFromError(t)),i=n.__d),null!=n.componentDidCatch&&(n.componentDidCatch(t),i=n.__d),i)return n.__E=n}catch(e){t=e}throw t}},o=0,s=function(t){return null!=t&&void 0===t.constructor},w.prototype.setState=function(t,e){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=p({},this.state),"function"==typeof t&&(t=t(p({},n),this.props)),t&&p(n,t),null!=t&&this.__v&&(e&&this.__h.push(e),S(this))},w.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),S(this))},w.prototype.render=v,a=[],u="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,k.__r=0,l=0},396:(t,e,n)=>{"use strict";n.r(e),n.d(e,{useCallback:()=>E,useContext:()=>S,useDebugValue:()=>k,useEffect:()=>b,useErrorBoundary:()=>x,useImperativeHandle:()=>w,useLayoutEffect:()=>m,useMemo:()=>_,useReducer:()=>g,useRef:()=>v,useState:()=>y});var r,i,o,s=n(6400),a=0,u=[],c=s.options.__b,l=s.options.__r,h=s.options.diffed,f=s.options.__c,d=s.options.unmount;function p(t,e){s.options.__h&&s.options.__h(i,t,a||e),a=0;var n=i.__H||(i.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function y(t){return a=1,g(R,t)}function g(t,e,n){var o=p(r++,2);return o.t=t,o.__c||(o.__=[n?n(e):R(void 0,e),function(t){var e=o.t(o.__[0],t);o.__[0]!==e&&(o.__=[e,o.__[1]],o.__c.setState({}))}],o.__c=i),o.__}function b(t,e){var n=p(r++,3);!s.options.__s&&C(n.__H,e)&&(n.__=t,n.__H=e,i.__H.__h.push(n))}function m(t,e){var n=p(r++,4);!s.options.__s&&C(n.__H,e)&&(n.__=t,n.__H=e,i.__h.push(n))}function v(t){return a=5,_((function(){return{current:t}}),[])}function w(t,e,n){a=6,m((function(){"function"==typeof t?t(e()):t&&(t.current=e())}),null==n?n:n.concat(t))}function _(t,e){var n=p(r++,7);return C(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function E(t,e){return a=8,_((function(){return t}),e)}function S(t){var e=i.context[t.__c],n=p(r++,9);return n.c=t,e?(null==n.__&&(n.__=!0,e.sub(i)),e.props.value):t.__}function k(t,e){s.options.useDebugValue&&s.options.useDebugValue(e?e(t):t)}function x(t){var e=p(r++,10),n=y();return e.__=t,i.componentDidCatch||(i.componentDidCatch=function(t){e.__&&e.__(t),n[1](t)}),[n[0],function(){n[1](void 0)}]}function M(){var t;for(u.sort((function(t,e){return t.__v.__b-e.__v.__b}));t=u.pop();)if(t.__P)try{t.__H.__h.forEach(T),t.__H.__h.forEach(I),t.__H.__h=[]}catch(e){t.__H.__h=[],s.options.__e(e,t.__v)}}s.options.__b=function(t){i=null,c&&c(t)},s.options.__r=function(t){l&&l(t),r=0;var e=(i=t.__c).__H;e&&(e.__h.forEach(T),e.__h.forEach(I),e.__h=[])},s.options.diffed=function(t){h&&h(t);var e=t.__c;e&&e.__H&&e.__H.__h.length&&(1!==u.push(e)&&o===s.options.requestAnimationFrame||((o=s.options.requestAnimationFrame)||function(t){var e,n=function(){clearTimeout(r),A&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);A&&(e=requestAnimationFrame(n))})(M)),i=null},s.options.__c=function(t,e){e.some((function(t){try{t.__h.forEach(T),t.__h=t.__h.filter((function(t){return!t.__||I(t)}))}catch(n){e.some((function(t){t.__h&&(t.__h=[])})),e=[],s.options.__e(n,t.__v)}})),f&&f(t,e)},s.options.unmount=function(t){d&&d(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach((function(t){try{T(t)}catch(t){e=t}})),e&&s.options.__e(e,n.__v))};var A="function"==typeof requestAnimationFrame;function T(t){var e=i,n=t.__c;"function"==typeof n&&(t.__c=void 0,n()),i=e}function I(t){var e=i;t.__c=t.__(),i=e}function C(t,e){return!t||t.length!==e.length||e.some((function(e,n){return e!==t[n]}))}function R(t,e){return"function"==typeof e?e(t):e}},4155:t=>{var e,n,r=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(t){if(e===setTimeout)return setTimeout(t,0);if((e===i||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(n){try{return e.call(null,t,0)}catch(n){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:i}catch(t){e=i}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(t){n=o}}();var a,u=[],c=!1,l=-1;function h(){c&&a&&(c=!1,a.length?u=a.concat(u):l=-1,u.length&&f())}function f(){if(!c){var t=s(h);c=!0;for(var e=u.length;e;){for(a=u,u=[];++l1)for(var n=1;n{"use strict";n.r(e),n.d(e,{ArgumentOutOfRangeError:()=>C.W,AsyncSubject:()=>l.c,BehaviorSubject:()=>u.X,ConnectableObservable:()=>i.c,EMPTY:()=>$.E,EmptyError:()=>R.K,GroupedObservable:()=>o.T,NEVER:()=>ht,Notification:()=>x.P,NotificationKind:()=>x.W,ObjectUnsubscribedError:()=>N.N,Observable:()=>r.y,ReplaySubject:()=>c.t,Scheduler:()=>E.b,Subject:()=>a.xQ,Subscriber:()=>k.L,Subscription:()=>S.w,TimeoutError:()=>L.W,UnsubscriptionError:()=>O.B,VirtualAction:()=>_,VirtualTimeScheduler:()=>w,animationFrame:()=>v,animationFrameScheduler:()=>m,asap:()=>h.e,asapScheduler:()=>h.E,async:()=>f.P,asyncScheduler:()=>f.z,bindCallback:()=>U,bindNodeCallback:()=>W,combineLatest:()=>Z.aj,concat:()=>G.z,config:()=>It.v,defer:()=>Y.P,empty:()=>$.c,forkJoin:()=>Q,from:()=>K.D,fromEvent:()=>et,fromEventPattern:()=>rt,generate:()=>it,identity:()=>T.y,iif:()=>st,interval:()=>ut,isObservable:()=>I,merge:()=>lt.T,never:()=>ft,noop:()=>A.Z,observable:()=>s.L,of:()=>dt.of,onErrorResumeNext:()=>pt,pairs:()=>yt,partition:()=>wt,pipe:()=>M.z,queue:()=>d.c,queueScheduler:()=>d.N,race:()=>_t.S3,range:()=>Et,scheduled:()=>Tt.x,throwError:()=>kt._,timer:()=>xt.H,using:()=>Mt,zip:()=>At.$R});var r=n(2772),i=n(3140),o=n(1120),s=n(5050),a=n(211),u=n(9233),c=n(2630),l=n(364),h=n(6650),f=n(964),d=n(2546),p=n(5987),y=n(6114),g=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return p.ZT(e,t),e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,e,n,r):(e.actions.push(this),e.scheduled||(e.scheduled=requestAnimationFrame((function(){return e.flush(null)}))))},e.prototype.recycleAsyncId=function(e,n,r){if(void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,r);0===e.actions.length&&(cancelAnimationFrame(n),e.scheduled=void 0)},e}(y.o),b=n(8399),m=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return p.ZT(e,t),e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,n=this.actions,r=-1,i=n.length;t=t||n.shift();do{if(e=t.execute(t.state,t.delay))break}while(++re.index?1:-1:t.delay>e.delay?1:-1},e}(y.o),E=n(8725),S=n(8760),k=n(979),x=n(2632),M=n(2561),A=n(3306),T=n(3608);function I(t){return!!t&&(t instanceof r.y||"function"==typeof t.lift&&"function"==typeof t.subscribe)}var C=n(6565),R=n(6929),N=n(1016),O=n(8782),L=n(1462),j=n(5709),P=n(3642),B=n(9026),D=n(7507);function U(t,e,n){if(e){if(!(0,D.K)(e))return function(){for(var r=[],i=0;i1?r.next(Array.prototype.slice.call(arguments)):r.next(t)}),r,n)}))}function nt(t,e,n,r,i){var o;if(function(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(t)){var s=t;t.addEventListener(e,n,i),o=function(){return s.removeEventListener(e,n,i)}}else if(function(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(t)){var a=t;t.on(e,n),o=function(){return a.off(e,n)}}else if(function(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(t)){var u=t;t.addListener(e,n),o=function(){return u.removeListener(e,n)}}else{if(!t||!t.length)throw new TypeError("Invalid event target");for(var c=0,l=t.length;c=e){r.complete();break}if(r.next(o++),r.closed)break}}))}function St(t){var e=t.start,n=t.index,r=t.count,i=t.subscriber;n>=r?i.complete():(i.next(e),i.closed||(t.index=n+1,t.start=e+1,this.schedule(t)))}var kt=n(4944),xt=n(9604);function Mt(t,e){return new r.y((function(n){var r,i;try{r=t()}catch(t){return void n.error(t)}try{i=e(r)}catch(t){return void n.error(t)}var o=(i?(0,K.D)(i):$.E).subscribe(n);return function(){o.unsubscribe(),r&&r.unsubscribe()}}))}var At=n(5080),Tt=n(8107),It=n(150)},364:(t,e,n)=>{"use strict";n.d(e,{c:()=>s});var r=n(5987),i=n(211),o=n(8760),s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.value=null,e.hasNext=!1,e.hasCompleted=!1,e}return r.ZT(e,t),e.prototype._subscribe=function(e){return this.hasError?(e.error(this.thrownError),o.w.EMPTY):this.hasCompleted&&this.hasNext?(e.next(this.value),e.complete(),o.w.EMPTY):t.prototype._subscribe.call(this,e)},e.prototype.next=function(t){this.hasCompleted||(this.value=t,this.hasNext=!0)},e.prototype.error=function(e){this.hasCompleted||t.prototype.error.call(this,e)},e.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&t.prototype.next.call(this,this.value),t.prototype.complete.call(this)},e}(i.xQ)},9233:(t,e,n)=>{"use strict";n.d(e,{X:()=>s});var r=n(5987),i=n(211),o=n(1016),s=function(t){function e(e){var n=t.call(this)||this;return n._value=e,n}return r.ZT(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),e.prototype._subscribe=function(e){var n=t.prototype._subscribe.call(this,e);return n&&!n.closed&&e.next(this._value),n},e.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new o.N;return this._value},e.prototype.next=function(e){t.prototype.next.call(this,this._value=e)},e}(i.xQ)},2632:(t,e,n)=>{"use strict";n.d(e,{P:()=>a,W:()=>r});var r,i=n(5631),o=n(8170),s=n(4944);r||(r={});var a=function(){function t(t,e,n){this.kind=t,this.value=e,this.error=n,this.hasValue="N"===t}return t.prototype.observe=function(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}},t.prototype.do=function(t,e,n){switch(this.kind){case"N":return t&&t(this.value);case"E":return e&&e(this.error);case"C":return n&&n()}},t.prototype.accept=function(t,e,n){return t&&"function"==typeof t.next?this.observe(t):this.do(t,e,n)},t.prototype.toObservable=function(){switch(this.kind){case"N":return(0,o.of)(this.value);case"E":return(0,s._)(this.error);case"C":return(0,i.c)()}throw new Error("unexpected notification kind value")},t.createNext=function(e){return void 0!==e?new t("N",e):t.undefinedValueNotification},t.createError=function(e){return new t("E",void 0,e)},t.createComplete=function(){return t.completeNotification},t.completeNotification=new t("C"),t.undefinedValueNotification=new t("N",void 0),t}()},2772:(t,e,n)=>{"use strict";n.d(e,{y:()=>l});var r=n(3642),i=n(979),o=n(3142),s=n(2174),a=n(5050),u=n(2561),c=n(150),l=function(){function t(t){this._isScalar=!1,t&&(this._subscribe=t)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var r=this.operator,a=function(t,e,n){if(t){if(t instanceof i.L)return t;if(t[o.b])return t[o.b]()}return t||e||n?new i.L(t,e,n):new i.L(s.c)}(t,e,n);if(r?a.add(r.call(a,this.source)):a.add(this.source||c.v.useDeprecatedSynchronousErrorHandling&&!a.syncErrorThrowable?this._subscribe(a):this._trySubscribe(a)),c.v.useDeprecatedSynchronousErrorHandling&&a.syncErrorThrowable&&(a.syncErrorThrowable=!1,a.syncErrorThrown))throw a.syncErrorValue;return a},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){c.v.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),(0,r._)(t)?t.error(e):console.warn(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=h(e))((function(e,r){var i;i=n.subscribe((function(e){try{t(e)}catch(t){r(t),i&&i.unsubscribe()}}),r,e)}))},t.prototype._subscribe=function(t){var e=this.source;return e&&e.subscribe(t)},t.prototype[a.L]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e{"use strict";n.d(e,{c:()=>o});var r=n(150),i=n(1644),o={closed:!0,next:function(t){},error:function(t){if(r.v.useDeprecatedSynchronousErrorHandling)throw t;(0,i.z)(t)},complete:function(){}}},2039:(t,e,n)=>{"use strict";n.d(e,{L:()=>i});var r=n(5987),i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.ZT(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.destination.next(e)},e.prototype.notifyError=function(t,e){this.destination.error(t)},e.prototype.notifyComplete=function(t){this.destination.complete()},e}(n(979).L)},2630:(t,e,n)=>{"use strict";n.d(e,{t:()=>l});var r=n(5987),i=n(211),o=n(2546),s=n(8760),a=n(9276),u=n(1016),c=n(8253),l=function(t){function e(e,n,r){void 0===e&&(e=Number.POSITIVE_INFINITY),void 0===n&&(n=Number.POSITIVE_INFINITY);var i=t.call(this)||this;return i.scheduler=r,i._events=[],i._infiniteTimeWindow=!1,i._bufferSize=e<1?1:e,i._windowTime=n<1?1:n,n===Number.POSITIVE_INFINITY?(i._infiniteTimeWindow=!0,i.next=i.nextInfiniteTimeWindow):i.next=i.nextTimeWindow,i}return r.ZT(e,t),e.prototype.nextInfiniteTimeWindow=function(e){if(!this.isStopped){var n=this._events;n.push(e),n.length>this._bufferSize&&n.shift()}t.prototype.next.call(this,e)},e.prototype.nextTimeWindow=function(e){this.isStopped||(this._events.push(new h(this._getNow(),e)),this._trimBufferThenGetEvents()),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){var e,n=this._infiniteTimeWindow,r=n?this._events:this._trimBufferThenGetEvents(),i=this.scheduler,o=r.length;if(this.closed)throw new u.N;if(this.isStopped||this.hasError?e=s.w.EMPTY:(this.observers.push(t),e=new c.W(this,t)),i&&t.add(t=new a.ht(t,i)),n)for(var l=0;le&&(o=Math.max(o,i-e)),o>0&&r.splice(0,o),r},e}(i.xQ),h=function(){return function(t,e){this.time=t,this.value=e}}()},8725:(t,e,n)=>{"use strict";n.d(e,{b:()=>r});var r=function(){function t(e,n){void 0===n&&(n=t.now),this.SchedulerAction=e,this.now=n}return t.prototype.schedule=function(t,e,n){return void 0===e&&(e=0),new this.SchedulerAction(this,t).schedule(n,e)},t.now=function(){return Date.now()},t}()},211:(t,e,n)=>{"use strict";n.d(e,{Yc:()=>l,xQ:()=>h});var r=n(5987),i=n(2772),o=n(979),s=n(8760),a=n(1016),u=n(8253),c=n(3142),l=function(t){function e(e){var n=t.call(this,e)||this;return n.destination=e,n}return r.ZT(e,t),e}(o.L),h=function(t){function e(){var e=t.call(this)||this;return e.observers=[],e.closed=!1,e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return r.ZT(e,t),e.prototype[c.b]=function(){return new l(this)},e.prototype.lift=function(t){var e=new f(this,this);return e.operator=t,e},e.prototype.next=function(t){if(this.closed)throw new a.N;if(!this.isStopped)for(var e=this.observers,n=e.length,r=e.slice(),i=0;i{"use strict";n.d(e,{W:()=>i});var r=n(5987),i=function(t){function e(e,n){var r=t.call(this)||this;return r.subject=e,r.subscriber=n,r.closed=!1,r}return r.ZT(e,t),e.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t=this.subject,e=t.observers;if(this.subject=null,e&&0!==e.length&&!t.isStopped&&!t.closed){var n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}},e}(n(8760).w)},979:(t,e,n)=>{"use strict";n.d(e,{L:()=>l});var r=n(5987),i=n(4156),o=n(2174),s=n(8760),a=n(3142),u=n(150),c=n(1644),l=function(t){function e(n,r,i){var s=t.call(this)||this;switch(s.syncErrorValue=null,s.syncErrorThrown=!1,s.syncErrorThrowable=!1,s.isStopped=!1,arguments.length){case 0:s.destination=o.c;break;case 1:if(!n){s.destination=o.c;break}if("object"==typeof n){n instanceof e?(s.syncErrorThrowable=n.syncErrorThrowable,s.destination=n,n.add(s)):(s.syncErrorThrowable=!0,s.destination=new h(s,n));break}default:s.syncErrorThrowable=!0,s.destination=new h(s,n,r,i)}return s}return r.ZT(e,t),e.prototype[a.b]=function(){return this},e.create=function(t,n,r){var i=new e(t,n,r);return i.syncErrorThrowable=!1,i},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e.prototype._unsubscribeAndRecycle=function(){var t=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this},e}(s.w),h=function(t){function e(e,n,r,s){var a,u=t.call(this)||this;u._parentSubscriber=e;var c=u;return(0,i.m)(n)?a=n:n&&(a=n.next,r=n.error,s=n.complete,n!==o.c&&(c=Object.create(n),(0,i.m)(c.unsubscribe)&&u.add(c.unsubscribe.bind(c)),c.unsubscribe=u.unsubscribe.bind(u))),u._context=c,u._next=a,u._error=r,u._complete=s,u}return r.ZT(e,t),e.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;u.v.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},e.prototype.error=function(t){if(!this.isStopped){var e=this._parentSubscriber,n=u.v.useDeprecatedSynchronousErrorHandling;if(this._error)n&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)n?(e.syncErrorValue=t,e.syncErrorThrown=!0):(0,c.z)(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;(0,c.z)(t)}}},e.prototype.complete=function(){var t=this;if(!this.isStopped){var e=this._parentSubscriber;if(this._complete){var n=function(){return t._complete.call(t._context)};u.v.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(t){if(this.unsubscribe(),u.v.useDeprecatedSynchronousErrorHandling)throw t;(0,c.z)(t)}},e.prototype.__tryOrSetError=function(t,e,n){if(!u.v.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(e){return u.v.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=e,t.syncErrorThrown=!0,!0):((0,c.z)(e),!0)}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(l)},8760:(t,e,n)=>{"use strict";n.d(e,{w:()=>a});var r=n(9026),i=n(2009),o=n(4156),s=n(8782),a=function(){function t(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._ctorUnsubscribe=!0,this._unsubscribe=t)}var e;return t.prototype.unsubscribe=function(){var e;if(!this.closed){var n=this,a=n._parentOrParents,c=n._ctorUnsubscribe,l=n._unsubscribe,h=n._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,a instanceof t)a.remove(this);else if(null!==a)for(var f=0;f{"use strict";n.d(e,{v:()=>i});var r=!1,i={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){t&&(new Error).stack,r=t},get useDeprecatedSynchronousErrorHandling(){return r}}},7604:(t,e,n)=>{"use strict";n.d(e,{Ds:()=>u,IY:()=>a,ft:()=>c});var r=n(5987),i=n(979),o=n(2772),s=n(7843),a=function(t){function e(e){var n=t.call(this)||this;return n.parent=e,n}return r.ZT(e,t),e.prototype._next=function(t){this.parent.notifyNext(t)},e.prototype._error=function(t){this.parent.notifyError(t),this.unsubscribe()},e.prototype._complete=function(){this.parent.notifyComplete(),this.unsubscribe()},e}(i.L),u=(i.L,function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.ZT(e,t),e.prototype.notifyNext=function(t){this.destination.next(t)},e.prototype.notifyError=function(t){this.destination.error(t)},e.prototype.notifyComplete=function(){this.destination.complete()},e}(i.L));function c(t,e){if(!e.closed){if(t instanceof o.y)return t.subscribe(e);var n;try{n=(0,s.s)(t)(e)}catch(t){e.error(t)}return n}}i.L},3140:(t,e,n)=>{"use strict";n.d(e,{N:()=>l,c:()=>c});var r=n(5987),i=n(211),o=n(2772),s=n(979),a=n(8760),u=n(3018),c=function(t){function e(e,n){var r=t.call(this)||this;return r.source=e,r.subjectFactory=n,r._refCount=0,r._isComplete=!1,r}return r.ZT(e,t),e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},e.prototype.connect=function(){var t=this._connection;return t||(this._isComplete=!1,(t=this._connection=new a.w).add(this.source.subscribe(new h(this.getSubject(),this))),t.closed&&(this._connection=null,t=a.w.EMPTY)),t},e.prototype.refCount=function(){return(0,u.x)()(this)},e}(o.y),l=function(){var t=c.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:t._subscribe},_isComplete:{value:t._isComplete,writable:!0},getSubject:{value:t.getSubject},connect:{value:t.connect},refCount:{value:t.refCount}}}(),h=function(t){function e(e,n){var r=t.call(this,e)||this;return r.connectable=n,r}return r.ZT(e,t),e.prototype._error=function(e){this._unsubscribe(),t.prototype._error.call(this,e)},e.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}},e}(i.Yc);s.L},5142:(t,e,n)=>{"use strict";n.d(e,{Ms:()=>h,aj:()=>l});var r=n(5987),i=n(7507),o=n(9026),s=n(2039),a=n(2080),u=n(3375),c={};function l(){for(var t=[],e=0;e{"use strict";n.d(e,{z:()=>o});var r=n(8170),i=n(2257);function o(){for(var t=[],e=0;e{"use strict";n.d(e,{P:()=>s});var r=n(2772),i=n(5760),o=n(5631);function s(t){return new r.y((function(e){var n;try{n=t()}catch(t){return void e.error(t)}return(n?(0,i.D)(n):(0,o.c)()).subscribe(e)}))}},5631:(t,e,n)=>{"use strict";n.d(e,{E:()=>i,c:()=>o});var r=n(2772),i=new r.y((function(t){return t.complete()}));function o(t){return t?function(t){return new r.y((function(e){return t.schedule((function(){return e.complete()}))}))}(t):i}},5760:(t,e,n)=>{"use strict";n.d(e,{D:()=>s});var r=n(2772),i=n(7843),o=n(8107);function s(t,e){return e?(0,o.x)(t,e):t instanceof r.y?t:new r.y((0,i.s)(t))}},3375:(t,e,n)=>{"use strict";n.d(e,{n:()=>s});var r=n(2772),i=n(6900),o=n(3109);function s(t,e){return e?(0,o.r)(t,e):new r.y((0,i.V)(t))}},4370:(t,e,n)=>{"use strict";n.d(e,{T:()=>a});var r=n(2772),i=n(7507),o=n(2556),s=n(3375);function a(){for(var t=[],e=0;e1&&"number"==typeof t[t.length-1]&&(n=t.pop())):"number"==typeof u&&(n=t.pop()),null===a&&1===t.length&&t[0]instanceof r.y?t[0]:(0,o.J)(n)((0,s.n)(t,a))}},8170:(t,e,n)=>{"use strict";n.d(e,{of:()=>s});var r=n(7507),i=n(3375),o=n(3109);function s(){for(var t=[],e=0;e{"use strict";n.d(e,{S3:()=>u});var r=n(5987),i=n(9026),o=n(3375),s=n(2039),a=n(2080);function u(){for(var t=[],e=0;e{"use strict";n.d(e,{_:()=>i});var r=n(2772);function i(t,e){return e?new r.y((function(n){return e.schedule(o,0,{error:t,subscriber:n})})):new r.y((function(e){return e.error(t)}))}function o(t){var e=t.error;t.subscriber.error(e)}},9604:(t,e,n)=>{"use strict";n.d(e,{H:()=>a});var r=n(2772),i=n(964),o=n(5812),s=n(7507);function a(t,e,n){void 0===t&&(t=0);var a=-1;return(0,o.k)(e)?a=Number(e)<1?1:Number(e):(0,s.K)(e)&&(n=e),(0,s.K)(n)||(n=i.P),new r.y((function(e){var r=(0,o.k)(t)?t:+t-n.now();return n.schedule(u,r,{index:0,period:a,subscriber:e})}))}function u(t){var e=t.index,n=t.period,r=t.subscriber;if(r.next(e),!r.closed){if(-1===n)return r.complete();t.index=e+1,this.schedule(t,n)}}},5080:(t,e,n)=>{"use strict";n.d(e,{$R:()=>c,mx:()=>l});var r=n(5987),i=n(3375),o=n(9026),s=n(979),a=n(999),u=n(7604);function c(){for(var t=[],e=0;ethis.index},t.prototype.hasCompleted=function(){return this.array.length===this.index},t}(),p=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.parent=n,i.observable=r,i.stillUnsubscribed=!0,i.buffer=[],i.isComplete=!1,i}return r.ZT(e,t),e.prototype[a.hZ]=function(){return this},e.prototype.next=function(){var t=this.buffer;return 0===t.length&&this.isComplete?{value:null,done:!0}:{value:t.shift(),done:!1}},e.prototype.hasValue=function(){return this.buffer.length>0},e.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},e.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},e.prototype.notifyNext=function(t){this.buffer.push(t),this.parent.checkIterators()},e.prototype.subscribe=function(){return(0,u.ft)(this.observable,new u.IY(this))},e}(u.Ds)},2257:(t,e,n)=>{"use strict";n.d(e,{u:()=>i});var r=n(2556);function i(){return(0,r.J)(1)}},6008:(t,e,n)=>{"use strict";n.d(e,{h:()=>o});var r=n(5987),i=n(979);function o(t,e){return function(n){return n.lift(new s(t,e))}}var s=function(){function t(t,e){this.predicate=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.predicate,this.thisArg))},t}(),a=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.predicate=n,i.thisArg=r,i.count=0,i}return r.ZT(e,t),e.prototype._next=function(t){var e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}e&&this.destination.next(t)},e}(i.L)},1120:(t,e,n)=>{"use strict";n.d(e,{T:()=>f,v:()=>u});var r=n(5987),i=n(979),o=n(8760),s=n(2772),a=n(211);function u(t,e,n,r){return function(i){return i.lift(new c(t,e,n,r))}}var c=function(){function t(t,e,n,r){this.keySelector=t,this.elementSelector=e,this.durationSelector=n,this.subjectSelector=r}return t.prototype.call=function(t,e){return e.subscribe(new l(t,this.keySelector,this.elementSelector,this.durationSelector,this.subjectSelector))},t}(),l=function(t){function e(e,n,r,i,o){var s=t.call(this,e)||this;return s.keySelector=n,s.elementSelector=r,s.durationSelector=i,s.subjectSelector=o,s.groups=null,s.attemptedToUnsubscribe=!1,s.count=0,s}return r.ZT(e,t),e.prototype._next=function(t){var e;try{e=this.keySelector(t)}catch(t){return void this.error(t)}this._group(t,e)},e.prototype._group=function(t,e){var n=this.groups;n||(n=this.groups=new Map);var r,i=n.get(e);if(this.elementSelector)try{r=this.elementSelector(t)}catch(t){this.error(t)}else r=t;if(!i){i=this.subjectSelector?this.subjectSelector():new a.xQ,n.set(e,i);var o=new f(e,i,this);if(this.destination.next(o),this.durationSelector){var s=void 0;try{s=this.durationSelector(new f(e,i))}catch(t){return void this.error(t)}this.add(s.subscribe(new h(e,i,this)))}}i.closed||i.next(r)},e.prototype._error=function(t){var e=this.groups;e&&(e.forEach((function(e,n){e.error(t)})),e.clear()),this.destination.error(t)},e.prototype._complete=function(){var t=this.groups;t&&(t.forEach((function(t,e){t.complete()})),t.clear()),this.destination.complete()},e.prototype.removeGroup=function(t){this.groups.delete(t)},e.prototype.unsubscribe=function(){this.closed||(this.attemptedToUnsubscribe=!0,0===this.count&&t.prototype.unsubscribe.call(this))},e}(i.L),h=function(t){function e(e,n,r){var i=t.call(this,n)||this;return i.key=e,i.group=n,i.parent=r,i}return r.ZT(e,t),e.prototype._next=function(t){this.complete()},e.prototype._unsubscribe=function(){var t=this.parent,e=this.key;this.key=this.parent=null,t&&t.removeGroup(e)},e}(i.L),f=function(t){function e(e,n,r){var i=t.call(this)||this;return i.key=e,i.groupSubject=n,i.refCountSubscription=r,i}return r.ZT(e,t),e.prototype._subscribe=function(t){var e=new o.w,n=this.refCountSubscription,r=this.groupSubject;return n&&!n.closed&&e.add(new d(n)),e.add(r.subscribe(t)),e},e}(s.y),d=function(t){function e(e){var n=t.call(this)||this;return n.parent=e,e.count++,n}return r.ZT(e,t),e.prototype.unsubscribe=function(){var e=this.parent;e.closed||this.closed||(t.prototype.unsubscribe.call(this),e.count-=1,0===e.count&&e.attemptedToUnsubscribe&&e.unsubscribe())},e}(o.w)},5709:(t,e,n)=>{"use strict";n.d(e,{U:()=>o});var r=n(5987),i=n(979);function o(t,e){return function(n){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new s(t,e))}}var s=function(){function t(t,e){this.project=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.project,this.thisArg))},t}(),a=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.project=n,i.count=0,i.thisArg=r||i,i}return r.ZT(e,t),e.prototype._next=function(t){var e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(i.L)},2556:(t,e,n)=>{"use strict";n.d(e,{J:()=>o});var r=n(7746),i=n(3608);function o(t){return void 0===t&&(t=Number.POSITIVE_INFINITY),(0,r.zg)(i.y,t)}},7746:(t,e,n)=>{"use strict";n.d(e,{VS:()=>l,zg:()=>a});var r=n(5987),i=n(5709),o=n(5760),s=n(7604);function a(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"==typeof e?function(r){return r.pipe(a((function(n,r){return(0,o.D)(t(n,r)).pipe((0,i.U)((function(t,i){return e(n,t,r,i)})))}),n))}:("number"==typeof e&&(n=e),function(e){return e.lift(new u(t,n))})}var u=function(){function t(t,e){void 0===e&&(e=Number.POSITIVE_INFINITY),this.project=t,this.concurrent=e}return t.prototype.call=function(t,e){return e.subscribe(new c(t,this.project,this.concurrent))},t}(),c=function(t){function e(e,n,r){void 0===r&&(r=Number.POSITIVE_INFINITY);var i=t.call(this,e)||this;return i.project=n,i.concurrent=r,i.hasCompleted=!1,i.buffer=[],i.active=0,i.index=0,i}return r.ZT(e,t),e.prototype._next=function(t){this.active0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},e}(s.Ds),l=a},9276:(t,e,n)=>{"use strict";n.d(e,{QV:()=>s,ht:()=>u});var r=n(5987),i=n(979),o=n(2632);function s(t,e){return void 0===e&&(e=0),function(n){return n.lift(new a(t,e))}}var a=function(){function t(t,e){void 0===e&&(e=0),this.scheduler=t,this.delay=e}return t.prototype.call=function(t,e){return e.subscribe(new u(t,this.scheduler,this.delay))},t}(),u=function(t){function e(e,n,r){void 0===r&&(r=0);var i=t.call(this,e)||this;return i.scheduler=n,i.delay=r,i}return r.ZT(e,t),e.dispatch=function(t){var e=t.notification,n=t.destination;e.observe(n),this.unsubscribe()},e.prototype.scheduleMessage=function(t){this.destination.add(this.scheduler.schedule(e.dispatch,this.delay,new c(t,this.destination)))},e.prototype._next=function(t){this.scheduleMessage(o.P.createNext(t))},e.prototype._error=function(t){this.scheduleMessage(o.P.createError(t)),this.unsubscribe()},e.prototype._complete=function(){this.scheduleMessage(o.P.createComplete()),this.unsubscribe()},e}(i.L),c=function(){return function(t,e){this.notification=t,this.destination=e}}()},3018:(t,e,n)=>{"use strict";n.d(e,{x:()=>o});var r=n(5987),i=n(979);function o(){return function(t){return t.lift(new s(t))}}var s=function(){function t(t){this.connectable=t}return t.prototype.call=function(t,e){var n=this.connectable;n._refCount++;var r=new a(t,n),i=e.subscribe(r);return r.closed||(r.connection=n.connect()),i},t}(),a=function(t){function e(e,n){var r=t.call(this,e)||this;return r.connectable=n,r}return r.ZT(e,t),e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._refCount;if(e<=0)this.connection=null;else if(t._refCount=e-1,e>1)this.connection=null;else{var n=this.connection,r=t._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()}}else this.connection=null},e}(i.L)},3109:(t,e,n)=>{"use strict";n.d(e,{r:()=>o});var r=n(2772),i=n(8760);function o(t,e){return new r.y((function(n){var r=new i.w,o=0;return r.add(e.schedule((function(){o!==t.length?(n.next(t[o++]),n.closed||r.add(this.schedule())):n.complete()}))),r}))}},8107:(t,e,n)=>{"use strict";n.d(e,{x:()=>l});var r=n(2772),i=n(8760),o=n(5050),s=n(3109),a=n(999),u=n(336),c=n(9217);function l(t,e){if(null!=t){if(function(t){return t&&"function"==typeof t[o.L]}(t))return function(t,e){return new r.y((function(n){var r=new i.w;return r.add(e.schedule((function(){var i=t[o.L]();r.add(i.subscribe({next:function(t){r.add(e.schedule((function(){return n.next(t)})))},error:function(t){r.add(e.schedule((function(){return n.error(t)})))},complete:function(){r.add(e.schedule((function(){return n.complete()})))}}))}))),r}))}(t,e);if((0,u.t)(t))return function(t,e){return new r.y((function(n){var r=new i.w;return r.add(e.schedule((function(){return t.then((function(t){r.add(e.schedule((function(){n.next(t),r.add(e.schedule((function(){return n.complete()})))})))}),(function(t){r.add(e.schedule((function(){return n.error(t)})))}))}))),r}))}(t,e);if((0,c.z)(t))return(0,s.r)(t,e);if(function(t){return t&&"function"==typeof t[a.hZ]}(t)||"string"==typeof t)return function(t,e){if(!t)throw new Error("Iterable cannot be null");return new r.y((function(n){var r,o=new i.w;return o.add((function(){r&&"function"==typeof r.return&&r.return()})),o.add(e.schedule((function(){r=t[a.hZ](),o.add(e.schedule((function(){if(!n.closed){var t,e;try{var i=r.next();t=i.value,e=i.done}catch(t){return void n.error(t)}e?n.complete():(n.next(t),this.schedule())}})))}))),o}))}(t,e)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}},6114:(t,e,n)=>{"use strict";n.d(e,{o:()=>i});var r=n(5987),i=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r.pending=!1,r}return r.ZT(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this},e.prototype.requestAsyncId=function(t,e,n){return void 0===n&&(n=0),setInterval(t.flush.bind(t,this),n)},e.prototype.recycleAsyncId=function(t,e,n){if(void 0===n&&(n=0),null!==n&&this.delay===n&&!1===this.pending)return e;clearInterval(e)},e.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,e){var n=!1,r=void 0;try{this.work(t)}catch(t){n=!0,r=!!t&&t||new Error(t)}if(n)return this.unsubscribe(),r},e.prototype._unsubscribe=function(){var t=this.id,e=this.scheduler,n=e.actions,r=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&n.splice(r,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null},e}(function(t){function e(e,n){return t.call(this)||this}return r.ZT(e,t),e.prototype.schedule=function(t,e){return void 0===e&&(e=0),this},e}(n(8760).w))},8399:(t,e,n)=>{"use strict";n.d(e,{v:()=>o});var r=n(5987),i=n(8725),o=function(t){function e(n,r){void 0===r&&(r=i.b.now);var o=t.call(this,n,(function(){return e.delegate&&e.delegate!==o?e.delegate.now():r()}))||this;return o.actions=[],o.active=!1,o.scheduled=void 0,o}return r.ZT(e,t),e.prototype.schedule=function(n,r,i){return void 0===r&&(r=0),e.delegate&&e.delegate!==this?e.delegate.schedule(n,r,i):t.prototype.schedule.call(this,n,r,i)},e.prototype.flush=function(t){var e=this.actions;if(this.active)e.push(t);else{var n;this.active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}},e}(i.b)},6650:(t,e,n)=>{"use strict";n.d(e,{e:()=>l,E:()=>c});var r=n(5987),i=1,o=function(){return Promise.resolve()}(),s={};function a(t){return t in s&&(delete s[t],!0)}var u=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return r.ZT(e,t),e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,e,n,r):(e.actions.push(this),e.scheduled||(e.scheduled=(u=e.flush.bind(e,null),c=i++,s[c]=!0,o.then((function(){return a(c)&&u()})),c)));var u,c},e.prototype.recycleAsyncId=function(e,n,r){if(void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,r);0===e.actions.length&&(a(n),e.scheduled=void 0)},e}(n(6114).o),c=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.ZT(e,t),e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,n=this.actions,r=-1,i=n.length;t=t||n.shift();do{if(e=t.execute(t.state,t.delay))break}while(++r{"use strict";n.d(e,{P:()=>o,z:()=>i});var r=n(6114),i=new(n(8399).v)(r.o),o=i},2546:(t,e,n)=>{"use strict";n.d(e,{c:()=>s,N:()=>o});var r=n(5987),i=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return r.ZT(e,t),e.prototype.schedule=function(e,n){return void 0===n&&(n=0),n>0?t.prototype.schedule.call(this,e,n):(this.delay=n,this.state=e,this.scheduler.flush(this),this)},e.prototype.execute=function(e,n){return n>0||this.closed?t.prototype.execute.call(this,e,n):this._execute(e,n)},e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0?t.prototype.requestAsyncId.call(this,e,n,r):e.flush(this)},e}(n(6114).o),o=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.ZT(e,t),e}(n(8399).v))(i),s=o},999:(t,e,n)=>{"use strict";function r(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}n.d(e,{hZ:()=>i});var i=r()},5050:(t,e,n)=>{"use strict";n.d(e,{L:()=>r});var r=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}()},3142:(t,e,n)=>{"use strict";n.d(e,{b:()=>r});var r=function(){return"function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()}()},6565:(t,e,n)=>{"use strict";n.d(e,{W:()=>r});var r=function(){function t(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return t.prototype=Object.create(Error.prototype),t}()},6929:(t,e,n)=>{"use strict";n.d(e,{K:()=>r});var r=function(){function t(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return t.prototype=Object.create(Error.prototype),t}()},1016:(t,e,n)=>{"use strict";n.d(e,{N:()=>r});var r=function(){function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t}()},1462:(t,e,n)=>{"use strict";n.d(e,{W:()=>r});var r=function(){function t(){return Error.call(this),this.message="Timeout has occurred",this.name="TimeoutError",this}return t.prototype=Object.create(Error.prototype),t}()},8782:(t,e,n)=>{"use strict";n.d(e,{B:()=>r});var r=function(){function t(t){return Error.call(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t,this}return t.prototype=Object.create(Error.prototype),t}()},3642:(t,e,n)=>{"use strict";n.d(e,{_:()=>i});var r=n(979);function i(t){for(;t;){var e=t,n=e.closed,i=e.destination,o=e.isStopped;if(n||o)return!1;t=i&&i instanceof r.L?i:null}return!0}},1644:(t,e,n)=>{"use strict";function r(t){setTimeout((function(){throw t}),0)}n.d(e,{z:()=>r})},3608:(t,e,n)=>{"use strict";function r(t){return t}n.d(e,{y:()=>r})},9026:(t,e,n)=>{"use strict";n.d(e,{k:()=>r});var r=function(){return Array.isArray||function(t){return t&&"number"==typeof t.length}}()},9217:(t,e,n)=>{"use strict";n.d(e,{z:()=>r});var r=function(t){return t&&"number"==typeof t.length&&"function"!=typeof t}},4156:(t,e,n)=>{"use strict";function r(t){return"function"==typeof t}n.d(e,{m:()=>r})},5812:(t,e,n)=>{"use strict";n.d(e,{k:()=>i});var r=n(9026);function i(t){return!(0,r.k)(t)&&t-parseFloat(t)+1>=0}},2009:(t,e,n)=>{"use strict";function r(t){return null!==t&&"object"==typeof t}n.d(e,{K:()=>r})},336:(t,e,n)=>{"use strict";function r(t){return!!t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}n.d(e,{t:()=>r})},7507:(t,e,n)=>{"use strict";function r(t){return t&&"function"==typeof t.schedule}n.d(e,{K:()=>r})},3306:(t,e,n)=>{"use strict";function r(){}n.d(e,{Z:()=>r})},8463:(t,e,n)=>{"use strict";function r(t,e){function n(){return!n.pred.apply(n.thisArg,arguments)}return n.pred=t,n.thisArg=e,n}n.d(e,{f:()=>r})},2561:(t,e,n)=>{"use strict";n.d(e,{U:()=>o,z:()=>i});var r=n(3608);function i(){for(var t=[],e=0;e{"use strict";n.d(e,{s:()=>l});var r=n(6900),i=n(1644),o=n(999),s=n(5050),a=n(9217),u=n(336),c=n(2009),l=function(t){if(t&&"function"==typeof t[s.L])return l=t,function(t){var e=l[s.L]();if("function"!=typeof e.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return e.subscribe(t)};if((0,a.z)(t))return(0,r.V)(t);if((0,u.t)(t))return n=t,function(t){return n.then((function(e){t.closed||(t.next(e),t.complete())}),(function(e){return t.error(e)})).then(null,i.z),t};if(t&&"function"==typeof t[o.hZ])return e=t,function(t){for(var n=e[o.hZ]();;){var r=void 0;try{r=n.next()}catch(e){return t.error(e),t}if(r.done){t.complete();break}if(t.next(r.value),t.closed)break}return"function"==typeof n.return&&t.add((function(){n.return&&n.return()})),t};var e,n,l,h=(0,c.K)(t)?"an invalid object":"'"+t+"'";throw new TypeError("You provided "+h+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")}},6900:(t,e,n)=>{"use strict";n.d(e,{V:()=>r});var r=function(t){return function(e){for(var n=0,r=t.length;n{"use strict";n.d(e,{D:()=>a});var r=n(5987),i=function(t){function e(e,n,r){var i=t.call(this)||this;return i.parent=e,i.outerValue=n,i.outerIndex=r,i.index=0,i}return r.ZT(e,t),e.prototype._next=function(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)},e.prototype._error=function(t){this.parent.notifyError(t,this),this.unsubscribe()},e.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},e}(n(979).L),o=n(7843),s=n(2772);function a(t,e,n,r,a){if(void 0===a&&(a=new i(t,n,r)),!a.closed)return e instanceof s.y?e.subscribe(a):(0,o.s)(e)(a)}},1717:(t,e,n)=>{"use strict";n.r(e),n.d(e,{audit:()=>o,auditTime:()=>l,buffer:()=>h,bufferCount:()=>y,bufferTime:()=>w,bufferToggle:()=>C,bufferWhen:()=>O,catchError:()=>P,combineAll:()=>F,combineLatest:()=>z,concat:()=>V,concatAll:()=>Z.u,concatMap:()=>Y,concatMapTo:()=>$,count:()=>J,debounce:()=>X,debounceTime:()=>nt,defaultIfEmpty:()=>st,delay:()=>ht,delayWhen:()=>gt,dematerialize:()=>_t,distinct:()=>kt,distinctUntilChanged:()=>At,distinctUntilKeyChanged:()=>Ct,elementAt:()=>Wt,endWith:()=>qt,every:()=>Vt,exhaust:()=>Yt,exhaustMap:()=>Qt,expand:()=>ee,filter:()=>Nt.h,finalize:()=>ie,find:()=>ae,findIndex:()=>le,first:()=>fe,flatMap:()=>G.VS,groupBy:()=>de.v,ignoreElements:()=>pe,isEmpty:()=>be,last:()=>Se,map:()=>Kt.U,mapTo:()=>ke,materialize:()=>Ae,max:()=>je,merge:()=>Be,mergeAll:()=>De.J,mergeMap:()=>G.zg,mergeMapTo:()=>Ue,mergeScan:()=>Fe,min:()=>ze,multicast:()=>Ve,observeOn:()=>Ge.QV,onErrorResumeNext:()=>Ye,pairwise:()=>Ke,partition:()=>en,pluck:()=>nn,publish:()=>sn,publishBehavior:()=>un,publishLast:()=>ln,publishReplay:()=>fn,race:()=>pn,reduce:()=>Le,refCount:()=>An.x,repeat:()=>yn,repeatWhen:()=>mn,retry:()=>_n,retryWhen:()=>kn,sample:()=>Tn,sampleTime:()=>Rn,scan:()=>Ce,sequenceEqual:()=>jn,share:()=>Fn,shareReplay:()=>Hn,single:()=>Wn,skip:()=>Vn,skipLast:()=>Yn,skipUntil:()=>Kn,skipWhile:()=>tr,startWith:()=>rr,subscribeOn:()=>ar,switchAll:()=>fr,switchMap:()=>cr,switchMapTo:()=>dr,take:()=>Ut,takeLast:()=>we,takeUntil:()=>pr,takeWhile:()=>br,tap:()=>Er,throttle:()=>Mr,throttleTime:()=>Ir,throwIfEmpty:()=>Lt,timeInterval:()=>Lr,timeout:()=>Hr,timeoutWith:()=>Br,timestamp:()=>Wr,toArray:()=>Vr,window:()=>Zr,windowCount:()=>$r,windowTime:()=>Qr,windowToggle:()=>oi,windowWhen:()=>ui,withLatestFrom:()=>hi,zip:()=>yi,zipAll:()=>gi});var r=n(5987),i=n(7604);function o(t){return function(e){return e.lift(new s(t))}}var s=function(){function t(t){this.durationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new a(t,this.durationSelector))},t}(),a=function(t){function e(e,n){var r=t.call(this,e)||this;return r.durationSelector=n,r.hasValue=!1,r}return r.ZT(e,t),e.prototype._next=function(t){if(this.value=t,this.hasValue=!0,!this.throttled){var e=void 0;try{e=(0,this.durationSelector)(t)}catch(t){return this.destination.error(t)}var n=(0,i.ft)(e,new i.IY(this));!n||n.closed?this.clearThrottle():this.add(this.throttled=n)}},e.prototype.clearThrottle=function(){var t=this,e=t.value,n=t.hasValue,r=t.throttled;r&&(this.remove(r),this.throttled=void 0,r.unsubscribe()),n&&(this.value=void 0,this.hasValue=!1,this.destination.next(e))},e.prototype.notifyNext=function(){this.clearThrottle()},e.prototype.notifyComplete=function(){this.clearThrottle()},e}(i.Ds),u=n(964),c=n(9604);function l(t,e){return void 0===e&&(e=u.P),o((function(){return(0,c.H)(t,e)}))}function h(t){return function(e){return e.lift(new f(t))}}var f=function(){function t(t){this.closingNotifier=t}return t.prototype.call=function(t,e){return e.subscribe(new d(t,this.closingNotifier))},t}(),d=function(t){function e(e,n){var r=t.call(this,e)||this;return r.buffer=[],r.add((0,i.ft)(n,new i.IY(r))),r}return r.ZT(e,t),e.prototype._next=function(t){this.buffer.push(t)},e.prototype.notifyNext=function(){var t=this.buffer;this.buffer=[],this.destination.next(t)},e}(i.Ds),p=n(979);function y(t,e){return void 0===e&&(e=null),function(n){return n.lift(new g(t,e))}}var g=function(){function t(t,e){this.bufferSize=t,this.startBufferEvery=e,this.subscriberClass=e&&t!==e?m:b}return t.prototype.call=function(t,e){return e.subscribe(new this.subscriberClass(t,this.bufferSize,this.startBufferEvery))},t}(),b=function(t){function e(e,n){var r=t.call(this,e)||this;return r.bufferSize=n,r.buffer=[],r}return r.ZT(e,t),e.prototype._next=function(t){var e=this.buffer;e.push(t),e.length==this.bufferSize&&(this.destination.next(e),this.buffer=[])},e.prototype._complete=function(){var e=this.buffer;e.length>0&&this.destination.next(e),t.prototype._complete.call(this)},e}(p.L),m=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.bufferSize=n,i.startBufferEvery=r,i.buffers=[],i.count=0,i}return r.ZT(e,t),e.prototype._next=function(t){var e=this,n=e.bufferSize,r=e.startBufferEvery,i=e.buffers,o=e.count;this.count++,o%r==0&&i.push([]);for(var s=i.length;s--;){var a=i[s];a.push(t),a.length===n&&(i.splice(s,1),this.destination.next(a))}},e.prototype._complete=function(){for(var e=this.buffers,n=this.destination;e.length>0;){var r=e.shift();r.length>0&&n.next(r)}t.prototype._complete.call(this)},e}(p.L),v=n(7507);function w(t){var e=arguments.length,n=u.P;(0,v.K)(arguments[arguments.length-1])&&(n=arguments[arguments.length-1],e--);var r=null;e>=2&&(r=arguments[1]);var i=Number.POSITIVE_INFINITY;return e>=3&&(i=arguments[2]),function(e){return e.lift(new _(t,r,i,n))}}var _=function(){function t(t,e,n,r){this.bufferTimeSpan=t,this.bufferCreationInterval=e,this.maxBufferSize=n,this.scheduler=r}return t.prototype.call=function(t,e){return e.subscribe(new S(t,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))},t}(),E=function(){return function(){this.buffer=[]}}(),S=function(t){function e(e,n,r,i,o){var s=t.call(this,e)||this;s.bufferTimeSpan=n,s.bufferCreationInterval=r,s.maxBufferSize=i,s.scheduler=o,s.contexts=[];var a=s.openContext();if(s.timespanOnly=null==r||r<0,s.timespanOnly){var u={subscriber:s,context:a,bufferTimeSpan:n};s.add(a.closeAction=o.schedule(k,n,u))}else{var c={subscriber:s,context:a},l={bufferTimeSpan:n,bufferCreationInterval:r,subscriber:s,scheduler:o};s.add(a.closeAction=o.schedule(M,n,c)),s.add(o.schedule(x,r,l))}return s}return r.ZT(e,t),e.prototype._next=function(t){for(var e,n=this.contexts,r=n.length,i=0;i0;){var r=e.shift();n.next(r.buffer)}t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.contexts=null},e.prototype.onBufferFull=function(t){this.closeContext(t);var e=t.closeAction;if(e.unsubscribe(),this.remove(e),!this.closed&&this.timespanOnly){t=this.openContext();var n=this.bufferTimeSpan,r={subscriber:this,context:t,bufferTimeSpan:n};this.add(t.closeAction=this.scheduler.schedule(k,n,r))}},e.prototype.openContext=function(){var t=new E;return this.contexts.push(t),t},e.prototype.closeContext=function(t){this.destination.next(t.buffer);var e=this.contexts;(e?e.indexOf(t):-1)>=0&&e.splice(e.indexOf(t),1)},e}(p.L);function k(t){var e=t.subscriber,n=t.context;n&&e.closeContext(n),e.closed||(t.context=e.openContext(),t.context.closeAction=this.schedule(t,t.bufferTimeSpan))}function x(t){var e=t.bufferCreationInterval,n=t.bufferTimeSpan,r=t.subscriber,i=t.scheduler,o=r.openContext();r.closed||(r.add(o.closeAction=i.schedule(M,n,{subscriber:r,context:o})),this.schedule(t,e))}function M(t){var e=t.subscriber,n=t.context;e.closeContext(n)}var A=n(8760),T=n(2080),I=n(2039);function C(t,e){return function(n){return n.lift(new R(t,e))}}var R=function(){function t(t,e){this.openings=t,this.closingSelector=e}return t.prototype.call=function(t,e){return e.subscribe(new N(t,this.openings,this.closingSelector))},t}(),N=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.closingSelector=r,i.contexts=[],i.add((0,T.D)(i,n)),i}return r.ZT(e,t),e.prototype._next=function(t){for(var e=this.contexts,n=e.length,r=0;r0;){var r=n.shift();r.subscription.unsubscribe(),r.buffer=null,r.subscription=null}this.contexts=null,t.prototype._error.call(this,e)},e.prototype._complete=function(){for(var e=this.contexts;e.length>0;){var n=e.shift();this.destination.next(n.buffer),n.subscription.unsubscribe(),n.buffer=null,n.subscription=null}this.contexts=null,t.prototype._complete.call(this)},e.prototype.notifyNext=function(t,e){t?this.closeBuffer(t):this.openBuffer(e)},e.prototype.notifyComplete=function(t){this.closeBuffer(t.context)},e.prototype.openBuffer=function(t){try{var e=this.closingSelector.call(this,t);e&&this.trySubscribe(e)}catch(t){this._error(t)}},e.prototype.closeBuffer=function(t){var e=this.contexts;if(e&&t){var n=t.buffer,r=t.subscription;this.destination.next(n),e.splice(e.indexOf(t),1),this.remove(r),r.unsubscribe()}},e.prototype.trySubscribe=function(t){var e=this.contexts,n=new A.w,r={buffer:[],subscription:n};e.push(r);var i=(0,T.D)(this,t,r);!i||i.closed?this.closeBuffer(r):(i.context=r,this.add(i),n.add(i))},e}(I.L);function O(t){return function(e){return e.lift(new L(t))}}var L=function(){function t(t){this.closingSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new j(t,this.closingSelector))},t}(),j=function(t){function e(e,n){var r=t.call(this,e)||this;return r.closingSelector=n,r.subscribing=!1,r.openBuffer(),r}return r.ZT(e,t),e.prototype._next=function(t){this.buffer.push(t)},e.prototype._complete=function(){var e=this.buffer;e&&this.destination.next(e),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.buffer=void 0,this.subscribing=!1},e.prototype.notifyNext=function(){this.openBuffer()},e.prototype.notifyComplete=function(){this.subscribing?this.complete():this.openBuffer()},e.prototype.openBuffer=function(){var t=this.closingSubscription;t&&(this.remove(t),t.unsubscribe());var e,n=this.buffer;this.buffer&&this.destination.next(n),this.buffer=[];try{e=(0,this.closingSelector)()}catch(t){return this.error(t)}t=new A.w,this.closingSubscription=t,this.add(t),this.subscribing=!0,t.add((0,i.ft)(e,new i.IY(this))),this.subscribing=!1},e}(i.Ds);function P(t){return function(e){var n=new B(t),r=e.lift(n);return n.caught=r}}var B=function(){function t(t){this.selector=t}return t.prototype.call=function(t,e){return e.subscribe(new D(t,this.selector,this.caught))},t}(),D=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.selector=n,i.caught=r,i}return r.ZT(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=void 0;try{n=this.selector(e,this.caught)}catch(e){return void t.prototype.error.call(this,e)}this._unsubscribeAndRecycle();var r=new i.IY(this);this.add(r);var o=(0,i.ft)(n,r);o!==r&&this.add(o)}},e}(i.Ds),U=n(5142);function F(t){return function(e){return e.lift(new U.Ms(t))}}var H=n(9026),W=n(5760);function z(){for(var t=[],e=0;e0&&n[0].time-r.now()<=0;)n.shift().notification.observe(i);if(n.length>0){var o=Math.max(0,n[0].time-r.now());this.schedule(t,o)}else this.unsubscribe(),e.active=!1},e.prototype._schedule=function(t){this.active=!0,this.destination.add(t.schedule(e.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}))},e.prototype.scheduleNotification=function(t){if(!0!==this.errored){var e=this.scheduler,n=new pt(e.now()+this.delay,t);this.queue.push(n),!1===this.active&&this._schedule(e)}},e.prototype._next=function(t){this.scheduleNotification(lt.P.createNext(t))},e.prototype._error=function(t){this.errored=!0,this.queue=[],this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.scheduleNotification(lt.P.createComplete()),this.unsubscribe()},e}(p.L),pt=function(){return function(t,e){this.time=t,this.notification=e}}(),yt=n(2772);function gt(t,e){return e?function(n){return new vt(n,e).lift(new bt(t))}:function(e){return e.lift(new bt(t))}}var bt=function(){function t(t){this.delayDurationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new mt(t,this.delayDurationSelector))},t}(),mt=function(t){function e(e,n){var r=t.call(this,e)||this;return r.delayDurationSelector=n,r.completed=!1,r.delayNotifierSubscriptions=[],r.index=0,r}return r.ZT(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.destination.next(t),this.removeSubscription(i),this.tryComplete()},e.prototype.notifyError=function(t,e){this._error(t)},e.prototype.notifyComplete=function(t){var e=this.removeSubscription(t);e&&this.destination.next(e),this.tryComplete()},e.prototype._next=function(t){var e=this.index++;try{var n=this.delayDurationSelector(t,e);n&&this.tryDelay(n,t)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){this.completed=!0,this.tryComplete(),this.unsubscribe()},e.prototype.removeSubscription=function(t){t.unsubscribe();var e=this.delayNotifierSubscriptions.indexOf(t);return-1!==e&&this.delayNotifierSubscriptions.splice(e,1),t.outerValue},e.prototype.tryDelay=function(t,e){var n=(0,T.D)(this,t,e);n&&!n.closed&&(this.destination.add(n),this.delayNotifierSubscriptions.push(n))},e.prototype.tryComplete=function(){this.completed&&0===this.delayNotifierSubscriptions.length&&this.destination.complete()},e}(I.L),vt=function(t){function e(e,n){var r=t.call(this)||this;return r.source=e,r.subscriptionDelay=n,r}return r.ZT(e,t),e.prototype._subscribe=function(t){this.subscriptionDelay.subscribe(new wt(t,this.source))},e}(yt.y),wt=function(t){function e(e,n){var r=t.call(this)||this;return r.parent=e,r.source=n,r.sourceSubscribed=!1,r}return r.ZT(e,t),e.prototype._next=function(t){this.subscribeToSource()},e.prototype._error=function(t){this.unsubscribe(),this.parent.error(t)},e.prototype._complete=function(){this.unsubscribe(),this.subscribeToSource()},e.prototype.subscribeToSource=function(){this.sourceSubscribed||(this.sourceSubscribed=!0,this.unsubscribe(),this.source.subscribe(this.parent))},e}(p.L);function _t(){return function(t){return t.lift(new Et)}}var Et=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new St(t))},t}(),St=function(t){function e(e){return t.call(this,e)||this}return r.ZT(e,t),e.prototype._next=function(t){t.observe(this.destination)},e}(p.L);function kt(t,e){return function(n){return n.lift(new xt(t,e))}}var xt=function(){function t(t,e){this.keySelector=t,this.flushes=e}return t.prototype.call=function(t,e){return e.subscribe(new Mt(t,this.keySelector,this.flushes))},t}(),Mt=function(t){function e(e,n,r){var o=t.call(this,e)||this;return o.keySelector=n,o.values=new Set,r&&o.add((0,i.ft)(r,new i.IY(o))),o}return r.ZT(e,t),e.prototype.notifyNext=function(){this.values.clear()},e.prototype.notifyError=function(t){this._error(t)},e.prototype._next=function(t){this.keySelector?this._useKeySelector(t):this._finalizeNext(t,t)},e.prototype._useKeySelector=function(t){var e,n=this.destination;try{e=this.keySelector(t)}catch(t){return void n.error(t)}this._finalizeNext(e,t)},e.prototype._finalizeNext=function(t,e){var n=this.values;n.has(t)||(n.add(t),this.destination.next(e))},e}(i.Ds);function At(t,e){return function(n){return n.lift(new Tt(t,e))}}var Tt=function(){function t(t,e){this.compare=t,this.keySelector=e}return t.prototype.call=function(t,e){return e.subscribe(new It(t,this.compare,this.keySelector))},t}(),It=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.keySelector=r,i.hasKey=!1,"function"==typeof n&&(i.compare=n),i}return r.ZT(e,t),e.prototype.compare=function(t,e){return t===e},e.prototype._next=function(t){var e;try{var n=this.keySelector;e=n?n(t):t}catch(t){return this.destination.error(t)}var r=!1;if(this.hasKey)try{r=(0,this.compare)(this.key,e)}catch(t){return this.destination.error(t)}else this.hasKey=!0;r||(this.key=e,this.destination.next(t))},e}(p.L);function Ct(t,e){return At((function(n,r){return e?e(n[t],r[t]):n[t]===r[t]}))}var Rt=n(6565),Nt=n(6008),Ot=n(6929);function Lt(t){return void 0===t&&(t=Bt),function(e){return e.lift(new jt(t))}}var jt=function(){function t(t){this.errorFactory=t}return t.prototype.call=function(t,e){return e.subscribe(new Pt(t,this.errorFactory))},t}(),Pt=function(t){function e(e,n){var r=t.call(this,e)||this;return r.errorFactory=n,r.hasValue=!1,r}return r.ZT(e,t),e.prototype._next=function(t){this.hasValue=!0,this.destination.next(t)},e.prototype._complete=function(){if(this.hasValue)return this.destination.complete();var t=void 0;try{t=this.errorFactory()}catch(e){t=e}this.destination.error(t)},e}(p.L);function Bt(){return new Ot.K}var Dt=n(5631);function Ut(t){return function(e){return 0===t?(0,Dt.c)():e.lift(new Ft(t))}}var Ft=function(){function t(t){if(this.total=t,this.total<0)throw new Rt.W}return t.prototype.call=function(t,e){return e.subscribe(new Ht(t,this.total))},t}(),Ht=function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.count=0,r}return r.ZT(e,t),e.prototype._next=function(t){var e=this.total,n=++this.count;n<=e&&(this.destination.next(t),n===e&&(this.destination.complete(),this.unsubscribe()))},e}(p.L);function Wt(t,e){if(t<0)throw new Rt.W;var n=arguments.length>=2;return function(r){return r.pipe((0,Nt.h)((function(e,n){return n===t})),Ut(1),n?st(e):Lt((function(){return new Rt.W})))}}var zt=n(8170);function qt(){for(var t=[],e=0;e0&&this._next(t.shift()),this.hasCompleted&&0===this.active&&this.destination.complete()},e}(i.Ds);function ie(t){return function(e){return e.lift(new oe(t))}}var oe=function(){function t(t){this.callback=t}return t.prototype.call=function(t,e){return e.subscribe(new se(t,this.callback))},t}(),se=function(t){function e(e,n){var r=t.call(this,e)||this;return r.add(new A.w(n)),r}return r.ZT(e,t),e}(p.L);function ae(t,e){if("function"!=typeof t)throw new TypeError("predicate is not a function");return function(n){return n.lift(new ue(t,n,!1,e))}}var ue=function(){function t(t,e,n,r){this.predicate=t,this.source=e,this.yieldIndex=n,this.thisArg=r}return t.prototype.call=function(t,e){return e.subscribe(new ce(t,this.predicate,this.source,this.yieldIndex,this.thisArg))},t}(),ce=function(t){function e(e,n,r,i,o){var s=t.call(this,e)||this;return s.predicate=n,s.source=r,s.yieldIndex=i,s.thisArg=o,s.index=0,s}return r.ZT(e,t),e.prototype.notifyComplete=function(t){var e=this.destination;e.next(t),e.complete(),this.unsubscribe()},e.prototype._next=function(t){var e=this.predicate,n=this.thisArg,r=this.index++;try{e.call(n||this,t,r,this.source)&&this.notifyComplete(this.yieldIndex?r:t)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0)},e}(p.L);function le(t,e){return function(n){return n.lift(new ue(t,n,!0,e))}}var he=n(3608);function fe(t,e){var n=arguments.length>=2;return function(r){return r.pipe(t?(0,Nt.h)((function(e,n){return t(e,n,r)})):he.y,Ut(1),n?st(e):Lt((function(){return new Ot.K})))}}var de=n(1120);function pe(){return function(t){return t.lift(new ye)}}var ye=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new ge(t))},t}(),ge=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.ZT(e,t),e.prototype._next=function(t){},e}(p.L);function be(){return function(t){return t.lift(new me)}}var me=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new ve(t))},t}(),ve=function(t){function e(e){return t.call(this,e)||this}return r.ZT(e,t),e.prototype.notifyComplete=function(t){var e=this.destination;e.next(t),e.complete()},e.prototype._next=function(t){this.notifyComplete(!1)},e.prototype._complete=function(){this.notifyComplete(!0)},e}(p.L);function we(t){return function(e){return 0===t?(0,Dt.c)():e.lift(new _e(t))}}var _e=function(){function t(t){if(this.total=t,this.total<0)throw new Rt.W}return t.prototype.call=function(t,e){return e.subscribe(new Ee(t,this.total))},t}(),Ee=function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.ring=new Array,r.count=0,r}return r.ZT(e,t),e.prototype._next=function(t){var e=this.ring,n=this.total,r=this.count++;e.length0)for(var n=this.count>=this.total?this.total:this.count,r=this.ring,i=0;i=2;return function(r){return r.pipe(t?(0,Nt.h)((function(e,n){return t(e,n,r)})):he.y,we(1),n?st(e):Lt((function(){return new Ot.K})))}}function ke(t){return function(e){return e.lift(new xe(t))}}var xe=function(){function t(t){this.value=t}return t.prototype.call=function(t,e){return e.subscribe(new Me(t,this.value))},t}(),Me=function(t){function e(e,n){var r=t.call(this,e)||this;return r.value=n,r}return r.ZT(e,t),e.prototype._next=function(t){this.destination.next(this.value)},e}(p.L);function Ae(){return function(t){return t.lift(new Te)}}var Te=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Ie(t))},t}(),Ie=function(t){function e(e){return t.call(this,e)||this}return r.ZT(e,t),e.prototype._next=function(t){this.destination.next(lt.P.createNext(t))},e.prototype._error=function(t){var e=this.destination;e.next(lt.P.createError(t)),e.complete()},e.prototype._complete=function(){var t=this.destination;t.next(lt.P.createComplete()),t.complete()},e}(p.L);function Ce(t,e){var n=!1;return arguments.length>=2&&(n=!0),function(r){return r.lift(new Re(t,e,n))}}var Re=function(){function t(t,e,n){void 0===n&&(n=!1),this.accumulator=t,this.seed=e,this.hasSeed=n}return t.prototype.call=function(t,e){return e.subscribe(new Ne(t,this.accumulator,this.seed,this.hasSeed))},t}(),Ne=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.accumulator=n,o._seed=r,o.hasSeed=i,o.index=0,o}return r.ZT(e,t),Object.defineProperty(e.prototype,"seed",{get:function(){return this._seed},set:function(t){this.hasSeed=!0,this._seed=t},enumerable:!0,configurable:!0}),e.prototype._next=function(t){if(this.hasSeed)return this._tryNext(t);this.seed=t,this.destination.next(t)},e.prototype._tryNext=function(t){var e,n=this.index++;try{e=this.accumulator(this.seed,t,n)}catch(t){this.destination.error(t)}this.seed=e,this.destination.next(e)},e}(p.L),Oe=n(2561);function Le(t,e){return arguments.length>=2?function(n){return(0,Oe.z)(Ce(t,e),we(1),st(e))(n)}:function(e){return(0,Oe.z)(Ce((function(e,n,r){return t(e,n,r+1)})),we(1))(e)}}function je(t){return Le("function"==typeof t?function(e,n){return t(e,n)>0?e:n}:function(t,e){return t>e?t:e})}var Pe=n(4370);function Be(){for(var t=[],e=0;e0?this._next(t.shift()):0===this.active&&this.hasCompleted&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete())},e}(i.Ds);function ze(t){return Le("function"==typeof t?function(e,n){return t(e,n)<0?e:n}:function(t,e){return t-1&&(this.count=n-1),e.subscribe(this._unsubscribeAndRecycle())}},e}(p.L);function mn(t){return function(e){return e.lift(new vn(t))}}var vn=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){return e.subscribe(new wn(t,this.notifier,e))},t}(),wn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.notifier=n,i.source=r,i.sourceIsBeingSubscribedTo=!0,i}return r.ZT(e,t),e.prototype.notifyNext=function(){this.sourceIsBeingSubscribedTo=!0,this.source.subscribe(this)},e.prototype.notifyComplete=function(){if(!1===this.sourceIsBeingSubscribedTo)return t.prototype.complete.call(this)},e.prototype.complete=function(){if(this.sourceIsBeingSubscribedTo=!1,!this.isStopped){if(this.retries||this.subscribeToRetries(),!this.retriesSubscription||this.retriesSubscription.closed)return t.prototype.complete.call(this);this._unsubscribeAndRecycle(),this.notifications.next(void 0)}},e.prototype._unsubscribe=function(){var t=this.notifications,e=this.retriesSubscription;t&&(t.unsubscribe(),this.notifications=void 0),e&&(e.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},e.prototype._unsubscribeAndRecycle=function(){var e=this._unsubscribe;return this._unsubscribe=null,t.prototype._unsubscribeAndRecycle.call(this),this._unsubscribe=e,this},e.prototype.subscribeToRetries=function(){var e;this.notifications=new on.xQ;try{e=(0,this.notifier)(this.notifications)}catch(e){return t.prototype.complete.call(this)}this.retries=e,this.retriesSubscription=(0,i.ft)(e,new i.IY(this))},e}(i.Ds);function _n(t){return void 0===t&&(t=-1),function(e){return e.lift(new En(t,e))}}var En=function(){function t(t,e){this.count=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new Sn(t,this.count,this.source))},t}(),Sn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.count=n,i.source=r,i}return r.ZT(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=this.source,r=this.count;if(0===r)return t.prototype.error.call(this,e);r>-1&&(this.count=r-1),n.subscribe(this._unsubscribeAndRecycle())}},e}(p.L);function kn(t){return function(e){return e.lift(new xn(t,e))}}var xn=function(){function t(t,e){this.notifier=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new Mn(t,this.notifier,this.source))},t}(),Mn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.notifier=n,i.source=r,i}return r.ZT(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=this.errors,r=this.retries,o=this.retriesSubscription;if(r)this.errors=void 0,this.retriesSubscription=void 0;else{n=new on.xQ;try{r=(0,this.notifier)(n)}catch(e){return t.prototype.error.call(this,e)}o=(0,i.ft)(r,new i.IY(this))}this._unsubscribeAndRecycle(),this.errors=n,this.retries=r,this.retriesSubscription=o,n.next(e)}},e.prototype._unsubscribe=function(){var t=this.errors,e=this.retriesSubscription;t&&(t.unsubscribe(),this.errors=void 0),e&&(e.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0},e.prototype.notifyNext=function(){var t=this._unsubscribe;this._unsubscribe=null,this._unsubscribeAndRecycle(),this._unsubscribe=t,this.source.subscribe(this)},e}(i.Ds),An=n(3018);function Tn(t){return function(e){return e.lift(new In(t))}}var In=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){var n=new Cn(t),r=e.subscribe(n);return r.add((0,i.ft)(this.notifier,new i.IY(n))),r},t}(),Cn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.hasValue=!1,e}return r.ZT(e,t),e.prototype._next=function(t){this.value=t,this.hasValue=!0},e.prototype.notifyNext=function(){this.emitValue()},e.prototype.notifyComplete=function(){this.emitValue()},e.prototype.emitValue=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value))},e}(i.Ds);function Rn(t,e){return void 0===e&&(e=u.P),function(n){return n.lift(new Nn(t,e))}}var Nn=function(){function t(t,e){this.period=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new On(t,this.period,this.scheduler))},t}(),On=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.period=n,i.scheduler=r,i.hasValue=!1,i.add(r.schedule(Ln,n,{subscriber:i,period:n})),i}return r.ZT(e,t),e.prototype._next=function(t){this.lastValue=t,this.hasValue=!0},e.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))},e}(p.L);function Ln(t){var e=t.subscriber,n=t.period;e.notifyNext(),this.schedule(t,n)}function jn(t,e){return function(n){return n.lift(new Pn(t,e))}}var Pn=function(){function t(t,e){this.compareTo=t,this.comparator=e}return t.prototype.call=function(t,e){return e.subscribe(new Bn(t,this.compareTo,this.comparator))},t}(),Bn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.compareTo=n,i.comparator=r,i._a=[],i._b=[],i._oneComplete=!1,i.destination.add(n.subscribe(new Dn(e,i))),i}return r.ZT(e,t),e.prototype._next=function(t){this._oneComplete&&0===this._b.length?this.emit(!1):(this._a.push(t),this.checkValues())},e.prototype._complete=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0,this.unsubscribe()},e.prototype.checkValues=function(){for(var t=this,e=t._a,n=t._b,r=t.comparator;e.length>0&&n.length>0;){var i=e.shift(),o=n.shift(),s=!1;try{s=r?r(i,o):i===o}catch(t){this.destination.error(t)}s||this.emit(!1)}},e.prototype.emit=function(t){var e=this.destination;e.next(t),e.complete()},e.prototype.nextB=function(t){this._oneComplete&&0===this._a.length?this.emit(!1):(this._b.push(t),this.checkValues())},e.prototype.completeB=function(){this._oneComplete?this.emit(0===this._a.length&&0===this._b.length):this._oneComplete=!0},e}(p.L),Dn=function(t){function e(e,n){var r=t.call(this,e)||this;return r.parent=n,r}return r.ZT(e,t),e.prototype._next=function(t){this.parent.nextB(t)},e.prototype._error=function(t){this.parent.error(t),this.unsubscribe()},e.prototype._complete=function(){this.parent.completeB(),this.unsubscribe()},e}(p.L);function Un(){return new on.xQ}function Fn(){return function(t){return(0,An.x)()(Ve(Un)(t))}}function Hn(t,e,n){var r;return r=t&&"object"==typeof t?t:{bufferSize:t,windowTime:e,refCount:!1,scheduler:n},function(t){return t.lift(function(t){var e,n,r=t.bufferSize,i=void 0===r?Number.POSITIVE_INFINITY:r,o=t.windowTime,s=void 0===o?Number.POSITIVE_INFINITY:o,a=t.refCount,u=t.scheduler,c=0,l=!1,h=!1;return function(t){var r;c++,!e||l?(l=!1,e=new hn.t(i,s,u),r=e.subscribe(this),n=t.subscribe({next:function(t){e.next(t)},error:function(t){l=!0,e.error(t)},complete:function(){h=!0,n=void 0,e.complete()}}),h&&(n=void 0)):r=e.subscribe(this),this.add((function(){c--,r.unsubscribe(),r=void 0,n&&!h&&a&&0===c&&(n.unsubscribe(),n=void 0,e=void 0)}))}}(r))}}function Wn(t){return function(e){return e.lift(new zn(t,e))}}var zn=function(){function t(t,e){this.predicate=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new qn(t,this.predicate,this.source))},t}(),qn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.predicate=n,i.source=r,i.seenValue=!1,i.index=0,i}return r.ZT(e,t),e.prototype.applySingleValue=function(t){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=t)},e.prototype._next=function(t){var e=this.index++;this.predicate?this.tryNext(t,e):this.applySingleValue(t)},e.prototype.tryNext=function(t,e){try{this.predicate(t,e,this.source)&&this.applySingleValue(t)}catch(t){this.destination.error(t)}},e.prototype._complete=function(){var t=this.destination;this.index>0?(t.next(this.seenValue?this.singleValue:void 0),t.complete()):t.error(new Ot.K)},e}(p.L);function Vn(t){return function(e){return e.lift(new Zn(t))}}var Zn=function(){function t(t){this.total=t}return t.prototype.call=function(t,e){return e.subscribe(new Gn(t,this.total))},t}(),Gn=function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.count=0,r}return r.ZT(e,t),e.prototype._next=function(t){++this.count>this.total&&this.destination.next(t)},e}(p.L);function Yn(t){return function(e){return e.lift(new $n(t))}}var $n=function(){function t(t){if(this._skipCount=t,this._skipCount<0)throw new Rt.W}return t.prototype.call=function(t,e){return 0===this._skipCount?e.subscribe(new p.L(t)):e.subscribe(new Jn(t,this._skipCount))},t}(),Jn=function(t){function e(e,n){var r=t.call(this,e)||this;return r._skipCount=n,r._count=0,r._ring=new Array(n),r}return r.ZT(e,t),e.prototype._next=function(t){var e=this._skipCount,n=this._count++;if(n0?this.startWindowEvery:this.windowSize,n=this.destination,r=this.windowSize,i=this.windows,o=i.length,s=0;s=0&&a%e==0&&!this.closed&&i.shift().complete(),++this.count%e==0&&!this.closed){var u=new on.xQ;i.push(u),n.next(u)}},e.prototype._error=function(t){var e=this.windows;if(e)for(;e.length>0&&!this.closed;)e.shift().error(t);this.destination.error(t)},e.prototype._complete=function(){var t=this.windows;if(t)for(;t.length>0&&!this.closed;)t.shift().complete();this.destination.complete()},e.prototype._unsubscribe=function(){this.count=0,this.windows=null},e}(p.L);function Qr(t){var e=u.P,n=null,r=Number.POSITIVE_INFINITY;return(0,v.K)(arguments[3])&&(e=arguments[3]),(0,v.K)(arguments[2])?e=arguments[2]:(0,or.k)(arguments[2])&&(r=Number(arguments[2])),(0,v.K)(arguments[1])?e=arguments[1]:(0,or.k)(arguments[1])&&(n=Number(arguments[1])),function(i){return i.lift(new Xr(t,n,r,e))}}var Xr=function(){function t(t,e,n,r){this.windowTimeSpan=t,this.windowCreationInterval=e,this.maxWindowSize=n,this.scheduler=r}return t.prototype.call=function(t,e){return e.subscribe(new ei(t,this.windowTimeSpan,this.windowCreationInterval,this.maxWindowSize,this.scheduler))},t}(),ti=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._numberOfNextedValues=0,e}return r.ZT(e,t),e.prototype.next=function(e){this._numberOfNextedValues++,t.prototype.next.call(this,e)},Object.defineProperty(e.prototype,"numberOfNextedValues",{get:function(){return this._numberOfNextedValues},enumerable:!0,configurable:!0}),e}(on.xQ),ei=function(t){function e(e,n,r,i,o){var s=t.call(this,e)||this;s.destination=e,s.windowTimeSpan=n,s.windowCreationInterval=r,s.maxWindowSize=i,s.scheduler=o,s.windows=[];var a=s.openWindow();if(null!==r&&r>=0){var u={subscriber:s,window:a,context:null},c={windowTimeSpan:n,windowCreationInterval:r,subscriber:s,scheduler:o};s.add(o.schedule(ii,n,u)),s.add(o.schedule(ri,r,c))}else{var l={subscriber:s,window:a,windowTimeSpan:n};s.add(o.schedule(ni,n,l))}return s}return r.ZT(e,t),e.prototype._next=function(t){for(var e=this.windows,n=e.length,r=0;r=this.maxWindowSize&&this.closeWindow(i))}},e.prototype._error=function(t){for(var e=this.windows;e.length>0;)e.shift().error(t);this.destination.error(t)},e.prototype._complete=function(){for(var t=this.windows;t.length>0;){var e=t.shift();e.closed||e.complete()}this.destination.complete()},e.prototype.openWindow=function(){var t=new ti;return this.windows.push(t),this.destination.next(t),t},e.prototype.closeWindow=function(t){t.complete();var e=this.windows;e.splice(e.indexOf(t),1)},e}(p.L);function ni(t){var e=t.subscriber,n=t.windowTimeSpan,r=t.window;r&&e.closeWindow(r),t.window=e.openWindow(),this.schedule(t,n)}function ri(t){var e=t.windowTimeSpan,n=t.subscriber,r=t.scheduler,i=t.windowCreationInterval,o=n.openWindow(),s=this,a={action:s,subscription:null},u={subscriber:n,window:o,context:a};a.subscription=r.schedule(ii,e,u),s.add(a.subscription),s.schedule(t,i)}function ii(t){var e=t.subscriber,n=t.window,r=t.context;r&&r.action&&r.subscription&&r.action.remove(r.subscription),e.closeWindow(n)}function oi(t,e){return function(n){return n.lift(new si(t,e))}}var si=function(){function t(t,e){this.openings=t,this.closingSelector=e}return t.prototype.call=function(t,e){return e.subscribe(new ai(t,this.openings,this.closingSelector))},t}(),ai=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.openings=n,i.closingSelector=r,i.contexts=[],i.add(i.openSubscription=(0,T.D)(i,n,n)),i}return r.ZT(e,t),e.prototype._next=function(t){var e=this.contexts;if(e)for(var n=e.length,r=0;r0){var i=r.indexOf(n);-1!==i&&r.splice(i,1)}},e.prototype.notifyComplete=function(){},e.prototype._next=function(t){if(0===this.toRespond.length){var e=[t].concat(this.values);this.project?this._tryProject(e):this.destination.next(e)}},e.prototype._tryProject=function(t){var e;try{e=this.project.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(I.L),pi=n(5080);function yi(){for(var t=[],e=0;e{"use strict";n.d(e,{ZT:()=>i});var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},r(t,e)};function i(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}},9509:(t,e,n)=>{var r=n(8764),i=r.Buffer;function o(t,e){for(var n in t)e[n]=t[n]}function s(t,e,n){return i(t,e,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(o(r,e),e.Buffer=s),s.prototype=Object.create(i.prototype),o(i,s),s.from=function(t,e,n){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,n)},s.alloc=function(t,e,n){if("number"!=typeof t)throw new TypeError("Argument must be a number");var r=i(t);return void 0!==e?"string"==typeof n?r.fill(e,n):r.fill(e):r.fill(0),r},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}},7253:(t,e,n)=>{const r=n(9539),i=n(7187);var o="object"==typeof Reflect?Reflect:null,s=o&&"function"==typeof o.apply?o.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};function a(){i.call(this)}function u(t,e,n){try{s(t,e,n)}catch(t){setTimeout((()=>{throw t}))}}function c(t,e){for(var n=new Array(e),r=0;r0&&(o=e[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var a=i[t];if(void 0===a)return!1;if("function"==typeof a)u(a,this,e);else{var l=a.length,h=c(a,l);for(n=0;n{"use strict";var r=n(9509).Buffer,i=r.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(r.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=u,this.end=c,e=4;break;case"utf8":this.fillLast=a,e=4;break;case"base64":this.text=l,this.end=h,e=3;break;default:return this.write=f,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(e)}function s(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function a(t){var e=this.lastTotal-this.lastNeed,n=function(t,e,n){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==n?n:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2==0){var n=t.toString("utf16le",e);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function c(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,n)}return e}function l(t,e){var n=(t.length-e)%3;return 0===n?t.toString("base64",e):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-n))}function h(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function f(t){return t.toString(this.encoding)}function d(t){return t&&t.length?this.write(t):""}e.s=o,o.prototype.write=function(t){if(0===t.length)return"";var e,n;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n=0?(i>0&&(t.lastNeed=i-1),i):--r=0?(i>0&&(t.lastNeed=i-2),i):--r=0?(i>0&&(2===i?i=0:t.lastNeed=i-3),i):0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=n;var r=t.length-(n-this.lastNeed);return t.copy(this.lastChar,0,r),t.toString("utf8",e,r)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},655:(t,e,n)=>{"use strict";n.r(e),n.d(e,{__assign:()=>o,__asyncDelegator:()=>_,__asyncGenerator:()=>w,__asyncValues:()=>E,__await:()=>v,__awaiter:()=>l,__classPrivateFieldGet:()=>A,__classPrivateFieldSet:()=>T,__createBinding:()=>f,__decorate:()=>a,__exportStar:()=>d,__extends:()=>i,__generator:()=>h,__importDefault:()=>M,__importStar:()=>x,__makeTemplateObject:()=>S,__metadata:()=>c,__param:()=>u,__read:()=>y,__rest:()=>s,__spread:()=>g,__spreadArray:()=>m,__spreadArrays:()=>b,__values:()=>p});var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)};function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=function(){return o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=0;a--)(i=t[a])&&(s=(o<3?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s}function u(t,e){return function(n,r){e(n,r,t)}}function c(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function l(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))}function h(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function y(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function g(){for(var t=[],e=0;e1||a(t,e)}))})}function a(t,e){try{(n=i[t](e)).value instanceof v?Promise.resolve(n.value.v).then(u,c):l(o[0][2],n)}catch(t){l(o[0][3],t)}var n}function u(t){a("next",t)}function c(t){a("throw",t)}function l(t,e){t(e),o.shift(),o.length&&a(o[0][0],o[0][1])}}function _(t){var e,n;return e={},r("next"),r("throw",(function(t){throw t})),r("return"),e[Symbol.iterator]=function(){return this},e;function r(r,i){e[r]=t[r]?function(e){return(n=!n)?{value:v(t[r](e)),done:"return"===r}:i?i(e):e}:i}}function E(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=p(t),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(n){e[n]=t[n]&&function(e){return new Promise((function(r,i){!function(t,e,n,r){Promise.resolve(r).then((function(e){t({value:e,done:n})}),e)}(r,i,(e=t[n](e)).done,e.value)}))}}}function S(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}var k=Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e};function x(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&f(e,t,n);return k(e,t),e}function M(t){return t&&t.__esModule?t:{default:t}}function A(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)}function T(t,e,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,n):i?i.value=n:e.set(t,n),n}},4927:(t,e,n)=>{function r(t){try{if(!n.g.localStorage)return!1}catch(t){return!1}var e=n.g.localStorage[t];return null!=e&&"true"===String(e).toLowerCase()}t.exports=function(t,e){if(r("noDeprecation"))return t;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(e);r("traceDeprecation")?console.trace(e):console.warn(e),n=!0}return t.apply(this,arguments)}}},384:t=>{t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},5955:(t,e,n)=>{"use strict";var r=n(2584),i=n(8662),o=n(6430),s=n(5692);function a(t){return t.call.bind(t)}var u="undefined"!=typeof BigInt,c="undefined"!=typeof Symbol,l=a(Object.prototype.toString),h=a(Number.prototype.valueOf),f=a(String.prototype.valueOf),d=a(Boolean.prototype.valueOf);if(u)var p=a(BigInt.prototype.valueOf);if(c)var y=a(Symbol.prototype.valueOf);function g(t,e){if("object"!=typeof t)return!1;try{return e(t),!0}catch(t){return!1}}function b(t){return"[object Map]"===l(t)}function m(t){return"[object Set]"===l(t)}function v(t){return"[object WeakMap]"===l(t)}function w(t){return"[object WeakSet]"===l(t)}function _(t){return"[object ArrayBuffer]"===l(t)}function E(t){return"undefined"!=typeof ArrayBuffer&&(_.working?_(t):t instanceof ArrayBuffer)}function S(t){return"[object DataView]"===l(t)}function k(t){return"undefined"!=typeof DataView&&(S.working?S(t):t instanceof DataView)}e.isArgumentsObject=r,e.isGeneratorFunction=i,e.isTypedArray=s,e.isPromise=function(t){return"undefined"!=typeof Promise&&t instanceof Promise||null!==t&&"object"==typeof t&&"function"==typeof t.then&&"function"==typeof t.catch},e.isArrayBufferView=function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):s(t)||k(t)},e.isUint8Array=function(t){return"Uint8Array"===o(t)},e.isUint8ClampedArray=function(t){return"Uint8ClampedArray"===o(t)},e.isUint16Array=function(t){return"Uint16Array"===o(t)},e.isUint32Array=function(t){return"Uint32Array"===o(t)},e.isInt8Array=function(t){return"Int8Array"===o(t)},e.isInt16Array=function(t){return"Int16Array"===o(t)},e.isInt32Array=function(t){return"Int32Array"===o(t)},e.isFloat32Array=function(t){return"Float32Array"===o(t)},e.isFloat64Array=function(t){return"Float64Array"===o(t)},e.isBigInt64Array=function(t){return"BigInt64Array"===o(t)},e.isBigUint64Array=function(t){return"BigUint64Array"===o(t)},b.working="undefined"!=typeof Map&&b(new Map),e.isMap=function(t){return"undefined"!=typeof Map&&(b.working?b(t):t instanceof Map)},m.working="undefined"!=typeof Set&&m(new Set),e.isSet=function(t){return"undefined"!=typeof Set&&(m.working?m(t):t instanceof Set)},v.working="undefined"!=typeof WeakMap&&v(new WeakMap),e.isWeakMap=function(t){return"undefined"!=typeof WeakMap&&(v.working?v(t):t instanceof WeakMap)},w.working="undefined"!=typeof WeakSet&&w(new WeakSet),e.isWeakSet=function(t){return w(t)},_.working="undefined"!=typeof ArrayBuffer&&_(new ArrayBuffer),e.isArrayBuffer=E,S.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&S(new DataView(new ArrayBuffer(1),0,1)),e.isDataView=k;var x="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function M(t){return"[object SharedArrayBuffer]"===l(t)}function A(t){return void 0!==x&&(void 0===M.working&&(M.working=M(new x)),M.working?M(t):t instanceof x)}function T(t){return g(t,h)}function I(t){return g(t,f)}function C(t){return g(t,d)}function R(t){return u&&g(t,p)}function N(t){return c&&g(t,y)}e.isSharedArrayBuffer=A,e.isAsyncFunction=function(t){return"[object AsyncFunction]"===l(t)},e.isMapIterator=function(t){return"[object Map Iterator]"===l(t)},e.isSetIterator=function(t){return"[object Set Iterator]"===l(t)},e.isGeneratorObject=function(t){return"[object Generator]"===l(t)},e.isWebAssemblyCompiledModule=function(t){return"[object WebAssembly.Module]"===l(t)},e.isNumberObject=T,e.isStringObject=I,e.isBooleanObject=C,e.isBigIntObject=R,e.isSymbolObject=N,e.isBoxedPrimitive=function(t){return T(t)||I(t)||C(t)||R(t)||N(t)},e.isAnyArrayBuffer=function(t){return"undefined"!=typeof Uint8Array&&(E(t)||A(t))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(t){Object.defineProperty(e,t,{enumerable:!1,value:function(){throw new Error(t+" is not supported in userland")}})}))},9539:(t,e,n)=>{var r=n(4155),i=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),n={},r=0;r=i)return t;switch(t){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 t}})),a=r[n];n=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),g(n)?r.showHidden=n:n&&e._extend(r,n),w(r.showHidden)&&(r.showHidden=!1),w(r.depth)&&(r.depth=2),w(r.colors)&&(r.colors=!1),w(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=l),f(r,t,r.depth)}function l(t,e){var n=c.styles[e];return n?"["+c.colors[n][0]+"m"+t+"["+c.colors[n][1]+"m":t}function h(t,e){return t}function f(t,n,r){if(t.customInspect&&n&&x(n.inspect)&&n.inspect!==e.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,t);return v(i)||(i=f(t,i,r)),i}var o=function(t,e){if(w(e))return t.stylize("undefined","undefined");if(v(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}return m(e)?t.stylize(""+e,"number"):g(e)?t.stylize(""+e,"boolean"):b(e)?t.stylize("null","null"):void 0}(t,n);if(o)return o;var s=Object.keys(n),a=function(t){var e={};return t.forEach((function(t,n){e[t]=!0})),e}(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(n)),k(n)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return d(n);if(0===s.length){if(x(n)){var u=n.name?": "+n.name:"";return t.stylize("[Function"+u+"]","special")}if(_(n))return t.stylize(RegExp.prototype.toString.call(n),"regexp");if(S(n))return t.stylize(Date.prototype.toString.call(n),"date");if(k(n))return d(n)}var c,l="",h=!1,E=["{","}"];return y(n)&&(h=!0,E=["[","]"]),x(n)&&(l=" [Function"+(n.name?": "+n.name:"")+"]"),_(n)&&(l=" "+RegExp.prototype.toString.call(n)),S(n)&&(l=" "+Date.prototype.toUTCString.call(n)),k(n)&&(l=" "+d(n)),0!==s.length||h&&0!=n.length?r<0?_(n)?t.stylize(RegExp.prototype.toString.call(n),"regexp"):t.stylize("[Object]","special"):(t.seen.push(n),c=h?function(t,e,n,r,i){for(var o=[],s=0,a=e.length;s60?n[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+n[1]:n[0]+e+" "+t.join(", ")+" "+n[1]}(c,l,E)):E[0]+l+E[1]}function d(t){return"["+Error.prototype.toString.call(t)+"]"}function p(t,e,n,r,i,o){var s,a,u;if((u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?a=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(a=t.stylize("[Setter]","special")),C(r,i)||(s="["+i+"]"),a||(t.seen.indexOf(u.value)<0?(a=b(n)?f(t,u.value,null):f(t,u.value,n-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+a.split("\n").map((function(t){return" "+t})).join("\n")):a=t.stylize("[Circular]","special")),w(s)){if(o&&i.match(/^\d+$/))return a;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+a}function y(t){return Array.isArray(t)}function g(t){return"boolean"==typeof t}function b(t){return null===t}function m(t){return"number"==typeof t}function v(t){return"string"==typeof t}function w(t){return void 0===t}function _(t){return E(t)&&"[object RegExp]"===M(t)}function E(t){return"object"==typeof t&&null!==t}function S(t){return E(t)&&"[object Date]"===M(t)}function k(t){return E(t)&&("[object Error]"===M(t)||t instanceof Error)}function x(t){return"function"==typeof t}function M(t){return Object.prototype.toString.call(t)}function A(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(t){if(t=t.toUpperCase(),!s[t])if(a.test(t)){var n=r.pid;s[t]=function(){var r=e.format.apply(e,arguments);console.error("%s %d: %s",t,n,r)}}else s[t]=function(){};return s[t]},e.inspect=c,c.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]},c.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.types=n(5955),e.isArray=y,e.isBoolean=g,e.isNull=b,e.isNullOrUndefined=function(t){return null==t},e.isNumber=m,e.isString=v,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=w,e.isRegExp=_,e.types.isRegExp=_,e.isObject=E,e.isDate=S,e.types.isDate=S,e.isError=k,e.types.isNativeError=k,e.isFunction=x,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=n(384);var T=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function I(){var t=new Date,e=[A(t.getHours()),A(t.getMinutes()),A(t.getSeconds())].join(":");return[t.getDate(),T[t.getMonth()],e].join(" ")}function C(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){console.log("%s - %s",I(),e.format.apply(e,arguments))},e.inherits=n(5717),e._extend=function(t,e){if(!e||!E(e))return t;for(var n=Object.keys(e),r=n.length;r--;)t[n[r]]=e[n[r]];return t};var R="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function N(t,e){if(!t){var n=new Error("Promise was rejected with a falsy value");n.reason=t,t=n}return e(t)}e.promisify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');if(R&&t[R]){var e;if("function"!=typeof(e=t[R]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,R,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,n,r=new Promise((function(t,r){e=t,n=r})),i=[],o=0;o{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.EthereumChain=void 0,(n=e.EthereumChain||(e.EthereumChain={}))[n.ETHEREUM_MAINNET=1]="ETHEREUM_MAINNET",n[n.OPTIMISM_MAINNET=10]="OPTIMISM_MAINNET",n[n.POLYGON_MAINNET=137]="POLYGON_MAINNET",n[n.ETHEREUM_CLASSIC_MAINNET=61]="ETHEREUM_CLASSIC_MAINNET",n[n.BSC_MAINNET=56]="BSC_MAINNET",n[n.FANTOM_MAINNET=250]="FANTOM_MAINNET",n[n.ARBITRUM_MAINNET=42161]="ARBITRUM_MAINNET",n[n.XDAI_MAINNET=100]="XDAI_MAINNET",n[n.AVALANCHE_MAINNET=43114]="AVALANCHE_MAINNET",n[n.ROPSTEN=3]="ROPSTEN",n[n.RINKEBY=4]="RINKEBY",n[n.GOERLI=5]="GOERLI",n[n.KOVAN=42]="KOVAN",n[n.OPTIMISM_KOVAN=69]="OPTIMISM_KOVAN",n[n.POLYGON_TESTNET=80001]="POLYGON_TESTNET",n[n.BSC_TESTNET=97]="BSC_TESTNET",n[n.FANTOM_TESTNET=4002]="FANTOM_TESTNET",n[n.ARBITRUM_TESTNET=421611]="ARBITRUM_TESTNET",n[n.AVALANCHE_FUJI=43113]="AVALANCHE_FUJI",function(t){t.rpcUrl=function(e){switch(e){case t.ETHEREUM_MAINNET:return"https://mainnet-infura.wallet.coinbase.com";case t.ROPSTEN:return"https://ropsten-infura.wallet.coinbase.com";case t.RINKEBY:return"https://rinkeby-infura.wallet.coinbase.com";case t.KOVAN:return"https://kovan-infura.wallet.coinbase.com";case t.GOERLI:return"https://goerli-node.wallet.coinbase.com";case t.OPTIMISM_KOVAN:return"https://optimism-node.wallet.coinbase.com";case t.OPTIMISM_MAINNET:return"https://optimism-mainnet.wallet.coinbase.com";case t.POLYGON_MAINNET:return"https://polygon-mainnet-infura.wallet.coinbase.com";case t.POLYGON_TESTNET:return"https://polygon-mumbai-infura.wallet.coinbase.com";case t.BSC_MAINNET:return"https://bsc-dataseed.binance.org";case t.BSC_TESTNET:return"https://data-seed-prebsc-1-s1.binance.org:8545";case t.FANTOM_MAINNET:return"https://rpcapi.fantom.network";case t.FANTOM_TESTNET:return"https://rpc.testnet.fantom.network";case t.ARBITRUM_MAINNET:return"https://l2-mainnet.wallet.coinbase.com?targetName=arbitrum";case t.ARBITRUM_TESTNET:return"https://rinkeby.arbitrum.io/rpc";case t.XDAI_MAINNET:return"https://rpc.xdaichain.com";case t.AVALANCHE_MAINNET:return"https://api.avax.network/ext/bc/C/rpc";case t.AVALANCHE_FUJI:return"https://api.avax-test.network/ext/bc/C/rpc";default:return}},t.fromChainId=function(e){switch(Number(e)){case t.ETHEREUM_MAINNET.valueOf():return t.ETHEREUM_MAINNET;case t.OPTIMISM_MAINNET.valueOf():return t.OPTIMISM_MAINNET;case t.POLYGON_MAINNET.valueOf():return t.POLYGON_MAINNET;case t.ETHEREUM_CLASSIC_MAINNET.valueOf():return t.ETHEREUM_CLASSIC_MAINNET;case t.BSC_MAINNET.valueOf():return t.BSC_MAINNET;case t.FANTOM_MAINNET.valueOf():return t.FANTOM_MAINNET;case t.ARBITRUM_MAINNET.valueOf():return t.ARBITRUM_MAINNET;case t.AVALANCHE_MAINNET.valueOf():return t.AVALANCHE_MAINNET;case t.XDAI_MAINNET.valueOf():return t.XDAI_MAINNET;case t.ROPSTEN.valueOf():return t.ROPSTEN;case t.RINKEBY.valueOf():return t.RINKEBY;case t.GOERLI.valueOf():return t.GOERLI;case t.KOVAN.valueOf():return t.KOVAN;case t.OPTIMISM_KOVAN.valueOf():return t.OPTIMISM_KOVAN;case t.POLYGON_TESTNET.valueOf():return t.POLYGON_TESTNET;case t.BSC_TESTNET.valueOf():return t.BSC_TESTNET;case t.FANTOM_TESTNET.valueOf():return t.FANTOM_TESTNET;case t.ARBITRUM_TESTNET.valueOf():return t.ARBITRUM_TESTNET;case t.AVALANCHE_FUJI.valueOf():return t.AVALANCHE_FUJI;default:return}}}(e.EthereumChain||(e.EthereumChain={}))},8027:(t,e,n)=>{"use strict";var r=n(4155);Object.defineProperty(e,"__esModule",{value:!0}),e.WalletLink=void 0;const i=n(7220),o=n(7046),s=n(3936),a=n(3667),u=n(9909),c=n(5281),l=n(1033),h=r.env.WALLETLINK_URL||"https://www.walletlink.org",f=r.env.WALLETLINK_VERSION||n(5699).i8||"unknown";class d{constructor(t){var e;this._appName="",this._appLogoUrl=null,this._relay=null,this._relayEventManager=null;const n=t.walletLinkUrl||h;let r;r=t.walletLinkUIConstructor?t.walletLinkUIConstructor:t=>new a.WalletLinkSdkUI(t),void 0===t.overrideIsMetaMask?this._overrideIsMetaMask=!1:this._overrideIsMetaMask=t.overrideIsMetaMask,this._overrideIsCoinbaseWallet=null===(e=t.overrideIsCoinbaseWallet)||void 0===e||e,this._walletLinkAnalytics=t.walletLinkAnalytics?t.walletLinkAnalytics:new i.WalletLinkAnalytics;const s=new URL(n),l=`${s.protocol}//${s.host}`;this._storage=new o.ScopedLocalStorage(`-walletlink:${l}`),this._storage.setItem("version",d.VERSION),void 0===window.walletLinkExtension&&(this._relayEventManager=new c.WalletLinkRelayEventManager,this._relay=new u.WalletLinkRelay({walletLinkUrl:n,version:f,darkMode:!!t.darkMode,walletLinkUIConstructor:r,storage:this._storage,relayEventManager:this._relayEventManager,walletLinkAnalytics:this._walletLinkAnalytics}),this.setAppInfo(t.appName,t.appLogoUrl),this._relay.attachUI())}makeWeb3Provider(t="",e=1){if(void 0!==window.walletLinkExtension)return"boolean"==typeof window.walletLinkExtension.isCipher&&window.walletLinkExtension.isCipher||window.walletLinkExtension.setProviderInfo(t,e),window.walletLinkExtension;const n=this._relay;if(!n||!this._relayEventManager||!this._storage)throw new Error("Relay not initialized, should never happen");return t||n.setConnectDisabled(!0),new s.WalletLinkProvider({relayProvider:()=>Promise.resolve(n),relayEventManager:this._relayEventManager,storage:this._storage,jsonRpcUrl:t,chainId:e,walletLinkAnalytics:this._walletLinkAnalytics,overrideIsMetaMask:this._overrideIsMetaMask,overrideIsCoinbaseWallet:this._overrideIsCoinbaseWallet})}setAppInfo(t,e){var n;this._appName=t||"DApp",this._appLogoUrl=e||(0,l.getFavicon)(),void 0!==window.walletLinkExtension?"boolean"==typeof window.walletLinkExtension.isCipher&&window.walletLinkExtension.isCipher||window.walletLinkExtension.setAppInfo(this._appName,this._appLogoUrl):null===(n=this._relay)||void 0===n||n.setAppInfo(this._appName,this._appLogoUrl)}disconnect(){var t;void 0!==window.walletLinkExtension?window.walletLinkExtension.close():null===(t=this._relay)||void 0===t||t.resetAndReload()}}e.WalletLink=d,d.VERSION=f},9917:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default='.-walletlink-css-reset .-walletlink-link-dialog{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.-walletlink-css-reset .-walletlink-link-dialog-backdrop{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0,0,0,.33);transition:opacity .25s}.-walletlink-css-reset .-walletlink-link-dialog-backdrop-hidden{opacity:0}.-walletlink-css-reset .-walletlink-link-dialog-box{display:flex;position:relative;flex-direction:column;background-color:#f6f6f6;border-radius:16px;box-shadow:0px 16px 24px rgba(0,0,0,.1),0px 0px 8px rgba(0,0,0,.05);transform:scale(1);transition:opacity .25s,transform .25s;overflow:hidden}.-walletlink-css-reset .-walletlink-link-dialog-box-hidden{opacity:0;transform:scale(0.85)}.-walletlink-css-reset .-walletlink-link-dialog-box-content{padding:24px;text-align:center}.-walletlink-css-reset .-walletlink-link-dialog-box-content h3{display:block;margin-bottom:24px;text-align:left;text-transform:uppercase;font-size:22px;font-weight:bold;line-height:1.2;color:#000}.-walletlink-css-reset .-walletlink-link-dialog-box-content-qrcode{position:relative;display:block;margin-bottom:24px;background-color:#f6f6f6;padding:16px;border-radius:16px;box-shadow:4px 4px 8px rgba(0,0,0,.15),-8px -8px 8px #fff;overflow:hidden}.-walletlink-css-reset .-walletlink-link-dialog-box-content-qrcode-wrapper{display:block;width:232px;height:232px;padding:4px;border-radius:4px;background:#f4f4f4;margin-bottom:16px}.-walletlink-css-reset .-walletlink-link-dialog-box-content-qrcode-wrapper img{display:block;width:224px;height:224px}.-walletlink-css-reset .-walletlink-link-dialog-box-content-qrcode>p{display:block;color:gray;font-weight:bold;font-size:12px;text-align:center}.-walletlink-css-reset .-walletlink-link-dialog-box-content-qrcode-connecting{position:absolute;top:0;left:0;right:0;bottom:0;display:flex;flex-direction:column;align-items:center;justify-content:center;background:rgba(246,246,246,.98)}.-walletlink-css-reset .-walletlink-link-dialog-box-content-qrcode-connecting p{margin-top:16px;color:#333;font-size:12px;font-weight:bold}.-walletlink-css-reset .-walletlink-link-dialog-box-content a{text-align:center;cursor:pointer;transition:color .1s;font-size:14px}.-walletlink-css-reset .-walletlink-link-dialog-box-content a,.-walletlink-css-reset .-walletlink-link-dialog-box-content a:link,.-walletlink-css-reset .-walletlink-link-dialog-box-content a:visited{color:#999}.-walletlink-css-reset .-walletlink-link-dialog-box-content a:hover,.-walletlink-css-reset .-walletlink-link-dialog-box-content a:active{color:#666;text-decoration:underline}.-walletlink-css-reset .-walletlink-link-dialog-box-cancel{position:absolute;-webkit-appearance:none;display:flex;align-items:center;justify-content:center;top:24px;right:24px;width:24px;height:24px;border-radius:12px;background-color:#e7e7e7;cursor:pointer}.-walletlink-css-reset .-walletlink-link-dialog-box-cancel-x{position:relative;display:block}.-walletlink-css-reset .-walletlink-link-dialog-box-cancel-x::before,.-walletlink-css-reset .-walletlink-link-dialog-box-cancel-x::after{content:"";position:absolute;display:block;top:-1px;left:-7px;width:14px;height:2px;background-color:#999;transition:background-color .2s}.-walletlink-css-reset .-walletlink-link-dialog-box-cancel-x::before{transform:rotate(45deg)}.-walletlink-css-reset .-walletlink-link-dialog-box-cancel-x::after{transform:rotate(135deg)}.-walletlink-css-reset .-walletlink-link-dialog-box-cancel:hover .-walletlink-link-dialog-box-cancel-x-a,.-walletlink-css-reset .-walletlink-link-dialog-box-cancel:hover .-walletlink-link-dialog-box-cancel-x-b{background-color:#000}.-walletlink-css-reset .-walletlink-link-dialog-container{display:block}.-walletlink-css-reset .-walletlink-link-dialog-container-hidden{display:none}.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box{background-color:#2a2a2a}.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-content h3{color:#ccc}.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-content-qrcode{background-color:#2a2a2a;box-shadow:4px 4px 8px rgba(0,0,0,.5),-8px -8px 8px #343434}.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-content-qrcode>p{color:#999}.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-content-qrcode-connecting{background:rgba(42,42,42,.98)}.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-content-qrcode-connecting p{color:#ddd}.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-content a,.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-content a:link,.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-content a:visited{color:#888}.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-content a:hover,.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-content a:active{color:#aaa}.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-cancel{background-color:#333}.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-cancel-x::before,.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-cancel-x::after{background-color:#aaa}.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-cancel:hover .-walletlink-link-dialog-box-cancel-x::before,.-walletlink-css-reset .-walletlink-link-dialog-container-dark .-walletlink-link-dialog-box-cancel:hover .-walletlink-link-dialog-box-cancel-x::after{background-color:#eee}'},2178:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.LinkDialog=void 0;const i=r(n(6010)),o=n(6400),s=n(396),a=r(n(9917)),u=n(5603),c=n(8870);e.LinkDialog=t=>{const[e,n]=(0,s.useState)(!t.isOpen),[r,u]=(0,s.useState)(!t.isOpen);return(0,s.useEffect)((()=>{const{isOpen:e}=t,r=[window.setTimeout((()=>{u(!e)}),10)];return e?n(!1):r.push(window.setTimeout((()=>{n(!0)}),360)),()=>{r.forEach(window.clearTimeout)}}),[t.isOpen]),(0,o.h)("div",{class:(0,i.default)("-walletlink-link-dialog-container",t.darkMode&&"-walletlink-link-dialog-container-dark",e&&"-walletlink-link-dialog-container-hidden")},(0,o.h)("style",null,a.default),(0,o.h)("div",{class:(0,i.default)("-walletlink-link-dialog-backdrop",r&&"-walletlink-link-dialog-backdrop-hidden")}),(0,o.h)("div",{class:"-walletlink-link-dialog"},(0,o.h)("div",{class:(0,i.default)("-walletlink-link-dialog-box",r&&"-walletlink-link-dialog-box-hidden")},(0,o.h)(l,{darkMode:t.darkMode,version:t.version,sessionId:t.sessionId,sessionSecret:t.sessionSecret,walletLinkUrl:t.walletLinkUrl,isConnected:t.isConnected,isParentConnection:t.isParentConnection}),t.onCancel&&(0,o.h)(h,{onClick:t.onCancel}))))};const l=t=>{const e=window.encodeURIComponent(t.walletLinkUrl),n=t.isParentConnection?"parent-id":"id",r=`${t.walletLinkUrl}/#/link?${n}=${t.sessionId}&secret=${t.sessionSecret}&server=${e}&v=1`;return(0,o.h)("div",{class:"-walletlink-link-dialog-box-content"},(0,o.h)("h3",null,"Scan to",(0,o.h)("br",null)," Connect"),(0,o.h)("div",{class:"-walletlink-link-dialog-box-content-qrcode"},(0,o.h)("div",{class:"-walletlink-link-dialog-box-content-qrcode-wrapper"},(0,o.h)(u.QRCode,{content:r,width:224,height:224,fgColor:"#000",bgColor:"transparent"})),(0,o.h)("input",{type:"hidden",value:r}),!t.isConnected&&(0,o.h)("div",{class:"-walletlink-link-dialog-box-content-qrcode-connecting"},(0,o.h)(c.Spinner,{size:128,color:t.darkMode?"#fff":"#000"}),(0,o.h)("p",null,"Connecting...")),(0,o.h)("p",{title:`WalletLink v${t.version}`},"Powered by WalletLink")),(0,o.h)("a",{href:`${t.walletLinkUrl}/#/wallets`,target:"_blank",rel:"noopener"},"Don’t have a wallet app?"))},h=t=>(0,o.h)("button",{class:"-walletlink-link-dialog-box-cancel",onClick:t.onClick},(0,o.h)("div",{class:"-walletlink-link-dialog-box-cancel-x"}))},1566:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinkFlow=void 0;const r=n(6400),i=n(4143),o=n(1717),s=n(2178),a=n(77);e.LinkFlow=class{constructor(t){this.extensionUI$=new i.BehaviorSubject({}),this.subscriptions=new i.Subscription,this.isConnected=!1,this.isOpen=!1,this.onCancel=null,this.root=null,this.connectDisabled=!1,this.darkMode=t.darkMode,this.version=t.version,this.sessionId=t.sessionId,this.sessionSecret=t.sessionSecret,this.walletLinkUrl=t.walletLinkUrl,this.isParentConnection=t.isParentConnection,this.connected$=t.connected$,fetch("https://api.wallet.coinbase.com/rpc/v2/getFeatureFlags").then((t=>t.json())).then((t=>{const e=t.result.desktop.extension_ui;void 0===e?this.extensionUI$.next({value:!1}):this.extensionUI$.next({value:e})})).catch((t=>{console.error("Couldn't fetch feature flags - ",t),this.extensionUI$.next({value:!1})}))}attach(t){this.root=document.createElement("div"),this.root.className="-walletlink-link-flow-root",t.appendChild(this.root),this.render(),this.subscriptions.add(this.connected$.subscribe((t=>{this.isConnected!==t&&(this.isConnected=t,this.render())})))}detach(){var t;this.root&&(this.subscriptions.unsubscribe(),(0,r.render)(null,this.root),null===(t=this.root.parentElement)||void 0===t||t.removeChild(this.root))}setConnectDisabled(t){this.connectDisabled=t}open(t){this.isOpen=!0,this.onCancel=t.onCancel,this.render()}close(){this.isOpen=!1,this.onCancel=null,this.render()}render(){if(!this.root)return;const t=this.extensionUI$.pipe((0,o.first)((t=>void 0!==t.value))).subscribe((t=>{this.root&&(0,r.render)(t.value?(0,r.h)(a.TryExtensionLinkDialog,{darkMode:this.darkMode,version:this.version,sessionId:this.sessionId,sessionSecret:this.sessionSecret,walletLinkUrl:this.walletLinkUrl,isOpen:this.isOpen,isConnected:this.isConnected,isParentConnection:this.isParentConnection,onCancel:this.onCancel,connectDisabled:this.connectDisabled}):(0,r.h)(s.LinkDialog,{darkMode:this.darkMode,version:this.version,sessionId:this.sessionId,sessionSecret:this.sessionSecret,walletLinkUrl:this.walletLinkUrl,isOpen:this.isOpen,isConnected:this.isConnected,isParentConnection:this.isParentConnection,onCancel:this.onCancel}),this.root)}));this.subscriptions.add(t)}}},5603:function(t,e,n){"use strict";var r=n(8764).Buffer,i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.QRCode=void 0;const o=n(6400),s=n(396),a=i(n(3702));e.QRCode=t=>{const[e,n]=(0,s.useState)("");return(0,s.useEffect)((()=>{var e,i;const o=new a.default({content:t.content,background:t.bgColor||"#ffffff",color:t.fgColor||"#000000",container:"svg",ecl:"M",width:null!==(e=t.width)&&void 0!==e?e:256,height:null!==(i=t.height)&&void 0!==i?i:256,padding:0,image:t.image}),s=r.from(o.svg(),"utf8").toString("base64");n(`data:image/svg+xml;base64,${s}`)})),e?(0,o.h)("img",{src:e,alt:"QR Code"}):null}},6e3:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=".-walletlink-css-reset .-gear-container{margin-left:16px !important;margin-right:9px !important;display:flex;align-items:center;justify-content:center;width:24px;height:24px;transition:opacity .25s}.-walletlink-css-reset .-gear-container *{user-select:none}.-walletlink-css-reset .-gear-container svg{opacity:0;position:absolute}.-walletlink-css-reset .-gear-icon{height:12px;width:12px;z-index:10000}.-walletlink-css-reset .-walletlink-snackbar{align-items:flex-end;display:flex;flex-direction:column;position:fixed;right:0;top:0;z-index:2147483647}.-walletlink-css-reset .-walletlink-snackbar *{user-select:none}.-walletlink-css-reset .-walletlink-snackbar-instance{display:flex;flex-direction:column;margin:8px 16px 0 16px;overflow:visible;text-align:left;transform:translateX(0);transition:opacity .25s,transform .25s}.-walletlink-css-reset .-walletlink-snackbar-instance-header:hover .-gear-container svg{opacity:1}.-walletlink-css-reset .-walletlink-snackbar-instance-header{display:flex;align-items:center;background:#fff;overflow:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;cursor:pointer}.-walletlink-css-reset .-walletlink-snackbar-instance-header-cblogo{margin:8px 8px 8px 8px}.-walletlink-css-reset .-walletlink-snackbar-instance-header *{cursor:pointer}.-walletlink-css-reset .-walletlink-snackbar-instance-header-message{color:#000;font-size:13px;line-height:1.5;user-select:none}.-walletlink-css-reset .-walletlink-snackbar-instance-menu{background:#fff;transition:opacity .25s ease-in-out,transform .25s linear,visibility 0s;visibility:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;opacity:0;flex-direction:column;padding-left:8px;padding-right:8px}.-walletlink-css-reset .-walletlink-snackbar-instance-menu-item:last-child{margin-bottom:8px !important}.-walletlink-css-reset .-walletlink-snackbar-instance-menu-item:hover{background:#f5f7f8;border-radius:6px;transition:background .25s}.-walletlink-css-reset .-walletlink-snackbar-instance-menu-item:hover span{color:#050f19;transition:color .25s}.-walletlink-css-reset .-walletlink-snackbar-instance-menu-item:hover svg path{fill:#000;transition:fill .25s}.-walletlink-css-reset .-walletlink-snackbar-instance-menu-item{visibility:inherit;height:35px;margin-top:8px;margin-bottom:0;display:flex;flex-direction:row;align-items:center;padding:8px;cursor:pointer}.-walletlink-css-reset .-walletlink-snackbar-instance-menu-item *{visibility:inherit;cursor:pointer}.-walletlink-css-reset .-walletlink-snackbar-instance-menu-item-is-red:hover{background:rgba(223,95,103,.2);transition:background .25s}.-walletlink-css-reset .-walletlink-snackbar-instance-menu-item-is-red:hover *{cursor:pointer}.-walletlink-css-reset .-walletlink-snackbar-instance-menu-item-is-red:hover svg path{fill:#df5f67;transition:fill .25s}.-walletlink-css-reset .-walletlink-snackbar-instance-menu-item-is-red:hover span{color:#df5f67;transition:color .25s}.-walletlink-css-reset .-walletlink-snackbar-instance-menu-item-info{color:#aaa;font-size:13px;margin:0 8px 0 32px;position:absolute}.-walletlink-css-reset .-walletlink-snackbar-instance-hidden{opacity:0;text-align:left;transform:translateX(25%);transition:opacity .5s linear}.-walletlink-css-reset .-walletlink-snackbar-instance-expanded .-walletlink-snackbar-instance-menu{opacity:1;display:flex;transform:translateY(8px);visibility:visible}"},2133:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Snackbar=void 0;const i=r(n(6010)),o=n(6400),s=n(396),a=r(n(6e3));e.Snackbar=class{constructor(t){this.items=new Map,this.nextItemKey=0,this.root=null,this.darkMode=t.darkMode}attach(t){this.root=document.createElement("div"),this.root.className="-walletlink-snackbar-root",t.appendChild(this.root),this.render()}presentItem(t){const e=this.nextItemKey++;return this.items.set(e,t),this.render(),()=>{this.items.delete(e),this.render()}}clear(){this.items.clear(),this.render()}render(){this.root&&(0,o.render)((0,o.h)("div",null,(0,o.h)(u,{darkMode:this.darkMode},Array.from(this.items.entries()).map((([t,e])=>(0,o.h)(c,Object.assign({},e,{key:t})))))),this.root)}};const u=t=>(0,o.h)("div",{class:(0,i.default)("-walletlink-snackbar-container")},(0,o.h)("style",null,a.default),(0,o.h)("div",{class:"-walletlink-snackbar"},t.children)),c=({autoExpand:t,message:e,menuItems:n})=>{const[r,a]=(0,s.useState)(!0),[u,c]=(0,s.useState)(null!=t&&t);return(0,s.useEffect)((()=>{const t=[window.setTimeout((()=>{a(!1)}),1),window.setTimeout((()=>{c(!0)}),1e4)];return()=>{t.forEach(window.clearTimeout)}})),(0,o.h)("div",{class:(0,i.default)("-walletlink-snackbar-instance",r&&"-walletlink-snackbar-instance-hidden",u&&"-walletlink-snackbar-instance-expanded")},(0,o.h)("div",{class:"-walletlink-snackbar-instance-header",onClick:()=>{c(!u)}},(0,o.h)("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNDkyIDEwLjQxOWE4LjkzIDguOTMgMCAwMTguOTMtOC45M2gxMS4xNjNhOC45MyA4LjkzIDAgMDE4LjkzIDguOTN2MTEuMTYzYTguOTMgOC45MyAwIDAxLTguOTMgOC45M0gxMC40MjJhOC45MyA4LjkzIDAgMDEtOC45My04LjkzVjEwLjQxOXoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEwLjQxOSAwSDIxLjU4QzI3LjMzNSAwIDMyIDQuNjY1IDMyIDEwLjQxOVYyMS41OEMzMiAyNy4zMzUgMjcuMzM1IDMyIDIxLjU4MSAzMkgxMC40MkM0LjY2NSAzMiAwIDI3LjMzNSAwIDIxLjU4MVYxMC40MkMwIDQuNjY1IDQuNjY1IDAgMTAuNDE5IDB6bTAgMS40ODhhOC45MyA4LjkzIDAgMDAtOC45MyA4LjkzdjExLjE2M2E4LjkzIDguOTMgMCAwMDguOTMgOC45M0gyMS41OGE4LjkzIDguOTMgMCAwMDguOTMtOC45M1YxMC40MmE4LjkzIDguOTMgMCAwMC04LjkzLTguOTNIMTAuNDJ6IiBmaWxsPSIjZmZmIi8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNS45OTggMjYuMDQ5Yy01LjU0OSAwLTEwLjA0Ny00LjQ5OC0xMC4wNDctMTAuMDQ3IDAtNS41NDggNC40OTgtMTAuMDQ2IDEwLjA0Ny0xMC4wNDYgNS41NDggMCAxMC4wNDYgNC40OTggMTAuMDQ2IDEwLjA0NiAwIDUuNTQ5LTQuNDk4IDEwLjA0Ny0xMC4wNDYgMTAuMDQ3eiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0xMi43NjIgMTQuMjU0YzAtLjgyMi42NjctMS40ODkgMS40ODktMS40ODloMy40OTdjLjgyMiAwIDEuNDg4LjY2NiAxLjQ4OCAxLjQ4OXYzLjQ5N2MwIC44MjItLjY2NiAxLjQ4OC0xLjQ4OCAxLjQ4OGgtMy40OTdhMS40ODggMS40ODggMCAwMS0xLjQ4OS0xLjQ4OHYtMy40OTh6IiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+",class:"-walletlink-snackbar-instance-header-cblogo"}),(0,o.h)("div",{class:"-walletlink-snackbar-instance-header-message"},e),(0,o.h)("div",{class:"-gear-container"},!u&&(0,o.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("circle",{cx:"12",cy:"12",r:"12",fill:"#F5F7F8"})),(0,o.h)("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDYuNzV2LTEuNWwtMS43Mi0uNTdjLS4wOC0uMjctLjE5LS41Mi0uMzItLjc3bC44MS0xLjYyLTEuMDYtMS4wNi0xLjYyLjgxYy0uMjQtLjEzLS41LS4yNC0uNzctLjMyTDYuNzUgMGgtMS41bC0uNTcgMS43MmMtLjI3LjA4LS41My4xOS0uNzcuMzJsLTEuNjItLjgxLTEuMDYgMS4wNi44MSAxLjYyYy0uMTMuMjQtLjI0LjUtLjMyLjc3TDAgNS4yNXYxLjVsMS43Mi41N2MuMDguMjcuMTkuNTMuMzIuNzdsLS44MSAxLjYyIDEuMDYgMS4wNiAxLjYyLS44MWMuMjQuMTMuNS4yMy43Ny4zMkw1LjI1IDEyaDEuNWwuNTctMS43MmMuMjctLjA4LjUyLS4xOS43Ny0uMzJsMS42Mi44MSAxLjA2LTEuMDYtLjgxLTEuNjJjLjEzLS4yNC4yMy0uNS4zMi0uNzdMMTIgNi43NXpNNiA4LjVhMi41IDIuNSAwIDAxMC01IDIuNSAyLjUgMCAwMTAgNXoiIGZpbGw9IiMwNTBGMTkiLz48L3N2Zz4=",class:"-gear-icon",title:"Expand"}))),n&&n.length>0&&(0,o.h)("div",{class:"-walletlink-snackbar-instance-menu"},n.map(((t,e)=>(0,o.h)("div",{class:(0,i.default)("-walletlink-snackbar-instance-menu-item",t.isRed&&"-walletlink-snackbar-instance-menu-item-is-red"),onClick:t.onClick,key:e},(0,o.h)("svg",{width:t.svgWidth,height:t.svgHeight,viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{"fill-rule":t.defaultFillRule,"clip-rule":t.defaultClipRule,d:t.path,fill:"#AAAAAA"})),(0,o.h)("span",{class:(0,i.default)("-walletlink-snackbar-instance-menu-item-info",t.isRed&&"-walletlink-snackbar-instance-menu-item-info-is-red")},t.info))))))}},834:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=".-walletlink-css-reset .-walletlink-spinner{display:inline-block}.-walletlink-css-reset .-walletlink-spinner svg{display:inline-block;animation:2s linear infinite -walletlink-spinner-svg}.-walletlink-css-reset .-walletlink-spinner svg circle{animation:1.9s ease-in-out infinite both -walletlink-spinner-circle;display:block;fill:transparent;stroke-dasharray:283;stroke-dashoffset:280;stroke-linecap:round;stroke-width:10px;transform-origin:50% 50%}@keyframes -walletlink-spinner-svg{0%{transform:rotateZ(0deg)}100%{transform:rotateZ(360deg)}}@keyframes -walletlink-spinner-circle{0%,25%{stroke-dashoffset:280;transform:rotate(0)}50%,75%{stroke-dashoffset:75;transform:rotate(45deg)}100%{stroke-dashoffset:280;transform:rotate(360deg)}}"},8870:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Spinner=void 0;const i=n(6400),o=r(n(834));e.Spinner=t=>{var e;const n=null!==(e=t.size)&&void 0!==e?e:64,r=t.color||"#000";return(0,i.h)("div",{class:"-walletlink-spinner"},(0,i.h)("style",null,o.default),(0,i.h)("svg",{viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg",style:{width:n,height:n}},(0,i.h)("circle",{style:{cx:50,cy:50,r:45,stroke:r}})))}},6695:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default='.-walletlink-css-reset .-walletlink-extension-dialog{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.-walletlink-css-reset .-walletlink-extension-dialog-backdrop{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0,0,0,.5);transition:opacity .25s}.-walletlink-css-reset .-walletlink-extension-dialog-backdrop-hidden{opacity:0}.-walletlink-css-reset .-walletlink-extension-dialog-box{display:flex;position:relative;max-width:500px;flex-direction:column;transform:scale(1);transition:opacity .25s,transform .25s}.-walletlink-css-reset .-walletlink-extension-dialog-box-hidden{opacity:0;transform:scale(0.85)}.-walletlink-css-reset .-walletlink-extension-dialog-box-top{display:flex;flex-direction:row;background-color:#fff;border-radius:8px;overflow:hidden;min-height:300px}.-walletlink-css-reset .-walletlink-extension-dialog-box-top-install-region{display:flex;flex-basis:50%;flex-direction:column;justify-content:center;padding:32px}.-walletlink-css-reset .-walletlink-extension-dialog-box-top-install-region button{display:block;border-radius:8px;background-color:#1652f0;color:#fff;width:90%;min-width:fit-content;height:44px;margin-top:16px;font-size:16px;padding-left:16px;padding-right:16px;cursor:pointer;font-weight:500;text-align:center}.-walletlink-css-reset .-walletlink-extension-dialog-box-top-info-region{display:flex;flex-basis:50%;flex-direction:column;justify-content:center;background-color:#fafbfc}.-walletlink-css-reset .-walletlink-extension-dialog-box-top-description{display:flex;flex-direction:row;align-items:center;padding-top:14px;padding-bottom:14px;padding-left:24px;padding-right:32px}.-walletlink-css-reset .-walletlink-extension-dialog-box-top-description-icon-wrapper{display:block;position:relative;width:40px;height:40px;flex-shrink:0;flex-grow:0;border-radius:20px;background-color:#fff;box-shadow:0px 0px 8px rgba(0,0,0,.04),0px 16px 24px rgba(0,0,0,.06)}.-walletlink-css-reset .-walletlink-extension-dialog-box-top-description-icon-wrapper img{position:absolute;top:0;bottom:0;left:0;right:0;margin:auto}.-walletlink-css-reset .-walletlink-extension-dialog-box-top-description-text{margin-left:16px;flex-grow:1;font-size:13px;line-height:19px;color:#000;align-self:center}.-walletlink-css-reset .-walletlink-extension-dialog-box-bottom{display:flex;flex-direction:row;overflow:hidden;border-radius:8px;background-color:#fff;margin-top:8px}.-walletlink-css-reset .-walletlink-extension-dialog-box-bottom-description-region{display:flex;flex-direction:column;justify-content:center;padding:32px;flex-grow:1}.-walletlink-css-reset .-walletlink-extension-dialog-box-bottom-description{font-size:13px;line-height:19px;margin-top:12px;color:#aaa}.-walletlink-css-reset .-walletlink-extension-dialog-box-bottom-description a{font-size:inherit;line-height:inherit;color:#1652f0;cursor:pointer}.-walletlink-css-reset .-walletlink-extension-dialog-box-bottom-qr-region{position:relative;flex-shrink:0;display:flex;flex-direction:column;justify-content:center;padding-left:24px;padding-right:24px;padding-top:16px;padding-bottom:16px}.-walletlink-css-reset .-walletlink-extension-dialog-box-bottom-qr-wrapper{position:relative;display:block;padding:8px;border-radius:8px;box-shadow:0px 4px 12px rgba(0,0,0,.1)}.-walletlink-css-reset .-walletlink-extension-dialog-box-bottom-qr-wrapper img{display:block}.-walletlink-css-reset .-walletlink-extension-dialog-box-bottom-qr-connecting{position:absolute;top:0;bottom:0;left:0;right:0;display:flex;flex-direction:column;align-items:center;justify-content:center;background-color:rgba(255,255,255,.95)}.-walletlink-css-reset .-walletlink-extension-dialog-box-bottom-qr-connecting>p{font-size:12px;font-weight:bold;color:#000;margin-top:16px}.-walletlink-css-reset .-walletlink-extension-dialog-box-cancel{position:absolute;-webkit-appearance:none;display:flex;align-items:center;justify-content:center;top:16px;right:16px;width:24px;height:24px;border-radius:12px;background-color:#fafbfc;cursor:pointer}.-walletlink-css-reset .-walletlink-extension-dialog-box-cancel-x{position:relative;display:block;cursor:pointer}.-walletlink-css-reset .-walletlink-extension-dialog-box-cancel-x::before,.-walletlink-css-reset .-walletlink-extension-dialog-box-cancel-x::after{content:"";position:absolute;display:block;top:-1px;left:-7px;width:14px;height:1px;background-color:#000;transition:background-color .2s}.-walletlink-css-reset .-walletlink-extension-dialog-box-cancel-x::before{transform:rotate(45deg)}.-walletlink-css-reset .-walletlink-extension-dialog-box-cancel-x::after{transform:rotate(135deg)}.-walletlink-css-reset .-walletlink-extension-dialog-box-cancel:hover .-walletlink-link-dialog-box-cancel-x-a,.-walletlink-css-reset .-walletlink-extension-dialog-box-cancel:hover .-walletlink-link-dialog-box-cancel-x-b{background-color:#000}.-walletlink-css-reset .-walletlink-extension-dialog-container{display:block}.-walletlink-css-reset .-walletlink-extension-dialog-container-hidden{display:none}.-walletlink-css-reset .-walletlink-extension-dialog h2{display:block;text-align:left;font-size:22px;font-weight:600;line-height:28px;color:#000}'},77:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.TryExtensionLinkDialog=void 0;const i=r(n(6010)),o=n(6400),s=n(396),a=r(n(8440)),u=r(n(6023)),c=r(n(6075)),l=r(n(5776)),h=n(5603),f=n(8870),d=r(n(6695));e.TryExtensionLinkDialog=t=>{const[e,n]=(0,s.useState)(!t.isOpen),[r,a]=(0,s.useState)(!t.isOpen);return(0,s.useEffect)((()=>{const{isOpen:e}=t,r=[window.setTimeout((()=>{a(!e)}),10)];return e?n(!1):r.push(window.setTimeout((()=>{n(!0)}),360)),()=>{r.forEach(window.clearTimeout)}}),[t.isOpen]),(0,o.h)("div",{class:(0,i.default)("-walletlink-extension-dialog-container",e&&"-walletlink-extension-dialog-container-hidden")},(0,o.h)("style",null,d.default),(0,o.h)("div",{class:(0,i.default)("-walletlink-extension-dialog-backdrop",r&&"-walletlink-extension-dialog-backdrop-hidden")}),(0,o.h)("div",{class:"-walletlink-extension-dialog"},(0,o.h)("div",{class:(0,i.default)("-walletlink-extension-dialog-box",r&&"-walletlink-extension-dialog-box-hidden")},(0,o.h)(p,{onInstallClick:()=>{window.open("https://api.wallet.coinbase.com/rpc/v2/desktop/chrome","_blank")}}),t.connectDisabled?null:(0,o.h)(y,{darkMode:t.darkMode,version:t.version,sessionId:t.sessionId,sessionSecret:t.sessionSecret,walletLinkUrl:t.walletLinkUrl,isConnected:t.isConnected,isParentConnection:t.isParentConnection}),t.onCancel&&(0,o.h)(b,{onClick:t.onCancel}))))};const p=t=>(0,o.h)("div",{class:"-walletlink-extension-dialog-box-top"},(0,o.h)("div",{class:"-walletlink-extension-dialog-box-top-install-region"},(0,o.h)("h2",null,"Try the Coinbase Wallet extension"),(0,o.h)("button",{onClick:t.onInstallClick},"Install")),(0,o.h)("div",{class:"-walletlink-extension-dialog-box-top-info-region"},(0,o.h)(g,{icon:u.default,text:"Connect to crypto apps with one click"}),(0,o.h)(g,{icon:c.default,text:"Your private key is stored securely"}),(0,o.h)(g,{icon:a.default,text:"Works with Ethereum, Polygon, and more"}))),y=t=>{const e=window.encodeURIComponent(t.walletLinkUrl),n=t.isParentConnection?"parent-id":"id",r=`${t.walletLinkUrl}/#/link?${n}=${t.sessionId}&secret=${t.sessionSecret}&server=${e}&v=1`;return(0,o.h)("div",{class:"-walletlink-extension-dialog-box-bottom"},(0,o.h)("div",{class:"-walletlink-extension-dialog-box-bottom-description-region"},(0,o.h)("h2",null,"Or scan to connect"),(0,o.h)("body",{class:"-walletlink-extension-dialog-box-bottom-description"},"Open ",(0,o.h)("a",{href:"https://wallet.coinbase.com/"},"Coinbase Wallet")," on your mobile phone and scan")),(0,o.h)("div",{class:"-walletlink-extension-dialog-box-bottom-qr-region"},(0,o.h)("div",{class:"-walletlink-extension-dialog-box-bottom-qr-wrapper"},(0,o.h)(h.QRCode,{content:r,width:150,height:150,fgColor:"#000",bgColor:"transparent",image:{svg:l.default,width:34,height:34}})),(0,o.h)("input",{type:"hidden",value:r}),!t.isConnected&&(0,o.h)("div",{class:"-walletlink-extension-dialog-box-bottom-qr-connecting"},(0,o.h)(f.Spinner,{size:36,color:"#000"}),(0,o.h)("p",null,"Connecting..."))))},g=t=>(0,o.h)("div",{class:"-walletlink-extension-dialog-box-top-description"},(0,o.h)("div",{class:"-walletlink-extension-dialog-box-top-description-icon-wrapper"},(0,o.h)("img",{src:t.icon})),(0,o.h)("body",{class:"-walletlink-extension-dialog-box-top-description-text"},t.text)),b=t=>(0,o.h)("button",{class:"-walletlink-extension-dialog-box-cancel",onClick:t.onClick},(0,o.h)("div",{class:"-walletlink-extension-dialog-box-cancel-x"}))},5776:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default='\n\n\n\n\n\n\n'},8440:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTggMEMzLjU4IDAgMCAzLjU4IDAgOHMzLjU4IDggOCA4IDgtMy41OCA4LTgtMy41OC04LTgtOFptNS45MSA3aC0xLjk0Yy0uMS0xLjU3LS40Mi0zLS45MS00LjE1IDEuNDguODggMi41NSAyLjM4IDIuODUgNC4xNVpNOCAxNGMtLjQ1IDAtMS43Mi0xLjc3LTEuOTUtNWgzLjljLS4yMyAzLjIzLTEuNSA1LTEuOTUgNVpNNi4wNSA3QzYuMjggMy43NyA3LjU1IDIgOCAyYy40NSAwIDEuNzIgMS43NyAxLjk1IDVoLTMuOVpNNC45NCAyLjg1QzQuNDYgNCA0LjEzIDUuNDMgNC4wMyA3SDIuMDljLjMtMS43NyAxLjM3LTMuMjcgMi44NS00LjE1Wk0yLjA5IDloMS45NGMuMSAxLjU3LjQyIDMgLjkxIDQuMTVBNS45OTggNS45OTggMCAwIDEgMi4wOSA5Wm04Ljk3IDQuMTVjLjQ4LTEuMTUuODEtMi41OC45MS00LjE1aDEuOTRhNS45OTggNS45OTggMCAwIDEtMi44NSA0LjE1WiIgZmlsbD0iIzE2NTJGMCIvPjwvc3ZnPg=="},6023:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTciIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE1LjYzNSAyLjExN2EzLjg4OSAzLjg4OSAwIDAgMC01LjUyMSAwTDYuODkgNS4zMzVBMy44OTQgMy44OTQgMCAwIDAgNS44IDguNzM5Yy4wODMuNTA2LjI2OCAxLjAxMS41NTMgMS40NjYuMTUxLjI1My4zMzYuNDcyLjUzNy42OTFsLjYyMS42MjQgMS4xNDEtMS4xNDYtLjYyLS42MjRhMi4xMDUgMi4xMDUgMCAwIDEtLjQ4Ny0uNzQxIDIuMzQgMi4zNCAwIDAgMSAuNTAzLTIuNTFsMy4yMDYtMy4yMmEyLjI5MyAyLjI5MyAwIDAgMSAzLjIzOSAwYy44OS44OTQuODkgMi4zNDMgMCAzLjI1M2wtMS41MjcgMS41MzNjLjIzNC42NC4zMzUgMS4zMzEuMzAyIDIuMDA1bDIuMzgzLTIuMzkyYzEuNTEtMS41MzQgMS40OTMtNC4wMjgtLjAxNy01LjU2MVoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBkPSJNMTEuMjcxIDcuNzQ1YTMuMTMgMy4xMyAwIDAgMC0uNTU0LS42OWwtLjYyLS42MjQtMS4xNDIgMS4xNDYuNjIxLjYyM2MuMjE4LjIyLjM4Ni40ODkuNDg3Ljc1OC4zMzUuODI2LjE2NyAxLjgyLS41MDQgMi40OTRsLTMuMjA1IDMuMjE5YTIuMjkzIDIuMjkzIDAgMCAxLTMuMjQgMCAyLjMxNiAyLjMxNiAwIDAgMSAwLTMuMjUybDEuNTI4LTEuNTM0YTQuODE1IDQuODE1IDAgMCAxLS4yODUtMi4wMDVsLTIuMzgzIDIuMzkzYTMuOTI3IDMuOTI3IDAgMCAwIDAgNS41NDQgMy45MDkgMy45MDkgMCAwIDAgNS41MzggMGwzLjIwNS0zLjIxOWEzLjk1OCAzLjk1OCAwIDAgMCAxLjA5MS0zLjQwNCA0LjIxMSA0LjIxMSAwIDAgMC0uNTM3LTEuNDQ5WiIgZmlsbD0iIzE2NTJGMCIvPjwvc3ZnPg=="},6075:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEgN3Y5aDE0VjdIMVptNy41IDQuMzlWMTRoLTF2LTIuNjFjLS40NC0uMTktLjc1LS42My0uNzUtMS4xNGExLjI1IDEuMjUgMCAwIDEgMi41IDBjMCAuNTEtLjMxLjk1LS43NSAxLjE0Wk01LjY3IDZWNC4zM0M1LjY3IDMuMDUgNi43MSAyIDggMnMyLjMzIDEuMDUgMi4zMyAyLjMzVjZoMlY0LjMzQzEyLjMzIDEuOTQgMTAuMzkgMCA4IDBTMy42NyAxLjk0IDMuNjcgNC4zM1Y2aDJaIiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+"},9787:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ClientMessagePublishEvent=e.ClientMessageSetSessionConfig=e.ClientMessageGetSessionConfig=e.ClientMessageIsLinked=e.ClientMessageHostSession=void 0,e.ClientMessageHostSession=function(t){return Object.assign({type:"HostSession"},t)},e.ClientMessageIsLinked=function(t){return Object.assign({type:"IsLinked"},t)},e.ClientMessageGetSessionConfig=function(t){return Object.assign({type:"GetSessionConfig"},t)},e.ClientMessageSetSessionConfig=function(t){return Object.assign({type:"SetSessionConfig"},t)},e.ClientMessagePublishEvent=function(t){return Object.assign({type:"PublishEvent"},t)}},5251:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RxWebSocket=e.ConnectionState=void 0;const r=n(4143),i=n(1717);var o;!function(t){t[t.DISCONNECTED=0]="DISCONNECTED",t[t.CONNECTING=1]="CONNECTING",t[t.CONNECTED=2]="CONNECTED"}(o=e.ConnectionState||(e.ConnectionState={})),e.RxWebSocket=class{constructor(t,e=WebSocket){this.WebSocketClass=e,this.webSocket=null,this.connectionStateSubject=new r.BehaviorSubject(o.DISCONNECTED),this.incomingDataSubject=new r.Subject,this.url=t.replace(/^http/,"ws")}connect(){return this.webSocket?(0,r.throwError)(new Error("webSocket object is not null")):new r.Observable((t=>{let e;try{this.webSocket=e=new this.WebSocketClass(this.url)}catch(e){return void t.error(e)}this.connectionStateSubject.next(o.CONNECTING),e.onclose=e=>{this.clearWebSocket(),t.error(new Error(`websocket error ${e.code}: ${e.reason}`)),this.connectionStateSubject.next(o.DISCONNECTED)},e.onopen=e=>{t.next(),t.complete(),this.connectionStateSubject.next(o.CONNECTED)},e.onmessage=t=>{this.incomingDataSubject.next(t.data)}})).pipe((0,i.take)(1))}disconnect(){const{webSocket:t}=this;if(t){this.clearWebSocket(),this.connectionStateSubject.next(o.DISCONNECTED);try{t.close()}catch(t){}}}get connectionState$(){return this.connectionStateSubject.asObservable()}get incomingData$(){return this.incomingDataSubject.asObservable()}get incomingJSONData$(){return this.incomingData$.pipe((0,i.flatMap)((t=>{let e;try{e=JSON.parse(t)}catch(t){return(0,r.empty)()}return(0,r.of)(e)})))}sendData(t){const{webSocket:e}=this;if(!e)throw new Error("websocket is not connected");e.send(t)}clearWebSocket(){const{webSocket:t}=this;t&&(this.webSocket=null,t.onclose=null,t.onerror=null,t.onmessage=null,t.onopen=null)}}},4596:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isServerMessageFail=void 0,e.isServerMessageFail=function(t){return t&&"Fail"===t.type&&"number"==typeof t.id&&"string"==typeof t.sessionId&&"string"==typeof t.error}},7220:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WalletLinkAnalytics=void 0,e.WalletLinkAnalytics=class{sendEvent(t,e){}}},9018:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WalletLinkConnection=void 0;const r=n(4143),i=n(1717),o=n(1241),s=n(5190),a=n(9490),u=n(9787),c=n(5251),l=n(4596);e.WalletLinkConnection=class{constructor(t,e,n,u,l=WebSocket){this.sessionId=t,this.sessionKey=e,this.subscriptions=new r.Subscription,this.destroyed=!1,this.lastHeartbeatResponse=0,this.nextReqId=(0,a.IntNumber)(1),this.connectedSubject=new r.BehaviorSubject(!1),this.linkedSubject=new r.BehaviorSubject(!1),this.sessionConfigSubject=new r.ReplaySubject(1);const h=new c.RxWebSocket(n+"/rpc",l);this.ws=h,this.walletLinkAnalytics=u,this.subscriptions.add(h.connectionState$.pipe((0,i.tap)((e=>this.walletLinkAnalytics.sendEvent(o.EVENTS.CONNECTED_STATE_CHANGE,{state:e,sessionIdHash:s.Session.hash(t)}))),(0,i.skip)(1),(0,i.filter)((t=>t===c.ConnectionState.DISCONNECTED&&!this.destroyed)),(0,i.delay)(5e3),(0,i.filter)((t=>!this.destroyed)),(0,i.flatMap)((t=>h.connect())),(0,i.retry)()).subscribe()),this.subscriptions.add(h.connectionState$.pipe((0,i.skip)(2),(0,i.switchMap)((t=>(0,r.iif)((()=>t===c.ConnectionState.CONNECTED),this.authenticate().pipe((0,i.tap)((t=>this.sendIsLinked())),(0,i.tap)((t=>this.sendGetSessionConfig())),(0,i.map)((t=>!0))),(0,r.of)(!1)))),(0,i.distinctUntilChanged)(),(0,i.catchError)((t=>(0,r.of)(!1)))).subscribe((t=>this.connectedSubject.next(t)))),this.subscriptions.add(h.connectionState$.pipe((0,i.skip)(1),(0,i.switchMap)((t=>(0,r.iif)((()=>t===c.ConnectionState.CONNECTED),(0,r.timer)(0,1e4))))).subscribe((t=>0===t?this.updateLastHeartbeat():this.heartbeat()))),this.subscriptions.add(h.incomingData$.pipe((0,i.filter)((t=>"h"===t))).subscribe((t=>this.updateLastHeartbeat()))),this.subscriptions.add(h.incomingJSONData$.pipe((0,i.filter)((t=>["IsLinkedOK","Linked"].includes(t.type)))).subscribe((e=>{const n=e;this.walletLinkAnalytics.sendEvent(o.EVENTS.LINKED,{sessionIdHash:s.Session.hash(t),linked:n.linked,type:e.type,onlineGuests:n.onlineGuests}),this.linkedSubject.next(n.linked||n.onlineGuests>0)}))),this.subscriptions.add(h.incomingJSONData$.pipe((0,i.filter)((t=>["GetSessionConfigOK","SessionConfigUpdated"].includes(t.type)))).subscribe((e=>{const n=e;this.walletLinkAnalytics.sendEvent(o.EVENTS.SESSION_CONFIG_RECEIVED,{sessionIdHash:s.Session.hash(t),metadata_keys:n&&n.metadata?Object.keys(n.metadata):void 0}),this.sessionConfigSubject.next({webhookId:n.webhookId,webhookUrl:n.webhookUrl,metadata:n.metadata})})))}connect(){if(this.destroyed)throw new Error("instance is destroyed");this.walletLinkAnalytics.sendEvent(o.EVENTS.STARTED_CONNECTING,{sessionIdHash:s.Session.hash(this.sessionId)}),this.ws.connect().subscribe()}destroy(){this.subscriptions.unsubscribe(),this.ws.disconnect(),this.walletLinkAnalytics.sendEvent(o.EVENTS.DISCONNECTED,{sessionIdHash:s.Session.hash(this.sessionId)}),this.destroyed=!0}get isDestroyed(){return this.destroyed}get connected$(){return this.connectedSubject.asObservable()}get onceConnected$(){return this.connected$.pipe((0,i.filter)((t=>t)),(0,i.take)(1),(0,i.map)((()=>{})))}get linked$(){return this.linkedSubject.asObservable()}get onceLinked$(){return this.linked$.pipe((0,i.filter)((t=>t)),(0,i.take)(1),(0,i.map)((()=>{})))}get sessionConfig$(){return this.sessionConfigSubject.asObservable()}get incomingEvent$(){return this.ws.incomingJSONData$.pipe((0,i.filter)((t=>{if("Event"!==t.type)return!1;const e=t;return"string"==typeof e.sessionId&&"string"==typeof e.eventId&&"string"==typeof e.event&&"string"==typeof e.data})),(0,i.map)((t=>t)))}setSessionMetadata(t,e){const n=(0,u.ClientMessageSetSessionConfig)({id:(0,a.IntNumber)(this.nextReqId++),sessionId:this.sessionId,metadata:{[t]:e}});return this.onceConnected$.pipe((0,i.flatMap)((t=>this.makeRequest(n))),(0,i.map)((t=>{if((0,l.isServerMessageFail)(t))throw new Error(t.error||"failed to set session metadata")})))}publishEvent(t,e,n=!1){const r=(0,u.ClientMessagePublishEvent)({id:(0,a.IntNumber)(this.nextReqId++),sessionId:this.sessionId,event:t,data:e,callWebhook:n});return this.onceLinked$.pipe((0,i.flatMap)((t=>this.makeRequest(r))),(0,i.map)((t=>{if((0,l.isServerMessageFail)(t))throw new Error(t.error||"failed to publish event");return t.eventId})))}sendData(t){this.ws.sendData(JSON.stringify(t))}updateLastHeartbeat(){this.lastHeartbeatResponse=Date.now()}heartbeat(){if(Date.now()-this.lastHeartbeatResponse>2e4)this.ws.disconnect();else try{this.ws.sendData("h")}catch(t){}}makeRequest(t,e=6e4){const n=t.id;try{this.sendData(t)}catch(t){return(0,r.throwError)(t)}return this.ws.incomingJSONData$.pipe((0,i.timeoutWith)(e,(0,r.throwError)(new Error(`request ${n} timed out`))),(0,i.filter)((t=>t.id===n)),(0,i.take)(1))}authenticate(){const t=(0,u.ClientMessageHostSession)({id:(0,a.IntNumber)(this.nextReqId++),sessionId:this.sessionId,sessionKey:this.sessionKey});return this.makeRequest(t).pipe((0,i.map)((t=>{if((0,l.isServerMessageFail)(t))throw new Error(t.error||"failed to authentcate")})))}sendIsLinked(){const t=(0,u.ClientMessageIsLinked)({id:(0,a.IntNumber)(this.nextReqId++),sessionId:this.sessionId});this.sendData(t)}sendGetSessionConfig(){const t=(0,u.ClientMessageGetSessionConfig)({id:(0,a.IntNumber)(this.nextReqId++),sessionId:this.sessionId});this.sendData(t)}}},983:(t,e,n)=>{"use strict";const r=n(3936),i=n(8027);n(3936),n(8027);i.WalletLink,"undefined"!=typeof window&&(window.WalletLink=i.WalletLink,window.WalletLinkProvider=r.WalletLinkProvider)},427:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WalletLinkAnalyticsAbstract=void 0,e.WalletLinkAnalyticsAbstract=class{}},3329:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EVENTS=void 0,e.EVENTS={REQUEST_CHILD_ETHEREUM_ACCOUNTS_START:"walletlink_sdk.request_child_ethereum_accounts.start",REQUEST_CHILD_ETHEREUM_ACCOUNTS_RESPONSE:"walletlink_sdk.request_child_ethereum_accounts.response",STARTED_CONNECTING:"walletlink_sdk.started.connecting",CONNECTED_STATE_CHANGE:"walletlink_sdk.connected",DISCONNECTED:"walletlink_sdk.disconnected",METADATA_DESTROYED:"walletlink_sdk_metadata_destroyed",LINKED:"walletlink_sdk.linked",FAILURE:"walletlink_sdk.generic_failure",SESSION_CONFIG_RECEIVED:"walletlink_sdk.session_config_event_received",ETH_ACCOUNTS_STATE:"walletlink_sdk.eth_accounts_state",SESSION_STATE_CHANGE:"walletlink_sdk.session_state_change",UNLINKED_ERROR_STATE:"walletlink_sdk.unlinked_error_state",SKIPPED_CLEARING_SESSION:"walletlink_sdk.skipped_clearing_session",GENERAL_ERROR:"walletlink_sdk.general_error",WEB3_REQUEST:"walletlink_sdk.web3.request",WEB3_RESPONSE:"walletlink_sdk.web3.response"}},1241:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),i(n(3329),e),i(n(427),e)},7046:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScopedLocalStorage=void 0,e.ScopedLocalStorage=class{constructor(t){this.scope=t}setItem(t,e){localStorage.setItem(this.scopedKey(t),e)}getItem(t){return localStorage.getItem(this.scopedKey(t))}removeItem(t){localStorage.removeItem(this.scopedKey(t))}clear(){const t=this.scopedKey(""),e=[];for(let n=0;nlocalStorage.removeItem(t)))}scopedKey(t){return`${this.scope}:${t}`}}},3722:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default='@namespace svg "http://www.w3.org/2000/svg";.-walletlink-css-reset,.-walletlink-css-reset *{animation:none;animation-delay:0;animation-direction:normal;animation-duration:0;animation-fill-mode:none;animation-iteration-count:1;animation-name:none;animation-play-state:running;animation-timing-function:ease;backface-visibility:visible;background:0;background-attachment:scroll;background-clip:border-box;background-color:transparent;background-image:none;background-origin:padding-box;background-position:0 0;background-position-x:0;background-position-y:0;background-repeat:repeat;background-size:auto auto;border:0;border-style:none;border-width:medium;border-color:inherit;border-bottom:0;border-bottom-color:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-style:none;border-bottom-width:medium;border-collapse:separate;border-image:none;border-left:0;border-left-color:inherit;border-left-style:none;border-left-width:medium;border-radius:0;border-right:0;border-right-color:inherit;border-right-style:none;border-right-width:medium;border-spacing:0;border-top:0;border-top-color:inherit;border-top-left-radius:0;border-top-right-radius:0;border-top-style:none;border-top-width:medium;bottom:auto;box-shadow:none;box-sizing:border-box;caption-side:top;clear:none;clip:auto;color:inherit;columns:auto;column-count:auto;column-fill:balance;column-gap:normal;column-rule:medium none currentColor;column-rule-color:currentColor;column-rule-style:none;column-rule-width:none;column-span:1;column-width:auto;content:normal;counter-increment:none;counter-reset:none;cursor:auto;direction:ltr;display:block;empty-cells:show;float:none;font:normal;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;height:auto;hyphens:none;left:auto;letter-spacing:normal;line-height:normal;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;margin:0;margin-bottom:0;margin-left:0;margin-right:0;margin-top:0;max-height:none;max-width:none;min-height:0;min-width:0;opacity:1;orphans:0;outline:0;outline-color:invert;outline-style:none;outline-width:medium;overflow:visible;overflow-x:visible;overflow-y:visible;padding:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;page-break-after:auto;page-break-before:auto;page-break-inside:auto;perspective:none;perspective-origin:50% 50%;pointer-events:auto;position:static;quotes:"\\201C" "\\201D" "\\2018" "\\2019";right:auto;tab-size:8;table-layout:auto;text-align:inherit;text-align-last:auto;text-decoration:none;text-decoration-color:inherit;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-shadow:none;text-transform:none;top:auto;transform:none;transform-style:flat;transition:none;transition-delay:0s;transition-duration:0s;transition-property:none;transition-timing-function:ease;unicode-bidi:normal;vertical-align:baseline;visibility:visible;white-space:normal;widows:0;width:auto;word-spacing:normal;z-index:auto}.-walletlink-css-reset *{box-sizing:border-box;display:initial;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;line-height:1}.-walletlink-css-reset [class*=container]{margin:0;padding:0}.-walletlink-css-reset style{display:none}'},8944:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.injectCssReset=void 0;const i=r(n(3722));e.injectCssReset=function(){const t=document.createElement("style");t.type="text/css",t.appendChild(document.createTextNode(i.default)),document.documentElement.appendChild(t)}},7830:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.filterFromParam=e.FilterPolyfill=void 0;const r=n(9490),i=n(1033),o={jsonrpc:"2.0",id:0};function s(t){return{fromBlock:u(t.fromBlock),toBlock:u(t.toBlock),addresses:void 0===t.address?null:Array.isArray(t.address)?t.address:[t.address],topics:t.topics||[]}}function a(t){const e={fromBlock:c(t.fromBlock),toBlock:c(t.toBlock),topics:t.topics};return null!==t.addresses&&(e.address=t.addresses),e}function u(t){if(void 0===t||"latest"===t||"pending"===t)return"latest";if("earliest"===t)return(0,r.IntNumber)(0);if((0,i.isHexString)(t))return(0,i.intNumberFromHexString)(t);throw new Error(`Invalid block option: ${String(t)}`)}function c(t){return"latest"===t?t:(0,i.hexStringFromIntNumber)(t)}function l(){return Object.assign(Object.assign({},o),{error:{code:-32e3,message:"filter not found"}})}function h(){return Object.assign(Object.assign({},o),{result:[]})}e.FilterPolyfill=class{constructor(t){this.logFilters=new Map,this.blockFilters=new Set,this.pendingTransactionFilters=new Set,this.cursors=new Map,this.timeouts=new Map,this.nextFilterId=(0,r.IntNumber)(1),this.provider=t}async newFilter(t){const e=s(t),n=this.makeFilterId(),r=await this.setInitialCursorPosition(n,e.fromBlock);return console.log(`Installing new log filter(${n}):`,e,"initial cursor position:",r),this.logFilters.set(n,e),this.setFilterTimeout(n),(0,i.hexStringFromIntNumber)(n)}async newBlockFilter(){const t=this.makeFilterId(),e=await this.setInitialCursorPosition(t,"latest");return console.log(`Installing new block filter (${t}) with initial cursor position:`,e),this.blockFilters.add(t),this.setFilterTimeout(t),(0,i.hexStringFromIntNumber)(t)}async newPendingTransactionFilter(){const t=this.makeFilterId(),e=await this.setInitialCursorPosition(t,"latest");return console.log(`Installing new block filter (${t}) with initial cursor position:`,e),this.pendingTransactionFilters.add(t),this.setFilterTimeout(t),(0,i.hexStringFromIntNumber)(t)}uninstallFilter(t){const e=(0,i.intNumberFromHexString)(t);return console.log(`Uninstalling filter (${e})`),this.deleteFilter(e),!0}getFilterChanges(t){const e=(0,i.intNumberFromHexString)(t);return this.timeouts.has(e)&&this.setFilterTimeout(e),this.logFilters.has(e)?this.getLogFilterChanges(e):this.blockFilters.has(e)?this.getBlockFilterChanges(e):this.pendingTransactionFilters.has(e)?this.getPendingTransactionFilterChanges(e):Promise.resolve(l())}async getFilterLogs(t){const e=(0,i.intNumberFromHexString)(t),n=this.logFilters.get(e);return n?this.sendAsyncPromise(Object.assign(Object.assign({},o),{method:"eth_getLogs",params:[a(n)]})):l()}makeFilterId(){return(0,r.IntNumber)(++this.nextFilterId)}sendAsyncPromise(t){return new Promise(((e,n)=>{this.provider.sendAsync(t,((t,r)=>t?n(t):Array.isArray(r)||null==r?n(new Error(`unexpected response received: ${JSON.stringify(r)}`)):void e(r)))}))}deleteFilter(t){console.log(`Deleting filter (${t})`),this.logFilters.delete(t),this.blockFilters.delete(t),this.pendingTransactionFilters.delete(t),this.cursors.delete(t),this.timeouts.delete(t)}async getLogFilterChanges(t){const e=this.logFilters.get(t),n=this.cursors.get(t);if(!n||!e)return l();const s=await this.getCurrentBlockHeight(),u="latest"===e.toBlock?s:e.toBlock;if(n>s)return h();if(n>e.toBlock)return h();console.log(`Fetching logs from ${n} to ${u} for filter ${t}`);const c=await this.sendAsyncPromise(Object.assign(Object.assign({},o),{method:"eth_getLogs",params:[a(Object.assign(Object.assign({},e),{fromBlock:n,toBlock:u}))]}));if(Array.isArray(c.result)){const e=c.result.map((t=>(0,i.intNumberFromHexString)(t.blockNumber||"0x0"))),o=Math.max(...e);if(o&&o>n){const e=(0,r.IntNumber)(o+1);console.log(`Moving cursor position for filter (${t}) from ${n} to ${e}`),this.cursors.set(t,e)}}return c}async getBlockFilterChanges(t){const e=this.cursors.get(t);if(!e)return l();const n=await this.getCurrentBlockHeight();if(e>n)return h();console.log(`Fetching blocks from ${e} to ${n} for filter (${t})`);const s=(await Promise.all((0,i.range)(e,n+1).map((t=>this.getBlockHashByNumber((0,r.IntNumber)(t)))))).filter((t=>!!t)),a=(0,r.IntNumber)(e+s.length);return console.log(`Moving cursor position for filter (${t}) from ${e} to ${a}`),this.cursors.set(t,a),Object.assign(Object.assign({},o),{result:s})}async getPendingTransactionFilterChanges(t){return Promise.resolve(h())}async setInitialCursorPosition(t,e){const n=await this.getCurrentBlockHeight(),r="number"==typeof e&&e>n?e:n;return this.cursors.set(t,r),r}setFilterTimeout(t){const e=this.timeouts.get(t);e&&window.clearTimeout(e);const n=window.setTimeout((()=>{console.log(`Filter (${t}) timed out`),this.deleteFilter(t)}),3e5);this.timeouts.set(t,n)}async getCurrentBlockHeight(){const{result:t}=await this.sendAsyncPromise(Object.assign(Object.assign({},o),{method:"eth_blockNumber",params:[]}));return(0,i.intNumberFromHexString)((0,i.ensureHexString)(t))}async getBlockHashByNumber(t){const e=await this.sendAsyncPromise(Object.assign(Object.assign({},o),{method:"eth_getBlockByNumber",params:[(0,i.hexStringFromIntNumber)(t),!1]}));return e.result&&"string"==typeof e.result.hash?(0,i.ensureHexString)(e.result.hash):null}},e.filterFromParam=s},6676:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.JSONRPCMethod=void 0,(n=e.JSONRPCMethod||(e.JSONRPCMethod={})).eth_accounts="eth_accounts",n.eth_coinbase="eth_coinbase",n.net_version="net_version",n.eth_chainId="eth_chainId",n.eth_uninstallFilter="eth_uninstallFilter",n.eth_requestAccounts="eth_requestAccounts",n.eth_sign="eth_sign",n.eth_ecRecover="eth_ecRecover",n.personal_sign="personal_sign",n.personal_ecRecover="personal_ecRecover",n.eth_signTransaction="eth_signTransaction",n.eth_sendRawTransaction="eth_sendRawTransaction",n.eth_sendTransaction="eth_sendTransaction",n.eth_signTypedData_v1="eth_signTypedData_v1",n.eth_signTypedData_v2="eth_signTypedData_v2",n.eth_signTypedData_v3="eth_signTypedData_v3",n.eth_signTypedData_v4="eth_signTypedData_v4",n.eth_signTypedData="eth_signTypedData",n.walletlink_arbitrary="walletlink_arbitrary",n.wallet_addEthereumChain="wallet_addEthereumChain",n.wallet_switchEthereumChain="wallet_switchEthereumChain",n.eth_subscribe="eth_subscribe",n.eth_unsubscribe="eth_unsubscribe",n.eth_newFilter="eth_newFilter",n.eth_newBlockFilter="eth_newBlockFilter",n.eth_newPendingTransactionFilter="eth_newPendingTransactionFilter",n.eth_getFilterChanges="eth_getFilterChanges",n.eth_getFilterLogs="eth_getFilterLogs"},5981:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SubscriptionManager=void 0;const r=n(5012),i=n(8961),o=()=>{};e.SubscriptionManager=class{constructor(t){const e=new r({provider:t,pollingInterval:15e3,setSkipCacheFlag:!0}),{events:n,middleware:o}=i({blockTracker:e,provider:t});this.events=n,this.subscriptionMiddleware=o}async handleRequest(t){const e={};return await this.subscriptionMiddleware(t,e,o,o),e}destroy(){this.subscriptionMiddleware.destroy()}}},3936:function(t,e,n){"use strict";var r=n(8764).Buffer,i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.WalletLinkProvider=void 0;const o=i(n(9394)),s=i(n(3550)),a=n(9826),u=n(7220),c=n(8016),l=n(1241),h=n(5190),f=n(4130),d=n(1033),p=i(n(9498)),y=n(7830),g=n(6676),b=n(5981),m="DefaultChainId",v="DefaultJsonRpcUrl",w="HasChainBeenSwitched",_="HasChainOverriddenFromRelay";class E extends o.default{constructor(t){var e;super(),this._filterPolyfill=new y.FilterPolyfill(this),this._subscriptionManager=new b.SubscriptionManager(this),this._relay=null,this._addresses=[],this.hasMadeFirstChainChangedEmission=!1,this._send=this.send.bind(this),this._sendAsync=this.sendAsync.bind(this),this.setProviderInfo=this.setProviderInfo.bind(this),this.updateProviderInfo=this.updateProviderInfo.bind(this),this.getChainId=this.getChainId.bind(this),this.setAppInfo=this.setAppInfo.bind(this),this.enable=this.enable.bind(this),this.close=this.close.bind(this),this.send=this.send.bind(this),this.sendAsync=this.sendAsync.bind(this),this.request=this.request.bind(this),this._setAddresses=this._setAddresses.bind(this),this.scanQRCode=this.scanQRCode.bind(this),this.genericRequest=this.genericRequest.bind(this),this._jsonRpcUrlFromOpts=t.jsonRpcUrl,this._overrideIsMetaMask=t.overrideIsMetaMask,this._relayProvider=t.relayProvider,this._storage=t.storage,this._relayEventManager=t.relayEventManager,this._walletLinkAnalytics=t.walletLinkAnalytics?t.walletLinkAnalytics:new u.WalletLinkAnalytics,this.isCoinbaseWallet=null===(e=t.overrideIsCoinbaseWallet)||void 0===e||e;const n=this.getChainId(),r=(0,d.prepend0x)(n.toString(16));this.emit("connect",{chainIdStr:r});const i=this._storage.getItem(f.LOCAL_STORAGE_ADDRESSES_KEY);if(i){const t=i.split(" ");""!==t[0]&&(this._addresses=t,this.emit("accountsChanged",t))}this._subscriptionManager.events.on("notification",(t=>{this.emit("message",{type:t.method,data:t.params})})),this._addresses.length>0&&this.initializeRelay(),window.addEventListener("message",(t=>{var e;if("walletLinkMessage"===t.data.type&&"defaultChainChanged"===t.data.data.action){const n=t.data.data.chainId,r=null!==(e=t.data.data.jsonRpcUrl)&&void 0!==e?e:this.jsonRpcUrl;this.updateProviderInfo(r,Number(n),!0)}}))}get selectedAddress(){return this._addresses[0]||void 0}get networkVersion(){return this.getChainId().toString(10)}get chainId(){return(0,d.prepend0x)(this.getChainId().toString(16))}get isWalletLink(){return!0}get isMetaMask(){return this._overrideIsMetaMask}get host(){return this.jsonRpcUrl}get connected(){return!0}isConnected(){return!0}get jsonRpcUrl(){var t;return null!==(t=this._storage.getItem(v))&&void 0!==t?t:this._jsonRpcUrlFromOpts}set jsonRpcUrl(t){this._storage.setItem(v,t)}get isChainOverridden(){return"true"===this._storage.getItem(_)}set isChainOverridden(t){this._storage.setItem(_,t.toString())}setProviderInfo(t,e){this.isChainOverridden||this.updateProviderInfo(t,this.getChainId(),!1)}updateProviderInfo(t,e,n){if("true"===this._storage.getItem(w)&&n)return;n&&(this.isChainOverridden=!0),this.jsonRpcUrl=t;const r=this.getChainId();this._storage.setItem(m,e.toString(10)),(0,d.ensureIntNumber)(e)===r&&this.hasMadeFirstChainChangedEmission||(this.emit("chainChanged",this.getChainId()),this.hasMadeFirstChainChangedEmission=!0)}async addEthereumChain(t,e,n,r,i,o){var s,a;const u=await this.initializeRelay(),c=await u.addEthereumChain(t.toString(),e,i,n,r,o).promise;return"boolean"==typeof c.result?(!0===c.result&&(this._storage.setItem(w,"true"),this.updateProviderInfo(e[0],t,!1)),!0===c.result):(!0===(null===(s=c.result)||void 0===s?void 0:s.isApproved)&&(this._storage.setItem(w,"true"),this.updateProviderInfo(e[0],t,!1)),!0===(null===(a=c.result)||void 0===a?void 0:a.isApproved))}async switchEthereumChain(t){var e;if((0,d.ensureIntNumber)(t)===this.getChainId())return;const n=await this.initializeRelay(),r=await n.switchEthereumChain(t.toString(10)).promise;if(r.errorCode)throw a.ethErrors.provider.custom({code:r.errorCode});if("boolean"!=typeof r.result){const e=r.result;e.isApproved&&e.rpcUrl.length>0&&(this._storage.setItem(w,"true"),this.updateProviderInfo(e.rpcUrl,t,!1))}else if(r.result){this._storage.setItem(w,"true");const n=c.EthereumChain.fromChainId(BigInt(t)),r=null!==(e=c.EthereumChain.rpcUrl(n))&&void 0!==e?e:"";this.updateProviderInfo(r,t,!1)}}setAppInfo(t,e){this.initializeRelay().then((n=>n.setAppInfo(t,e)))}async enable(){return this._walletLinkAnalytics.sendEvent(l.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::enable",addresses_length:this._addresses.length,sessionIdHash:this._relay?h.Session.hash(this._relay.session.id):null}),this._addresses.length>0?this._addresses:await this._send(g.JSONRPCMethod.eth_requestAccounts)}close(){this.initializeRelay().then((t=>t.resetAndReload()))}send(t,e){if("string"==typeof t){const n={jsonrpc:"2.0",id:0,method:t,params:Array.isArray(e)?e:void 0!==e?[e]:[]};return this._sendRequestAsync(n).then((t=>t.result))}if("function"==typeof e){const n=t,r=e;return this._sendAsync(n,r)}if(Array.isArray(t))return t.map((t=>this._sendRequest(t)));const n=t;return this._sendRequest(n)}sendAsync(t,e){if("function"!=typeof e)throw new Error("callback is required");if(Array.isArray(t)){const n=e;return void this._sendMultipleRequestsAsync(t).then((t=>n(null,t))).catch((t=>n(t,null)))}const n=e;this._sendRequestAsync(t).then((t=>n(null,t))).catch((t=>n(t,null)))}async request(t){if(!t||"object"!=typeof t||Array.isArray(t))throw a.ethErrors.rpc.invalidRequest({message:"Expected a single, non-array, object argument.",data:t});const{method:e,params:n}=t;if("string"!=typeof e||0===e.length)throw a.ethErrors.rpc.invalidRequest({message:"'args.method' must be a non-empty string.",data:t});if(void 0!==n&&!Array.isArray(n)&&("object"!=typeof n||null===n))throw a.ethErrors.rpc.invalidRequest({message:"'args.params' must be an object or array if provided.",data:t});const r=void 0===n?[]:n,i=this._relayEventManager.makeRequestId();return(await this._sendRequestAsync({method:e,params:r,jsonrpc:"2.0",id:i})).result}async scanQRCode(t){const e=await this.initializeRelay(),n=await e.scanQRCode((0,d.ensureRegExpString)(t)).promise;if("string"!=typeof n.result)throw new Error("result was not a string");return n.result}async genericRequest(t,e){const n=await this.initializeRelay(),r=await n.genericRequest(t,e).promise;if("string"!=typeof r.result)throw new Error("result was not a string");return r.result}supportsSubscriptions(){return!1}subscribe(){throw new Error("Subscriptions are not supported")}unsubscribe(){throw new Error("Subscriptions are not supported")}disconnect(){return!0}_sendRequest(t){const e={jsonrpc:"2.0",id:t.id},{method:n}=t;if(e.result=this._handleSynchronousMethods(t),void 0===e.result)throw new Error(`WalletLink does not support calling ${n} synchronously without a callback. Please provide a callback parameter to call ${n} asynchronously.`);return e}_setAddresses(t){if(!Array.isArray(t))throw new Error("addresses is not an array");const e=t.map((t=>(0,d.ensureAddressString)(t)));JSON.stringify(e)!==JSON.stringify(this._addresses)&&(this._addresses=e,this.emit("accountsChanged",this._addresses),this._storage.setItem(f.LOCAL_STORAGE_ADDRESSES_KEY,e.join(" ")),window.dispatchEvent(new CustomEvent("walletlink:addresses",{detail:this._addresses})))}_sendRequestAsync(t){return new Promise(((e,n)=>{try{const r=this._handleSynchronousMethods(t);if(void 0!==r)return e({jsonrpc:"2.0",id:t.id,result:r});const i=this._handleAsynchronousFilterMethods(t);if(void 0!==i)return void i.then((n=>e(Object.assign(Object.assign({},n),{id:t.id})))).catch((t=>n(t)));const o=this._handleSubscriptionMethods(t);if(void 0!==o)return void o.then((n=>e({jsonrpc:"2.0",id:t.id,result:n.result}))).catch((t=>n(t)))}catch(t){return n(t)}this._handleAsynchronousMethods(t).then((n=>n&&e(Object.assign(Object.assign({},n),{id:t.id})))).catch((t=>n(t)))}))}_sendMultipleRequestsAsync(t){return Promise.all(t.map((t=>this._sendRequestAsync(t))))}_handleSynchronousMethods(t){const{method:e}=t,n=t.params||[];switch(e){case g.JSONRPCMethod.eth_accounts:return this._eth_accounts();case g.JSONRPCMethod.eth_coinbase:return this._eth_coinbase();case g.JSONRPCMethod.eth_uninstallFilter:return this._eth_uninstallFilter(n);case g.JSONRPCMethod.net_version:return this._net_version();case g.JSONRPCMethod.eth_chainId:return this._eth_chainId();default:return}}async _handleAsynchronousMethods(t){const{method:e}=t,n=t.params||[];switch(e){case g.JSONRPCMethod.eth_requestAccounts:return this._eth_requestAccounts();case g.JSONRPCMethod.eth_sign:return this._eth_sign(n);case g.JSONRPCMethod.eth_ecRecover:return this._eth_ecRecover(n);case g.JSONRPCMethod.personal_sign:return this._personal_sign(n);case g.JSONRPCMethod.personal_ecRecover:return this._personal_ecRecover(n);case g.JSONRPCMethod.eth_signTransaction:return this._eth_signTransaction(n);case g.JSONRPCMethod.eth_sendRawTransaction:return this._eth_sendRawTransaction(n);case g.JSONRPCMethod.eth_sendTransaction:return this._eth_sendTransaction(n);case g.JSONRPCMethod.eth_signTypedData_v1:return this._eth_signTypedData_v1(n);case g.JSONRPCMethod.eth_signTypedData_v2:return this._throwUnsupportedMethodError();case g.JSONRPCMethod.eth_signTypedData_v3:return this._eth_signTypedData_v3(n);case g.JSONRPCMethod.eth_signTypedData_v4:case g.JSONRPCMethod.eth_signTypedData:return this._eth_signTypedData_v4(n);case g.JSONRPCMethod.walletlink_arbitrary:return this._walletlink_arbitrary(n);case g.JSONRPCMethod.wallet_addEthereumChain:return this._wallet_addEthereumChain(n);case g.JSONRPCMethod.wallet_switchEthereumChain:return this._wallet_switchEthereumChain(n)}return(await this.initializeRelay()).makeEthereumJSONRPCRequest(t,this.jsonRpcUrl)}_handleAsynchronousFilterMethods(t){const{method:e}=t,n=t.params||[];switch(e){case g.JSONRPCMethod.eth_newFilter:return this._eth_newFilter(n);case g.JSONRPCMethod.eth_newBlockFilter:return this._eth_newBlockFilter();case g.JSONRPCMethod.eth_newPendingTransactionFilter:return this._eth_newPendingTransactionFilter();case g.JSONRPCMethod.eth_getFilterChanges:return this._eth_getFilterChanges(n);case g.JSONRPCMethod.eth_getFilterLogs:return this._eth_getFilterLogs(n)}}_handleSubscriptionMethods(t){switch(t.method){case g.JSONRPCMethod.eth_subscribe:case g.JSONRPCMethod.eth_unsubscribe:return this._subscriptionManager.handleRequest(t)}}_isKnownAddress(t){try{const e=(0,d.ensureAddressString)(t);return this._addresses.includes(e)}catch(t){}return!1}_ensureKnownAddress(t){if(!this._isKnownAddress(t))throw new Error("Unknown Ethereum address")}_prepareTransactionParams(t){const e=t.from?(0,d.ensureAddressString)(t.from):this.selectedAddress;if(!e)throw new Error("Ethereum address is unavailable");return this._ensureKnownAddress(e),{fromAddress:e,toAddress:t.to?(0,d.ensureAddressString)(t.to):null,weiValue:null!=t.value?(0,d.ensureBN)(t.value):new s.default(0),data:t.data?(0,d.ensureBuffer)(t.data):r.alloc(0),nonce:null!=t.nonce?(0,d.ensureIntNumber)(t.nonce):null,gasPriceInWei:null!=t.gasPrice?(0,d.ensureBN)(t.gasPrice):null,maxFeePerGas:null!=t.maxFeePerGas?(0,d.ensureBN)(t.maxFeePerGas):null,maxPriorityFeePerGas:null!=t.maxPriorityFeePerGas?(0,d.ensureBN)(t.maxPriorityFeePerGas):null,gasLimit:null!=t.gas?(0,d.ensureBN)(t.gas):null,chainId:this.getChainId()}}_requireAuthorization(){if(0===this._addresses.length)throw a.ethErrors.provider.unauthorized({})}_throwUnsupportedMethodError(){throw a.ethErrors.provider.unsupportedMethod({})}async _signEthereumMessage(t,e,n,r){this._ensureKnownAddress(e);try{const i=await this.initializeRelay();return{jsonrpc:"2.0",id:0,result:(await i.signEthereumMessage(t,e,n,r).promise).result}}catch(t){if("string"==typeof t.message&&t.message.match(/(denied|rejected)/i))throw a.ethErrors.provider.userRejectedRequest("User denied message signature");throw t}}async _ethereumAddressFromSignedMessage(t,e,n){const r=await this.initializeRelay();return{jsonrpc:"2.0",id:0,result:(await r.ethereumAddressFromSignedMessage(t,e,n).promise).result}}_eth_accounts(){return this._addresses}_eth_coinbase(){return this.selectedAddress||null}_net_version(){return this.getChainId().toString(10)}_eth_chainId(){return(0,d.hexStringFromIntNumber)(this.getChainId())}getChainId(){const t=this._storage.getItem(m)||"1",e=parseInt(t,10);return(0,d.ensureIntNumber)(e)}async _eth_requestAccounts(){if(this._walletLinkAnalytics.sendEvent(l.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::_eth_requestAccounts",addresses_length:this._addresses.length,sessionIdHash:this._relay?h.Session.hash(this._relay.session.id):null}),this._addresses.length>0)return Promise.resolve({jsonrpc:"2.0",id:0,result:this._addresses});let t;try{const e=await this.initializeRelay();t=await e.requestEthereumAccounts().promise}catch(t){if("string"==typeof t.message&&t.message.match(/(denied|rejected)/i))throw a.ethErrors.provider.userRejectedRequest("User denied account authorization");throw t}if(!t.result)throw new Error("accounts received is empty");return this._setAddresses(t.result),{jsonrpc:"2.0",id:0,result:this._addresses}}_eth_sign(t){this._requireAuthorization();const e=(0,d.ensureAddressString)(t[0]),n=(0,d.ensureBuffer)(t[1]);return this._signEthereumMessage(n,e,!1)}_eth_ecRecover(t){const e=(0,d.ensureBuffer)(t[0]),n=(0,d.ensureBuffer)(t[1]);return this._ethereumAddressFromSignedMessage(e,n,!1)}_personal_sign(t){this._requireAuthorization();const e=(0,d.ensureBuffer)(t[0]),n=(0,d.ensureAddressString)(t[1]);return this._signEthereumMessage(e,n,!0)}_personal_ecRecover(t){const e=(0,d.ensureBuffer)(t[0]),n=(0,d.ensureBuffer)(t[1]);return this._ethereumAddressFromSignedMessage(e,n,!0)}async _eth_signTransaction(t){this._requireAuthorization();const e=this._prepareTransactionParams(t[0]||{});try{const t=await this.initializeRelay();return{jsonrpc:"2.0",id:0,result:(await t.signEthereumTransaction(e).promise).result}}catch(t){if("string"==typeof t.message&&t.message.match(/(denied|rejected)/i))throw a.ethErrors.provider.userRejectedRequest("User denied transaction signature");throw t}}async _eth_sendRawTransaction(t){const e=(0,d.ensureBuffer)(t[0]),n=await this.initializeRelay();return{jsonrpc:"2.0",id:0,result:(await n.submitEthereumTransaction(e,this.getChainId()).promise).result}}async _eth_sendTransaction(t){this._requireAuthorization();const e=this._prepareTransactionParams(t[0]||{});try{const t=await this.initializeRelay();return{jsonrpc:"2.0",id:0,result:(await t.signAndSubmitEthereumTransaction(e).promise).result}}catch(t){if("string"==typeof t.message&&t.message.match(/(denied|rejected)/i))throw a.ethErrors.provider.userRejectedRequest("User denied transaction signature");throw t}}async _eth_signTypedData_v1(t){this._requireAuthorization();const e=(0,d.ensureParsedJSONObject)(t[0]),n=(0,d.ensureAddressString)(t[1]);this._ensureKnownAddress(n);const r=p.default.hashForSignTypedDataLegacy({data:e}),i=JSON.stringify(e,null,2);return this._signEthereumMessage(r,n,!1,i)}async _eth_signTypedData_v3(t){this._requireAuthorization();const e=(0,d.ensureAddressString)(t[0]),n=(0,d.ensureParsedJSONObject)(t[1]);this._ensureKnownAddress(e);const r=p.default.hashForSignTypedData_v3({data:n}),i=JSON.stringify(n,null,2);return this._signEthereumMessage(r,e,!1,i)}async _eth_signTypedData_v4(t){this._requireAuthorization();const e=(0,d.ensureAddressString)(t[0]),n=(0,d.ensureParsedJSONObject)(t[1]);this._ensureKnownAddress(e);const r=p.default.hashForSignTypedData_v4({data:n}),i=JSON.stringify(n,null,2);return this._signEthereumMessage(r,e,!1,i)}async _walletlink_arbitrary(t){const e=t[0],n=t[1];if("string"!=typeof n)throw new Error("parameter must be a string");if("object"!=typeof e||null===e)throw new Error("parameter must be an object");return{jsonrpc:"2.0",id:0,result:await this.genericRequest(e,n)}}async _wallet_addEthereumChain(t){var e,n,r,i;const o=t[0];if(0===(null===(e=o.rpcUrls)||void 0===e?void 0:e.length))return{jsonrpc:"2.0",id:0,error:{code:2,message:"please pass in at least 1 rpcUrl"}};if(!o.chainName||""===o.chainName.trim())throw a.ethErrors.provider.custom({code:0,message:"chainName is a required field"});if(!o.nativeCurrency)throw a.ethErrors.provider.custom({code:0,message:"nativeCurrency is a required field"});const s=parseInt(o.chainId,16);return await this.addEthereumChain(s,null!==(n=o.rpcUrls)&&void 0!==n?n:[],null!==(r=o.blockExplorerUrls)&&void 0!==r?r:[],o.chainName,null!==(i=o.iconUrls)&&void 0!==i?i:[],o.nativeCurrency)?{jsonrpc:"2.0",id:0,result:null}:{jsonrpc:"2.0",id:0,error:{code:2,message:"unable to add ethereum chain"}}}async _wallet_switchEthereumChain(t){const e=t[0];return await this.switchEthereumChain(parseInt(e.chainId,16)),{jsonrpc:"2.0",id:0,result:null}}_eth_uninstallFilter(t){const e=(0,d.ensureHexString)(t[0]);return this._filterPolyfill.uninstallFilter(e)}async _eth_newFilter(t){const e=t[0];return{jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newFilter(e)}}async _eth_newBlockFilter(){return{jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newBlockFilter()}}async _eth_newPendingTransactionFilter(){return{jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newPendingTransactionFilter()}}_eth_getFilterChanges(t){const e=(0,d.ensureHexString)(t[0]);return this._filterPolyfill.getFilterChanges(e)}_eth_getFilterLogs(t){const e=(0,d.ensureHexString)(t[0]);return this._filterPolyfill.getFilterLogs(e)}initializeRelay(){return this._relay?Promise.resolve(this._relay):this._relayProvider().then((t=>(t.setAccountsCallback((t=>this._setAddresses(t))),t.setChainCallback(((t,e)=>{this.updateProviderInfo(e,parseInt(t,10),!0)})),this._relay=t,t)))}}e.WalletLinkProvider=E},3667:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WalletLinkSdkUI=void 0;const r=n(1566),i=n(2133),o=n(8944),s=n(4076);class a extends s.WalletLinkUI{constructor(t){super(t),this.attached=!1,this.snackbar=new i.Snackbar({darkMode:t.darkMode}),this.linkFlow=new r.LinkFlow({darkMode:t.darkMode,version:t.version,sessionId:t.session.id,sessionSecret:t.session.secret,walletLinkUrl:t.walletLinkUrl,connected$:t.connected$,isParentConnection:!1})}attach(){if(this.attached)throw new Error("WalletLinkUI is already attached");const t=document.documentElement,e=document.createElement("div");e.className="-walletlink-css-reset",t.appendChild(e),this.linkFlow.attach(e),this.snackbar.attach(e),this.attached=!0,(0,o.injectCssReset)()}setConnectDisabled(t){this.linkFlow.setConnectDisabled(t)}addEthereumChain(t){}switchEthereumChain(t){}requestEthereumAccounts(t){this.linkFlow.open({onCancel:t.onCancel})}hideRequestEthereumAccounts(){this.linkFlow.close()}signEthereumMessage(t){}signEthereumTransaction(t){}submitEthereumTransaction(t){}ethereumAddressFromSignedMessage(t){}showConnecting(t){let e;return e=t.isUnlinkedErrorState?{autoExpand:!0,message:"Connection lost",menuItems:[{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:t.onResetConnection}]}:{message:"Confirm on phone",menuItems:[{isRed:!0,info:"Cancel transaction",svgWidth:"11",svgHeight:"11",path:"M10.3711 1.52346L9.21775 0.370117L5.37109 4.21022L1.52444 0.370117L0.371094 1.52346L4.2112 5.37012L0.371094 9.21677L1.52444 10.3701L5.37109 6.53001L9.21775 10.3701L10.3711 9.21677L6.53099 5.37012L10.3711 1.52346Z",defaultFillRule:"inherit",defaultClipRule:"inherit",onClick:t.onCancel},{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:t.onResetConnection}]},this.snackbar.presentItem(e)}reloadUI(){document.location.reload()}inlineAccountsResponse(){return!1}inlineAddEthereumChain(t){return!1}inlineSwitchEthereumChain(){return!1}isStandalone(){return!1}}e.WalletLinkSdkUI=a},4076:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WalletLinkUI=void 0,e.WalletLinkUI=class{constructor(t){}setConnectDisabled(t){}}},6911:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.RelayMessageType=void 0,(n=e.RelayMessageType||(e.RelayMessageType={})).SESSION_ID_REQUEST="SESSION_ID_REQUEST",n.SESSION_ID_RESPONSE="SESSION_ID_RESPONSE",n.LINKED="LINKED",n.UNLINKED="UNLINKED",n.WEB3_REQUEST="WEB3_REQUEST",n.WEB3_REQUEST_CANCELED="WEB3_REQUEST_CANCELED",n.WEB3_RESPONSE="WEB3_RESPONSE"},5190:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Session=void 0;const r=n(2023),i=n(4143),o=n(1717),s=n(1033),a="session:id",u="session:secret",c="session:linked";class l{constructor(t,e,n,i){this._storage=t,this._id=e||(0,s.randomBytesHex)(16),this._secret=n||(0,s.randomBytesHex)(32);const o=r.sha256.create();o.update(`${this._id}, ${this._secret} WalletLink`),this._key=o.hex(),this._linked=!!i}static load(t){const e=t.getItem(a),n=t.getItem(c),r=t.getItem(u);return e&&r?new l(t,e,r,"1"===n):null}static get persistedSessionIdChange$(){return(0,i.fromEvent)(window,"storage").pipe((0,o.filter)((t=>t.key===a)),(0,o.map)((t=>({oldValue:t.oldValue||null,newValue:t.newValue||null}))))}static hash(t){return r.sha256.create().update(t).hex()}get id(){return this._id}get secret(){return this._secret}get key(){return this._key}get linked(){return this._linked}set linked(t){this._linked=t,this.persistLinked()}save(){return this._storage.setItem(a,this._id),this._storage.setItem(u,this._secret),this.persistLinked(),this}persistLinked(){this._storage.setItem(c,this._linked?"1":"0")}}e.Session=l},9909:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(o<3?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},s=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return i(e,t),e},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.WalletLinkRelay=void 0;const u=a(n(7056)),c=n(9826),l=n(4143),h=n(1717),f=n(7220),d=n(9018),p=n(1241),y=n(1033),g=s(n(5728)),b=n(5190),m=n(4130),v=n(1782),w=n(1823),_=n(6412),E=n(6608),S=n(546);class k extends m.WalletLinkRelayAbstract{constructor(t){super(),this.accountsCallback=null,this.chainCallback=null,this.appName="",this.appLogoUrl=null,this.subscriptions=new l.Subscription,this.walletLinkUrl=t.walletLinkUrl,this.storage=t.storage,this._session=b.Session.load(t.storage)||new b.Session(t.storage).save(),this.relayEventManager=t.relayEventManager,this.walletLinkAnalytics=t.walletLinkAnalytics?t.walletLinkAnalytics:new f.WalletLinkAnalytics,this.connection=new d.WalletLinkConnection(this._session.id,this._session.key,this.walletLinkUrl,this.walletLinkAnalytics),this.subscriptions.add(this.connection.incomingEvent$.pipe((0,h.filter)((t=>"Web3Response"===t.event))).subscribe({next:this.handleIncomingEvent})),this.subscriptions.add(this.connection.linked$.pipe((0,h.skip)(1),(0,h.tap)((t=>{var e;this.isLinked=t;const n=this.storage.getItem(m.LOCAL_STORAGE_ADDRESSES_KEY);if(this.isUnlinkedErrorState=!1,n){const r=n.split(" "),i="true"===this.storage.getItem("IsStandaloneSigning");if(""!==r[0]&&!t&&!i){this.isUnlinkedErrorState=!0;const t=this.getSessionIdHash();null===(e=this.walletLinkAnalytics)||void 0===e||e.sendEvent(p.EVENTS.UNLINKED_ERROR_STATE,{sessionIdHash:t})}}}))).subscribe()),this.subscriptions.add(this.connection.sessionConfig$.pipe((0,h.filter)((t=>!!t.metadata&&"1"===t.metadata.__destroyed))).subscribe((()=>{var t;const e=this.connection.isDestroyed;return null===(t=this.walletLinkAnalytics)||void 0===t||t.sendEvent(p.EVENTS.METADATA_DESTROYED,{alreadyDestroyed:e,sessionIdHash:this.getSessionIdHash()}),this.resetAndReload()}))),this.subscriptions.add(this.connection.sessionConfig$.pipe((0,h.filter)((t=>t.metadata&&void 0!==t.metadata.WalletUsername))).pipe((0,h.mergeMap)((t=>g.decrypt(t.metadata.WalletUsername,this._session.secret)))).subscribe({next:t=>{this.storage.setItem(m.WALLET_USER_NAME_KEY,t)},error:()=>{var t;null===(t=this.walletLinkAnalytics)||void 0===t||t.sendEvent(p.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"username"})}})),this.subscriptions.add(this.connection.sessionConfig$.pipe((0,h.filter)((t=>t.metadata&&void 0!==t.metadata.AppVersion))).pipe((0,h.mergeMap)((t=>g.decrypt(t.metadata.AppVersion,this._session.secret)))).subscribe({next:t=>{this.storage.setItem(m.APP_VERSION_KEY,t)},error:()=>{var t;null===(t=this.walletLinkAnalytics)||void 0===t||t.sendEvent(p.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"appversion"})}})),this.subscriptions.add(this.connection.sessionConfig$.pipe((0,h.filter)((t=>t.metadata&&void 0!==t.metadata.ChainId&&void 0!==t.metadata.JsonRpcUrl))).pipe((0,h.mergeMap)((t=>(0,l.zip)(g.decrypt(t.metadata.ChainId,this._session.secret),g.decrypt(t.metadata.JsonRpcUrl,this._session.secret))))).pipe((0,h.distinctUntilChanged)()).subscribe({next:([t,e])=>{this.chainCallback&&this.chainCallback(t,e)},error:()=>{var t;null===(t=this.walletLinkAnalytics)||void 0===t||t.sendEvent(p.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"chainId|jsonRpcUrl"})}})),this.subscriptions.add(this.connection.sessionConfig$.pipe((0,h.filter)((t=>t.metadata&&void 0!==t.metadata.EthereumAddress))).pipe((0,h.mergeMap)((t=>g.decrypt(t.metadata.EthereumAddress,this._session.secret)))).subscribe({next:t=>{this.accountsCallback&&this.accountsCallback([t]),k.accountRequestCallbackIds.size>0&&(Array.from(k.accountRequestCallbackIds.values()).forEach((e=>{const n=(0,S.Web3ResponseMessage)({id:e,response:(0,E.RequestEthereumAccountsResponse)([t])});this.invokeCallback(Object.assign(Object.assign({},n),{id:e}))})),k.accountRequestCallbackIds.clear())},error:()=>{var t;null===(t=this.walletLinkAnalytics)||void 0===t||t.sendEvent(p.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"selectedAddress"})}})),this.ui=t.walletLinkUIConstructor({walletLinkUrl:t.walletLinkUrl,version:t.version,darkMode:t.darkMode,session:this._session,connected$:this.connection.connected$}),this.connection.connect()}attachUI(){this.ui.attach()}resetAndReload(){this.connection.setSessionMetadata("__destroyed","1").pipe((0,h.timeout)(1e3),(0,h.catchError)((t=>(0,l.of)(null)))).subscribe((t=>{var e,n,r;try{this.subscriptions.unsubscribe()}catch(t){null===(e=this.walletLinkAnalytics)||void 0===e||e.sendEvent(p.EVENTS.GENERAL_ERROR,{message:"Had error unsubscribing"})}null===(n=this.walletLinkAnalytics)||void 0===n||n.sendEvent(p.EVENTS.SESSION_STATE_CHANGE,{method:"relay::resetAndReload",sessionMetadataChange:"__destroyed, 1",sessionIdHash:this.getSessionIdHash()}),this.connection.destroy();const i=b.Session.load(this.storage);(null==i?void 0:i.id)===this._session.id?this.storage.clear():i&&(null===(r=this.walletLinkAnalytics)||void 0===r||r.sendEvent(p.EVENTS.SKIPPED_CLEARING_SESSION,{sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:b.Session.hash(i.id)})),this.ui.reloadUI()}),(t=>{var e;null===(e=this.walletLinkAnalytics)||void 0===e||e.sendEvent(p.EVENTS.FAILURE,{method:"relay::resetAndReload",message:`failed to reset and reload with ${t}`,sessionIdHash:this.getSessionIdHash()})}))}setAppInfo(t,e){this.appName=t,this.appLogoUrl=e}getStorageItem(t){return this.storage.getItem(t)}get session(){return this._session}setStorageItem(t,e){this.storage.setItem(t,e)}signEthereumMessage(t,e,n,r){return this.sendRequest({method:v.Web3Method.signEthereumMessage,params:{message:(0,y.hexStringFromBuffer)(t,!0),address:e,addPrefix:n,typedDataJson:r||null}})}ethereumAddressFromSignedMessage(t,e,n){return this.sendRequest({method:v.Web3Method.ethereumAddressFromSignedMessage,params:{message:(0,y.hexStringFromBuffer)(t,!0),signature:(0,y.hexStringFromBuffer)(e,!0),addPrefix:n}})}signEthereumTransaction(t){return this.sendRequest({method:v.Web3Method.signEthereumTransaction,params:{fromAddress:t.fromAddress,toAddress:t.toAddress,weiValue:(0,y.bigIntStringFromBN)(t.weiValue),data:(0,y.hexStringFromBuffer)(t.data,!0),nonce:t.nonce,gasPriceInWei:t.gasPriceInWei?(0,y.bigIntStringFromBN)(t.gasPriceInWei):null,maxFeePerGas:t.gasPriceInWei?(0,y.bigIntStringFromBN)(t.gasPriceInWei):null,maxPriorityFeePerGas:t.gasPriceInWei?(0,y.bigIntStringFromBN)(t.gasPriceInWei):null,gasLimit:t.gasLimit?(0,y.bigIntStringFromBN)(t.gasLimit):null,chainId:t.chainId,shouldSubmit:!1}})}signAndSubmitEthereumTransaction(t){return this.sendRequest({method:v.Web3Method.signEthereumTransaction,params:{fromAddress:t.fromAddress,toAddress:t.toAddress,weiValue:(0,y.bigIntStringFromBN)(t.weiValue),data:(0,y.hexStringFromBuffer)(t.data,!0),nonce:t.nonce,gasPriceInWei:t.gasPriceInWei?(0,y.bigIntStringFromBN)(t.gasPriceInWei):null,maxFeePerGas:t.maxFeePerGas?(0,y.bigIntStringFromBN)(t.maxFeePerGas):null,maxPriorityFeePerGas:t.maxPriorityFeePerGas?(0,y.bigIntStringFromBN)(t.maxPriorityFeePerGas):null,gasLimit:t.gasLimit?(0,y.bigIntStringFromBN)(t.gasLimit):null,chainId:t.chainId,shouldSubmit:!0}})}submitEthereumTransaction(t,e){return this.sendRequest({method:v.Web3Method.submitEthereumTransaction,params:{signedTransaction:(0,y.hexStringFromBuffer)(t,!0),chainId:e}})}scanQRCode(t){return this.sendRequest({method:v.Web3Method.scanQRCode,params:{regExp:t}})}genericRequest(t,e){return this.sendRequest({method:v.Web3Method.generic,params:{action:e,data:t}})}sendGenericMessage(t){return this.sendRequest(t)}sendRequest(t){let e=null;const n=(0,y.randomBytesHex)(8),r=()=>{this.publishWeb3RequestCanceledEvent(n),this.handleWeb3ResponseMessage((0,S.Web3ResponseMessage)({id:n,response:(0,E.ErrorResponse)(t.method,"User rejected request")})),null==e||e()};return{promise:new Promise(((i,o)=>{this.ui.isStandalone()||(e=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:r,onResetConnection:this.resetAndReload})),this.relayEventManager.callbacks.set(n,(t=>{if(null==e||e(),t.errorMessage)return o(new Error(t.errorMessage));i(t)})),this.ui.isStandalone()?this.sendRequestStandalone(n,t):this.publishWeb3RequestEvent(n,t)})),cancel:r}}setConnectDisabled(t){this.ui.setConnectDisabled(t)}setAccountsCallback(t){this.accountsCallback=t}setChainCallback(t){this.chainCallback=t}publishWeb3RequestEvent(t,e){var n;const r=(0,_.Web3RequestMessage)({id:t,request:e}),i=b.Session.load(this.storage);null===(n=this.walletLinkAnalytics)||void 0===n||n.sendEvent(p.EVENTS.WEB3_REQUEST,{eventId:r.id,method:`relay::${r.request.method}`,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:i?b.Session.hash(i.id):"",isSessionMismatched:((null==i?void 0:i.id)!==this._session.id).toString()}),this.subscriptions.add(this.publishEvent("Web3Request",r,!0).subscribe({error:t=>{this.handleWeb3ResponseMessage((0,S.Web3ResponseMessage)({id:r.id,response:{method:r.request.method,errorMessage:t.message}}))}}))}publishWeb3RequestCanceledEvent(t){const e=(0,w.Web3RequestCanceledMessage)(t);this.subscriptions.add(this.publishEvent("Web3RequestCanceled",e,!1).subscribe())}publishEvent(t,e,n){const r=this.session.secret;return new l.Observable((t=>{g.encrypt(JSON.stringify(Object.assign(Object.assign({},e),{origin:location.origin})),r).then((e=>{t.next(e),t.complete()}))})).pipe((0,h.mergeMap)((e=>this.connection.publishEvent(t,e,n))))}handleIncomingEvent(t){try{this.subscriptions.add(g.decrypt(t.data,this.session.secret).pipe((0,h.map)((t=>JSON.parse(t)))).subscribe({next:t=>{const e=(0,S.isWeb3ResponseMessage)(t)?t:null;e&&this.handleWeb3ResponseMessage(e)},error:()=>{var t;null===(t=this.walletLinkAnalytics)||void 0===t||t.sendEvent(p.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"incomingEvent"})}}))}catch(t){return}}handleWeb3ResponseMessage(t){var e;const{response:n}=t;if(null===(e=this.walletLinkAnalytics)||void 0===e||e.sendEvent(p.EVENTS.WEB3_RESPONSE,{eventId:t.id,method:`relay::${n.method}`,sessionIdHash:this.getSessionIdHash()}),(0,E.isRequestEthereumAccountsResponse)(n))return Array.from(k.accountRequestCallbackIds.values()).forEach((e=>this.invokeCallback(Object.assign(Object.assign({},t),{id:e})))),void k.accountRequestCallbackIds.clear();this.invokeCallback(t)}invokeCallback(t){const e=this.relayEventManager.callbacks.get(t.id);e&&(e(t.response),this.relayEventManager.callbacks.delete(t.id))}requestEthereumAccounts(){let t={method:v.Web3Method.requestEthereumAccounts,params:{appName:this.appName,appLogoUrl:this.appLogoUrl||null}};const e=(0,y.randomBytesHex)(8),n=()=>{this.publishWeb3RequestCanceledEvent(e),this.handleWeb3ResponseMessage((0,S.Web3ResponseMessage)({id:e,response:(0,E.ErrorResponse)(t.method,"User rejected request")}))};return{promise:new Promise(((r,i)=>{var o;this.relayEventManager.callbacks.set(e,(t=>{if(this.ui.hideRequestEthereumAccounts(),t.errorMessage)return i(new Error(t.errorMessage));r(t)}));const s=(null===(o=null===window||void 0===window?void 0:window.navigator)||void 0===o?void 0:o.userAgent)||null;if(s&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(s))window.location.href=`https://go.cb-w.com/xoXnYwQimhb?cb_url=${window.location.href}`;else{if(this.ui.inlineAccountsResponse()){const t=t=>{this.handleWeb3ResponseMessage((0,S.Web3ResponseMessage)({id:e,response:(0,E.RequestEthereumAccountsResponse)(t)}))};this.ui.requestEthereumAccounts({onCancel:n,onAccounts:t})}else this.ui.requestEthereumAccounts({onCancel:n});k.accountRequestCallbackIds.add(e),this.ui.inlineAccountsResponse()||this.ui.isStandalone()||this.publishWeb3RequestEvent(e,t)}})),cancel:n}}addEthereumChain(t,e,n,r,i,o){let s={method:v.Web3Method.addEthereumChain,params:{chainId:t,rpcUrls:e,blockExplorerUrls:r,chainName:i,iconUrls:n,nativeCurrency:o}},a=null;const u=(0,y.randomBytesHex)(8),c=()=>{this.publishWeb3RequestCanceledEvent(u),this.handleWeb3ResponseMessage((0,S.Web3ResponseMessage)({id:u,response:(0,E.ErrorResponse)(s.method,"User rejected request")})),null==a||a()};return this.ui.inlineAddEthereumChain(t)||(a=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:c,onResetConnection:this.resetAndReload})),{promise:new Promise(((e,n)=>{this.relayEventManager.callbacks.set(u,(t=>{if(null==a||a(),t.errorMessage)return n(new Error(t.errorMessage));e(t)}));this.ui.inlineAddEthereumChain(t)&&this.ui.addEthereumChain({onCancel:()=>{this.handleWeb3ResponseMessage((0,S.Web3ResponseMessage)({id:u,response:(0,E.AddEthereumChainResponse)({isApproved:!1,rpcUrl:""})}))},onApprove:t=>{this.handleWeb3ResponseMessage((0,S.Web3ResponseMessage)({id:u,response:(0,E.AddEthereumChainResponse)({isApproved:!0,rpcUrl:t})}))},chainId:s.params.chainId,rpcUrls:s.params.rpcUrls,blockExplorerUrls:s.params.blockExplorerUrls,chainName:s.params.chainName,iconUrls:s.params.iconUrls,nativeCurrency:s.params.nativeCurrency}),this.ui.inlineAddEthereumChain(t)||this.ui.isStandalone()||this.publishWeb3RequestEvent(u,s)})),cancel:c}}switchEthereumChain(t){let e={method:v.Web3Method.switchEthereumChain,params:{chainId:t}},n=null;const r=(0,y.randomBytesHex)(8),i=()=>{this.publishWeb3RequestCanceledEvent(r),this.handleWeb3ResponseMessage((0,S.Web3ResponseMessage)({id:r,response:(0,E.ErrorResponse)(e.method,"User rejected request")})),null==n||n()};return this.ui.inlineSwitchEthereumChain()||(n=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:i,onResetConnection:this.resetAndReload})),{promise:new Promise(((t,i)=>{this.relayEventManager.callbacks.set(r,(e=>(null==n||n(),e.errorMessage&&e.errorCode?i(c.ethErrors.provider.custom({code:e.errorCode,message:"Unrecognized chain ID. Try adding the chain using addEthereumChain first."})):e.errorMessage?i(new Error(e.errorMessage)):void t(e)))),this.ui.switchEthereumChain({onCancel:t=>{t?this.handleWeb3ResponseMessage((0,S.Web3ResponseMessage)({id:r,response:(0,E.ErrorResponse)(v.Web3Method.switchEthereumChain,"unsupported chainId",t)})):this.handleWeb3ResponseMessage((0,S.Web3ResponseMessage)({id:r,response:(0,E.SwitchEthereumChainResponse)({isApproved:!1,rpcUrl:""})}))},onApprove:t=>{this.handleWeb3ResponseMessage((0,S.Web3ResponseMessage)({id:r,response:(0,E.SwitchEthereumChainResponse)({isApproved:!0,rpcUrl:t})}))},chainId:e.params.chainId}),this.ui.inlineSwitchEthereumChain()||this.ui.isStandalone()||this.publishWeb3RequestEvent(r,e)})),cancel:i}}getSessionIdHash(){return b.Session.hash(this._session.id)}sendRequestStandalone(t,e){const n=()=>{this.handleWeb3ResponseMessage((0,S.Web3ResponseMessage)({id:t,response:(0,E.ErrorResponse)(e.method,"User rejected request")}))},r=e=>{this.handleWeb3ResponseMessage((0,S.Web3ResponseMessage)({id:t,response:e}))};switch(e.method){case v.Web3Method.signEthereumMessage:this.ui.signEthereumMessage({request:e,onSuccess:r,onCancel:n});break;case v.Web3Method.signEthereumTransaction:this.ui.signEthereumTransaction({request:e,onSuccess:r,onCancel:n});break;case v.Web3Method.submitEthereumTransaction:this.ui.submitEthereumTransaction({request:e,onSuccess:r,onCancel:n});break;case v.Web3Method.ethereumAddressFromSignedMessage:this.ui.ethereumAddressFromSignedMessage({request:e,onSuccess:r});break;default:n()}}}k.accountRequestCallbackIds=new Set,o([u.default],k.prototype,"resetAndReload",null),o([u.default],k.prototype,"handleIncomingEvent",null),e.WalletLinkRelay=k},4130:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WalletLinkRelayAbstract=e.APP_VERSION_KEY=e.LOCAL_STORAGE_ADDRESSES_KEY=e.WALLET_USER_NAME_KEY=void 0;const r=n(9826);e.WALLET_USER_NAME_KEY="walletUsername",e.LOCAL_STORAGE_ADDRESSES_KEY="Addresses",e.APP_VERSION_KEY="AppVersion",e.WalletLinkRelayAbstract=class{async makeEthereumJSONRPCRequest(t,e){if(!e)throw new Error("Error: No jsonRpcUrl provided");return window.fetch(e,{method:"POST",body:JSON.stringify(t),mode:"cors",headers:{"Content-Type":"application/json"}}).then((t=>t.json())).then((t=>{if(!t)throw r.ethErrors.rpc.parse({});const e=t,{error:n}=e;if(n)throw(0,r.serializeError)(n);return e}))}}},5281:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WalletLinkRelayEventManager=void 0;const r=n(1033);e.WalletLinkRelayEventManager=class{constructor(){this._nextRequestId=0,this.callbacks=new Map}makeRequestId(){this._nextRequestId=(this._nextRequestId+1)%2147483647;const t=this._nextRequestId,e=(0,r.prepend0x)(t.toString(16));return this.callbacks.get(e)&&this.callbacks.delete(e),t}}},1782:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.Web3Method=void 0,(n=e.Web3Method||(e.Web3Method={})).requestEthereumAccounts="requestEthereumAccounts",n.signEthereumMessage="signEthereumMessage",n.signEthereumTransaction="signEthereumTransaction",n.submitEthereumTransaction="submitEthereumTransaction",n.ethereumAddressFromSignedMessage="ethereumAddressFromSignedMessage",n.scanQRCode="scanQRCode",n.generic="generic",n.childRequestEthereumAccounts="childRequestEthereumAccounts",n.addEthereumChain="addEthereumChain",n.switchEthereumChain="switchEthereumChain",n.makeEthereumJSONRPCRequest="makeEthereumJSONRPCRequest"},1823:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Web3RequestCanceledMessage=void 0;const r=n(6911);e.Web3RequestCanceledMessage=function(t){return{type:r.RelayMessageType.WEB3_REQUEST_CANCELED,id:t}}},6412:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Web3RequestMessage=void 0;const r=n(6911);e.Web3RequestMessage=function(t){return Object.assign({type:r.RelayMessageType.WEB3_REQUEST},t)}},6608:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EthereumAddressFromSignedMessageResponse=e.SubmitEthereumTransactionResponse=e.SignEthereumTransactionResponse=e.SignEthereumMessageResponse=e.isRequestEthereumAccountsResponse=e.RequestEthereumAccountsResponse=e.SwitchEthereumChainResponse=e.AddEthereumChainResponse=e.ErrorResponse=void 0;const r=n(1782);e.ErrorResponse=function(t,e,n){return{method:t,errorMessage:e,errorCode:n}},e.AddEthereumChainResponse=function(t){return{method:r.Web3Method.addEthereumChain,result:t}},e.SwitchEthereumChainResponse=function(t){return{method:r.Web3Method.switchEthereumChain,result:t}},e.RequestEthereumAccountsResponse=function(t){return{method:r.Web3Method.requestEthereumAccounts,result:t}},e.isRequestEthereumAccountsResponse=function(t){return t&&t.method===r.Web3Method.requestEthereumAccounts},e.SignEthereumMessageResponse=function(t){return{method:r.Web3Method.signEthereumMessage,result:t}},e.SignEthereumTransactionResponse=function(t){return{method:r.Web3Method.signEthereumTransaction,result:t}},e.SubmitEthereumTransactionResponse=function(t){return{method:r.Web3Method.submitEthereumTransaction,result:t}},e.EthereumAddressFromSignedMessageResponse=function(t){return{method:r.Web3Method.ethereumAddressFromSignedMessage,result:t}}},546:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isWeb3ResponseMessage=e.Web3ResponseMessage=void 0;const r=n(6911);e.Web3ResponseMessage=function(t){return Object.assign({type:r.RelayMessageType.WEB3_RESPONSE},t)},e.isWeb3ResponseMessage=function(t){return t&&t.type===r.RelayMessageType.WEB3_RESPONSE}},5728:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decrypt=e.encrypt=void 0;const r=n(4143),i=n(1033);e.encrypt=async function(t,e){if(64!==e.length)throw Error("secret must be 256 bits");const n=crypto.getRandomValues(new Uint8Array(12)),r=await crypto.subtle.importKey("raw",(0,i.hexStringToUint8Array)(e),{name:"aes-gcm"},!1,["encrypt","decrypt"]),o=new TextEncoder,s=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:n},r,o.encode(t)),a=s.slice(s.byteLength-16),u=s.slice(0,s.byteLength-16),c=new Uint8Array(a),l=new Uint8Array(u),h=new Uint8Array([...n,...c,...l]);return(0,i.uint8ArrayToHex)(h)},e.decrypt=function(t,e){if(64!==e.length)throw Error("secret must be 256 bits");return new r.Observable((n=>{!async function(){const r=await crypto.subtle.importKey("raw",(0,i.hexStringToUint8Array)(e),{name:"aes-gcm"},!1,["encrypt","decrypt"]),o=(0,i.hexStringToUint8Array)(t),s=o.slice(0,12),a=o.slice(12,28),u=o.slice(28),c=new Uint8Array([...u,...a]),l={name:"AES-GCM",iv:new Uint8Array(s)};try{const t=await window.crypto.subtle.decrypt(l,r,c),e=new TextDecoder;n.next(e.decode(t)),n.complete()}catch(t){n.error(t)}}()}))}},9490:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RegExpString=e.IntNumber=e.BigIntString=e.AddressString=e.HexString=e.OpaqueType=void 0,e.OpaqueType=function(){return t=>t},e.HexString=t=>t,e.AddressString=t=>t,e.BigIntString=t=>t,e.IntNumber=function(t){return Math.floor(t)},e.RegExpString=t=>t},1033:function(t,e,n){"use strict";var r=n(8764).Buffer,i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.getFavicon=e.range=e.isBigNumber=e.ensureParsedJSONObject=e.ensureBN=e.ensureRegExpString=e.ensureIntNumber=e.ensureBuffer=e.ensureAddressString=e.ensureEvenLengthHexString=e.ensureHexString=e.isHexString=e.prepend0x=e.strip0x=e.has0xPrefix=e.hexStringFromIntNumber=e.intNumberFromHexString=e.bigIntStringFromBN=e.hexStringFromBuffer=e.hexStringToUint8Array=e.uint8ArrayToHex=e.randomBytesHex=void 0;const o=i(n(3550)),s=n(9490),a=/^[0-9]*$/,u=/^[a-f0-9]*$/;function c(t){return[...t].map((t=>t.toString(16).padStart(2,"0"))).join("")}function l(t){return t.startsWith("0x")||t.startsWith("0X")}function h(t){return l(t)?t.slice(2):t}function f(t){return l(t)?"0x"+t.slice(2):"0x"+t}function d(t){if("string"!=typeof t)return!1;const e=h(t).toLowerCase();return u.test(e)}function p(t,e=!1){if("string"==typeof t){const n=h(t).toLowerCase();if(u.test(n))return(0,s.HexString)(e?"0x"+n:n)}throw new Error(`"${String(t)}" is not a hexadecimal string`)}function y(t,e=!1){let n=p(t,!1);return n.length%2==1&&(n=(0,s.HexString)("0"+n)),e?(0,s.HexString)("0x"+n):n}function g(t){if("number"==typeof t&&Number.isInteger(t))return(0,s.IntNumber)(t);if("string"==typeof t){if(a.test(t))return(0,s.IntNumber)(Number(t));if(d(t))return(0,s.IntNumber)(new o.default(y(t,!1),16).toNumber())}throw new Error(`Not an integer: ${String(t)}`)}function b(t){if(null==t||"function"!=typeof t.constructor)return!1;const{constructor:e}=t;return"function"==typeof e.config&&"number"==typeof e.EUCLID}e.randomBytesHex=function(t){return c(crypto.getRandomValues(new Uint8Array(t)))},e.uint8ArrayToHex=c,e.hexStringToUint8Array=function(t){return new Uint8Array(t.match(/.{1,2}/g).map((t=>parseInt(t,16))))},e.hexStringFromBuffer=function(t,e=!1){const n=t.toString("hex");return(0,s.HexString)(e?"0x"+n:n)},e.bigIntStringFromBN=function(t){return(0,s.BigIntString)(t.toString(10))},e.intNumberFromHexString=function(t){return(0,s.IntNumber)(new o.default(y(t,!1),16).toNumber())},e.hexStringFromIntNumber=function(t){return(0,s.HexString)("0x"+new o.default(t).toString(16))},e.has0xPrefix=l,e.strip0x=h,e.prepend0x=f,e.isHexString=d,e.ensureHexString=p,e.ensureEvenLengthHexString=y,e.ensureAddressString=function(t){if("string"==typeof t){const e=h(t).toLowerCase();if(d(e)&&40===e.length)return(0,s.AddressString)(f(e))}throw new Error(`Invalid Ethereum address: ${String(t)}`)},e.ensureBuffer=function(t){if(r.isBuffer(t))return t;if("string"==typeof t){if(d(t)){const e=y(t,!1);return r.from(e,"hex")}return r.from(t,"utf8")}throw new Error(`Not binary data: ${String(t)}`)},e.ensureIntNumber=g,e.ensureRegExpString=function(t){if(t instanceof RegExp)return(0,s.RegExpString)(t.toString());throw new Error(`Not a RegExp: ${String(t)}`)},e.ensureBN=function(t){if(null!==t&&(o.default.isBN(t)||b(t)))return new o.default(t.toString(10),10);if("number"==typeof t)return new o.default(g(t));if("string"==typeof t){if(a.test(t))return new o.default(t,10);if(d(t))return new o.default(y(t,!1),16)}throw new Error(`Not an integer: ${String(t)}`)},e.ensureParsedJSONObject=function(t){if("string"==typeof t)return JSON.parse(t);if("object"==typeof t)return t;throw new Error(`Not a JSON string or an object: ${String(t)}`)},e.isBigNumber=b,e.range=function(t,e){return Array.from({length:e-t},((e,n)=>t+n))},e.getFavicon=function(){const t=document.querySelector('link[sizes="192x192"]')||document.querySelector('link[sizes="180x180"]')||document.querySelector('link[rel="icon"]')||document.querySelector('link[rel="shortcut icon"]'),{protocol:e,host:n}=document.location,r=t?t.getAttribute("href"):null;return!r||r.startsWith("javascript:")?null:r.startsWith("http://")||r.startsWith("https://")||r.startsWith("data:")?r:r.startsWith("//")?e+r:`${e}//${n}${r}`}},5561:(t,e,n)=>{var r=n(8764).Buffer;const i=n(6499),o=n(3550);function s(t){return t.startsWith("int[")?"int256"+t.slice(3):"int"===t?"int256":t.startsWith("uint[")?"uint256"+t.slice(4):"uint"===t?"uint256":t.startsWith("fixed[")?"fixed128x128"+t.slice(5):"fixed"===t?"fixed128x128":t.startsWith("ufixed[")?"ufixed128x128"+t.slice(6):"ufixed"===t?"ufixed128x128":t}function a(t){return parseInt(/^\D+(\d+)$/.exec(t)[1],10)}function u(t){var e=/^\D+(\d+)x(\d+)$/.exec(t);return[parseInt(e[1],10),parseInt(e[2],10)]}function c(t){var e=t.match(/(.*)\[(.*?)\]$/);return e?""===e[2]?"dynamic":parseInt(e[2],10):null}function l(t){var e=typeof t;if("string"===e)return i.isHexString(t)?new o(i.stripHexPrefix(t),16):new o(t,10);if("number"===e)return new o(t);if(t.toArray)return t;throw new Error("Argument is not a number")}function h(t,e){var n,s,f,d;if("address"===t)return h("uint160",l(e));if("bool"===t)return h("uint8",e?1:0);if("string"===t)return h("bytes",new r(e,"utf8"));if(function(t){return t.lastIndexOf("]")===t.length-1}(t)){if(void 0===e.length)throw new Error("Not an array?");if("dynamic"!==(n=c(t))&&0!==n&&e.length>n)throw new Error("Elements exceed array size: "+n);for(d in f=[],t=t.slice(0,t.lastIndexOf("[")),"string"==typeof e&&(e=JSON.parse(e)),e)f.push(h(t,e[d]));if("dynamic"===n){var p=h("uint256",e.length);f.unshift(p)}return r.concat(f)}if("bytes"===t)return e=new r(e),f=r.concat([h("uint256",e.length),e]),e.length%32!=0&&(f=r.concat([f,i.zeros(32-e.length%32)])),f;if(t.startsWith("bytes")){if((n=a(t))<1||n>32)throw new Error("Invalid bytes width: "+n);return i.setLengthRight(e,32)}if(t.startsWith("uint")){if((n=a(t))%8||n<8||n>256)throw new Error("Invalid uint width: "+n);if((s=l(e)).bitLength()>n)throw new Error("Supplied uint exceeds width: "+n+" vs "+s.bitLength());if(s<0)throw new Error("Supplied uint is negative");return s.toArrayLike(r,"be",32)}if(t.startsWith("int")){if((n=a(t))%8||n<8||n>256)throw new Error("Invalid int width: "+n);if((s=l(e)).bitLength()>n)throw new Error("Supplied int exceeds width: "+n+" vs "+s.bitLength());return s.toTwos(256).toArrayLike(r,"be",32)}if(t.startsWith("ufixed")){if(n=u(t),(s=l(e))<0)throw new Error("Supplied ufixed is negative");return h("uint256",s.mul(new o(2).pow(new o(n[1]))))}if(t.startsWith("fixed"))return n=u(t),h("int256",l(e).mul(new o(2).pow(new o(n[1]))));throw new Error("Unsupported or invalid type: "+t)}function f(t){return"string"===t||"bytes"===t||"dynamic"===c(t)}function d(t,e){if(t.length!==e.length)throw new Error("Number of types are not matching the values");for(var n,o,u=[],c=0;c32)throw new Error("Invalid bytes width: "+n);u.push(i.setLengthRight(f,n))}else if(h.startsWith("uint")){if((n=a(h))%8||n<8||n>256)throw new Error("Invalid uint width: "+n);if((o=l(f)).bitLength()>n)throw new Error("Supplied uint exceeds width: "+n+" vs "+o.bitLength());u.push(o.toArrayLike(r,"be",n/8))}else{if(!h.startsWith("int"))throw new Error("Unsupported or invalid type: "+h);if((n=a(h))%8||n<8||n>256)throw new Error("Invalid int width: "+n);if((o=l(f)).bitLength()>n)throw new Error("Supplied int exceeds width: "+n+" vs "+o.bitLength());u.push(o.toTwos(n).toArrayLike(r,"be",n/8))}}return r.concat(u)}t.exports={rawEncode:function(t,e){var n=[],i=[],o=32*t.length;for(var a in t){var u=s(t[a]),c=h(u,e[a]);f(u)?(n.push(h("uint256",o)),i.push(c),o+=c.length):n.push(c)}return r.concat(n.concat(i))},solidityPack:d,soliditySHA3:function(t,e){return i.keccak(d(t,e))}}},9498:(t,e,n)=>{var r=n(8764).Buffer;const i=n(6499),o=n(5561),s={type:"object",properties:{types:{type:"object",additionalProperties:{type:"array",items:{type:"object",properties:{name:{type:"string"},type:{type:"string"}},required:["name","type"]}}},primaryType:{type:"string"},domain:{type:"object"},message:{type:"object"}},required:["types","primaryType","domain","message"]},a={encodeData(t,e,n,s=!0){const a=["bytes32"],u=[this.hashType(t,n)];if(s){const c=(t,e,a)=>{if(void 0!==n[e])return["bytes32",null==a?"0x0000000000000000000000000000000000000000000000000000000000000000":i.keccak(this.encodeData(e,a,n,s))];if(void 0===a)throw new Error(`missing value for field ${t} of type ${e}`);if("bytes"===e)return["bytes32",i.keccak(a)];if("string"===e)return"string"==typeof a&&(a=r.from(a,"utf8")),["bytes32",i.keccak(a)];if(e.lastIndexOf("]")===e.length-1){const n=e.slice(0,e.lastIndexOf("[")),r=a.map((e=>c(t,n,e)));return["bytes32",i.keccak(o.rawEncode(r.map((([t])=>t)),r.map((([,t])=>t))))]}return[e,a]};for(const r of n[t]){const[t,n]=c(r.name,r.type,e[r.name]);a.push(t),u.push(n)}}else for(const o of n[t]){let t=e[o.name];if(void 0!==t)if("bytes"===o.type)a.push("bytes32"),t=i.keccak(t),u.push(t);else if("string"===o.type)a.push("bytes32"),"string"==typeof t&&(t=r.from(t,"utf8")),t=i.keccak(t),u.push(t);else if(void 0!==n[o.type])a.push("bytes32"),t=i.keccak(this.encodeData(o.type,t,n,s)),u.push(t);else{if(o.type.lastIndexOf("]")===o.type.length-1)throw new Error("Arrays currently unimplemented in encodeData");a.push(o.type),u.push(t)}}return o.rawEncode(a,u)},encodeType(t,e){let n="",r=this.findTypeDependencies(t,e).filter((e=>e!==t));r=[t].concat(r.sort());for(const t of r){if(!e[t])throw new Error("No type definition specified: "+t);n+=t+"("+e[t].map((({name:t,type:e})=>e+" "+t)).join(",")+")"}return n},findTypeDependencies(t,e,n=[]){if(t=t.match(/^\w*/)[0],n.includes(t)||void 0===e[t])return n;n.push(t);for(const r of e[t])for(const t of this.findTypeDependencies(r.type,e,n))!n.includes(t)&&n.push(t);return n},hashStruct(t,e,n,r=!0){return i.keccak(this.encodeData(t,e,n,r))},hashType(t,e){return i.keccak(this.encodeType(t,e))},sanitizeData(t){const e={};for(const n in s.properties)t[n]&&(e[n]=t[n]);return e.types&&(e.types=Object.assign({EIP712Domain:[]},e.types)),e},hash(t,e=!0){const n=this.sanitizeData(t),o=[r.from("1901","hex")];return o.push(this.hashStruct("EIP712Domain",n.domain,n.types,e)),"EIP712Domain"!==n.primaryType&&o.push(this.hashStruct(n.primaryType,n.message,n.types,e)),i.keccak(r.concat(o))}};t.exports={TYPED_MESSAGE_SCHEMA:s,TypedDataUtils:a,hashForSignTypedDataLegacy:function(t){return function(t){const e=new Error("Expect argument to be non-empty array");if("object"!=typeof t||!t.length)throw e;const n=t.map((function(t){return"bytes"===t.type?i.toBuffer(t.value):t.value})),r=t.map((function(t){return t.type})),s=t.map((function(t){if(!t.name)throw e;return t.type+" "+t.name}));return o.soliditySHA3(["bytes32","bytes32"],[o.soliditySHA3(new Array(t.length).fill("string"),s),o.soliditySHA3(r,n)])}(t.data)},hashForSignTypedData_v3:function(t){return a.hash(t.data,!1)},hashForSignTypedData_v4:function(t){return a.hash(t.data)}}},6499:(t,e,n)=>{var r=n(8764).Buffer;const i=n(5811),o=n(3550);function s(t){return r.allocUnsafe(t).fill(0)}function a(t,e,n){const r=s(e);return t=u(t),n?t.length{function e(t){this.mode=r.MODE_8BIT_BYTE,this.data=t,this.parsedData=[];for(var e=0,n=this.data.length;e65536?(i[0]=240|(1835008&o)>>>18,i[1]=128|(258048&o)>>>12,i[2]=128|(4032&o)>>>6,i[3]=128|63&o):o>2048?(i[0]=224|(61440&o)>>>12,i[1]=128|(4032&o)>>>6,i[2]=128|63&o):o>128?(i[0]=192|(1984&o)>>>6,i[1]=128|63&o):i[0]=o,this.parsedData.push(i)}this.parsedData=Array.prototype.concat.apply([],this.parsedData),this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}function n(t,e){this.typeNumber=t,this.errorCorrectLevel=e,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}e.prototype={getLength:function(t){return this.parsedData.length},write:function(t){for(var e=0,n=this.parsedData.length;e=7&&this.setupTypeNumber(t),null==this.dataCache&&(this.dataCache=n.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,e)},setupPositionProbePattern:function(t,e){for(var n=-1;n<=7;n++)if(!(t+n<=-1||this.moduleCount<=t+n))for(var r=-1;r<=7;r++)e+r<=-1||this.moduleCount<=e+r||(this.modules[t+n][e+r]=0<=n&&n<=6&&(0==r||6==r)||0<=r&&r<=6&&(0==n||6==n)||2<=n&&n<=4&&2<=r&&r<=4)},getBestMaskPattern:function(){for(var t=0,e=0,n=0;n<8;n++){this.makeImpl(!0,n);var r=i.getLostPoint(this);(0==n||t>r)&&(t=r,e=n)}return e},createMovieClip:function(t,e,n){var r=t.createEmptyMovieClip(e,n);this.make();for(var i=0;i>n&1);this.modules[Math.floor(n/3)][n%3+this.moduleCount-8-3]=r}for(n=0;n<18;n++)r=!t&&1==(e>>n&1),this.modules[n%3+this.moduleCount-8-3][Math.floor(n/3)]=r},setupTypeInfo:function(t,e){for(var n=this.errorCorrectLevel<<3|e,r=i.getBCHTypeInfo(n),o=0;o<15;o++){var s=!t&&1==(r>>o&1);o<6?this.modules[o][8]=s:o<8?this.modules[o+1][8]=s:this.modules[this.moduleCount-15+o][8]=s}for(o=0;o<15;o++)s=!t&&1==(r>>o&1),o<8?this.modules[8][this.moduleCount-o-1]=s:o<9?this.modules[8][15-o-1+1]=s:this.modules[8][15-o-1]=s;this.modules[this.moduleCount-8][8]=!t},mapData:function(t,e){for(var n=-1,r=this.moduleCount-1,o=7,s=0,a=this.moduleCount-1;a>0;a-=2)for(6==a&&a--;;){for(var u=0;u<2;u++)if(null==this.modules[r][a-u]){var c=!1;s>>o&1)),i.getMask(e,r,a-u)&&(c=!c),this.modules[r][a-u]=c,-1==--o&&(s++,o=7)}if((r+=n)<0||this.moduleCount<=r){r-=n,n=-n;break}}}},n.PAD0=236,n.PAD1=17,n.createData=function(t,e,r){for(var o=u.getRSBlocks(t,e),s=new c,a=0;a8*h)throw new Error("code length overflow. ("+s.getLengthInBits()+">"+8*h+")");for(s.getLengthInBits()+4<=8*h&&s.put(0,4);s.getLengthInBits()%8!=0;)s.putBit(!1);for(;!(s.getLengthInBits()>=8*h||(s.put(n.PAD0,8),s.getLengthInBits()>=8*h));)s.put(n.PAD1,8);return n.createBytes(s,o)},n.createBytes=function(t,e){for(var n=0,r=0,o=0,s=new Array(e.length),u=new Array(e.length),c=0;c=0?p.get(y):0}}var g=0;for(f=0;f=0;)e^=i.G15<=0;)e^=i.G18<>>=1;return e},getPatternPosition:function(t){return i.PATTERN_POSITION_TABLE[t-1]},getMask:function(t,e,n){switch(t){case 0:return(e+n)%2==0;case 1:return e%2==0;case 2:return n%3==0;case 3:return(e+n)%3==0;case 4:return(Math.floor(e/2)+Math.floor(n/3))%2==0;case 5:return e*n%2+e*n%3==0;case 6:return(e*n%2+e*n%3)%2==0;case 7:return(e*n%3+(e+n)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}},getErrorCorrectPolynomial:function(t){for(var e=new a([1],0),n=0;n5&&(n+=3+o-5)}for(r=0;r=256;)t-=255;return o.EXP_TABLE[t]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},s=0;s<8;s++)o.EXP_TABLE[s]=1<>>7-t%8&1)},put:function(t,e){for(var n=0;n>>e-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var l=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]];function h(t){if(this.options={padding:4,width:256,height:256,typeNumber:4,color:"#000000",background:"#ffffff",ecl:"M",image:{svg:"",width:0,height:0}},"string"==typeof t&&(t={content:t}),t)for(var e in t)this.options[e]=t[e];if("string"!=typeof this.options.content)throw new Error("Expected 'content' as string!");if(0===this.options.content.length)throw new Error("Expected 'content' to be non-empty!");if(!(this.options.padding>=0))throw new Error("Expected 'padding' value to be non-negative!");if(!(this.options.width>0&&this.options.height>0))throw new Error("Expected 'width' or 'height' value to be higher than zero!");var r=this.options.content,i=function(t,e){for(var n=function(t){var e=encodeURI(t).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return e.length+(e.length!=t?3:0)}(t),r=1,i=0,o=0,s=l.length;o<=s;o++){var a=l[o];if(!a)throw new Error("Content too long: expected "+i+" but got "+n);switch(e){case"L":i=a[0];break;case"M":i=a[1];break;case"Q":i=a[2];break;case"H":i=a[3];break;default:throw new Error("Unknwon error correction level: "+e)}if(n<=i)break;r++}if(r>l.length)throw new Error("Content too long");return r}(r,this.options.ecl),o=function(t){switch(t){case"L":return 1;case"M":return 0;case"Q":return 3;case"H":return 2;default:throw new Error("Unknwon error correction level: "+t)}}(this.options.ecl);this.qrcode=new n(i,o),this.qrcode.addData(r),this.qrcode.make()}h.prototype.svg=function(t){var e=this.options||{},n=this.qrcode.modules;void 0===t&&(t={container:e.container||"svg"});for(var r=void 0===e.pretty||!!e.pretty,i=r?" ":"",o=r?"\r\n":"",s=e.width,a=e.height,u=n.length,c=s/(u+2*e.padding),l=a/(u+2*e.padding),h=void 0!==e.join&&!!e.join,f=void 0!==e.swap&&!!e.swap,d=void 0===e.xmlDeclaration||!!e.xmlDeclaration,p=void 0!==e.predefined&&!!e.predefined,y=p?i+''+o:"",g=i+''+o,b="",m="",v=0;v'+o:i+''+o}h&&(b=i+'');let M="";if(void 0!==this.options.image&&this.options.image.svg){const t=s*this.options.image.width/100,e=a*this.options.image.height/100;M+=``,M+=this.options.image.svg+o,M+=""}var A="";switch(t.container){case"svg":d&&(A+=''+o),A+=''+o,A+=y+g+b,A+=M,A+="";break;case"svg-viewbox":d&&(A+=''+o),A+=''+o,A+=y+g+b,A+=M,A+="";break;case"g":A+=''+o,A+=y+g+b,A+=M,A+="";break;default:A+=(y+g+b+M).replace(/^\s+/,"")}return A},t.exports=h},6430:(t,e,n)=>{"use strict";var r=n(9804),i=n(3083),o=n(1924),s=o("Object.prototype.toString"),a=n(6410)(),u="undefined"==typeof globalThis?n.g:globalThis,c=i(),l=o("String.prototype.slice"),h={},f=n(882),d=Object.getPrototypeOf;a&&f&&d&&r(c,(function(t){if("function"==typeof u[t]){var e=new u[t];if(Symbol.toStringTag in e){var n=d(e),r=f(n,Symbol.toStringTag);if(!r){var i=d(n);r=f(i,Symbol.toStringTag)}h[t]=r.get}}}));var p=n(5692);t.exports=function(t){return!!p(t)&&(a&&Symbol.toStringTag in t?function(t){var e=!1;return r(h,(function(n,r){if(!e)try{var i=n.call(t);i===r&&(e=i)}catch(t){}})),e}(t):l(s(t),8,-1))}},7529:t=>{t.exports=function(){for(var t={},n=0;n{},9120:()=>{},6586:()=>{},3083:(t,e,n)=>{"use strict";var r=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],i="undefined"==typeof globalThis?n.g:globalThis;t.exports=function(){for(var t=[],e=0;e{"use strict";var r=n(210)("%Object.getOwnPropertyDescriptor%",!0);if(r)try{r([],"length")}catch(t){r=null}t.exports=r},5699:t=>{"use strict";t.exports={i8:"2.4.5"}}},__webpack_module_cache__={};function __webpack_require__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;var n=__webpack_module_cache__[t]={id:t,loaded:!1,exports:{}};return __webpack_modules__[t].call(n.exports,n,n.exports,__webpack_require__),n.loaded=!0,n.exports}__webpack_require__.amdO={},__webpack_require__.d=(t,e)=>{for(var n in e)__webpack_require__.o(e,n)&&!__webpack_require__.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),__webpack_require__.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),__webpack_require__.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},__webpack_require__.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var __webpack_exports__={};(()=>{"use strict";__webpack_require__(983)})()})(); \ No newline at end of file diff --git a/resources/views/public/wallet.blade.php b/resources/views/public/wallet.blade.php index 4a413a6..4068b52 100644 --- a/resources/views/public/wallet.blade.php +++ b/resources/views/public/wallet.blade.php @@ -387,53 +387,6 @@ - - - - - - - + + + + + + + + + \ No newline at end of file