@dcl/explorer-website 0.1.0-7411312393.commit-c1f7c79 → 0.1.0-7425750118.commit-ba43842
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/asset-manifest.json +45 -45
- package/index.html +1 -1
- package/package.json +3 -3
- package/static/css/{2.0f8e403d.chunk.css → 2.5d05083b.chunk.css} +4 -4
- package/static/css/{2.0f8e403d.chunk.css.map → 2.5d05083b.chunk.css.map} +1 -1
- package/static/css/{main.233e7cb9.chunk.css → main.c50f60ea.chunk.css} +2 -2
- package/static/css/{main.233e7cb9.chunk.css.map → main.c50f60ea.chunk.css.map} +1 -1
- package/static/js/{2.aaeed3c0.chunk.js → 2.b7f4078d.chunk.js} +4 -4
- package/static/js/{2.aaeed3c0.chunk.js.map → 2.b7f4078d.chunk.js.map} +1 -1
- package/static/js/{3.ef51d543.chunk.js → 3.7eb2ed93.chunk.js} +3 -3
- package/static/js/{3.ef51d543.chunk.js.map → 3.7eb2ed93.chunk.js.map} +1 -1
- package/static/js/{main.5012fdc4.chunk.js → main.ce08ba7d.chunk.js} +2 -2
- package/static/js/main.ce08ba7d.chunk.js.map +1 -0
- package/static/js/{runtime-main.80c90025.js → runtime-main.bc058caf.js} +2 -2
- package/static/js/{runtime-main.80c90025.js.map → runtime-main.bc058caf.js.map} +1 -1
- package/static/js/main.5012fdc4.chunk.js.map +0 -1
- /package/static/js/{2.aaeed3c0.chunk.js.LICENSE.txt → 2.b7f4078d.chunk.js.LICENSE.txt} +0 -0
- /package/static/js/{3.ef51d543.chunk.js.LICENSE.txt → 3.7eb2ed93.chunk.js.LICENSE.txt} +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! For license information please see 3.
|
|
2
|
-
(this["webpackJsonp@dcl/explorer-website"]=this["webpackJsonp@dcl/explorer-website"]||[]).push([[3],{1713:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CoinbaseWalletProvider=e.CoinbaseWalletSDK=void 0;const r=n(1817),i=n(1785);var s=n(1817);Object.defineProperty(e,"CoinbaseWalletSDK",{enumerable:!0,get:function(){return s.CoinbaseWalletSDK}});var o=n(1785);Object.defineProperty(e,"CoinbaseWalletProvider",{enumerable:!0,get:function(){return o.CoinbaseWalletProvider}}),e.default=r.CoinbaseWalletSDK,"undefined"!==typeof window&&(window.CoinbaseWalletSDK=r.CoinbaseWalletSDK,window.CoinbaseWalletProvider=i.CoinbaseWalletProvider,window.WalletLink=r.CoinbaseWalletSDK,window.WalletLinkProvider=i.CoinbaseWalletProvider)},1732:function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var r=n(121),i=n(1759),s=n(1820),o=n(1735),c=n(1792),a=n(1758),u=n(1791),l=function(t){function e(n,r,i){var o=t.call(this)||this;switch(o.syncErrorValue=null,o.syncErrorThrown=!1,o.syncErrorThrowable=!1,o.isStopped=!1,arguments.length){case 0:o.destination=s.a;break;case 1:if(!n){o.destination=s.a;break}if("object"===typeof n){n instanceof e?(o.syncErrorThrowable=n.syncErrorThrowable,o.destination=n,n.add(o)):(o.syncErrorThrowable=!0,o.destination=new h(o,n));break}default:o.syncErrorThrowable=!0,o.destination=new h(o,n,r,i)}return o}return r.__extends(e,t),e.prototype[c.a]=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}(o.a),h=function(t){function e(e,n,r,o){var c,a=t.call(this)||this;a._parentSubscriber=e;var u=a;return Object(i.a)(n)?c=n:n&&(c=n.next,r=n.error,o=n.complete,n!==s.a&&(u=Object.create(n),Object(i.a)(u.unsubscribe)&&a.add(u.unsubscribe.bind(u)),u.unsubscribe=a.unsubscribe.bind(a))),a._context=u,a._next=c,a._error=r,a._complete=o,a}return r.__extends(e,t),e.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;a.a.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=a.a.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):Object(u.a)(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;Object(u.a)(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)};a.a.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(n){if(this.unsubscribe(),a.a.useDeprecatedSynchronousErrorHandling)throw n;Object(u.a)(n)}},e.prototype.__tryOrSetError=function(t,e,n){if(!a.a.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(r){return a.a.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=r,t.syncErrorThrown=!0,!0):(Object(u.a)(r),!0)}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(l)},1733:function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var r=n(1795),i=n(1732),s=n(1792),o=n(1820);var c=n(1746),a=n(1770),u=n(1758),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,c=function(t,e,n){if(t){if(t instanceof i.a)return t;if(t[s.a])return t[s.a]()}return t||e||n?new i.a(t,e,n):new i.a(o.a)}(t,e,n);if(r?c.add(r.call(c,this.source)):c.add(this.source||u.a.useDeprecatedSynchronousErrorHandling&&!c.syncErrorThrowable?this._subscribe(c):this._trySubscribe(c)),u.a.useDeprecatedSynchronousErrorHandling&&c.syncErrorThrowable&&(c.syncErrorThrowable=!1,c.syncErrorThrown))throw c.syncErrorValue;return c},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){u.a.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),Object(r.a)(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(n){r(n),i&&i.unsubscribe()}}),r,e)}))},t.prototype._subscribe=function(t){var e=this.source;return e&&e.subscribe(t)},t.prototype[c.a]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?this:Object(a.b)(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=h(t))((function(t,n){var r;e.subscribe((function(t){return r=t}),(function(t){return n(t)}),(function(){return t(r)}))}))},t.create=function(e){return new t(e)},t}();function h(t){if(t||(t=u.a.Promise||Promise),!t)throw new Error("no Promise impl found");return t}},1734:function(t,e,n){"use strict";n.d(e,"a",(function(){return c})),n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return u}));var r=n(121),i=n(1732),s=n(1733),o=n(1783),c=function(t){function e(e){var n=t.call(this)||this;return n.parent=e,n}return r.__extends(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.a),a=(i.a,function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(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.a));i.a;function u(t,e){if(!e.closed){if(t instanceof s.a)return t.subscribe(e);var n;try{n=Object(o.a)(t)(e)}catch(r){e.error(r)}return n}}},1735:function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var r=n(1738),i=n(1794),s=n(1759),o=n(1793),c=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,c=n._parentOrParents,u=n._ctorUnsubscribe,l=n._unsubscribe,h=n._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,c instanceof t)c.remove(this);else if(null!==c)for(var d=0;d<c.length;++d){c[d].remove(this)}if(Object(s.a)(l)){u&&(this._unsubscribe=void 0);try{l.call(this)}catch(b){e=b instanceof o.a?a(b.errors):[b]}}if(Object(r.a)(h)){d=-1;for(var f=h.length;++d<f;){var p=h[d];if(Object(i.a)(p))try{p.unsubscribe()}catch(b){e=e||[],b instanceof o.a?e=e.concat(a(b.errors)):e.push(b)}}}if(e)throw new o.a(e)}},t.prototype.add=function(e){var n=e;if(!e)return t.EMPTY;switch(typeof e){case"function":n=new t(e);case"object":if(n===this||n.closed||"function"!==typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!(n instanceof t)){var r=n;(n=new t)._subscriptions=[r]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}var i=n._parentOrParents;if(null===i)n._parentOrParents=this;else if(i instanceof t){if(i===this)return n;n._parentOrParents=[i,this]}else{if(-1!==i.indexOf(this))return n;i.push(this)}var s=this._subscriptions;return null===s?this._subscriptions=[n]:s.push(n),n},t.prototype.remove=function(t){var e=this._subscriptions;if(e){var n=e.indexOf(t);-1!==n&&e.splice(n,1)}},t.EMPTY=((e=new t).closed=!0,e),t}();function a(t){return t.reduce((function(t,e){return t.concat(e instanceof o.a?e.errors:e)}),[])}},1736:function(t,e,n){"use strict";n.d(e,"b",(function(){return l})),n.d(e,"a",(function(){return h}));var r=n(121),i=n(1733),s=n(1732),o=n(1735),c=n(1760),a=n(1821),u=n(1792),l=function(t){function e(e){var n=t.call(this,e)||this;return n.destination=e,n}return r.__extends(e,t),e}(s.a),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.__extends(e,t),e.prototype[u.a]=function(){return new l(this)},e.prototype.lift=function(t){var e=new d(this,this);return e.operator=t,e},e.prototype.next=function(t){if(this.closed)throw new c.a;if(!this.isStopped)for(var e=this.observers,n=e.length,r=e.slice(),i=0;i<n;i++)r[i].next(t)},e.prototype.error=function(t){if(this.closed)throw new c.a;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var e=this.observers,n=e.length,r=e.slice(),i=0;i<n;i++)r[i].error(t);this.observers.length=0},e.prototype.complete=function(){if(this.closed)throw new c.a;this.isStopped=!0;for(var t=this.observers,e=t.length,n=t.slice(),r=0;r<e;r++)n[r].complete();this.observers.length=0},e.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},e.prototype._trySubscribe=function(e){if(this.closed)throw new c.a;return t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){if(this.closed)throw new c.a;return this.hasError?(t.error(this.thrownError),o.a.EMPTY):this.isStopped?(t.complete(),o.a.EMPTY):(this.observers.push(t),new a.a(this,t))},e.prototype.asObservable=function(){var t=new i.a;return t.source=this,t},e.create=function(t,e){return new d(t,e)},e}(i.a),d=function(t){function e(e,n){var r=t.call(this)||this;return r.destination=e,r.source=n,r}return r.__extends(e,t),e.prototype.next=function(t){var e=this.destination;e&&e.next&&e.next(t)},e.prototype.error=function(t){var e=this.destination;e&&e.error&&this.destination.error(t)},e.prototype.complete=function(){var t=this.destination;t&&t.complete&&this.destination.complete()},e.prototype._subscribe=function(t){return this.source?this.source.subscribe(t):o.a.EMPTY},e}(h)},1737:function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return s}));var r=n(1768),i=new(n(1763).a)(r.a),s=i},1738:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function(){return Array.isArray||function(t){return t&&"number"===typeof t.length}}()},1739:function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(121),i=n(1732);function s(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 o(t,e))}}var o=function(){function t(t,e){this.project=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new c(t,this.project,this.thisArg))},t}(),c=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.__extends(e,t),e.prototype._next=function(t){var e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(n){return void this.destination.error(n)}this.destination.next(e)},e}(i.a)},1740:function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return s}));var r=n(1733),i=new r.a((function(t){return t.complete()}));function s(t){return t?function(t){return new r.a((function(e){return t.schedule((function(){return e.complete()}))}))}(t):i}},1741:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(1733),i=n(1783),s=n(1815);function o(t,e){return e?Object(s.a)(t,e):t instanceof r.a?t:new r.a(Object(i.a)(t))}},1743:function(t,e,n){"use strict";function r(t){return t&&"function"===typeof t.schedule}n.d(e,"a",(function(){return r}))},1744:function(t,e,n){"use strict";function r(t){return t}n.d(e,"a",(function(){return r}))},1745:function(t,e,n){"use strict";(function(t){var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.createQrUrl=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 i=r(n(21)),s=n(1845),o=n(1807),c=/^[0-9]*$/,a=/^[a-f0-9]*$/;function u(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 d(t){return l(t)?"0x"+t.slice(2):"0x"+t}function f(t){if("string"!==typeof t)return!1;const e=h(t).toLowerCase();return a.test(e)}function p(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("string"===typeof t){const n=h(t).toLowerCase();if(a.test(n))return(0,o.HexString)(e?"0x"+n:n)}throw new Error(`"${String(t)}" is not a hexadecimal string`)}function b(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=p(t,!1);return n.length%2===1&&(n=(0,o.HexString)("0"+n)),e?(0,o.HexString)("0x"+n):n}function y(t){if("number"===typeof t&&Number.isInteger(t))return(0,o.IntNumber)(t);if("string"===typeof t){if(c.test(t))return(0,o.IntNumber)(Number(t));if(f(t))return(0,o.IntNumber)(new i.default(b(t,!1),16).toNumber())}throw new Error(`Not an integer: ${String(t)}`)}function g(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 u(crypto.getRandomValues(new Uint8Array(t)))},e.uint8ArrayToHex=u,e.hexStringToUint8Array=function(t){return new Uint8Array(t.match(/.{1,2}/g).map((t=>parseInt(t,16))))},e.hexStringFromBuffer=function(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=t.toString("hex");return(0,o.HexString)(e?"0x"+n:n)},e.bigIntStringFromBN=function(t){return(0,o.BigIntString)(t.toString(10))},e.intNumberFromHexString=function(t){return(0,o.IntNumber)(new i.default(b(t,!1),16).toNumber())},e.hexStringFromIntNumber=function(t){return(0,o.HexString)("0x"+new i.default(t).toString(16))},e.has0xPrefix=l,e.strip0x=h,e.prepend0x=d,e.isHexString=f,e.ensureHexString=p,e.ensureEvenLengthHexString=b,e.ensureAddressString=function(t){if("string"===typeof t){const e=h(t).toLowerCase();if(f(e)&&40===e.length)return(0,o.AddressString)(d(e))}throw new Error(`Invalid Ethereum address: ${String(t)}`)},e.ensureBuffer=function(e){if(t.isBuffer(e))return e;if("string"===typeof e){if(f(e)){const n=b(e,!1);return t.from(n,"hex")}return t.from(e,"utf8")}throw new Error(`Not binary data: ${String(e)}`)},e.ensureIntNumber=y,e.ensureRegExpString=function(t){if(t instanceof RegExp)return(0,o.RegExpString)(t.toString());throw new Error(`Not a RegExp: ${String(t)}`)},e.ensureBN=function(t){if(null!==t&&(i.default.isBN(t)||g(t)))return new i.default(t.toString(10),10);if("number"===typeof t)return new i.default(y(t));if("string"===typeof t){if(c.test(t))return new i.default(t,10);if(f(t))return new i.default(b(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=g,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}`},e.createQrUrl=function(t,e,n,r){const i=r?"parent-id":"id";return`${n}/#/link?${(0,s.stringify)({[i]:t,secret:e,server:n,v:"1"})}`}}).call(this,n(60).Buffer)},1746:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function(){return"function"===typeof Symbol&&Symbol.observable||"@@observable"}()},1747:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(121),i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(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(1732).a)},1748:function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(121),i=n(1732);function s(t,e){return function(n){return n.lift(new o(t,e))}}var o=function(){function t(t,e){this.predicate=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new c(t,this.predicate,this.thisArg))},t}(),c=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.__extends(e,t),e.prototype._next=function(t){var e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(n){return void this.destination.error(n)}e&&this.destination.next(t)},e}(i.a)},1751:function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var r=n(121),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.__extends(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(1732).a),s=n(1783),o=n(1733);function c(t,e,n,r,c){if(void 0===c&&(c=new i(t,n,r)),!c.closed)return e instanceof o.a?e.subscribe(c):Object(s.a)(e)(c)}},1752:function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return c}));var r,i=n(1740),s=n(1761),o=n(1774);r||(r={});var c=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 Object(s.a)(this.value);case"E":return Object(o.a)(this.error);case"C":return Object(i.b)()}throw new Error("unexpected notification kind value")},t.createNext=function(e){return"undefined"!==typeof 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}()},1753:function(t,e,n){"use strict";n.d(e,"a",(function(){return 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}()},1754:function(t,e,n){"use strict";n.d(e,"a",(function(){return 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}()},1755:function(t,e,n){"use strict";n.d(e,"b",(function(){return c})),n.d(e,"a",(function(){return l}));var r=n(121),i=n(1739),s=n(1741),o=n(1734);function c(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"===typeof e?function(r){return r.pipe(c((function(n,r){return Object(s.a)(t(n,r)).pipe(Object(i.a)((function(t,i){return e(n,t,r,i)})))}),n))}:("number"===typeof e&&(n=e),function(e){return e.lift(new a(t,n))})}var a=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 u(t,this.project,this.concurrent))},t}(),u=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.__extends(e,t),e.prototype._next=function(t){this.active<this.concurrent?this._tryNext(t):this.buffer.push(t)},e.prototype._tryNext=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(r){return void this.destination.error(r)}this.active++,this._innerSub(e)},e.prototype._innerSub=function(t){var e=new o.a(this),n=this.destination;n.add(e);var r=Object(o.c)(t,e);r!==e&&n.add(r)},e.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()},e.prototype.notifyNext=function(t){this.destination.next(t)},e.prototype.notifyComplete=function(){var t=this.buffer;this.active--,t.length>0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},e}(o.b),l=c},1756:function(t,e,n){"use strict";n.r(e),n.d(e,"Component",(function(){return _})),n.d(e,"Fragment",(function(){return m})),n.d(e,"cloneElement",(function(){return F})),n.d(e,"createContext",(function(){return U})),n.d(e,"createElement",(function(){return b})),n.d(e,"createRef",(function(){return g})),n.d(e,"h",(function(){return b})),n.d(e,"hydrate",(function(){return H})),n.d(e,"isValidElement",(function(){return o})),n.d(e,"options",(function(){return i})),n.d(e,"render",(function(){return B})),n.d(e,"toChildArray",(function(){return C}));var r,i,s,o,c,a,u,l={},h=[],d=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function f(t,e){for(var n in e)t[n]=e[n];return t}function p(t){var e=t.parentNode;e&&e.removeChild(t)}function b(t,e,n){var i,s,o,c={};for(o in e)"key"==o?i=e[o]:"ref"==o?s=e[o]:c[o]=e[o];if(arguments.length>2&&(c.children=arguments.length>3?r.call(arguments,2):n),"function"==typeof t&&null!=t.defaultProps)for(o in t.defaultProps)void 0===c[o]&&(c[o]=t.defaultProps[o]);return y(t,c,i,s,null)}function y(t,e,n,r,o){var c={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==o?++s:o};return null==o&&null!=i.vnode&&i.vnode(c),c}function g(){return{current:null}}function m(t){return t.children}function _(t,e){this.props=t,this.context=e}function v(t,e){if(null==e)return t.__?v(t.__,t.__.__k.indexOf(t)+1):null;for(var n;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e)return n.__e;return"function"==typeof t.type?v(t):null}function w(t){var e,n;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e){t.__e=t.__c.base=n.__e;break}return w(t)}}function E(t){(!t.__d&&(t.__d=!0)&&c.push(t)&&!x.__r++||a!==i.debounceRendering)&&((a=i.debounceRendering)||setTimeout)(x)}function x(){for(var t;x.__r=c.length;)t=c.sort((function(t,e){return t.__v.__b-e.__v.__b})),c=[],t.some((function(t){var e,n,r,i,s,o;t.__d&&(s=(i=(e=t).__v).__e,(o=e.__P)&&(n=[],(r=f({},i)).__v=i.__v+1,j(o,i,r,e.__n,void 0!==o.ownerSVGElement,null!=i.__h?[s]:null,n,null==s?v(i):s,i.__h),N(n,i),i.__e!=s&&w(i)))}))}function S(t,e,n,r,i,s,o,c,a,u){var d,f,p,b,g,_,w,E=r&&r.__k||h,x=E.length;for(n.__k=[],d=0;d<e.length;d++)if(null!=(b=n.__k[d]=null==(b=e[d])||"boolean"==typeof b?null:"string"==typeof b||"number"==typeof b||"bigint"==typeof b?y(null,b,null,null,b):Array.isArray(b)?y(m,{children:b},null,null,null):b.__b>0?y(b.type,b.props,b.key,b.ref?b.ref:null,b.__v):b)){if(b.__=n,b.__b=n.__b+1,null===(p=E[d])||p&&b.key==p.key&&b.type===p.type)E[d]=void 0;else for(f=0;f<x;f++){if((p=E[f])&&b.key==p.key&&b.type===p.type){E[f]=void 0;break}p=null}j(t,b,p=p||l,i,s,o,c,a,u),g=b.__e,(f=b.ref)&&p.ref!=f&&(w||(w=[]),p.ref&&w.push(p.ref,null,b),w.push(f,b.__c||g,b)),null!=g?(null==_&&(_=g),"function"==typeof b.type&&b.__k===p.__k?b.__d=a=k(b,a,t):a=I(t,b,p,E,g,a),"function"==typeof n.type&&(n.__d=a)):a&&p.__e==a&&a.parentNode!=t&&(a=v(p))}for(n.__e=_,d=x;d--;)null!=E[d]&&L(E[d],E[d]);if(w)for(d=0;d<w.length;d++)P(w[d],w[++d],w[++d])}function k(t,e,n){for(var r,i=t.__k,s=0;i&&s<i.length;s++)(r=i[s])&&(r.__=t,e="function"==typeof r.type?k(r,e,n):I(n,r,r,i,r.__e,e));return e}function C(t,e){return e=e||[],null==t||"boolean"==typeof t||(Array.isArray(t)?t.some((function(t){C(t,e)})):e.push(t)),e}function I(t,e,n,r,i,s){var o,c,a;if(void 0!==e.__d)o=e.__d,e.__d=void 0;else if(null==n||i!=s||null==i.parentNode)t:if(null==s||s.parentNode!==t)t.appendChild(i),o=null;else{for(c=s,a=0;(c=c.nextSibling)&&a<r.length;a+=1)if(c==i)break t;t.insertBefore(i,s),o=s}return void 0!==o?o:i.nextSibling}function A(t,e,n){"-"===e[0]?t.setProperty(e,n):t[e]=null==n?"":"number"!=typeof n||d.test(e)?n:n+"px"}function O(t,e,n,r,i){var s;t:if("style"===e)if("string"==typeof n)t.style.cssText=n;else{if("string"==typeof r&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||A(t.style,e,"");if(n)for(e in n)r&&n[e]===r[e]||A(t.style,e,n[e])}else if("o"===e[0]&&"n"===e[1])s=e!==(e=e.replace(/Capture$/,"")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+s]=n,n?r||t.addEventListener(e,s?R:M,s):t.removeEventListener(e,s?R:M,s);else if("dangerouslySetInnerHTML"!==e){if(i)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("href"!==e&&"list"!==e&&"form"!==e&&"tabIndex"!==e&&"download"!==e&&e in t)try{t[e]=null==n?"":n;break t}catch(t){}"function"==typeof n||(null==n||!1===n&&-1==e.indexOf("-")?t.removeAttribute(e):t.setAttribute(e,n))}}function M(t){this.l[t.type+!1](i.event?i.event(t):t)}function R(t){this.l[t.type+!0](i.event?i.event(t):t)}function j(t,e,n,r,s,o,c,a,u){var l,h,d,p,b,y,g,v,w,E,x,k,C,I,A,O=e.type;if(void 0!==e.constructor)return null;null!=n.__h&&(u=n.__h,a=e.__e=n.__e,e.__h=null,o=[a]),(l=i.__b)&&l(e);try{t:if("function"==typeof O){if(v=e.props,w=(l=O.contextType)&&r[l.__c],E=l?w?w.props.value:l.__:r,n.__c?g=(h=e.__c=n.__c).__=h.__E:("prototype"in O&&O.prototype.render?e.__c=h=new O(v,E):(e.__c=h=new _(v,E),h.constructor=O,h.render=D),w&&w.sub(h),h.props=v,h.state||(h.state={}),h.context=E,h.__n=r,d=h.__d=!0,h.__h=[],h._sb=[]),null==h.__s&&(h.__s=h.state),null!=O.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=f({},h.__s)),f(h.__s,O.getDerivedStateFromProps(v,h.__s))),p=h.props,b=h.state,d)null==O.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(null==O.getDerivedStateFromProps&&v!==p&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(v,E),!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(v,h.__s,E)||e.__v===n.__v){for(h.props=v,h.state=h.__s,e.__v!==n.__v&&(h.__d=!1),h.__v=e,e.__e=n.__e,e.__k=n.__k,e.__k.forEach((function(t){t&&(t.__=e)})),x=0;x<h._sb.length;x++)h.__h.push(h._sb[x]);h._sb=[],h.__h.length&&c.push(h);break t}null!=h.componentWillUpdate&&h.componentWillUpdate(v,h.__s,E),null!=h.componentDidUpdate&&h.__h.push((function(){h.componentDidUpdate(p,b,y)}))}if(h.context=E,h.props=v,h.__v=e,h.__P=t,k=i.__r,C=0,"prototype"in O&&O.prototype.render){for(h.state=h.__s,h.__d=!1,k&&k(e),l=h.render(h.props,h.state,h.context),I=0;I<h._sb.length;I++)h.__h.push(h._sb[I]);h._sb=[]}else do{h.__d=!1,k&&k(e),l=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++C<25);h.state=h.__s,null!=h.getChildContext&&(r=f(f({},r),h.getChildContext())),d||null==h.getSnapshotBeforeUpdate||(y=h.getSnapshotBeforeUpdate(p,b)),A=null!=l&&l.type===m&&null==l.key?l.props.children:l,S(t,Array.isArray(A)?A:[A],e,n,r,s,o,c,a,u),h.base=e.__e,e.__h=null,h.__h.length&&c.push(h),g&&(h.__E=h.__=null),h.__e=!1}else null==o&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=T(n.__e,e,n,r,s,o,c,u);(l=i.diffed)&&l(e)}catch(t){e.__v=null,(u||null!=o)&&(e.__e=a,e.__h=!!u,o[o.indexOf(a)]=null),i.__e(t,e,n)}}function N(t,e){i.__c&&i.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e)}))}catch(t){i.__e(t,e.__v)}}))}function T(t,e,n,i,s,o,c,a){var u,h,d,f=n.props,b=e.props,y=e.type,g=0;if("svg"===y&&(s=!0),null!=o)for(;g<o.length;g++)if((u=o[g])&&"setAttribute"in u==!!y&&(y?u.localName===y:3===u.nodeType)){t=u,o[g]=null;break}if(null==t){if(null===y)return document.createTextNode(b);t=s?document.createElementNS("http://www.w3.org/2000/svg",y):document.createElement(y,b.is&&b),o=null,a=!1}if(null===y)f===b||a&&t.data===b||(t.data=b);else{if(o=o&&r.call(t.childNodes),h=(f=n.props||l).dangerouslySetInnerHTML,d=b.dangerouslySetInnerHTML,!a){if(null!=o)for(f={},g=0;g<t.attributes.length;g++)f[t.attributes[g].name]=t.attributes[g].value;(d||h)&&(d&&(h&&d.__html==h.__html||d.__html===t.innerHTML)||(t.innerHTML=d&&d.__html||""))}if(function(t,e,n,r,i){var s;for(s in n)"children"===s||"key"===s||s in e||O(t,s,null,n[s],r);for(s in e)i&&"function"!=typeof e[s]||"children"===s||"key"===s||"value"===s||"checked"===s||n[s]===e[s]||O(t,s,e[s],n[s],r)}(t,b,f,s,a),d)e.__k=[];else if(g=e.props.children,S(t,Array.isArray(g)?g:[g],e,n,i,s&&"foreignObject"!==y,o,c,o?o[0]:n.__k&&v(n,0),a),null!=o)for(g=o.length;g--;)null!=o[g]&&p(o[g]);a||("value"in b&&void 0!==(g=b.value)&&(g!==t.value||"progress"===y&&!g||"option"===y&&g!==f.value)&&O(t,"value",g,f.value,!1),"checked"in b&&void 0!==(g=b.checked)&&g!==t.checked&&O(t,"checked",g,f.checked,!1))}return t}function P(t,e,n){try{"function"==typeof t?t(e):t.current=e}catch(t){i.__e(t,n)}}function L(t,e,n){var r,s;if(i.unmount&&i.unmount(t),(r=t.ref)&&(r.current&&r.current!==t.__e||P(r,null,e)),null!=(r=t.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(t){i.__e(t,e)}r.base=r.__P=null,t.__c=void 0}if(r=t.__k)for(s=0;s<r.length;s++)r[s]&&L(r[s],e,n||"function"!=typeof t.type);n||null==t.__e||p(t.__e),t.__=t.__e=t.__d=void 0}function D(t,e,n){return this.constructor(t,n)}function B(t,e,n){var s,o,c;i.__&&i.__(t,e),o=(s="function"==typeof n)?null:n&&n.__k||e.__k,c=[],j(e,t=(!s&&n||e).__k=b(m,null,[t]),o||l,l,void 0!==e.ownerSVGElement,!s&&n?[n]:o?null:e.firstChild?r.call(e.childNodes):null,c,!s&&n?n:o?o.__e:e.firstChild,s),N(c,t)}function H(t,e){B(t,e,H)}function F(t,e,n){var i,s,o,c=f({},t.props);for(o in e)"key"==o?i=e[o]:"ref"==o?s=e[o]:c[o]=e[o];return arguments.length>2&&(c.children=arguments.length>3?r.call(arguments,2):n),y(t.type,c,i||t.key,s||t.ref,null)}function U(t,e){var n={__c:e="__cC"+u++,__: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(E)},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=h.slice,i={__e:function(t,e,n,r){for(var i,s,o;e=e.__;)if((i=e.__c)&&!i.__)try{if((s=i.constructor)&&null!=s.getDerivedStateFromError&&(i.setState(s.getDerivedStateFromError(t)),o=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(t,r||{}),o=i.__d),o)return i.__E=i}catch(e){t=e}throw t}},s=0,o=function(t){return null!=t&&void 0===t.constructor},_.prototype.setState=function(t,e){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=f({},this.state),"function"==typeof t&&(t=t(f({},n),this.props)),t&&f(n,t),null!=t&&this.__v&&(e&&this._sb.push(e),E(this))},_.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),E(this))},_.prototype.render=m,c=[],x.__r=0,u=0},1757:function(t,e,n){"use strict";n.r(e),n.d(e,"Observable",(function(){return r.a})),n.d(e,"ConnectableObservable",(function(){return i.a})),n.d(e,"GroupedObservable",(function(){return s.a})),n.d(e,"observable",(function(){return o.a})),n.d(e,"Subject",(function(){return c.a})),n.d(e,"BehaviorSubject",(function(){return a.a})),n.d(e,"ReplaySubject",(function(){return u.a})),n.d(e,"AsyncSubject",(function(){return l.a})),n.d(e,"asap",(function(){return h.a})),n.d(e,"asapScheduler",(function(){return h.b})),n.d(e,"async",(function(){return d.a})),n.d(e,"asyncScheduler",(function(){return d.b})),n.d(e,"queue",(function(){return f.a})),n.d(e,"queueScheduler",(function(){return f.b})),n.d(e,"animationFrame",(function(){return v})),n.d(e,"animationFrameScheduler",(function(){return _})),n.d(e,"VirtualTimeScheduler",(function(){return w})),n.d(e,"VirtualAction",(function(){return E})),n.d(e,"Scheduler",(function(){return x.a})),n.d(e,"Subscription",(function(){return S.a})),n.d(e,"Subscriber",(function(){return k.a})),n.d(e,"Notification",(function(){return C.a})),n.d(e,"NotificationKind",(function(){return C.b})),n.d(e,"pipe",(function(){return I.a})),n.d(e,"noop",(function(){return A.a})),n.d(e,"identity",(function(){return O.a})),n.d(e,"isObservable",(function(){return M})),n.d(e,"ArgumentOutOfRangeError",(function(){return R.a})),n.d(e,"EmptyError",(function(){return j.a})),n.d(e,"ObjectUnsubscribedError",(function(){return N.a})),n.d(e,"UnsubscriptionError",(function(){return T.a})),n.d(e,"TimeoutError",(function(){return P.a})),n.d(e,"bindCallback",(function(){return F})),n.d(e,"bindNodeCallback",(function(){return z})),n.d(e,"combineLatest",(function(){return G.b})),n.d(e,"concat",(function(){return Y.a})),n.d(e,"defer",(function(){return $.a})),n.d(e,"empty",(function(){return K.b})),n.d(e,"forkJoin",(function(){return Z})),n.d(e,"from",(function(){return X.a})),n.d(e,"fromEvent",(function(){return nt})),n.d(e,"fromEventPattern",(function(){return it})),n.d(e,"generate",(function(){return st})),n.d(e,"iif",(function(){return ct})),n.d(e,"interval",(function(){return ut})),n.d(e,"merge",(function(){return ht.a})),n.d(e,"never",(function(){return ft})),n.d(e,"of",(function(){return pt.a})),n.d(e,"onErrorResumeNext",(function(){return bt})),n.d(e,"pairs",(function(){return yt})),n.d(e,"partition",(function(){return wt})),n.d(e,"race",(function(){return Et.a})),n.d(e,"range",(function(){return xt})),n.d(e,"throwError",(function(){return kt.a})),n.d(e,"timer",(function(){return Ct.a})),n.d(e,"using",(function(){return It})),n.d(e,"zip",(function(){return At.b})),n.d(e,"scheduled",(function(){return Ot.a})),n.d(e,"EMPTY",(function(){return K.a})),n.d(e,"NEVER",(function(){return dt})),n.d(e,"config",(function(){return Mt.a}));var r=n(1733),i=n(1796),s=n(1772),o=n(1746),c=n(1736),a=n(1797),u=n(1773),l=n(1764),h=n(1782),d=n(1737),f=n(1784),p=n(121),b=n(1768),y=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return p.__extends(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}(b.a),g=n(1763),m=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return p.__extends(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<i&&(t=n.shift()));if(this.active=!1,e){for(;++r<i&&(t=n.shift());)t.unsubscribe();throw e}},e}(g.a),_=new m(y),v=_,w=function(t){function e(e,n){void 0===e&&(e=E),void 0===n&&(n=Number.POSITIVE_INFINITY);var r=t.call(this,e,(function(){return r.frame}))||this;return r.maxFrames=n,r.frame=0,r.index=-1,r}return p.__extends(e,t),e.prototype.flush=function(){for(var t,e,n=this.actions,r=this.maxFrames;(e=n[0])&&e.delay<=r&&(n.shift(),this.frame=e.delay,!(t=e.execute(e.state,e.delay))););if(t){for(;e=n.shift();)e.unsubscribe();throw t}},e.frameTimeFactor=10,e}(g.a),E=function(t){function e(e,n,r){void 0===r&&(r=e.index+=1);var i=t.call(this,e,n)||this;return i.scheduler=e,i.work=n,i.index=r,i.active=!0,i.index=e.index=r,i}return p.__extends(e,t),e.prototype.schedule=function(n,r){if(void 0===r&&(r=0),!this.id)return t.prototype.schedule.call(this,n,r);this.active=!1;var i=new e(this.scheduler,this.work);return this.add(i),i.schedule(n,r)},e.prototype.requestAsyncId=function(t,n,r){void 0===r&&(r=0),this.delay=t.frame+r;var i=t.actions;return i.push(this),i.sort(e.sortActions),!0},e.prototype.recycleAsyncId=function(t,e,n){void 0===n&&(n=0)},e.prototype._execute=function(e,n){if(!0===this.active)return t.prototype._execute.call(this,e,n)},e.sortActions=function(t,e){return t.delay===e.delay?t.index===e.index?0:t.index>e.index?1:-1:t.delay>e.delay?1:-1},e}(b.a),x=n(1800),S=n(1735),k=n(1732),C=n(1752),I=n(1770),A=n(1775),O=n(1744);function M(t){return!!t&&(t instanceof r.a||"function"===typeof t.lift&&"function"===typeof t.subscribe)}var R=n(1753),j=n(1754),N=n(1760),T=n(1793),P=n(1801),L=n(1739),D=n(1795),B=n(1738),H=n(1743);function F(t,e,n){if(e){if(!Object(H.a)(e))return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return F(t,n).apply(void 0,r).pipe(Object(L.a)((function(t){return Object(B.a)(t)?e.apply(void 0,t):e(t)})))};n=e}return function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var s,o=this,c={context:o,subject:s,callbackFunc:t,scheduler:n};return new r.a((function(r){if(n){var i={args:e,subscriber:r,params:c};return n.schedule(U,0,i)}if(!s){s=new l.a;try{t.apply(o,e.concat([function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];s.next(t.length<=1?t[0]:t),s.complete()}]))}catch(a){Object(D.a)(s)?s.error(a):console.warn(a)}}return s.subscribe(r)}))}}function U(t){var e=this,n=t.args,r=t.subscriber,i=t.params,s=i.callbackFunc,o=i.context,c=i.scheduler,a=i.subject;if(!a){a=i.subject=new l.a;try{s.apply(o,n.concat([function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=t.length<=1?t[0]:t;e.add(c.schedule(W,0,{value:r,subject:a}))}]))}catch(u){a.error(u)}}this.add(a.subscribe(r))}function W(t){var e=t.value,n=t.subject;n.next(e),n.complete()}function z(t,e,n){if(e){if(!Object(H.a)(e))return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return z(t,n).apply(void 0,r).pipe(Object(L.a)((function(t){return Object(B.a)(t)?e.apply(void 0,t):e(t)})))};n=e}return function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var s={subject:void 0,args:e,callbackFunc:t,scheduler:n,context:this};return new r.a((function(r){var i=s.context,o=s.subject;if(n)return n.schedule(q,0,{params:s,subscriber:r,context:i});if(!o){o=s.subject=new l.a;try{t.apply(i,e.concat([function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t.shift();n?o.error(n):(o.next(t.length<=1?t[0]:t),o.complete())}]))}catch(c){Object(D.a)(o)?o.error(c):console.warn(c)}}return o.subscribe(r)}))}}function q(t){var e=this,n=t.params,r=t.subscriber,i=t.context,s=n.callbackFunc,o=n.args,c=n.scheduler,a=n.subject;if(!a){a=n.subject=new l.a;try{s.apply(i,o.concat([function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=t.shift();if(r)e.add(c.schedule(J,0,{err:r,subject:a}));else{var i=t.length<=1?t[0]:t;e.add(c.schedule(V,0,{value:i,subject:a}))}}]))}catch(u){this.add(c.schedule(J,0,{err:u,subject:a}))}}this.add(a.subscribe(r))}function V(t){var e=t.value,n=t.subject;n.next(e),n.complete()}function J(t){var e=t.err;t.subject.error(e)}var G=n(1776),Y=n(1766),$=n(1778),K=n(1740),Q=n(1794),X=n(1741);function Z(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(1===t.length){var n=t[0];if(Object(B.a)(n))return tt(n,null);if(Object(Q.a)(n)&&Object.getPrototypeOf(n)===Object.prototype){var r=Object.keys(n);return tt(r.map((function(t){return n[t]})),r)}}if("function"===typeof t[t.length-1]){var i=t.pop();return tt(t=1===t.length&&Object(B.a)(t[0])?t[0]:t,null).pipe(Object(L.a)((function(t){return i.apply(void 0,t)})))}return tt(t,null)}function tt(t,e){return new r.a((function(n){var r=t.length;if(0!==r)for(var i=new Array(r),s=0,o=0,c=function(c){var a=Object(X.a)(t[c]),u=!1;n.add(a.subscribe({next:function(t){u||(u=!0,o++),i[c]=t},error:function(t){return n.error(t)},complete:function(){++s!==r&&u||(o===r&&n.next(e?e.reduce((function(t,e,n){return t[e]=i[n],t}),{}):i),n.complete())}}))},a=0;a<r;a++)c(a);else n.complete()}))}var et=n(1759);function nt(t,e,n,i){return Object(et.a)(n)&&(i=n,n=void 0),i?nt(t,e,n).pipe(Object(L.a)((function(t){return Object(B.a)(t)?i.apply(void 0,t):i(t)}))):new r.a((function(r){rt(t,e,(function(t){arguments.length>1?r.next(Array.prototype.slice.call(arguments)):r.next(t)}),r,n)}))}function rt(t,e,n,r,i){var s;if(function(t){return t&&"function"===typeof t.addEventListener&&"function"===typeof t.removeEventListener}(t)){var o=t;t.addEventListener(e,n,i),s=function(){return o.removeEventListener(e,n,i)}}else if(function(t){return t&&"function"===typeof t.on&&"function"===typeof t.off}(t)){var c=t;t.on(e,n),s=function(){return c.off(e,n)}}else if(function(t){return t&&"function"===typeof t.addListener&&"function"===typeof t.removeListener}(t)){var a=t;t.addListener(e,n),s=function(){return a.removeListener(e,n)}}else{if(!t||!t.length)throw new TypeError("Invalid event target");for(var u=0,l=t.length;u<l;u++)rt(t[u],e,n,r,i)}r.add(s)}function it(t,e,n){return n?it(t,e).pipe(Object(L.a)((function(t){return Object(B.a)(t)?n.apply(void 0,t):n(t)}))):new r.a((function(n){var r,i=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return n.next(1===t.length?t[0]:t)};try{r=t(i)}catch(s){return void n.error(s)}if(Object(et.a)(e))return function(){return e(i,r)}}))}function st(t,e,n,i,s){var o,c;if(1==arguments.length){var a=t;c=a.initialState,e=a.condition,n=a.iterate,o=a.resultSelector||O.a,s=a.scheduler}else void 0===i||Object(H.a)(i)?(c=t,o=O.a,s=i):(c=t,o=i);return new r.a((function(t){var r=c;if(s)return s.schedule(ot,0,{subscriber:t,iterate:n,condition:e,resultSelector:o,state:r});for(;;){if(e){var i=void 0;try{i=e(r)}catch(u){return void t.error(u)}if(!i){t.complete();break}}var a=void 0;try{a=o(r)}catch(u){return void t.error(u)}if(t.next(a),t.closed)break;try{r=n(r)}catch(u){return void t.error(u)}}}))}function ot(t){var e=t.subscriber,n=t.condition;if(!e.closed){if(t.needIterate)try{t.state=t.iterate(t.state)}catch(s){return void e.error(s)}else t.needIterate=!0;if(n){var r=void 0;try{r=n(t.state)}catch(s){return void e.error(s)}if(!r)return void e.complete();if(e.closed)return}var i;try{i=t.resultSelector(t.state)}catch(s){return void e.error(s)}if(!e.closed&&(e.next(i),!e.closed))return this.schedule(t)}}function ct(t,e,n){return void 0===e&&(e=K.a),void 0===n&&(n=K.a),Object($.a)((function(){return t()?e:n}))}var at=n(1779);function ut(t,e){return void 0===t&&(t=0),void 0===e&&(e=d.a),(!Object(at.a)(t)||t<0)&&(t=0),e&&"function"===typeof e.schedule||(e=d.a),new r.a((function(n){return n.add(e.schedule(lt,t,{subscriber:n,counter:0,period:t})),n}))}function lt(t){var e=t.subscriber,n=t.counter,r=t.period;e.next(n),this.schedule({subscriber:e,counter:n+1,period:r},r)}var ht=n(1803),dt=new r.a(A.a);function ft(){return dt}var pt=n(1761);function bt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(0===t.length)return K.a;var n=t[0],i=t.slice(1);return 1===t.length&&Object(B.a)(n)?bt.apply(void 0,n):new r.a((function(t){var e=function(){return t.add(bt.apply(void 0,i).subscribe(t))};return Object(X.a)(n).subscribe({next:function(e){t.next(e)},error:e,complete:e})}))}function yt(t,e){return e?new r.a((function(n){var r=Object.keys(t),i=new S.a;return i.add(e.schedule(gt,0,{keys:r,index:0,subscriber:n,subscription:i,obj:t})),i})):new r.a((function(e){for(var n=Object.keys(t),r=0;r<n.length&&!e.closed;r++){var i=n[r];t.hasOwnProperty(i)&&e.next([i,t[i]])}e.complete()}))}function gt(t){var e=t.keys,n=t.index,r=t.subscriber,i=t.subscription,s=t.obj;if(!r.closed)if(n<e.length){var o=e[n];r.next([o,s[o]]),i.add(this.schedule({keys:e,index:n+1,subscriber:r,subscription:i,obj:s}))}else r.complete()}var mt=n(1825),_t=n(1783),vt=n(1748);function wt(t,e,n){return[Object(vt.a)(e,n)(new r.a(Object(_t.a)(t))),Object(vt.a)(Object(mt.a)(e,n))(new r.a(Object(_t.a)(t)))]}var Et=n(1804);function xt(t,e,n){return void 0===t&&(t=0),new r.a((function(r){void 0===e&&(e=t,t=0);var i=0,s=t;if(n)return n.schedule(St,0,{index:i,count:e,start:t,subscriber:r});for(;;){if(i++>=e){r.complete();break}if(r.next(s++),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(1774),Ct=n(1805);function It(t,e){return new r.a((function(n){var r,i;try{r=t()}catch(o){return void n.error(o)}try{i=e(r)}catch(o){return void n.error(o)}var s=(i?Object(X.a)(i):K.a).subscribe(n);return function(){s.unsubscribe(),r&&r.unsubscribe()}}))}var At=n(1780),Ot=n(1815),Mt=n(1758)},1758:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=!1,i={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){t&&(new Error).stack;r=t},get useDeprecatedSynchronousErrorHandling(){return r}}},1759:function(t,e,n){"use strict";function r(t){return"function"===typeof t}n.d(e,"a",(function(){return r}))},1760:function(t,e,n){"use strict";n.d(e,"a",(function(){return 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}()},1761:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(1743),i=n(1762),s=n(1799);function o(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[t.length-1];return Object(r.a)(n)?(t.pop(),Object(s.a)(t,n)):Object(i.a)(t)}},1762:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(1733),i=n(1822),s=n(1799);function o(t,e){return e?Object(s.a)(t,e):new r.a(Object(i.a)(t))}},1763:function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(121),i=n(1800),s=function(t){function e(n,r){void 0===r&&(r=i.a.now);var s=t.call(this,n,(function(){return e.delegate&&e.delegate!==s?e.delegate.now():r()}))||this;return s.actions=[],s.active=!1,s.scheduled=void 0,s}return r.__extends(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.a)},1764:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(121),i=n(1736),s=n(1735),o=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.__extends(e,t),e.prototype._subscribe=function(e){return this.hasError?(e.error(this.thrownError),s.a.EMPTY):this.hasCompleted&&this.hasNext?(e.next(this.value),e.complete(),s.a.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.a)},1765:function(t,e,n){"use strict";function r(){return"function"===typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}n.d(e,"a",(function(){return i}));var i=r()},1766:function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(1761),i=n(1802);function s(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Object(i.a)()(r.a.apply(void 0,t))}},1767:function(t,e){function n(t){return t.sort(((t,e)=>"latest"===t||"earliest"===e?1:"latest"===e||"earliest"===t?-1:r(t)-r(e)))}function r(t){return void 0===t||null===t?t:Number.parseInt(t,16)}function i(t){if(void 0===t||null===t)return t;let e=t.toString(16);return e.length%2&&(e="0"+e),"0x"+e}function s(){return Math.floor(16*Math.random()).toString(16)}t.exports={minBlockRef:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];const i=n(e);return i[0]},maxBlockRef:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];const i=n(e);return i[i.length-1]},sortBlockRefs:n,bnToHex:function(t){return"0x"+t.toString(16)},blockRefIsNumber:function(t){return t&&!["earliest","latest","pending"].includes(t)},hexToInt:r,incrementHexInt:function(t){if(void 0===t||null===t)return t;return i(r(t)+1)},intToHex:i,unsafeRandomBytes:function(t){let e="0x";for(let n=0;n<t;n++)e+=s(),e+=s();return e}}},1768:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(121),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.__extends(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(i){n=!0,r=!!i&&i||new Error(i)}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.__extends(e,t),e.prototype.schedule=function(t,e){return void 0===e&&(e=0),this},e}(n(1735).a))},1769:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(42);function i(t,e,n){try{Reflect.apply(t,e,n)}catch(r){setTimeout((()=>{throw r}))}}class s extends r.EventEmitter{emit(t){let e="error"===t;const n=this._events;if(void 0!==n)e=e&&void 0===n.error;else if(!e)return!1;for(var r=arguments.length,s=new Array(r>1?r-1:0),o=1;o<r;o++)s[o-1]=arguments[o];if(e){let t;if(s.length>0&&([t]=s),t instanceof Error)throw t;const e=new Error("Unhandled error."+(t?` (${t.message})`:""));throw e.context=t,e}const c=n[t];if(void 0===c)return!1;if("function"===typeof c)i(c,this,s);else{const t=c.length,e=function(t){const e=t.length,n=new Array(e);for(let r=0;r<e;r+=1)n[r]=t[r];return n}(c);for(let n=0;n<t;n+=1)i(e[n],this,s)}return!0}}e.default=s},1770:function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return s}));var r=n(1744);function i(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return s(t)}function s(t){return 0===t.length?r.a:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}}},1771:function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(121),i=n(1732);function s(){return function(t){return t.lift(new o(t))}}var o=function(){function t(t){this.connectable=t}return t.prototype.call=function(t,e){var n=this.connectable;n._refCount++;var r=new c(t,n),i=e.subscribe(r);return r.closed||(r.connection=n.connect()),i},t}(),c=function(t){function e(e,n){var r=t.call(this,e)||this;return r.connectable=n,r}return r.__extends(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.a)},1772:function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"a",(function(){return d}));var r=n(121),i=n(1732),s=n(1735),o=n(1733),c=n(1736);function a(t,e,n,r){return function(i){return i.lift(new u(t,e,n,r))}}var u=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,s){var o=t.call(this,e)||this;return o.keySelector=n,o.elementSelector=r,o.durationSelector=i,o.subjectSelector=s,o.groups=null,o.attemptedToUnsubscribe=!1,o.count=0,o}return r.__extends(e,t),e.prototype._next=function(t){var e;try{e=this.keySelector(t)}catch(n){return void this.error(n)}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(a){this.error(a)}else r=t;if(!i){i=this.subjectSelector?this.subjectSelector():new c.a,n.set(e,i);var s=new d(e,i,this);if(this.destination.next(s),this.durationSelector){var o=void 0;try{o=this.durationSelector(new d(e,i))}catch(a){return void this.error(a)}this.add(o.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.a),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.__extends(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.a),d=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.__extends(e,t),e.prototype._subscribe=function(t){var e=new s.a,n=this.refCountSubscription,r=this.groupSubject;return n&&!n.closed&&e.add(new f(n)),e.add(r.subscribe(t)),e},e}(o.a),f=function(t){function e(e){var n=t.call(this)||this;return n.parent=e,e.count++,n}return r.__extends(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}(s.a)},1773:function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var r=n(121),i=n(1736),s=n(1784),o=n(1735),c=n(1798),a=n(1760),u=n(1821),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.__extends(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,s=r.length;if(this.closed)throw new a.a;if(this.isStopped||this.hasError?e=o.a.EMPTY:(this.observers.push(t),e=new u.a(this,t)),i&&t.add(t=new c.a(t,i)),n)for(var l=0;l<s&&!t.closed;l++)t.next(r[l]);else for(l=0;l<s&&!t.closed;l++)t.next(r[l].value);return this.hasError?t.error(this.thrownError):this.isStopped&&t.complete(),e},e.prototype._getNow=function(){return(this.scheduler||s.a).now()},e.prototype._trimBufferThenGetEvents=function(){for(var t=this._getNow(),e=this._bufferSize,n=this._windowTime,r=this._events,i=r.length,s=0;s<i&&!(t-r[s].time<n);)s++;return i>e&&(s=Math.max(s,i-e)),s>0&&r.splice(0,s),r},e}(i.a),h=function(){return function(t,e){this.time=t,this.value=e}}()},1774:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(1733);function i(t,e){return e?new r.a((function(n){return e.schedule(s,0,{error:t,subscriber:n})})):new r.a((function(e){return e.error(t)}))}function s(t){var e=t.error;t.subscriber.error(e)}},1775:function(t,e,n){"use strict";function r(){}n.d(e,"a",(function(){return r}))},1776:function(t,e,n){"use strict";n.d(e,"b",(function(){return l})),n.d(e,"a",(function(){return h}));var r=n(121),i=n(1743),s=n(1738),o=n(1747),c=n(1751),a=n(1762),u={};function l(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=void 0,r=void 0;return Object(i.a)(t[t.length-1])&&(r=t.pop()),"function"===typeof t[t.length-1]&&(n=t.pop()),1===t.length&&Object(s.a)(t[0])&&(t=t[0]),Object(a.a)(t,r).lift(new h(n))}var h=function(){function t(t){this.resultSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new d(t,this.resultSelector))},t}(),d=function(t){function e(e,n){var r=t.call(this,e)||this;return r.resultSelector=n,r.active=0,r.values=[],r.observables=[],r}return r.__extends(e,t),e.prototype._next=function(t){this.values.push(u),this.observables.push(t)},e.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(var n=0;n<e;n++){var r=t[n];this.add(Object(c.a)(this,r,void 0,n))}}},e.prototype.notifyComplete=function(t){0===(this.active-=1)&&this.destination.complete()},e.prototype.notifyNext=function(t,e,n){var r=this.values,i=r[n],s=this.toRespond?i===u?--this.toRespond:this.toRespond:0;r[n]=e,0===s&&(this.resultSelector?this._tryResultSelector(r):this.destination.next(r.slice()))},e.prototype._tryResultSelector=function(t){var e;try{e=this.resultSelector.apply(this,t)}catch(n){return void this.destination.error(n)}this.destination.next(e)},e}(o.a)},1777:function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(1755),i=n(1744);function s(t){return void 0===t&&(t=Number.POSITIVE_INFINITY),Object(r.b)(i.a,t)}},1778:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(1733),i=n(1741),s=n(1740);function o(t){return new r.a((function(e){var n;try{n=t()}catch(r){return void e.error(r)}return(n?Object(i.a)(n):Object(s.b)()).subscribe(e)}))}},1779:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(1738);function i(t){return!Object(r.a)(t)&&t-parseFloat(t)+1>=0}},1780:function(t,e,n){"use strict";n.d(e,"b",(function(){return u})),n.d(e,"a",(function(){return l}));var r=n(121),i=n(1762),s=n(1738),o=n(1732),c=n(1765),a=n(1734);function u(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[t.length-1];return"function"===typeof n&&t.pop(),Object(i.a)(t,void 0).lift(new l(n))}var l=function(){function t(t){this.resultSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new h(t,this.resultSelector))},t}(),h=function(t){function e(e,n,r){void 0===r&&(r=Object.create(null));var i=t.call(this,e)||this;return i.resultSelector=n,i.iterators=[],i.active=0,i.resultSelector="function"===typeof n?n:void 0,i}return r.__extends(e,t),e.prototype._next=function(t){var e=this.iterators;Object(s.a)(t)?e.push(new f(t)):"function"===typeof t[c.a]?e.push(new d(t[c.a]())):e.push(new p(this.destination,this,t))},e.prototype._complete=function(){var t=this.iterators,e=t.length;if(this.unsubscribe(),0!==e){this.active=e;for(var n=0;n<e;n++){var r=t[n];if(r.stillUnsubscribed)this.destination.add(r.subscribe());else this.active--}}else this.destination.complete()},e.prototype.notifyInactive=function(){this.active--,0===this.active&&this.destination.complete()},e.prototype.checkIterators=function(){for(var t=this.iterators,e=t.length,n=this.destination,r=0;r<e;r++){if("function"===typeof(o=t[r]).hasValue&&!o.hasValue())return}var i=!1,s=[];for(r=0;r<e;r++){var o,c=(o=t[r]).next();if(o.hasCompleted()&&(i=!0),c.done)return void n.complete();s.push(c.value)}this.resultSelector?this._tryresultSelector(s):n.next(s),i&&n.complete()},e.prototype._tryresultSelector=function(t){var e;try{e=this.resultSelector.apply(this,t)}catch(n){return void this.destination.error(n)}this.destination.next(e)},e}(o.a),d=function(){function t(t){this.iterator=t,this.nextResult=t.next()}return t.prototype.hasValue=function(){return!0},t.prototype.next=function(){var t=this.nextResult;return this.nextResult=this.iterator.next(),t},t.prototype.hasCompleted=function(){var t=this.nextResult;return Boolean(t&&t.done)},t}(),f=function(){function t(t){this.array=t,this.index=0,this.length=0,this.length=t.length}return t.prototype[c.a]=function(){return this},t.prototype.next=function(t){var e=this.index++,n=this.array;return e<this.length?{value:n[e],done:!1}:{value:null,done:!0}},t.prototype.hasValue=function(){return this.array.length>this.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.__extends(e,t),e.prototype[c.a]=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 Object(a.c)(this.observable,new a.a(this))},e}(a.b)},1781:function(t,e,n){"use strict";n.r(e),n.d(e,"audit",(function(){return s})),n.d(e,"auditTime",(function(){return l})),n.d(e,"buffer",(function(){return h})),n.d(e,"bufferCount",(function(){return b})),n.d(e,"bufferTime",(function(){return v})),n.d(e,"bufferToggle",(function(){return M})),n.d(e,"bufferWhen",(function(){return N})),n.d(e,"catchError",(function(){return L})),n.d(e,"combineAll",(function(){return F})),n.d(e,"combineLatest",(function(){return z})),n.d(e,"concat",(function(){return V})),n.d(e,"concatAll",(function(){return J.a})),n.d(e,"concatMap",(function(){return Y})),n.d(e,"concatMapTo",(function(){return $})),n.d(e,"count",(function(){return K})),n.d(e,"debounce",(function(){return Z})),n.d(e,"debounceTime",(function(){return nt})),n.d(e,"defaultIfEmpty",(function(){return ot})),n.d(e,"delay",(function(){return ht})),n.d(e,"delayWhen",(function(){return yt})),n.d(e,"dematerialize",(function(){return wt})),n.d(e,"distinct",(function(){return St})),n.d(e,"distinctUntilChanged",(function(){return It})),n.d(e,"distinctUntilKeyChanged",(function(){return Mt})),n.d(e,"elementAt",(function(){return Wt})),n.d(e,"endWith",(function(){return qt})),n.d(e,"every",(function(){return Vt})),n.d(e,"exhaust",(function(){return Yt})),n.d(e,"exhaustMap",(function(){return Xt})),n.d(e,"expand",(function(){return ee})),n.d(e,"filter",(function(){return jt.a})),n.d(e,"finalize",(function(){return ie})),n.d(e,"find",(function(){return ce})),n.d(e,"findIndex",(function(){return le})),n.d(e,"first",(function(){return de})),n.d(e,"groupBy",(function(){return fe.b})),n.d(e,"ignoreElements",(function(){return pe})),n.d(e,"isEmpty",(function(){return ge})),n.d(e,"last",(function(){return xe})),n.d(e,"map",(function(){return Qt.a})),n.d(e,"mapTo",(function(){return Se})),n.d(e,"materialize",(function(){return Ie})),n.d(e,"max",(function(){return Pe})),n.d(e,"merge",(function(){return De})),n.d(e,"mergeAll",(function(){return Be.a})),n.d(e,"mergeMap",(function(){return G.b})),n.d(e,"flatMap",(function(){return G.a})),n.d(e,"mergeMapTo",(function(){return He})),n.d(e,"mergeScan",(function(){return Fe})),n.d(e,"min",(function(){return ze})),n.d(e,"multicast",(function(){return Ve})),n.d(e,"observeOn",(function(){return Ge.b})),n.d(e,"onErrorResumeNext",(function(){return Ye})),n.d(e,"pairwise",(function(){return Qe})),n.d(e,"partition",(function(){return en})),n.d(e,"pluck",(function(){return nn})),n.d(e,"publish",(function(){return on})),n.d(e,"publishBehavior",(function(){return an})),n.d(e,"publishLast",(function(){return ln})),n.d(e,"publishReplay",(function(){return dn})),n.d(e,"race",(function(){return pn})),n.d(e,"reduce",(function(){return Te})),n.d(e,"repeat",(function(){return bn})),n.d(e,"repeatWhen",(function(){return mn})),n.d(e,"retry",(function(){return wn})),n.d(e,"retryWhen",(function(){return Sn})),n.d(e,"refCount",(function(){return In.a})),n.d(e,"sample",(function(){return An})),n.d(e,"sampleTime",(function(){return Rn})),n.d(e,"scan",(function(){return Me})),n.d(e,"sequenceEqual",(function(){return Pn})),n.d(e,"share",(function(){return Fn})),n.d(e,"shareReplay",(function(){return Un})),n.d(e,"single",(function(){return Wn})),n.d(e,"skip",(function(){return Vn})),n.d(e,"skipLast",(function(){return Yn})),n.d(e,"skipUntil",(function(){return Qn})),n.d(e,"skipWhile",(function(){return tr})),n.d(e,"startWith",(function(){return rr})),n.d(e,"subscribeOn",(function(){return cr})),n.d(e,"switchAll",(function(){return dr})),n.d(e,"switchMap",(function(){return ur})),n.d(e,"switchMapTo",(function(){return fr})),n.d(e,"take",(function(){return Ht})),n.d(e,"takeLast",(function(){return ve})),n.d(e,"takeUntil",(function(){return pr})),n.d(e,"takeWhile",(function(){return gr})),n.d(e,"tap",(function(){return Er})),n.d(e,"throttle",(function(){return Cr})),n.d(e,"throttleTime",(function(){return Or})),n.d(e,"throwIfEmpty",(function(){return Tt})),n.d(e,"timeInterval",(function(){return Tr})),n.d(e,"timeout",(function(){return Ur})),n.d(e,"timeoutWith",(function(){return Dr})),n.d(e,"timestamp",(function(){return Wr})),n.d(e,"toArray",(function(){return Vr})),n.d(e,"window",(function(){return Jr})),n.d(e,"windowCount",(function(){return $r})),n.d(e,"windowTime",(function(){return Xr})),n.d(e,"windowToggle",(function(){return si})),n.d(e,"windowWhen",(function(){return ai})),n.d(e,"withLatestFrom",(function(){return hi})),n.d(e,"zip",(function(){return bi})),n.d(e,"zipAll",(function(){return yi}));var r=n(121),i=n(1734);function s(t){return function(e){return e.lift(new o(t))}}var o=function(){function t(t){this.durationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new c(t,this.durationSelector))},t}(),c=function(t){function e(e,n){var r=t.call(this,e)||this;return r.durationSelector=n,r.hasValue=!1,r}return r.__extends(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(r){return this.destination.error(r)}var n=Object(i.c)(e,new i.a(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.b),a=n(1737),u=n(1805);function l(t,e){return void 0===e&&(e=a.a),s((function(){return Object(u.a)(t,e)}))}function h(t){return function(e){return e.lift(new d(t))}}var d=function(){function t(t){this.closingNotifier=t}return t.prototype.call=function(t,e){return e.subscribe(new f(t,this.closingNotifier))},t}(),f=function(t){function e(e,n){var r=t.call(this,e)||this;return r.buffer=[],r.add(Object(i.c)(n,new i.a(r))),r}return r.__extends(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.b),p=n(1732);function b(t,e){return void 0===e&&(e=null),function(n){return n.lift(new y(t,e))}}var y=function(){function t(t,e){this.bufferSize=t,this.startBufferEvery=e,this.subscriberClass=e&&t!==e?m:g}return t.prototype.call=function(t,e){return e.subscribe(new this.subscriberClass(t,this.bufferSize,this.startBufferEvery))},t}(),g=function(t){function e(e,n){var r=t.call(this,e)||this;return r.bufferSize=n,r.buffer=[],r}return r.__extends(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.a),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.__extends(e,t),e.prototype._next=function(t){var e=this,n=e.bufferSize,r=e.startBufferEvery,i=e.buffers,s=e.count;this.count++,s%r===0&&i.push([]);for(var o=i.length;o--;){var c=i[o];c.push(t),c.length===n&&(i.splice(o,1),this.destination.next(c))}},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.a),_=n(1743);function v(t){var e=arguments.length,n=a.a;Object(_.a)(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 w(t,r,i,n))}}var w=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 x(t,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))},t}(),E=function(){return function(){this.buffer=[]}}(),x=function(t){function e(e,n,r,i,s){var o=t.call(this,e)||this;o.bufferTimeSpan=n,o.bufferCreationInterval=r,o.maxBufferSize=i,o.scheduler=s,o.contexts=[];var c=o.openContext();if(o.timespanOnly=null==r||r<0,o.timespanOnly){var a={subscriber:o,context:c,bufferTimeSpan:n};o.add(c.closeAction=s.schedule(S,n,a))}else{var u={subscriber:o,context:c},l={bufferTimeSpan:n,bufferCreationInterval:r,subscriber:o,scheduler:s};o.add(c.closeAction=s.schedule(C,n,u)),o.add(s.schedule(k,r,l))}return o}return r.__extends(e,t),e.prototype._next=function(t){for(var e,n=this.contexts,r=n.length,i=0;i<r;i++){var s=n[i],o=s.buffer;o.push(t),o.length==this.maxBufferSize&&(e=s)}e&&this.onBufferFull(e)},e.prototype._error=function(e){this.contexts.length=0,t.prototype._error.call(this,e)},e.prototype._complete=function(){for(var e=this.contexts,n=this.destination;e.length>0;){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(S,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.a);function S(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 k(t){var e=t.bufferCreationInterval,n=t.bufferTimeSpan,r=t.subscriber,i=t.scheduler,s=r.openContext();r.closed||(r.add(s.closeAction=i.schedule(C,n,{subscriber:r,context:s})),this.schedule(t,e))}function C(t){var e=t.subscriber,n=t.context;e.closeContext(n)}var I=n(1735),A=n(1751),O=n(1747);function M(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 j(t,this.openings,this.closingSelector))},t}(),j=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.closingSelector=r,i.contexts=[],i.add(Object(A.a)(i,n)),i}return r.__extends(e,t),e.prototype._next=function(t){for(var e=this.contexts,n=e.length,r=0;r<n;r++)e[r].buffer.push(t)},e.prototype._error=function(e){for(var n=this.contexts;n.length>0;){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(n){this._error(n)}},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 I.a,r={buffer:[],subscription:n};e.push(r);var i=Object(A.a)(this,t,r);!i||i.closed?this.closeBuffer(r):(i.context=r,this.add(i),n.add(i))},e}(O.a);function N(t){return function(e){return e.lift(new T(t))}}var T=function(){function t(t){this.closingSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new P(t,this.closingSelector))},t}(),P=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.__extends(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(r){return this.error(r)}t=new I.a,this.closingSubscription=t,this.add(t),this.subscribing=!0,t.add(Object(i.c)(e,new i.a(this))),this.subscribing=!1},e}(i.b);function L(t){return function(e){var n=new D(t),r=e.lift(n);return n.caught=r}}var D=function(){function t(t){this.selector=t}return t.prototype.call=function(t,e){return e.subscribe(new B(t,this.selector,this.caught))},t}(),B=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.selector=n,i.caught=r,i}return r.__extends(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=void 0;try{n=this.selector(e,this.caught)}catch(o){return void t.prototype.error.call(this,o)}this._unsubscribeAndRecycle();var r=new i.a(this);this.add(r);var s=Object(i.c)(n,r);s!==r&&this.add(s)}},e}(i.b),H=n(1776);function F(t){return function(e){return e.lift(new H.a(t))}}var U=n(1738),W=n(1741);function z(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=null;return"function"===typeof t[t.length-1]&&(n=t.pop()),1===t.length&&Object(U.a)(t[0])&&(t=t[0].slice()),function(e){return e.lift.call(Object(W.a)([e].concat(t)),new H.a(n))}}var q=n(1766);function V(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return e.lift.call(q.a.apply(void 0,[e].concat(t)))}}var J=n(1802),G=n(1755);function Y(t,e){return Object(G.b)(t,e,1)}function $(t,e){return Y((function(){return t}),e)}function K(t){return function(e){return e.lift(new Q(t,e))}}var Q=function(){function t(t,e){this.predicate=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new X(t,this.predicate,this.source))},t}(),X=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.predicate=n,i.source=r,i.count=0,i.index=0,i}return r.__extends(e,t),e.prototype._next=function(t){this.predicate?this._tryPredicate(t):this.count++},e.prototype._tryPredicate=function(t){var e;try{e=this.predicate(t,this.index++,this.source)}catch(n){return void this.destination.error(n)}e&&this.count++},e.prototype._complete=function(){this.destination.next(this.count),this.destination.complete()},e}(p.a);function Z(t){return function(e){return e.lift(new tt(t))}}var tt=function(){function t(t){this.durationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new et(t,this.durationSelector))},t}(),et=function(t){function e(e,n){var r=t.call(this,e)||this;return r.durationSelector=n,r.hasValue=!1,r}return r.__extends(e,t),e.prototype._next=function(t){try{var e=this.durationSelector.call(this,t);e&&this._tryNext(t,e)}catch(n){this.destination.error(n)}},e.prototype._complete=function(){this.emitValue(),this.destination.complete()},e.prototype._tryNext=function(t,e){var n=this.durationSubscription;this.value=t,this.hasValue=!0,n&&(n.unsubscribe(),this.remove(n)),(n=Object(i.c)(e,new i.a(this)))&&!n.closed&&this.add(this.durationSubscription=n)},e.prototype.notifyNext=function(){this.emitValue()},e.prototype.notifyComplete=function(){this.emitValue()},e.prototype.emitValue=function(){if(this.hasValue){var e=this.value,n=this.durationSubscription;n&&(this.durationSubscription=void 0,n.unsubscribe(),this.remove(n)),this.value=void 0,this.hasValue=!1,t.prototype._next.call(this,e)}},e}(i.b);function nt(t,e){return void 0===e&&(e=a.a),function(n){return n.lift(new rt(t,e))}}var rt=function(){function t(t,e){this.dueTime=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new it(t,this.dueTime,this.scheduler))},t}(),it=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.dueTime=n,i.scheduler=r,i.debouncedSubscription=null,i.lastValue=null,i.hasValue=!1,i}return r.__extends(e,t),e.prototype._next=function(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(st,this.dueTime,this))},e.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},e.prototype.debouncedNext=function(){if(this.clearDebounce(),this.hasValue){var t=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(t)}},e.prototype.clearDebounce=function(){var t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)},e}(p.a);function st(t){t.debouncedNext()}function ot(t){return void 0===t&&(t=null),function(e){return e.lift(new ct(t))}}var ct=function(){function t(t){this.defaultValue=t}return t.prototype.call=function(t,e){return e.subscribe(new at(t,this.defaultValue))},t}(),at=function(t){function e(e,n){var r=t.call(this,e)||this;return r.defaultValue=n,r.isEmpty=!0,r}return r.__extends(e,t),e.prototype._next=function(t){this.isEmpty=!1,this.destination.next(t)},e.prototype._complete=function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()},e}(p.a);function ut(t){return t instanceof Date&&!isNaN(+t)}var lt=n(1752);function ht(t,e){void 0===e&&(e=a.a);var n=ut(t)?+t-e.now():Math.abs(t);return function(t){return t.lift(new dt(n,e))}}var dt=function(){function t(t,e){this.delay=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new ft(t,this.delay,this.scheduler))},t}(),ft=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.delay=n,i.scheduler=r,i.queue=[],i.active=!1,i.errored=!1,i}return r.__extends(e,t),e.dispatch=function(t){for(var e=t.source,n=e.queue,r=t.scheduler,i=t.destination;n.length>0&&n[0].time-r.now()<=0;)n.shift().notification.observe(i);if(n.length>0){var s=Math.max(0,n[0].time-r.now());this.schedule(t,s)}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.a.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.a.createComplete()),this.unsubscribe()},e}(p.a),pt=function(){return function(t,e){this.time=t,this.notification=e}}(),bt=n(1733);function yt(t,e){return e?function(n){return new _t(n,e).lift(new gt(t))}:function(e){return e.lift(new gt(t))}}var gt=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.__extends(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(r){this.destination.error(r)}},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=Object(A.a)(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}(O.a),_t=function(t){function e(e,n){var r=t.call(this)||this;return r.source=e,r.subscriptionDelay=n,r}return r.__extends(e,t),e.prototype._subscribe=function(t){this.subscriptionDelay.subscribe(new vt(t,this.source))},e}(bt.a),vt=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.__extends(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.a);function wt(){return function(t){return t.lift(new Et)}}var Et=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new xt(t))},t}(),xt=function(t){function e(e){return t.call(this,e)||this}return r.__extends(e,t),e.prototype._next=function(t){t.observe(this.destination)},e}(p.a);function St(t,e){return function(n){return n.lift(new kt(t,e))}}var kt=function(){function t(t,e){this.keySelector=t,this.flushes=e}return t.prototype.call=function(t,e){return e.subscribe(new Ct(t,this.keySelector,this.flushes))},t}(),Ct=function(t){function e(e,n,r){var s=t.call(this,e)||this;return s.keySelector=n,s.values=new Set,r&&s.add(Object(i.c)(r,new i.a(s))),s}return r.__extends(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(r){return void n.error(r)}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.b);function It(t,e){return function(n){return n.lift(new At(t,e))}}var At=function(){function t(t,e){this.compare=t,this.keySelector=e}return t.prototype.call=function(t,e){return e.subscribe(new Ot(t,this.compare,this.keySelector))},t}(),Ot=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.__extends(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(i){return this.destination.error(i)}var r=!1;if(this.hasKey)try{r=(0,this.compare)(this.key,e)}catch(i){return this.destination.error(i)}else this.hasKey=!0;r||(this.key=e,this.destination.next(t))},e}(p.a);function Mt(t,e){return It((function(n,r){return e?e(n[t],r[t]):n[t]===r[t]}))}var Rt=n(1753),jt=n(1748),Nt=n(1754);function Tt(t){return void 0===t&&(t=Dt),function(e){return e.lift(new Pt(t))}}var Pt=function(){function t(t){this.errorFactory=t}return t.prototype.call=function(t,e){return e.subscribe(new Lt(t,this.errorFactory))},t}(),Lt=function(t){function e(e,n){var r=t.call(this,e)||this;return r.errorFactory=n,r.hasValue=!1,r}return r.__extends(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.a);function Dt(){return new Nt.a}var Bt=n(1740);function Ht(t){return function(e){return 0===t?Object(Bt.b)():e.lift(new Ft(t))}}var Ft=function(){function t(t){if(this.total=t,this.total<0)throw new Rt.a}return t.prototype.call=function(t,e){return e.subscribe(new Ut(t,this.total))},t}(),Ut=function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.count=0,r}return r.__extends(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.a);function Wt(t,e){if(t<0)throw new Rt.a;var n=arguments.length>=2;return function(r){return r.pipe(Object(jt.a)((function(e,n){return n===t})),Ht(1),n?ot(e):Tt((function(){return new Rt.a})))}}var zt=n(1761);function qt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return Object(q.a)(e,zt.a.apply(void 0,t))}}function Vt(t,e){return function(n){return n.lift(new Jt(t,e,n))}}var Jt=function(){function t(t,e,n){this.predicate=t,this.thisArg=e,this.source=n}return t.prototype.call=function(t,e){return e.subscribe(new Gt(t,this.predicate,this.thisArg,this.source))},t}(),Gt=function(t){function e(e,n,r,i){var s=t.call(this,e)||this;return s.predicate=n,s.thisArg=r,s.source=i,s.index=0,s.thisArg=r||s,s}return r.__extends(e,t),e.prototype.notifyComplete=function(t){this.destination.next(t),this.destination.complete()},e.prototype._next=function(t){var e=!1;try{e=this.predicate.call(this.thisArg,t,this.index++,this.source)}catch(n){return void this.destination.error(n)}e||this.notifyComplete(!1)},e.prototype._complete=function(){this.notifyComplete(!0)},e}(p.a);function Yt(){return function(t){return t.lift(new $t)}}var $t=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Kt(t))},t}(),Kt=function(t){function e(e){var n=t.call(this,e)||this;return n.hasCompleted=!1,n.hasSubscription=!1,n}return r.__extends(e,t),e.prototype._next=function(t){this.hasSubscription||(this.hasSubscription=!0,this.add(Object(i.c)(t,new i.a(this))))},e.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete()},e.prototype.notifyComplete=function(){this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},e}(i.b),Qt=n(1739);function Xt(t,e){return e?function(n){return n.pipe(Xt((function(n,r){return Object(W.a)(t(n,r)).pipe(Object(Qt.a)((function(t,i){return e(n,t,r,i)})))})))}:function(e){return e.lift(new Zt(t))}}var Zt=function(){function t(t){this.project=t}return t.prototype.call=function(t,e){return e.subscribe(new te(t,this.project))},t}(),te=function(t){function e(e,n){var r=t.call(this,e)||this;return r.project=n,r.hasSubscription=!1,r.hasCompleted=!1,r.index=0,r}return r.__extends(e,t),e.prototype._next=function(t){this.hasSubscription||this.tryNext(t)},e.prototype.tryNext=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(r){return void this.destination.error(r)}this.hasSubscription=!0,this._innerSub(e)},e.prototype._innerSub=function(t){var e=new i.a(this),n=this.destination;n.add(e);var r=Object(i.c)(t,e);r!==e&&n.add(r)},e.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete(),this.unsubscribe()},e.prototype.notifyNext=function(t){this.destination.next(t)},e.prototype.notifyError=function(t){this.destination.error(t)},e.prototype.notifyComplete=function(){this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},e}(i.b);function ee(t,e,n){return void 0===e&&(e=Number.POSITIVE_INFINITY),e=(e||0)<1?Number.POSITIVE_INFINITY:e,function(r){return r.lift(new ne(t,e,n))}}var ne=function(){function t(t,e,n){this.project=t,this.concurrent=e,this.scheduler=n}return t.prototype.call=function(t,e){return e.subscribe(new re(t,this.project,this.concurrent,this.scheduler))},t}(),re=function(t){function e(e,n,r,i){var s=t.call(this,e)||this;return s.project=n,s.concurrent=r,s.scheduler=i,s.index=0,s.active=0,s.hasCompleted=!1,r<Number.POSITIVE_INFINITY&&(s.buffer=[]),s}return r.__extends(e,t),e.dispatch=function(t){var e=t.subscriber,n=t.result,r=t.value,i=t.index;e.subscribeToProjection(n,r,i)},e.prototype._next=function(t){var n=this.destination;if(n.closed)this._complete();else{var r=this.index++;if(this.active<this.concurrent){n.next(t);try{var i=(0,this.project)(t,r);if(this.scheduler){var s={subscriber:this,result:i,value:t,index:r};this.destination.add(this.scheduler.schedule(e.dispatch,0,s))}else this.subscribeToProjection(i,t,r)}catch(o){n.error(o)}}else this.buffer.push(t)}},e.prototype.subscribeToProjection=function(t,e,n){this.active++,this.destination.add(Object(i.c)(t,new i.a(this)))},e.prototype._complete=function(){this.hasCompleted=!0,this.hasCompleted&&0===this.active&&this.destination.complete(),this.unsubscribe()},e.prototype.notifyNext=function(t){this._next(t)},e.prototype.notifyComplete=function(){var t=this.buffer;this.active--,t&&t.length>0&&this._next(t.shift()),this.hasCompleted&&0===this.active&&this.destination.complete()},e}(i.b);function ie(t){return function(e){return e.lift(new se(t))}}var se=function(){function t(t){this.callback=t}return t.prototype.call=function(t,e){return e.subscribe(new oe(t,this.callback))},t}(),oe=function(t){function e(e,n){var r=t.call(this,e)||this;return r.add(new I.a(n)),r}return r.__extends(e,t),e}(p.a);function ce(t,e){if("function"!==typeof t)throw new TypeError("predicate is not a function");return function(n){return n.lift(new ae(t,n,!1,e))}}var ae=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 ue(t,this.predicate,this.source,this.yieldIndex,this.thisArg))},t}(),ue=function(t){function e(e,n,r,i,s){var o=t.call(this,e)||this;return o.predicate=n,o.source=r,o.yieldIndex=i,o.thisArg=s,o.index=0,o}return r.__extends(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(i){this.destination.error(i)}},e.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0)},e}(p.a);function le(t,e){return function(n){return n.lift(new ae(t,n,!0,e))}}var he=n(1744);function de(t,e){var n=arguments.length>=2;return function(r){return r.pipe(t?Object(jt.a)((function(e,n){return t(e,n,r)})):he.a,Ht(1),n?ot(e):Tt((function(){return new Nt.a})))}}var fe=n(1772);function pe(){return function(t){return t.lift(new be)}}var be=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new ye(t))},t}(),ye=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype._next=function(t){},e}(p.a);function ge(){return function(t){return t.lift(new me)}}var me=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new _e(t))},t}(),_e=function(t){function e(e){return t.call(this,e)||this}return r.__extends(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.a);function ve(t){return function(e){return 0===t?Object(Bt.b)():e.lift(new we(t))}}var we=function(){function t(t){if(this.total=t,this.total<0)throw new Rt.a}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.__extends(e,t),e.prototype._next=function(t){var e=this.ring,n=this.total,r=this.count++;e.length<n?e.push(t):e[r%n]=t},e.prototype._complete=function(){var t=this.destination,e=this.count;if(e>0)for(var n=this.count>=this.total?this.total:this.count,r=this.ring,i=0;i<n;i++){var s=e++%n;t.next(r[s])}t.complete()},e}(p.a);function xe(t,e){var n=arguments.length>=2;return function(r){return r.pipe(t?Object(jt.a)((function(e,n){return t(e,n,r)})):he.a,ve(1),n?ot(e):Tt((function(){return new Nt.a})))}}function Se(t){return function(e){return e.lift(new ke(t))}}var ke=function(){function t(t){this.value=t}return t.prototype.call=function(t,e){return e.subscribe(new Ce(t,this.value))},t}(),Ce=function(t){function e(e,n){var r=t.call(this,e)||this;return r.value=n,r}return r.__extends(e,t),e.prototype._next=function(t){this.destination.next(this.value)},e}(p.a);function Ie(){return function(t){return t.lift(new Ae)}}var Ae=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Oe(t))},t}(),Oe=function(t){function e(e){return t.call(this,e)||this}return r.__extends(e,t),e.prototype._next=function(t){this.destination.next(lt.a.createNext(t))},e.prototype._error=function(t){var e=this.destination;e.next(lt.a.createError(t)),e.complete()},e.prototype._complete=function(){var t=this.destination;t.next(lt.a.createComplete()),t.complete()},e}(p.a);function Me(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 je(t,this.accumulator,this.seed,this.hasSeed))},t}(),je=function(t){function e(e,n,r,i){var s=t.call(this,e)||this;return s.accumulator=n,s._seed=r,s.hasSeed=i,s.index=0,s}return r.__extends(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(r){this.destination.error(r)}this.seed=e,this.destination.next(e)},e}(p.a),Ne=n(1770);function Te(t,e){return arguments.length>=2?function(n){return Object(Ne.a)(Me(t,e),ve(1),ot(e))(n)}:function(e){return Object(Ne.a)(Me((function(e,n,r){return t(e,n,r+1)})),ve(1))(e)}}function Pe(t){return Te("function"===typeof t?function(e,n){return t(e,n)>0?e:n}:function(t,e){return t>e?t:e})}var Le=n(1803);function De(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return e.lift.call(Le.a.apply(void 0,[e].concat(t)))}}var Be=n(1777);function He(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"===typeof e?Object(G.b)((function(){return t}),e,n):("number"===typeof e&&(n=e),Object(G.b)((function(){return t}),n))}function Fe(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),function(r){return r.lift(new Ue(t,e,n))}}var Ue=function(){function t(t,e,n){this.accumulator=t,this.seed=e,this.concurrent=n}return t.prototype.call=function(t,e){return e.subscribe(new We(t,this.accumulator,this.seed,this.concurrent))},t}(),We=function(t){function e(e,n,r,i){var s=t.call(this,e)||this;return s.accumulator=n,s.acc=r,s.concurrent=i,s.hasValue=!1,s.hasCompleted=!1,s.buffer=[],s.active=0,s.index=0,s}return r.__extends(e,t),e.prototype._next=function(t){if(this.active<this.concurrent){var e=this.index++,n=this.destination,r=void 0;try{r=(0,this.accumulator)(this.acc,t,e)}catch(i){return n.error(i)}this.active++,this._innerSub(r)}else this.buffer.push(t)},e.prototype._innerSub=function(t){var e=new i.a(this),n=this.destination;n.add(e);var r=Object(i.c)(t,e);r!==e&&n.add(r)},e.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete()),this.unsubscribe()},e.prototype.notifyNext=function(t){var e=this.destination;this.acc=t,this.hasValue=!0,e.next(t)},e.prototype.notifyComplete=function(){var t=this.buffer;this.active--,t.length>0?this._next(t.shift()):0===this.active&&this.hasCompleted&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete())},e}(i.b);function ze(t){return Te("function"===typeof t?function(e,n){return t(e,n)<0?e:n}:function(t,e){return t<e?t:e})}var qe=n(1796);function Ve(t,e){return function(n){var r;if(r="function"===typeof t?t:function(){return t},"function"===typeof e)return n.lift(new Je(r,e));var i=Object.create(n,qe.b);return i.source=n,i.subjectFactory=r,i}}var Je=function(){function t(t,e){this.subjectFactory=t,this.selector=e}return t.prototype.call=function(t,e){var n=this.selector,r=this.subjectFactory(),i=n(r).subscribe(t);return i.add(e.subscribe(r)),i},t}(),Ge=n(1798);function Ye(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 1===t.length&&Object(U.a)(t[0])&&(t=t[0]),function(e){return e.lift(new $e(t))}}var $e=function(){function t(t){this.nextSources=t}return t.prototype.call=function(t,e){return e.subscribe(new Ke(t,this.nextSources))},t}(),Ke=function(t){function e(e,n){var r=t.call(this,e)||this;return r.destination=e,r.nextSources=n,r}return r.__extends(e,t),e.prototype.notifyError=function(){this.subscribeToNextSource()},e.prototype.notifyComplete=function(){this.subscribeToNextSource()},e.prototype._error=function(t){this.subscribeToNextSource(),this.unsubscribe()},e.prototype._complete=function(){this.subscribeToNextSource(),this.unsubscribe()},e.prototype.subscribeToNextSource=function(){var t=this.nextSources.shift();if(t){var e=new i.a(this),n=this.destination;n.add(e);var r=Object(i.c)(t,e);r!==e&&n.add(r)}else this.destination.complete()},e}(i.b);function Qe(){return function(t){return t.lift(new Xe)}}var Xe=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Ze(t))},t}(),Ze=function(t){function e(e){var n=t.call(this,e)||this;return n.hasPrev=!1,n}return r.__extends(e,t),e.prototype._next=function(t){var e;this.hasPrev?e=[this.prev,t]:this.hasPrev=!0,this.prev=t,e&&this.destination.next(e)},e}(p.a),tn=n(1825);function en(t,e){return function(n){return[Object(jt.a)(t,e)(n),Object(jt.a)(Object(tn.a)(t,e))(n)]}}function nn(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t.length;if(0===n)throw new Error("list of properties cannot be empty.");return function(e){return Object(Qt.a)(rn(t,n))(e)}}function rn(t,e){return function(n){for(var r=n,i=0;i<e;i++){var s=null!=r?r[t[i]]:void 0;if(void 0===s)return;r=s}return r}}var sn=n(1736);function on(t){return t?Ve((function(){return new sn.a}),t):Ve(new sn.a)}var cn=n(1797);function an(t){return function(e){return Ve(new cn.a(t))(e)}}var un=n(1764);function ln(){return function(t){return Ve(new un.a)(t)}}var hn=n(1773);function dn(t,e,n,r){n&&"function"!==typeof n&&(r=n);var i="function"===typeof n?n:void 0,s=new hn.a(t,e,r);return function(t){return Ve((function(){return s}),i)(t)}}var fn=n(1804);function pn(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return 1===t.length&&Object(U.a)(t[0])&&(t=t[0]),e.lift.call(fn.a.apply(void 0,[e].concat(t)))}}function bn(t){return void 0===t&&(t=-1),function(e){return 0===t?Object(Bt.b)():t<0?e.lift(new yn(-1,e)):e.lift(new yn(t-1,e))}}var yn=function(){function t(t,e){this.count=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new gn(t,this.count,this.source))},t}(),gn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.count=n,i.source=r,i}return r.__extends(e,t),e.prototype.complete=function(){if(!this.isStopped){var e=this.source,n=this.count;if(0===n)return t.prototype.complete.call(this);n>-1&&(this.count=n-1),e.subscribe(this._unsubscribeAndRecycle())}},e}(p.a);function mn(t){return function(e){return e.lift(new _n(t))}}var _n=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){return e.subscribe(new vn(t,this.notifier,e))},t}(),vn=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.__extends(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 sn.a;try{e=(0,this.notifier)(this.notifications)}catch(n){return t.prototype.complete.call(this)}this.retries=e,this.retriesSubscription=Object(i.c)(e,new i.a(this))},e}(i.b);function wn(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 xn(t,this.count,this.source))},t}(),xn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.count=n,i.source=r,i}return r.__extends(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.a);function Sn(t){return function(e){return e.lift(new kn(t,e))}}var kn=function(){function t(t,e){this.notifier=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new Cn(t,this.notifier,this.source))},t}(),Cn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.notifier=n,i.source=r,i}return r.__extends(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=this.errors,r=this.retries,s=this.retriesSubscription;if(r)this.errors=void 0,this.retriesSubscription=void 0;else{n=new sn.a;try{r=(0,this.notifier)(n)}catch(o){return t.prototype.error.call(this,o)}s=Object(i.c)(r,new i.a(this))}this._unsubscribeAndRecycle(),this.errors=n,this.retries=r,this.retriesSubscription=s,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.b),In=n(1771);function An(t){return function(e){return e.lift(new On(t))}}var On=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){var n=new Mn(t),r=e.subscribe(n);return r.add(Object(i.c)(this.notifier,new i.a(n))),r},t}(),Mn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.hasValue=!1,e}return r.__extends(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.b);function Rn(t,e){return void 0===e&&(e=a.a),function(n){return n.lift(new jn(t,e))}}var jn=function(){function t(t,e){this.period=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new Nn(t,this.period,this.scheduler))},t}(),Nn=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(Tn,n,{subscriber:i,period:n})),i}return r.__extends(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.a);function Tn(t){var e=t.subscriber,n=t.period;e.notifyNext(),this.schedule(t,n)}function Pn(t,e){return function(n){return n.lift(new Ln(t,e))}}var Ln=function(){function t(t,e){this.compareTo=t,this.comparator=e}return t.prototype.call=function(t,e){return e.subscribe(new Dn(t,this.compareTo,this.comparator))},t}(),Dn=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 Bn(e,i))),i}return r.__extends(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(),s=n.shift(),o=!1;try{o=r?r(i,s):i===s}catch(c){this.destination.error(c)}o||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.a),Bn=function(t){function e(e,n){var r=t.call(this,e)||this;return r.parent=n,r}return r.__extends(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.a);function Hn(){return new sn.a}function Fn(){return function(t){return Object(In.a)()(Ve(Hn)(t))}}function Un(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,s=t.windowTime,o=void 0===s?Number.POSITIVE_INFINITY:s,c=t.refCount,a=t.scheduler,u=0,l=!1,h=!1;return function(t){var r;u++,!e||l?(l=!1,e=new hn.a(i,o,a),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(){u--,r.unsubscribe(),r=void 0,n&&!h&&c&&0===u&&(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.__extends(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(n){this.destination.error(n)}},e.prototype._complete=function(){var t=this.destination;this.index>0?(t.next(this.seenValue?this.singleValue:void 0),t.complete()):t.error(new Nt.a)},e}(p.a);function Vn(t){return function(e){return e.lift(new Jn(t))}}var Jn=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.__extends(e,t),e.prototype._next=function(t){++this.count>this.total&&this.destination.next(t)},e}(p.a);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.a}return t.prototype.call=function(t,e){return 0===this._skipCount?e.subscribe(new p.a(t)):e.subscribe(new Kn(t,this._skipCount))},t}(),Kn=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.__extends(e,t),e.prototype._next=function(t){var e=this._skipCount,n=this._count++;if(n<e)this._ring[n]=t;else{var r=n%e,i=this._ring,s=i[r];i[r]=t,this.destination.next(s)}},e}(p.a);function Qn(t){return function(e){return e.lift(new Xn(t))}}var Xn=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){return e.subscribe(new Zn(t,this.notifier))},t}(),Zn=function(t){function e(e,n){var r=t.call(this,e)||this;r.hasValue=!1;var s=new i.a(r);r.add(s),r.innerSubscription=s;var o=Object(i.c)(n,s);return o!==s&&(r.add(o),r.innerSubscription=o),r}return r.__extends(e,t),e.prototype._next=function(e){this.hasValue&&t.prototype._next.call(this,e)},e.prototype.notifyNext=function(){this.hasValue=!0,this.innerSubscription&&this.innerSubscription.unsubscribe()},e.prototype.notifyComplete=function(){},e}(i.b);function tr(t){return function(e){return e.lift(new er(t))}}var er=function(){function t(t){this.predicate=t}return t.prototype.call=function(t,e){return e.subscribe(new nr(t,this.predicate))},t}(),nr=function(t){function e(e,n){var r=t.call(this,e)||this;return r.predicate=n,r.skipping=!0,r.index=0,r}return r.__extends(e,t),e.prototype._next=function(t){var e=this.destination;this.skipping&&this.tryCallPredicate(t),this.skipping||e.next(t)},e.prototype.tryCallPredicate=function(t){try{var e=this.predicate(t,this.index++);this.skipping=Boolean(e)}catch(n){this.destination.error(n)}},e}(p.a);function rr(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[t.length-1];return Object(_.a)(n)?(t.pop(),function(e){return Object(q.a)(t,e,n)}):function(e){return Object(q.a)(t,e)}}var ir=n(1782),sr=n(1779),or=function(t){function e(e,n,r){void 0===n&&(n=0),void 0===r&&(r=ir.a);var i=t.call(this)||this;return i.source=e,i.delayTime=n,i.scheduler=r,(!Object(sr.a)(n)||n<0)&&(i.delayTime=0),r&&"function"===typeof r.schedule||(i.scheduler=ir.a),i}return r.__extends(e,t),e.create=function(t,n,r){return void 0===n&&(n=0),void 0===r&&(r=ir.a),new e(t,n,r)},e.dispatch=function(t){var e=t.source,n=t.subscriber;return this.add(e.subscribe(n))},e.prototype._subscribe=function(t){var n=this.delayTime,r=this.source;return this.scheduler.schedule(e.dispatch,n,{source:r,subscriber:t})},e}(bt.a);function cr(t,e){return void 0===e&&(e=0),function(n){return n.lift(new ar(t,e))}}var ar=function(){function t(t,e){this.scheduler=t,this.delay=e}return t.prototype.call=function(t,e){return new or(e,this.delay,this.scheduler).subscribe(t)},t}();function ur(t,e){return"function"===typeof e?function(n){return n.pipe(ur((function(n,r){return Object(W.a)(t(n,r)).pipe(Object(Qt.a)((function(t,i){return e(n,t,r,i)})))})))}:function(e){return e.lift(new lr(t))}}var lr=function(){function t(t){this.project=t}return t.prototype.call=function(t,e){return e.subscribe(new hr(t,this.project))},t}(),hr=function(t){function e(e,n){var r=t.call(this,e)||this;return r.project=n,r.index=0,r}return r.__extends(e,t),e.prototype._next=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(r){return void this.destination.error(r)}this._innerSub(e)},e.prototype._innerSub=function(t){var e=this.innerSubscription;e&&e.unsubscribe();var n=new i.a(this),r=this.destination;r.add(n),this.innerSubscription=Object(i.c)(t,n),this.innerSubscription!==n&&r.add(this.innerSubscription)},e.prototype._complete=function(){var e=this.innerSubscription;e&&!e.closed||t.prototype._complete.call(this),this.unsubscribe()},e.prototype._unsubscribe=function(){this.innerSubscription=void 0},e.prototype.notifyComplete=function(){this.innerSubscription=void 0,this.isStopped&&t.prototype._complete.call(this)},e.prototype.notifyNext=function(t){this.destination.next(t)},e}(i.b);function dr(){return ur(he.a)}function fr(t,e){return e?ur((function(){return t}),e):ur((function(){return t}))}function pr(t){return function(e){return e.lift(new br(t))}}var br=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){var n=new yr(t),r=Object(i.c)(this.notifier,new i.a(n));return r&&!n.seenValue?(n.add(r),e.subscribe(n)):n},t}(),yr=function(t){function e(e){var n=t.call(this,e)||this;return n.seenValue=!1,n}return r.__extends(e,t),e.prototype.notifyNext=function(){this.seenValue=!0,this.complete()},e.prototype.notifyComplete=function(){},e}(i.b);function gr(t,e){return void 0===e&&(e=!1),function(n){return n.lift(new mr(t,e))}}var mr=function(){function t(t,e){this.predicate=t,this.inclusive=e}return t.prototype.call=function(t,e){return e.subscribe(new _r(t,this.predicate,this.inclusive))},t}(),_r=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.predicate=n,i.inclusive=r,i.index=0,i}return r.__extends(e,t),e.prototype._next=function(t){var e,n=this.destination;try{e=this.predicate(t,this.index++)}catch(r){return void n.error(r)}this.nextOrComplete(t,e)},e.prototype.nextOrComplete=function(t,e){var n=this.destination;Boolean(e)?n.next(t):(this.inclusive&&n.next(t),n.complete())},e}(p.a),vr=n(1775),wr=n(1759);function Er(t,e,n){return function(r){return r.lift(new xr(t,e,n))}}var xr=function(){function t(t,e,n){this.nextOrObserver=t,this.error=e,this.complete=n}return t.prototype.call=function(t,e){return e.subscribe(new Sr(t,this.nextOrObserver,this.error,this.complete))},t}(),Sr=function(t){function e(e,n,r,i){var s=t.call(this,e)||this;return s._tapNext=vr.a,s._tapError=vr.a,s._tapComplete=vr.a,s._tapError=r||vr.a,s._tapComplete=i||vr.a,Object(wr.a)(n)?(s._context=s,s._tapNext=n):n&&(s._context=n,s._tapNext=n.next||vr.a,s._tapError=n.error||vr.a,s._tapComplete=n.complete||vr.a),s}return r.__extends(e,t),e.prototype._next=function(t){try{this._tapNext.call(this._context,t)}catch(e){return void this.destination.error(e)}this.destination.next(t)},e.prototype._error=function(t){try{this._tapError.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.error(t)},e.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()},e}(p.a),kr={leading:!0,trailing:!1};function Cr(t,e){return void 0===e&&(e=kr),function(n){return n.lift(new Ir(t,!!e.leading,!!e.trailing))}}var Ir=function(){function t(t,e,n){this.durationSelector=t,this.leading=e,this.trailing=n}return t.prototype.call=function(t,e){return e.subscribe(new Ar(t,this.durationSelector,this.leading,this.trailing))},t}(),Ar=function(t){function e(e,n,r,i){var s=t.call(this,e)||this;return s.destination=e,s.durationSelector=n,s._leading=r,s._trailing=i,s._hasValue=!1,s}return r.__extends(e,t),e.prototype._next=function(t){this._hasValue=!0,this._sendValue=t,this._throttled||(this._leading?this.send():this.throttle(t))},e.prototype.send=function(){var t=this._hasValue,e=this._sendValue;t&&(this.destination.next(e),this.throttle(e)),this._hasValue=!1,this._sendValue=void 0},e.prototype.throttle=function(t){var e=this.tryDurationSelector(t);e&&this.add(this._throttled=Object(i.c)(e,new i.a(this)))},e.prototype.tryDurationSelector=function(t){try{return this.durationSelector(t)}catch(e){return this.destination.error(e),null}},e.prototype.throttlingDone=function(){var t=this._throttled,e=this._trailing;t&&t.unsubscribe(),this._throttled=void 0,e&&this.send()},e.prototype.notifyNext=function(){this.throttlingDone()},e.prototype.notifyComplete=function(){this.throttlingDone()},e}(i.b);function Or(t,e,n){return void 0===e&&(e=a.a),void 0===n&&(n=kr),function(r){return r.lift(new Mr(t,e,n.leading,n.trailing))}}var Mr=function(){function t(t,e,n,r){this.duration=t,this.scheduler=e,this.leading=n,this.trailing=r}return t.prototype.call=function(t,e){return e.subscribe(new Rr(t,this.duration,this.scheduler,this.leading,this.trailing))},t}(),Rr=function(t){function e(e,n,r,i,s){var o=t.call(this,e)||this;return o.duration=n,o.scheduler=r,o.leading=i,o.trailing=s,o._hasTrailingValue=!1,o._trailingValue=null,o}return r.__extends(e,t),e.prototype._next=function(t){this.throttled?this.trailing&&(this._trailingValue=t,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(jr,this.duration,{subscriber:this})),this.leading?this.destination.next(t):this.trailing&&(this._trailingValue=t,this._hasTrailingValue=!0))},e.prototype._complete=function(){this._hasTrailingValue?(this.destination.next(this._trailingValue),this.destination.complete()):this.destination.complete()},e.prototype.clearThrottle=function(){var t=this.throttled;t&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),t.unsubscribe(),this.remove(t),this.throttled=null)},e}(p.a);function jr(t){t.subscriber.clearThrottle()}var Nr=n(1778);function Tr(t){return void 0===t&&(t=a.a),function(e){return Object(Nr.a)((function(){return e.pipe(Me((function(e,n){var r=e.current;return{value:n,current:t.now(),last:r}}),{current:t.now(),value:void 0,last:void 0}),Object(Qt.a)((function(t){var e=t.current,n=t.last,r=t.value;return new Pr(r,e-n)})))}))}}var Pr=function(){return function(t,e){this.value=t,this.interval=e}}(),Lr=n(1801);function Dr(t,e,n){return void 0===n&&(n=a.a),function(r){var i=ut(t),s=i?+t-n.now():Math.abs(t);return r.lift(new Br(s,i,e,n))}}var Br=function(){function t(t,e,n,r){this.waitFor=t,this.absoluteTimeout=e,this.withObservable=n,this.scheduler=r}return t.prototype.call=function(t,e){return e.subscribe(new Hr(t,this.absoluteTimeout,this.waitFor,this.withObservable,this.scheduler))},t}(),Hr=function(t){function e(e,n,r,i,s){var o=t.call(this,e)||this;return o.absoluteTimeout=n,o.waitFor=r,o.withObservable=i,o.scheduler=s,o.scheduleTimeout(),o}return r.__extends(e,t),e.dispatchTimeout=function(t){var e=t.withObservable;t._unsubscribeAndRecycle(),t.add(Object(i.c)(e,new i.a(t)))},e.prototype.scheduleTimeout=function(){var t=this.action;t?this.action=t.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule(e.dispatchTimeout,this.waitFor,this))},e.prototype._next=function(e){this.absoluteTimeout||this.scheduleTimeout(),t.prototype._next.call(this,e)},e.prototype._unsubscribe=function(){this.action=void 0,this.scheduler=null,this.withObservable=null},e}(i.b),Fr=n(1774);function Ur(t,e){return void 0===e&&(e=a.a),Dr(t,Object(Fr.a)(new Lr.a),e)}function Wr(t){return void 0===t&&(t=a.a),Object(Qt.a)((function(e){return new zr(e,t.now())}))}var zr=function(){return function(t,e){this.value=t,this.timestamp=e}}();function qr(t,e,n){return 0===n?[e]:(t.push(e),t)}function Vr(){return Te(qr,[])}function Jr(t){return function(e){return e.lift(new Gr(t))}}var Gr=function(){function t(t){this.windowBoundaries=t}return t.prototype.call=function(t,e){var n=new Yr(t),r=e.subscribe(n);return r.closed||n.add(Object(i.c)(this.windowBoundaries,new i.a(n))),r},t}(),Yr=function(t){function e(e){var n=t.call(this,e)||this;return n.window=new sn.a,e.next(n.window),n}return r.__extends(e,t),e.prototype.notifyNext=function(){this.openWindow()},e.prototype.notifyError=function(t){this._error(t)},e.prototype.notifyComplete=function(){this._complete()},e.prototype._next=function(t){this.window.next(t)},e.prototype._error=function(t){this.window.error(t),this.destination.error(t)},e.prototype._complete=function(){this.window.complete(),this.destination.complete()},e.prototype._unsubscribe=function(){this.window=null},e.prototype.openWindow=function(){var t=this.window;t&&t.complete();var e=this.destination,n=this.window=new sn.a;e.next(n)},e}(i.b);function $r(t,e){return void 0===e&&(e=0),function(n){return n.lift(new Kr(t,e))}}var Kr=function(){function t(t,e){this.windowSize=t,this.startWindowEvery=e}return t.prototype.call=function(t,e){return e.subscribe(new Qr(t,this.windowSize,this.startWindowEvery))},t}(),Qr=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.destination=e,i.windowSize=n,i.startWindowEvery=r,i.windows=[new sn.a],i.count=0,e.next(i.windows[0]),i}return r.__extends(e,t),e.prototype._next=function(t){for(var e=this.startWindowEvery>0?this.startWindowEvery:this.windowSize,n=this.destination,r=this.windowSize,i=this.windows,s=i.length,o=0;o<s&&!this.closed;o++)i[o].next(t);var c=this.count-r+1;if(c>=0&&c%e===0&&!this.closed&&i.shift().complete(),++this.count%e===0&&!this.closed){var a=new sn.a;i.push(a),n.next(a)}},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.a);function Xr(t){var e=a.a,n=null,r=Number.POSITIVE_INFINITY;return Object(_.a)(arguments[3])&&(e=arguments[3]),Object(_.a)(arguments[2])?e=arguments[2]:Object(sr.a)(arguments[2])&&(r=Number(arguments[2])),Object(_.a)(arguments[1])?e=arguments[1]:Object(sr.a)(arguments[1])&&(n=Number(arguments[1])),function(i){return i.lift(new Zr(t,n,r,e))}}var Zr=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.__extends(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}(sn.a),ei=function(t){function e(e,n,r,i,s){var o=t.call(this,e)||this;o.destination=e,o.windowTimeSpan=n,o.windowCreationInterval=r,o.maxWindowSize=i,o.scheduler=s,o.windows=[];var c=o.openWindow();if(null!==r&&r>=0){var a={subscriber:o,window:c,context:null},u={windowTimeSpan:n,windowCreationInterval:r,subscriber:o,scheduler:s};o.add(s.schedule(ii,n,a)),o.add(s.schedule(ri,r,u))}else{var l={subscriber:o,window:c,windowTimeSpan:n};o.add(s.schedule(ni,n,l))}return o}return r.__extends(e,t),e.prototype._next=function(t){for(var e=this.windows,n=e.length,r=0;r<n;r++){var i=e[r];i.closed||(i.next(t),i.numberOfNextedValues>=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.a);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,s=n.openWindow(),o=this,c={action:o,subscription:null},a={subscriber:n,window:s,context:c};c.subscription=r.schedule(ii,e,a),o.add(c.subscription),o.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 si(t,e){return function(n){return n.lift(new oi(t,e))}}var oi=function(){function t(t,e){this.openings=t,this.closingSelector=e}return t.prototype.call=function(t,e){return e.subscribe(new ci(t,this.openings,this.closingSelector))},t}(),ci=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=Object(A.a)(i,n,n)),i}return r.__extends(e,t),e.prototype._next=function(t){var e=this.contexts;if(e)for(var n=e.length,r=0;r<n;r++)e[r].window.next(t)},e.prototype._error=function(e){var n=this.contexts;if(this.contexts=null,n)for(var r=n.length,i=-1;++i<r;){var s=n[i];s.window.error(e),s.subscription.unsubscribe()}t.prototype._error.call(this,e)},e.prototype._complete=function(){var e=this.contexts;if(this.contexts=null,e)for(var n=e.length,r=-1;++r<n;){var i=e[r];i.window.complete(),i.subscription.unsubscribe()}t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.contexts;if(this.contexts=null,t)for(var e=t.length,n=-1;++n<e;){var r=t[n];r.window.unsubscribe(),r.subscription.unsubscribe()}},e.prototype.notifyNext=function(t,e,n,r,i){if(t===this.openings){var s=void 0;try{s=(0,this.closingSelector)(e)}catch(l){return this.error(l)}var o=new sn.a,c=new I.a,a={window:o,subscription:c};this.contexts.push(a);var u=Object(A.a)(this,s,a);u.closed?this.closeWindow(this.contexts.length-1):(u.context=a,c.add(u)),this.destination.next(o)}else this.closeWindow(this.contexts.indexOf(t))},e.prototype.notifyError=function(t){this.error(t)},e.prototype.notifyComplete=function(t){t!==this.openSubscription&&this.closeWindow(this.contexts.indexOf(t.context))},e.prototype.closeWindow=function(t){if(-1!==t){var e=this.contexts,n=e[t],r=n.window,i=n.subscription;e.splice(t,1),r.complete(),i.unsubscribe()}},e}(O.a);function ai(t){return function(e){return e.lift(new ui(t))}}var ui=function(){function t(t){this.closingSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new li(t,this.closingSelector))},t}(),li=function(t){function e(e,n){var r=t.call(this,e)||this;return r.destination=e,r.closingSelector=n,r.openWindow(),r}return r.__extends(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.openWindow(i)},e.prototype.notifyError=function(t){this._error(t)},e.prototype.notifyComplete=function(t){this.openWindow(t)},e.prototype._next=function(t){this.window.next(t)},e.prototype._error=function(t){this.window.error(t),this.destination.error(t),this.unsubscribeClosingNotification()},e.prototype._complete=function(){this.window.complete(),this.destination.complete(),this.unsubscribeClosingNotification()},e.prototype.unsubscribeClosingNotification=function(){this.closingNotification&&this.closingNotification.unsubscribe()},e.prototype.openWindow=function(t){void 0===t&&(t=null),t&&(this.remove(t),t.unsubscribe());var e=this.window;e&&e.complete();var n,r=this.window=new sn.a;this.destination.next(r);try{n=(0,this.closingSelector)()}catch(i){return this.destination.error(i),void this.window.error(i)}this.add(this.closingNotification=Object(A.a)(this,n))},e}(O.a);function hi(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){var n;"function"===typeof t[t.length-1]&&(n=t.pop());var r=t;return e.lift(new di(r,n))}}var di=function(){function t(t,e){this.observables=t,this.project=e}return t.prototype.call=function(t,e){return e.subscribe(new fi(t,this.observables,this.project))},t}(),fi=function(t){function e(e,n,r){var i=t.call(this,e)||this;i.observables=n,i.project=r,i.toRespond=[];var s=n.length;i.values=new Array(s);for(var o=0;o<s;o++)i.toRespond.push(o);for(o=0;o<s;o++){var c=n[o];i.add(Object(A.a)(i,c,void 0,o))}return i}return r.__extends(e,t),e.prototype.notifyNext=function(t,e,n){this.values[n]=e;var r=this.toRespond;if(r.length>0){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(n){return void this.destination.error(n)}this.destination.next(e)},e}(O.a),pi=n(1780);function bi(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return e.lift.call(pi.b.apply(void 0,[e].concat(t)))}}function yi(t){return function(e){return e.lift(new pi.a(t))}}},1782:function(t,e,n){"use strict";n.d(e,"b",(function(){return d})),n.d(e,"a",(function(){return f}));var r=n(121),i=1,s=function(){return Promise.resolve()}(),o={};function c(t){return t in o&&(delete o[t],!0)}var a=function(t){var e=i++;return o[e]=!0,s.then((function(){return c(e)&&t()})),e},u=function(t){c(t)},l=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return r.__extends(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=a(e.flush.bind(e,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&&(u(n),e.scheduled=void 0)},e}(n(1768).a),h=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(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<i&&(t=n.shift()));if(this.active=!1,e){for(;++r<i&&(t=n.shift());)t.unsubscribe();throw e}},e}(n(1763).a),d=new h(l),f=d},1783:function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var r=n(1822),i=n(1791),s=n(1765),o=n(1746),c=n(1823),a=n(1824),u=n(1794),l=function(t){if(t&&"function"===typeof t[o.a])return l=t,function(t){var e=l[o.a]();if("function"!==typeof e.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return e.subscribe(t)};if(Object(c.a)(t))return Object(r.a)(t);if(Object(a.a)(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.a),t};if(t&&"function"===typeof t[s.a])return e=t,function(t){for(var n=e[s.a]();;){var r=void 0;try{r=n.next()}catch(i){return t.error(i),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=Object(u.a)(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.")}},1784:function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return c}));var r=n(121),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.__extends(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(1768).a),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e}(n(1763).a),o=new s(i),c=o},1785:function(t,e,n){"use strict";(function(t){var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.CoinbaseWalletProvider=void 0;const i=r(n(1769)),s=r(n(21)),o=n(1786),c=n(1789),a=n(1790),u=n(1827),l=n(1745),h=r(n(1848)),d=n(1856),f=n(1857),p=n(1858),b="DefaultChainId",y="DefaultJsonRpcUrl",g="HasChainBeenSwitched",m="HasChainOverriddenFromRelay";class _ extends i.default{constructor(t){var e,n;super(),this._filterPolyfill=new d.FilterPolyfill(this),this._subscriptionManager=new p.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._eventListener=t.eventListener,this.isCoinbaseWallet=null===(e=t.overrideIsCoinbaseWallet)||void 0===e||e,this.isCoinbaseBrowser=null!==(n=t.overrideIsCoinbaseBrowser)&&void 0!==n&&n,this.qrUrl=t.qrUrl,this.supportsAddressSwitching=t.supportsAddressSwitching;const r=this.getChainId(),i=(0,l.prepend0x)(r.toString(16));this.emit("connect",{chainIdStr:i});const s=this._storage.getItem(u.LOCAL_STORAGE_ADDRESSES_KEY);if(s){const t=s.split(" ");""!==t[0]&&(this._addresses=t.map((t=>(0,l.ensureAddressString)(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,l.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(y))&&void 0!==t?t:this._jsonRpcUrlFromOpts}set jsonRpcUrl(t){this._storage.setItem(y,t)}get isChainOverridden(){return"true"===this._storage.getItem(m)}set isChainOverridden(t){this._storage.setItem(m,t.toString())}setProviderInfo(t,e){this.isChainOverridden||this.updateProviderInfo(t,this.getChainId(),!1)}updateProviderInfo(t,e,n){if("true"===this._storage.getItem(g)&&n)return;n&&(this.isChainOverridden=!0),this.jsonRpcUrl=t;const r=this.getChainId();this._storage.setItem(b,e.toString(10));!((0,l.ensureIntNumber)(e)!==r)&&this.hasMadeFirstChainChangedEmission||(this.emit("chainChanged",this.getChainId()),this.hasMadeFirstChainChangedEmission=!0)}async watchAsset(t,e,n,r,i,s){const o=await this.initializeRelay();return!!(await o.watchAsset(t,e,n,r,i,null===s||void 0===s?void 0:s.toString()).promise).result}async addEthereumChain(t,e,n,r,i,s){var o,c;if((0,l.ensureIntNumber)(t)===this.getChainId())return!1;const a=await this.initializeRelay(),u=a.inlineAddEthereumChain(t.toString());this._isAuthorized()||u||await a.requestEthereumAccounts().promise;const h=await a.addEthereumChain(t.toString(),e,i,n,r,s).promise;return!0===(null===(o=h.result)||void 0===o?void 0:o.isApproved)&&(this._storage.setItem(g,"true"),this.updateProviderInfo(e[0],t,!1)),!0===(null===(c=h.result)||void 0===c?void 0:c.isApproved)}async switchEthereumChain(t){if((0,l.ensureIntNumber)(t)===this.getChainId())return;const e=await this.initializeRelay(),n=await e.switchEthereumChain(t.toString(10)).promise;if(n.errorCode)throw o.ethErrors.provider.custom({code:n.errorCode});const r=n.result;r.isApproved&&r.rpcUrl.length>0&&(this._storage.setItem(g,"true"),this.updateProviderInfo(r.rpcUrl,t,!1))}setAppInfo(t,e){this.initializeRelay().then((n=>n.setAppInfo(t,e)))}async enable(){var t;return null===(t=this._eventListener)||void 0===t||t.onEvent(c.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::enable",addresses_length:this._addresses.length,sessionIdHash:this._relay?a.Session.hash(this._relay.session.id):null}),this._addresses.length>0?[...this._addresses]:await this._send(f.JSONRPCMethod.eth_requestAccounts)}async close(){(await this.initializeRelay()).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)}async 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;return 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 o.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 o.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 o.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,l.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(`Coinbase Wallet 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,l.ensureAddressString)(t)));JSON.stringify(e)!==JSON.stringify(this._addresses)&&(this._addresses.length>0&&!1===this.supportsAddressSwitching||(this._addresses=e,this.emit("accountsChanged",this._addresses),this._storage.setItem(u.LOCAL_STORAGE_ADDRESSES_KEY,e.join(" "))))}_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 s=this._handleSubscriptionMethods(t);if(void 0!==s)return void s.then((n=>e({jsonrpc:"2.0",id:t.id,result:n.result}))).catch((t=>n(t)))}catch(r){return n(r)}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 f.JSONRPCMethod.eth_accounts:return this._eth_accounts();case f.JSONRPCMethod.eth_coinbase:return this._eth_coinbase();case f.JSONRPCMethod.eth_uninstallFilter:return this._eth_uninstallFilter(n);case f.JSONRPCMethod.net_version:return this._net_version();case f.JSONRPCMethod.eth_chainId:return this._eth_chainId();default:return}}async _handleAsynchronousMethods(t){const{method:e}=t,n=t.params||[];switch(e){case f.JSONRPCMethod.eth_requestAccounts:return this._eth_requestAccounts();case f.JSONRPCMethod.eth_sign:return this._eth_sign(n);case f.JSONRPCMethod.eth_ecRecover:return this._eth_ecRecover(n);case f.JSONRPCMethod.personal_sign:return this._personal_sign(n);case f.JSONRPCMethod.personal_ecRecover:return this._personal_ecRecover(n);case f.JSONRPCMethod.eth_signTransaction:return this._eth_signTransaction(n);case f.JSONRPCMethod.eth_sendRawTransaction:return this._eth_sendRawTransaction(n);case f.JSONRPCMethod.eth_sendTransaction:return this._eth_sendTransaction(n);case f.JSONRPCMethod.eth_signTypedData_v1:return this._eth_signTypedData_v1(n);case f.JSONRPCMethod.eth_signTypedData_v2:return this._throwUnsupportedMethodError();case f.JSONRPCMethod.eth_signTypedData_v3:return this._eth_signTypedData_v3(n);case f.JSONRPCMethod.eth_signTypedData_v4:case f.JSONRPCMethod.eth_signTypedData:return this._eth_signTypedData_v4(n);case f.JSONRPCMethod.cbWallet_arbitrary:return this._cbwallet_arbitrary(n);case f.JSONRPCMethod.wallet_addEthereumChain:return this._wallet_addEthereumChain(n);case f.JSONRPCMethod.wallet_switchEthereumChain:return this._wallet_switchEthereumChain(n);case f.JSONRPCMethod.wallet_watchAsset:return this._wallet_watchAsset(n)}return(await this.initializeRelay()).makeEthereumJSONRPCRequest(t,this.jsonRpcUrl)}_handleAsynchronousFilterMethods(t){const{method:e}=t,n=t.params||[];switch(e){case f.JSONRPCMethod.eth_newFilter:return this._eth_newFilter(n);case f.JSONRPCMethod.eth_newBlockFilter:return this._eth_newBlockFilter();case f.JSONRPCMethod.eth_newPendingTransactionFilter:return this._eth_newPendingTransactionFilter();case f.JSONRPCMethod.eth_getFilterChanges:return this._eth_getFilterChanges(n);case f.JSONRPCMethod.eth_getFilterLogs:return this._eth_getFilterLogs(n)}}_handleSubscriptionMethods(t){switch(t.method){case f.JSONRPCMethod.eth_subscribe:case f.JSONRPCMethod.eth_unsubscribe:return this._subscriptionManager.handleRequest(t)}}_isKnownAddress(t){try{const e=(0,l.ensureAddressString)(t);return this._addresses.map((t=>(0,l.ensureAddressString)(t))).includes(e)}catch(e){}return!1}_ensureKnownAddress(t){var e;if(!this._isKnownAddress(t))throw null===(e=this._eventListener)||void 0===e||e.onEvent(c.EVENTS.UNKNOWN_ADDRESS_ENCOUNTERED),new Error("Unknown Ethereum address")}_prepareTransactionParams(e){const n=e.from?(0,l.ensureAddressString)(e.from):this.selectedAddress;if(!n)throw new Error("Ethereum address is unavailable");this._ensureKnownAddress(n);return{fromAddress:n,toAddress:e.to?(0,l.ensureAddressString)(e.to):null,weiValue:null!=e.value?(0,l.ensureBN)(e.value):new s.default(0),data:e.data?(0,l.ensureBuffer)(e.data):t.alloc(0),nonce:null!=e.nonce?(0,l.ensureIntNumber)(e.nonce):null,gasPriceInWei:null!=e.gasPrice?(0,l.ensureBN)(e.gasPrice):null,maxFeePerGas:null!=e.maxFeePerGas?(0,l.ensureBN)(e.maxFeePerGas):null,maxPriorityFeePerGas:null!=e.maxPriorityFeePerGas?(0,l.ensureBN)(e.maxPriorityFeePerGas):null,gasLimit:null!=e.gas?(0,l.ensureBN)(e.gas):null,chainId:this.getChainId()}}_isAuthorized(){return this._addresses.length>0}_requireAuthorization(){if(!this._isAuthorized())throw o.ethErrors.provider.unauthorized({})}_throwUnsupportedMethodError(){throw o.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(i){if("string"===typeof i.message&&i.message.match(/(denied|rejected)/i))throw o.ethErrors.provider.userRejectedRequest("User denied message signature");throw i}}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,l.hexStringFromIntNumber)(this.getChainId())}getChainId(){const t=this._storage.getItem(b)||"1",e=parseInt(t,10);return(0,l.ensureIntNumber)(e)}async _eth_requestAccounts(){var t;if(null===(t=this._eventListener)||void 0===t||t.onEvent(c.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::_eth_requestAccounts",addresses_length:this._addresses.length,sessionIdHash:this._relay?a.Session.hash(this._relay.session.id):null}),this._addresses.length>0)return Promise.resolve({jsonrpc:"2.0",id:0,result:this._addresses});let e;try{const t=await this.initializeRelay();e=await t.requestEthereumAccounts().promise}catch(n){if("string"===typeof n.message&&n.message.match(/(denied|rejected)/i))throw o.ethErrors.provider.userRejectedRequest("User denied account authorization");throw n}if(!e.result)throw new Error("accounts received is empty");return this._setAddresses(e.result),{jsonrpc:"2.0",id:0,result:this._addresses}}_eth_sign(t){this._requireAuthorization();const e=(0,l.ensureAddressString)(t[0]),n=(0,l.ensureBuffer)(t[1]);return this._signEthereumMessage(n,e,!1)}_eth_ecRecover(t){const e=(0,l.ensureBuffer)(t[0]),n=(0,l.ensureBuffer)(t[1]);return this._ethereumAddressFromSignedMessage(e,n,!1)}_personal_sign(t){this._requireAuthorization();const e=(0,l.ensureBuffer)(t[0]),n=(0,l.ensureAddressString)(t[1]);return this._signEthereumMessage(e,n,!0)}_personal_ecRecover(t){const e=(0,l.ensureBuffer)(t[0]),n=(0,l.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(n){if("string"===typeof n.message&&n.message.match(/(denied|rejected)/i))throw o.ethErrors.provider.userRejectedRequest("User denied transaction signature");throw n}}async _eth_sendRawTransaction(t){const e=(0,l.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(n){if("string"===typeof n.message&&n.message.match(/(denied|rejected)/i))throw o.ethErrors.provider.userRejectedRequest("User denied transaction signature");throw n}}async _eth_signTypedData_v1(t){this._requireAuthorization();const e=(0,l.ensureParsedJSONObject)(t[0]),n=(0,l.ensureAddressString)(t[1]);this._ensureKnownAddress(n);const r=h.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,l.ensureAddressString)(t[0]),n=(0,l.ensureParsedJSONObject)(t[1]);this._ensureKnownAddress(e);const r=h.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,l.ensureAddressString)(t[0]),n=(0,l.ensureParsedJSONObject)(t[1]);this._ensureKnownAddress(e);const r=h.default.hashForSignTypedData_v4({data:n}),i=JSON.stringify(n,null,2);return this._signEthereumMessage(r,e,!1,i)}async _cbwallet_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 s=t[0];if(0===(null===(e=s.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(!s.chainName||""===s.chainName.trim())throw o.ethErrors.provider.custom({code:0,message:"chainName is a required field"});if(!s.nativeCurrency)throw o.ethErrors.provider.custom({code:0,message:"nativeCurrency is a required field"});const c=parseInt(s.chainId,16);return await this.addEthereumChain(c,null!==(n=s.rpcUrls)&&void 0!==n?n:[],null!==(r=s.blockExplorerUrls)&&void 0!==r?r:[],s.chainName,null!==(i=s.iconUrls)&&void 0!==i?i:[],s.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}}async _wallet_watchAsset(t){var e;const n=Array.isArray(t)?t[0]:t;if(0===(null===(e=n.type)||void 0===e?void 0:e.length))throw o.ethErrors.rpc.invalidParams({message:"type is a required field"});if("ERC20"!==n.type)throw o.ethErrors.rpc.invalidParams({message:`Asset of type '${n.type}' not supported`});if(!(null===n||void 0===n?void 0:n.options))throw o.ethErrors.rpc.invalidParams({message:"options is a required field"});if(!n.options.address)throw o.ethErrors.rpc.invalidParams({message:"option address is a required option"});const r=this.getChainId(),{address:i,symbol:s,image:c,decimals:a}=n.options;return{jsonrpc:"2.0",id:0,result:await this.watchAsset(n.type,i,s,a,c,r)}}_eth_uninstallFilter(t){const e=(0,l.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,l.ensureHexString)(t[0]);return this._filterPolyfill.getFilterChanges(e)}_eth_getFilterLogs(t){const e=(0,l.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.CoinbaseWalletProvider=_}).call(this,n(60).Buffer)},1786:function(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(1787);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(1819);Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return i.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return i.getMessageFromCode}});const s=n(1843);Object.defineProperty(e,"ethErrors",{enumerable:!0,get:function(){return s.ethErrors}});const o=n(1788);Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return o.errorCodes}})},1787:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EthereumProviderError=e.EthereumRpcError=void 0;const r=n(1818);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(),s,2)}}e.EthereumRpcError=i;function s(t,e){if("[Circular]"!==e)return e}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)}}},1788:function(t,e,n){"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."}}},1789:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EVENTS=void 0,e.EVENTS={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_REQUEST_PUBLISHED:"walletlink_sdk.web3.request_published",WEB3_RESPONSE:"walletlink_sdk.web3.response",UNKNOWN_ADDRESS_ENCOUNTERED:"walletlink_sdk.unknown_address_encountered"}},1790:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Session=void 0;const r=n(1844),i=n(1757),s=n(1781),o=n(1745),c="session:id",a="session:secret",u="session:linked";class l{constructor(t,e,n,i){this._storage=t,this._id=e||(0,o.randomBytesHex)(16),this._secret=n||(0,o.randomBytesHex)(32);const s=r.sha256.create();s.update(`${this._id}, ${this._secret} WalletLink`),this._key=s.hex(),this._linked=!!i}static load(t){const e=t.getItem(c),n=t.getItem(u),r=t.getItem(a);return e&&r?new l(t,e,r,"1"===n):null}static get persistedSessionIdChange$(){return(0,i.fromEvent)(window,"storage").pipe((0,s.filter)((t=>t.key===c)),(0,s.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(c,this._id),this._storage.setItem(a,this._secret),this.persistLinked(),this}persistLinked(){this._storage.setItem(u,this._linked?"1":"0")}}e.Session=l},1791:function(t,e,n){"use strict";function r(t){setTimeout((function(){throw t}),0)}n.d(e,"a",(function(){return r}))},1792:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function(){return"function"===typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()}()},1793:function(t,e,n){"use strict";n.d(e,"a",(function(){return 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}()},1794:function(t,e,n){"use strict";function r(t){return null!==t&&"object"===typeof t}n.d(e,"a",(function(){return r}))},1795:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(1732);function i(t){for(;t;){var e=t,n=e.closed,i=e.destination,s=e.isStopped;if(n||s)return!1;t=i&&i instanceof r.a?i:null}return!0}},1796:function(t,e,n){"use strict";n.d(e,"a",(function(){return u})),n.d(e,"b",(function(){return l}));var r=n(121),i=n(1736),s=n(1733),o=n(1732),c=n(1735),a=n(1771),u=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.__extends(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 c.a).add(this.source.subscribe(new h(this.getSubject(),this))),t.closed&&(this._connection=null,t=c.a.EMPTY)),t},e.prototype.refCount=function(){return Object(a.a)()(this)},e}(s.a),l=function(){var t=u.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.__extends(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.b);o.a},1797:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(121),i=n(1736),s=n(1760),o=function(t){function e(e){var n=t.call(this)||this;return n._value=e,n}return r.__extends(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 s.a;return this._value},e.prototype.next=function(e){t.prototype.next.call(this,this._value=e)},e}(i.a)},1798:function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return a}));var r=n(121),i=n(1732),s=n(1752);function o(t,e){return void 0===e&&(e=0),function(n){return n.lift(new c(t,e))}}var c=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 a(t,this.scheduler,this.delay))},t}(),a=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.__extends(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 u(t,this.destination)))},e.prototype._next=function(t){this.scheduleMessage(s.a.createNext(t))},e.prototype._error=function(t){this.scheduleMessage(s.a.createError(t)),this.unsubscribe()},e.prototype._complete=function(){this.scheduleMessage(s.a.createComplete()),this.unsubscribe()},e}(i.a),u=function(){return function(t,e){this.notification=t,this.destination=e}}()},1799:function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(1733),i=n(1735);function s(t,e){return new r.a((function(n){var r=new i.a,s=0;return r.add(e.schedule((function(){s!==t.length?(n.next(t[s++]),n.closed||r.add(this.schedule())):n.complete()}))),r}))}},1800:function(t,e,n){"use strict";n.d(e,"a",(function(){return 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}()},1801:function(t,e,n){"use strict";n.d(e,"a",(function(){return 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}()},1802:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(1777);function i(){return Object(r.a)(1)}},1803:function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var r=n(1733),i=n(1743),s=n(1777),o=n(1762);function c(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Number.POSITIVE_INFINITY,c=null,a=t[t.length-1];return Object(i.a)(a)?(c=t.pop(),t.length>1&&"number"===typeof t[t.length-1]&&(n=t.pop())):"number"===typeof a&&(n=t.pop()),null===c&&1===t.length&&t[0]instanceof r.a?t[0]:Object(s.a)(n)(Object(o.a)(t,c))}},1804:function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(121),i=n(1738),s=n(1762),o=n(1747),c=n(1751);function a(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(1===t.length){if(!Object(i.a)(t[0]))return t[0];t=t[0]}return Object(s.a)(t,void 0).lift(new u)}var u=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new l(t))},t}(),l=function(t){function e(e){var n=t.call(this,e)||this;return n.hasFirst=!1,n.observables=[],n.subscriptions=[],n}return r.__extends(e,t),e.prototype._next=function(t){this.observables.push(t)},e.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else{for(var n=0;n<e&&!this.hasFirst;n++){var r=t[n],i=Object(c.a)(this,r,void 0,n);this.subscriptions&&this.subscriptions.push(i),this.add(i)}this.observables=null}},e.prototype.notifyNext=function(t,e,n){if(!this.hasFirst){this.hasFirst=!0;for(var r=0;r<this.subscriptions.length;r++)if(r!==n){var i=this.subscriptions[r];i.unsubscribe(),this.remove(i)}this.subscriptions=null}this.destination.next(e)},e}(o.a)},1805:function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var r=n(1733),i=n(1737),s=n(1779),o=n(1743);function c(t,e,n){void 0===t&&(t=0);var c=-1;return Object(s.a)(e)?c=Number(e)<1?1:Number(e):Object(o.a)(e)&&(n=e),Object(o.a)(n)||(n=i.a),new r.a((function(e){var r=Object(s.a)(t)?t:+t-n.now();return n.schedule(a,r,{index:0,period:c,subscriber:e})}))}function a(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)}}},1806:function(t,e,n){"use strict";var r=String.prototype.replace,i=/%20/g,s="RFC1738",o="RFC3986";t.exports={default:o,formatters:{RFC1738:function(t){return r.call(t,i,"+")},RFC3986:function(t){return String(t)}},RFC1738:s,RFC3986:o}},1807:function(t,e,n){"use strict";function r(){return t=>t}Object.defineProperty(e,"__esModule",{value:!0}),e.RegExpString=e.IntNumber=e.BigIntString=e.AddressString=e.HexString=e.OpaqueType=void 0,e.OpaqueType=r,e.HexString=t=>t,e.AddressString=t=>t,e.BigIntString=t=>t,e.IntNumber=function(t){return Math.floor(t)},e.RegExpString=t=>t},1808:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EthereumProviderError=e.EthereumRpcError=void 0;const r=n(1818);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(),s,2)}}e.EthereumRpcError=i;function s(t,e){if("[Circular]"!==e)return e}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)}}},1809:function(t,e,n){"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."}}},1810:function(t,e,n){const r=n(1769).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}}},1811:function(t,e){function n(t){return void 0===t||null===t?t:Number.parseInt(t,16)}function r(t){if(void 0===t||null===t)return t;return"0x"+t.toString(16)}t.exports=async function(t){let{provider:e,fromBlock:i,toBlock:s}=t;i||(i=s);const o=n(i),c=n(s),a=Array(c-o+1).fill().map(((t,e)=>o+e)).map(r);return await Promise.all(a.map((t=>function(t,e,n){return new Promise(((r,i)=>{t.sendAsync({id:1,jsonrpc:"2.0",method:e,params:n},((t,e)=>{if(t)return i(t);r(e.result)}))}))}(e,"eth_getBlockByNumber",[t,!1]))))}},1812:function(t,e,n){"use strict";n.r(e),n.d(e,"useCallback",(function(){return S})),n.d(e,"useContext",(function(){return k})),n.d(e,"useDebugValue",(function(){return C})),n.d(e,"useEffect",(function(){return _})),n.d(e,"useErrorBoundary",(function(){return I})),n.d(e,"useId",(function(){return A})),n.d(e,"useImperativeHandle",(function(){return E})),n.d(e,"useLayoutEffect",(function(){return v})),n.d(e,"useMemo",(function(){return x})),n.d(e,"useReducer",(function(){return m})),n.d(e,"useRef",(function(){return w})),n.d(e,"useState",(function(){return g}));var r,i,s,o,c=n(1756),a=0,u=[],l=[],h=c.options.__b,d=c.options.__r,f=c.options.diffed,p=c.options.__c,b=c.options.unmount;function y(t,e){c.options.__h&&c.options.__h(i,t,a||e),a=0;var n=i.__H||(i.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({__V:l}),n.__[t]}function g(t){return a=1,m(P,t)}function m(t,e,n){var s=y(r++,2);if(s.t=t,!s.__c&&(s.__=[n?n(e):P(void 0,e),function(t){var e=s.__N?s.__N[0]:s.__[0],n=s.t(e,t);e!==n&&(s.__N=[n,s.__[1]],s.__c.setState({}))}],s.__c=i,!i.u)){i.u=!0;var o=i.shouldComponentUpdate;i.shouldComponentUpdate=function(t,e,n){if(!s.__c.__H)return!0;var r=s.__c.__H.__.filter((function(t){return t.__c}));if(r.every((function(t){return!t.__N})))return!o||o.call(this,t,e,n);var i=!1;return r.forEach((function(t){if(t.__N){var e=t.__[0];t.__=t.__N,t.__N=void 0,e!==t.__[0]&&(i=!0)}})),!(!i&&s.__c.props===t)&&(!o||o.call(this,t,e,n))}}return s.__N||s.__}function _(t,e){var n=y(r++,3);!c.options.__s&&T(n.__H,e)&&(n.__=t,n.i=e,i.__H.__h.push(n))}function v(t,e){var n=y(r++,4);!c.options.__s&&T(n.__H,e)&&(n.__=t,n.i=e,i.__h.push(n))}function w(t){return a=5,x((function(){return{current:t}}),[])}function E(t,e,n){a=6,v((function(){return"function"==typeof t?(t(e()),function(){return t(null)}):t?(t.current=e(),function(){return t.current=null}):void 0}),null==n?n:n.concat(t))}function x(t,e){var n=y(r++,7);return T(n.__H,e)?(n.__V=t(),n.i=e,n.__h=t,n.__V):n.__}function S(t,e){return a=8,x((function(){return t}),e)}function k(t){var e=i.context[t.__c],n=y(r++,9);return n.c=t,e?(null==n.__&&(n.__=!0,e.sub(i)),e.props.value):t.__}function C(t,e){c.options.useDebugValue&&c.options.useDebugValue(e?e(t):t)}function I(t){var e=y(r++,10),n=g();return e.__=t,i.componentDidCatch||(i.componentDidCatch=function(t,r){e.__&&e.__(t,r),n[1](t)}),[n[0],function(){n[1](void 0)}]}function A(){var t=y(r++,11);if(!t.__){for(var e=i.__v;null!==e&&!e.__m&&null!==e.__;)e=e.__;var n=e.__m||(e.__m=[0,0]);t.__="P"+n[0]+"-"+n[1]++}return t.__}function O(){for(var t;t=u.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(j),t.__H.__h.forEach(N),t.__H.__h=[]}catch(i){t.__H.__h=[],c.options.__e(i,t.__v)}}c.options.__b=function(t){i=null,h&&h(t)},c.options.__r=function(t){d&&d(t),r=0;var e=(i=t.__c).__H;e&&(s===i?(e.__h=[],i.__h=[],e.__.forEach((function(t){t.__N&&(t.__=t.__N),t.__V=l,t.__N=t.i=void 0}))):(e.__h.forEach(j),e.__h.forEach(N),e.__h=[])),s=i},c.options.diffed=function(t){f&&f(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(1!==u.push(e)&&o===c.options.requestAnimationFrame||((o=c.options.requestAnimationFrame)||R)(O)),e.__H.__.forEach((function(t){t.i&&(t.__H=t.i),t.__V!==l&&(t.__=t.__V),t.i=void 0,t.__V=l}))),s=i=null},c.options.__c=function(t,e){e.some((function(t){try{t.__h.forEach(j),t.__h=t.__h.filter((function(t){return!t.__||N(t)}))}catch(s){e.some((function(t){t.__h&&(t.__h=[])})),e=[],c.options.__e(s,t.__v)}})),p&&p(t,e)},c.options.unmount=function(t){b&&b(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach((function(t){try{j(t)}catch(t){e=t}})),n.__H=void 0,e&&c.options.__e(e,n.__v))};var M="function"==typeof requestAnimationFrame;function R(t){var e,n=function(){clearTimeout(r),M&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);M&&(e=requestAnimationFrame(n))}function j(t){var e=i,n=t.__c;"function"==typeof n&&(t.__c=void 0,n()),i=e}function N(t){var e=i;t.__c=t.__(),i=e}function T(t,e){return!t||t.length!==e.length||e.some((function(e,n){return e!==t[n]}))}function P(t,e){return"function"==typeof e?e(t):e}},1813:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RelayMessageType=void 0,function(t){t.SESSION_ID_REQUEST="SESSION_ID_REQUEST",t.SESSION_ID_RESPONSE="SESSION_ID_RESPONSE",t.LINKED="LINKED",t.UNLINKED="UNLINKED",t.WEB3_REQUEST="WEB3_REQUEST",t.WEB3_REQUEST_CANCELED="WEB3_REQUEST_CANCELED",t.WEB3_RESPONSE="WEB3_RESPONSE"}(e.RelayMessageType||(e.RelayMessageType={}))},1815:function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var r=n(1733),i=n(1735),s=n(1746);var o=n(1799),c=n(1765);var a=n(1824),u=n(1823);function l(t,e){if(null!=t){if(function(t){return t&&"function"===typeof t[s.a]}(t))return function(t,e){return new r.a((function(n){var r=new i.a;return r.add(e.schedule((function(){var i=t[s.a]();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(Object(a.a)(t))return function(t,e){return new r.a((function(n){var r=new i.a;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(Object(u.a)(t))return Object(o.a)(t,e);if(function(t){return t&&"function"===typeof t[c.a]}(t)||"string"===typeof t)return function(t,e){if(!t)throw new Error("Iterable cannot be null");return new r.a((function(n){var r,s=new i.a;return s.add((function(){r&&"function"===typeof r.return&&r.return()})),s.add(e.schedule((function(){r=t[c.a](),s.add(e.schedule((function(){if(!n.closed){var t,e;try{var i=r.next();t=i.value,e=i.done}catch(s){return void n.error(s)}e?n.complete():(n.next(t),this.schedule())}})))}))),s}))}(t,e)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}},1817:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CoinbaseWalletSDK=void 0;const r=n(1842),i=n(1785),s=n(1881),o=n(1898),c=n(1910),a=n(1745),u=Object({NODE_ENV:"production",PUBLIC_URL:"https://cdn.decentraland.org/@dcl/explorer-website/0.1.0-7411312393.commit-c1f7c79",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_WEBSITE_VERSION:"0.1.0-7411312393.commit-c1f7c79",REACT_APP_EXPLORER_VERSION:"1.0.131583-20230718133624.commit-7106e1f",REACT_APP_EXPLORER_BASE_URL:""}).LINK_API_URL||"https://www.walletlink.org",l=Object({NODE_ENV:"production",PUBLIC_URL:"https://cdn.decentraland.org/@dcl/explorer-website/0.1.0-7411312393.commit-c1f7c79",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_WEBSITE_VERSION:"0.1.0-7411312393.commit-c1f7c79",REACT_APP_EXPLORER_VERSION:"1.0.131583-20230718133624.commit-7106e1f",REACT_APP_EXPLORER_BASE_URL:""}).SDK_VERSION||n(1911).version||"unknown";class h{constructor(t){var e,n;this._appName="",this._appLogoUrl=null,this._relay=null,this._relayEventManager=null;const i=t.linkAPIUrl||u;let a;a=t.uiConstructor?t.uiConstructor:t=>new s.WalletSDKUI(t),"undefined"===typeof t.overrideIsMetaMask?this._overrideIsMetaMask=!1:this._overrideIsMetaMask=t.overrideIsMetaMask,this._overrideIsCoinbaseWallet=null===(e=t.overrideIsCoinbaseWallet)||void 0===e||e,this._overrideIsCoinbaseBrowser=null!==(n=t.overrideIsCoinbaseBrowser)&&void 0!==n&&n,this._eventListener=t.eventListener;const d=new URL(i),f=`${d.protocol}//${d.host}`;this._storage=new r.ScopedLocalStorage(`-walletlink:${f}`),this._storage.setItem("version",h.VERSION),this.walletExtension||(this._relayEventManager=new c.WalletSDKRelayEventManager,this._relay=new o.WalletSDKRelay({linkAPIUrl:i,version:l,darkMode:!!t.darkMode,uiConstructor:a,storage:this._storage,relayEventManager:this._relayEventManager,eventListener:this._eventListener}),this.setAppInfo(t.appName,t.appLogoUrl),t.headlessMode||this._relay.attachUI())}makeWeb3Provider(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;const n=this.walletExtension;if(n)return this.isCipherProvider(n)||n.setProviderInfo(t,e),n;const r=this._relay;if(!r||!this._relayEventManager||!this._storage)throw new Error("Relay not initialized, should never happen");return t||r.setConnectDisabled(!0),new i.CoinbaseWalletProvider({relayProvider:()=>Promise.resolve(r),relayEventManager:this._relayEventManager,storage:this._storage,jsonRpcUrl:t,chainId:e,qrUrl:this.getQrUrl(),eventListener:this._eventListener,overrideIsMetaMask:this._overrideIsMetaMask,overrideIsCoinbaseWallet:this._overrideIsCoinbaseWallet,overrideIsCoinbaseBrowser:this._overrideIsCoinbaseBrowser})}setAppInfo(t,e){var n;this._appName=t||"DApp",this._appLogoUrl=e||(0,a.getFavicon)();const r=this.walletExtension;r?this.isCipherProvider(r)||r.setAppInfo(this._appName,this._appLogoUrl):null===(n=this._relay)||void 0===n||n.setAppInfo(this._appName,this._appLogoUrl)}disconnect(){var t;const e=this.walletExtension;e?e.close():null===(t=this._relay)||void 0===t||t.resetAndReload()}getQrUrl(){var t,e;return null!==(e=null===(t=this._relay)||void 0===t?void 0:t.getQRCodeUrl())&&void 0!==e?e:null}get walletExtension(){var t;return null!==(t=window.coinbaseWalletExtension)&&void 0!==t?t:window.walletLinkExtension}isCipherProvider(t){return"boolean"===typeof t.isCipher&&t.isCipher}}e.CoinbaseWalletSDK=h,h.VERSION=l},1818:function(t,e){t.exports=i,i.default=i,i.stable=c,i.stableStringify=c;var n=[],r=[];function i(t,e,i){var o;s(t,"",[],void 0);try{o=0===r.length?JSON.stringify(t,e,i):JSON.stringify(t,u(e),i)}catch(a){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==n.length;){var c=n.pop();4===c.length?Object.defineProperty(c[0],c[1],c[3]):c[0][c[1]]=c[2]}}return o}function s(t,e,i,o){var c;if("object"===typeof t&&null!==t){for(c=0;c<i.length;c++)if(i[c]===t){var a=Object.getOwnPropertyDescriptor(o,e);return void(void 0!==a.get?a.configurable?(Object.defineProperty(o,e,{value:"[Circular]"}),n.push([o,e,t,a])):r.push([t,e]):(o[e]="[Circular]",n.push([o,e,t])))}if(i.push(t),Array.isArray(t))for(c=0;c<t.length;c++)s(t[c],c,i,t);else{var u=Object.keys(t);for(c=0;c<u.length;c++){var l=u[c];s(t[l],l,i,t)}}i.pop()}}function o(t,e){return t<e?-1:t>e?1:0}function c(t,e,i){var s,o=a(t,"",[],void 0)||t;try{s=0===r.length?JSON.stringify(o,e,i):JSON.stringify(o,u(e),i)}catch(l){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==n.length;){var c=n.pop();4===c.length?Object.defineProperty(c[0],c[1],c[3]):c[0][c[1]]=c[2]}}return s}function a(t,e,i,s){var c;if("object"===typeof t&&null!==t){for(c=0;c<i.length;c++)if(i[c]===t){var u=Object.getOwnPropertyDescriptor(s,e);return void(void 0!==u.get?u.configurable?(Object.defineProperty(s,e,{value:"[Circular]"}),n.push([s,e,t,u])):r.push([t,e]):(s[e]="[Circular]",n.push([s,e,t])))}try{if("function"===typeof t.toJSON)return}catch(f){return}if(i.push(t),Array.isArray(t))for(c=0;c<t.length;c++)a(t[c],c,i,t);else{var l={},h=Object.keys(t).sort(o);for(c=0;c<h.length;c++){var d=h[c];a(t[d],d,i,t),l[d]=t[d]}if(void 0===s)return l;n.push([s,e,t]),s[e]=l}i.pop()}}function u(t){return t=void 0!==t?t:function(t,e){return e},function(e,n){if(r.length>0)for(var i=0;i<r.length;i++){var s=r[i];if(s[1]===e&&s[0]===n){n="[Circular]",r.splice(i,1);break}}return t.call(this,e,n)}}},1819:function(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(1788),i=n(1787),s=r.errorCodes.rpc.internal,o="Unspecified error message. This is a bug, please report it.",c={code:s,message:a(s)};function a(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o;if(Number.isInteger(t)){const n=t.toString();if(d(r.errorValues,n))return r.errorValues[n].message;if(l(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]||!!l(t)}function l(t){return t>=-32099&&t<=-32e3}function h(t){return t&&"object"===typeof t&&!Array.isArray(t)?Object.assign({},t):t}function d(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){let{fallbackError:e=c,shouldIncludeStack:n=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var r,s;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 o={};if(t&&"object"===typeof t&&!Array.isArray(t)&&d(t,"code")&&u(t.code)){const e=t;o.code=e.code,e.message&&"string"===typeof e.message?(o.message=e.message,d(e,"data")&&(o.data=e.data)):(o.message=a(o.code),o.data={originalError:h(t)})}else{o.code=e.code;const n=null===(r=t)||void 0===r?void 0:r.message;o.message=n&&"string"===typeof n?n:e.message,o.data={originalError:h(t)}}const l=null===(s=t)||void 0===s?void 0:s.stack;return n&&t&&l&&"string"===typeof l&&(o.stack=l),o}},1820:function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(1758),i=n(1791),s={closed:!0,next:function(t){},error:function(t){if(r.a.useDeprecatedSynchronousErrorHandling)throw t;Object(i.a)(t)},complete:function(){}}},1821:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(121),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.__extends(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(1735).a)},1822:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function(t){return function(e){for(var n=0,r=t.length;n<r&&!e.closed;n++)e.next(t[n]);e.complete()}}},1823:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function(t){return t&&"number"===typeof t.length&&"function"!==typeof t}},1824:function(t,e,n){"use strict";function r(t){return!!t&&"function"!==typeof t.subscribe&&"function"===typeof t.then}n.d(e,"a",(function(){return r}))},1825:function(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,"a",(function(){return r}))},1826:function(t,e,n){"use strict";var r=n(1806),i=Object.prototype.hasOwnProperty,s=Array.isArray,o=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),c=function(t,e){for(var n=e&&e.plainObjects?Object.create(null):{},r=0;r<t.length;++r)"undefined"!==typeof t[r]&&(n[r]=t[r]);return n};t.exports={arrayToObject:c,assign:function(t,e){return Object.keys(e).reduce((function(t,n){return t[n]=e[n],t}),t)},combine:function(t,e){return[].concat(t,e)},compact:function(t){for(var e=[{obj:{o:t},prop:"o"}],n=[],r=0;r<e.length;++r)for(var i=e[r],o=i.obj[i.prop],c=Object.keys(o),a=0;a<c.length;++a){var u=c[a],l=o[u];"object"===typeof l&&null!==l&&-1===n.indexOf(l)&&(e.push({obj:o,prop:u}),n.push(l))}return function(t){for(;t.length>1;){var e=t.pop(),n=e.obj[e.prop];if(s(n)){for(var r=[],i=0;i<n.length;++i)"undefined"!==typeof n[i]&&r.push(n[i]);e.obj[e.prop]=r}}}(e),t},decode:function(t,e,n){var r=t.replace(/\+/g," ");if("iso-8859-1"===n)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(i){return r}},encode:function(t,e,n,i,s){if(0===t.length)return t;var c=t;if("symbol"===typeof t?c=Symbol.prototype.toString.call(t):"string"!==typeof t&&(c=String(t)),"iso-8859-1"===n)return escape(c).replace(/%u[0-9a-f]{4}/gi,(function(t){return"%26%23"+parseInt(t.slice(2),16)+"%3B"}));for(var a="",u=0;u<c.length;++u){var l=c.charCodeAt(u);45===l||46===l||95===l||126===l||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||s===r.RFC1738&&(40===l||41===l)?a+=c.charAt(u):l<128?a+=o[l]:l<2048?a+=o[192|l>>6]+o[128|63&l]:l<55296||l>=57344?a+=o[224|l>>12]+o[128|l>>6&63]+o[128|63&l]:(u+=1,l=65536+((1023&l)<<10|1023&c.charCodeAt(u)),a+=o[240|l>>18]+o[128|l>>12&63]+o[128|l>>6&63]+o[128|63&l])}return a},isBuffer:function(t){return!(!t||"object"!==typeof t)&&!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},maybeMap:function(t,e){if(s(t)){for(var n=[],r=0;r<t.length;r+=1)n.push(e(t[r]));return n}return e(t)},merge:function t(e,n,r){if(!n)return e;if("object"!==typeof n){if(s(e))e.push(n);else{if(!e||"object"!==typeof e)return[e,n];(r&&(r.plainObjects||r.allowPrototypes)||!i.call(Object.prototype,n))&&(e[n]=!0)}return e}if(!e||"object"!==typeof e)return[e].concat(n);var o=e;return s(e)&&!s(n)&&(o=c(e,r)),s(e)&&s(n)?(n.forEach((function(n,s){if(i.call(e,s)){var o=e[s];o&&"object"===typeof o&&n&&"object"===typeof n?e[s]=t(o,n,r):e.push(n)}else e[s]=n})),e):Object.keys(n).reduce((function(e,s){var o=n[s];return i.call(e,s)?e[s]=t(e[s],o,r):e[s]=o,e}),o)}}},1827:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WalletSDKRelayAbstract=e.APP_VERSION_KEY=e.LOCAL_STORAGE_ADDRESSES_KEY=e.WALLET_USER_NAME_KEY=void 0;const r=n(1786);e.WALLET_USER_NAME_KEY="walletUsername",e.LOCAL_STORAGE_ADDRESSES_KEY="Addresses",e.APP_VERSION_KEY="AppVersion";e.WalletSDKRelayAbstract=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}))}}},1828:function(t,e,n){(function(e){const r=n(1849),i=n(21);function s(t){return e.allocUnsafe(t).fill(0)}function o(t,e,n){const r=s(e);return t=c(t),n?t.length<e?(t.copy(r),r):t.slice(0,e):t.length<e?(t.copy(r,e-t.length),r):t.slice(-e)}function c(t){if(!e.isBuffer(t))if(Array.isArray(t))t=e.from(t);else if("string"===typeof t)t=a(t)?e.from((n=u(t)).length%2?"0"+n:n,"hex"):e.from(t);else if("number"===typeof t)t=intToBuffer(t);else if(null===t||void 0===t)t=e.allocUnsafe(0);else if(i.isBN(t))t=t.toArrayLike(e);else{if(!t.toArray)throw new Error("invalid type");t=e.from(t.toArray())}var n;return t}function a(t){return"string"===typeof t&&t.match(/^0x[0-9A-Fa-f]*$/)}function u(t){return"string"===typeof t&&t.startsWith("0x")?t.slice(2):t}t.exports={zeros:s,setLength:o,setLengthRight:function(t,e){return o(t,e,!0)},isHexString:a,stripHexPrefix:u,toBuffer:c,bufferToHex:function(t){return"0x"+(t=c(t)).toString("hex")},keccak:function(t,e){return t=c(t),e||(e=256),r("keccak"+e).update(t).digest()}}}).call(this,n(60).Buffer)},1829:function(t,e,n){"use strict";const r=(t,e)=>function(){const n=e.promiseModule,r=new Array(arguments.length);for(let t=0;t<arguments.length;t++)r[t]=arguments[t];return new n(((n,i)=>{e.errorFirst?r.push((function(t,r){if(e.multiArgs){const e=new Array(arguments.length-1);for(let t=1;t<arguments.length;t++)e[t-1]=arguments[t];t?(e.unshift(t),i(e)):n(e)}else t?i(t):n(r)})):r.push((function(t){if(e.multiArgs){const t=new Array(arguments.length-1);for(let e=0;e<arguments.length;e++)t[e]=arguments[e];n(t)}else n(t)})),t.apply(this,r)}))};t.exports=(t,e)=>{e=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},e);const n=t=>{const n=e=>"string"===typeof e?t===e:e.test(t);return e.include?e.include.some(n):!e.exclude.some(n)};let i;i="function"===typeof t?function(){return e.excludeMain?t.apply(this,arguments):r(t,e).apply(this,arguments)}:Object.create(Object.getPrototypeOf(t));for(const s in t){const o=t[s];i[s]="function"===typeof o&&n(s)?r(o,e):o}return i}},1830:function(t,e,n){const r=n(1861),i=n(1862)();function s(t){this.currentProvider=t}function o(t){return function(){const e=this;var n=[].slice.call(arguments),r=n.pop();e.sendAsync({method:t,params:n},r)}}function c(t,e){return function(){const n=this;var r=[].slice.call(arguments),i=r.pop();r.length<t&&r.push("latest"),n.sendAsync({method:e,params:r},i)}}t.exports=s,s.prototype.getBalance=c(2,"eth_getBalance"),s.prototype.getCode=c(2,"eth_getCode"),s.prototype.getTransactionCount=c(2,"eth_getTransactionCount"),s.prototype.getStorageAt=c(3,"eth_getStorageAt"),s.prototype.call=c(2,"eth_call"),s.prototype.protocolVersion=o("eth_protocolVersion"),s.prototype.syncing=o("eth_syncing"),s.prototype.coinbase=o("eth_coinbase"),s.prototype.mining=o("eth_mining"),s.prototype.hashrate=o("eth_hashrate"),s.prototype.gasPrice=o("eth_gasPrice"),s.prototype.accounts=o("eth_accounts"),s.prototype.blockNumber=o("eth_blockNumber"),s.prototype.getBlockTransactionCountByHash=o("eth_getBlockTransactionCountByHash"),s.prototype.getBlockTransactionCountByNumber=o("eth_getBlockTransactionCountByNumber"),s.prototype.getUncleCountByBlockHash=o("eth_getUncleCountByBlockHash"),s.prototype.getUncleCountByBlockNumber=o("eth_getUncleCountByBlockNumber"),s.prototype.sign=o("eth_sign"),s.prototype.sendTransaction=o("eth_sendTransaction"),s.prototype.sendRawTransaction=o("eth_sendRawTransaction"),s.prototype.estimateGas=o("eth_estimateGas"),s.prototype.getBlockByHash=o("eth_getBlockByHash"),s.prototype.getBlockByNumber=o("eth_getBlockByNumber"),s.prototype.getTransactionByHash=o("eth_getTransactionByHash"),s.prototype.getTransactionByBlockHashAndIndex=o("eth_getTransactionByBlockHashAndIndex"),s.prototype.getTransactionByBlockNumberAndIndex=o("eth_getTransactionByBlockNumberAndIndex"),s.prototype.getTransactionReceipt=o("eth_getTransactionReceipt"),s.prototype.getUncleByBlockHashAndIndex=o("eth_getUncleByBlockHashAndIndex"),s.prototype.getUncleByBlockNumberAndIndex=o("eth_getUncleByBlockNumberAndIndex"),s.prototype.getCompilers=o("eth_getCompilers"),s.prototype.compileLLL=o("eth_compileLLL"),s.prototype.compileSolidity=o("eth_compileSolidity"),s.prototype.compileSerpent=o("eth_compileSerpent"),s.prototype.newFilter=o("eth_newFilter"),s.prototype.newBlockFilter=o("eth_newBlockFilter"),s.prototype.newPendingTransactionFilter=o("eth_newPendingTransactionFilter"),s.prototype.uninstallFilter=o("eth_uninstallFilter"),s.prototype.getFilterChanges=o("eth_getFilterChanges"),s.prototype.getFilterLogs=o("eth_getFilterLogs"),s.prototype.getLogs=o("eth_getLogs"),s.prototype.getWork=o("eth_getWork"),s.prototype.submitWork=o("eth_submitWork"),s.prototype.submitHashrate=o("eth_submitHashrate"),s.prototype.sendAsync=function(t,e){var n;this.currentProvider.sendAsync((n=t,r({id:i(),jsonrpc:"2.0",params:[]},n)),(function(t,n){if(!t&&n.error&&(t=new Error("EthQuery - RPC Error - "+n.error.message)),t)return e(t);e(null,n.result)}))}},1831:function(t,e,n){t.exports=n(1868)},1832: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(1869),e),i(n(1870),e),i(n(1871),e),i(n(1833),e),i(n(1834),e),i(n(1874),e)},1833:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getUniqueId=void 0;const r=4294967295;let i=Math.floor(Math.random()*r);e.getUniqueId=function(){return i=(i+1)%r,i}},1834: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(1769)),s=n(1872);class o 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,s,c]=await o._runAllMiddleware(t,e,this._middleware);return s?(await o._runReturnHandlers(c),r(i)):n((async t=>{try{await o._runReturnHandlers(c)}catch(e){return t(e)}return t()}))}catch(i){return r(i)}}}async _handleBatch(t,e){try{const n=await Promise.all(t.map(this._promiseHandle.bind(this)));return e?e(null,n):n}catch(n){if(e)return e(n);throw n}}_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 s.EthereumRpcError(s.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 s.EthereumRpcError(s.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(o){i=o}return i&&(delete r.result,r.error||(r.error=s.serializeError(i))),e(i,r)}async _processRequest(t,e){const[n,r,i]=await o._runAllMiddleware(t,e,this._middleware);if(o._checkForCompletion(t,e,r),await o._runReturnHandlers(i),n)throw n}static async _runAllMiddleware(t,e,n){const r=[];let i=null,s=!1;for(const c of n)if([i,s]=await o._runMiddleware(t,e,c,r),s)break;return[i,s,r.reverse()]}static _runMiddleware(t,e,n,r){return new Promise((i=>{const o=t=>{const n=t||e.error;n&&(e.error=s.serializeError(n)),i([n,!0])},a=n=>{e.error?o(e.error):(n&&("function"!==typeof n&&o(new s.EthereumRpcError(s.errorCodes.rpc.internal,`JsonRpcEngine: "next" return handlers must be functions. Received "${typeof n}" for request:\n${c(t)}`,{request:t})),r.push(n)),i([null,!1]))};try{n(t,e,a,o)}catch(u){o(u)}}))}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 s.EthereumRpcError(s.errorCodes.rpc.internal,`JsonRpcEngine: Response has no error or result for request:\n${c(t)}`,{request:t});if(!n)throw new s.EthereumRpcError(s.errorCodes.rpc.internal,`JsonRpcEngine: Nothing ended request:\n${c(t)}`,{request:t})}}function c(t){return JSON.stringify(t,null,2)}e.JsonRpcEngine=o},1835:function(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(1809),i=n(1808),s=r.errorCodes.rpc.internal,o="Unspecified error message. This is a bug, please report it.",c={code:s,message:a(s)};function a(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o;if(Number.isInteger(t)){const n=t.toString();if(d(r.errorValues,n))return r.errorValues[n].message;if(l(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]||!!l(t)}function l(t){return t>=-32099&&t<=-32e3}function h(t){return t&&"object"===typeof t&&!Array.isArray(t)?Object.assign({},t):t}function d(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){let{fallbackError:e=c,shouldIncludeStack:n=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var r,s;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 o={};if(t&&"object"===typeof t&&!Array.isArray(t)&&d(t,"code")&&u(t.code)){const e=t;o.code=e.code,e.message&&"string"===typeof e.message?(o.message=e.message,d(e,"data")&&(o.data=e.data)):(o.message=a(o.code),o.data={originalError:h(t)})}else{o.code=e.code;const n=null===(r=t)||void 0===r?void 0:r.message;o.message=n&&"string"===typeof n?n:e.message,o.data={originalError:h(t)}}const l=null===(s=t)||void 0===s?void 0:s.stack;return n&&t&&l&&"string"===typeof l&&(o.stack=l),o}},1836:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Web3Method=void 0,function(t){t.requestEthereumAccounts="requestEthereumAccounts",t.signEthereumMessage="signEthereumMessage",t.signEthereumTransaction="signEthereumTransaction",t.submitEthereumTransaction="submitEthereumTransaction",t.ethereumAddressFromSignedMessage="ethereumAddressFromSignedMessage",t.scanQRCode="scanQRCode",t.generic="generic",t.childRequestEthereumAccounts="childRequestEthereumAccounts",t.addEthereumChain="addEthereumChain",t.switchEthereumChain="switchEthereumChain",t.makeEthereumJSONRPCRequest="makeEthereumJSONRPCRequest",t.watchAsset="watchAsset"}(e.Web3Method||(e.Web3Method={}))},1842:function(t,e,n){"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;n<localStorage.length;n++){const r=localStorage.key(n);"string"===typeof r&&r.startsWith(t)&&e.push(r)}e.forEach((t=>localStorage.removeItem(t)))}scopedKey(t){return`${this.scope}:${t}`}}},1843:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ethErrors=void 0;const r=n(1787),i=n(1819),s=n(1788);function o(t,e){const[n,s]=a(e);return new r.EthereumRpcError(t,n||i.getMessageFromCode(t),s)}function c(t,e){const[n,s]=a(e);return new r.EthereumProviderError(t,n||i.getMessageFromCode(t),s)}function a(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=>o(s.errorCodes.rpc.parse,t),invalidRequest:t=>o(s.errorCodes.rpc.invalidRequest,t),invalidParams:t=>o(s.errorCodes.rpc.invalidParams,t),methodNotFound:t=>o(s.errorCodes.rpc.methodNotFound,t),internal:t=>o(s.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 o(e,t)},invalidInput:t=>o(s.errorCodes.rpc.invalidInput,t),resourceNotFound:t=>o(s.errorCodes.rpc.resourceNotFound,t),resourceUnavailable:t=>o(s.errorCodes.rpc.resourceUnavailable,t),transactionRejected:t=>o(s.errorCodes.rpc.transactionRejected,t),methodNotSupported:t=>o(s.errorCodes.rpc.methodNotSupported,t),limitExceeded:t=>o(s.errorCodes.rpc.limitExceeded,t)},provider:{userRejectedRequest:t=>c(s.errorCodes.provider.userRejectedRequest,t),unauthorized:t=>c(s.errorCodes.provider.unauthorized,t),unsupportedMethod:t=>c(s.errorCodes.provider.unsupportedMethod,t),disconnected:t=>c(s.errorCodes.provider.disconnected,t),chainDisconnected:t=>c(s.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)}}}},1844:function(module,exports,__webpack_require__){(function(process,global){var __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=global:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_SHA256_NO_COMMON_JS&&"object"===typeof module&&module.exports,AMD=__webpack_require__(316),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<OUTPUT_TYPES.length;++n){var r=OUTPUT_TYPES[n];e[r]=createOutputMethod(r,t)}return e},nodeWrap=function(method,is224){var crypto=eval("require('crypto')"),Buffer=eval("require('buffer').Buffer"),algorithm=is224?"sha224":"sha256",nodeMethod=function(t){if("string"===typeof t)return crypto.createHash(algorithm).update(t,"utf8").digest("hex");if(null===t||void 0===t)throw new Error(ERROR);return t.constructor===ArrayBuffer&&(t=new Uint8Array(t)),Array.isArray(t)||ArrayBuffer.isView(t)||t.constructor===Buffer?crypto.createHash(algorithm).update(new Buffer(t)).digest("hex"):method(t)};return nodeMethod},createHmacOutputMethod=function(t,e){return function(n,r){return new HmacSha256(n,e,!0).update(r)[t]()}},createHmacMethod=function(t){var e=createHmacOutputMethod("hex",t);e.create=function(e){return new HmacSha256(e,t)},e.update=function(t,n){return e.create(t).update(n)};for(var n=0;n<OUTPUT_TYPES.length;++n){var r=OUTPUT_TYPES[n];e[r]=createHmacOutputMethod(r,t)}return e};function Sha256(t,e){e?(blocks[0]=blocks[16]=blocks[1]=blocks[2]=blocks[3]=blocks[4]=blocks[5]=blocks[6]=blocks[7]=blocks[8]=blocks[9]=blocks[10]=blocks[11]=blocks[12]=blocks[13]=blocks[14]=blocks[15]=0,this.blocks=blocks):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=t}function HmacSha256(t,e,n){var r,i=typeof t;if("string"===i){var s,o=[],c=t.length,a=0;for(r=0;r<c;++r)(s=t.charCodeAt(r))<128?o[a++]=s:s<2048?(o[a++]=192|s>>6,o[a++]=128|63&s):s<55296||s>=57344?(o[a++]=224|s>>12,o[a++]=128|s>>6&63,o[a++]=128|63&s):(s=65536+((1023&s)<<10|1023&t.charCodeAt(++r)),o[a++]=240|s>>18,o[a++]=128|s>>12&63,o[a++]=128|s>>6&63,o[a++]=128|63&s);t=o}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 u=[],l=[];for(r=0;r<64;++r){var h=t[r]||0;u[r]=92^h,l[r]=54^h}Sha256.call(this,e,n),this.update(l),this.oKeyPad=u,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,s=0,o=t.length,c=this.blocks;s<o;){if(this.hashed&&(this.hashed=!1,c[0]=this.block,c[16]=c[1]=c[2]=c[3]=c[4]=c[5]=c[6]=c[7]=c[8]=c[9]=c[10]=c[11]=c[12]=c[13]=c[14]=c[15]=0),e)for(i=this.start;s<o&&i<64;++s)c[i>>2]|=t[s]<<SHIFT[3&i++];else for(i=this.start;s<o&&i<64;++s)(r=t.charCodeAt(s))<128?c[i>>2]|=r<<SHIFT[3&i++]:r<2048?(c[i>>2]|=(192|r>>6)<<SHIFT[3&i++],c[i>>2]|=(128|63&r)<<SHIFT[3&i++]):r<55296||r>=57344?(c[i>>2]|=(224|r>>12)<<SHIFT[3&i++],c[i>>2]|=(128|r>>6&63)<<SHIFT[3&i++],c[i>>2]|=(128|63&r)<<SHIFT[3&i++]):(r=65536+((1023&r)<<10|1023&t.charCodeAt(++s)),c[i>>2]|=(240|r>>18)<<SHIFT[3&i++],c[i>>2]|=(128|r>>12&63)<<SHIFT[3&i++],c[i>>2]|=(128|r>>6&63)<<SHIFT[3&i++],c[i>>2]|=(128|63&r)<<SHIFT[3&i++]);this.lastByteIndex=i,this.bytes+=i-this.start,i>=64?(this.block=c[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,s,o,c,a,u=this.h0,l=this.h1,h=this.h2,d=this.h3,f=this.h4,p=this.h5,b=this.h6,y=this.h7,g=this.blocks;for(t=16;t<64;++t)e=((i=g[t-15])>>>7|i<<25)^(i>>>18|i<<14)^i>>>3,n=((i=g[t-2])>>>17|i<<15)^(i>>>19|i<<13)^i>>>10,g[t]=g[t-16]+e+g[t-7]+n<<0;for(a=l&h,t=0;t<64;t+=4)this.first?(this.is224?(s=300032,y=(i=g[0]-1413257819)-150054599<<0,d=i+24177077<<0):(s=704751109,y=(i=g[0]-210244248)-1521486534<<0,d=i+143694565<<0),this.first=!1):(e=(u>>>2|u<<30)^(u>>>13|u<<19)^(u>>>22|u<<10),r=(s=u&l)^u&h^a,y=d+(i=y+(n=(f>>>6|f<<26)^(f>>>11|f<<21)^(f>>>25|f<<7))+(f&p^~f&b)+K[t]+g[t])<<0,d=i+(e+r)<<0),e=(d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10),r=(o=d&u)^d&l^s,b=h+(i=b+(n=(y>>>6|y<<26)^(y>>>11|y<<21)^(y>>>25|y<<7))+(y&f^~y&p)+K[t+1]+g[t+1])<<0,e=((h=i+(e+r)<<0)>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10),r=(c=h&d)^h&u^o,p=l+(i=p+(n=(b>>>6|b<<26)^(b>>>11|b<<21)^(b>>>25|b<<7))+(b&y^~b&f)+K[t+2]+g[t+2])<<0,e=((l=i+(e+r)<<0)>>>2|l<<30)^(l>>>13|l<<19)^(l>>>22|l<<10),r=(a=l&h)^l&d^c,f=u+(i=f+(n=(p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+(p&b^~p&y)+K[t+3]+g[t+3])<<0,u=i+(e+r)<<0;this.h0=this.h0+u<<0,this.h1=this.h1+l<<0,this.h2=this.h2+h<<0,this.h3=this.h3+d<<0,this.h4=this.h4+f<<0,this.h5=this.h5+p<<0,this.h6=this.h6+b<<0,this.h7=this.h7+y<<0},Sha256.prototype.hex=function(){this.finalize();var t=this.h0,e=this.h1,n=this.h2,r=this.h3,i=this.h4,s=this.h5,o=this.h6,c=this.h7,a=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[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]+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];return this.is224||(a+=HEX_CHARS[c>>28&15]+HEX_CHARS[c>>24&15]+HEX_CHARS[c>>20&15]+HEX_CHARS[c>>16&15]+HEX_CHARS[c>>12&15]+HEX_CHARS[c>>8&15]+HEX_CHARS[c>>4&15]+HEX_CHARS[15&c]),a},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,s=this.h5,o=this.h6,c=this.h7,a=[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,s>>24&255,s>>16&255,s>>8&255,255&s,o>>24&255,o>>16&255,o>>8&255,255&o];return this.is224||a.push(c>>24&255,c>>16&255,c>>8&255,255&c),a},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__)))})()}).call(this,__webpack_require__(53),__webpack_require__(44))},1845:function(t,e,n){"use strict";var r=n(1846),i=n(1847),s=n(1806);t.exports={formats:s,parse:i,stringify:r}},1846:function(t,e,n){"use strict";var r=n(755),i=n(1826),s=n(1806),o=Object.prototype.hasOwnProperty,c={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},a=Array.isArray,u=String.prototype.split,l=Array.prototype.push,h=function(t,e){l.apply(t,a(e)?e:[e])},d=Date.prototype.toISOString,f=s.default,p={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:i.encode,encodeValuesOnly:!1,format:f,formatter:s.formatters[f],indices:!1,serializeDate:function(t){return d.call(t)},skipNulls:!1,strictNullHandling:!1},b={},y=function t(e,n,s,o,c,l,d,f,y,g,m,_,v,w,E,x){for(var S,k=e,C=x,I=0,A=!1;void 0!==(C=C.get(b))&&!A;){var O=C.get(e);if(I+=1,"undefined"!==typeof O){if(O===I)throw new RangeError("Cyclic object value");A=!0}"undefined"===typeof C.get(b)&&(I=0)}if("function"===typeof f?k=f(n,k):k instanceof Date?k=m(k):"comma"===s&&a(k)&&(k=i.maybeMap(k,(function(t){return t instanceof Date?m(t):t}))),null===k){if(c)return d&&!w?d(n,p.encoder,E,"key",_):n;k=""}if("string"===typeof(S=k)||"number"===typeof S||"boolean"===typeof S||"symbol"===typeof S||"bigint"===typeof S||i.isBuffer(k)){if(d){var M=w?n:d(n,p.encoder,E,"key",_);if("comma"===s&&w){for(var R=u.call(String(k),","),j="",N=0;N<R.length;++N)j+=(0===N?"":",")+v(d(R[N],p.encoder,E,"value",_));return[v(M)+(o&&a(k)&&1===R.length?"[]":"")+"="+j]}return[v(M)+"="+v(d(k,p.encoder,E,"value",_))]}return[v(n)+"="+v(String(k))]}var T,P=[];if("undefined"===typeof k)return P;if("comma"===s&&a(k))T=[{value:k.length>0?k.join(",")||null:void 0}];else if(a(f))T=f;else{var L=Object.keys(k);T=y?L.sort(y):L}for(var D=o&&a(k)&&1===k.length?n+"[]":n,B=0;B<T.length;++B){var H=T[B],F="object"===typeof H&&"undefined"!==typeof H.value?H.value:k[H];if(!l||null!==F){var U=a(k)?"function"===typeof s?s(D,H):D:D+(g?"."+H:"["+H+"]");x.set(e,I);var W=r();W.set(b,x),h(P,t(F,U,s,o,c,l,d,f,y,g,m,_,v,w,E,W))}}return P};t.exports=function(t,e){var n,i=t,u=function(t){if(!t)return p;if(null!==t.encoder&&"undefined"!==typeof t.encoder&&"function"!==typeof t.encoder)throw new TypeError("Encoder has to be a function.");var e=t.charset||p.charset;if("undefined"!==typeof t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=s.default;if("undefined"!==typeof t.format){if(!o.call(s.formatters,t.format))throw new TypeError("Unknown format option provided.");n=t.format}var r=s.formatters[n],i=p.filter;return("function"===typeof t.filter||a(t.filter))&&(i=t.filter),{addQueryPrefix:"boolean"===typeof t.addQueryPrefix?t.addQueryPrefix:p.addQueryPrefix,allowDots:"undefined"===typeof t.allowDots?p.allowDots:!!t.allowDots,charset:e,charsetSentinel:"boolean"===typeof t.charsetSentinel?t.charsetSentinel:p.charsetSentinel,delimiter:"undefined"===typeof t.delimiter?p.delimiter:t.delimiter,encode:"boolean"===typeof t.encode?t.encode:p.encode,encoder:"function"===typeof t.encoder?t.encoder:p.encoder,encodeValuesOnly:"boolean"===typeof t.encodeValuesOnly?t.encodeValuesOnly:p.encodeValuesOnly,filter:i,format:n,formatter:r,serializeDate:"function"===typeof t.serializeDate?t.serializeDate:p.serializeDate,skipNulls:"boolean"===typeof t.skipNulls?t.skipNulls:p.skipNulls,sort:"function"===typeof t.sort?t.sort:null,strictNullHandling:"boolean"===typeof t.strictNullHandling?t.strictNullHandling:p.strictNullHandling}}(e);"function"===typeof u.filter?i=(0,u.filter)("",i):a(u.filter)&&(n=u.filter);var l,d=[];if("object"!==typeof i||null===i)return"";l=e&&e.arrayFormat in c?e.arrayFormat:e&&"indices"in e?e.indices?"indices":"repeat":"indices";var f=c[l];if(e&&"commaRoundTrip"in e&&"boolean"!==typeof e.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var b="comma"===f&&e&&e.commaRoundTrip;n||(n=Object.keys(i)),u.sort&&n.sort(u.sort);for(var g=r(),m=0;m<n.length;++m){var _=n[m];u.skipNulls&&null===i[_]||h(d,y(i[_],_,f,b,u.strictNullHandling,u.skipNulls,u.encode?u.encoder:null,u.filter,u.sort,u.allowDots,u.serializeDate,u.format,u.formatter,u.encodeValuesOnly,u.charset,g))}var v=d.join(u.delimiter),w=!0===u.addQueryPrefix?"?":"";return u.charsetSentinel&&("iso-8859-1"===u.charset?w+="utf8=%26%2310003%3B&":w+="utf8=%E2%9C%93&"),v.length>0?w+v:""}},1847:function(t,e,n){"use strict";var r=n(1826),i=Object.prototype.hasOwnProperty,s=Array.isArray,o={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:r.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},c=function(t){return t.replace(/&#(\d+);/g,(function(t,e){return String.fromCharCode(parseInt(e,10))}))},a=function(t,e){return t&&"string"===typeof t&&e.comma&&t.indexOf(",")>-1?t.split(","):t},u=function(t,e,n,r){if(t){var s=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,o=/(\[[^[\]]*])/g,c=n.depth>0&&/(\[[^[\]]*])/.exec(s),u=c?s.slice(0,c.index):s,l=[];if(u){if(!n.plainObjects&&i.call(Object.prototype,u)&&!n.allowPrototypes)return;l.push(u)}for(var h=0;n.depth>0&&null!==(c=o.exec(s))&&h<n.depth;){if(h+=1,!n.plainObjects&&i.call(Object.prototype,c[1].slice(1,-1))&&!n.allowPrototypes)return;l.push(c[1])}return c&&l.push("["+s.slice(c.index)+"]"),function(t,e,n,r){for(var i=r?e:a(e,n),s=t.length-1;s>=0;--s){var o,c=t[s];if("[]"===c&&n.parseArrays)o=[].concat(i);else{o=n.plainObjects?Object.create(null):{};var u="["===c.charAt(0)&&"]"===c.charAt(c.length-1)?c.slice(1,-1):c,l=parseInt(u,10);n.parseArrays||""!==u?!isNaN(l)&&c!==u&&String(l)===u&&l>=0&&n.parseArrays&&l<=n.arrayLimit?(o=[])[l]=i:"__proto__"!==u&&(o[u]=i):o={0:i}}i=o}return i}(l,e,n,r)}};t.exports=function(t,e){var n=function(t){if(!t)return o;if(null!==t.decoder&&void 0!==t.decoder&&"function"!==typeof t.decoder)throw new TypeError("Decoder has to be a function.");if("undefined"!==typeof t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var e="undefined"===typeof t.charset?o.charset:t.charset;return{allowDots:"undefined"===typeof t.allowDots?o.allowDots:!!t.allowDots,allowPrototypes:"boolean"===typeof t.allowPrototypes?t.allowPrototypes:o.allowPrototypes,allowSparse:"boolean"===typeof t.allowSparse?t.allowSparse:o.allowSparse,arrayLimit:"number"===typeof t.arrayLimit?t.arrayLimit:o.arrayLimit,charset:e,charsetSentinel:"boolean"===typeof t.charsetSentinel?t.charsetSentinel:o.charsetSentinel,comma:"boolean"===typeof t.comma?t.comma:o.comma,decoder:"function"===typeof t.decoder?t.decoder:o.decoder,delimiter:"string"===typeof t.delimiter||r.isRegExp(t.delimiter)?t.delimiter:o.delimiter,depth:"number"===typeof t.depth||!1===t.depth?+t.depth:o.depth,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"===typeof t.interpretNumericEntities?t.interpretNumericEntities:o.interpretNumericEntities,parameterLimit:"number"===typeof t.parameterLimit?t.parameterLimit:o.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"===typeof t.plainObjects?t.plainObjects:o.plainObjects,strictNullHandling:"boolean"===typeof t.strictNullHandling?t.strictNullHandling:o.strictNullHandling}}(e);if(""===t||null===t||"undefined"===typeof t)return n.plainObjects?Object.create(null):{};for(var l="string"===typeof t?function(t,e){var n,u={},l=e.ignoreQueryPrefix?t.replace(/^\?/,""):t,h=e.parameterLimit===1/0?void 0:e.parameterLimit,d=l.split(e.delimiter,h),f=-1,p=e.charset;if(e.charsetSentinel)for(n=0;n<d.length;++n)0===d[n].indexOf("utf8=")&&("utf8=%E2%9C%93"===d[n]?p="utf-8":"utf8=%26%2310003%3B"===d[n]&&(p="iso-8859-1"),f=n,n=d.length);for(n=0;n<d.length;++n)if(n!==f){var b,y,g=d[n],m=g.indexOf("]="),_=-1===m?g.indexOf("="):m+1;-1===_?(b=e.decoder(g,o.decoder,p,"key"),y=e.strictNullHandling?null:""):(b=e.decoder(g.slice(0,_),o.decoder,p,"key"),y=r.maybeMap(a(g.slice(_+1),e),(function(t){return e.decoder(t,o.decoder,p,"value")}))),y&&e.interpretNumericEntities&&"iso-8859-1"===p&&(y=c(y)),g.indexOf("[]=")>-1&&(y=s(y)?[y]:y),i.call(u,b)?u[b]=r.combine(u[b],y):u[b]=y}return u}(t,n):t,h=n.plainObjects?Object.create(null):{},d=Object.keys(l),f=0;f<d.length;++f){var p=d[f],b=u(p,l[p],n,"string"===typeof t);h=r.merge(h,b,n)}return!0===n.allowSparse?h:r.compact(h)}},1848:function(t,e,n){(function(e){const r=n(1828),i=n(1855),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"]},o={encodeData(t,n,s){let o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];const c=["bytes32"],a=[this.hashType(t,s)];if(o){const u=(t,n,c)=>{if(void 0!==s[n])return["bytes32",null==c?"0x0000000000000000000000000000000000000000000000000000000000000000":r.keccak(this.encodeData(n,c,s,o))];if(void 0===c)throw new Error(`missing value for field ${t} of type ${n}`);if("bytes"===n)return["bytes32",r.keccak(c)];if("string"===n)return"string"===typeof c&&(c=e.from(c,"utf8")),["bytes32",r.keccak(c)];if(n.lastIndexOf("]")===n.length-1){const e=n.slice(0,n.lastIndexOf("[")),s=c.map((n=>u(t,e,n)));return["bytes32",r.keccak(i.rawEncode(s.map((t=>{let[e]=t;return e})),s.map((t=>{let[,e]=t;return e}))))]}return[n,c]};for(const e of s[t]){const[t,r]=u(e.name,e.type,n[e.name]);c.push(t),a.push(r)}}else for(const i of s[t]){let t=n[i.name];if(void 0!==t)if("bytes"===i.type)c.push("bytes32"),t=r.keccak(t),a.push(t);else if("string"===i.type)c.push("bytes32"),"string"===typeof t&&(t=e.from(t,"utf8")),t=r.keccak(t),a.push(t);else if(void 0!==s[i.type])c.push("bytes32"),t=r.keccak(this.encodeData(i.type,t,s,o)),a.push(t);else{if(i.type.lastIndexOf("]")===i.type.length-1)throw new Error("Arrays currently unimplemented in encodeData");c.push(i.type),a.push(t)}}return i.rawEncode(c,a)},encodeType(t,e){let n="",r=this.findTypeDependencies(t,e).filter((e=>e!==t));r=[t].concat(r.sort());for(const i of r){if(!e[i])throw new Error("No type definition specified: "+i);n+=i+"("+e[i].map((t=>{let{name:e,type:n}=t;return n+" "+e})).join(",")+")"}return n},findTypeDependencies(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];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){let i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return r.keccak(this.encodeData(t,e,n,i))},hashType(t,e){return r.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){let n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const i=this.sanitizeData(t),s=[e.from("1901","hex")];return s.push(this.hashStruct("EIP712Domain",i.domain,i.types,n)),"EIP712Domain"!==i.primaryType&&s.push(this.hashStruct(i.primaryType,i.message,i.types,n)),r.keccak(e.concat(s))}};t.exports={TYPED_MESSAGE_SCHEMA:s,TypedDataUtils:o,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?r.toBuffer(t.value):t.value})),s=t.map((function(t){return t.type})),o=t.map((function(t){if(!t.name)throw e;return t.type+" "+t.name}));return i.soliditySHA3(["bytes32","bytes32"],[i.soliditySHA3(new Array(t.length).fill("string"),o),i.soliditySHA3(s,n)])}(t.data)},hashForSignTypedData_v3:function(t){return o.hash(t.data,!1)},hashForSignTypedData_v4:function(t){return o.hash(t.data)}}}).call(this,n(60).Buffer)},1849:function(t,e,n){t.exports=n(1850)(n(1853))},1850:function(t,e,n){const r=n(1851),i=n(1852);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)}}}},1851:function(t,e,n){(function(e){const{Transform:r}=n(435);t.exports=t=>class n extends r{constructor(e,n,r,i,s){super(s),this._rate=e,this._capacity=n,this._delimitedSuffix=r,this._hashBitLength=i,this._options=s,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(i){r=i}n(r)}_flush(t){let e=null;try{this.push(this.digest())}catch(n){e=n}t(e)}update(t,n){if(!e.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 e.isBuffer(t)||(t=e.from(t,n)),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 n(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(t._state),t._finalized=this._finalized,t}}}).call(this,n(60).Buffer)},1852:function(t,e,n){(function(e){const{Transform:r}=n(435);t.exports=t=>class n extends r{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(i){r=i}n(r)}_flush(){}_read(t){this.push(this.squeeze(t))}update(t,n){if(!e.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 e.isBuffer(t)||(t=e.from(t,n)),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 n(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(t._state),t._finalized=this._finalized,t}}}).call(this,n(60).Buffer)},1853:function(t,e,n){(function(e){const r=n(1854);function i(){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}i.prototype.initialize=function(t,e){for(let n=0;n<50;++n)this.state[n]=0;this.blockSize=t/8,this.count=0,this.squeezing=!1},i.prototype.absorb=function(t){for(let e=0;e<t.length;++e)this.state[~~(this.count/4)]^=t[e]<<this.count%4*8,this.count+=1,this.count===this.blockSize&&(r.p1600(this.state),this.count=0)},i.prototype.absorbLastFewBits=function(t){this.state[~~(this.count/4)]^=t<<this.count%4*8,0!==(128&t)&&this.count===this.blockSize-1&&r.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<(this.blockSize-1)%4*8,r.p1600(this.state),this.count=0,this.squeezing=!0},i.prototype.squeeze=function(t){this.squeezing||this.absorbLastFewBits(1);const n=e.alloc(t);for(let e=0;e<t;++e)n[e]=this.state[~~(this.count/4)]>>>this.count%4*8&255,this.count+=1,this.count===this.blockSize&&(r.p1600(this.state),this.count=0);return n},i.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=i}).call(this,n(60).Buffer)},1854:function(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],s=t[2]^t[12]^t[22]^t[32]^t[42],o=t[3]^t[13]^t[23]^t[33]^t[43],c=t[4]^t[14]^t[24]^t[34]^t[44],a=t[5]^t[15]^t[25]^t[35]^t[45],u=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],d=t[9]^t[19]^t[29]^t[39]^t[49];let f=h^(s<<1|o>>>31),p=d^(o<<1|s>>>31);const b=t[0]^f,y=t[1]^p,g=t[10]^f,m=t[11]^p,_=t[20]^f,v=t[21]^p,w=t[30]^f,E=t[31]^p,x=t[40]^f,S=t[41]^p;f=r^(c<<1|a>>>31),p=i^(a<<1|c>>>31);const k=t[2]^f,C=t[3]^p,I=t[12]^f,A=t[13]^p,O=t[22]^f,M=t[23]^p,R=t[32]^f,j=t[33]^p,N=t[42]^f,T=t[43]^p;f=s^(u<<1|l>>>31),p=o^(l<<1|u>>>31);const P=t[4]^f,L=t[5]^p,D=t[14]^f,B=t[15]^p,H=t[24]^f,F=t[25]^p,U=t[34]^f,W=t[35]^p,z=t[44]^f,q=t[45]^p;f=c^(h<<1|d>>>31),p=a^(d<<1|h>>>31);const V=t[6]^f,J=t[7]^p,G=t[16]^f,Y=t[17]^p,$=t[26]^f,K=t[27]^p,Q=t[36]^f,X=t[37]^p,Z=t[46]^f,tt=t[47]^p;f=u^(r<<1|i>>>31),p=l^(i<<1|r>>>31);const et=t[8]^f,nt=t[9]^p,rt=t[18]^f,it=t[19]^p,st=t[28]^f,ot=t[29]^p,ct=t[38]^f,at=t[39]^p,ut=t[48]^f,lt=t[49]^p,ht=b,dt=y,ft=m<<4|g>>>28,pt=g<<4|m>>>28,bt=_<<3|v>>>29,yt=v<<3|_>>>29,gt=E<<9|w>>>23,mt=w<<9|E>>>23,_t=x<<18|S>>>14,vt=S<<18|x>>>14,wt=k<<1|C>>>31,Et=C<<1|k>>>31,xt=A<<12|I>>>20,St=I<<12|A>>>20,kt=O<<10|M>>>22,Ct=M<<10|O>>>22,It=j<<13|R>>>19,At=R<<13|j>>>19,Ot=N<<2|T>>>30,Mt=T<<2|N>>>30,Rt=L<<30|P>>>2,jt=P<<30|L>>>2,Nt=D<<6|B>>>26,Tt=B<<6|D>>>26,Pt=F<<11|H>>>21,Lt=H<<11|F>>>21,Dt=U<<15|W>>>17,Bt=W<<15|U>>>17,Ht=q<<29|z>>>3,Ft=z<<29|q>>>3,Ut=V<<28|J>>>4,Wt=J<<28|V>>>4,zt=Y<<23|G>>>9,qt=G<<23|Y>>>9,Vt=$<<25|K>>>7,Jt=K<<25|$>>>7,Gt=Q<<21|X>>>11,Yt=X<<21|Q>>>11,$t=tt<<24|Z>>>8,Kt=Z<<24|tt>>>8,Qt=et<<27|nt>>>5,Xt=nt<<27|et>>>5,Zt=rt<<20|it>>>12,te=it<<20|rt>>>12,ee=ot<<7|st>>>25,ne=st<<7|ot>>>25,re=ct<<8|at>>>24,ie=at<<8|ct>>>24,se=ut<<14|lt>>>18,oe=lt<<14|ut>>>18;t[0]=ht^~xt&Pt,t[1]=dt^~St&Lt,t[10]=Ut^~Zt&bt,t[11]=Wt^~te&yt,t[20]=wt^~Nt&Vt,t[21]=Et^~Tt&Jt,t[30]=Qt^~ft&kt,t[31]=Xt^~pt&Ct,t[40]=Rt^~zt&ee,t[41]=jt^~qt&ne,t[2]=xt^~Pt&Gt,t[3]=St^~Lt&Yt,t[12]=Zt^~bt&It,t[13]=te^~yt&At,t[22]=Nt^~Vt&re,t[23]=Tt^~Jt&ie,t[32]=ft^~kt&Dt,t[33]=pt^~Ct&Bt,t[42]=zt^~ee>,t[43]=qt^~ne&mt,t[4]=Pt^~Gt&se,t[5]=Lt^~Yt&oe,t[14]=bt^~It&Ht,t[15]=yt^~At&Ft,t[24]=Vt^~re&_t,t[25]=Jt^~ie&vt,t[34]=kt^~Dt&$t,t[35]=Ct^~Bt&Kt,t[44]=ee^~gt&Ot,t[45]=ne^~mt&Mt,t[6]=Gt^~se&ht,t[7]=Yt^~oe&dt,t[16]=It^~Ht&Ut,t[17]=At^~Ft&Wt,t[26]=re^~_t&wt,t[27]=ie^~vt&Et,t[36]=Dt^~$t&Qt,t[37]=Bt^~Kt&Xt,t[46]=gt^~Ot&Rt,t[47]=mt^~Mt&jt,t[8]=se^~ht&xt,t[9]=oe^~dt&St,t[18]=Ht^~Ut&Zt,t[19]=Ft^~Wt&te,t[28]=_t^~wt&Nt,t[29]=vt^~Et&Tt,t[38]=$t^~Qt&ft,t[39]=Kt^~Xt&pt,t[48]=Ot^~Rt&zt,t[49]=Mt^~jt&qt,t[0]^=n[2*e],t[1]^=n[2*e+1]}}},1855:function(t,e,n){(function(e){const r=n(1828),i=n(21);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 o(t){return parseInt(/^\D+(\d+)$/.exec(t)[1],10)}function c(t){var e=/^\D+(\d+)x(\d+)$/.exec(t);return[parseInt(e[1],10),parseInt(e[2],10)]}function a(t){var e=t.match(/(.*)\[(.*?)\]$/);return e?""===e[2]?"dynamic":parseInt(e[2],10):null}function u(t){var e=typeof t;if("string"===e)return r.isHexString(t)?new i(r.stripHexPrefix(t),16):new i(t,10);if("number"===e)return new i(t);if(t.toArray)return t;throw new Error("Argument is not a number")}function l(t,n){var s,h,d,f;if("address"===t)return l("uint160",u(n));if("bool"===t)return l("uint8",n?1:0);if("string"===t)return l("bytes",new e(n,"utf8"));if(function(t){return t.lastIndexOf("]")===t.length-1}(t)){if("undefined"===typeof n.length)throw new Error("Not an array?");if("dynamic"!==(s=a(t))&&0!==s&&n.length>s)throw new Error("Elements exceed array size: "+s);for(f in d=[],t=t.slice(0,t.lastIndexOf("[")),"string"===typeof n&&(n=JSON.parse(n)),n)d.push(l(t,n[f]));if("dynamic"===s){var p=l("uint256",n.length);d.unshift(p)}return e.concat(d)}if("bytes"===t)return n=new e(n),d=e.concat([l("uint256",n.length),n]),n.length%32!==0&&(d=e.concat([d,r.zeros(32-n.length%32)])),d;if(t.startsWith("bytes")){if((s=o(t))<1||s>32)throw new Error("Invalid bytes<N> width: "+s);return r.setLengthRight(n,32)}if(t.startsWith("uint")){if((s=o(t))%8||s<8||s>256)throw new Error("Invalid uint<N> width: "+s);if((h=u(n)).bitLength()>s)throw new Error("Supplied uint exceeds width: "+s+" vs "+h.bitLength());if(h<0)throw new Error("Supplied uint is negative");return h.toArrayLike(e,"be",32)}if(t.startsWith("int")){if((s=o(t))%8||s<8||s>256)throw new Error("Invalid int<N> width: "+s);if((h=u(n)).bitLength()>s)throw new Error("Supplied int exceeds width: "+s+" vs "+h.bitLength());return h.toTwos(256).toArrayLike(e,"be",32)}if(t.startsWith("ufixed")){if(s=c(t),(h=u(n))<0)throw new Error("Supplied ufixed is negative");return l("uint256",h.mul(new i(2).pow(new i(s[1]))))}if(t.startsWith("fixed"))return s=c(t),l("int256",u(n).mul(new i(2).pow(new i(s[1]))));throw new Error("Unsupported or invalid type: "+t)}function h(t){return"string"===t||"bytes"===t||"dynamic"===a(t)}function d(t,n){if(t.length!==n.length)throw new Error("Number of types are not matching the values");for(var i,c,a=[],l=0;l<t.length;l++){var h=s(t[l]),d=n[l];if("bytes"===h)a.push(d);else if("string"===h)a.push(new e(d,"utf8"));else if("bool"===h)a.push(new e(d?"01":"00","hex"));else if("address"===h)a.push(r.setLength(d,20));else if(h.startsWith("bytes")){if((i=o(h))<1||i>32)throw new Error("Invalid bytes<N> width: "+i);a.push(r.setLengthRight(d,i))}else if(h.startsWith("uint")){if((i=o(h))%8||i<8||i>256)throw new Error("Invalid uint<N> width: "+i);if((c=u(d)).bitLength()>i)throw new Error("Supplied uint exceeds width: "+i+" vs "+c.bitLength());a.push(c.toArrayLike(e,"be",i/8))}else{if(!h.startsWith("int"))throw new Error("Unsupported or invalid type: "+h);if((i=o(h))%8||i<8||i>256)throw new Error("Invalid int<N> width: "+i);if((c=u(d)).bitLength()>i)throw new Error("Supplied int exceeds width: "+i+" vs "+c.bitLength());a.push(c.toTwos(i).toArrayLike(e,"be",i/8))}}return e.concat(a)}t.exports={rawEncode:function(t,n){var r=[],i=[],o=32*t.length;for(var c in t){var a=s(t[c]),u=l(a,n[c]);h(a)?(r.push(l("uint256",o)),i.push(u),o+=u.length):r.push(u)}return e.concat(r.concat(i))},solidityPack:d,soliditySHA3:function(t,e){return r.keccak(d(t,e))}}}).call(this,n(60).Buffer)},1856:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.filterFromParam=e.FilterPolyfill=void 0;const r=n(1807),i=n(1745),s={jsonrpc:"2.0",id:0};function o(t){return{fromBlock:a(t.fromBlock),toBlock:a(t.toBlock),addresses:void 0===t.address?null:Array.isArray(t.address)?t.address:[t.address],topics:t.topics||[]}}function c(t){const e={fromBlock:u(t.fromBlock),toBlock:u(t.toBlock),topics:t.topics};return null!==t.addresses&&(e.address=t.addresses),e}function a(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 u(t){return"latest"===t?t:(0,i.hexStringFromIntNumber)(t)}function l(){return Object.assign(Object.assign({},s),{error:{code:-32e3,message:"filter not found"}})}function h(){return Object.assign(Object.assign({},s),{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=o(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({},s),{method:"eth_getLogs",params:[c(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 o=await this.getCurrentBlockHeight(),a="latest"===e.toBlock?o:e.toBlock;if(n>o)return h();if(n>e.toBlock)return h();console.log(`Fetching logs from ${n} to ${a} for filter ${t}`);const u=await this.sendAsyncPromise(Object.assign(Object.assign({},s),{method:"eth_getLogs",params:[c(Object.assign(Object.assign({},e),{fromBlock:n,toBlock:a}))]}));if(Array.isArray(u.result)){const e=u.result.map((t=>(0,i.intNumberFromHexString)(t.blockNumber||"0x0"))),s=Math.max(...e);if(s&&s>n){const e=(0,r.IntNumber)(s+1);console.log(`Moving cursor position for filter (${t}) from ${n} to ${e}`),this.cursors.set(t,e)}}return u}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 o=(await Promise.all((0,i.range)(e,n+1).map((t=>this.getBlockHashByNumber((0,r.IntNumber)(t)))))).filter((t=>!!t)),c=(0,r.IntNumber)(e+o.length);return console.log(`Moving cursor position for filter (${t}) from ${e} to ${c}`),this.cursors.set(t,c),Object.assign(Object.assign({},s),{result:o})}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({},s),{method:"eth_blockNumber",params:[]}));return(0,i.intNumberFromHexString)((0,i.ensureHexString)(t))}async getBlockHashByNumber(t){const e=await this.sendAsyncPromise(Object.assign(Object.assign({},s),{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=o},1857:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.JSONRPCMethod=void 0,function(t){t.eth_accounts="eth_accounts",t.eth_coinbase="eth_coinbase",t.net_version="net_version",t.eth_chainId="eth_chainId",t.eth_uninstallFilter="eth_uninstallFilter",t.eth_requestAccounts="eth_requestAccounts",t.eth_sign="eth_sign",t.eth_ecRecover="eth_ecRecover",t.personal_sign="personal_sign",t.personal_ecRecover="personal_ecRecover",t.eth_signTransaction="eth_signTransaction",t.eth_sendRawTransaction="eth_sendRawTransaction",t.eth_sendTransaction="eth_sendTransaction",t.eth_signTypedData_v1="eth_signTypedData_v1",t.eth_signTypedData_v2="eth_signTypedData_v2",t.eth_signTypedData_v3="eth_signTypedData_v3",t.eth_signTypedData_v4="eth_signTypedData_v4",t.eth_signTypedData="eth_signTypedData",t.cbWallet_arbitrary="walletlink_arbitrary",t.wallet_addEthereumChain="wallet_addEthereumChain",t.wallet_switchEthereumChain="wallet_switchEthereumChain",t.wallet_watchAsset="wallet_watchAsset",t.eth_subscribe="eth_subscribe",t.eth_unsubscribe="eth_unsubscribe",t.eth_newFilter="eth_newFilter",t.eth_newBlockFilter="eth_newBlockFilter",t.eth_newPendingTransactionFilter="eth_newPendingTransactionFilter",t.eth_getFilterChanges="eth_getFilterChanges",t.eth_getFilterLogs="eth_getFilterLogs"}(e.JSONRPCMethod||(e.JSONRPCMethod={}))},1858:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SubscriptionManager=void 0;const r=n(1859),i=n(1867),s=()=>{};e.SubscriptionManager=class{constructor(t){const e=new r({provider:t,pollingInterval:15e3,setSkipCacheFlag:!0}),{events:n,middleware:s}=i({blockTracker:e,provider:t});this.events=n,this.subscriptionMiddleware=s}async handleRequest(t){const e={};return await this.subscriptionMiddleware(t,e,s,s),e}destroy(){this.subscriptionMiddleware.destroy()}}},1859:function(t,e,n){const r=n(1829),i=n(1860);function s(t,e){return new Promise((n=>{const r=setTimeout(n,t);r.unref&&e&&r.unref()}))}t.exports=class extends i{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};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 s(this._pollingInterval,!this._keepEventLoopActive)}catch(t){const n=new Error(`PollingBlockTracker - encountered an error while attempting to update latest block:\n${t.stack}`);try{this.emit("error",n)}catch(e){console.error(n)}await s(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}}},1860:function(t,e,n){n(1830),n(1829);const r=n(1863),i=(t,e)=>t+e,s=["sync","latest"];function o(t){return Number.parseInt(t,16)}t.exports=class extends r{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};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(){if(this._currentBlock)return this._currentBlock;return 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){s.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 s.map((t=>this.listenerCount(t))).reduce(i)}_newPotentialLatest(t){const e=this._currentBlock;e&&o(t)<=o(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}}},1861:function(t,e){t.exports=function(){for(var t={},e=0;e<arguments.length;e++){var r=arguments[e];for(var i in r)n.call(r,i)&&(t[i]=r[i])}return t};var n=Object.prototype.hasOwnProperty},1862:function(t,e){t.exports=function(t){var e=(t=t||{}).max||Number.MAX_SAFE_INTEGER,n="undefined"!==typeof t.start?t.start:Math.floor(Math.random()*e);return function(){return n%=e,n++}}},1863:function(t,e,n){const r=n(1864),i=n(42);var s="object"===typeof Reflect?Reflect:null,o=s&&"function"===typeof s.apply?s.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};function c(){i.call(this)}function a(t,e,n){try{o(t,e,n)}catch(r){setTimeout((()=>{throw r}))}}function u(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t[r];return n}t.exports=c,r.inherits(c,i),c.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e.push(arguments[n]);var r="error"===t,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var s;if(e.length>0&&(s=e[0]),s instanceof Error)throw s;var o=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw o.context=s,o}var c=i[t];if(void 0===c)return!1;if("function"===typeof c)a(c,this,e);else{var l=c.length,h=u(c,l);for(n=0;n<l;++n)a(h[n],this,e)}return!0}},1864:function(t,e,n){(function(t){var r=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),n={},r=0;r<e.length;r++)n[e[r]]=Object.getOwnPropertyDescriptor(t,e[r]);return n},i=/%[sdj%]/g;e.format=function(t){if(!g(t)){for(var e=[],n=0;n<arguments.length;n++)e.push(c(arguments[n]));return e.join(" ")}n=1;for(var r=arguments,s=r.length,o=String(t).replace(i,(function(t){if("%%"===t)return"%";if(n>=s)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(e){return"[Circular]"}default:return t}})),a=r[n];n<s;a=r[++n])b(a)||!v(a)?o+=" "+a:o+=" "+c(a);return o},e.deprecate=function(n,r){if("undefined"!==typeof t&&!0===t.noDeprecation)return n;if("undefined"===typeof t)return function(){return e.deprecate(n,r).apply(this,arguments)};var i=!1;return function(){if(!i){if(t.throwDeprecation)throw new Error(r);t.traceDeprecation?console.trace(r):console.error(r),i=!0}return n.apply(this,arguments)}};var s,o={};function c(t,n){var r={seen:[],stylize:u};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),p(n)?r.showHidden=n:n&&e._extend(r,n),m(r.showHidden)&&(r.showHidden=!1),m(r.depth)&&(r.depth=2),m(r.colors)&&(r.colors=!1),m(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=a),l(r,t,r.depth)}function a(t,e){var n=c.styles[e];return n?"\x1b["+c.colors[n][0]+"m"+t+"\x1b["+c.colors[n][1]+"m":t}function u(t,e){return t}function l(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 g(i)||(i=l(t,i,r)),i}var s=function(t,e){if(m(e))return t.stylize("undefined","undefined");if(g(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}if(y(e))return t.stylize(""+e,"number");if(p(e))return t.stylize(""+e,"boolean");if(b(e))return t.stylize("null","null")}(t,n);if(s)return s;var o=Object.keys(n),c=function(t){var e={};return t.forEach((function(t,n){e[t]=!0})),e}(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(n)),E(n)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return h(n);if(0===o.length){if(x(n)){var a=n.name?": "+n.name:"";return t.stylize("[Function"+a+"]","special")}if(_(n))return t.stylize(RegExp.prototype.toString.call(n),"regexp");if(w(n))return t.stylize(Date.prototype.toString.call(n),"date");if(E(n))return h(n)}var u,v="",S=!1,k=["{","}"];(f(n)&&(S=!0,k=["[","]"]),x(n))&&(v=" [Function"+(n.name?": "+n.name:"")+"]");return _(n)&&(v=" "+RegExp.prototype.toString.call(n)),w(n)&&(v=" "+Date.prototype.toUTCString.call(n)),E(n)&&(v=" "+h(n)),0!==o.length||S&&0!=n.length?r<0?_(n)?t.stylize(RegExp.prototype.toString.call(n),"regexp"):t.stylize("[Object]","special"):(t.seen.push(n),u=S?function(t,e,n,r,i){for(var s=[],o=0,c=e.length;o<c;++o)A(e,String(o))?s.push(d(t,e,n,r,String(o),!0)):s.push("");return i.forEach((function(i){i.match(/^\d+$/)||s.push(d(t,e,n,r,i,!0))})),s}(t,n,r,c,o):o.map((function(e){return d(t,n,r,c,e,S)})),t.seen.pop(),function(t,e,n){var r=t.reduce((function(t,e){return e.indexOf("\n")>=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0);if(r>60)return n[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+n[1];return n[0]+e+" "+t.join(", ")+" "+n[1]}(u,v,k)):k[0]+v+k[1]}function h(t){return"["+Error.prototype.toString.call(t)+"]"}function d(t,e,n,r,i,s){var o,c,a;if((a=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?c=a.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):a.set&&(c=t.stylize("[Setter]","special")),A(r,i)||(o="["+i+"]"),c||(t.seen.indexOf(a.value)<0?(c=b(n)?l(t,a.value,null):l(t,a.value,n-1)).indexOf("\n")>-1&&(c=s?c.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+c.split("\n").map((function(t){return" "+t})).join("\n")):c=t.stylize("[Circular]","special")),m(o)){if(s&&i.match(/^\d+$/))return c;(o=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=t.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=t.stylize(o,"string"))}return o+": "+c}function f(t){return Array.isArray(t)}function p(t){return"boolean"===typeof t}function b(t){return null===t}function y(t){return"number"===typeof t}function g(t){return"string"===typeof t}function m(t){return void 0===t}function _(t){return v(t)&&"[object RegExp]"===S(t)}function v(t){return"object"===typeof t&&null!==t}function w(t){return v(t)&&"[object Date]"===S(t)}function E(t){return v(t)&&("[object Error]"===S(t)||t instanceof Error)}function x(t){return"function"===typeof t}function S(t){return Object.prototype.toString.call(t)}function k(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(n){if(m(s)&&(s=Object({NODE_ENV:"production",PUBLIC_URL:"https://cdn.decentraland.org/@dcl/explorer-website/0.1.0-7411312393.commit-c1f7c79",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_WEBSITE_VERSION:"0.1.0-7411312393.commit-c1f7c79",REACT_APP_EXPLORER_VERSION:"1.0.131583-20230718133624.commit-7106e1f",REACT_APP_EXPLORER_BASE_URL:""}).NODE_DEBUG||""),n=n.toUpperCase(),!o[n])if(new RegExp("\\b"+n+"\\b","i").test(s)){var r=t.pid;o[n]=function(){var t=e.format.apply(e,arguments);console.error("%s %d: %s",n,r,t)}}else o[n]=function(){};return o[n]},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.isArray=f,e.isBoolean=p,e.isNull=b,e.isNullOrUndefined=function(t){return null==t},e.isNumber=y,e.isString=g,e.isSymbol=function(t){return"symbol"===typeof t},e.isUndefined=m,e.isRegExp=_,e.isObject=v,e.isDate=w,e.isError=E,e.isFunction=x,e.isPrimitive=function(t){return null===t||"boolean"===typeof t||"number"===typeof t||"string"===typeof t||"symbol"===typeof t||"undefined"===typeof t},e.isBuffer=n(1865);var C=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function I(){var t=new Date,e=[k(t.getHours()),k(t.getMinutes()),k(t.getSeconds())].join(":");return[t.getDate(),C[t.getMonth()],e].join(" ")}function A(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(1866),e._extend=function(t,e){if(!e||!v(e))return t;for(var n=Object.keys(e),r=n.length;r--;)t[n[r]]=e[n[r]];return t};var O="undefined"!==typeof Symbol?Symbol("util.promisify.custom"):void 0;function M(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(O&&t[O]){var e;if("function"!==typeof(e=t[O]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,O,{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=[],s=0;s<arguments.length;s++)i.push(arguments[s]);i.push((function(t,r){t?n(t):e(r)}));try{t.apply(this,i)}catch(o){n(o)}return r}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),O&&Object.defineProperty(e,O,{value:e,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(e,r(t))},e.promisify.custom=O,e.callbackify=function(e){if("function"!==typeof e)throw new TypeError('The "original" argument must be of type Function');function n(){for(var n=[],r=0;r<arguments.length;r++)n.push(arguments[r]);var i=n.pop();if("function"!==typeof i)throw new TypeError("The last argument must be of type Function");var s=this,o=function(){return i.apply(s,arguments)};e.apply(this,n).then((function(e){t.nextTick(o,null,e)}),(function(e){t.nextTick(M,e,o)}))}return Object.setPrototypeOf(n,Object.getPrototypeOf(e)),Object.defineProperties(n,r(e)),n}}).call(this,n(53))},1865:function(t,e){t.exports=function(t){return t&&"object"===typeof t&&"function"===typeof t.copy&&"function"===typeof t.fill&&"function"===typeof t.readUInt8}},1866:function(t,e){"function"===typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},1867:function(t,e,n){const r=n(1769).default,i=n(1831),{createAsyncMiddleware:s}=n(1832),o=n(1875),{unsafeRandomBytes:c,incrementHexInt:a}=n(1767),u=n(1811);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(t){let{blockTracker:e,provider:n}=t;const h={},d=o({blockTracker:e,provider:n});let f=!1;const p=new r,b=i({eth_subscribe:s((async function(t,r){if(f)throw new Error("SubscriptionManager - attempting to use after destroying");const i=t.params[0],s=c(16);let o;switch(i){case"newHeads":o=p({subId:s});break;case"logs":const e=t.params[1];o=b({subId:s,filter:await d.newLogFilter(e)});break;default:throw new Error(`SubscriptionManager - unsupported subscription type "${i}"`)}return h[s]=o,void(r.result=s);function p(t){let{subId:r}=t;const s={type:i,destroy:async()=>{e.removeListener("sync",s.update)},update:async t=>{let{oldBlock:e,newBlock:i}=t;const s=i,o=a(e);(await u({provider:n,fromBlock:o,toBlock:s})).map(l).forEach((t=>{y(r,t)}))}};return e.on("sync",s.update),s}function b(t){let{subId:e,filter:n}=t;n.on("update",(t=>y(e,t)));return{type:i,destroy:async()=>await d.uninstallFilter(n.idHex)}}})),eth_unsubscribe:s((async function(t,e){if(f)throw new Error("SubscriptionManager - attempting to use after destroying");const n=t.params[0],r=h[n];if(!r)return void(e.result=!1);delete h[n],await r.destroy(),e.result=!0}))});return b.destroy=function(){p.removeAllListeners();for(const t in h)h[t].destroy(),delete h[t];f=!0},{events:p,middleware:b};function y(t,e){p.emit("notification",{jsonrpc:"2.0",method:"eth_subscription",params:{subscription:t,result:e}})}}},1868:function(t,e){t.exports=function(t){return(e,n,r,i)=>{const s=t[e.method];return void 0===s?r():"function"===typeof s?s(e,n,r,i):(n.result=s,i())}}},1869:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createIdRemapMiddleware=void 0;const r=n(1833);e.createIdRemapMiddleware=function(){return(t,e,n,i)=>{const s=t.id,o=r.getUniqueId();t.id=o,e.id=o,n((n=>{t.id=s,e.id=s,n()}))}}},1870:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createAsyncMiddleware=void 0,e.createAsyncMiddleware=function(t){return async(e,n,r,i)=>{let s;const o=new Promise((t=>{s=t}));let c=null,a=!1;const u=async()=>{a=!0,r((t=>{c=t,s()})),await o};try{await t(e,n,u),a?(await o,c(null)):i(null)}catch(l){c?c(l):i(l)}}}},1871:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createScaffoldMiddleware=void 0,e.createScaffoldMiddleware=function(t){return(e,n,r,i)=>{const s=t[e.method];return void 0===s?r():"function"===typeof s?s(e,n,r,i):(n.result=s,i())}}},1872:function(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(1808);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(1835);Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return i.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return i.getMessageFromCode}});const s=n(1873);Object.defineProperty(e,"ethErrors",{enumerable:!0,get:function(){return s.ethErrors}});const o=n(1809);Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return o.errorCodes}})},1873:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ethErrors=void 0;const r=n(1808),i=n(1835),s=n(1809);function o(t,e){const[n,s]=a(e);return new r.EthereumRpcError(t,n||i.getMessageFromCode(t),s)}function c(t,e){const[n,s]=a(e);return new r.EthereumProviderError(t,n||i.getMessageFromCode(t),s)}function a(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=>o(s.errorCodes.rpc.parse,t),invalidRequest:t=>o(s.errorCodes.rpc.invalidRequest,t),invalidParams:t=>o(s.errorCodes.rpc.invalidParams,t),methodNotFound:t=>o(s.errorCodes.rpc.methodNotFound,t),internal:t=>o(s.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 o(e,t)},invalidInput:t=>o(s.errorCodes.rpc.invalidInput,t),resourceNotFound:t=>o(s.errorCodes.rpc.resourceNotFound,t),resourceUnavailable:t=>o(s.errorCodes.rpc.resourceUnavailable,t),transactionRejected:t=>o(s.errorCodes.rpc.transactionRejected,t),methodNotSupported:t=>o(s.errorCodes.rpc.methodNotSupported,t),limitExceeded:t=>o(s.errorCodes.rpc.limitExceeded,t)},provider:{userRejectedRequest:t=>c(s.errorCodes.provider.userRejectedRequest,t),unauthorized:t=>c(s.errorCodes.provider.unauthorized,t),unsupportedMethod:t=>c(s.errorCodes.provider.unsupportedMethod,t),disconnected:t=>c(s.errorCodes.provider.disconnected,t),chainDisconnected:t=>c(s.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)}}}},1874:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.mergeMiddleware=void 0;const r=n(1834);e.mergeMiddleware=function(t){const e=new r.JsonRpcEngine;return t.forEach((t=>e.push(t))),e.asMiddleware()}},1875:function(t,e,n){const r=n(1937).Mutex,{createAsyncMiddleware:i}=n(1832),s=n(1831),o=n(1876),c=n(1879),a=n(1880),{intToHex:u,hexToInt:l}=n(1767);function h(t){return d((async function(){const e=await t(...arguments),n=u(e.id);return n}))}function d(t){return i((async(e,n)=>{const r=await t.apply(null,e.params);n.result=r}))}function f(t,e){const n=[];for(let r in t)n.push(t[r]);return n}t.exports=function(t){let{blockTracker:e,provider:n}=t,i=0,p={};const b=new r,y=function(t){let{mutex:e}=t;return t=>async(n,r,i,s)=>{(await e.acquire())(),t(n,r,i,s)}}({mutex:b}),g=s({eth_newFilter:y(h(_)),eth_newBlockFilter:y(h(v)),eth_newPendingTransactionFilter:y(h(w)),eth_uninstallFilter:y(d(S)),eth_getFilterChanges:y(d(E)),eth_getFilterLogs:y(d(x))}),m=async t=>{let{oldBlock:e,newBlock:n}=t;if(0===p.length)return;const r=await b.acquire();try{await Promise.all(f(p).map((async t=>{try{await t.update({oldBlock:e,newBlock:n})}catch(r){console.error(r)}})))}catch(i){console.error(i)}r()};return g.newLogFilter=_,g.newBlockFilter=v,g.newPendingTransactionFilter=w,g.uninstallFilter=S,g.getFilterChanges=E,g.getFilterLogs=x,g.destroy=()=>{!async function(){const t=f(p).length;p={},C({prevFilterCount:t,newFilterCount:0})}()},g;async function _(t){const e=new o({provider:n,params:t});await k(e);return e}async function v(){const t=new c({provider:n});await k(t);return t}async function w(){const t=new a({provider:n});await k(t);return t}async function E(t){const e=l(t),n=p[e];if(!n)throw new Error(`No filter for index "${e}"`);return n.getChangesAndClear()}async function x(t){const e=l(t),n=p[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=p[e],r=Boolean(n);return r&&await async function(t){const e=f(p).length;delete p[t];const n=f(p).length;C({prevFilterCount:e,newFilterCount:n})}(e),r}async function k(t){const n=f(p).length,r=await e.getLatestBlock();await t.initialize({currentBlock:r}),i++,p[i]=t,t.id=i,t.idHex=u(i);return C({prevFilterCount:n,newFilterCount:f(p).length}),i}function C(t){let{prevFilterCount:n,newFilterCount:r}=t;0===n&&r>0?e.on("sync",m):n>0&&0===r&&e.removeListener("sync",m)}}},1876:function(t,e,n){const r=n(1830),i=n(1877),s=n(1878),{bnToHex:o,hexToInt:c,incrementHexInt:a,minBlockRef:u,blockRefIsNumber:l}=n(1767);t.exports=class extends s{constructor(t){let{provider:e,params:n}=t;super(),this.type="log",this.ethQuery=new r(e),this.params=Object.assign({fromBlock:"latest",toBlock:"latest",address:void 0,topics:[]},n),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(t){let{currentBlock:e}=t,n=this.params.fromBlock;["latest","pending"].includes(n)&&(n=e),"earliest"===n&&(n="0x0"),this.params.fromBlock=n;const r=u(this.params.toBlock,e),i=Object.assign({},this.params,{toBlock:r}),s=await this._fetchLogs(i);this.addInitialResults(s)}async update(t){let{oldBlock:e,newBlock:n}=t;const r=n;let i;i=e?a(e):n;const s=Object.assign({},this.params,{fromBlock:i,toBlock:r}),o=(await this._fetchLogs(s)).filter((t=>this.matchLog(t)));this.addResults(o)}async _fetchLogs(t){return await i((e=>this.ethQuery.getLogs(t,e)))()}matchLog(t){if(c(this.params.fromBlock)>=c(t.blockNumber))return!1;if(l(this.params.toBlock)&&c(this.params.toBlock)<=c(t.blockNumber))return!1;const e=t.address&&t.address.toLowerCase();if(this.params.address&&e&&!this.params.address.includes(e))return!1;return 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];if(i.includes(null))return!0;i=i.map((t=>t.toLowerCase()));return i.includes(r)}))}}},1877:function(t,e,n){"use strict";const r=(t,e,n,r)=>function(){for(var i=arguments.length,s=new Array(i),o=0;o<i;o++)s[o]=arguments[o];const c=e.promiseModule;return new c(((i,o)=>{e.multiArgs?s.push((function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];e.errorFirst?n[0]?o(n):(n.shift(),i(n)):i(n)})):e.errorFirst?s.push(((t,e)=>{t?o(t):i(e)})):s.push(i);const c=this===n?r:this;Reflect.apply(t,c,s)}))},i=new WeakMap;t.exports=(t,e)=>{e={exclude:[/.+(?:Sync|Stream)$/],errorFirst:!0,promiseModule:Promise,...e};const n=typeof t;if(null===t||"object"!==n&&"function"!==n)throw new TypeError(`Expected \`input\` to be a \`Function\` or \`Object\`, got \`${null===t?"null":n}\``);const s=new WeakMap,o=new Proxy(t,{apply(t,n,i){const c=s.get(t);if(c)return Reflect.apply(c,n,i);const a=e.excludeMain?t:r(t,e,o,t);return s.set(t,a),Reflect.apply(a,n,i)},get(t,n){const c=t[n];if(!((t,n)=>{let r=i.get(t);if(r||(r={},i.set(t,r)),n in r)return r[n];const s=t=>"string"===typeof t||"symbol"===typeof n?n===t:t.test(n),o=Reflect.getOwnPropertyDescriptor(t,n),c=void 0===o||o.writable||o.configurable,a=(e.include?e.include.some(s):!e.exclude.some(s))&&c;return r[n]=a,a})(t,n)||c===Function.prototype[n])return c;const a=s.get(c);if(a)return a;if("function"===typeof c){const n=r(c,e,o,t);return s.set(c,n),n}return c}});return o}},1878:function(t,e,n){const r=n(1810);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}}},1879:function(t,e,n){const r=n(1810),i=n(1811),{incrementHexInt:s}=n(1767);t.exports=class extends r{constructor(t){let{provider:e,params:n}=t;super(),this.type="block",this.provider=e}async update(t){let{oldBlock:e,newBlock:n}=t;const r=n,o=s(e),c=(await i({provider:this.provider,fromBlock:o,toBlock:r})).map((t=>t.hash));this.addResults(c)}}},1880:function(t,e,n){const r=n(1810),i=n(1811),{incrementHexInt:s}=n(1767);t.exports=class extends r{constructor(t){let{provider:e}=t;super(),this.type="tx",this.provider=e}async update(t){let{oldBlock:e}=t;const n=e,r=s(e),o=await i({provider:this.provider,fromBlock:r,toBlock:n}),c=[];for(const i of o)c.push(...i.transactions);this.addResults(c)}}},1881:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WalletSDKUI=void 0;const r=n(1882),i=n(1894),s=n(1896);e.WalletSDKUI=class{constructor(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,linkAPIUrl:t.linkAPIUrl,connected$:t.connected$,isParentConnection:!1})}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");const t=document.documentElement,e=document.createElement("div");e.className="-cbwsdk-css-reset",t.appendChild(e),this.linkFlow.attach(e),this.snackbar.attach(e),this.attached=!0,(0,s.injectCssReset)()}setConnectDisabled(t){this.linkFlow.setConnectDisabled(t)}addEthereumChain(t){}watchAsset(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}inlineWatchAsset(){return!1}inlineSwitchEthereumChain(){return!1}isStandalone(){return!1}}},1882:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinkFlow=void 0;const r=n(1756),i=n(1757),s=n(1883);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.linkAPIUrl=t.linkAPIUrl,this.isParentConnection=t.isParentConnection,this.connected$=t.connected$}attach(t){this.root=document.createElement("div"),this.root.className="-cbwsdk-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$.subscribe((()=>{this.root&&(0,r.render)((0,r.h)(s.TryExtensionLinkDialog,{darkMode:this.darkMode,version:this.version,sessionId:this.sessionId,sessionSecret:this.sessionSecret,linkAPIUrl:this.linkAPIUrl,isOpen:this.isOpen,isConnected:this.isConnected,isParentConnection:this.isParentConnection,onCancel:this.onCancel,connectDisabled:this.connectDisabled}),this.root)}));this.subscriptions.add(t)}}},1883: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(45)),s=n(1756),o=n(1812),c=n(1745),a=n(1884),u=r(n(1885)),l=r(n(1886)),h=r(n(1887)),d=r(n(1888)),f=n(1889),p=n(1891),b=r(n(1893));e.TryExtensionLinkDialog=t=>{const[e,n]=(0,o.useState)(!t.isOpen),[r,c]=(0,o.useState)(!t.isOpen);return(0,o.useEffect)((()=>{const{isOpen:e}=t,r=[window.setTimeout((()=>{c(!e)}),10)];return e?n(!1):r.push(window.setTimeout((()=>{n(!0)}),360)),()=>{r.forEach(window.clearTimeout)}}),[t.isOpen]),(0,s.h)("div",{class:(0,i.default)("-cbwsdk-extension-dialog-container",e&&"-cbwsdk-extension-dialog-container-hidden")},(0,s.h)("style",null,b.default),(0,s.h)("div",{class:(0,i.default)("-cbwsdk-extension-dialog-backdrop",r&&"-cbwsdk-extension-dialog-backdrop-hidden")}),(0,s.h)("div",{class:"-cbwsdk-extension-dialog"},(0,s.h)("div",{class:(0,i.default)("-cbwsdk-extension-dialog-box",r&&"-cbwsdk-extension-dialog-box-hidden")},(0,s.h)(y,{onInstallClick:()=>{window.open("https://api.wallet.coinbase.com/rpc/v2/desktop/chrome","_blank")}}),t.connectDisabled?null:(0,s.h)(g,{darkMode:t.darkMode,version:t.version,sessionId:t.sessionId,sessionSecret:t.sessionSecret,linkAPIUrl:t.linkAPIUrl,isConnected:t.isConnected,isParentConnection:t.isParentConnection}),t.onCancel&&(0,s.h)(_,{onClick:t.onCancel}))))};const y=t=>{let{onInstallClick:e}=t;const[n,r]=(0,o.useState)(!1),i=(0,o.useCallback)((()=>{n?window.location.reload():(e(),r(!0))}),[e,n]);return(0,s.h)("div",{class:"-cbwsdk-extension-dialog-box-top"},(0,s.h)("div",{class:"-cbwsdk-extension-dialog-box-top-install-region"},(0,s.h)("h2",null,"Try the Coinbase Wallet extension"),n&&(0,s.h)("div",{class:"-cbwsdk-extension-dialog-box-top-subtext"},"After installing Coinbase Wallet, refresh the page and connect again."),(0,s.h)("button",{type:"button",onClick:i},n?"Refresh":"Install")),(0,s.h)("div",{class:"-cbwsdk-extension-dialog-box-top-info-region"},(0,s.h)(m,{icon:l.default,text:"Connect to crypto apps with one click"}),(0,s.h)(m,{icon:h.default,text:"Your private key is stored securely"}),(0,s.h)(m,{icon:u.default,text:"Works with Ethereum, Polygon, and more"})))},g=t=>{const e=(0,c.createQrUrl)(t.sessionId,t.sessionSecret,t.linkAPIUrl,t.isParentConnection);return(0,s.h)("div",{"data-testid":"scan-qr-box",class:"-cbwsdk-extension-dialog-box-bottom"},(0,s.h)("div",{class:"-cbwsdk-extension-dialog-box-bottom-description-region"},(0,s.h)("h2",null,"Or scan to connect"),(0,s.h)("body",{class:"-cbwsdk-extension-dialog-box-bottom-description"},"Open"," ",(0,s.h)("a",{href:"https://wallet.coinbase.com/",target:"_blank",rel:"noopener noreferrer"},"Coinbase Wallet")," ","on your mobile phone and scan")),(0,s.h)("div",{class:"-cbwsdk-extension-dialog-box-bottom-qr-region"},(0,s.h)("div",{class:"-cbwsdk-extension-dialog-box-bottom-qr-wrapper"},(0,s.h)(f.QRCode,{content:e,width:150,height:150,fgColor:"#000",bgColor:"transparent",image:{svg:d.default,width:34,height:34}})),(0,s.h)("input",{type:"hidden",name:"cbwsdk-version",value:a.LIB_VERSION}),(0,s.h)("input",{type:"hidden",value:e}),!t.isConnected&&(0,s.h)("div",{"data-testid":"connecting-spinner",class:"-cbwsdk-extension-dialog-box-bottom-qr-connecting"},(0,s.h)(p.Spinner,{size:36,color:"#000"}),(0,s.h)("p",null,"Connecting..."))))},m=t=>(0,s.h)("div",{class:"-cbwsdk-extension-dialog-box-top-description"},(0,s.h)("div",{class:"-cbwsdk-extension-dialog-box-top-description-icon-wrapper"},(0,s.h)("img",{src:t.icon})),(0,s.h)("body",{class:"-cbwsdk-extension-dialog-box-top-description-text"},t.text)),_=t=>(0,s.h)("button",{type:"button",class:"-cbwsdk-extension-dialog-box-cancel",onClick:t.onClick},(0,s.h)("div",{class:"-cbwsdk-extension-dialog-box-cancel-x"}))},1884:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LIB_VERSION=void 0,e.LIB_VERSION="3.1.0"},1885:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTggMEMzLjU4IDAgMCAzLjU4IDAgOHMzLjU4IDggOCA4IDgtMy41OCA4LTgtMy41OC04LTgtOFptNS45MSA3aC0xLjk0Yy0uMS0xLjU3LS40Mi0zLS45MS00LjE1IDEuNDguODggMi41NSAyLjM4IDIuODUgNC4xNVpNOCAxNGMtLjQ1IDAtMS43Mi0xLjc3LTEuOTUtNWgzLjljLS4yMyAzLjIzLTEuNSA1LTEuOTUgNVpNNi4wNSA3QzYuMjggMy43NyA3LjU1IDIgOCAyYy40NSAwIDEuNzIgMS43NyAxLjk1IDVoLTMuOVpNNC45NCAyLjg1QzQuNDYgNCA0LjEzIDUuNDMgNC4wMyA3SDIuMDljLjMtMS43NyAxLjM3LTMuMjcgMi44NS00LjE1Wk0yLjA5IDloMS45NGMuMSAxLjU3LjQyIDMgLjkxIDQuMTVBNS45OTggNS45OTggMCAwIDEgMi4wOSA5Wm04Ljk3IDQuMTVjLjQ4LTEuMTUuODEtMi41OC45MS00LjE1aDEuOTRhNS45OTggNS45OTggMCAwIDEtMi44NSA0LjE1WiIgZmlsbD0iIzE2NTJGMCIvPjwvc3ZnPg=="},1886:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTciIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE1LjYzNSAyLjExN2EzLjg4OSAzLjg4OSAwIDAgMC01LjUyMSAwTDYuODkgNS4zMzVBMy44OTQgMy44OTQgMCAwIDAgNS44IDguNzM5Yy4wODMuNTA2LjI2OCAxLjAxMS41NTMgMS40NjYuMTUxLjI1My4zMzYuNDcyLjUzNy42OTFsLjYyMS42MjQgMS4xNDEtMS4xNDYtLjYyLS42MjRhMi4xMDUgMi4xMDUgMCAwIDEtLjQ4Ny0uNzQxIDIuMzQgMi4zNCAwIDAgMSAuNTAzLTIuNTFsMy4yMDYtMy4yMmEyLjI5MyAyLjI5MyAwIDAgMSAzLjIzOSAwYy44OS44OTQuODkgMi4zNDMgMCAzLjI1M2wtMS41MjcgMS41MzNjLjIzNC42NC4zMzUgMS4zMzEuMzAyIDIuMDA1bDIuMzgzLTIuMzkyYzEuNTEtMS41MzQgMS40OTMtNC4wMjgtLjAxNy01LjU2MVoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBkPSJNMTEuMjcxIDcuNzQ1YTMuMTMgMy4xMyAwIDAgMC0uNTU0LS42OWwtLjYyLS42MjQtMS4xNDIgMS4xNDYuNjIxLjYyM2MuMjE4LjIyLjM4Ni40ODkuNDg3Ljc1OC4zMzUuODI2LjE2NyAxLjgyLS41MDQgMi40OTRsLTMuMjA1IDMuMjE5YTIuMjkzIDIuMjkzIDAgMCAxLTMuMjQgMCAyLjMxNiAyLjMxNiAwIDAgMSAwLTMuMjUybDEuNTI4LTEuNTM0YTQuODE1IDQuODE1IDAgMCAxLS4yODUtMi4wMDVsLTIuMzgzIDIuMzkzYTMuOTI3IDMuOTI3IDAgMCAwIDAgNS41NDQgMy45MDkgMy45MDkgMCAwIDAgNS41MzggMGwzLjIwNS0zLjIxOWEzLjk1OCAzLjk1OCAwIDAgMCAxLjA5MS0zLjQwNCA0LjIxMSA0LjIxMSAwIDAgMC0uNTM3LTEuNDQ5WiIgZmlsbD0iIzE2NTJGMCIvPjwvc3ZnPg=="},1887:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEgN3Y5aDE0VjdIMVptNy41IDQuMzlWMTRoLTF2LTIuNjFjLS40NC0uMTktLjc1LS42My0uNzUtMS4xNGExLjI1IDEuMjUgMCAwIDEgMi41IDBjMCAuNTEtLjMxLjk1LS43NSAxLjE0Wk01LjY3IDZWNC4zM0M1LjY3IDMuMDUgNi43MSAyIDggMnMyLjMzIDEuMDUgMi4zMyAyLjMzVjZoMlY0LjMzQzEyLjMzIDEuOTQgMTAuMzkgMCA4IDBTMy42NyAxLjk0IDMuNjcgNC4zM1Y2aDJaIiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+"},1888:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default='<svg width="100" height="100" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg">\n<circle cx="50" cy="50" r="50" fill="white"/>\n<circle cx="49.9996" cy="49.9996" r="43.6363" fill="#1B53E4"/>\n<circle cx="49.9996" cy="49.9996" r="43.6363" stroke="white"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M19.3379 49.9484C19.3379 66.8508 33.04 80.553 49.9425 80.553C66.8449 80.553 80.5471 66.8508 80.5471 49.9484C80.5471 33.0459 66.8449 19.3438 49.9425 19.3438C33.04 19.3438 19.3379 33.0459 19.3379 49.9484ZM44.0817 40.0799C41.8725 40.0799 40.0817 41.8708 40.0817 44.0799V55.8029C40.0817 58.012 41.8725 59.8029 44.0817 59.8029H55.8046C58.0138 59.8029 59.8046 58.012 59.8046 55.8029V44.0799C59.8046 41.8708 58.0138 40.0799 55.8046 40.0799H44.0817Z" fill="white"/>\n</svg>\n\n'},1889:function(t,e,n){"use strict";(function(t){var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.QRCode=void 0;const i=n(1756),s=n(1812),o=r(n(1890));e.QRCode=e=>{const[n,r]=(0,s.useState)("");return(0,s.useEffect)((()=>{var n,i;const s=new o.default({content:e.content,background:e.bgColor||"#ffffff",color:e.fgColor||"#000000",container:"svg",ecl:"M",width:null!==(n=e.width)&&void 0!==n?n:256,height:null!==(i=e.height)&&void 0!==i?i:256,padding:0,image:e.image}),c=t.from(s.svg(),"utf8").toString("base64");r(`data:image/svg+xml;base64,${c}`)})),n?(0,i.h)("img",{src:n,alt:"QR Code"}):null}}).call(this,n(60).Buffer)},1890:function(t,e){function n(t){this.mode=i.MODE_8BIT_BYTE,this.data=t,this.parsedData=[];for(var e=0,n=this.data.length;e<n;e++){var r=[],s=this.data.charCodeAt(e);s>65536?(r[0]=240|(1835008&s)>>>18,r[1]=128|(258048&s)>>>12,r[2]=128|(4032&s)>>>6,r[3]=128|63&s):s>2048?(r[0]=224|(61440&s)>>>12,r[1]=128|(4032&s)>>>6,r[2]=128|63&s):s>128?(r[0]=192|(1984&s)>>>6,r[1]=128|63&s):r[0]=s,this.parsedData.push(r)}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 r(t,e){this.typeNumber=t,this.errorCorrectLevel=e,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}n.prototype={getLength:function(t){return this.parsedData.length},write:function(t){for(var e=0,n=this.parsedData.length;e<n;e++)t.put(this.parsedData[e],8)}},r.prototype={addData:function(t){var e=new n(t);this.dataList.push(e),this.dataCache=null},isDark:function(t,e){if(t<0||this.moduleCount<=t||e<0||this.moduleCount<=e)throw new Error(t+","+e);return this.modules[t][e]},getModuleCount:function(){return this.moduleCount},make:function(){this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(t,e){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var n=0;n<this.moduleCount;n++){this.modules[n]=new Array(this.moduleCount);for(var i=0;i<this.moduleCount;i++)this.modules[n][i]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(t,e),this.typeNumber>=7&&this.setupTypeNumber(t),null==this.dataCache&&(this.dataCache=r.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=g.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<this.modules.length;i++)for(var s=1*i,o=0;o<this.modules[i].length;o++){var c=1*o;this.modules[i][o]&&(r.beginFill(0,100),r.moveTo(c,s),r.lineTo(c+1,s),r.lineTo(c+1,s+1),r.lineTo(c,s+1),r.endFill())}return r},setupTimingPattern:function(){for(var t=8;t<this.moduleCount-8;t++)null==this.modules[t][6]&&(this.modules[t][6]=t%2==0);for(var e=8;e<this.moduleCount-8;e++)null==this.modules[6][e]&&(this.modules[6][e]=e%2==0)},setupPositionAdjustPattern:function(){for(var t=g.getPatternPosition(this.typeNumber),e=0;e<t.length;e++)for(var n=0;n<t.length;n++){var r=t[e],i=t[n];if(null==this.modules[r][i])for(var s=-2;s<=2;s++)for(var o=-2;o<=2;o++)this.modules[r+s][i+o]=-2==s||2==s||-2==o||2==o||0==s&&0==o}},setupTypeNumber:function(t){for(var e=g.getBCHTypeNumber(this.typeNumber),n=0;n<18;n++){var r=!t&&1==(e>>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=g.getBCHTypeInfo(n),i=0;i<15;i++){var s=!t&&1==(r>>i&1);i<6?this.modules[i][8]=s:i<8?this.modules[i+1][8]=s:this.modules[this.moduleCount-15+i][8]=s}for(i=0;i<15;i++){s=!t&&1==(r>>i&1);i<8?this.modules[8][this.moduleCount-i-1]=s:i<9?this.modules[8][15-i-1+1]=s:this.modules[8][15-i-1]=s}this.modules[this.moduleCount-8][8]=!t},mapData:function(t,e){for(var n=-1,r=this.moduleCount-1,i=7,s=0,o=this.moduleCount-1;o>0;o-=2)for(6==o&&o--;;){for(var c=0;c<2;c++)if(null==this.modules[r][o-c]){var a=!1;s<t.length&&(a=1==(t[s]>>>i&1)),g.getMask(e,r,o-c)&&(a=!a),this.modules[r][o-c]=a,-1==--i&&(s++,i=7)}if((r+=n)<0||this.moduleCount<=r){r-=n,n=-n;break}}}},r.PAD0=236,r.PAD1=17,r.createData=function(t,e,n){for(var i=w.getRSBlocks(t,e),s=new E,o=0;o<n.length;o++){var c=n[o];s.put(c.mode,4),s.put(c.getLength(),g.getLengthInBits(c.mode,t)),c.write(s)}var a=0;for(o=0;o<i.length;o++)a+=i[o].dataCount;if(s.getLengthInBits()>8*a)throw new Error("code length overflow. ("+s.getLengthInBits()+">"+8*a+")");for(s.getLengthInBits()+4<=8*a&&s.put(0,4);s.getLengthInBits()%8!=0;)s.putBit(!1);for(;!(s.getLengthInBits()>=8*a)&&(s.put(r.PAD0,8),!(s.getLengthInBits()>=8*a));)s.put(r.PAD1,8);return r.createBytes(s,i)},r.createBytes=function(t,e){for(var n=0,r=0,i=0,s=new Array(e.length),o=new Array(e.length),c=0;c<e.length;c++){var a=e[c].dataCount,u=e[c].totalCount-a;r=Math.max(r,a),i=Math.max(i,u),s[c]=new Array(a);for(var l=0;l<s[c].length;l++)s[c][l]=255&t.buffer[l+n];n+=a;var h=g.getErrorCorrectPolynomial(u),d=new v(s[c],h.getLength()-1).mod(h);o[c]=new Array(h.getLength()-1);for(l=0;l<o[c].length;l++){var f=l+d.getLength()-o[c].length;o[c][l]=f>=0?d.get(f):0}}var p=0;for(l=0;l<e.length;l++)p+=e[l].totalCount;var b=new Array(p),y=0;for(l=0;l<r;l++)for(c=0;c<e.length;c++)l<s[c].length&&(b[y++]=s[c][l]);for(l=0;l<i;l++)for(c=0;c<e.length;c++)l<o[c].length&&(b[y++]=o[c][l]);return b};for(var i={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},s=1,o=0,c=3,a=2,u=0,l=1,h=2,d=3,f=4,p=5,b=6,y=7,g={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(t){for(var e=t<<10;g.getBCHDigit(e)-g.getBCHDigit(g.G15)>=0;)e^=g.G15<<g.getBCHDigit(e)-g.getBCHDigit(g.G15);return(t<<10|e)^g.G15_MASK},getBCHTypeNumber:function(t){for(var e=t<<12;g.getBCHDigit(e)-g.getBCHDigit(g.G18)>=0;)e^=g.G18<<g.getBCHDigit(e)-g.getBCHDigit(g.G18);return t<<12|e},getBCHDigit:function(t){for(var e=0;0!=t;)e++,t>>>=1;return e},getPatternPosition:function(t){return g.PATTERN_POSITION_TABLE[t-1]},getMask:function(t,e,n){switch(t){case u:return(e+n)%2==0;case l:return e%2==0;case h:return n%3==0;case d:return(e+n)%3==0;case f:return(Math.floor(e/2)+Math.floor(n/3))%2==0;case p:return e*n%2+e*n%3==0;case b:return(e*n%2+e*n%3)%2==0;case y:return(e*n%3+(e+n)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}},getErrorCorrectPolynomial:function(t){for(var e=new v([1],0),n=0;n<t;n++)e=e.multiply(new v([1,m.gexp(n)],0));return e},getLengthInBits:function(t,e){if(1<=e&&e<10)switch(t){case i.MODE_NUMBER:return 10;case i.MODE_ALPHA_NUM:return 9;case i.MODE_8BIT_BYTE:case i.MODE_KANJI:return 8;default:throw new Error("mode:"+t)}else if(e<27)switch(t){case i.MODE_NUMBER:return 12;case i.MODE_ALPHA_NUM:return 11;case i.MODE_8BIT_BYTE:return 16;case i.MODE_KANJI:return 10;default:throw new Error("mode:"+t)}else{if(!(e<41))throw new Error("type:"+e);switch(t){case i.MODE_NUMBER:return 14;case i.MODE_ALPHA_NUM:return 13;case i.MODE_8BIT_BYTE:return 16;case i.MODE_KANJI:return 12;default:throw new Error("mode:"+t)}}},getLostPoint:function(t){for(var e=t.getModuleCount(),n=0,r=0;r<e;r++)for(var i=0;i<e;i++){for(var s=0,o=t.isDark(r,i),c=-1;c<=1;c++)if(!(r+c<0||e<=r+c))for(var a=-1;a<=1;a++)i+a<0||e<=i+a||0==c&&0==a||o==t.isDark(r+c,i+a)&&s++;s>5&&(n+=3+s-5)}for(r=0;r<e-1;r++)for(i=0;i<e-1;i++){var u=0;t.isDark(r,i)&&u++,t.isDark(r+1,i)&&u++,t.isDark(r,i+1)&&u++,t.isDark(r+1,i+1)&&u++,0!=u&&4!=u||(n+=3)}for(r=0;r<e;r++)for(i=0;i<e-6;i++)t.isDark(r,i)&&!t.isDark(r,i+1)&&t.isDark(r,i+2)&&t.isDark(r,i+3)&&t.isDark(r,i+4)&&!t.isDark(r,i+5)&&t.isDark(r,i+6)&&(n+=40);for(i=0;i<e;i++)for(r=0;r<e-6;r++)t.isDark(r,i)&&!t.isDark(r+1,i)&&t.isDark(r+2,i)&&t.isDark(r+3,i)&&t.isDark(r+4,i)&&!t.isDark(r+5,i)&&t.isDark(r+6,i)&&(n+=40);var l=0;for(i=0;i<e;i++)for(r=0;r<e;r++)t.isDark(r,i)&&l++;return n+=10*(Math.abs(100*l/e/e-50)/5)}},m={glog:function(t){if(t<1)throw new Error("glog("+t+")");return m.LOG_TABLE[t]},gexp:function(t){for(;t<0;)t+=255;for(;t>=256;)t-=255;return m.EXP_TABLE[t]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},_=0;_<8;_++)m.EXP_TABLE[_]=1<<_;for(_=8;_<256;_++)m.EXP_TABLE[_]=m.EXP_TABLE[_-4]^m.EXP_TABLE[_-5]^m.EXP_TABLE[_-6]^m.EXP_TABLE[_-8];for(_=0;_<255;_++)m.LOG_TABLE[m.EXP_TABLE[_]]=_;function v(t,e){if(void 0==t.length)throw new Error(t.length+"/"+e);for(var n=0;n<t.length&&0==t[n];)n++;this.num=new Array(t.length-n+e);for(var r=0;r<t.length-n;r++)this.num[r]=t[r+n]}function w(t,e){this.totalCount=t,this.dataCount=e}function E(){this.buffer=[],this.length=0}v.prototype={get:function(t){return this.num[t]},getLength:function(){return this.num.length},multiply:function(t){for(var e=new Array(this.getLength()+t.getLength()-1),n=0;n<this.getLength();n++)for(var r=0;r<t.getLength();r++)e[n+r]^=m.gexp(m.glog(this.get(n))+m.glog(t.get(r)));return new v(e,0)},mod:function(t){if(this.getLength()-t.getLength()<0)return this;for(var e=m.glog(this.get(0))-m.glog(t.get(0)),n=new Array(this.getLength()),r=0;r<this.getLength();r++)n[r]=this.get(r);for(r=0;r<t.getLength();r++)n[r]^=m.gexp(m.glog(t.get(r))+e);return new v(n,0).mod(t)}},w.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],w.getRSBlocks=function(t,e){var n=w.getRsBlockTable(t,e);if(void 0==n)throw new Error("bad rs block @ typeNumber:"+t+"/errorCorrectLevel:"+e);for(var r=n.length/3,i=[],s=0;s<r;s++)for(var o=n[3*s+0],c=n[3*s+1],a=n[3*s+2],u=0;u<o;u++)i.push(new w(c,a));return i},w.getRsBlockTable=function(t,e){switch(e){case s:return w.RS_BLOCK_TABLE[4*(t-1)+0];case o:return w.RS_BLOCK_TABLE[4*(t-1)+1];case c:return w.RS_BLOCK_TABLE[4*(t-1)+2];case a:return w.RS_BLOCK_TABLE[4*(t-1)+3];default:return}},E.prototype={get:function(t){var e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(var n=0;n<e;n++)this.putBit(1==(t>>>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 x=[[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 S(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 n=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,s=0,o=x.length;s<=o;s++){var c=x[s];if(!c)throw new Error("Content too long: expected "+i+" but got "+n);switch(e){case"L":i=c[0];break;case"M":i=c[1];break;case"Q":i=c[2];break;case"H":i=c[3];break;default:throw new Error("Unknwon error correction level: "+e)}if(n<=i)break;r++}if(r>x.length)throw new Error("Content too long");return r}(n,this.options.ecl),u=function(t){switch(t){case"L":return s;case"M":return o;case"Q":return c;case"H":return a;default:throw new Error("Unknwon error correction level: "+t)}}(this.options.ecl);this.qrcode=new r(i,u),this.qrcode.addData(n),this.qrcode.make()}S.prototype.svg=function(t){var e=this.options||{},n=this.qrcode.modules;"undefined"==typeof t&&(t={container:e.container||"svg"});for(var r="undefined"==typeof e.pretty||!!e.pretty,i=r?" ":"",s=r?"\r\n":"",o=e.width,c=e.height,a=n.length,u=o/(a+2*e.padding),l=c/(a+2*e.padding),h="undefined"!=typeof e.join&&!!e.join,d="undefined"!=typeof e.swap&&!!e.swap,f="undefined"==typeof e.xmlDeclaration||!!e.xmlDeclaration,p="undefined"!=typeof e.predefined&&!!e.predefined,b=p?i+'<defs><path id="qrmodule" d="M0 0 h'+l+" v"+u+' H0 z" style="fill:'+e.color+';shape-rendering:crispEdges;" /></defs>'+s:"",y=i+'<rect x="0" y="0" width="'+o+'" height="'+c+'" style="fill:'+e.background+';shape-rendering:crispEdges;"/>'+s,g="",m="",_=0;_<a;_++)for(var v=0;v<a;v++){if(n[v][_]){var w=v*u+e.padding*u,E=_*l+e.padding*l;if(d){var x=w;w=E,E=x}if(h){var S=u+w,k=l+E;w=Number.isInteger(w)?Number(w):w.toFixed(2),E=Number.isInteger(E)?Number(E):E.toFixed(2),S=Number.isInteger(S)?Number(S):S.toFixed(2),m+="M"+w+","+E+" V"+(k=Number.isInteger(k)?Number(k):k.toFixed(2))+" H"+S+" V"+E+" H"+w+" Z "}else g+=p?i+'<use x="'+w.toString()+'" y="'+E.toString()+'" href="#qrmodule" />'+s:i+'<rect x="'+w.toString()+'" y="'+E.toString()+'" width="'+u+'" height="'+l+'" style="fill:'+e.color+';shape-rendering:crispEdges;"/>'+s}}h&&(g=i+'<path x="0" y="0" style="fill:'+e.color+';shape-rendering:crispEdges;" d="'+m+'" />');let C="";if(void 0!==this.options.image&&this.options.image.svg){const t=o*this.options.image.width/100,e=c*this.options.image.height/100;C+=`<svg x="${o/2-t/2}" y="${c/2-e/2}" width="${t}" height="${e}" viewBox="0 0 100 100" preserveAspectRatio="xMinYMin meet">`,C+=this.options.image.svg+s,C+="</svg>"}var I="";switch(t.container){case"svg":f&&(I+='<?xml version="1.0" standalone="yes"?>'+s),I+='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="'+o+'" height="'+c+'">'+s,I+=b+y+g,I+=C,I+="</svg>";break;case"svg-viewbox":f&&(I+='<?xml version="1.0" standalone="yes"?>'+s),I+='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 '+o+" "+c+'">'+s,I+=b+y+g,I+=C,I+="</svg>";break;case"g":I+='<g width="'+o+'" height="'+c+'">'+s,I+=b+y+g,I+=C,I+="</g>";break;default:I+=(b+y+g+C).replace(/^\s+/,"")}return I},t.exports=S},1891: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(1756),s=r(n(1892));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:"-cbwsdk-spinner"},(0,i.h)("style",null,s.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}})))}},1892:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=".-cbwsdk-css-reset .-cbwsdk-spinner{display:inline-block}.-cbwsdk-css-reset .-cbwsdk-spinner svg{display:inline-block;animation:2s linear infinite -cbwsdk-spinner-svg}.-cbwsdk-css-reset .-cbwsdk-spinner svg circle{animation:1.9s ease-in-out infinite both -cbwsdk-spinner-circle;display:block;fill:rgba(0,0,0,0);stroke-dasharray:283;stroke-dashoffset:280;stroke-linecap:round;stroke-width:10px;transform-origin:50% 50%}@keyframes -cbwsdk-spinner-svg{0%{transform:rotateZ(0deg)}100%{transform:rotateZ(360deg)}}@keyframes -cbwsdk-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)}}"},1893:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default='.-cbwsdk-css-reset .-cbwsdk-extension-dialog{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.-cbwsdk-css-reset .-cbwsdk-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}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-backdrop-hidden{opacity:0}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box{display:flex;position:relative;max-width:500px;flex-direction:column;transform:scale(1);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-hidden{opacity:0;transform:scale(0.85)}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top{display:flex;flex-direction:row;background-color:#fff;border-radius:8px;overflow:hidden;min-height:300px}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-subtext{margin-top:15px;font-size:12px;line-height:1.5}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-install-region{display:flex;flex-basis:50%;flex-direction:column;justify-content:center;padding:32px}.-cbwsdk-css-reset .-cbwsdk-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}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-info-region{display:flex;flex-basis:50%;flex-direction:column;justify-content:center;background-color:#fafbfc}.-cbwsdk-css-reset .-cbwsdk-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}.-cbwsdk-css-reset .-cbwsdk-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)}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-description-icon-wrapper img{position:absolute;top:0;bottom:0;left:0;right:0;margin:auto}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-description-text{margin-left:16px;flex-grow:1;font-size:13px;line-height:19px;color:#000;align-self:center}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom{display:flex;flex-direction:row;overflow:hidden;border-radius:8px;background-color:#fff;margin-top:8px}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-description-region{display:flex;flex-direction:column;justify-content:center;padding:32px;flex-grow:1}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-description{font-size:13px;line-height:19px;margin-top:12px;color:#aaa}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-description a{font-size:inherit;line-height:inherit;color:#1652f0;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-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}.-cbwsdk-css-reset .-cbwsdk-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)}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-qr-wrapper img{display:block}.-cbwsdk-css-reset .-cbwsdk-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)}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-qr-connecting>p{font-size:12px;font-weight:bold;color:#000;margin-top:16px}.-cbwsdk-css-reset .-cbwsdk-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}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel-x{position:relative;display:block;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel-x::before,.-cbwsdk-css-reset .-cbwsdk-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}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel-x::before{transform:rotate(45deg)}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel-x::after{transform:rotate(135deg)}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel:hover .-cbwsdk-link-dialog-box-cancel-x-a,.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel:hover .-cbwsdk-link-dialog-box-cancel-x-b{background-color:#000}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-container{display:block}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-container-hidden{display:none}.-cbwsdk-css-reset .-cbwsdk-extension-dialog h2{display:block;text-align:left;font-size:22px;font-weight:600;line-height:28px;color:#000}'},1894: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.SnackbarInstance=e.SnackbarContainer=e.Snackbar=void 0;const i=r(n(45)),s=n(1756),o=n(1812),c=r(n(1895));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="-cbwsdk-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,s.render)((0,s.h)("div",null,(0,s.h)(e.SnackbarContainer,{darkMode:this.darkMode},Array.from(this.items.entries()).map((t=>{let[n,r]=t;return(0,s.h)(e.SnackbarInstance,Object.assign({},r,{key:n}))})))),this.root)}};e.SnackbarContainer=t=>(0,s.h)("div",{class:(0,i.default)("-cbwsdk-snackbar-container")},(0,s.h)("style",null,c.default),(0,s.h)("div",{class:"-cbwsdk-snackbar"},t.children));e.SnackbarInstance=t=>{let{autoExpand:e,message:n,menuItems:r}=t;const[c,a]=(0,o.useState)(!0),[u,l]=(0,o.useState)(null!==e&&void 0!==e&&e);(0,o.useEffect)((()=>{const t=[window.setTimeout((()=>{a(!1)}),1),window.setTimeout((()=>{l(!0)}),1e4)];return()=>{t.forEach(window.clearTimeout)}}));return(0,s.h)("div",{class:(0,i.default)("-cbwsdk-snackbar-instance",c&&"-cbwsdk-snackbar-instance-hidden",u&&"-cbwsdk-snackbar-instance-expanded")},(0,s.h)("div",{class:"-cbwsdk-snackbar-instance-header",onClick:()=>{l(!u)}},(0,s.h)("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNDkyIDEwLjQxOWE4LjkzIDguOTMgMCAwMTguOTMtOC45M2gxMS4xNjNhOC45MyA4LjkzIDAgMDE4LjkzIDguOTN2MTEuMTYzYTguOTMgOC45MyAwIDAxLTguOTMgOC45M0gxMC40MjJhOC45MyA4LjkzIDAgMDEtOC45My04LjkzVjEwLjQxOXoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEwLjQxOSAwSDIxLjU4QzI3LjMzNSAwIDMyIDQuNjY1IDMyIDEwLjQxOVYyMS41OEMzMiAyNy4zMzUgMjcuMzM1IDMyIDIxLjU4MSAzMkgxMC40MkM0LjY2NSAzMiAwIDI3LjMzNSAwIDIxLjU4MVYxMC40MkMwIDQuNjY1IDQuNjY1IDAgMTAuNDE5IDB6bTAgMS40ODhhOC45MyA4LjkzIDAgMDAtOC45MyA4LjkzdjExLjE2M2E4LjkzIDguOTMgMCAwMDguOTMgOC45M0gyMS41OGE4LjkzIDguOTMgMCAwMDguOTMtOC45M1YxMC40MmE4LjkzIDguOTMgMCAwMC04LjkzLTguOTNIMTAuNDJ6IiBmaWxsPSIjZmZmIi8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNS45OTggMjYuMDQ5Yy01LjU0OSAwLTEwLjA0Ny00LjQ5OC0xMC4wNDctMTAuMDQ3IDAtNS41NDggNC40OTgtMTAuMDQ2IDEwLjA0Ny0xMC4wNDYgNS41NDggMCAxMC4wNDYgNC40OTggMTAuMDQ2IDEwLjA0NiAwIDUuNTQ5LTQuNDk4IDEwLjA0Ny0xMC4wNDYgMTAuMDQ3eiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0xMi43NjIgMTQuMjU0YzAtLjgyMi42NjctMS40ODkgMS40ODktMS40ODloMy40OTdjLjgyMiAwIDEuNDg4LjY2NiAxLjQ4OCAxLjQ4OXYzLjQ5N2MwIC44MjItLjY2NiAxLjQ4OC0xLjQ4OCAxLjQ4OGgtMy40OTdhMS40ODggMS40ODggMCAwMS0xLjQ4OS0xLjQ4OHYtMy40OTh6IiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+",class:"-cbwsdk-snackbar-instance-header-cblogo"}),(0,s.h)("div",{class:"-cbwsdk-snackbar-instance-header-message"},n),(0,s.h)("div",{class:"-gear-container"},!u&&(0,s.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,s.h)("circle",{cx:"12",cy:"12",r:"12",fill:"#F5F7F8"})),(0,s.h)("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDYuNzV2LTEuNWwtMS43Mi0uNTdjLS4wOC0uMjctLjE5LS41Mi0uMzItLjc3bC44MS0xLjYyLTEuMDYtMS4wNi0xLjYyLjgxYy0uMjQtLjEzLS41LS4yNC0uNzctLjMyTDYuNzUgMGgtMS41bC0uNTcgMS43MmMtLjI3LjA4LS41My4xOS0uNzcuMzJsLTEuNjItLjgxLTEuMDYgMS4wNi44MSAxLjYyYy0uMTMuMjQtLjI0LjUtLjMyLjc3TDAgNS4yNXYxLjVsMS43Mi41N2MuMDguMjcuMTkuNTMuMzIuNzdsLS44MSAxLjYyIDEuMDYgMS4wNiAxLjYyLS44MWMuMjQuMTMuNS4yMy43Ny4zMkw1LjI1IDEyaDEuNWwuNTctMS43MmMuMjctLjA4LjUyLS4xOS43Ny0uMzJsMS42Mi44MSAxLjA2LTEuMDYtLjgxLTEuNjJjLjEzLS4yNC4yMy0uNS4zMi0uNzdMMTIgNi43NXpNNiA4LjVhMi41IDIuNSAwIDAxMC01IDIuNSAyLjUgMCAwMTAgNXoiIGZpbGw9IiMwNTBGMTkiLz48L3N2Zz4=",class:"-gear-icon",title:"Expand"}))),r&&r.length>0&&(0,s.h)("div",{class:"-cbwsdk-snackbar-instance-menu"},r.map(((t,e)=>(0,s.h)("div",{class:(0,i.default)("-cbwsdk-snackbar-instance-menu-item",t.isRed&&"-cbwsdk-snackbar-instance-menu-item-is-red"),onClick:t.onClick,key:e},(0,s.h)("svg",{width:t.svgWidth,height:t.svgHeight,viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,s.h)("path",{"fill-rule":t.defaultFillRule,"clip-rule":t.defaultClipRule,d:t.path,fill:"#AAAAAA"})),(0,s.h)("span",{class:(0,i.default)("-cbwsdk-snackbar-instance-menu-item-info",t.isRed&&"-cbwsdk-snackbar-instance-menu-item-info-is-red")},t.info))))))}},1895:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=".-cbwsdk-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}.-cbwsdk-css-reset .-gear-container *{user-select:none}.-cbwsdk-css-reset .-gear-container svg{opacity:0;position:absolute}.-cbwsdk-css-reset .-gear-icon{height:12px;width:12px;z-index:10000}.-cbwsdk-css-reset .-cbwsdk-snackbar{align-items:flex-end;display:flex;flex-direction:column;position:fixed;right:0;top:0;z-index:2147483647}.-cbwsdk-css-reset .-cbwsdk-snackbar *{user-select:none}.-cbwsdk-css-reset .-cbwsdk-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}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header:hover .-gear-container svg{opacity:1}.-cbwsdk-css-reset .-cbwsdk-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}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-cblogo{margin:8px 8px 8px 8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-message{color:#000;font-size:13px;line-height:1.5;user-select:none}.-cbwsdk-css-reset .-cbwsdk-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}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:last-child{margin-bottom:8px !important}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover{background:#f5f7f8;border-radius:6px;transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover span{color:#050f19;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover svg path{fill:#000;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-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}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item *{visibility:inherit;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover{background:rgba(223,95,103,.2);transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover svg path{fill:#df5f67;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover span{color:#df5f67;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-info{color:#aaa;font-size:13px;margin:0 8px 0 32px;position:absolute}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-hidden{opacity:0;text-align:left;transform:translateX(25%);transition:opacity .5s linear}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-expanded .-cbwsdk-snackbar-instance-menu{opacity:1;display:flex;transform:translateY(8px);visibility:visible}"},1896: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(1897));e.injectCssReset=function(){const t=document.createElement("style");t.type="text/css",t.appendChild(document.createTextNode(i.default)),document.documentElement.appendChild(t)}},1897:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default='@namespace svg "http://www.w3.org/2000/svg";.-cbwsdk-css-reset,.-cbwsdk-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:rgba(0,0,0,0);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}.-cbwsdk-css-reset *{box-sizing:border-box;display:initial;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;line-height:1}.-cbwsdk-css-reset [class*=container]{margin:0;padding:0}.-cbwsdk-css-reset style{display:none}'},1898: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}),s=this&&this.__decorate||function(t,e,n,r){var i,s=arguments.length,o=s<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r);else for(var c=t.length-1;c>=0;c--)(i=t[c])&&(o=(s<3?i(o):s>3?i(e,n,o):i(e,n))||o);return s>3&&o&&Object.defineProperty(e,n,o),o},o=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},c=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.WalletSDKRelay=void 0;const a=c(n(1899)),u=n(1786),l=n(1757),h=n(1781),d=n(1789),f=n(1900),p=n(1904),b=n(1745),y=o(n(1905)),g=n(1790),m=n(1827),_=n(1836),v=n(1906),w=n(1907),E=n(1908),x=n(1909);class S extends m.WalletSDKRelayAbstract{constructor(t){super(),this.accountsCallback=null,this.chainCallback=null,this.appName="",this.appLogoUrl=null,this.subscriptions=new l.Subscription,this.linkAPIUrl=t.linkAPIUrl,this.storage=t.storage,this._session=g.Session.load(t.storage)||new g.Session(t.storage).save(),this.relayEventManager=t.relayEventManager,this.eventListener=t.eventListener,this.connection=new f.WalletSDKConnection(this._session.id,this._session.key,this.linkAPIUrl,this.eventListener),this.subscriptions.add(this.connection.sessionConfig$.subscribe({next:t=>{this.onSessionConfigChanged(t)},error:()=>{var t;null===(t=this.eventListener)||void 0===t||t.onEvent(d.EVENTS.GENERAL_ERROR,{message:"error while invoking session config callback"})}})),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(t&&(this.session.linked=t),this.isUnlinkedErrorState=!1,n){const r=n.split(" "),i="true"===this.storage.getItem("IsStandaloneSigning");if(""!==r[0]&&!t&&this.session.linked&&!i){this.isUnlinkedErrorState=!0;const t=this.getSessionIdHash();null===(e=this.eventListener)||void 0===e||e.onEvent(d.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.eventListener)||void 0===t||t.onEvent(d.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=>y.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.eventListener)||void 0===t||t.onEvent(d.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=>y.decrypt(t.metadata.AppVersion,this._session.secret)))).subscribe({next:t=>{this.storage.setItem(m.APP_VERSION_KEY,t)},error:()=>{var t;null===(t=this.eventListener)||void 0===t||t.onEvent(d.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)(y.decrypt(t.metadata.ChainId,this._session.secret),y.decrypt(t.metadata.JsonRpcUrl,this._session.secret))))).pipe((0,h.distinctUntilChanged)()).subscribe({next:t=>{let[e,n]=t;this.chainCallback&&this.chainCallback(e,n)},error:()=>{var t;null===(t=this.eventListener)||void 0===t||t.onEvent(d.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=>y.decrypt(t.metadata.EthereumAddress,this._session.secret)))).subscribe({next:t=>{this.accountsCallback&&this.accountsCallback([t]),S.accountRequestCallbackIds.size>0&&(Array.from(S.accountRequestCallbackIds.values()).forEach((e=>{const n=(0,x.Web3ResponseMessage)({id:e,response:(0,E.RequestEthereumAccountsResponse)([t])});this.invokeCallback(Object.assign(Object.assign({},n),{id:e}))})),S.accountRequestCallbackIds.clear())},error:()=>{var t;null===(t=this.eventListener)||void 0===t||t.onEvent(d.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"selectedAddress"})}})),this.ui=t.uiConstructor({linkAPIUrl:t.linkAPIUrl,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(s){null===(e=this.eventListener)||void 0===e||e.onEvent(d.EVENTS.GENERAL_ERROR,{message:"Had error unsubscribing"})}null===(n=this.eventListener)||void 0===n||n.onEvent(d.EVENTS.SESSION_STATE_CHANGE,{method:"relay::resetAndReload",sessionMetadataChange:"__destroyed, 1",sessionIdHash:this.getSessionIdHash()}),this.connection.destroy();const i=g.Session.load(this.storage);(null===i||void 0===i?void 0:i.id)===this._session.id?this.storage.clear():i&&(null===(r=this.eventListener)||void 0===r||r.onEvent(d.EVENTS.SKIPPED_CLEARING_SESSION,{sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:g.Session.hash(i.id)})),this.ui.reloadUI()}),(t=>{var e;null===(e=this.eventListener)||void 0===e||e.onEvent(d.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:_.Web3Method.signEthereumMessage,params:{message:(0,b.hexStringFromBuffer)(t,!0),address:e,addPrefix:n,typedDataJson:r||null}})}ethereumAddressFromSignedMessage(t,e,n){return this.sendRequest({method:_.Web3Method.ethereumAddressFromSignedMessage,params:{message:(0,b.hexStringFromBuffer)(t,!0),signature:(0,b.hexStringFromBuffer)(e,!0),addPrefix:n}})}signEthereumTransaction(t){return this.sendRequest({method:_.Web3Method.signEthereumTransaction,params:{fromAddress:t.fromAddress,toAddress:t.toAddress,weiValue:(0,b.bigIntStringFromBN)(t.weiValue),data:(0,b.hexStringFromBuffer)(t.data,!0),nonce:t.nonce,gasPriceInWei:t.gasPriceInWei?(0,b.bigIntStringFromBN)(t.gasPriceInWei):null,maxFeePerGas:t.gasPriceInWei?(0,b.bigIntStringFromBN)(t.gasPriceInWei):null,maxPriorityFeePerGas:t.gasPriceInWei?(0,b.bigIntStringFromBN)(t.gasPriceInWei):null,gasLimit:t.gasLimit?(0,b.bigIntStringFromBN)(t.gasLimit):null,chainId:t.chainId,shouldSubmit:!1}})}signAndSubmitEthereumTransaction(t){return this.sendRequest({method:_.Web3Method.signEthereumTransaction,params:{fromAddress:t.fromAddress,toAddress:t.toAddress,weiValue:(0,b.bigIntStringFromBN)(t.weiValue),data:(0,b.hexStringFromBuffer)(t.data,!0),nonce:t.nonce,gasPriceInWei:t.gasPriceInWei?(0,b.bigIntStringFromBN)(t.gasPriceInWei):null,maxFeePerGas:t.maxFeePerGas?(0,b.bigIntStringFromBN)(t.maxFeePerGas):null,maxPriorityFeePerGas:t.maxPriorityFeePerGas?(0,b.bigIntStringFromBN)(t.maxPriorityFeePerGas):null,gasLimit:t.gasLimit?(0,b.bigIntStringFromBN)(t.gasLimit):null,chainId:t.chainId,shouldSubmit:!0}})}submitEthereumTransaction(t,e){return this.sendRequest({method:_.Web3Method.submitEthereumTransaction,params:{signedTransaction:(0,b.hexStringFromBuffer)(t,!0),chainId:e}})}scanQRCode(t){return this.sendRequest({method:_.Web3Method.scanQRCode,params:{regExp:t}})}getQRCodeUrl(){return(0,b.createQrUrl)(this._session.id,this._session.secret,this.linkAPIUrl,!1)}genericRequest(t,e){return this.sendRequest({method:_.Web3Method.generic,params:{action:e,data:t}})}sendGenericMessage(t){return this.sendRequest(t)}sendRequest(t){let e=null;const n=(0,b.randomBytesHex)(8),r=r=>{this.publishWeb3RequestCanceledEvent(n),this.handleErrorResponse(n,t.method,r),null===e||void 0===e||e()};return{promise:new Promise(((i,s)=>{this.ui.isStandalone()||(e=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:r,onResetConnection:this.resetAndReload})),this.relayEventManager.callbacks.set(n,(t=>{if(null===e||void 0===e||e(),t.errorMessage)return s(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,w.Web3RequestMessage)({id:t,request:e}),i=g.Session.load(this.storage);null===(n=this.eventListener)||void 0===n||n.onEvent(d.EVENTS.WEB3_REQUEST,{eventId:r.id,method:`relay::${r.request.method}`,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:i?g.Session.hash(i.id):"",isSessionMismatched:((null===i||void 0===i?void 0:i.id)!==this._session.id).toString()}),this.subscriptions.add(this.publishEvent("Web3Request",r,!0).subscribe({next:t=>{var e;null===(e=this.eventListener)||void 0===e||e.onEvent(d.EVENTS.WEB3_REQUEST_PUBLISHED,{eventId:r.id,method:`relay::${r.request.method}`,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:i?g.Session.hash(i.id):"",isSessionMismatched:((null===i||void 0===i?void 0:i.id)!==this._session.id).toString()})},error:t=>{this.handleWeb3ResponseMessage((0,x.Web3ResponseMessage)({id:r.id,response:{method:r.request.method,errorMessage:t.message}}))}}))}publishWeb3RequestCanceledEvent(t){const e=(0,v.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=>{y.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(y.decrypt(t.data,this.session.secret).pipe((0,h.map)((t=>JSON.parse(t)))).subscribe({next:t=>{const e=(0,x.isWeb3ResponseMessage)(t)?t:null;e&&this.handleWeb3ResponseMessage(e)},error:()=>{var t;null===(t=this.eventListener)||void 0===t||t.onEvent(d.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"incomingEvent"})}}))}catch(e){return}}handleWeb3ResponseMessage(t){var e;const{response:n}=t;if(null===(e=this.eventListener)||void 0===e||e.onEvent(d.EVENTS.WEB3_RESPONSE,{eventId:t.id,method:`relay::${n.method}`,sessionIdHash:this.getSessionIdHash()}),(0,E.isRequestEthereumAccountsResponse)(n))return S.accountRequestCallbackIds.forEach((e=>this.invokeCallback(Object.assign(Object.assign({},t),{id:e})))),void S.accountRequestCallbackIds.clear();this.invokeCallback(t)}handleErrorResponse(t,e,n,r){this.handleWeb3ResponseMessage((0,x.Web3ResponseMessage)({id:t,response:(0,E.ErrorResponse)(e,(null!==n&&void 0!==n?n:p.WalletUIError.UserRejectedRequest).message,r)}))}invokeCallback(t){const e=this.relayEventManager.callbacks.get(t.id);e&&(e(t.response),this.relayEventManager.callbacks.delete(t.id))}requestEthereumAccounts(){const t={method:_.Web3Method.requestEthereumAccounts,params:{appName:this.appName,appLogoUrl:this.appLogoUrl||null}},e=(0,b.randomBytesHex)(8),n=n=>{this.publishWeb3RequestCanceledEvent(e),this.handleErrorResponse(e,t.method,n)};return{promise:new Promise(((r,i)=>{var s;this.relayEventManager.callbacks.set(e,(t=>{if(this.ui.hideRequestEthereumAccounts(),t.errorMessage)return i(new Error(t.errorMessage));r(t)}));const o=(null===(s=null===window||void 0===window?void 0:window.navigator)||void 0===s?void 0:s.userAgent)||null;if(o&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(o))window.location.href=`https://go.cb-w.com/xoXnYwQimhb?cb_url=${encodeURIComponent(window.location.href)}`;else{if(this.ui.inlineAccountsResponse()){const t=t=>{this.handleWeb3ResponseMessage((0,x.Web3ResponseMessage)({id:e,response:(0,E.RequestEthereumAccountsResponse)(t)}))};this.ui.requestEthereumAccounts({onCancel:n,onAccounts:t})}else this.ui.requestEthereumAccounts({onCancel:n});S.accountRequestCallbackIds.add(e),this.ui.inlineAccountsResponse()||this.ui.isStandalone()||this.publishWeb3RequestEvent(e,t)}})),cancel:n}}watchAsset(t,e,n,r,i,s){const o={method:_.Web3Method.watchAsset,params:{type:t,options:{address:e,symbol:n,decimals:r,image:i},chainId:s}};let c=null;const a=(0,b.randomBytesHex)(8),u=t=>{this.publishWeb3RequestCanceledEvent(a),this.handleErrorResponse(a,o.method,t),null===c||void 0===c||c()};this.ui.inlineWatchAsset()||(c=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:u,onResetConnection:this.resetAndReload}));return{cancel:u,promise:new Promise(((u,l)=>{this.relayEventManager.callbacks.set(a,(t=>{if(null===c||void 0===c||c(),t.errorMessage)return l(new Error(t.errorMessage));u(t)}));const h=t=>{this.handleWeb3ResponseMessage((0,x.Web3ResponseMessage)({id:a,response:(0,E.WatchAssetReponse)(!1)}))},d=()=>{this.handleWeb3ResponseMessage((0,x.Web3ResponseMessage)({id:a,response:(0,E.WatchAssetReponse)(!0)}))};this.ui.inlineWatchAsset()&&this.ui.watchAsset({onApprove:d,onCancel:h,type:t,address:e,symbol:n,decimals:r,image:i,chainId:s}),this.ui.inlineWatchAsset()||this.ui.isStandalone()||this.publishWeb3RequestEvent(a,o)}))}}addEthereumChain(t,e,n,r,i,s){const o={method:_.Web3Method.addEthereumChain,params:{chainId:t,rpcUrls:e,blockExplorerUrls:r,chainName:i,iconUrls:n,nativeCurrency:s}};let c=null;const a=(0,b.randomBytesHex)(8),u=t=>{this.publishWeb3RequestCanceledEvent(a),this.handleErrorResponse(a,o.method,t),null===c||void 0===c||c()};this.ui.inlineAddEthereumChain(t)||(c=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:u,onResetConnection:this.resetAndReload}));return{promise:new Promise(((e,n)=>{this.relayEventManager.callbacks.set(a,(t=>{if(null===c||void 0===c||c(),t.errorMessage)return n(new Error(t.errorMessage));e(t)}));const r=t=>{this.handleWeb3ResponseMessage((0,x.Web3ResponseMessage)({id:a,response:(0,E.AddEthereumChainResponse)({isApproved:!1,rpcUrl:""})}))},i=t=>{this.handleWeb3ResponseMessage((0,x.Web3ResponseMessage)({id:a,response:(0,E.AddEthereumChainResponse)({isApproved:!0,rpcUrl:t})}))};this.ui.inlineAddEthereumChain(t)&&this.ui.addEthereumChain({onCancel:r,onApprove:i,chainId:o.params.chainId,rpcUrls:o.params.rpcUrls,blockExplorerUrls:o.params.blockExplorerUrls,chainName:o.params.chainName,iconUrls:o.params.iconUrls,nativeCurrency:o.params.nativeCurrency}),this.ui.inlineAddEthereumChain(t)||this.ui.isStandalone()||this.publishWeb3RequestEvent(a,o)})),cancel:u}}switchEthereumChain(t){const e={method:_.Web3Method.switchEthereumChain,params:{chainId:t}};let n=null;const r=(0,b.randomBytesHex)(8),i=t=>{this.publishWeb3RequestCanceledEvent(r),this.handleErrorResponse(r,e.method,t),null===n||void 0===n||n()};this.ui.inlineSwitchEthereumChain()||(n=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:i,onResetConnection:this.resetAndReload}));return{promise:new Promise(((t,i)=>{this.relayEventManager.callbacks.set(r,(e=>(null===n||void 0===n||n(),e.errorMessage&&e.errorCode?i(u.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=>{if("number"===typeof t){const e=t;this.handleWeb3ResponseMessage((0,x.Web3ResponseMessage)({id:r,response:(0,E.ErrorResponse)(_.Web3Method.switchEthereumChain,p.WalletUIError.SwitchEthereumChainUnsupportedChainId.message,e)}))}else t instanceof p.WalletUIError?this.handleErrorResponse(r,_.Web3Method.switchEthereumChain,t,t.errorCode):this.handleWeb3ResponseMessage((0,x.Web3ResponseMessage)({id:r,response:(0,E.SwitchEthereumChainResponse)({isApproved:!1,rpcUrl:""})}))},onApprove:t=>{this.handleWeb3ResponseMessage((0,x.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}}inlineAddEthereumChain(t){return this.ui.inlineAddEthereumChain(t)}getSessionIdHash(){return g.Session.hash(this._session.id)}sendRequestStandalone(t,e){const n=n=>{this.handleErrorResponse(t,e.method,n)},r=e=>{this.handleWeb3ResponseMessage((0,x.Web3ResponseMessage)({id:t,response:e}))};switch(e.method){case _.Web3Method.signEthereumMessage:this.ui.signEthereumMessage({request:e,onSuccess:r,onCancel:n});break;case _.Web3Method.signEthereumTransaction:this.ui.signEthereumTransaction({request:e,onSuccess:r,onCancel:n});break;case _.Web3Method.submitEthereumTransaction:this.ui.submitEthereumTransaction({request:e,onSuccess:r,onCancel:n});break;case _.Web3Method.ethereumAddressFromSignedMessage:this.ui.ethereumAddressFromSignedMessage({request:e,onSuccess:r});break;default:n()}}onSessionConfigChanged(t){}}S.accountRequestCallbackIds=new Set,s([a.default],S.prototype,"resetAndReload",null),s([a.default],S.prototype,"handleIncomingEvent",null),e.WalletSDKRelay=S},1899:function(t,e,n){"use strict";var r;function i(t,e,n){if(!n||typeof n.value!==r.typeOfFunction)throw new TypeError("Only methods can be decorated with @bind. <"+e+"> is not a method!");return{configurable:r.boolTrue,get:function(){var t=n.value.bind(this);return Object.defineProperty(this,e,{value:t,configurable:r.boolTrue,writable:r.boolTrue}),t}}}Object.defineProperty(e,"__esModule",{value:!0}),function(t){t.typeOfFunction="function",t.boolTrue=!0}(r||(r={})),e.bind=i,e.default=i},1900:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WalletSDKConnection=void 0;const r=n(1757),i=n(1781),s=n(1790),o=n(1807),c=n(1901),a=n(1789),u=n(1902),l=n(1903);e.WalletSDKConnection=class{constructor(t,e,n,c){let l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:WebSocket;this.sessionId=t,this.sessionKey=e,this.eventListener=c,this.subscriptions=new r.Subscription,this.destroyed=!1,this.lastHeartbeatResponse=0,this.nextReqId=(0,o.IntNumber)(1),this.connectedSubject=new r.BehaviorSubject(!1),this.linkedSubject=new r.BehaviorSubject(!1),this.sessionConfigSubject=new r.ReplaySubject(1);const h=new u.RxWebSocket(n+"/rpc",l);this.ws=h,this.subscriptions.add(h.connectionState$.pipe((0,i.tap)((e=>{var n;return null===(n=this.eventListener)||void 0===n?void 0:n.onEvent(a.EVENTS.CONNECTED_STATE_CHANGE,{state:e,sessionIdHash:s.Session.hash(t)})})),(0,i.skip)(1),(0,i.filter)((t=>t===u.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===u.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===u.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=>{var n;const r=e;null===(n=this.eventListener)||void 0===n||n.onEvent(a.EVENTS.LINKED,{sessionIdHash:s.Session.hash(t),linked:r.linked,type:e.type,onlineGuests:r.onlineGuests}),this.linkedSubject.next(r.linked||r.onlineGuests>0)}))),this.subscriptions.add(h.incomingJSONData$.pipe((0,i.filter)((t=>["GetSessionConfigOK","SessionConfigUpdated"].includes(t.type)))).subscribe((e=>{var n;const r=e;null===(n=this.eventListener)||void 0===n||n.onEvent(a.EVENTS.SESSION_CONFIG_RECEIVED,{sessionIdHash:s.Session.hash(t),metadata_keys:r&&r.metadata?Object.keys(r.metadata):void 0}),this.sessionConfigSubject.next({webhookId:r.webhookId,webhookUrl:r.webhookUrl,metadata:r.metadata})})))}connect(){var t;if(this.destroyed)throw new Error("instance is destroyed");null===(t=this.eventListener)||void 0===t||t.onEvent(a.EVENTS.STARTED_CONNECTING,{sessionIdHash:s.Session.hash(this.sessionId)}),this.ws.connect().subscribe()}destroy(){var t;this.subscriptions.unsubscribe(),this.ws.disconnect(),null===(t=this.eventListener)||void 0===t||t.onEvent(a.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,c.ClientMessageSetSessionConfig)({id:(0,o.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){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=(0,c.ClientMessagePublishEvent)({id:(0,o.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){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6e4;const n=t.id;try{this.sendData(t)}catch(s){return(0,r.throwError)(s)}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,c.ClientMessageHostSession)({id:(0,o.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,c.ClientMessageIsLinked)({id:(0,o.IntNumber)(this.nextReqId++),sessionId:this.sessionId});this.sendData(t)}sendGetSessionConfig(){const t=(0,c.ClientMessageGetSessionConfig)({id:(0,o.IntNumber)(this.nextReqId++),sessionId:this.sessionId});this.sendData(t)}}},1901:function(t,e,n){"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)}},1902:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RxWebSocket=e.ConnectionState=void 0;const r=n(1757),i=n(1781);var s;!function(t){t[t.DISCONNECTED=0]="DISCONNECTED",t[t.CONNECTING=1]="CONNECTING",t[t.CONNECTED=2]="CONNECTED"}(s=e.ConnectionState||(e.ConnectionState={}));e.RxWebSocket=class{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:WebSocket;this.WebSocketClass=e,this.webSocket=null,this.connectionStateSubject=new r.BehaviorSubject(s.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(n){return void t.error(n)}this.connectionStateSubject.next(s.CONNECTING),e.onclose=e=>{this.clearWebSocket(),t.error(new Error(`websocket error ${e.code}: ${e.reason}`)),this.connectionStateSubject.next(s.DISCONNECTED)},e.onopen=e=>{t.next(),t.complete(),this.connectionStateSubject.next(s.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(s.DISCONNECTED);try{t.close()}catch(e){}}}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(n){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)}}},1903:function(t,e,n){"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}},1904:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WalletUIError=void 0;class r extends Error{constructor(t,e){super(t),this.message=t,this.errorCode=e}}e.WalletUIError=r,r.UserRejectedRequest=new r("User rejected request"),r.SwitchEthereumChainUnsupportedChainId=new r("Unsupported chainId",4902)},1905:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decrypt=e.encrypt=void 0;const r=n(1757),i=n(1745);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"]),s=new TextEncoder,o=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:n},r,s.encode(t)),c=o.slice(o.byteLength-16),a=o.slice(0,o.byteLength-16),u=new Uint8Array(c),l=new Uint8Array(a),h=new Uint8Array([...n,...u,...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"]),s=(0,i.hexStringToUint8Array)(t),o=s.slice(0,12),c=s.slice(12,28),a=s.slice(28),u=new Uint8Array([...a,...c]),l={name:"AES-GCM",iv:new Uint8Array(o)};try{const t=await window.crypto.subtle.decrypt(l,r,u),e=new TextDecoder;n.next(e.decode(t)),n.complete()}catch(h){n.error(h)}}()}))}},1906:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Web3RequestCanceledMessage=void 0;const r=n(1813);e.Web3RequestCanceledMessage=function(t){return{type:r.RelayMessageType.WEB3_REQUEST_CANCELED,id:t}}},1907:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Web3RequestMessage=void 0;const r=n(1813);e.Web3RequestMessage=function(t){return Object.assign({type:r.RelayMessageType.WEB3_REQUEST},t)}},1908:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EthereumAddressFromSignedMessageResponse=e.SubmitEthereumTransactionResponse=e.SignEthereumTransactionResponse=e.SignEthereumMessageResponse=e.isRequestEthereumAccountsResponse=e.WatchAssetReponse=e.RequestEthereumAccountsResponse=e.SwitchEthereumChainResponse=e.AddEthereumChainResponse=e.ErrorResponse=void 0;const r=n(1836);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.WatchAssetReponse=function(t){return{method:r.Web3Method.watchAsset,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}}},1909:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isWeb3ResponseMessage=e.Web3ResponseMessage=void 0;const r=n(1813);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}},1910:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WalletSDKRelayEventManager=void 0;const r=n(1745);e.WalletSDKRelayEventManager=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}}},1911:function(t){t.exports=JSON.parse('{"name":"@coinbase/wallet-sdk","version":"3.1.0","description":"Coinbase Wallet JavaScript SDK","keywords":["cipher","cipherbrowser","coinbase","coinbasewallet","eth","ether","ethereum","etherium","injection","toshi","wallet","walletlink","web3"],"main":"dist/index.js","types":"dist/index.d.ts","repository":"https://github.com/coinbase/coinbase-wallet-sdk.git","author":"Coinbase, Inc.","license":"Apache-2.0","scripts":{"pretest:unit":"node compile-assets.js","test:unit":"jest","test:unit:coverage":"yarn test:unit && open coverage/lcov-report/index.html","test:karma":"yarn build-npm && karma start","prebuild":"node -p \\"\'export const LIB_VERSION = \' + JSON.stringify(require(\'./package.json\').version) + \';\'\\" > src/version.ts","build":"node compile-assets.js && webpack --config webpack.config.js","build-npm":"tsc -p ./tsconfig.build.json","build:dev":"export LINK_API_URL=\'http://localhost:3000\'; yarn build","build:dev:watch":"nodemon -e \'ts,tsx,js,json,css,scss,svg\' --ignore \'src/**/*-css.ts\' --ignore \'src/**/*-svg.ts\' --watch src/ --exec \'yarn build:dev\'","build:prod":"yarn prebuild && yarn build && yarn build-npm && cp ./package.json ./README.md ./LICENSE build/npm && cp -a src/vendor-js build/npm/dist && sed -i.bak \'s| \\"private\\": true,||g\' build/npm/package.json && rm -f build/npm/package.json.bak","lint:types":"tsc --noEmit","lint:prettier":"prettier --check \\"{src,__tests__}/**/*.(js|ts|tsx)\\"","lint:eslint":"eslint ./src --ext .ts,.tsx","fix:eslint":"yarn lint:eslint --fix","fix:prettier":"prettier . --write","release":"./scripts/release.sh"},"dependencies":{"@metamask/safe-event-emitter":"2.0.0","bind-decorator":"^1.0.11","bn.js":"^5.1.1","clsx":"^1.1.0","eth-block-tracker":"4.4.3","eth-json-rpc-filters":"4.2.2","eth-rpc-errors":"4.0.2","js-sha256":"0.9.0","json-rpc-engine":"6.1.0","keccak":"^3.0.1","preact":"^10.5.9","qs":"^6.10.3","rxjs":"^6.6.3","stream-browserify":"^3.0.0"},"devDependencies":{"@babel/core":"^7.17.9","@babel/plugin-proposal-decorators":"^7.17.9","@babel/plugin-transform-react-jsx":"^7.17.3","@babel/preset-env":"^7.16.11","@babel/preset-typescript":"^7.16.7","@peculiar/webcrypto":"^1.3.3","@testing-library/jest-dom":"^5.16.4","@testing-library/preact":"^2.0.1","@types/bn.js":"^4.11.6","@types/jest":"^27.4.1","@types/node":"^14.14.20","@types/qs":"^6.9.7","@typescript-eslint/eslint-plugin":"^5.7.0","@typescript-eslint/eslint-plugin-tslint":"^5.7.0","@typescript-eslint/parser":"^5.7.0","babel-jest":"^27.5.1","browserify":"17.0.0","copy-webpack-plugin":"^6.4.1","core-js":"^3.8.2","eslint":"^8.4.1","eslint-config-prettier":"^8.3.0","eslint-plugin-import":"^2.25.3","eslint-plugin-preact":"^0.1.0","eslint-plugin-prettier":"^4.0.0","eslint-plugin-simple-import-sort":"^7.0.0","jasmine":"3.8.0","jest":"^27.5.1","jest-chrome":"^0.7.2","karma":"^6.3.15","karma-browserify":"8.1.0","karma-chrome-launcher":"^3.1.0","karma-jasmine":"^4.0.1","nodemon":"^2.0.6","prettier":"^2.5.1","raw-loader":"^4.0.2","regenerator-runtime":"^0.13.7","sass":"^1.50.0","svgo":"^2.8.0","ts-jest":"^27.1.4","ts-loader":"^8.0.13","ts-node":"^10.7.0","tslib":"^2.0.3","typescript":"^4.1.3","watchify":"4.0.0","webpack":"^5.72.0","webpack-cli":"^4.9.2","whatwg-fetch":"^3.5.0"},"engines":{"node":">= 10.0.0"},"_resolved":"https://registry.npmjs.org/@coinbase/wallet-sdk/-/wallet-sdk-3.1.0.tgz","_integrity":"sha512-8IGfVklv/CMfCT4qd9KfL0IwlINsIgSlW1oQB/or8uSY9wAqoY8lIoQVpOyFx7YDK094Xfd9alhulZtRZNJBjw==","_from":"@coinbase/wallet-sdk@3.1.0"}')},1937:function(t,e,n){"use strict";n.r(e),n.d(e,"Mutex",(function(){return o})),n.d(e,"Semaphore",(function(){return s})),n.d(e,"withTimeout",(function(){return c}));function r(t,e,n,r){return new(n||(n=Promise))((function(i,s){function o(t){try{a(r.next(t))}catch(e){s(e)}}function c(t){try{a(r.throw(t))}catch(e){s(e)}}function a(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,c)}a((r=r.apply(t,e||[])).next())}))}function i(t,e){var n,r,i,s,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:c(0),throw:c(1),return:c(2)},"function"===typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function c(c){return function(a){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,c[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&c[0]?r.return:c[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,c[1])).done)return i;switch(r=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,r=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===c[0]||2===c[0])){o=0;continue}if(3===c[0]&&(!i||c[1]>i[0]&&c[1]<i[3])){o.label=c[1];break}if(6===c[0]&&o.label<i[1]){o.label=i[1],i=c;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(c);break}i[2]&&o.ops.pop(),o.trys.pop();continue}c=e.call(t,o)}catch(a){c=[6,a],r=0}finally{n=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,a])}}}Object.create;Object.create;var s=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(this,void 0,void 0,(function(){var e,n,r;return i(this,(function(i){switch(i.label){case 0:return[4,this.acquire()];case 1:e=i.sent(),n=e[0],r=e[1],i.label=2;case 2:return i.trys.push([2,,4,5]),[4,t(n)];case 3:return[2,i.sent()];case 4:return r(),[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}(),o=function(){function t(){this._semaphore=new s(1)}return t.prototype.acquire=function(){return r(this,void 0,void 0,(function(){var t;return i(this,(function(e){switch(e.label){case 0:return[4,this._semaphore.acquire()];case 1:return t=e.sent(),[2,t[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}();function c(t,e,n){var s=this;return void 0===n&&(n=new Error("timeout")),{acquire:function(){return new Promise((function(o,c){return r(s,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=!1,setTimeout((function(){r=!0,c(n)}),e),[4,t.acquire()];case 1:return s=i.sent(),r?(Array.isArray(s)?s[1]:s)():o(s),[2]}}))}))}))},runExclusive:function(t){return r(this,void 0,void 0,(function(){var e,n;return i(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()}}}}}]);
|
|
3
|
-
//# sourceMappingURL=3.
|
|
1
|
+
/*! For license information please see 3.7eb2ed93.chunk.js.LICENSE.txt */
|
|
2
|
+
(this["webpackJsonp@dcl/explorer-website"]=this["webpackJsonp@dcl/explorer-website"]||[]).push([[3],{1713:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CoinbaseWalletProvider=e.CoinbaseWalletSDK=void 0;const r=n(1817),i=n(1785);var s=n(1817);Object.defineProperty(e,"CoinbaseWalletSDK",{enumerable:!0,get:function(){return s.CoinbaseWalletSDK}});var o=n(1785);Object.defineProperty(e,"CoinbaseWalletProvider",{enumerable:!0,get:function(){return o.CoinbaseWalletProvider}}),e.default=r.CoinbaseWalletSDK,"undefined"!==typeof window&&(window.CoinbaseWalletSDK=r.CoinbaseWalletSDK,window.CoinbaseWalletProvider=i.CoinbaseWalletProvider,window.WalletLink=r.CoinbaseWalletSDK,window.WalletLinkProvider=i.CoinbaseWalletProvider)},1732:function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var r=n(121),i=n(1759),s=n(1820),o=n(1735),c=n(1792),a=n(1758),u=n(1791),l=function(t){function e(n,r,i){var o=t.call(this)||this;switch(o.syncErrorValue=null,o.syncErrorThrown=!1,o.syncErrorThrowable=!1,o.isStopped=!1,arguments.length){case 0:o.destination=s.a;break;case 1:if(!n){o.destination=s.a;break}if("object"===typeof n){n instanceof e?(o.syncErrorThrowable=n.syncErrorThrowable,o.destination=n,n.add(o)):(o.syncErrorThrowable=!0,o.destination=new h(o,n));break}default:o.syncErrorThrowable=!0,o.destination=new h(o,n,r,i)}return o}return r.__extends(e,t),e.prototype[c.a]=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}(o.a),h=function(t){function e(e,n,r,o){var c,a=t.call(this)||this;a._parentSubscriber=e;var u=a;return Object(i.a)(n)?c=n:n&&(c=n.next,r=n.error,o=n.complete,n!==s.a&&(u=Object.create(n),Object(i.a)(u.unsubscribe)&&a.add(u.unsubscribe.bind(u)),u.unsubscribe=a.unsubscribe.bind(a))),a._context=u,a._next=c,a._error=r,a._complete=o,a}return r.__extends(e,t),e.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;a.a.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=a.a.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):Object(u.a)(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;Object(u.a)(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)};a.a.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(n){if(this.unsubscribe(),a.a.useDeprecatedSynchronousErrorHandling)throw n;Object(u.a)(n)}},e.prototype.__tryOrSetError=function(t,e,n){if(!a.a.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(r){return a.a.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=r,t.syncErrorThrown=!0,!0):(Object(u.a)(r),!0)}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(l)},1733:function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var r=n(1795),i=n(1732),s=n(1792),o=n(1820);var c=n(1746),a=n(1770),u=n(1758),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,c=function(t,e,n){if(t){if(t instanceof i.a)return t;if(t[s.a])return t[s.a]()}return t||e||n?new i.a(t,e,n):new i.a(o.a)}(t,e,n);if(r?c.add(r.call(c,this.source)):c.add(this.source||u.a.useDeprecatedSynchronousErrorHandling&&!c.syncErrorThrowable?this._subscribe(c):this._trySubscribe(c)),u.a.useDeprecatedSynchronousErrorHandling&&c.syncErrorThrowable&&(c.syncErrorThrowable=!1,c.syncErrorThrown))throw c.syncErrorValue;return c},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){u.a.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),Object(r.a)(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(n){r(n),i&&i.unsubscribe()}}),r,e)}))},t.prototype._subscribe=function(t){var e=this.source;return e&&e.subscribe(t)},t.prototype[c.a]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?this:Object(a.b)(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=h(t))((function(t,n){var r;e.subscribe((function(t){return r=t}),(function(t){return n(t)}),(function(){return t(r)}))}))},t.create=function(e){return new t(e)},t}();function h(t){if(t||(t=u.a.Promise||Promise),!t)throw new Error("no Promise impl found");return t}},1734:function(t,e,n){"use strict";n.d(e,"a",(function(){return c})),n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return u}));var r=n(121),i=n(1732),s=n(1733),o=n(1783),c=function(t){function e(e){var n=t.call(this)||this;return n.parent=e,n}return r.__extends(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.a),a=(i.a,function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(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.a));i.a;function u(t,e){if(!e.closed){if(t instanceof s.a)return t.subscribe(e);var n;try{n=Object(o.a)(t)(e)}catch(r){e.error(r)}return n}}},1735:function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var r=n(1738),i=n(1794),s=n(1759),o=n(1793),c=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,c=n._parentOrParents,u=n._ctorUnsubscribe,l=n._unsubscribe,h=n._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,c instanceof t)c.remove(this);else if(null!==c)for(var d=0;d<c.length;++d){c[d].remove(this)}if(Object(s.a)(l)){u&&(this._unsubscribe=void 0);try{l.call(this)}catch(b){e=b instanceof o.a?a(b.errors):[b]}}if(Object(r.a)(h)){d=-1;for(var f=h.length;++d<f;){var p=h[d];if(Object(i.a)(p))try{p.unsubscribe()}catch(b){e=e||[],b instanceof o.a?e=e.concat(a(b.errors)):e.push(b)}}}if(e)throw new o.a(e)}},t.prototype.add=function(e){var n=e;if(!e)return t.EMPTY;switch(typeof e){case"function":n=new t(e);case"object":if(n===this||n.closed||"function"!==typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!(n instanceof t)){var r=n;(n=new t)._subscriptions=[r]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}var i=n._parentOrParents;if(null===i)n._parentOrParents=this;else if(i instanceof t){if(i===this)return n;n._parentOrParents=[i,this]}else{if(-1!==i.indexOf(this))return n;i.push(this)}var s=this._subscriptions;return null===s?this._subscriptions=[n]:s.push(n),n},t.prototype.remove=function(t){var e=this._subscriptions;if(e){var n=e.indexOf(t);-1!==n&&e.splice(n,1)}},t.EMPTY=((e=new t).closed=!0,e),t}();function a(t){return t.reduce((function(t,e){return t.concat(e instanceof o.a?e.errors:e)}),[])}},1736:function(t,e,n){"use strict";n.d(e,"b",(function(){return l})),n.d(e,"a",(function(){return h}));var r=n(121),i=n(1733),s=n(1732),o=n(1735),c=n(1760),a=n(1821),u=n(1792),l=function(t){function e(e){var n=t.call(this,e)||this;return n.destination=e,n}return r.__extends(e,t),e}(s.a),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.__extends(e,t),e.prototype[u.a]=function(){return new l(this)},e.prototype.lift=function(t){var e=new d(this,this);return e.operator=t,e},e.prototype.next=function(t){if(this.closed)throw new c.a;if(!this.isStopped)for(var e=this.observers,n=e.length,r=e.slice(),i=0;i<n;i++)r[i].next(t)},e.prototype.error=function(t){if(this.closed)throw new c.a;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var e=this.observers,n=e.length,r=e.slice(),i=0;i<n;i++)r[i].error(t);this.observers.length=0},e.prototype.complete=function(){if(this.closed)throw new c.a;this.isStopped=!0;for(var t=this.observers,e=t.length,n=t.slice(),r=0;r<e;r++)n[r].complete();this.observers.length=0},e.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},e.prototype._trySubscribe=function(e){if(this.closed)throw new c.a;return t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){if(this.closed)throw new c.a;return this.hasError?(t.error(this.thrownError),o.a.EMPTY):this.isStopped?(t.complete(),o.a.EMPTY):(this.observers.push(t),new a.a(this,t))},e.prototype.asObservable=function(){var t=new i.a;return t.source=this,t},e.create=function(t,e){return new d(t,e)},e}(i.a),d=function(t){function e(e,n){var r=t.call(this)||this;return r.destination=e,r.source=n,r}return r.__extends(e,t),e.prototype.next=function(t){var e=this.destination;e&&e.next&&e.next(t)},e.prototype.error=function(t){var e=this.destination;e&&e.error&&this.destination.error(t)},e.prototype.complete=function(){var t=this.destination;t&&t.complete&&this.destination.complete()},e.prototype._subscribe=function(t){return this.source?this.source.subscribe(t):o.a.EMPTY},e}(h)},1737:function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return s}));var r=n(1768),i=new(n(1763).a)(r.a),s=i},1738:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function(){return Array.isArray||function(t){return t&&"number"===typeof t.length}}()},1739:function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(121),i=n(1732);function s(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 o(t,e))}}var o=function(){function t(t,e){this.project=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new c(t,this.project,this.thisArg))},t}(),c=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.__extends(e,t),e.prototype._next=function(t){var e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(n){return void this.destination.error(n)}this.destination.next(e)},e}(i.a)},1740:function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return s}));var r=n(1733),i=new r.a((function(t){return t.complete()}));function s(t){return t?function(t){return new r.a((function(e){return t.schedule((function(){return e.complete()}))}))}(t):i}},1741:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(1733),i=n(1783),s=n(1815);function o(t,e){return e?Object(s.a)(t,e):t instanceof r.a?t:new r.a(Object(i.a)(t))}},1743:function(t,e,n){"use strict";function r(t){return t&&"function"===typeof t.schedule}n.d(e,"a",(function(){return r}))},1744:function(t,e,n){"use strict";function r(t){return t}n.d(e,"a",(function(){return r}))},1745:function(t,e,n){"use strict";(function(t){var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.createQrUrl=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 i=r(n(21)),s=n(1845),o=n(1807),c=/^[0-9]*$/,a=/^[a-f0-9]*$/;function u(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 d(t){return l(t)?"0x"+t.slice(2):"0x"+t}function f(t){if("string"!==typeof t)return!1;const e=h(t).toLowerCase();return a.test(e)}function p(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("string"===typeof t){const n=h(t).toLowerCase();if(a.test(n))return(0,o.HexString)(e?"0x"+n:n)}throw new Error(`"${String(t)}" is not a hexadecimal string`)}function b(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=p(t,!1);return n.length%2===1&&(n=(0,o.HexString)("0"+n)),e?(0,o.HexString)("0x"+n):n}function y(t){if("number"===typeof t&&Number.isInteger(t))return(0,o.IntNumber)(t);if("string"===typeof t){if(c.test(t))return(0,o.IntNumber)(Number(t));if(f(t))return(0,o.IntNumber)(new i.default(b(t,!1),16).toNumber())}throw new Error(`Not an integer: ${String(t)}`)}function g(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 u(crypto.getRandomValues(new Uint8Array(t)))},e.uint8ArrayToHex=u,e.hexStringToUint8Array=function(t){return new Uint8Array(t.match(/.{1,2}/g).map((t=>parseInt(t,16))))},e.hexStringFromBuffer=function(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=t.toString("hex");return(0,o.HexString)(e?"0x"+n:n)},e.bigIntStringFromBN=function(t){return(0,o.BigIntString)(t.toString(10))},e.intNumberFromHexString=function(t){return(0,o.IntNumber)(new i.default(b(t,!1),16).toNumber())},e.hexStringFromIntNumber=function(t){return(0,o.HexString)("0x"+new i.default(t).toString(16))},e.has0xPrefix=l,e.strip0x=h,e.prepend0x=d,e.isHexString=f,e.ensureHexString=p,e.ensureEvenLengthHexString=b,e.ensureAddressString=function(t){if("string"===typeof t){const e=h(t).toLowerCase();if(f(e)&&40===e.length)return(0,o.AddressString)(d(e))}throw new Error(`Invalid Ethereum address: ${String(t)}`)},e.ensureBuffer=function(e){if(t.isBuffer(e))return e;if("string"===typeof e){if(f(e)){const n=b(e,!1);return t.from(n,"hex")}return t.from(e,"utf8")}throw new Error(`Not binary data: ${String(e)}`)},e.ensureIntNumber=y,e.ensureRegExpString=function(t){if(t instanceof RegExp)return(0,o.RegExpString)(t.toString());throw new Error(`Not a RegExp: ${String(t)}`)},e.ensureBN=function(t){if(null!==t&&(i.default.isBN(t)||g(t)))return new i.default(t.toString(10),10);if("number"===typeof t)return new i.default(y(t));if("string"===typeof t){if(c.test(t))return new i.default(t,10);if(f(t))return new i.default(b(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=g,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}`},e.createQrUrl=function(t,e,n,r){const i=r?"parent-id":"id";return`${n}/#/link?${(0,s.stringify)({[i]:t,secret:e,server:n,v:"1"})}`}}).call(this,n(60).Buffer)},1746:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function(){return"function"===typeof Symbol&&Symbol.observable||"@@observable"}()},1747:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(121),i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(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(1732).a)},1748:function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(121),i=n(1732);function s(t,e){return function(n){return n.lift(new o(t,e))}}var o=function(){function t(t,e){this.predicate=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new c(t,this.predicate,this.thisArg))},t}(),c=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.__extends(e,t),e.prototype._next=function(t){var e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(n){return void this.destination.error(n)}e&&this.destination.next(t)},e}(i.a)},1751:function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var r=n(121),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.__extends(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(1732).a),s=n(1783),o=n(1733);function c(t,e,n,r,c){if(void 0===c&&(c=new i(t,n,r)),!c.closed)return e instanceof o.a?e.subscribe(c):Object(s.a)(e)(c)}},1752:function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return c}));var r,i=n(1740),s=n(1761),o=n(1774);r||(r={});var c=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 Object(s.a)(this.value);case"E":return Object(o.a)(this.error);case"C":return Object(i.b)()}throw new Error("unexpected notification kind value")},t.createNext=function(e){return"undefined"!==typeof 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}()},1753:function(t,e,n){"use strict";n.d(e,"a",(function(){return 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}()},1754:function(t,e,n){"use strict";n.d(e,"a",(function(){return 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}()},1755:function(t,e,n){"use strict";n.d(e,"b",(function(){return c})),n.d(e,"a",(function(){return l}));var r=n(121),i=n(1739),s=n(1741),o=n(1734);function c(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"===typeof e?function(r){return r.pipe(c((function(n,r){return Object(s.a)(t(n,r)).pipe(Object(i.a)((function(t,i){return e(n,t,r,i)})))}),n))}:("number"===typeof e&&(n=e),function(e){return e.lift(new a(t,n))})}var a=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 u(t,this.project,this.concurrent))},t}(),u=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.__extends(e,t),e.prototype._next=function(t){this.active<this.concurrent?this._tryNext(t):this.buffer.push(t)},e.prototype._tryNext=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(r){return void this.destination.error(r)}this.active++,this._innerSub(e)},e.prototype._innerSub=function(t){var e=new o.a(this),n=this.destination;n.add(e);var r=Object(o.c)(t,e);r!==e&&n.add(r)},e.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()},e.prototype.notifyNext=function(t){this.destination.next(t)},e.prototype.notifyComplete=function(){var t=this.buffer;this.active--,t.length>0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},e}(o.b),l=c},1756:function(t,e,n){"use strict";n.r(e),n.d(e,"Component",(function(){return _})),n.d(e,"Fragment",(function(){return m})),n.d(e,"cloneElement",(function(){return F})),n.d(e,"createContext",(function(){return U})),n.d(e,"createElement",(function(){return b})),n.d(e,"createRef",(function(){return g})),n.d(e,"h",(function(){return b})),n.d(e,"hydrate",(function(){return H})),n.d(e,"isValidElement",(function(){return o})),n.d(e,"options",(function(){return i})),n.d(e,"render",(function(){return B})),n.d(e,"toChildArray",(function(){return C}));var r,i,s,o,c,a,u,l={},h=[],d=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function f(t,e){for(var n in e)t[n]=e[n];return t}function p(t){var e=t.parentNode;e&&e.removeChild(t)}function b(t,e,n){var i,s,o,c={};for(o in e)"key"==o?i=e[o]:"ref"==o?s=e[o]:c[o]=e[o];if(arguments.length>2&&(c.children=arguments.length>3?r.call(arguments,2):n),"function"==typeof t&&null!=t.defaultProps)for(o in t.defaultProps)void 0===c[o]&&(c[o]=t.defaultProps[o]);return y(t,c,i,s,null)}function y(t,e,n,r,o){var c={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==o?++s:o};return null==o&&null!=i.vnode&&i.vnode(c),c}function g(){return{current:null}}function m(t){return t.children}function _(t,e){this.props=t,this.context=e}function v(t,e){if(null==e)return t.__?v(t.__,t.__.__k.indexOf(t)+1):null;for(var n;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e)return n.__e;return"function"==typeof t.type?v(t):null}function w(t){var e,n;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e){t.__e=t.__c.base=n.__e;break}return w(t)}}function E(t){(!t.__d&&(t.__d=!0)&&c.push(t)&&!x.__r++||a!==i.debounceRendering)&&((a=i.debounceRendering)||setTimeout)(x)}function x(){for(var t;x.__r=c.length;)t=c.sort((function(t,e){return t.__v.__b-e.__v.__b})),c=[],t.some((function(t){var e,n,r,i,s,o;t.__d&&(s=(i=(e=t).__v).__e,(o=e.__P)&&(n=[],(r=f({},i)).__v=i.__v+1,j(o,i,r,e.__n,void 0!==o.ownerSVGElement,null!=i.__h?[s]:null,n,null==s?v(i):s,i.__h),N(n,i),i.__e!=s&&w(i)))}))}function S(t,e,n,r,i,s,o,c,a,u){var d,f,p,b,g,_,w,E=r&&r.__k||h,x=E.length;for(n.__k=[],d=0;d<e.length;d++)if(null!=(b=n.__k[d]=null==(b=e[d])||"boolean"==typeof b?null:"string"==typeof b||"number"==typeof b||"bigint"==typeof b?y(null,b,null,null,b):Array.isArray(b)?y(m,{children:b},null,null,null):b.__b>0?y(b.type,b.props,b.key,b.ref?b.ref:null,b.__v):b)){if(b.__=n,b.__b=n.__b+1,null===(p=E[d])||p&&b.key==p.key&&b.type===p.type)E[d]=void 0;else for(f=0;f<x;f++){if((p=E[f])&&b.key==p.key&&b.type===p.type){E[f]=void 0;break}p=null}j(t,b,p=p||l,i,s,o,c,a,u),g=b.__e,(f=b.ref)&&p.ref!=f&&(w||(w=[]),p.ref&&w.push(p.ref,null,b),w.push(f,b.__c||g,b)),null!=g?(null==_&&(_=g),"function"==typeof b.type&&b.__k===p.__k?b.__d=a=k(b,a,t):a=I(t,b,p,E,g,a),"function"==typeof n.type&&(n.__d=a)):a&&p.__e==a&&a.parentNode!=t&&(a=v(p))}for(n.__e=_,d=x;d--;)null!=E[d]&&L(E[d],E[d]);if(w)for(d=0;d<w.length;d++)P(w[d],w[++d],w[++d])}function k(t,e,n){for(var r,i=t.__k,s=0;i&&s<i.length;s++)(r=i[s])&&(r.__=t,e="function"==typeof r.type?k(r,e,n):I(n,r,r,i,r.__e,e));return e}function C(t,e){return e=e||[],null==t||"boolean"==typeof t||(Array.isArray(t)?t.some((function(t){C(t,e)})):e.push(t)),e}function I(t,e,n,r,i,s){var o,c,a;if(void 0!==e.__d)o=e.__d,e.__d=void 0;else if(null==n||i!=s||null==i.parentNode)t:if(null==s||s.parentNode!==t)t.appendChild(i),o=null;else{for(c=s,a=0;(c=c.nextSibling)&&a<r.length;a+=1)if(c==i)break t;t.insertBefore(i,s),o=s}return void 0!==o?o:i.nextSibling}function A(t,e,n){"-"===e[0]?t.setProperty(e,n):t[e]=null==n?"":"number"!=typeof n||d.test(e)?n:n+"px"}function O(t,e,n,r,i){var s;t:if("style"===e)if("string"==typeof n)t.style.cssText=n;else{if("string"==typeof r&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||A(t.style,e,"");if(n)for(e in n)r&&n[e]===r[e]||A(t.style,e,n[e])}else if("o"===e[0]&&"n"===e[1])s=e!==(e=e.replace(/Capture$/,"")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+s]=n,n?r||t.addEventListener(e,s?R:M,s):t.removeEventListener(e,s?R:M,s);else if("dangerouslySetInnerHTML"!==e){if(i)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("href"!==e&&"list"!==e&&"form"!==e&&"tabIndex"!==e&&"download"!==e&&e in t)try{t[e]=null==n?"":n;break t}catch(t){}"function"==typeof n||(null==n||!1===n&&-1==e.indexOf("-")?t.removeAttribute(e):t.setAttribute(e,n))}}function M(t){this.l[t.type+!1](i.event?i.event(t):t)}function R(t){this.l[t.type+!0](i.event?i.event(t):t)}function j(t,e,n,r,s,o,c,a,u){var l,h,d,p,b,y,g,v,w,E,x,k,C,I,A,O=e.type;if(void 0!==e.constructor)return null;null!=n.__h&&(u=n.__h,a=e.__e=n.__e,e.__h=null,o=[a]),(l=i.__b)&&l(e);try{t:if("function"==typeof O){if(v=e.props,w=(l=O.contextType)&&r[l.__c],E=l?w?w.props.value:l.__:r,n.__c?g=(h=e.__c=n.__c).__=h.__E:("prototype"in O&&O.prototype.render?e.__c=h=new O(v,E):(e.__c=h=new _(v,E),h.constructor=O,h.render=D),w&&w.sub(h),h.props=v,h.state||(h.state={}),h.context=E,h.__n=r,d=h.__d=!0,h.__h=[],h._sb=[]),null==h.__s&&(h.__s=h.state),null!=O.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=f({},h.__s)),f(h.__s,O.getDerivedStateFromProps(v,h.__s))),p=h.props,b=h.state,d)null==O.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(null==O.getDerivedStateFromProps&&v!==p&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(v,E),!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(v,h.__s,E)||e.__v===n.__v){for(h.props=v,h.state=h.__s,e.__v!==n.__v&&(h.__d=!1),h.__v=e,e.__e=n.__e,e.__k=n.__k,e.__k.forEach((function(t){t&&(t.__=e)})),x=0;x<h._sb.length;x++)h.__h.push(h._sb[x]);h._sb=[],h.__h.length&&c.push(h);break t}null!=h.componentWillUpdate&&h.componentWillUpdate(v,h.__s,E),null!=h.componentDidUpdate&&h.__h.push((function(){h.componentDidUpdate(p,b,y)}))}if(h.context=E,h.props=v,h.__v=e,h.__P=t,k=i.__r,C=0,"prototype"in O&&O.prototype.render){for(h.state=h.__s,h.__d=!1,k&&k(e),l=h.render(h.props,h.state,h.context),I=0;I<h._sb.length;I++)h.__h.push(h._sb[I]);h._sb=[]}else do{h.__d=!1,k&&k(e),l=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++C<25);h.state=h.__s,null!=h.getChildContext&&(r=f(f({},r),h.getChildContext())),d||null==h.getSnapshotBeforeUpdate||(y=h.getSnapshotBeforeUpdate(p,b)),A=null!=l&&l.type===m&&null==l.key?l.props.children:l,S(t,Array.isArray(A)?A:[A],e,n,r,s,o,c,a,u),h.base=e.__e,e.__h=null,h.__h.length&&c.push(h),g&&(h.__E=h.__=null),h.__e=!1}else null==o&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=T(n.__e,e,n,r,s,o,c,u);(l=i.diffed)&&l(e)}catch(t){e.__v=null,(u||null!=o)&&(e.__e=a,e.__h=!!u,o[o.indexOf(a)]=null),i.__e(t,e,n)}}function N(t,e){i.__c&&i.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e)}))}catch(t){i.__e(t,e.__v)}}))}function T(t,e,n,i,s,o,c,a){var u,h,d,f=n.props,b=e.props,y=e.type,g=0;if("svg"===y&&(s=!0),null!=o)for(;g<o.length;g++)if((u=o[g])&&"setAttribute"in u==!!y&&(y?u.localName===y:3===u.nodeType)){t=u,o[g]=null;break}if(null==t){if(null===y)return document.createTextNode(b);t=s?document.createElementNS("http://www.w3.org/2000/svg",y):document.createElement(y,b.is&&b),o=null,a=!1}if(null===y)f===b||a&&t.data===b||(t.data=b);else{if(o=o&&r.call(t.childNodes),h=(f=n.props||l).dangerouslySetInnerHTML,d=b.dangerouslySetInnerHTML,!a){if(null!=o)for(f={},g=0;g<t.attributes.length;g++)f[t.attributes[g].name]=t.attributes[g].value;(d||h)&&(d&&(h&&d.__html==h.__html||d.__html===t.innerHTML)||(t.innerHTML=d&&d.__html||""))}if(function(t,e,n,r,i){var s;for(s in n)"children"===s||"key"===s||s in e||O(t,s,null,n[s],r);for(s in e)i&&"function"!=typeof e[s]||"children"===s||"key"===s||"value"===s||"checked"===s||n[s]===e[s]||O(t,s,e[s],n[s],r)}(t,b,f,s,a),d)e.__k=[];else if(g=e.props.children,S(t,Array.isArray(g)?g:[g],e,n,i,s&&"foreignObject"!==y,o,c,o?o[0]:n.__k&&v(n,0),a),null!=o)for(g=o.length;g--;)null!=o[g]&&p(o[g]);a||("value"in b&&void 0!==(g=b.value)&&(g!==t.value||"progress"===y&&!g||"option"===y&&g!==f.value)&&O(t,"value",g,f.value,!1),"checked"in b&&void 0!==(g=b.checked)&&g!==t.checked&&O(t,"checked",g,f.checked,!1))}return t}function P(t,e,n){try{"function"==typeof t?t(e):t.current=e}catch(t){i.__e(t,n)}}function L(t,e,n){var r,s;if(i.unmount&&i.unmount(t),(r=t.ref)&&(r.current&&r.current!==t.__e||P(r,null,e)),null!=(r=t.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(t){i.__e(t,e)}r.base=r.__P=null,t.__c=void 0}if(r=t.__k)for(s=0;s<r.length;s++)r[s]&&L(r[s],e,n||"function"!=typeof t.type);n||null==t.__e||p(t.__e),t.__=t.__e=t.__d=void 0}function D(t,e,n){return this.constructor(t,n)}function B(t,e,n){var s,o,c;i.__&&i.__(t,e),o=(s="function"==typeof n)?null:n&&n.__k||e.__k,c=[],j(e,t=(!s&&n||e).__k=b(m,null,[t]),o||l,l,void 0!==e.ownerSVGElement,!s&&n?[n]:o?null:e.firstChild?r.call(e.childNodes):null,c,!s&&n?n:o?o.__e:e.firstChild,s),N(c,t)}function H(t,e){B(t,e,H)}function F(t,e,n){var i,s,o,c=f({},t.props);for(o in e)"key"==o?i=e[o]:"ref"==o?s=e[o]:c[o]=e[o];return arguments.length>2&&(c.children=arguments.length>3?r.call(arguments,2):n),y(t.type,c,i||t.key,s||t.ref,null)}function U(t,e){var n={__c:e="__cC"+u++,__: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(E)},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=h.slice,i={__e:function(t,e,n,r){for(var i,s,o;e=e.__;)if((i=e.__c)&&!i.__)try{if((s=i.constructor)&&null!=s.getDerivedStateFromError&&(i.setState(s.getDerivedStateFromError(t)),o=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(t,r||{}),o=i.__d),o)return i.__E=i}catch(e){t=e}throw t}},s=0,o=function(t){return null!=t&&void 0===t.constructor},_.prototype.setState=function(t,e){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=f({},this.state),"function"==typeof t&&(t=t(f({},n),this.props)),t&&f(n,t),null!=t&&this.__v&&(e&&this._sb.push(e),E(this))},_.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),E(this))},_.prototype.render=m,c=[],x.__r=0,u=0},1757:function(t,e,n){"use strict";n.r(e),n.d(e,"Observable",(function(){return r.a})),n.d(e,"ConnectableObservable",(function(){return i.a})),n.d(e,"GroupedObservable",(function(){return s.a})),n.d(e,"observable",(function(){return o.a})),n.d(e,"Subject",(function(){return c.a})),n.d(e,"BehaviorSubject",(function(){return a.a})),n.d(e,"ReplaySubject",(function(){return u.a})),n.d(e,"AsyncSubject",(function(){return l.a})),n.d(e,"asap",(function(){return h.a})),n.d(e,"asapScheduler",(function(){return h.b})),n.d(e,"async",(function(){return d.a})),n.d(e,"asyncScheduler",(function(){return d.b})),n.d(e,"queue",(function(){return f.a})),n.d(e,"queueScheduler",(function(){return f.b})),n.d(e,"animationFrame",(function(){return v})),n.d(e,"animationFrameScheduler",(function(){return _})),n.d(e,"VirtualTimeScheduler",(function(){return w})),n.d(e,"VirtualAction",(function(){return E})),n.d(e,"Scheduler",(function(){return x.a})),n.d(e,"Subscription",(function(){return S.a})),n.d(e,"Subscriber",(function(){return k.a})),n.d(e,"Notification",(function(){return C.a})),n.d(e,"NotificationKind",(function(){return C.b})),n.d(e,"pipe",(function(){return I.a})),n.d(e,"noop",(function(){return A.a})),n.d(e,"identity",(function(){return O.a})),n.d(e,"isObservable",(function(){return M})),n.d(e,"ArgumentOutOfRangeError",(function(){return R.a})),n.d(e,"EmptyError",(function(){return j.a})),n.d(e,"ObjectUnsubscribedError",(function(){return N.a})),n.d(e,"UnsubscriptionError",(function(){return T.a})),n.d(e,"TimeoutError",(function(){return P.a})),n.d(e,"bindCallback",(function(){return F})),n.d(e,"bindNodeCallback",(function(){return z})),n.d(e,"combineLatest",(function(){return G.b})),n.d(e,"concat",(function(){return Y.a})),n.d(e,"defer",(function(){return $.a})),n.d(e,"empty",(function(){return K.b})),n.d(e,"forkJoin",(function(){return Z})),n.d(e,"from",(function(){return X.a})),n.d(e,"fromEvent",(function(){return nt})),n.d(e,"fromEventPattern",(function(){return it})),n.d(e,"generate",(function(){return st})),n.d(e,"iif",(function(){return ct})),n.d(e,"interval",(function(){return ut})),n.d(e,"merge",(function(){return ht.a})),n.d(e,"never",(function(){return ft})),n.d(e,"of",(function(){return pt.a})),n.d(e,"onErrorResumeNext",(function(){return bt})),n.d(e,"pairs",(function(){return yt})),n.d(e,"partition",(function(){return wt})),n.d(e,"race",(function(){return Et.a})),n.d(e,"range",(function(){return xt})),n.d(e,"throwError",(function(){return kt.a})),n.d(e,"timer",(function(){return Ct.a})),n.d(e,"using",(function(){return It})),n.d(e,"zip",(function(){return At.b})),n.d(e,"scheduled",(function(){return Ot.a})),n.d(e,"EMPTY",(function(){return K.a})),n.d(e,"NEVER",(function(){return dt})),n.d(e,"config",(function(){return Mt.a}));var r=n(1733),i=n(1796),s=n(1772),o=n(1746),c=n(1736),a=n(1797),u=n(1773),l=n(1764),h=n(1782),d=n(1737),f=n(1784),p=n(121),b=n(1768),y=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return p.__extends(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}(b.a),g=n(1763),m=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return p.__extends(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<i&&(t=n.shift()));if(this.active=!1,e){for(;++r<i&&(t=n.shift());)t.unsubscribe();throw e}},e}(g.a),_=new m(y),v=_,w=function(t){function e(e,n){void 0===e&&(e=E),void 0===n&&(n=Number.POSITIVE_INFINITY);var r=t.call(this,e,(function(){return r.frame}))||this;return r.maxFrames=n,r.frame=0,r.index=-1,r}return p.__extends(e,t),e.prototype.flush=function(){for(var t,e,n=this.actions,r=this.maxFrames;(e=n[0])&&e.delay<=r&&(n.shift(),this.frame=e.delay,!(t=e.execute(e.state,e.delay))););if(t){for(;e=n.shift();)e.unsubscribe();throw t}},e.frameTimeFactor=10,e}(g.a),E=function(t){function e(e,n,r){void 0===r&&(r=e.index+=1);var i=t.call(this,e,n)||this;return i.scheduler=e,i.work=n,i.index=r,i.active=!0,i.index=e.index=r,i}return p.__extends(e,t),e.prototype.schedule=function(n,r){if(void 0===r&&(r=0),!this.id)return t.prototype.schedule.call(this,n,r);this.active=!1;var i=new e(this.scheduler,this.work);return this.add(i),i.schedule(n,r)},e.prototype.requestAsyncId=function(t,n,r){void 0===r&&(r=0),this.delay=t.frame+r;var i=t.actions;return i.push(this),i.sort(e.sortActions),!0},e.prototype.recycleAsyncId=function(t,e,n){void 0===n&&(n=0)},e.prototype._execute=function(e,n){if(!0===this.active)return t.prototype._execute.call(this,e,n)},e.sortActions=function(t,e){return t.delay===e.delay?t.index===e.index?0:t.index>e.index?1:-1:t.delay>e.delay?1:-1},e}(b.a),x=n(1800),S=n(1735),k=n(1732),C=n(1752),I=n(1770),A=n(1775),O=n(1744);function M(t){return!!t&&(t instanceof r.a||"function"===typeof t.lift&&"function"===typeof t.subscribe)}var R=n(1753),j=n(1754),N=n(1760),T=n(1793),P=n(1801),L=n(1739),D=n(1795),B=n(1738),H=n(1743);function F(t,e,n){if(e){if(!Object(H.a)(e))return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return F(t,n).apply(void 0,r).pipe(Object(L.a)((function(t){return Object(B.a)(t)?e.apply(void 0,t):e(t)})))};n=e}return function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var s,o=this,c={context:o,subject:s,callbackFunc:t,scheduler:n};return new r.a((function(r){if(n){var i={args:e,subscriber:r,params:c};return n.schedule(U,0,i)}if(!s){s=new l.a;try{t.apply(o,e.concat([function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];s.next(t.length<=1?t[0]:t),s.complete()}]))}catch(a){Object(D.a)(s)?s.error(a):console.warn(a)}}return s.subscribe(r)}))}}function U(t){var e=this,n=t.args,r=t.subscriber,i=t.params,s=i.callbackFunc,o=i.context,c=i.scheduler,a=i.subject;if(!a){a=i.subject=new l.a;try{s.apply(o,n.concat([function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=t.length<=1?t[0]:t;e.add(c.schedule(W,0,{value:r,subject:a}))}]))}catch(u){a.error(u)}}this.add(a.subscribe(r))}function W(t){var e=t.value,n=t.subject;n.next(e),n.complete()}function z(t,e,n){if(e){if(!Object(H.a)(e))return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return z(t,n).apply(void 0,r).pipe(Object(L.a)((function(t){return Object(B.a)(t)?e.apply(void 0,t):e(t)})))};n=e}return function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var s={subject:void 0,args:e,callbackFunc:t,scheduler:n,context:this};return new r.a((function(r){var i=s.context,o=s.subject;if(n)return n.schedule(q,0,{params:s,subscriber:r,context:i});if(!o){o=s.subject=new l.a;try{t.apply(i,e.concat([function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t.shift();n?o.error(n):(o.next(t.length<=1?t[0]:t),o.complete())}]))}catch(c){Object(D.a)(o)?o.error(c):console.warn(c)}}return o.subscribe(r)}))}}function q(t){var e=this,n=t.params,r=t.subscriber,i=t.context,s=n.callbackFunc,o=n.args,c=n.scheduler,a=n.subject;if(!a){a=n.subject=new l.a;try{s.apply(i,o.concat([function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=t.shift();if(r)e.add(c.schedule(J,0,{err:r,subject:a}));else{var i=t.length<=1?t[0]:t;e.add(c.schedule(V,0,{value:i,subject:a}))}}]))}catch(u){this.add(c.schedule(J,0,{err:u,subject:a}))}}this.add(a.subscribe(r))}function V(t){var e=t.value,n=t.subject;n.next(e),n.complete()}function J(t){var e=t.err;t.subject.error(e)}var G=n(1776),Y=n(1766),$=n(1778),K=n(1740),Q=n(1794),X=n(1741);function Z(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(1===t.length){var n=t[0];if(Object(B.a)(n))return tt(n,null);if(Object(Q.a)(n)&&Object.getPrototypeOf(n)===Object.prototype){var r=Object.keys(n);return tt(r.map((function(t){return n[t]})),r)}}if("function"===typeof t[t.length-1]){var i=t.pop();return tt(t=1===t.length&&Object(B.a)(t[0])?t[0]:t,null).pipe(Object(L.a)((function(t){return i.apply(void 0,t)})))}return tt(t,null)}function tt(t,e){return new r.a((function(n){var r=t.length;if(0!==r)for(var i=new Array(r),s=0,o=0,c=function(c){var a=Object(X.a)(t[c]),u=!1;n.add(a.subscribe({next:function(t){u||(u=!0,o++),i[c]=t},error:function(t){return n.error(t)},complete:function(){++s!==r&&u||(o===r&&n.next(e?e.reduce((function(t,e,n){return t[e]=i[n],t}),{}):i),n.complete())}}))},a=0;a<r;a++)c(a);else n.complete()}))}var et=n(1759);function nt(t,e,n,i){return Object(et.a)(n)&&(i=n,n=void 0),i?nt(t,e,n).pipe(Object(L.a)((function(t){return Object(B.a)(t)?i.apply(void 0,t):i(t)}))):new r.a((function(r){rt(t,e,(function(t){arguments.length>1?r.next(Array.prototype.slice.call(arguments)):r.next(t)}),r,n)}))}function rt(t,e,n,r,i){var s;if(function(t){return t&&"function"===typeof t.addEventListener&&"function"===typeof t.removeEventListener}(t)){var o=t;t.addEventListener(e,n,i),s=function(){return o.removeEventListener(e,n,i)}}else if(function(t){return t&&"function"===typeof t.on&&"function"===typeof t.off}(t)){var c=t;t.on(e,n),s=function(){return c.off(e,n)}}else if(function(t){return t&&"function"===typeof t.addListener&&"function"===typeof t.removeListener}(t)){var a=t;t.addListener(e,n),s=function(){return a.removeListener(e,n)}}else{if(!t||!t.length)throw new TypeError("Invalid event target");for(var u=0,l=t.length;u<l;u++)rt(t[u],e,n,r,i)}r.add(s)}function it(t,e,n){return n?it(t,e).pipe(Object(L.a)((function(t){return Object(B.a)(t)?n.apply(void 0,t):n(t)}))):new r.a((function(n){var r,i=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return n.next(1===t.length?t[0]:t)};try{r=t(i)}catch(s){return void n.error(s)}if(Object(et.a)(e))return function(){return e(i,r)}}))}function st(t,e,n,i,s){var o,c;if(1==arguments.length){var a=t;c=a.initialState,e=a.condition,n=a.iterate,o=a.resultSelector||O.a,s=a.scheduler}else void 0===i||Object(H.a)(i)?(c=t,o=O.a,s=i):(c=t,o=i);return new r.a((function(t){var r=c;if(s)return s.schedule(ot,0,{subscriber:t,iterate:n,condition:e,resultSelector:o,state:r});for(;;){if(e){var i=void 0;try{i=e(r)}catch(u){return void t.error(u)}if(!i){t.complete();break}}var a=void 0;try{a=o(r)}catch(u){return void t.error(u)}if(t.next(a),t.closed)break;try{r=n(r)}catch(u){return void t.error(u)}}}))}function ot(t){var e=t.subscriber,n=t.condition;if(!e.closed){if(t.needIterate)try{t.state=t.iterate(t.state)}catch(s){return void e.error(s)}else t.needIterate=!0;if(n){var r=void 0;try{r=n(t.state)}catch(s){return void e.error(s)}if(!r)return void e.complete();if(e.closed)return}var i;try{i=t.resultSelector(t.state)}catch(s){return void e.error(s)}if(!e.closed&&(e.next(i),!e.closed))return this.schedule(t)}}function ct(t,e,n){return void 0===e&&(e=K.a),void 0===n&&(n=K.a),Object($.a)((function(){return t()?e:n}))}var at=n(1779);function ut(t,e){return void 0===t&&(t=0),void 0===e&&(e=d.a),(!Object(at.a)(t)||t<0)&&(t=0),e&&"function"===typeof e.schedule||(e=d.a),new r.a((function(n){return n.add(e.schedule(lt,t,{subscriber:n,counter:0,period:t})),n}))}function lt(t){var e=t.subscriber,n=t.counter,r=t.period;e.next(n),this.schedule({subscriber:e,counter:n+1,period:r},r)}var ht=n(1803),dt=new r.a(A.a);function ft(){return dt}var pt=n(1761);function bt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(0===t.length)return K.a;var n=t[0],i=t.slice(1);return 1===t.length&&Object(B.a)(n)?bt.apply(void 0,n):new r.a((function(t){var e=function(){return t.add(bt.apply(void 0,i).subscribe(t))};return Object(X.a)(n).subscribe({next:function(e){t.next(e)},error:e,complete:e})}))}function yt(t,e){return e?new r.a((function(n){var r=Object.keys(t),i=new S.a;return i.add(e.schedule(gt,0,{keys:r,index:0,subscriber:n,subscription:i,obj:t})),i})):new r.a((function(e){for(var n=Object.keys(t),r=0;r<n.length&&!e.closed;r++){var i=n[r];t.hasOwnProperty(i)&&e.next([i,t[i]])}e.complete()}))}function gt(t){var e=t.keys,n=t.index,r=t.subscriber,i=t.subscription,s=t.obj;if(!r.closed)if(n<e.length){var o=e[n];r.next([o,s[o]]),i.add(this.schedule({keys:e,index:n+1,subscriber:r,subscription:i,obj:s}))}else r.complete()}var mt=n(1825),_t=n(1783),vt=n(1748);function wt(t,e,n){return[Object(vt.a)(e,n)(new r.a(Object(_t.a)(t))),Object(vt.a)(Object(mt.a)(e,n))(new r.a(Object(_t.a)(t)))]}var Et=n(1804);function xt(t,e,n){return void 0===t&&(t=0),new r.a((function(r){void 0===e&&(e=t,t=0);var i=0,s=t;if(n)return n.schedule(St,0,{index:i,count:e,start:t,subscriber:r});for(;;){if(i++>=e){r.complete();break}if(r.next(s++),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(1774),Ct=n(1805);function It(t,e){return new r.a((function(n){var r,i;try{r=t()}catch(o){return void n.error(o)}try{i=e(r)}catch(o){return void n.error(o)}var s=(i?Object(X.a)(i):K.a).subscribe(n);return function(){s.unsubscribe(),r&&r.unsubscribe()}}))}var At=n(1780),Ot=n(1815),Mt=n(1758)},1758:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=!1,i={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){t&&(new Error).stack;r=t},get useDeprecatedSynchronousErrorHandling(){return r}}},1759:function(t,e,n){"use strict";function r(t){return"function"===typeof t}n.d(e,"a",(function(){return r}))},1760:function(t,e,n){"use strict";n.d(e,"a",(function(){return 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}()},1761:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(1743),i=n(1762),s=n(1799);function o(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[t.length-1];return Object(r.a)(n)?(t.pop(),Object(s.a)(t,n)):Object(i.a)(t)}},1762:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(1733),i=n(1822),s=n(1799);function o(t,e){return e?Object(s.a)(t,e):new r.a(Object(i.a)(t))}},1763:function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(121),i=n(1800),s=function(t){function e(n,r){void 0===r&&(r=i.a.now);var s=t.call(this,n,(function(){return e.delegate&&e.delegate!==s?e.delegate.now():r()}))||this;return s.actions=[],s.active=!1,s.scheduled=void 0,s}return r.__extends(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.a)},1764:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(121),i=n(1736),s=n(1735),o=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.__extends(e,t),e.prototype._subscribe=function(e){return this.hasError?(e.error(this.thrownError),s.a.EMPTY):this.hasCompleted&&this.hasNext?(e.next(this.value),e.complete(),s.a.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.a)},1765:function(t,e,n){"use strict";function r(){return"function"===typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}n.d(e,"a",(function(){return i}));var i=r()},1766:function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(1761),i=n(1802);function s(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Object(i.a)()(r.a.apply(void 0,t))}},1767:function(t,e){function n(t){return t.sort(((t,e)=>"latest"===t||"earliest"===e?1:"latest"===e||"earliest"===t?-1:r(t)-r(e)))}function r(t){return void 0===t||null===t?t:Number.parseInt(t,16)}function i(t){if(void 0===t||null===t)return t;let e=t.toString(16);return e.length%2&&(e="0"+e),"0x"+e}function s(){return Math.floor(16*Math.random()).toString(16)}t.exports={minBlockRef:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];const i=n(e);return i[0]},maxBlockRef:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];const i=n(e);return i[i.length-1]},sortBlockRefs:n,bnToHex:function(t){return"0x"+t.toString(16)},blockRefIsNumber:function(t){return t&&!["earliest","latest","pending"].includes(t)},hexToInt:r,incrementHexInt:function(t){if(void 0===t||null===t)return t;return i(r(t)+1)},intToHex:i,unsafeRandomBytes:function(t){let e="0x";for(let n=0;n<t;n++)e+=s(),e+=s();return e}}},1768:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(121),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.__extends(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(i){n=!0,r=!!i&&i||new Error(i)}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.__extends(e,t),e.prototype.schedule=function(t,e){return void 0===e&&(e=0),this},e}(n(1735).a))},1769:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(42);function i(t,e,n){try{Reflect.apply(t,e,n)}catch(r){setTimeout((()=>{throw r}))}}class s extends r.EventEmitter{emit(t){let e="error"===t;const n=this._events;if(void 0!==n)e=e&&void 0===n.error;else if(!e)return!1;for(var r=arguments.length,s=new Array(r>1?r-1:0),o=1;o<r;o++)s[o-1]=arguments[o];if(e){let t;if(s.length>0&&([t]=s),t instanceof Error)throw t;const e=new Error("Unhandled error."+(t?` (${t.message})`:""));throw e.context=t,e}const c=n[t];if(void 0===c)return!1;if("function"===typeof c)i(c,this,s);else{const t=c.length,e=function(t){const e=t.length,n=new Array(e);for(let r=0;r<e;r+=1)n[r]=t[r];return n}(c);for(let n=0;n<t;n+=1)i(e[n],this,s)}return!0}}e.default=s},1770:function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return s}));var r=n(1744);function i(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return s(t)}function s(t){return 0===t.length?r.a:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}}},1771:function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(121),i=n(1732);function s(){return function(t){return t.lift(new o(t))}}var o=function(){function t(t){this.connectable=t}return t.prototype.call=function(t,e){var n=this.connectable;n._refCount++;var r=new c(t,n),i=e.subscribe(r);return r.closed||(r.connection=n.connect()),i},t}(),c=function(t){function e(e,n){var r=t.call(this,e)||this;return r.connectable=n,r}return r.__extends(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.a)},1772:function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"a",(function(){return d}));var r=n(121),i=n(1732),s=n(1735),o=n(1733),c=n(1736);function a(t,e,n,r){return function(i){return i.lift(new u(t,e,n,r))}}var u=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,s){var o=t.call(this,e)||this;return o.keySelector=n,o.elementSelector=r,o.durationSelector=i,o.subjectSelector=s,o.groups=null,o.attemptedToUnsubscribe=!1,o.count=0,o}return r.__extends(e,t),e.prototype._next=function(t){var e;try{e=this.keySelector(t)}catch(n){return void this.error(n)}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(a){this.error(a)}else r=t;if(!i){i=this.subjectSelector?this.subjectSelector():new c.a,n.set(e,i);var s=new d(e,i,this);if(this.destination.next(s),this.durationSelector){var o=void 0;try{o=this.durationSelector(new d(e,i))}catch(a){return void this.error(a)}this.add(o.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.a),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.__extends(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.a),d=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.__extends(e,t),e.prototype._subscribe=function(t){var e=new s.a,n=this.refCountSubscription,r=this.groupSubject;return n&&!n.closed&&e.add(new f(n)),e.add(r.subscribe(t)),e},e}(o.a),f=function(t){function e(e){var n=t.call(this)||this;return n.parent=e,e.count++,n}return r.__extends(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}(s.a)},1773:function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var r=n(121),i=n(1736),s=n(1784),o=n(1735),c=n(1798),a=n(1760),u=n(1821),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.__extends(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,s=r.length;if(this.closed)throw new a.a;if(this.isStopped||this.hasError?e=o.a.EMPTY:(this.observers.push(t),e=new u.a(this,t)),i&&t.add(t=new c.a(t,i)),n)for(var l=0;l<s&&!t.closed;l++)t.next(r[l]);else for(l=0;l<s&&!t.closed;l++)t.next(r[l].value);return this.hasError?t.error(this.thrownError):this.isStopped&&t.complete(),e},e.prototype._getNow=function(){return(this.scheduler||s.a).now()},e.prototype._trimBufferThenGetEvents=function(){for(var t=this._getNow(),e=this._bufferSize,n=this._windowTime,r=this._events,i=r.length,s=0;s<i&&!(t-r[s].time<n);)s++;return i>e&&(s=Math.max(s,i-e)),s>0&&r.splice(0,s),r},e}(i.a),h=function(){return function(t,e){this.time=t,this.value=e}}()},1774:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(1733);function i(t,e){return e?new r.a((function(n){return e.schedule(s,0,{error:t,subscriber:n})})):new r.a((function(e){return e.error(t)}))}function s(t){var e=t.error;t.subscriber.error(e)}},1775:function(t,e,n){"use strict";function r(){}n.d(e,"a",(function(){return r}))},1776:function(t,e,n){"use strict";n.d(e,"b",(function(){return l})),n.d(e,"a",(function(){return h}));var r=n(121),i=n(1743),s=n(1738),o=n(1747),c=n(1751),a=n(1762),u={};function l(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=void 0,r=void 0;return Object(i.a)(t[t.length-1])&&(r=t.pop()),"function"===typeof t[t.length-1]&&(n=t.pop()),1===t.length&&Object(s.a)(t[0])&&(t=t[0]),Object(a.a)(t,r).lift(new h(n))}var h=function(){function t(t){this.resultSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new d(t,this.resultSelector))},t}(),d=function(t){function e(e,n){var r=t.call(this,e)||this;return r.resultSelector=n,r.active=0,r.values=[],r.observables=[],r}return r.__extends(e,t),e.prototype._next=function(t){this.values.push(u),this.observables.push(t)},e.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(var n=0;n<e;n++){var r=t[n];this.add(Object(c.a)(this,r,void 0,n))}}},e.prototype.notifyComplete=function(t){0===(this.active-=1)&&this.destination.complete()},e.prototype.notifyNext=function(t,e,n){var r=this.values,i=r[n],s=this.toRespond?i===u?--this.toRespond:this.toRespond:0;r[n]=e,0===s&&(this.resultSelector?this._tryResultSelector(r):this.destination.next(r.slice()))},e.prototype._tryResultSelector=function(t){var e;try{e=this.resultSelector.apply(this,t)}catch(n){return void this.destination.error(n)}this.destination.next(e)},e}(o.a)},1777:function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(1755),i=n(1744);function s(t){return void 0===t&&(t=Number.POSITIVE_INFINITY),Object(r.b)(i.a,t)}},1778:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(1733),i=n(1741),s=n(1740);function o(t){return new r.a((function(e){var n;try{n=t()}catch(r){return void e.error(r)}return(n?Object(i.a)(n):Object(s.b)()).subscribe(e)}))}},1779:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(1738);function i(t){return!Object(r.a)(t)&&t-parseFloat(t)+1>=0}},1780:function(t,e,n){"use strict";n.d(e,"b",(function(){return u})),n.d(e,"a",(function(){return l}));var r=n(121),i=n(1762),s=n(1738),o=n(1732),c=n(1765),a=n(1734);function u(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[t.length-1];return"function"===typeof n&&t.pop(),Object(i.a)(t,void 0).lift(new l(n))}var l=function(){function t(t){this.resultSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new h(t,this.resultSelector))},t}(),h=function(t){function e(e,n,r){void 0===r&&(r=Object.create(null));var i=t.call(this,e)||this;return i.resultSelector=n,i.iterators=[],i.active=0,i.resultSelector="function"===typeof n?n:void 0,i}return r.__extends(e,t),e.prototype._next=function(t){var e=this.iterators;Object(s.a)(t)?e.push(new f(t)):"function"===typeof t[c.a]?e.push(new d(t[c.a]())):e.push(new p(this.destination,this,t))},e.prototype._complete=function(){var t=this.iterators,e=t.length;if(this.unsubscribe(),0!==e){this.active=e;for(var n=0;n<e;n++){var r=t[n];if(r.stillUnsubscribed)this.destination.add(r.subscribe());else this.active--}}else this.destination.complete()},e.prototype.notifyInactive=function(){this.active--,0===this.active&&this.destination.complete()},e.prototype.checkIterators=function(){for(var t=this.iterators,e=t.length,n=this.destination,r=0;r<e;r++){if("function"===typeof(o=t[r]).hasValue&&!o.hasValue())return}var i=!1,s=[];for(r=0;r<e;r++){var o,c=(o=t[r]).next();if(o.hasCompleted()&&(i=!0),c.done)return void n.complete();s.push(c.value)}this.resultSelector?this._tryresultSelector(s):n.next(s),i&&n.complete()},e.prototype._tryresultSelector=function(t){var e;try{e=this.resultSelector.apply(this,t)}catch(n){return void this.destination.error(n)}this.destination.next(e)},e}(o.a),d=function(){function t(t){this.iterator=t,this.nextResult=t.next()}return t.prototype.hasValue=function(){return!0},t.prototype.next=function(){var t=this.nextResult;return this.nextResult=this.iterator.next(),t},t.prototype.hasCompleted=function(){var t=this.nextResult;return Boolean(t&&t.done)},t}(),f=function(){function t(t){this.array=t,this.index=0,this.length=0,this.length=t.length}return t.prototype[c.a]=function(){return this},t.prototype.next=function(t){var e=this.index++,n=this.array;return e<this.length?{value:n[e],done:!1}:{value:null,done:!0}},t.prototype.hasValue=function(){return this.array.length>this.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.__extends(e,t),e.prototype[c.a]=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 Object(a.c)(this.observable,new a.a(this))},e}(a.b)},1781:function(t,e,n){"use strict";n.r(e),n.d(e,"audit",(function(){return s})),n.d(e,"auditTime",(function(){return l})),n.d(e,"buffer",(function(){return h})),n.d(e,"bufferCount",(function(){return b})),n.d(e,"bufferTime",(function(){return v})),n.d(e,"bufferToggle",(function(){return M})),n.d(e,"bufferWhen",(function(){return N})),n.d(e,"catchError",(function(){return L})),n.d(e,"combineAll",(function(){return F})),n.d(e,"combineLatest",(function(){return z})),n.d(e,"concat",(function(){return V})),n.d(e,"concatAll",(function(){return J.a})),n.d(e,"concatMap",(function(){return Y})),n.d(e,"concatMapTo",(function(){return $})),n.d(e,"count",(function(){return K})),n.d(e,"debounce",(function(){return Z})),n.d(e,"debounceTime",(function(){return nt})),n.d(e,"defaultIfEmpty",(function(){return ot})),n.d(e,"delay",(function(){return ht})),n.d(e,"delayWhen",(function(){return yt})),n.d(e,"dematerialize",(function(){return wt})),n.d(e,"distinct",(function(){return St})),n.d(e,"distinctUntilChanged",(function(){return It})),n.d(e,"distinctUntilKeyChanged",(function(){return Mt})),n.d(e,"elementAt",(function(){return Wt})),n.d(e,"endWith",(function(){return qt})),n.d(e,"every",(function(){return Vt})),n.d(e,"exhaust",(function(){return Yt})),n.d(e,"exhaustMap",(function(){return Xt})),n.d(e,"expand",(function(){return ee})),n.d(e,"filter",(function(){return jt.a})),n.d(e,"finalize",(function(){return ie})),n.d(e,"find",(function(){return ce})),n.d(e,"findIndex",(function(){return le})),n.d(e,"first",(function(){return de})),n.d(e,"groupBy",(function(){return fe.b})),n.d(e,"ignoreElements",(function(){return pe})),n.d(e,"isEmpty",(function(){return ge})),n.d(e,"last",(function(){return xe})),n.d(e,"map",(function(){return Qt.a})),n.d(e,"mapTo",(function(){return Se})),n.d(e,"materialize",(function(){return Ie})),n.d(e,"max",(function(){return Pe})),n.d(e,"merge",(function(){return De})),n.d(e,"mergeAll",(function(){return Be.a})),n.d(e,"mergeMap",(function(){return G.b})),n.d(e,"flatMap",(function(){return G.a})),n.d(e,"mergeMapTo",(function(){return He})),n.d(e,"mergeScan",(function(){return Fe})),n.d(e,"min",(function(){return ze})),n.d(e,"multicast",(function(){return Ve})),n.d(e,"observeOn",(function(){return Ge.b})),n.d(e,"onErrorResumeNext",(function(){return Ye})),n.d(e,"pairwise",(function(){return Qe})),n.d(e,"partition",(function(){return en})),n.d(e,"pluck",(function(){return nn})),n.d(e,"publish",(function(){return on})),n.d(e,"publishBehavior",(function(){return an})),n.d(e,"publishLast",(function(){return ln})),n.d(e,"publishReplay",(function(){return dn})),n.d(e,"race",(function(){return pn})),n.d(e,"reduce",(function(){return Te})),n.d(e,"repeat",(function(){return bn})),n.d(e,"repeatWhen",(function(){return mn})),n.d(e,"retry",(function(){return wn})),n.d(e,"retryWhen",(function(){return Sn})),n.d(e,"refCount",(function(){return In.a})),n.d(e,"sample",(function(){return An})),n.d(e,"sampleTime",(function(){return Rn})),n.d(e,"scan",(function(){return Me})),n.d(e,"sequenceEqual",(function(){return Pn})),n.d(e,"share",(function(){return Fn})),n.d(e,"shareReplay",(function(){return Un})),n.d(e,"single",(function(){return Wn})),n.d(e,"skip",(function(){return Vn})),n.d(e,"skipLast",(function(){return Yn})),n.d(e,"skipUntil",(function(){return Qn})),n.d(e,"skipWhile",(function(){return tr})),n.d(e,"startWith",(function(){return rr})),n.d(e,"subscribeOn",(function(){return cr})),n.d(e,"switchAll",(function(){return dr})),n.d(e,"switchMap",(function(){return ur})),n.d(e,"switchMapTo",(function(){return fr})),n.d(e,"take",(function(){return Ht})),n.d(e,"takeLast",(function(){return ve})),n.d(e,"takeUntil",(function(){return pr})),n.d(e,"takeWhile",(function(){return gr})),n.d(e,"tap",(function(){return Er})),n.d(e,"throttle",(function(){return Cr})),n.d(e,"throttleTime",(function(){return Or})),n.d(e,"throwIfEmpty",(function(){return Tt})),n.d(e,"timeInterval",(function(){return Tr})),n.d(e,"timeout",(function(){return Ur})),n.d(e,"timeoutWith",(function(){return Dr})),n.d(e,"timestamp",(function(){return Wr})),n.d(e,"toArray",(function(){return Vr})),n.d(e,"window",(function(){return Jr})),n.d(e,"windowCount",(function(){return $r})),n.d(e,"windowTime",(function(){return Xr})),n.d(e,"windowToggle",(function(){return si})),n.d(e,"windowWhen",(function(){return ai})),n.d(e,"withLatestFrom",(function(){return hi})),n.d(e,"zip",(function(){return bi})),n.d(e,"zipAll",(function(){return yi}));var r=n(121),i=n(1734);function s(t){return function(e){return e.lift(new o(t))}}var o=function(){function t(t){this.durationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new c(t,this.durationSelector))},t}(),c=function(t){function e(e,n){var r=t.call(this,e)||this;return r.durationSelector=n,r.hasValue=!1,r}return r.__extends(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(r){return this.destination.error(r)}var n=Object(i.c)(e,new i.a(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.b),a=n(1737),u=n(1805);function l(t,e){return void 0===e&&(e=a.a),s((function(){return Object(u.a)(t,e)}))}function h(t){return function(e){return e.lift(new d(t))}}var d=function(){function t(t){this.closingNotifier=t}return t.prototype.call=function(t,e){return e.subscribe(new f(t,this.closingNotifier))},t}(),f=function(t){function e(e,n){var r=t.call(this,e)||this;return r.buffer=[],r.add(Object(i.c)(n,new i.a(r))),r}return r.__extends(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.b),p=n(1732);function b(t,e){return void 0===e&&(e=null),function(n){return n.lift(new y(t,e))}}var y=function(){function t(t,e){this.bufferSize=t,this.startBufferEvery=e,this.subscriberClass=e&&t!==e?m:g}return t.prototype.call=function(t,e){return e.subscribe(new this.subscriberClass(t,this.bufferSize,this.startBufferEvery))},t}(),g=function(t){function e(e,n){var r=t.call(this,e)||this;return r.bufferSize=n,r.buffer=[],r}return r.__extends(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.a),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.__extends(e,t),e.prototype._next=function(t){var e=this,n=e.bufferSize,r=e.startBufferEvery,i=e.buffers,s=e.count;this.count++,s%r===0&&i.push([]);for(var o=i.length;o--;){var c=i[o];c.push(t),c.length===n&&(i.splice(o,1),this.destination.next(c))}},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.a),_=n(1743);function v(t){var e=arguments.length,n=a.a;Object(_.a)(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 w(t,r,i,n))}}var w=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 x(t,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))},t}(),E=function(){return function(){this.buffer=[]}}(),x=function(t){function e(e,n,r,i,s){var o=t.call(this,e)||this;o.bufferTimeSpan=n,o.bufferCreationInterval=r,o.maxBufferSize=i,o.scheduler=s,o.contexts=[];var c=o.openContext();if(o.timespanOnly=null==r||r<0,o.timespanOnly){var a={subscriber:o,context:c,bufferTimeSpan:n};o.add(c.closeAction=s.schedule(S,n,a))}else{var u={subscriber:o,context:c},l={bufferTimeSpan:n,bufferCreationInterval:r,subscriber:o,scheduler:s};o.add(c.closeAction=s.schedule(C,n,u)),o.add(s.schedule(k,r,l))}return o}return r.__extends(e,t),e.prototype._next=function(t){for(var e,n=this.contexts,r=n.length,i=0;i<r;i++){var s=n[i],o=s.buffer;o.push(t),o.length==this.maxBufferSize&&(e=s)}e&&this.onBufferFull(e)},e.prototype._error=function(e){this.contexts.length=0,t.prototype._error.call(this,e)},e.prototype._complete=function(){for(var e=this.contexts,n=this.destination;e.length>0;){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(S,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.a);function S(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 k(t){var e=t.bufferCreationInterval,n=t.bufferTimeSpan,r=t.subscriber,i=t.scheduler,s=r.openContext();r.closed||(r.add(s.closeAction=i.schedule(C,n,{subscriber:r,context:s})),this.schedule(t,e))}function C(t){var e=t.subscriber,n=t.context;e.closeContext(n)}var I=n(1735),A=n(1751),O=n(1747);function M(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 j(t,this.openings,this.closingSelector))},t}(),j=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.closingSelector=r,i.contexts=[],i.add(Object(A.a)(i,n)),i}return r.__extends(e,t),e.prototype._next=function(t){for(var e=this.contexts,n=e.length,r=0;r<n;r++)e[r].buffer.push(t)},e.prototype._error=function(e){for(var n=this.contexts;n.length>0;){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(n){this._error(n)}},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 I.a,r={buffer:[],subscription:n};e.push(r);var i=Object(A.a)(this,t,r);!i||i.closed?this.closeBuffer(r):(i.context=r,this.add(i),n.add(i))},e}(O.a);function N(t){return function(e){return e.lift(new T(t))}}var T=function(){function t(t){this.closingSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new P(t,this.closingSelector))},t}(),P=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.__extends(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(r){return this.error(r)}t=new I.a,this.closingSubscription=t,this.add(t),this.subscribing=!0,t.add(Object(i.c)(e,new i.a(this))),this.subscribing=!1},e}(i.b);function L(t){return function(e){var n=new D(t),r=e.lift(n);return n.caught=r}}var D=function(){function t(t){this.selector=t}return t.prototype.call=function(t,e){return e.subscribe(new B(t,this.selector,this.caught))},t}(),B=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.selector=n,i.caught=r,i}return r.__extends(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=void 0;try{n=this.selector(e,this.caught)}catch(o){return void t.prototype.error.call(this,o)}this._unsubscribeAndRecycle();var r=new i.a(this);this.add(r);var s=Object(i.c)(n,r);s!==r&&this.add(s)}},e}(i.b),H=n(1776);function F(t){return function(e){return e.lift(new H.a(t))}}var U=n(1738),W=n(1741);function z(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=null;return"function"===typeof t[t.length-1]&&(n=t.pop()),1===t.length&&Object(U.a)(t[0])&&(t=t[0].slice()),function(e){return e.lift.call(Object(W.a)([e].concat(t)),new H.a(n))}}var q=n(1766);function V(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return e.lift.call(q.a.apply(void 0,[e].concat(t)))}}var J=n(1802),G=n(1755);function Y(t,e){return Object(G.b)(t,e,1)}function $(t,e){return Y((function(){return t}),e)}function K(t){return function(e){return e.lift(new Q(t,e))}}var Q=function(){function t(t,e){this.predicate=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new X(t,this.predicate,this.source))},t}(),X=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.predicate=n,i.source=r,i.count=0,i.index=0,i}return r.__extends(e,t),e.prototype._next=function(t){this.predicate?this._tryPredicate(t):this.count++},e.prototype._tryPredicate=function(t){var e;try{e=this.predicate(t,this.index++,this.source)}catch(n){return void this.destination.error(n)}e&&this.count++},e.prototype._complete=function(){this.destination.next(this.count),this.destination.complete()},e}(p.a);function Z(t){return function(e){return e.lift(new tt(t))}}var tt=function(){function t(t){this.durationSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new et(t,this.durationSelector))},t}(),et=function(t){function e(e,n){var r=t.call(this,e)||this;return r.durationSelector=n,r.hasValue=!1,r}return r.__extends(e,t),e.prototype._next=function(t){try{var e=this.durationSelector.call(this,t);e&&this._tryNext(t,e)}catch(n){this.destination.error(n)}},e.prototype._complete=function(){this.emitValue(),this.destination.complete()},e.prototype._tryNext=function(t,e){var n=this.durationSubscription;this.value=t,this.hasValue=!0,n&&(n.unsubscribe(),this.remove(n)),(n=Object(i.c)(e,new i.a(this)))&&!n.closed&&this.add(this.durationSubscription=n)},e.prototype.notifyNext=function(){this.emitValue()},e.prototype.notifyComplete=function(){this.emitValue()},e.prototype.emitValue=function(){if(this.hasValue){var e=this.value,n=this.durationSubscription;n&&(this.durationSubscription=void 0,n.unsubscribe(),this.remove(n)),this.value=void 0,this.hasValue=!1,t.prototype._next.call(this,e)}},e}(i.b);function nt(t,e){return void 0===e&&(e=a.a),function(n){return n.lift(new rt(t,e))}}var rt=function(){function t(t,e){this.dueTime=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new it(t,this.dueTime,this.scheduler))},t}(),it=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.dueTime=n,i.scheduler=r,i.debouncedSubscription=null,i.lastValue=null,i.hasValue=!1,i}return r.__extends(e,t),e.prototype._next=function(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(st,this.dueTime,this))},e.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},e.prototype.debouncedNext=function(){if(this.clearDebounce(),this.hasValue){var t=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(t)}},e.prototype.clearDebounce=function(){var t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)},e}(p.a);function st(t){t.debouncedNext()}function ot(t){return void 0===t&&(t=null),function(e){return e.lift(new ct(t))}}var ct=function(){function t(t){this.defaultValue=t}return t.prototype.call=function(t,e){return e.subscribe(new at(t,this.defaultValue))},t}(),at=function(t){function e(e,n){var r=t.call(this,e)||this;return r.defaultValue=n,r.isEmpty=!0,r}return r.__extends(e,t),e.prototype._next=function(t){this.isEmpty=!1,this.destination.next(t)},e.prototype._complete=function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()},e}(p.a);function ut(t){return t instanceof Date&&!isNaN(+t)}var lt=n(1752);function ht(t,e){void 0===e&&(e=a.a);var n=ut(t)?+t-e.now():Math.abs(t);return function(t){return t.lift(new dt(n,e))}}var dt=function(){function t(t,e){this.delay=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new ft(t,this.delay,this.scheduler))},t}(),ft=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.delay=n,i.scheduler=r,i.queue=[],i.active=!1,i.errored=!1,i}return r.__extends(e,t),e.dispatch=function(t){for(var e=t.source,n=e.queue,r=t.scheduler,i=t.destination;n.length>0&&n[0].time-r.now()<=0;)n.shift().notification.observe(i);if(n.length>0){var s=Math.max(0,n[0].time-r.now());this.schedule(t,s)}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.a.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.a.createComplete()),this.unsubscribe()},e}(p.a),pt=function(){return function(t,e){this.time=t,this.notification=e}}(),bt=n(1733);function yt(t,e){return e?function(n){return new _t(n,e).lift(new gt(t))}:function(e){return e.lift(new gt(t))}}var gt=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.__extends(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(r){this.destination.error(r)}},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=Object(A.a)(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}(O.a),_t=function(t){function e(e,n){var r=t.call(this)||this;return r.source=e,r.subscriptionDelay=n,r}return r.__extends(e,t),e.prototype._subscribe=function(t){this.subscriptionDelay.subscribe(new vt(t,this.source))},e}(bt.a),vt=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.__extends(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.a);function wt(){return function(t){return t.lift(new Et)}}var Et=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new xt(t))},t}(),xt=function(t){function e(e){return t.call(this,e)||this}return r.__extends(e,t),e.prototype._next=function(t){t.observe(this.destination)},e}(p.a);function St(t,e){return function(n){return n.lift(new kt(t,e))}}var kt=function(){function t(t,e){this.keySelector=t,this.flushes=e}return t.prototype.call=function(t,e){return e.subscribe(new Ct(t,this.keySelector,this.flushes))},t}(),Ct=function(t){function e(e,n,r){var s=t.call(this,e)||this;return s.keySelector=n,s.values=new Set,r&&s.add(Object(i.c)(r,new i.a(s))),s}return r.__extends(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(r){return void n.error(r)}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.b);function It(t,e){return function(n){return n.lift(new At(t,e))}}var At=function(){function t(t,e){this.compare=t,this.keySelector=e}return t.prototype.call=function(t,e){return e.subscribe(new Ot(t,this.compare,this.keySelector))},t}(),Ot=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.__extends(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(i){return this.destination.error(i)}var r=!1;if(this.hasKey)try{r=(0,this.compare)(this.key,e)}catch(i){return this.destination.error(i)}else this.hasKey=!0;r||(this.key=e,this.destination.next(t))},e}(p.a);function Mt(t,e){return It((function(n,r){return e?e(n[t],r[t]):n[t]===r[t]}))}var Rt=n(1753),jt=n(1748),Nt=n(1754);function Tt(t){return void 0===t&&(t=Dt),function(e){return e.lift(new Pt(t))}}var Pt=function(){function t(t){this.errorFactory=t}return t.prototype.call=function(t,e){return e.subscribe(new Lt(t,this.errorFactory))},t}(),Lt=function(t){function e(e,n){var r=t.call(this,e)||this;return r.errorFactory=n,r.hasValue=!1,r}return r.__extends(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.a);function Dt(){return new Nt.a}var Bt=n(1740);function Ht(t){return function(e){return 0===t?Object(Bt.b)():e.lift(new Ft(t))}}var Ft=function(){function t(t){if(this.total=t,this.total<0)throw new Rt.a}return t.prototype.call=function(t,e){return e.subscribe(new Ut(t,this.total))},t}(),Ut=function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.count=0,r}return r.__extends(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.a);function Wt(t,e){if(t<0)throw new Rt.a;var n=arguments.length>=2;return function(r){return r.pipe(Object(jt.a)((function(e,n){return n===t})),Ht(1),n?ot(e):Tt((function(){return new Rt.a})))}}var zt=n(1761);function qt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return Object(q.a)(e,zt.a.apply(void 0,t))}}function Vt(t,e){return function(n){return n.lift(new Jt(t,e,n))}}var Jt=function(){function t(t,e,n){this.predicate=t,this.thisArg=e,this.source=n}return t.prototype.call=function(t,e){return e.subscribe(new Gt(t,this.predicate,this.thisArg,this.source))},t}(),Gt=function(t){function e(e,n,r,i){var s=t.call(this,e)||this;return s.predicate=n,s.thisArg=r,s.source=i,s.index=0,s.thisArg=r||s,s}return r.__extends(e,t),e.prototype.notifyComplete=function(t){this.destination.next(t),this.destination.complete()},e.prototype._next=function(t){var e=!1;try{e=this.predicate.call(this.thisArg,t,this.index++,this.source)}catch(n){return void this.destination.error(n)}e||this.notifyComplete(!1)},e.prototype._complete=function(){this.notifyComplete(!0)},e}(p.a);function Yt(){return function(t){return t.lift(new $t)}}var $t=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Kt(t))},t}(),Kt=function(t){function e(e){var n=t.call(this,e)||this;return n.hasCompleted=!1,n.hasSubscription=!1,n}return r.__extends(e,t),e.prototype._next=function(t){this.hasSubscription||(this.hasSubscription=!0,this.add(Object(i.c)(t,new i.a(this))))},e.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete()},e.prototype.notifyComplete=function(){this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},e}(i.b),Qt=n(1739);function Xt(t,e){return e?function(n){return n.pipe(Xt((function(n,r){return Object(W.a)(t(n,r)).pipe(Object(Qt.a)((function(t,i){return e(n,t,r,i)})))})))}:function(e){return e.lift(new Zt(t))}}var Zt=function(){function t(t){this.project=t}return t.prototype.call=function(t,e){return e.subscribe(new te(t,this.project))},t}(),te=function(t){function e(e,n){var r=t.call(this,e)||this;return r.project=n,r.hasSubscription=!1,r.hasCompleted=!1,r.index=0,r}return r.__extends(e,t),e.prototype._next=function(t){this.hasSubscription||this.tryNext(t)},e.prototype.tryNext=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(r){return void this.destination.error(r)}this.hasSubscription=!0,this._innerSub(e)},e.prototype._innerSub=function(t){var e=new i.a(this),n=this.destination;n.add(e);var r=Object(i.c)(t,e);r!==e&&n.add(r)},e.prototype._complete=function(){this.hasCompleted=!0,this.hasSubscription||this.destination.complete(),this.unsubscribe()},e.prototype.notifyNext=function(t){this.destination.next(t)},e.prototype.notifyError=function(t){this.destination.error(t)},e.prototype.notifyComplete=function(){this.hasSubscription=!1,this.hasCompleted&&this.destination.complete()},e}(i.b);function ee(t,e,n){return void 0===e&&(e=Number.POSITIVE_INFINITY),e=(e||0)<1?Number.POSITIVE_INFINITY:e,function(r){return r.lift(new ne(t,e,n))}}var ne=function(){function t(t,e,n){this.project=t,this.concurrent=e,this.scheduler=n}return t.prototype.call=function(t,e){return e.subscribe(new re(t,this.project,this.concurrent,this.scheduler))},t}(),re=function(t){function e(e,n,r,i){var s=t.call(this,e)||this;return s.project=n,s.concurrent=r,s.scheduler=i,s.index=0,s.active=0,s.hasCompleted=!1,r<Number.POSITIVE_INFINITY&&(s.buffer=[]),s}return r.__extends(e,t),e.dispatch=function(t){var e=t.subscriber,n=t.result,r=t.value,i=t.index;e.subscribeToProjection(n,r,i)},e.prototype._next=function(t){var n=this.destination;if(n.closed)this._complete();else{var r=this.index++;if(this.active<this.concurrent){n.next(t);try{var i=(0,this.project)(t,r);if(this.scheduler){var s={subscriber:this,result:i,value:t,index:r};this.destination.add(this.scheduler.schedule(e.dispatch,0,s))}else this.subscribeToProjection(i,t,r)}catch(o){n.error(o)}}else this.buffer.push(t)}},e.prototype.subscribeToProjection=function(t,e,n){this.active++,this.destination.add(Object(i.c)(t,new i.a(this)))},e.prototype._complete=function(){this.hasCompleted=!0,this.hasCompleted&&0===this.active&&this.destination.complete(),this.unsubscribe()},e.prototype.notifyNext=function(t){this._next(t)},e.prototype.notifyComplete=function(){var t=this.buffer;this.active--,t&&t.length>0&&this._next(t.shift()),this.hasCompleted&&0===this.active&&this.destination.complete()},e}(i.b);function ie(t){return function(e){return e.lift(new se(t))}}var se=function(){function t(t){this.callback=t}return t.prototype.call=function(t,e){return e.subscribe(new oe(t,this.callback))},t}(),oe=function(t){function e(e,n){var r=t.call(this,e)||this;return r.add(new I.a(n)),r}return r.__extends(e,t),e}(p.a);function ce(t,e){if("function"!==typeof t)throw new TypeError("predicate is not a function");return function(n){return n.lift(new ae(t,n,!1,e))}}var ae=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 ue(t,this.predicate,this.source,this.yieldIndex,this.thisArg))},t}(),ue=function(t){function e(e,n,r,i,s){var o=t.call(this,e)||this;return o.predicate=n,o.source=r,o.yieldIndex=i,o.thisArg=s,o.index=0,o}return r.__extends(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(i){this.destination.error(i)}},e.prototype._complete=function(){this.notifyComplete(this.yieldIndex?-1:void 0)},e}(p.a);function le(t,e){return function(n){return n.lift(new ae(t,n,!0,e))}}var he=n(1744);function de(t,e){var n=arguments.length>=2;return function(r){return r.pipe(t?Object(jt.a)((function(e,n){return t(e,n,r)})):he.a,Ht(1),n?ot(e):Tt((function(){return new Nt.a})))}}var fe=n(1772);function pe(){return function(t){return t.lift(new be)}}var be=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new ye(t))},t}(),ye=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype._next=function(t){},e}(p.a);function ge(){return function(t){return t.lift(new me)}}var me=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new _e(t))},t}(),_e=function(t){function e(e){return t.call(this,e)||this}return r.__extends(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.a);function ve(t){return function(e){return 0===t?Object(Bt.b)():e.lift(new we(t))}}var we=function(){function t(t){if(this.total=t,this.total<0)throw new Rt.a}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.__extends(e,t),e.prototype._next=function(t){var e=this.ring,n=this.total,r=this.count++;e.length<n?e.push(t):e[r%n]=t},e.prototype._complete=function(){var t=this.destination,e=this.count;if(e>0)for(var n=this.count>=this.total?this.total:this.count,r=this.ring,i=0;i<n;i++){var s=e++%n;t.next(r[s])}t.complete()},e}(p.a);function xe(t,e){var n=arguments.length>=2;return function(r){return r.pipe(t?Object(jt.a)((function(e,n){return t(e,n,r)})):he.a,ve(1),n?ot(e):Tt((function(){return new Nt.a})))}}function Se(t){return function(e){return e.lift(new ke(t))}}var ke=function(){function t(t){this.value=t}return t.prototype.call=function(t,e){return e.subscribe(new Ce(t,this.value))},t}(),Ce=function(t){function e(e,n){var r=t.call(this,e)||this;return r.value=n,r}return r.__extends(e,t),e.prototype._next=function(t){this.destination.next(this.value)},e}(p.a);function Ie(){return function(t){return t.lift(new Ae)}}var Ae=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Oe(t))},t}(),Oe=function(t){function e(e){return t.call(this,e)||this}return r.__extends(e,t),e.prototype._next=function(t){this.destination.next(lt.a.createNext(t))},e.prototype._error=function(t){var e=this.destination;e.next(lt.a.createError(t)),e.complete()},e.prototype._complete=function(){var t=this.destination;t.next(lt.a.createComplete()),t.complete()},e}(p.a);function Me(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 je(t,this.accumulator,this.seed,this.hasSeed))},t}(),je=function(t){function e(e,n,r,i){var s=t.call(this,e)||this;return s.accumulator=n,s._seed=r,s.hasSeed=i,s.index=0,s}return r.__extends(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(r){this.destination.error(r)}this.seed=e,this.destination.next(e)},e}(p.a),Ne=n(1770);function Te(t,e){return arguments.length>=2?function(n){return Object(Ne.a)(Me(t,e),ve(1),ot(e))(n)}:function(e){return Object(Ne.a)(Me((function(e,n,r){return t(e,n,r+1)})),ve(1))(e)}}function Pe(t){return Te("function"===typeof t?function(e,n){return t(e,n)>0?e:n}:function(t,e){return t>e?t:e})}var Le=n(1803);function De(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return e.lift.call(Le.a.apply(void 0,[e].concat(t)))}}var Be=n(1777);function He(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"===typeof e?Object(G.b)((function(){return t}),e,n):("number"===typeof e&&(n=e),Object(G.b)((function(){return t}),n))}function Fe(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),function(r){return r.lift(new Ue(t,e,n))}}var Ue=function(){function t(t,e,n){this.accumulator=t,this.seed=e,this.concurrent=n}return t.prototype.call=function(t,e){return e.subscribe(new We(t,this.accumulator,this.seed,this.concurrent))},t}(),We=function(t){function e(e,n,r,i){var s=t.call(this,e)||this;return s.accumulator=n,s.acc=r,s.concurrent=i,s.hasValue=!1,s.hasCompleted=!1,s.buffer=[],s.active=0,s.index=0,s}return r.__extends(e,t),e.prototype._next=function(t){if(this.active<this.concurrent){var e=this.index++,n=this.destination,r=void 0;try{r=(0,this.accumulator)(this.acc,t,e)}catch(i){return n.error(i)}this.active++,this._innerSub(r)}else this.buffer.push(t)},e.prototype._innerSub=function(t){var e=new i.a(this),n=this.destination;n.add(e);var r=Object(i.c)(t,e);r!==e&&n.add(r)},e.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete()),this.unsubscribe()},e.prototype.notifyNext=function(t){var e=this.destination;this.acc=t,this.hasValue=!0,e.next(t)},e.prototype.notifyComplete=function(){var t=this.buffer;this.active--,t.length>0?this._next(t.shift()):0===this.active&&this.hasCompleted&&(!1===this.hasValue&&this.destination.next(this.acc),this.destination.complete())},e}(i.b);function ze(t){return Te("function"===typeof t?function(e,n){return t(e,n)<0?e:n}:function(t,e){return t<e?t:e})}var qe=n(1796);function Ve(t,e){return function(n){var r;if(r="function"===typeof t?t:function(){return t},"function"===typeof e)return n.lift(new Je(r,e));var i=Object.create(n,qe.b);return i.source=n,i.subjectFactory=r,i}}var Je=function(){function t(t,e){this.subjectFactory=t,this.selector=e}return t.prototype.call=function(t,e){var n=this.selector,r=this.subjectFactory(),i=n(r).subscribe(t);return i.add(e.subscribe(r)),i},t}(),Ge=n(1798);function Ye(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 1===t.length&&Object(U.a)(t[0])&&(t=t[0]),function(e){return e.lift(new $e(t))}}var $e=function(){function t(t){this.nextSources=t}return t.prototype.call=function(t,e){return e.subscribe(new Ke(t,this.nextSources))},t}(),Ke=function(t){function e(e,n){var r=t.call(this,e)||this;return r.destination=e,r.nextSources=n,r}return r.__extends(e,t),e.prototype.notifyError=function(){this.subscribeToNextSource()},e.prototype.notifyComplete=function(){this.subscribeToNextSource()},e.prototype._error=function(t){this.subscribeToNextSource(),this.unsubscribe()},e.prototype._complete=function(){this.subscribeToNextSource(),this.unsubscribe()},e.prototype.subscribeToNextSource=function(){var t=this.nextSources.shift();if(t){var e=new i.a(this),n=this.destination;n.add(e);var r=Object(i.c)(t,e);r!==e&&n.add(r)}else this.destination.complete()},e}(i.b);function Qe(){return function(t){return t.lift(new Xe)}}var Xe=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new Ze(t))},t}(),Ze=function(t){function e(e){var n=t.call(this,e)||this;return n.hasPrev=!1,n}return r.__extends(e,t),e.prototype._next=function(t){var e;this.hasPrev?e=[this.prev,t]:this.hasPrev=!0,this.prev=t,e&&this.destination.next(e)},e}(p.a),tn=n(1825);function en(t,e){return function(n){return[Object(jt.a)(t,e)(n),Object(jt.a)(Object(tn.a)(t,e))(n)]}}function nn(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t.length;if(0===n)throw new Error("list of properties cannot be empty.");return function(e){return Object(Qt.a)(rn(t,n))(e)}}function rn(t,e){return function(n){for(var r=n,i=0;i<e;i++){var s=null!=r?r[t[i]]:void 0;if(void 0===s)return;r=s}return r}}var sn=n(1736);function on(t){return t?Ve((function(){return new sn.a}),t):Ve(new sn.a)}var cn=n(1797);function an(t){return function(e){return Ve(new cn.a(t))(e)}}var un=n(1764);function ln(){return function(t){return Ve(new un.a)(t)}}var hn=n(1773);function dn(t,e,n,r){n&&"function"!==typeof n&&(r=n);var i="function"===typeof n?n:void 0,s=new hn.a(t,e,r);return function(t){return Ve((function(){return s}),i)(t)}}var fn=n(1804);function pn(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return 1===t.length&&Object(U.a)(t[0])&&(t=t[0]),e.lift.call(fn.a.apply(void 0,[e].concat(t)))}}function bn(t){return void 0===t&&(t=-1),function(e){return 0===t?Object(Bt.b)():t<0?e.lift(new yn(-1,e)):e.lift(new yn(t-1,e))}}var yn=function(){function t(t,e){this.count=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new gn(t,this.count,this.source))},t}(),gn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.count=n,i.source=r,i}return r.__extends(e,t),e.prototype.complete=function(){if(!this.isStopped){var e=this.source,n=this.count;if(0===n)return t.prototype.complete.call(this);n>-1&&(this.count=n-1),e.subscribe(this._unsubscribeAndRecycle())}},e}(p.a);function mn(t){return function(e){return e.lift(new _n(t))}}var _n=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){return e.subscribe(new vn(t,this.notifier,e))},t}(),vn=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.__extends(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 sn.a;try{e=(0,this.notifier)(this.notifications)}catch(n){return t.prototype.complete.call(this)}this.retries=e,this.retriesSubscription=Object(i.c)(e,new i.a(this))},e}(i.b);function wn(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 xn(t,this.count,this.source))},t}(),xn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.count=n,i.source=r,i}return r.__extends(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.a);function Sn(t){return function(e){return e.lift(new kn(t,e))}}var kn=function(){function t(t,e){this.notifier=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new Cn(t,this.notifier,this.source))},t}(),Cn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.notifier=n,i.source=r,i}return r.__extends(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=this.errors,r=this.retries,s=this.retriesSubscription;if(r)this.errors=void 0,this.retriesSubscription=void 0;else{n=new sn.a;try{r=(0,this.notifier)(n)}catch(o){return t.prototype.error.call(this,o)}s=Object(i.c)(r,new i.a(this))}this._unsubscribeAndRecycle(),this.errors=n,this.retries=r,this.retriesSubscription=s,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.b),In=n(1771);function An(t){return function(e){return e.lift(new On(t))}}var On=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){var n=new Mn(t),r=e.subscribe(n);return r.add(Object(i.c)(this.notifier,new i.a(n))),r},t}(),Mn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.hasValue=!1,e}return r.__extends(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.b);function Rn(t,e){return void 0===e&&(e=a.a),function(n){return n.lift(new jn(t,e))}}var jn=function(){function t(t,e){this.period=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new Nn(t,this.period,this.scheduler))},t}(),Nn=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(Tn,n,{subscriber:i,period:n})),i}return r.__extends(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.a);function Tn(t){var e=t.subscriber,n=t.period;e.notifyNext(),this.schedule(t,n)}function Pn(t,e){return function(n){return n.lift(new Ln(t,e))}}var Ln=function(){function t(t,e){this.compareTo=t,this.comparator=e}return t.prototype.call=function(t,e){return e.subscribe(new Dn(t,this.compareTo,this.comparator))},t}(),Dn=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 Bn(e,i))),i}return r.__extends(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(),s=n.shift(),o=!1;try{o=r?r(i,s):i===s}catch(c){this.destination.error(c)}o||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.a),Bn=function(t){function e(e,n){var r=t.call(this,e)||this;return r.parent=n,r}return r.__extends(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.a);function Hn(){return new sn.a}function Fn(){return function(t){return Object(In.a)()(Ve(Hn)(t))}}function Un(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,s=t.windowTime,o=void 0===s?Number.POSITIVE_INFINITY:s,c=t.refCount,a=t.scheduler,u=0,l=!1,h=!1;return function(t){var r;u++,!e||l?(l=!1,e=new hn.a(i,o,a),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(){u--,r.unsubscribe(),r=void 0,n&&!h&&c&&0===u&&(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.__extends(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(n){this.destination.error(n)}},e.prototype._complete=function(){var t=this.destination;this.index>0?(t.next(this.seenValue?this.singleValue:void 0),t.complete()):t.error(new Nt.a)},e}(p.a);function Vn(t){return function(e){return e.lift(new Jn(t))}}var Jn=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.__extends(e,t),e.prototype._next=function(t){++this.count>this.total&&this.destination.next(t)},e}(p.a);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.a}return t.prototype.call=function(t,e){return 0===this._skipCount?e.subscribe(new p.a(t)):e.subscribe(new Kn(t,this._skipCount))},t}(),Kn=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.__extends(e,t),e.prototype._next=function(t){var e=this._skipCount,n=this._count++;if(n<e)this._ring[n]=t;else{var r=n%e,i=this._ring,s=i[r];i[r]=t,this.destination.next(s)}},e}(p.a);function Qn(t){return function(e){return e.lift(new Xn(t))}}var Xn=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){return e.subscribe(new Zn(t,this.notifier))},t}(),Zn=function(t){function e(e,n){var r=t.call(this,e)||this;r.hasValue=!1;var s=new i.a(r);r.add(s),r.innerSubscription=s;var o=Object(i.c)(n,s);return o!==s&&(r.add(o),r.innerSubscription=o),r}return r.__extends(e,t),e.prototype._next=function(e){this.hasValue&&t.prototype._next.call(this,e)},e.prototype.notifyNext=function(){this.hasValue=!0,this.innerSubscription&&this.innerSubscription.unsubscribe()},e.prototype.notifyComplete=function(){},e}(i.b);function tr(t){return function(e){return e.lift(new er(t))}}var er=function(){function t(t){this.predicate=t}return t.prototype.call=function(t,e){return e.subscribe(new nr(t,this.predicate))},t}(),nr=function(t){function e(e,n){var r=t.call(this,e)||this;return r.predicate=n,r.skipping=!0,r.index=0,r}return r.__extends(e,t),e.prototype._next=function(t){var e=this.destination;this.skipping&&this.tryCallPredicate(t),this.skipping||e.next(t)},e.prototype.tryCallPredicate=function(t){try{var e=this.predicate(t,this.index++);this.skipping=Boolean(e)}catch(n){this.destination.error(n)}},e}(p.a);function rr(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[t.length-1];return Object(_.a)(n)?(t.pop(),function(e){return Object(q.a)(t,e,n)}):function(e){return Object(q.a)(t,e)}}var ir=n(1782),sr=n(1779),or=function(t){function e(e,n,r){void 0===n&&(n=0),void 0===r&&(r=ir.a);var i=t.call(this)||this;return i.source=e,i.delayTime=n,i.scheduler=r,(!Object(sr.a)(n)||n<0)&&(i.delayTime=0),r&&"function"===typeof r.schedule||(i.scheduler=ir.a),i}return r.__extends(e,t),e.create=function(t,n,r){return void 0===n&&(n=0),void 0===r&&(r=ir.a),new e(t,n,r)},e.dispatch=function(t){var e=t.source,n=t.subscriber;return this.add(e.subscribe(n))},e.prototype._subscribe=function(t){var n=this.delayTime,r=this.source;return this.scheduler.schedule(e.dispatch,n,{source:r,subscriber:t})},e}(bt.a);function cr(t,e){return void 0===e&&(e=0),function(n){return n.lift(new ar(t,e))}}var ar=function(){function t(t,e){this.scheduler=t,this.delay=e}return t.prototype.call=function(t,e){return new or(e,this.delay,this.scheduler).subscribe(t)},t}();function ur(t,e){return"function"===typeof e?function(n){return n.pipe(ur((function(n,r){return Object(W.a)(t(n,r)).pipe(Object(Qt.a)((function(t,i){return e(n,t,r,i)})))})))}:function(e){return e.lift(new lr(t))}}var lr=function(){function t(t){this.project=t}return t.prototype.call=function(t,e){return e.subscribe(new hr(t,this.project))},t}(),hr=function(t){function e(e,n){var r=t.call(this,e)||this;return r.project=n,r.index=0,r}return r.__extends(e,t),e.prototype._next=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(r){return void this.destination.error(r)}this._innerSub(e)},e.prototype._innerSub=function(t){var e=this.innerSubscription;e&&e.unsubscribe();var n=new i.a(this),r=this.destination;r.add(n),this.innerSubscription=Object(i.c)(t,n),this.innerSubscription!==n&&r.add(this.innerSubscription)},e.prototype._complete=function(){var e=this.innerSubscription;e&&!e.closed||t.prototype._complete.call(this),this.unsubscribe()},e.prototype._unsubscribe=function(){this.innerSubscription=void 0},e.prototype.notifyComplete=function(){this.innerSubscription=void 0,this.isStopped&&t.prototype._complete.call(this)},e.prototype.notifyNext=function(t){this.destination.next(t)},e}(i.b);function dr(){return ur(he.a)}function fr(t,e){return e?ur((function(){return t}),e):ur((function(){return t}))}function pr(t){return function(e){return e.lift(new br(t))}}var br=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){var n=new yr(t),r=Object(i.c)(this.notifier,new i.a(n));return r&&!n.seenValue?(n.add(r),e.subscribe(n)):n},t}(),yr=function(t){function e(e){var n=t.call(this,e)||this;return n.seenValue=!1,n}return r.__extends(e,t),e.prototype.notifyNext=function(){this.seenValue=!0,this.complete()},e.prototype.notifyComplete=function(){},e}(i.b);function gr(t,e){return void 0===e&&(e=!1),function(n){return n.lift(new mr(t,e))}}var mr=function(){function t(t,e){this.predicate=t,this.inclusive=e}return t.prototype.call=function(t,e){return e.subscribe(new _r(t,this.predicate,this.inclusive))},t}(),_r=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.predicate=n,i.inclusive=r,i.index=0,i}return r.__extends(e,t),e.prototype._next=function(t){var e,n=this.destination;try{e=this.predicate(t,this.index++)}catch(r){return void n.error(r)}this.nextOrComplete(t,e)},e.prototype.nextOrComplete=function(t,e){var n=this.destination;Boolean(e)?n.next(t):(this.inclusive&&n.next(t),n.complete())},e}(p.a),vr=n(1775),wr=n(1759);function Er(t,e,n){return function(r){return r.lift(new xr(t,e,n))}}var xr=function(){function t(t,e,n){this.nextOrObserver=t,this.error=e,this.complete=n}return t.prototype.call=function(t,e){return e.subscribe(new Sr(t,this.nextOrObserver,this.error,this.complete))},t}(),Sr=function(t){function e(e,n,r,i){var s=t.call(this,e)||this;return s._tapNext=vr.a,s._tapError=vr.a,s._tapComplete=vr.a,s._tapError=r||vr.a,s._tapComplete=i||vr.a,Object(wr.a)(n)?(s._context=s,s._tapNext=n):n&&(s._context=n,s._tapNext=n.next||vr.a,s._tapError=n.error||vr.a,s._tapComplete=n.complete||vr.a),s}return r.__extends(e,t),e.prototype._next=function(t){try{this._tapNext.call(this._context,t)}catch(e){return void this.destination.error(e)}this.destination.next(t)},e.prototype._error=function(t){try{this._tapError.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.error(t)},e.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()},e}(p.a),kr={leading:!0,trailing:!1};function Cr(t,e){return void 0===e&&(e=kr),function(n){return n.lift(new Ir(t,!!e.leading,!!e.trailing))}}var Ir=function(){function t(t,e,n){this.durationSelector=t,this.leading=e,this.trailing=n}return t.prototype.call=function(t,e){return e.subscribe(new Ar(t,this.durationSelector,this.leading,this.trailing))},t}(),Ar=function(t){function e(e,n,r,i){var s=t.call(this,e)||this;return s.destination=e,s.durationSelector=n,s._leading=r,s._trailing=i,s._hasValue=!1,s}return r.__extends(e,t),e.prototype._next=function(t){this._hasValue=!0,this._sendValue=t,this._throttled||(this._leading?this.send():this.throttle(t))},e.prototype.send=function(){var t=this._hasValue,e=this._sendValue;t&&(this.destination.next(e),this.throttle(e)),this._hasValue=!1,this._sendValue=void 0},e.prototype.throttle=function(t){var e=this.tryDurationSelector(t);e&&this.add(this._throttled=Object(i.c)(e,new i.a(this)))},e.prototype.tryDurationSelector=function(t){try{return this.durationSelector(t)}catch(e){return this.destination.error(e),null}},e.prototype.throttlingDone=function(){var t=this._throttled,e=this._trailing;t&&t.unsubscribe(),this._throttled=void 0,e&&this.send()},e.prototype.notifyNext=function(){this.throttlingDone()},e.prototype.notifyComplete=function(){this.throttlingDone()},e}(i.b);function Or(t,e,n){return void 0===e&&(e=a.a),void 0===n&&(n=kr),function(r){return r.lift(new Mr(t,e,n.leading,n.trailing))}}var Mr=function(){function t(t,e,n,r){this.duration=t,this.scheduler=e,this.leading=n,this.trailing=r}return t.prototype.call=function(t,e){return e.subscribe(new Rr(t,this.duration,this.scheduler,this.leading,this.trailing))},t}(),Rr=function(t){function e(e,n,r,i,s){var o=t.call(this,e)||this;return o.duration=n,o.scheduler=r,o.leading=i,o.trailing=s,o._hasTrailingValue=!1,o._trailingValue=null,o}return r.__extends(e,t),e.prototype._next=function(t){this.throttled?this.trailing&&(this._trailingValue=t,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(jr,this.duration,{subscriber:this})),this.leading?this.destination.next(t):this.trailing&&(this._trailingValue=t,this._hasTrailingValue=!0))},e.prototype._complete=function(){this._hasTrailingValue?(this.destination.next(this._trailingValue),this.destination.complete()):this.destination.complete()},e.prototype.clearThrottle=function(){var t=this.throttled;t&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),t.unsubscribe(),this.remove(t),this.throttled=null)},e}(p.a);function jr(t){t.subscriber.clearThrottle()}var Nr=n(1778);function Tr(t){return void 0===t&&(t=a.a),function(e){return Object(Nr.a)((function(){return e.pipe(Me((function(e,n){var r=e.current;return{value:n,current:t.now(),last:r}}),{current:t.now(),value:void 0,last:void 0}),Object(Qt.a)((function(t){var e=t.current,n=t.last,r=t.value;return new Pr(r,e-n)})))}))}}var Pr=function(){return function(t,e){this.value=t,this.interval=e}}(),Lr=n(1801);function Dr(t,e,n){return void 0===n&&(n=a.a),function(r){var i=ut(t),s=i?+t-n.now():Math.abs(t);return r.lift(new Br(s,i,e,n))}}var Br=function(){function t(t,e,n,r){this.waitFor=t,this.absoluteTimeout=e,this.withObservable=n,this.scheduler=r}return t.prototype.call=function(t,e){return e.subscribe(new Hr(t,this.absoluteTimeout,this.waitFor,this.withObservable,this.scheduler))},t}(),Hr=function(t){function e(e,n,r,i,s){var o=t.call(this,e)||this;return o.absoluteTimeout=n,o.waitFor=r,o.withObservable=i,o.scheduler=s,o.scheduleTimeout(),o}return r.__extends(e,t),e.dispatchTimeout=function(t){var e=t.withObservable;t._unsubscribeAndRecycle(),t.add(Object(i.c)(e,new i.a(t)))},e.prototype.scheduleTimeout=function(){var t=this.action;t?this.action=t.schedule(this,this.waitFor):this.add(this.action=this.scheduler.schedule(e.dispatchTimeout,this.waitFor,this))},e.prototype._next=function(e){this.absoluteTimeout||this.scheduleTimeout(),t.prototype._next.call(this,e)},e.prototype._unsubscribe=function(){this.action=void 0,this.scheduler=null,this.withObservable=null},e}(i.b),Fr=n(1774);function Ur(t,e){return void 0===e&&(e=a.a),Dr(t,Object(Fr.a)(new Lr.a),e)}function Wr(t){return void 0===t&&(t=a.a),Object(Qt.a)((function(e){return new zr(e,t.now())}))}var zr=function(){return function(t,e){this.value=t,this.timestamp=e}}();function qr(t,e,n){return 0===n?[e]:(t.push(e),t)}function Vr(){return Te(qr,[])}function Jr(t){return function(e){return e.lift(new Gr(t))}}var Gr=function(){function t(t){this.windowBoundaries=t}return t.prototype.call=function(t,e){var n=new Yr(t),r=e.subscribe(n);return r.closed||n.add(Object(i.c)(this.windowBoundaries,new i.a(n))),r},t}(),Yr=function(t){function e(e){var n=t.call(this,e)||this;return n.window=new sn.a,e.next(n.window),n}return r.__extends(e,t),e.prototype.notifyNext=function(){this.openWindow()},e.prototype.notifyError=function(t){this._error(t)},e.prototype.notifyComplete=function(){this._complete()},e.prototype._next=function(t){this.window.next(t)},e.prototype._error=function(t){this.window.error(t),this.destination.error(t)},e.prototype._complete=function(){this.window.complete(),this.destination.complete()},e.prototype._unsubscribe=function(){this.window=null},e.prototype.openWindow=function(){var t=this.window;t&&t.complete();var e=this.destination,n=this.window=new sn.a;e.next(n)},e}(i.b);function $r(t,e){return void 0===e&&(e=0),function(n){return n.lift(new Kr(t,e))}}var Kr=function(){function t(t,e){this.windowSize=t,this.startWindowEvery=e}return t.prototype.call=function(t,e){return e.subscribe(new Qr(t,this.windowSize,this.startWindowEvery))},t}(),Qr=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.destination=e,i.windowSize=n,i.startWindowEvery=r,i.windows=[new sn.a],i.count=0,e.next(i.windows[0]),i}return r.__extends(e,t),e.prototype._next=function(t){for(var e=this.startWindowEvery>0?this.startWindowEvery:this.windowSize,n=this.destination,r=this.windowSize,i=this.windows,s=i.length,o=0;o<s&&!this.closed;o++)i[o].next(t);var c=this.count-r+1;if(c>=0&&c%e===0&&!this.closed&&i.shift().complete(),++this.count%e===0&&!this.closed){var a=new sn.a;i.push(a),n.next(a)}},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.a);function Xr(t){var e=a.a,n=null,r=Number.POSITIVE_INFINITY;return Object(_.a)(arguments[3])&&(e=arguments[3]),Object(_.a)(arguments[2])?e=arguments[2]:Object(sr.a)(arguments[2])&&(r=Number(arguments[2])),Object(_.a)(arguments[1])?e=arguments[1]:Object(sr.a)(arguments[1])&&(n=Number(arguments[1])),function(i){return i.lift(new Zr(t,n,r,e))}}var Zr=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.__extends(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}(sn.a),ei=function(t){function e(e,n,r,i,s){var o=t.call(this,e)||this;o.destination=e,o.windowTimeSpan=n,o.windowCreationInterval=r,o.maxWindowSize=i,o.scheduler=s,o.windows=[];var c=o.openWindow();if(null!==r&&r>=0){var a={subscriber:o,window:c,context:null},u={windowTimeSpan:n,windowCreationInterval:r,subscriber:o,scheduler:s};o.add(s.schedule(ii,n,a)),o.add(s.schedule(ri,r,u))}else{var l={subscriber:o,window:c,windowTimeSpan:n};o.add(s.schedule(ni,n,l))}return o}return r.__extends(e,t),e.prototype._next=function(t){for(var e=this.windows,n=e.length,r=0;r<n;r++){var i=e[r];i.closed||(i.next(t),i.numberOfNextedValues>=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.a);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,s=n.openWindow(),o=this,c={action:o,subscription:null},a={subscriber:n,window:s,context:c};c.subscription=r.schedule(ii,e,a),o.add(c.subscription),o.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 si(t,e){return function(n){return n.lift(new oi(t,e))}}var oi=function(){function t(t,e){this.openings=t,this.closingSelector=e}return t.prototype.call=function(t,e){return e.subscribe(new ci(t,this.openings,this.closingSelector))},t}(),ci=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=Object(A.a)(i,n,n)),i}return r.__extends(e,t),e.prototype._next=function(t){var e=this.contexts;if(e)for(var n=e.length,r=0;r<n;r++)e[r].window.next(t)},e.prototype._error=function(e){var n=this.contexts;if(this.contexts=null,n)for(var r=n.length,i=-1;++i<r;){var s=n[i];s.window.error(e),s.subscription.unsubscribe()}t.prototype._error.call(this,e)},e.prototype._complete=function(){var e=this.contexts;if(this.contexts=null,e)for(var n=e.length,r=-1;++r<n;){var i=e[r];i.window.complete(),i.subscription.unsubscribe()}t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.contexts;if(this.contexts=null,t)for(var e=t.length,n=-1;++n<e;){var r=t[n];r.window.unsubscribe(),r.subscription.unsubscribe()}},e.prototype.notifyNext=function(t,e,n,r,i){if(t===this.openings){var s=void 0;try{s=(0,this.closingSelector)(e)}catch(l){return this.error(l)}var o=new sn.a,c=new I.a,a={window:o,subscription:c};this.contexts.push(a);var u=Object(A.a)(this,s,a);u.closed?this.closeWindow(this.contexts.length-1):(u.context=a,c.add(u)),this.destination.next(o)}else this.closeWindow(this.contexts.indexOf(t))},e.prototype.notifyError=function(t){this.error(t)},e.prototype.notifyComplete=function(t){t!==this.openSubscription&&this.closeWindow(this.contexts.indexOf(t.context))},e.prototype.closeWindow=function(t){if(-1!==t){var e=this.contexts,n=e[t],r=n.window,i=n.subscription;e.splice(t,1),r.complete(),i.unsubscribe()}},e}(O.a);function ai(t){return function(e){return e.lift(new ui(t))}}var ui=function(){function t(t){this.closingSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new li(t,this.closingSelector))},t}(),li=function(t){function e(e,n){var r=t.call(this,e)||this;return r.destination=e,r.closingSelector=n,r.openWindow(),r}return r.__extends(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.openWindow(i)},e.prototype.notifyError=function(t){this._error(t)},e.prototype.notifyComplete=function(t){this.openWindow(t)},e.prototype._next=function(t){this.window.next(t)},e.prototype._error=function(t){this.window.error(t),this.destination.error(t),this.unsubscribeClosingNotification()},e.prototype._complete=function(){this.window.complete(),this.destination.complete(),this.unsubscribeClosingNotification()},e.prototype.unsubscribeClosingNotification=function(){this.closingNotification&&this.closingNotification.unsubscribe()},e.prototype.openWindow=function(t){void 0===t&&(t=null),t&&(this.remove(t),t.unsubscribe());var e=this.window;e&&e.complete();var n,r=this.window=new sn.a;this.destination.next(r);try{n=(0,this.closingSelector)()}catch(i){return this.destination.error(i),void this.window.error(i)}this.add(this.closingNotification=Object(A.a)(this,n))},e}(O.a);function hi(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){var n;"function"===typeof t[t.length-1]&&(n=t.pop());var r=t;return e.lift(new di(r,n))}}var di=function(){function t(t,e){this.observables=t,this.project=e}return t.prototype.call=function(t,e){return e.subscribe(new fi(t,this.observables,this.project))},t}(),fi=function(t){function e(e,n,r){var i=t.call(this,e)||this;i.observables=n,i.project=r,i.toRespond=[];var s=n.length;i.values=new Array(s);for(var o=0;o<s;o++)i.toRespond.push(o);for(o=0;o<s;o++){var c=n[o];i.add(Object(A.a)(i,c,void 0,o))}return i}return r.__extends(e,t),e.prototype.notifyNext=function(t,e,n){this.values[n]=e;var r=this.toRespond;if(r.length>0){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(n){return void this.destination.error(n)}this.destination.next(e)},e}(O.a),pi=n(1780);function bi(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return e.lift.call(pi.b.apply(void 0,[e].concat(t)))}}function yi(t){return function(e){return e.lift(new pi.a(t))}}},1782:function(t,e,n){"use strict";n.d(e,"b",(function(){return d})),n.d(e,"a",(function(){return f}));var r=n(121),i=1,s=function(){return Promise.resolve()}(),o={};function c(t){return t in o&&(delete o[t],!0)}var a=function(t){var e=i++;return o[e]=!0,s.then((function(){return c(e)&&t()})),e},u=function(t){c(t)},l=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return r.__extends(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=a(e.flush.bind(e,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&&(u(n),e.scheduled=void 0)},e}(n(1768).a),h=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(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<i&&(t=n.shift()));if(this.active=!1,e){for(;++r<i&&(t=n.shift());)t.unsubscribe();throw e}},e}(n(1763).a),d=new h(l),f=d},1783:function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var r=n(1822),i=n(1791),s=n(1765),o=n(1746),c=n(1823),a=n(1824),u=n(1794),l=function(t){if(t&&"function"===typeof t[o.a])return l=t,function(t){var e=l[o.a]();if("function"!==typeof e.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return e.subscribe(t)};if(Object(c.a)(t))return Object(r.a)(t);if(Object(a.a)(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.a),t};if(t&&"function"===typeof t[s.a])return e=t,function(t){for(var n=e[s.a]();;){var r=void 0;try{r=n.next()}catch(i){return t.error(i),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=Object(u.a)(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.")}},1784:function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return c}));var r=n(121),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.__extends(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(1768).a),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e}(n(1763).a),o=new s(i),c=o},1785:function(t,e,n){"use strict";(function(t){var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.CoinbaseWalletProvider=void 0;const i=r(n(1769)),s=r(n(21)),o=n(1786),c=n(1789),a=n(1790),u=n(1827),l=n(1745),h=r(n(1848)),d=n(1856),f=n(1857),p=n(1858),b="DefaultChainId",y="DefaultJsonRpcUrl",g="HasChainBeenSwitched",m="HasChainOverriddenFromRelay";class _ extends i.default{constructor(t){var e,n;super(),this._filterPolyfill=new d.FilterPolyfill(this),this._subscriptionManager=new p.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._eventListener=t.eventListener,this.isCoinbaseWallet=null===(e=t.overrideIsCoinbaseWallet)||void 0===e||e,this.isCoinbaseBrowser=null!==(n=t.overrideIsCoinbaseBrowser)&&void 0!==n&&n,this.qrUrl=t.qrUrl,this.supportsAddressSwitching=t.supportsAddressSwitching;const r=this.getChainId(),i=(0,l.prepend0x)(r.toString(16));this.emit("connect",{chainIdStr:i});const s=this._storage.getItem(u.LOCAL_STORAGE_ADDRESSES_KEY);if(s){const t=s.split(" ");""!==t[0]&&(this._addresses=t.map((t=>(0,l.ensureAddressString)(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,l.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(y))&&void 0!==t?t:this._jsonRpcUrlFromOpts}set jsonRpcUrl(t){this._storage.setItem(y,t)}get isChainOverridden(){return"true"===this._storage.getItem(m)}set isChainOverridden(t){this._storage.setItem(m,t.toString())}setProviderInfo(t,e){this.isChainOverridden||this.updateProviderInfo(t,this.getChainId(),!1)}updateProviderInfo(t,e,n){if("true"===this._storage.getItem(g)&&n)return;n&&(this.isChainOverridden=!0),this.jsonRpcUrl=t;const r=this.getChainId();this._storage.setItem(b,e.toString(10));!((0,l.ensureIntNumber)(e)!==r)&&this.hasMadeFirstChainChangedEmission||(this.emit("chainChanged",this.getChainId()),this.hasMadeFirstChainChangedEmission=!0)}async watchAsset(t,e,n,r,i,s){const o=await this.initializeRelay();return!!(await o.watchAsset(t,e,n,r,i,null===s||void 0===s?void 0:s.toString()).promise).result}async addEthereumChain(t,e,n,r,i,s){var o,c;if((0,l.ensureIntNumber)(t)===this.getChainId())return!1;const a=await this.initializeRelay(),u=a.inlineAddEthereumChain(t.toString());this._isAuthorized()||u||await a.requestEthereumAccounts().promise;const h=await a.addEthereumChain(t.toString(),e,i,n,r,s).promise;return!0===(null===(o=h.result)||void 0===o?void 0:o.isApproved)&&(this._storage.setItem(g,"true"),this.updateProviderInfo(e[0],t,!1)),!0===(null===(c=h.result)||void 0===c?void 0:c.isApproved)}async switchEthereumChain(t){if((0,l.ensureIntNumber)(t)===this.getChainId())return;const e=await this.initializeRelay(),n=await e.switchEthereumChain(t.toString(10)).promise;if(n.errorCode)throw o.ethErrors.provider.custom({code:n.errorCode});const r=n.result;r.isApproved&&r.rpcUrl.length>0&&(this._storage.setItem(g,"true"),this.updateProviderInfo(r.rpcUrl,t,!1))}setAppInfo(t,e){this.initializeRelay().then((n=>n.setAppInfo(t,e)))}async enable(){var t;return null===(t=this._eventListener)||void 0===t||t.onEvent(c.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::enable",addresses_length:this._addresses.length,sessionIdHash:this._relay?a.Session.hash(this._relay.session.id):null}),this._addresses.length>0?[...this._addresses]:await this._send(f.JSONRPCMethod.eth_requestAccounts)}async close(){(await this.initializeRelay()).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)}async 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;return 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 o.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 o.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 o.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,l.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(`Coinbase Wallet 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,l.ensureAddressString)(t)));JSON.stringify(e)!==JSON.stringify(this._addresses)&&(this._addresses.length>0&&!1===this.supportsAddressSwitching||(this._addresses=e,this.emit("accountsChanged",this._addresses),this._storage.setItem(u.LOCAL_STORAGE_ADDRESSES_KEY,e.join(" "))))}_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 s=this._handleSubscriptionMethods(t);if(void 0!==s)return void s.then((n=>e({jsonrpc:"2.0",id:t.id,result:n.result}))).catch((t=>n(t)))}catch(r){return n(r)}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 f.JSONRPCMethod.eth_accounts:return this._eth_accounts();case f.JSONRPCMethod.eth_coinbase:return this._eth_coinbase();case f.JSONRPCMethod.eth_uninstallFilter:return this._eth_uninstallFilter(n);case f.JSONRPCMethod.net_version:return this._net_version();case f.JSONRPCMethod.eth_chainId:return this._eth_chainId();default:return}}async _handleAsynchronousMethods(t){const{method:e}=t,n=t.params||[];switch(e){case f.JSONRPCMethod.eth_requestAccounts:return this._eth_requestAccounts();case f.JSONRPCMethod.eth_sign:return this._eth_sign(n);case f.JSONRPCMethod.eth_ecRecover:return this._eth_ecRecover(n);case f.JSONRPCMethod.personal_sign:return this._personal_sign(n);case f.JSONRPCMethod.personal_ecRecover:return this._personal_ecRecover(n);case f.JSONRPCMethod.eth_signTransaction:return this._eth_signTransaction(n);case f.JSONRPCMethod.eth_sendRawTransaction:return this._eth_sendRawTransaction(n);case f.JSONRPCMethod.eth_sendTransaction:return this._eth_sendTransaction(n);case f.JSONRPCMethod.eth_signTypedData_v1:return this._eth_signTypedData_v1(n);case f.JSONRPCMethod.eth_signTypedData_v2:return this._throwUnsupportedMethodError();case f.JSONRPCMethod.eth_signTypedData_v3:return this._eth_signTypedData_v3(n);case f.JSONRPCMethod.eth_signTypedData_v4:case f.JSONRPCMethod.eth_signTypedData:return this._eth_signTypedData_v4(n);case f.JSONRPCMethod.cbWallet_arbitrary:return this._cbwallet_arbitrary(n);case f.JSONRPCMethod.wallet_addEthereumChain:return this._wallet_addEthereumChain(n);case f.JSONRPCMethod.wallet_switchEthereumChain:return this._wallet_switchEthereumChain(n);case f.JSONRPCMethod.wallet_watchAsset:return this._wallet_watchAsset(n)}return(await this.initializeRelay()).makeEthereumJSONRPCRequest(t,this.jsonRpcUrl)}_handleAsynchronousFilterMethods(t){const{method:e}=t,n=t.params||[];switch(e){case f.JSONRPCMethod.eth_newFilter:return this._eth_newFilter(n);case f.JSONRPCMethod.eth_newBlockFilter:return this._eth_newBlockFilter();case f.JSONRPCMethod.eth_newPendingTransactionFilter:return this._eth_newPendingTransactionFilter();case f.JSONRPCMethod.eth_getFilterChanges:return this._eth_getFilterChanges(n);case f.JSONRPCMethod.eth_getFilterLogs:return this._eth_getFilterLogs(n)}}_handleSubscriptionMethods(t){switch(t.method){case f.JSONRPCMethod.eth_subscribe:case f.JSONRPCMethod.eth_unsubscribe:return this._subscriptionManager.handleRequest(t)}}_isKnownAddress(t){try{const e=(0,l.ensureAddressString)(t);return this._addresses.map((t=>(0,l.ensureAddressString)(t))).includes(e)}catch(e){}return!1}_ensureKnownAddress(t){var e;if(!this._isKnownAddress(t))throw null===(e=this._eventListener)||void 0===e||e.onEvent(c.EVENTS.UNKNOWN_ADDRESS_ENCOUNTERED),new Error("Unknown Ethereum address")}_prepareTransactionParams(e){const n=e.from?(0,l.ensureAddressString)(e.from):this.selectedAddress;if(!n)throw new Error("Ethereum address is unavailable");this._ensureKnownAddress(n);return{fromAddress:n,toAddress:e.to?(0,l.ensureAddressString)(e.to):null,weiValue:null!=e.value?(0,l.ensureBN)(e.value):new s.default(0),data:e.data?(0,l.ensureBuffer)(e.data):t.alloc(0),nonce:null!=e.nonce?(0,l.ensureIntNumber)(e.nonce):null,gasPriceInWei:null!=e.gasPrice?(0,l.ensureBN)(e.gasPrice):null,maxFeePerGas:null!=e.maxFeePerGas?(0,l.ensureBN)(e.maxFeePerGas):null,maxPriorityFeePerGas:null!=e.maxPriorityFeePerGas?(0,l.ensureBN)(e.maxPriorityFeePerGas):null,gasLimit:null!=e.gas?(0,l.ensureBN)(e.gas):null,chainId:this.getChainId()}}_isAuthorized(){return this._addresses.length>0}_requireAuthorization(){if(!this._isAuthorized())throw o.ethErrors.provider.unauthorized({})}_throwUnsupportedMethodError(){throw o.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(i){if("string"===typeof i.message&&i.message.match(/(denied|rejected)/i))throw o.ethErrors.provider.userRejectedRequest("User denied message signature");throw i}}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,l.hexStringFromIntNumber)(this.getChainId())}getChainId(){const t=this._storage.getItem(b)||"1",e=parseInt(t,10);return(0,l.ensureIntNumber)(e)}async _eth_requestAccounts(){var t;if(null===(t=this._eventListener)||void 0===t||t.onEvent(c.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::_eth_requestAccounts",addresses_length:this._addresses.length,sessionIdHash:this._relay?a.Session.hash(this._relay.session.id):null}),this._addresses.length>0)return Promise.resolve({jsonrpc:"2.0",id:0,result:this._addresses});let e;try{const t=await this.initializeRelay();e=await t.requestEthereumAccounts().promise}catch(n){if("string"===typeof n.message&&n.message.match(/(denied|rejected)/i))throw o.ethErrors.provider.userRejectedRequest("User denied account authorization");throw n}if(!e.result)throw new Error("accounts received is empty");return this._setAddresses(e.result),{jsonrpc:"2.0",id:0,result:this._addresses}}_eth_sign(t){this._requireAuthorization();const e=(0,l.ensureAddressString)(t[0]),n=(0,l.ensureBuffer)(t[1]);return this._signEthereumMessage(n,e,!1)}_eth_ecRecover(t){const e=(0,l.ensureBuffer)(t[0]),n=(0,l.ensureBuffer)(t[1]);return this._ethereumAddressFromSignedMessage(e,n,!1)}_personal_sign(t){this._requireAuthorization();const e=(0,l.ensureBuffer)(t[0]),n=(0,l.ensureAddressString)(t[1]);return this._signEthereumMessage(e,n,!0)}_personal_ecRecover(t){const e=(0,l.ensureBuffer)(t[0]),n=(0,l.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(n){if("string"===typeof n.message&&n.message.match(/(denied|rejected)/i))throw o.ethErrors.provider.userRejectedRequest("User denied transaction signature");throw n}}async _eth_sendRawTransaction(t){const e=(0,l.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(n){if("string"===typeof n.message&&n.message.match(/(denied|rejected)/i))throw o.ethErrors.provider.userRejectedRequest("User denied transaction signature");throw n}}async _eth_signTypedData_v1(t){this._requireAuthorization();const e=(0,l.ensureParsedJSONObject)(t[0]),n=(0,l.ensureAddressString)(t[1]);this._ensureKnownAddress(n);const r=h.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,l.ensureAddressString)(t[0]),n=(0,l.ensureParsedJSONObject)(t[1]);this._ensureKnownAddress(e);const r=h.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,l.ensureAddressString)(t[0]),n=(0,l.ensureParsedJSONObject)(t[1]);this._ensureKnownAddress(e);const r=h.default.hashForSignTypedData_v4({data:n}),i=JSON.stringify(n,null,2);return this._signEthereumMessage(r,e,!1,i)}async _cbwallet_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 s=t[0];if(0===(null===(e=s.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(!s.chainName||""===s.chainName.trim())throw o.ethErrors.provider.custom({code:0,message:"chainName is a required field"});if(!s.nativeCurrency)throw o.ethErrors.provider.custom({code:0,message:"nativeCurrency is a required field"});const c=parseInt(s.chainId,16);return await this.addEthereumChain(c,null!==(n=s.rpcUrls)&&void 0!==n?n:[],null!==(r=s.blockExplorerUrls)&&void 0!==r?r:[],s.chainName,null!==(i=s.iconUrls)&&void 0!==i?i:[],s.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}}async _wallet_watchAsset(t){var e;const n=Array.isArray(t)?t[0]:t;if(0===(null===(e=n.type)||void 0===e?void 0:e.length))throw o.ethErrors.rpc.invalidParams({message:"type is a required field"});if("ERC20"!==n.type)throw o.ethErrors.rpc.invalidParams({message:`Asset of type '${n.type}' not supported`});if(!(null===n||void 0===n?void 0:n.options))throw o.ethErrors.rpc.invalidParams({message:"options is a required field"});if(!n.options.address)throw o.ethErrors.rpc.invalidParams({message:"option address is a required option"});const r=this.getChainId(),{address:i,symbol:s,image:c,decimals:a}=n.options;return{jsonrpc:"2.0",id:0,result:await this.watchAsset(n.type,i,s,a,c,r)}}_eth_uninstallFilter(t){const e=(0,l.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,l.ensureHexString)(t[0]);return this._filterPolyfill.getFilterChanges(e)}_eth_getFilterLogs(t){const e=(0,l.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.CoinbaseWalletProvider=_}).call(this,n(60).Buffer)},1786:function(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(1787);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(1819);Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return i.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return i.getMessageFromCode}});const s=n(1843);Object.defineProperty(e,"ethErrors",{enumerable:!0,get:function(){return s.ethErrors}});const o=n(1788);Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return o.errorCodes}})},1787:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EthereumProviderError=e.EthereumRpcError=void 0;const r=n(1818);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(),s,2)}}e.EthereumRpcError=i;function s(t,e){if("[Circular]"!==e)return e}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)}}},1788:function(t,e,n){"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."}}},1789:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EVENTS=void 0,e.EVENTS={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_REQUEST_PUBLISHED:"walletlink_sdk.web3.request_published",WEB3_RESPONSE:"walletlink_sdk.web3.response",UNKNOWN_ADDRESS_ENCOUNTERED:"walletlink_sdk.unknown_address_encountered"}},1790:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Session=void 0;const r=n(1844),i=n(1757),s=n(1781),o=n(1745),c="session:id",a="session:secret",u="session:linked";class l{constructor(t,e,n,i){this._storage=t,this._id=e||(0,o.randomBytesHex)(16),this._secret=n||(0,o.randomBytesHex)(32);const s=r.sha256.create();s.update(`${this._id}, ${this._secret} WalletLink`),this._key=s.hex(),this._linked=!!i}static load(t){const e=t.getItem(c),n=t.getItem(u),r=t.getItem(a);return e&&r?new l(t,e,r,"1"===n):null}static get persistedSessionIdChange$(){return(0,i.fromEvent)(window,"storage").pipe((0,s.filter)((t=>t.key===c)),(0,s.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(c,this._id),this._storage.setItem(a,this._secret),this.persistLinked(),this}persistLinked(){this._storage.setItem(u,this._linked?"1":"0")}}e.Session=l},1791:function(t,e,n){"use strict";function r(t){setTimeout((function(){throw t}),0)}n.d(e,"a",(function(){return r}))},1792:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function(){return"function"===typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()}()},1793:function(t,e,n){"use strict";n.d(e,"a",(function(){return 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}()},1794:function(t,e,n){"use strict";function r(t){return null!==t&&"object"===typeof t}n.d(e,"a",(function(){return r}))},1795:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(1732);function i(t){for(;t;){var e=t,n=e.closed,i=e.destination,s=e.isStopped;if(n||s)return!1;t=i&&i instanceof r.a?i:null}return!0}},1796:function(t,e,n){"use strict";n.d(e,"a",(function(){return u})),n.d(e,"b",(function(){return l}));var r=n(121),i=n(1736),s=n(1733),o=n(1732),c=n(1735),a=n(1771),u=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.__extends(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 c.a).add(this.source.subscribe(new h(this.getSubject(),this))),t.closed&&(this._connection=null,t=c.a.EMPTY)),t},e.prototype.refCount=function(){return Object(a.a)()(this)},e}(s.a),l=function(){var t=u.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.__extends(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.b);o.a},1797:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(121),i=n(1736),s=n(1760),o=function(t){function e(e){var n=t.call(this)||this;return n._value=e,n}return r.__extends(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 s.a;return this._value},e.prototype.next=function(e){t.prototype.next.call(this,this._value=e)},e}(i.a)},1798:function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return a}));var r=n(121),i=n(1732),s=n(1752);function o(t,e){return void 0===e&&(e=0),function(n){return n.lift(new c(t,e))}}var c=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 a(t,this.scheduler,this.delay))},t}(),a=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.__extends(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 u(t,this.destination)))},e.prototype._next=function(t){this.scheduleMessage(s.a.createNext(t))},e.prototype._error=function(t){this.scheduleMessage(s.a.createError(t)),this.unsubscribe()},e.prototype._complete=function(){this.scheduleMessage(s.a.createComplete()),this.unsubscribe()},e}(i.a),u=function(){return function(t,e){this.notification=t,this.destination=e}}()},1799:function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(1733),i=n(1735);function s(t,e){return new r.a((function(n){var r=new i.a,s=0;return r.add(e.schedule((function(){s!==t.length?(n.next(t[s++]),n.closed||r.add(this.schedule())):n.complete()}))),r}))}},1800:function(t,e,n){"use strict";n.d(e,"a",(function(){return 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}()},1801:function(t,e,n){"use strict";n.d(e,"a",(function(){return 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}()},1802:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(1777);function i(){return Object(r.a)(1)}},1803:function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var r=n(1733),i=n(1743),s=n(1777),o=n(1762);function c(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Number.POSITIVE_INFINITY,c=null,a=t[t.length-1];return Object(i.a)(a)?(c=t.pop(),t.length>1&&"number"===typeof t[t.length-1]&&(n=t.pop())):"number"===typeof a&&(n=t.pop()),null===c&&1===t.length&&t[0]instanceof r.a?t[0]:Object(s.a)(n)(Object(o.a)(t,c))}},1804:function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(121),i=n(1738),s=n(1762),o=n(1747),c=n(1751);function a(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(1===t.length){if(!Object(i.a)(t[0]))return t[0];t=t[0]}return Object(s.a)(t,void 0).lift(new u)}var u=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new l(t))},t}(),l=function(t){function e(e){var n=t.call(this,e)||this;return n.hasFirst=!1,n.observables=[],n.subscriptions=[],n}return r.__extends(e,t),e.prototype._next=function(t){this.observables.push(t)},e.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else{for(var n=0;n<e&&!this.hasFirst;n++){var r=t[n],i=Object(c.a)(this,r,void 0,n);this.subscriptions&&this.subscriptions.push(i),this.add(i)}this.observables=null}},e.prototype.notifyNext=function(t,e,n){if(!this.hasFirst){this.hasFirst=!0;for(var r=0;r<this.subscriptions.length;r++)if(r!==n){var i=this.subscriptions[r];i.unsubscribe(),this.remove(i)}this.subscriptions=null}this.destination.next(e)},e}(o.a)},1805:function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var r=n(1733),i=n(1737),s=n(1779),o=n(1743);function c(t,e,n){void 0===t&&(t=0);var c=-1;return Object(s.a)(e)?c=Number(e)<1?1:Number(e):Object(o.a)(e)&&(n=e),Object(o.a)(n)||(n=i.a),new r.a((function(e){var r=Object(s.a)(t)?t:+t-n.now();return n.schedule(a,r,{index:0,period:c,subscriber:e})}))}function a(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)}}},1806:function(t,e,n){"use strict";var r=String.prototype.replace,i=/%20/g,s="RFC1738",o="RFC3986";t.exports={default:o,formatters:{RFC1738:function(t){return r.call(t,i,"+")},RFC3986:function(t){return String(t)}},RFC1738:s,RFC3986:o}},1807:function(t,e,n){"use strict";function r(){return t=>t}Object.defineProperty(e,"__esModule",{value:!0}),e.RegExpString=e.IntNumber=e.BigIntString=e.AddressString=e.HexString=e.OpaqueType=void 0,e.OpaqueType=r,e.HexString=t=>t,e.AddressString=t=>t,e.BigIntString=t=>t,e.IntNumber=function(t){return Math.floor(t)},e.RegExpString=t=>t},1808:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EthereumProviderError=e.EthereumRpcError=void 0;const r=n(1818);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(),s,2)}}e.EthereumRpcError=i;function s(t,e){if("[Circular]"!==e)return e}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)}}},1809:function(t,e,n){"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."}}},1810:function(t,e,n){const r=n(1769).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}}},1811:function(t,e){function n(t){return void 0===t||null===t?t:Number.parseInt(t,16)}function r(t){if(void 0===t||null===t)return t;return"0x"+t.toString(16)}t.exports=async function(t){let{provider:e,fromBlock:i,toBlock:s}=t;i||(i=s);const o=n(i),c=n(s),a=Array(c-o+1).fill().map(((t,e)=>o+e)).map(r);return await Promise.all(a.map((t=>function(t,e,n){return new Promise(((r,i)=>{t.sendAsync({id:1,jsonrpc:"2.0",method:e,params:n},((t,e)=>{if(t)return i(t);r(e.result)}))}))}(e,"eth_getBlockByNumber",[t,!1]))))}},1812:function(t,e,n){"use strict";n.r(e),n.d(e,"useCallback",(function(){return S})),n.d(e,"useContext",(function(){return k})),n.d(e,"useDebugValue",(function(){return C})),n.d(e,"useEffect",(function(){return _})),n.d(e,"useErrorBoundary",(function(){return I})),n.d(e,"useId",(function(){return A})),n.d(e,"useImperativeHandle",(function(){return E})),n.d(e,"useLayoutEffect",(function(){return v})),n.d(e,"useMemo",(function(){return x})),n.d(e,"useReducer",(function(){return m})),n.d(e,"useRef",(function(){return w})),n.d(e,"useState",(function(){return g}));var r,i,s,o,c=n(1756),a=0,u=[],l=[],h=c.options.__b,d=c.options.__r,f=c.options.diffed,p=c.options.__c,b=c.options.unmount;function y(t,e){c.options.__h&&c.options.__h(i,t,a||e),a=0;var n=i.__H||(i.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({__V:l}),n.__[t]}function g(t){return a=1,m(P,t)}function m(t,e,n){var s=y(r++,2);if(s.t=t,!s.__c&&(s.__=[n?n(e):P(void 0,e),function(t){var e=s.__N?s.__N[0]:s.__[0],n=s.t(e,t);e!==n&&(s.__N=[n,s.__[1]],s.__c.setState({}))}],s.__c=i,!i.u)){i.u=!0;var o=i.shouldComponentUpdate;i.shouldComponentUpdate=function(t,e,n){if(!s.__c.__H)return!0;var r=s.__c.__H.__.filter((function(t){return t.__c}));if(r.every((function(t){return!t.__N})))return!o||o.call(this,t,e,n);var i=!1;return r.forEach((function(t){if(t.__N){var e=t.__[0];t.__=t.__N,t.__N=void 0,e!==t.__[0]&&(i=!0)}})),!(!i&&s.__c.props===t)&&(!o||o.call(this,t,e,n))}}return s.__N||s.__}function _(t,e){var n=y(r++,3);!c.options.__s&&T(n.__H,e)&&(n.__=t,n.i=e,i.__H.__h.push(n))}function v(t,e){var n=y(r++,4);!c.options.__s&&T(n.__H,e)&&(n.__=t,n.i=e,i.__h.push(n))}function w(t){return a=5,x((function(){return{current:t}}),[])}function E(t,e,n){a=6,v((function(){return"function"==typeof t?(t(e()),function(){return t(null)}):t?(t.current=e(),function(){return t.current=null}):void 0}),null==n?n:n.concat(t))}function x(t,e){var n=y(r++,7);return T(n.__H,e)?(n.__V=t(),n.i=e,n.__h=t,n.__V):n.__}function S(t,e){return a=8,x((function(){return t}),e)}function k(t){var e=i.context[t.__c],n=y(r++,9);return n.c=t,e?(null==n.__&&(n.__=!0,e.sub(i)),e.props.value):t.__}function C(t,e){c.options.useDebugValue&&c.options.useDebugValue(e?e(t):t)}function I(t){var e=y(r++,10),n=g();return e.__=t,i.componentDidCatch||(i.componentDidCatch=function(t,r){e.__&&e.__(t,r),n[1](t)}),[n[0],function(){n[1](void 0)}]}function A(){var t=y(r++,11);if(!t.__){for(var e=i.__v;null!==e&&!e.__m&&null!==e.__;)e=e.__;var n=e.__m||(e.__m=[0,0]);t.__="P"+n[0]+"-"+n[1]++}return t.__}function O(){for(var t;t=u.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(j),t.__H.__h.forEach(N),t.__H.__h=[]}catch(i){t.__H.__h=[],c.options.__e(i,t.__v)}}c.options.__b=function(t){i=null,h&&h(t)},c.options.__r=function(t){d&&d(t),r=0;var e=(i=t.__c).__H;e&&(s===i?(e.__h=[],i.__h=[],e.__.forEach((function(t){t.__N&&(t.__=t.__N),t.__V=l,t.__N=t.i=void 0}))):(e.__h.forEach(j),e.__h.forEach(N),e.__h=[])),s=i},c.options.diffed=function(t){f&&f(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(1!==u.push(e)&&o===c.options.requestAnimationFrame||((o=c.options.requestAnimationFrame)||R)(O)),e.__H.__.forEach((function(t){t.i&&(t.__H=t.i),t.__V!==l&&(t.__=t.__V),t.i=void 0,t.__V=l}))),s=i=null},c.options.__c=function(t,e){e.some((function(t){try{t.__h.forEach(j),t.__h=t.__h.filter((function(t){return!t.__||N(t)}))}catch(s){e.some((function(t){t.__h&&(t.__h=[])})),e=[],c.options.__e(s,t.__v)}})),p&&p(t,e)},c.options.unmount=function(t){b&&b(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach((function(t){try{j(t)}catch(t){e=t}})),n.__H=void 0,e&&c.options.__e(e,n.__v))};var M="function"==typeof requestAnimationFrame;function R(t){var e,n=function(){clearTimeout(r),M&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);M&&(e=requestAnimationFrame(n))}function j(t){var e=i,n=t.__c;"function"==typeof n&&(t.__c=void 0,n()),i=e}function N(t){var e=i;t.__c=t.__(),i=e}function T(t,e){return!t||t.length!==e.length||e.some((function(e,n){return e!==t[n]}))}function P(t,e){return"function"==typeof e?e(t):e}},1813:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RelayMessageType=void 0,function(t){t.SESSION_ID_REQUEST="SESSION_ID_REQUEST",t.SESSION_ID_RESPONSE="SESSION_ID_RESPONSE",t.LINKED="LINKED",t.UNLINKED="UNLINKED",t.WEB3_REQUEST="WEB3_REQUEST",t.WEB3_REQUEST_CANCELED="WEB3_REQUEST_CANCELED",t.WEB3_RESPONSE="WEB3_RESPONSE"}(e.RelayMessageType||(e.RelayMessageType={}))},1815:function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var r=n(1733),i=n(1735),s=n(1746);var o=n(1799),c=n(1765);var a=n(1824),u=n(1823);function l(t,e){if(null!=t){if(function(t){return t&&"function"===typeof t[s.a]}(t))return function(t,e){return new r.a((function(n){var r=new i.a;return r.add(e.schedule((function(){var i=t[s.a]();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(Object(a.a)(t))return function(t,e){return new r.a((function(n){var r=new i.a;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(Object(u.a)(t))return Object(o.a)(t,e);if(function(t){return t&&"function"===typeof t[c.a]}(t)||"string"===typeof t)return function(t,e){if(!t)throw new Error("Iterable cannot be null");return new r.a((function(n){var r,s=new i.a;return s.add((function(){r&&"function"===typeof r.return&&r.return()})),s.add(e.schedule((function(){r=t[c.a](),s.add(e.schedule((function(){if(!n.closed){var t,e;try{var i=r.next();t=i.value,e=i.done}catch(s){return void n.error(s)}e?n.complete():(n.next(t),this.schedule())}})))}))),s}))}(t,e)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}},1817:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CoinbaseWalletSDK=void 0;const r=n(1842),i=n(1785),s=n(1881),o=n(1898),c=n(1910),a=n(1745),u=Object({NODE_ENV:"production",PUBLIC_URL:"https://cdn.decentraland.org/@dcl/explorer-website/0.1.0-7425750118.commit-ba43842",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_WEBSITE_VERSION:"0.1.0-7425750118.commit-ba43842",REACT_APP_EXPLORER_VERSION:"1.0.131583-20230718133624.commit-7106e1f",REACT_APP_EXPLORER_BASE_URL:""}).LINK_API_URL||"https://www.walletlink.org",l=Object({NODE_ENV:"production",PUBLIC_URL:"https://cdn.decentraland.org/@dcl/explorer-website/0.1.0-7425750118.commit-ba43842",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_WEBSITE_VERSION:"0.1.0-7425750118.commit-ba43842",REACT_APP_EXPLORER_VERSION:"1.0.131583-20230718133624.commit-7106e1f",REACT_APP_EXPLORER_BASE_URL:""}).SDK_VERSION||n(1911).version||"unknown";class h{constructor(t){var e,n;this._appName="",this._appLogoUrl=null,this._relay=null,this._relayEventManager=null;const i=t.linkAPIUrl||u;let a;a=t.uiConstructor?t.uiConstructor:t=>new s.WalletSDKUI(t),"undefined"===typeof t.overrideIsMetaMask?this._overrideIsMetaMask=!1:this._overrideIsMetaMask=t.overrideIsMetaMask,this._overrideIsCoinbaseWallet=null===(e=t.overrideIsCoinbaseWallet)||void 0===e||e,this._overrideIsCoinbaseBrowser=null!==(n=t.overrideIsCoinbaseBrowser)&&void 0!==n&&n,this._eventListener=t.eventListener;const d=new URL(i),f=`${d.protocol}//${d.host}`;this._storage=new r.ScopedLocalStorage(`-walletlink:${f}`),this._storage.setItem("version",h.VERSION),this.walletExtension||(this._relayEventManager=new c.WalletSDKRelayEventManager,this._relay=new o.WalletSDKRelay({linkAPIUrl:i,version:l,darkMode:!!t.darkMode,uiConstructor:a,storage:this._storage,relayEventManager:this._relayEventManager,eventListener:this._eventListener}),this.setAppInfo(t.appName,t.appLogoUrl),t.headlessMode||this._relay.attachUI())}makeWeb3Provider(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;const n=this.walletExtension;if(n)return this.isCipherProvider(n)||n.setProviderInfo(t,e),n;const r=this._relay;if(!r||!this._relayEventManager||!this._storage)throw new Error("Relay not initialized, should never happen");return t||r.setConnectDisabled(!0),new i.CoinbaseWalletProvider({relayProvider:()=>Promise.resolve(r),relayEventManager:this._relayEventManager,storage:this._storage,jsonRpcUrl:t,chainId:e,qrUrl:this.getQrUrl(),eventListener:this._eventListener,overrideIsMetaMask:this._overrideIsMetaMask,overrideIsCoinbaseWallet:this._overrideIsCoinbaseWallet,overrideIsCoinbaseBrowser:this._overrideIsCoinbaseBrowser})}setAppInfo(t,e){var n;this._appName=t||"DApp",this._appLogoUrl=e||(0,a.getFavicon)();const r=this.walletExtension;r?this.isCipherProvider(r)||r.setAppInfo(this._appName,this._appLogoUrl):null===(n=this._relay)||void 0===n||n.setAppInfo(this._appName,this._appLogoUrl)}disconnect(){var t;const e=this.walletExtension;e?e.close():null===(t=this._relay)||void 0===t||t.resetAndReload()}getQrUrl(){var t,e;return null!==(e=null===(t=this._relay)||void 0===t?void 0:t.getQRCodeUrl())&&void 0!==e?e:null}get walletExtension(){var t;return null!==(t=window.coinbaseWalletExtension)&&void 0!==t?t:window.walletLinkExtension}isCipherProvider(t){return"boolean"===typeof t.isCipher&&t.isCipher}}e.CoinbaseWalletSDK=h,h.VERSION=l},1818:function(t,e){t.exports=i,i.default=i,i.stable=c,i.stableStringify=c;var n=[],r=[];function i(t,e,i){var o;s(t,"",[],void 0);try{o=0===r.length?JSON.stringify(t,e,i):JSON.stringify(t,u(e),i)}catch(a){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==n.length;){var c=n.pop();4===c.length?Object.defineProperty(c[0],c[1],c[3]):c[0][c[1]]=c[2]}}return o}function s(t,e,i,o){var c;if("object"===typeof t&&null!==t){for(c=0;c<i.length;c++)if(i[c]===t){var a=Object.getOwnPropertyDescriptor(o,e);return void(void 0!==a.get?a.configurable?(Object.defineProperty(o,e,{value:"[Circular]"}),n.push([o,e,t,a])):r.push([t,e]):(o[e]="[Circular]",n.push([o,e,t])))}if(i.push(t),Array.isArray(t))for(c=0;c<t.length;c++)s(t[c],c,i,t);else{var u=Object.keys(t);for(c=0;c<u.length;c++){var l=u[c];s(t[l],l,i,t)}}i.pop()}}function o(t,e){return t<e?-1:t>e?1:0}function c(t,e,i){var s,o=a(t,"",[],void 0)||t;try{s=0===r.length?JSON.stringify(o,e,i):JSON.stringify(o,u(e),i)}catch(l){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==n.length;){var c=n.pop();4===c.length?Object.defineProperty(c[0],c[1],c[3]):c[0][c[1]]=c[2]}}return s}function a(t,e,i,s){var c;if("object"===typeof t&&null!==t){for(c=0;c<i.length;c++)if(i[c]===t){var u=Object.getOwnPropertyDescriptor(s,e);return void(void 0!==u.get?u.configurable?(Object.defineProperty(s,e,{value:"[Circular]"}),n.push([s,e,t,u])):r.push([t,e]):(s[e]="[Circular]",n.push([s,e,t])))}try{if("function"===typeof t.toJSON)return}catch(f){return}if(i.push(t),Array.isArray(t))for(c=0;c<t.length;c++)a(t[c],c,i,t);else{var l={},h=Object.keys(t).sort(o);for(c=0;c<h.length;c++){var d=h[c];a(t[d],d,i,t),l[d]=t[d]}if(void 0===s)return l;n.push([s,e,t]),s[e]=l}i.pop()}}function u(t){return t=void 0!==t?t:function(t,e){return e},function(e,n){if(r.length>0)for(var i=0;i<r.length;i++){var s=r[i];if(s[1]===e&&s[0]===n){n="[Circular]",r.splice(i,1);break}}return t.call(this,e,n)}}},1819:function(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(1788),i=n(1787),s=r.errorCodes.rpc.internal,o="Unspecified error message. This is a bug, please report it.",c={code:s,message:a(s)};function a(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o;if(Number.isInteger(t)){const n=t.toString();if(d(r.errorValues,n))return r.errorValues[n].message;if(l(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]||!!l(t)}function l(t){return t>=-32099&&t<=-32e3}function h(t){return t&&"object"===typeof t&&!Array.isArray(t)?Object.assign({},t):t}function d(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){let{fallbackError:e=c,shouldIncludeStack:n=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var r,s;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 o={};if(t&&"object"===typeof t&&!Array.isArray(t)&&d(t,"code")&&u(t.code)){const e=t;o.code=e.code,e.message&&"string"===typeof e.message?(o.message=e.message,d(e,"data")&&(o.data=e.data)):(o.message=a(o.code),o.data={originalError:h(t)})}else{o.code=e.code;const n=null===(r=t)||void 0===r?void 0:r.message;o.message=n&&"string"===typeof n?n:e.message,o.data={originalError:h(t)}}const l=null===(s=t)||void 0===s?void 0:s.stack;return n&&t&&l&&"string"===typeof l&&(o.stack=l),o}},1820:function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(1758),i=n(1791),s={closed:!0,next:function(t){},error:function(t){if(r.a.useDeprecatedSynchronousErrorHandling)throw t;Object(i.a)(t)},complete:function(){}}},1821:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(121),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.__extends(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(1735).a)},1822:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function(t){return function(e){for(var n=0,r=t.length;n<r&&!e.closed;n++)e.next(t[n]);e.complete()}}},1823:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function(t){return t&&"number"===typeof t.length&&"function"!==typeof t}},1824:function(t,e,n){"use strict";function r(t){return!!t&&"function"!==typeof t.subscribe&&"function"===typeof t.then}n.d(e,"a",(function(){return r}))},1825:function(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,"a",(function(){return r}))},1826:function(t,e,n){"use strict";var r=n(1806),i=Object.prototype.hasOwnProperty,s=Array.isArray,o=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),c=function(t,e){for(var n=e&&e.plainObjects?Object.create(null):{},r=0;r<t.length;++r)"undefined"!==typeof t[r]&&(n[r]=t[r]);return n};t.exports={arrayToObject:c,assign:function(t,e){return Object.keys(e).reduce((function(t,n){return t[n]=e[n],t}),t)},combine:function(t,e){return[].concat(t,e)},compact:function(t){for(var e=[{obj:{o:t},prop:"o"}],n=[],r=0;r<e.length;++r)for(var i=e[r],o=i.obj[i.prop],c=Object.keys(o),a=0;a<c.length;++a){var u=c[a],l=o[u];"object"===typeof l&&null!==l&&-1===n.indexOf(l)&&(e.push({obj:o,prop:u}),n.push(l))}return function(t){for(;t.length>1;){var e=t.pop(),n=e.obj[e.prop];if(s(n)){for(var r=[],i=0;i<n.length;++i)"undefined"!==typeof n[i]&&r.push(n[i]);e.obj[e.prop]=r}}}(e),t},decode:function(t,e,n){var r=t.replace(/\+/g," ");if("iso-8859-1"===n)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(i){return r}},encode:function(t,e,n,i,s){if(0===t.length)return t;var c=t;if("symbol"===typeof t?c=Symbol.prototype.toString.call(t):"string"!==typeof t&&(c=String(t)),"iso-8859-1"===n)return escape(c).replace(/%u[0-9a-f]{4}/gi,(function(t){return"%26%23"+parseInt(t.slice(2),16)+"%3B"}));for(var a="",u=0;u<c.length;++u){var l=c.charCodeAt(u);45===l||46===l||95===l||126===l||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||s===r.RFC1738&&(40===l||41===l)?a+=c.charAt(u):l<128?a+=o[l]:l<2048?a+=o[192|l>>6]+o[128|63&l]:l<55296||l>=57344?a+=o[224|l>>12]+o[128|l>>6&63]+o[128|63&l]:(u+=1,l=65536+((1023&l)<<10|1023&c.charCodeAt(u)),a+=o[240|l>>18]+o[128|l>>12&63]+o[128|l>>6&63]+o[128|63&l])}return a},isBuffer:function(t){return!(!t||"object"!==typeof t)&&!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},maybeMap:function(t,e){if(s(t)){for(var n=[],r=0;r<t.length;r+=1)n.push(e(t[r]));return n}return e(t)},merge:function t(e,n,r){if(!n)return e;if("object"!==typeof n){if(s(e))e.push(n);else{if(!e||"object"!==typeof e)return[e,n];(r&&(r.plainObjects||r.allowPrototypes)||!i.call(Object.prototype,n))&&(e[n]=!0)}return e}if(!e||"object"!==typeof e)return[e].concat(n);var o=e;return s(e)&&!s(n)&&(o=c(e,r)),s(e)&&s(n)?(n.forEach((function(n,s){if(i.call(e,s)){var o=e[s];o&&"object"===typeof o&&n&&"object"===typeof n?e[s]=t(o,n,r):e.push(n)}else e[s]=n})),e):Object.keys(n).reduce((function(e,s){var o=n[s];return i.call(e,s)?e[s]=t(e[s],o,r):e[s]=o,e}),o)}}},1827:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WalletSDKRelayAbstract=e.APP_VERSION_KEY=e.LOCAL_STORAGE_ADDRESSES_KEY=e.WALLET_USER_NAME_KEY=void 0;const r=n(1786);e.WALLET_USER_NAME_KEY="walletUsername",e.LOCAL_STORAGE_ADDRESSES_KEY="Addresses",e.APP_VERSION_KEY="AppVersion";e.WalletSDKRelayAbstract=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}))}}},1828:function(t,e,n){(function(e){const r=n(1849),i=n(21);function s(t){return e.allocUnsafe(t).fill(0)}function o(t,e,n){const r=s(e);return t=c(t),n?t.length<e?(t.copy(r),r):t.slice(0,e):t.length<e?(t.copy(r,e-t.length),r):t.slice(-e)}function c(t){if(!e.isBuffer(t))if(Array.isArray(t))t=e.from(t);else if("string"===typeof t)t=a(t)?e.from((n=u(t)).length%2?"0"+n:n,"hex"):e.from(t);else if("number"===typeof t)t=intToBuffer(t);else if(null===t||void 0===t)t=e.allocUnsafe(0);else if(i.isBN(t))t=t.toArrayLike(e);else{if(!t.toArray)throw new Error("invalid type");t=e.from(t.toArray())}var n;return t}function a(t){return"string"===typeof t&&t.match(/^0x[0-9A-Fa-f]*$/)}function u(t){return"string"===typeof t&&t.startsWith("0x")?t.slice(2):t}t.exports={zeros:s,setLength:o,setLengthRight:function(t,e){return o(t,e,!0)},isHexString:a,stripHexPrefix:u,toBuffer:c,bufferToHex:function(t){return"0x"+(t=c(t)).toString("hex")},keccak:function(t,e){return t=c(t),e||(e=256),r("keccak"+e).update(t).digest()}}}).call(this,n(60).Buffer)},1829:function(t,e,n){"use strict";const r=(t,e)=>function(){const n=e.promiseModule,r=new Array(arguments.length);for(let t=0;t<arguments.length;t++)r[t]=arguments[t];return new n(((n,i)=>{e.errorFirst?r.push((function(t,r){if(e.multiArgs){const e=new Array(arguments.length-1);for(let t=1;t<arguments.length;t++)e[t-1]=arguments[t];t?(e.unshift(t),i(e)):n(e)}else t?i(t):n(r)})):r.push((function(t){if(e.multiArgs){const t=new Array(arguments.length-1);for(let e=0;e<arguments.length;e++)t[e]=arguments[e];n(t)}else n(t)})),t.apply(this,r)}))};t.exports=(t,e)=>{e=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},e);const n=t=>{const n=e=>"string"===typeof e?t===e:e.test(t);return e.include?e.include.some(n):!e.exclude.some(n)};let i;i="function"===typeof t?function(){return e.excludeMain?t.apply(this,arguments):r(t,e).apply(this,arguments)}:Object.create(Object.getPrototypeOf(t));for(const s in t){const o=t[s];i[s]="function"===typeof o&&n(s)?r(o,e):o}return i}},1830:function(t,e,n){const r=n(1861),i=n(1862)();function s(t){this.currentProvider=t}function o(t){return function(){const e=this;var n=[].slice.call(arguments),r=n.pop();e.sendAsync({method:t,params:n},r)}}function c(t,e){return function(){const n=this;var r=[].slice.call(arguments),i=r.pop();r.length<t&&r.push("latest"),n.sendAsync({method:e,params:r},i)}}t.exports=s,s.prototype.getBalance=c(2,"eth_getBalance"),s.prototype.getCode=c(2,"eth_getCode"),s.prototype.getTransactionCount=c(2,"eth_getTransactionCount"),s.prototype.getStorageAt=c(3,"eth_getStorageAt"),s.prototype.call=c(2,"eth_call"),s.prototype.protocolVersion=o("eth_protocolVersion"),s.prototype.syncing=o("eth_syncing"),s.prototype.coinbase=o("eth_coinbase"),s.prototype.mining=o("eth_mining"),s.prototype.hashrate=o("eth_hashrate"),s.prototype.gasPrice=o("eth_gasPrice"),s.prototype.accounts=o("eth_accounts"),s.prototype.blockNumber=o("eth_blockNumber"),s.prototype.getBlockTransactionCountByHash=o("eth_getBlockTransactionCountByHash"),s.prototype.getBlockTransactionCountByNumber=o("eth_getBlockTransactionCountByNumber"),s.prototype.getUncleCountByBlockHash=o("eth_getUncleCountByBlockHash"),s.prototype.getUncleCountByBlockNumber=o("eth_getUncleCountByBlockNumber"),s.prototype.sign=o("eth_sign"),s.prototype.sendTransaction=o("eth_sendTransaction"),s.prototype.sendRawTransaction=o("eth_sendRawTransaction"),s.prototype.estimateGas=o("eth_estimateGas"),s.prototype.getBlockByHash=o("eth_getBlockByHash"),s.prototype.getBlockByNumber=o("eth_getBlockByNumber"),s.prototype.getTransactionByHash=o("eth_getTransactionByHash"),s.prototype.getTransactionByBlockHashAndIndex=o("eth_getTransactionByBlockHashAndIndex"),s.prototype.getTransactionByBlockNumberAndIndex=o("eth_getTransactionByBlockNumberAndIndex"),s.prototype.getTransactionReceipt=o("eth_getTransactionReceipt"),s.prototype.getUncleByBlockHashAndIndex=o("eth_getUncleByBlockHashAndIndex"),s.prototype.getUncleByBlockNumberAndIndex=o("eth_getUncleByBlockNumberAndIndex"),s.prototype.getCompilers=o("eth_getCompilers"),s.prototype.compileLLL=o("eth_compileLLL"),s.prototype.compileSolidity=o("eth_compileSolidity"),s.prototype.compileSerpent=o("eth_compileSerpent"),s.prototype.newFilter=o("eth_newFilter"),s.prototype.newBlockFilter=o("eth_newBlockFilter"),s.prototype.newPendingTransactionFilter=o("eth_newPendingTransactionFilter"),s.prototype.uninstallFilter=o("eth_uninstallFilter"),s.prototype.getFilterChanges=o("eth_getFilterChanges"),s.prototype.getFilterLogs=o("eth_getFilterLogs"),s.prototype.getLogs=o("eth_getLogs"),s.prototype.getWork=o("eth_getWork"),s.prototype.submitWork=o("eth_submitWork"),s.prototype.submitHashrate=o("eth_submitHashrate"),s.prototype.sendAsync=function(t,e){var n;this.currentProvider.sendAsync((n=t,r({id:i(),jsonrpc:"2.0",params:[]},n)),(function(t,n){if(!t&&n.error&&(t=new Error("EthQuery - RPC Error - "+n.error.message)),t)return e(t);e(null,n.result)}))}},1831:function(t,e,n){t.exports=n(1868)},1832: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(1869),e),i(n(1870),e),i(n(1871),e),i(n(1833),e),i(n(1834),e),i(n(1874),e)},1833:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getUniqueId=void 0;const r=4294967295;let i=Math.floor(Math.random()*r);e.getUniqueId=function(){return i=(i+1)%r,i}},1834: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(1769)),s=n(1872);class o 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,s,c]=await o._runAllMiddleware(t,e,this._middleware);return s?(await o._runReturnHandlers(c),r(i)):n((async t=>{try{await o._runReturnHandlers(c)}catch(e){return t(e)}return t()}))}catch(i){return r(i)}}}async _handleBatch(t,e){try{const n=await Promise.all(t.map(this._promiseHandle.bind(this)));return e?e(null,n):n}catch(n){if(e)return e(n);throw n}}_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 s.EthereumRpcError(s.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 s.EthereumRpcError(s.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(o){i=o}return i&&(delete r.result,r.error||(r.error=s.serializeError(i))),e(i,r)}async _processRequest(t,e){const[n,r,i]=await o._runAllMiddleware(t,e,this._middleware);if(o._checkForCompletion(t,e,r),await o._runReturnHandlers(i),n)throw n}static async _runAllMiddleware(t,e,n){const r=[];let i=null,s=!1;for(const c of n)if([i,s]=await o._runMiddleware(t,e,c,r),s)break;return[i,s,r.reverse()]}static _runMiddleware(t,e,n,r){return new Promise((i=>{const o=t=>{const n=t||e.error;n&&(e.error=s.serializeError(n)),i([n,!0])},a=n=>{e.error?o(e.error):(n&&("function"!==typeof n&&o(new s.EthereumRpcError(s.errorCodes.rpc.internal,`JsonRpcEngine: "next" return handlers must be functions. Received "${typeof n}" for request:\n${c(t)}`,{request:t})),r.push(n)),i([null,!1]))};try{n(t,e,a,o)}catch(u){o(u)}}))}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 s.EthereumRpcError(s.errorCodes.rpc.internal,`JsonRpcEngine: Response has no error or result for request:\n${c(t)}`,{request:t});if(!n)throw new s.EthereumRpcError(s.errorCodes.rpc.internal,`JsonRpcEngine: Nothing ended request:\n${c(t)}`,{request:t})}}function c(t){return JSON.stringify(t,null,2)}e.JsonRpcEngine=o},1835:function(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(1809),i=n(1808),s=r.errorCodes.rpc.internal,o="Unspecified error message. This is a bug, please report it.",c={code:s,message:a(s)};function a(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o;if(Number.isInteger(t)){const n=t.toString();if(d(r.errorValues,n))return r.errorValues[n].message;if(l(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]||!!l(t)}function l(t){return t>=-32099&&t<=-32e3}function h(t){return t&&"object"===typeof t&&!Array.isArray(t)?Object.assign({},t):t}function d(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){let{fallbackError:e=c,shouldIncludeStack:n=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var r,s;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 o={};if(t&&"object"===typeof t&&!Array.isArray(t)&&d(t,"code")&&u(t.code)){const e=t;o.code=e.code,e.message&&"string"===typeof e.message?(o.message=e.message,d(e,"data")&&(o.data=e.data)):(o.message=a(o.code),o.data={originalError:h(t)})}else{o.code=e.code;const n=null===(r=t)||void 0===r?void 0:r.message;o.message=n&&"string"===typeof n?n:e.message,o.data={originalError:h(t)}}const l=null===(s=t)||void 0===s?void 0:s.stack;return n&&t&&l&&"string"===typeof l&&(o.stack=l),o}},1836:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Web3Method=void 0,function(t){t.requestEthereumAccounts="requestEthereumAccounts",t.signEthereumMessage="signEthereumMessage",t.signEthereumTransaction="signEthereumTransaction",t.submitEthereumTransaction="submitEthereumTransaction",t.ethereumAddressFromSignedMessage="ethereumAddressFromSignedMessage",t.scanQRCode="scanQRCode",t.generic="generic",t.childRequestEthereumAccounts="childRequestEthereumAccounts",t.addEthereumChain="addEthereumChain",t.switchEthereumChain="switchEthereumChain",t.makeEthereumJSONRPCRequest="makeEthereumJSONRPCRequest",t.watchAsset="watchAsset"}(e.Web3Method||(e.Web3Method={}))},1842:function(t,e,n){"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;n<localStorage.length;n++){const r=localStorage.key(n);"string"===typeof r&&r.startsWith(t)&&e.push(r)}e.forEach((t=>localStorage.removeItem(t)))}scopedKey(t){return`${this.scope}:${t}`}}},1843:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ethErrors=void 0;const r=n(1787),i=n(1819),s=n(1788);function o(t,e){const[n,s]=a(e);return new r.EthereumRpcError(t,n||i.getMessageFromCode(t),s)}function c(t,e){const[n,s]=a(e);return new r.EthereumProviderError(t,n||i.getMessageFromCode(t),s)}function a(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=>o(s.errorCodes.rpc.parse,t),invalidRequest:t=>o(s.errorCodes.rpc.invalidRequest,t),invalidParams:t=>o(s.errorCodes.rpc.invalidParams,t),methodNotFound:t=>o(s.errorCodes.rpc.methodNotFound,t),internal:t=>o(s.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 o(e,t)},invalidInput:t=>o(s.errorCodes.rpc.invalidInput,t),resourceNotFound:t=>o(s.errorCodes.rpc.resourceNotFound,t),resourceUnavailable:t=>o(s.errorCodes.rpc.resourceUnavailable,t),transactionRejected:t=>o(s.errorCodes.rpc.transactionRejected,t),methodNotSupported:t=>o(s.errorCodes.rpc.methodNotSupported,t),limitExceeded:t=>o(s.errorCodes.rpc.limitExceeded,t)},provider:{userRejectedRequest:t=>c(s.errorCodes.provider.userRejectedRequest,t),unauthorized:t=>c(s.errorCodes.provider.unauthorized,t),unsupportedMethod:t=>c(s.errorCodes.provider.unsupportedMethod,t),disconnected:t=>c(s.errorCodes.provider.disconnected,t),chainDisconnected:t=>c(s.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)}}}},1844:function(module,exports,__webpack_require__){(function(process,global){var __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=global:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_SHA256_NO_COMMON_JS&&"object"===typeof module&&module.exports,AMD=__webpack_require__(316),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<OUTPUT_TYPES.length;++n){var r=OUTPUT_TYPES[n];e[r]=createOutputMethod(r,t)}return e},nodeWrap=function(method,is224){var crypto=eval("require('crypto')"),Buffer=eval("require('buffer').Buffer"),algorithm=is224?"sha224":"sha256",nodeMethod=function(t){if("string"===typeof t)return crypto.createHash(algorithm).update(t,"utf8").digest("hex");if(null===t||void 0===t)throw new Error(ERROR);return t.constructor===ArrayBuffer&&(t=new Uint8Array(t)),Array.isArray(t)||ArrayBuffer.isView(t)||t.constructor===Buffer?crypto.createHash(algorithm).update(new Buffer(t)).digest("hex"):method(t)};return nodeMethod},createHmacOutputMethod=function(t,e){return function(n,r){return new HmacSha256(n,e,!0).update(r)[t]()}},createHmacMethod=function(t){var e=createHmacOutputMethod("hex",t);e.create=function(e){return new HmacSha256(e,t)},e.update=function(t,n){return e.create(t).update(n)};for(var n=0;n<OUTPUT_TYPES.length;++n){var r=OUTPUT_TYPES[n];e[r]=createHmacOutputMethod(r,t)}return e};function Sha256(t,e){e?(blocks[0]=blocks[16]=blocks[1]=blocks[2]=blocks[3]=blocks[4]=blocks[5]=blocks[6]=blocks[7]=blocks[8]=blocks[9]=blocks[10]=blocks[11]=blocks[12]=blocks[13]=blocks[14]=blocks[15]=0,this.blocks=blocks):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=t}function HmacSha256(t,e,n){var r,i=typeof t;if("string"===i){var s,o=[],c=t.length,a=0;for(r=0;r<c;++r)(s=t.charCodeAt(r))<128?o[a++]=s:s<2048?(o[a++]=192|s>>6,o[a++]=128|63&s):s<55296||s>=57344?(o[a++]=224|s>>12,o[a++]=128|s>>6&63,o[a++]=128|63&s):(s=65536+((1023&s)<<10|1023&t.charCodeAt(++r)),o[a++]=240|s>>18,o[a++]=128|s>>12&63,o[a++]=128|s>>6&63,o[a++]=128|63&s);t=o}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 u=[],l=[];for(r=0;r<64;++r){var h=t[r]||0;u[r]=92^h,l[r]=54^h}Sha256.call(this,e,n),this.update(l),this.oKeyPad=u,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,s=0,o=t.length,c=this.blocks;s<o;){if(this.hashed&&(this.hashed=!1,c[0]=this.block,c[16]=c[1]=c[2]=c[3]=c[4]=c[5]=c[6]=c[7]=c[8]=c[9]=c[10]=c[11]=c[12]=c[13]=c[14]=c[15]=0),e)for(i=this.start;s<o&&i<64;++s)c[i>>2]|=t[s]<<SHIFT[3&i++];else for(i=this.start;s<o&&i<64;++s)(r=t.charCodeAt(s))<128?c[i>>2]|=r<<SHIFT[3&i++]:r<2048?(c[i>>2]|=(192|r>>6)<<SHIFT[3&i++],c[i>>2]|=(128|63&r)<<SHIFT[3&i++]):r<55296||r>=57344?(c[i>>2]|=(224|r>>12)<<SHIFT[3&i++],c[i>>2]|=(128|r>>6&63)<<SHIFT[3&i++],c[i>>2]|=(128|63&r)<<SHIFT[3&i++]):(r=65536+((1023&r)<<10|1023&t.charCodeAt(++s)),c[i>>2]|=(240|r>>18)<<SHIFT[3&i++],c[i>>2]|=(128|r>>12&63)<<SHIFT[3&i++],c[i>>2]|=(128|r>>6&63)<<SHIFT[3&i++],c[i>>2]|=(128|63&r)<<SHIFT[3&i++]);this.lastByteIndex=i,this.bytes+=i-this.start,i>=64?(this.block=c[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,s,o,c,a,u=this.h0,l=this.h1,h=this.h2,d=this.h3,f=this.h4,p=this.h5,b=this.h6,y=this.h7,g=this.blocks;for(t=16;t<64;++t)e=((i=g[t-15])>>>7|i<<25)^(i>>>18|i<<14)^i>>>3,n=((i=g[t-2])>>>17|i<<15)^(i>>>19|i<<13)^i>>>10,g[t]=g[t-16]+e+g[t-7]+n<<0;for(a=l&h,t=0;t<64;t+=4)this.first?(this.is224?(s=300032,y=(i=g[0]-1413257819)-150054599<<0,d=i+24177077<<0):(s=704751109,y=(i=g[0]-210244248)-1521486534<<0,d=i+143694565<<0),this.first=!1):(e=(u>>>2|u<<30)^(u>>>13|u<<19)^(u>>>22|u<<10),r=(s=u&l)^u&h^a,y=d+(i=y+(n=(f>>>6|f<<26)^(f>>>11|f<<21)^(f>>>25|f<<7))+(f&p^~f&b)+K[t]+g[t])<<0,d=i+(e+r)<<0),e=(d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10),r=(o=d&u)^d&l^s,b=h+(i=b+(n=(y>>>6|y<<26)^(y>>>11|y<<21)^(y>>>25|y<<7))+(y&f^~y&p)+K[t+1]+g[t+1])<<0,e=((h=i+(e+r)<<0)>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10),r=(c=h&d)^h&u^o,p=l+(i=p+(n=(b>>>6|b<<26)^(b>>>11|b<<21)^(b>>>25|b<<7))+(b&y^~b&f)+K[t+2]+g[t+2])<<0,e=((l=i+(e+r)<<0)>>>2|l<<30)^(l>>>13|l<<19)^(l>>>22|l<<10),r=(a=l&h)^l&d^c,f=u+(i=f+(n=(p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+(p&b^~p&y)+K[t+3]+g[t+3])<<0,u=i+(e+r)<<0;this.h0=this.h0+u<<0,this.h1=this.h1+l<<0,this.h2=this.h2+h<<0,this.h3=this.h3+d<<0,this.h4=this.h4+f<<0,this.h5=this.h5+p<<0,this.h6=this.h6+b<<0,this.h7=this.h7+y<<0},Sha256.prototype.hex=function(){this.finalize();var t=this.h0,e=this.h1,n=this.h2,r=this.h3,i=this.h4,s=this.h5,o=this.h6,c=this.h7,a=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[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]+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];return this.is224||(a+=HEX_CHARS[c>>28&15]+HEX_CHARS[c>>24&15]+HEX_CHARS[c>>20&15]+HEX_CHARS[c>>16&15]+HEX_CHARS[c>>12&15]+HEX_CHARS[c>>8&15]+HEX_CHARS[c>>4&15]+HEX_CHARS[15&c]),a},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,s=this.h5,o=this.h6,c=this.h7,a=[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,s>>24&255,s>>16&255,s>>8&255,255&s,o>>24&255,o>>16&255,o>>8&255,255&o];return this.is224||a.push(c>>24&255,c>>16&255,c>>8&255,255&c),a},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__)))})()}).call(this,__webpack_require__(53),__webpack_require__(44))},1845:function(t,e,n){"use strict";var r=n(1846),i=n(1847),s=n(1806);t.exports={formats:s,parse:i,stringify:r}},1846:function(t,e,n){"use strict";var r=n(755),i=n(1826),s=n(1806),o=Object.prototype.hasOwnProperty,c={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},a=Array.isArray,u=String.prototype.split,l=Array.prototype.push,h=function(t,e){l.apply(t,a(e)?e:[e])},d=Date.prototype.toISOString,f=s.default,p={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:i.encode,encodeValuesOnly:!1,format:f,formatter:s.formatters[f],indices:!1,serializeDate:function(t){return d.call(t)},skipNulls:!1,strictNullHandling:!1},b={},y=function t(e,n,s,o,c,l,d,f,y,g,m,_,v,w,E,x){for(var S,k=e,C=x,I=0,A=!1;void 0!==(C=C.get(b))&&!A;){var O=C.get(e);if(I+=1,"undefined"!==typeof O){if(O===I)throw new RangeError("Cyclic object value");A=!0}"undefined"===typeof C.get(b)&&(I=0)}if("function"===typeof f?k=f(n,k):k instanceof Date?k=m(k):"comma"===s&&a(k)&&(k=i.maybeMap(k,(function(t){return t instanceof Date?m(t):t}))),null===k){if(c)return d&&!w?d(n,p.encoder,E,"key",_):n;k=""}if("string"===typeof(S=k)||"number"===typeof S||"boolean"===typeof S||"symbol"===typeof S||"bigint"===typeof S||i.isBuffer(k)){if(d){var M=w?n:d(n,p.encoder,E,"key",_);if("comma"===s&&w){for(var R=u.call(String(k),","),j="",N=0;N<R.length;++N)j+=(0===N?"":",")+v(d(R[N],p.encoder,E,"value",_));return[v(M)+(o&&a(k)&&1===R.length?"[]":"")+"="+j]}return[v(M)+"="+v(d(k,p.encoder,E,"value",_))]}return[v(n)+"="+v(String(k))]}var T,P=[];if("undefined"===typeof k)return P;if("comma"===s&&a(k))T=[{value:k.length>0?k.join(",")||null:void 0}];else if(a(f))T=f;else{var L=Object.keys(k);T=y?L.sort(y):L}for(var D=o&&a(k)&&1===k.length?n+"[]":n,B=0;B<T.length;++B){var H=T[B],F="object"===typeof H&&"undefined"!==typeof H.value?H.value:k[H];if(!l||null!==F){var U=a(k)?"function"===typeof s?s(D,H):D:D+(g?"."+H:"["+H+"]");x.set(e,I);var W=r();W.set(b,x),h(P,t(F,U,s,o,c,l,d,f,y,g,m,_,v,w,E,W))}}return P};t.exports=function(t,e){var n,i=t,u=function(t){if(!t)return p;if(null!==t.encoder&&"undefined"!==typeof t.encoder&&"function"!==typeof t.encoder)throw new TypeError("Encoder has to be a function.");var e=t.charset||p.charset;if("undefined"!==typeof t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=s.default;if("undefined"!==typeof t.format){if(!o.call(s.formatters,t.format))throw new TypeError("Unknown format option provided.");n=t.format}var r=s.formatters[n],i=p.filter;return("function"===typeof t.filter||a(t.filter))&&(i=t.filter),{addQueryPrefix:"boolean"===typeof t.addQueryPrefix?t.addQueryPrefix:p.addQueryPrefix,allowDots:"undefined"===typeof t.allowDots?p.allowDots:!!t.allowDots,charset:e,charsetSentinel:"boolean"===typeof t.charsetSentinel?t.charsetSentinel:p.charsetSentinel,delimiter:"undefined"===typeof t.delimiter?p.delimiter:t.delimiter,encode:"boolean"===typeof t.encode?t.encode:p.encode,encoder:"function"===typeof t.encoder?t.encoder:p.encoder,encodeValuesOnly:"boolean"===typeof t.encodeValuesOnly?t.encodeValuesOnly:p.encodeValuesOnly,filter:i,format:n,formatter:r,serializeDate:"function"===typeof t.serializeDate?t.serializeDate:p.serializeDate,skipNulls:"boolean"===typeof t.skipNulls?t.skipNulls:p.skipNulls,sort:"function"===typeof t.sort?t.sort:null,strictNullHandling:"boolean"===typeof t.strictNullHandling?t.strictNullHandling:p.strictNullHandling}}(e);"function"===typeof u.filter?i=(0,u.filter)("",i):a(u.filter)&&(n=u.filter);var l,d=[];if("object"!==typeof i||null===i)return"";l=e&&e.arrayFormat in c?e.arrayFormat:e&&"indices"in e?e.indices?"indices":"repeat":"indices";var f=c[l];if(e&&"commaRoundTrip"in e&&"boolean"!==typeof e.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var b="comma"===f&&e&&e.commaRoundTrip;n||(n=Object.keys(i)),u.sort&&n.sort(u.sort);for(var g=r(),m=0;m<n.length;++m){var _=n[m];u.skipNulls&&null===i[_]||h(d,y(i[_],_,f,b,u.strictNullHandling,u.skipNulls,u.encode?u.encoder:null,u.filter,u.sort,u.allowDots,u.serializeDate,u.format,u.formatter,u.encodeValuesOnly,u.charset,g))}var v=d.join(u.delimiter),w=!0===u.addQueryPrefix?"?":"";return u.charsetSentinel&&("iso-8859-1"===u.charset?w+="utf8=%26%2310003%3B&":w+="utf8=%E2%9C%93&"),v.length>0?w+v:""}},1847:function(t,e,n){"use strict";var r=n(1826),i=Object.prototype.hasOwnProperty,s=Array.isArray,o={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:r.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},c=function(t){return t.replace(/&#(\d+);/g,(function(t,e){return String.fromCharCode(parseInt(e,10))}))},a=function(t,e){return t&&"string"===typeof t&&e.comma&&t.indexOf(",")>-1?t.split(","):t},u=function(t,e,n,r){if(t){var s=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,o=/(\[[^[\]]*])/g,c=n.depth>0&&/(\[[^[\]]*])/.exec(s),u=c?s.slice(0,c.index):s,l=[];if(u){if(!n.plainObjects&&i.call(Object.prototype,u)&&!n.allowPrototypes)return;l.push(u)}for(var h=0;n.depth>0&&null!==(c=o.exec(s))&&h<n.depth;){if(h+=1,!n.plainObjects&&i.call(Object.prototype,c[1].slice(1,-1))&&!n.allowPrototypes)return;l.push(c[1])}return c&&l.push("["+s.slice(c.index)+"]"),function(t,e,n,r){for(var i=r?e:a(e,n),s=t.length-1;s>=0;--s){var o,c=t[s];if("[]"===c&&n.parseArrays)o=[].concat(i);else{o=n.plainObjects?Object.create(null):{};var u="["===c.charAt(0)&&"]"===c.charAt(c.length-1)?c.slice(1,-1):c,l=parseInt(u,10);n.parseArrays||""!==u?!isNaN(l)&&c!==u&&String(l)===u&&l>=0&&n.parseArrays&&l<=n.arrayLimit?(o=[])[l]=i:"__proto__"!==u&&(o[u]=i):o={0:i}}i=o}return i}(l,e,n,r)}};t.exports=function(t,e){var n=function(t){if(!t)return o;if(null!==t.decoder&&void 0!==t.decoder&&"function"!==typeof t.decoder)throw new TypeError("Decoder has to be a function.");if("undefined"!==typeof t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var e="undefined"===typeof t.charset?o.charset:t.charset;return{allowDots:"undefined"===typeof t.allowDots?o.allowDots:!!t.allowDots,allowPrototypes:"boolean"===typeof t.allowPrototypes?t.allowPrototypes:o.allowPrototypes,allowSparse:"boolean"===typeof t.allowSparse?t.allowSparse:o.allowSparse,arrayLimit:"number"===typeof t.arrayLimit?t.arrayLimit:o.arrayLimit,charset:e,charsetSentinel:"boolean"===typeof t.charsetSentinel?t.charsetSentinel:o.charsetSentinel,comma:"boolean"===typeof t.comma?t.comma:o.comma,decoder:"function"===typeof t.decoder?t.decoder:o.decoder,delimiter:"string"===typeof t.delimiter||r.isRegExp(t.delimiter)?t.delimiter:o.delimiter,depth:"number"===typeof t.depth||!1===t.depth?+t.depth:o.depth,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"===typeof t.interpretNumericEntities?t.interpretNumericEntities:o.interpretNumericEntities,parameterLimit:"number"===typeof t.parameterLimit?t.parameterLimit:o.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"===typeof t.plainObjects?t.plainObjects:o.plainObjects,strictNullHandling:"boolean"===typeof t.strictNullHandling?t.strictNullHandling:o.strictNullHandling}}(e);if(""===t||null===t||"undefined"===typeof t)return n.plainObjects?Object.create(null):{};for(var l="string"===typeof t?function(t,e){var n,u={},l=e.ignoreQueryPrefix?t.replace(/^\?/,""):t,h=e.parameterLimit===1/0?void 0:e.parameterLimit,d=l.split(e.delimiter,h),f=-1,p=e.charset;if(e.charsetSentinel)for(n=0;n<d.length;++n)0===d[n].indexOf("utf8=")&&("utf8=%E2%9C%93"===d[n]?p="utf-8":"utf8=%26%2310003%3B"===d[n]&&(p="iso-8859-1"),f=n,n=d.length);for(n=0;n<d.length;++n)if(n!==f){var b,y,g=d[n],m=g.indexOf("]="),_=-1===m?g.indexOf("="):m+1;-1===_?(b=e.decoder(g,o.decoder,p,"key"),y=e.strictNullHandling?null:""):(b=e.decoder(g.slice(0,_),o.decoder,p,"key"),y=r.maybeMap(a(g.slice(_+1),e),(function(t){return e.decoder(t,o.decoder,p,"value")}))),y&&e.interpretNumericEntities&&"iso-8859-1"===p&&(y=c(y)),g.indexOf("[]=")>-1&&(y=s(y)?[y]:y),i.call(u,b)?u[b]=r.combine(u[b],y):u[b]=y}return u}(t,n):t,h=n.plainObjects?Object.create(null):{},d=Object.keys(l),f=0;f<d.length;++f){var p=d[f],b=u(p,l[p],n,"string"===typeof t);h=r.merge(h,b,n)}return!0===n.allowSparse?h:r.compact(h)}},1848:function(t,e,n){(function(e){const r=n(1828),i=n(1855),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"]},o={encodeData(t,n,s){let o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];const c=["bytes32"],a=[this.hashType(t,s)];if(o){const u=(t,n,c)=>{if(void 0!==s[n])return["bytes32",null==c?"0x0000000000000000000000000000000000000000000000000000000000000000":r.keccak(this.encodeData(n,c,s,o))];if(void 0===c)throw new Error(`missing value for field ${t} of type ${n}`);if("bytes"===n)return["bytes32",r.keccak(c)];if("string"===n)return"string"===typeof c&&(c=e.from(c,"utf8")),["bytes32",r.keccak(c)];if(n.lastIndexOf("]")===n.length-1){const e=n.slice(0,n.lastIndexOf("[")),s=c.map((n=>u(t,e,n)));return["bytes32",r.keccak(i.rawEncode(s.map((t=>{let[e]=t;return e})),s.map((t=>{let[,e]=t;return e}))))]}return[n,c]};for(const e of s[t]){const[t,r]=u(e.name,e.type,n[e.name]);c.push(t),a.push(r)}}else for(const i of s[t]){let t=n[i.name];if(void 0!==t)if("bytes"===i.type)c.push("bytes32"),t=r.keccak(t),a.push(t);else if("string"===i.type)c.push("bytes32"),"string"===typeof t&&(t=e.from(t,"utf8")),t=r.keccak(t),a.push(t);else if(void 0!==s[i.type])c.push("bytes32"),t=r.keccak(this.encodeData(i.type,t,s,o)),a.push(t);else{if(i.type.lastIndexOf("]")===i.type.length-1)throw new Error("Arrays currently unimplemented in encodeData");c.push(i.type),a.push(t)}}return i.rawEncode(c,a)},encodeType(t,e){let n="",r=this.findTypeDependencies(t,e).filter((e=>e!==t));r=[t].concat(r.sort());for(const i of r){if(!e[i])throw new Error("No type definition specified: "+i);n+=i+"("+e[i].map((t=>{let{name:e,type:n}=t;return n+" "+e})).join(",")+")"}return n},findTypeDependencies(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];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){let i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return r.keccak(this.encodeData(t,e,n,i))},hashType(t,e){return r.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){let n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const i=this.sanitizeData(t),s=[e.from("1901","hex")];return s.push(this.hashStruct("EIP712Domain",i.domain,i.types,n)),"EIP712Domain"!==i.primaryType&&s.push(this.hashStruct(i.primaryType,i.message,i.types,n)),r.keccak(e.concat(s))}};t.exports={TYPED_MESSAGE_SCHEMA:s,TypedDataUtils:o,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?r.toBuffer(t.value):t.value})),s=t.map((function(t){return t.type})),o=t.map((function(t){if(!t.name)throw e;return t.type+" "+t.name}));return i.soliditySHA3(["bytes32","bytes32"],[i.soliditySHA3(new Array(t.length).fill("string"),o),i.soliditySHA3(s,n)])}(t.data)},hashForSignTypedData_v3:function(t){return o.hash(t.data,!1)},hashForSignTypedData_v4:function(t){return o.hash(t.data)}}}).call(this,n(60).Buffer)},1849:function(t,e,n){t.exports=n(1850)(n(1853))},1850:function(t,e,n){const r=n(1851),i=n(1852);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)}}}},1851:function(t,e,n){(function(e){const{Transform:r}=n(435);t.exports=t=>class n extends r{constructor(e,n,r,i,s){super(s),this._rate=e,this._capacity=n,this._delimitedSuffix=r,this._hashBitLength=i,this._options=s,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(i){r=i}n(r)}_flush(t){let e=null;try{this.push(this.digest())}catch(n){e=n}t(e)}update(t,n){if(!e.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 e.isBuffer(t)||(t=e.from(t,n)),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 n(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(t._state),t._finalized=this._finalized,t}}}).call(this,n(60).Buffer)},1852:function(t,e,n){(function(e){const{Transform:r}=n(435);t.exports=t=>class n extends r{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(i){r=i}n(r)}_flush(){}_read(t){this.push(this.squeeze(t))}update(t,n){if(!e.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 e.isBuffer(t)||(t=e.from(t,n)),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 n(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(t._state),t._finalized=this._finalized,t}}}).call(this,n(60).Buffer)},1853:function(t,e,n){(function(e){const r=n(1854);function i(){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}i.prototype.initialize=function(t,e){for(let n=0;n<50;++n)this.state[n]=0;this.blockSize=t/8,this.count=0,this.squeezing=!1},i.prototype.absorb=function(t){for(let e=0;e<t.length;++e)this.state[~~(this.count/4)]^=t[e]<<this.count%4*8,this.count+=1,this.count===this.blockSize&&(r.p1600(this.state),this.count=0)},i.prototype.absorbLastFewBits=function(t){this.state[~~(this.count/4)]^=t<<this.count%4*8,0!==(128&t)&&this.count===this.blockSize-1&&r.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<(this.blockSize-1)%4*8,r.p1600(this.state),this.count=0,this.squeezing=!0},i.prototype.squeeze=function(t){this.squeezing||this.absorbLastFewBits(1);const n=e.alloc(t);for(let e=0;e<t;++e)n[e]=this.state[~~(this.count/4)]>>>this.count%4*8&255,this.count+=1,this.count===this.blockSize&&(r.p1600(this.state),this.count=0);return n},i.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=i}).call(this,n(60).Buffer)},1854:function(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],s=t[2]^t[12]^t[22]^t[32]^t[42],o=t[3]^t[13]^t[23]^t[33]^t[43],c=t[4]^t[14]^t[24]^t[34]^t[44],a=t[5]^t[15]^t[25]^t[35]^t[45],u=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],d=t[9]^t[19]^t[29]^t[39]^t[49];let f=h^(s<<1|o>>>31),p=d^(o<<1|s>>>31);const b=t[0]^f,y=t[1]^p,g=t[10]^f,m=t[11]^p,_=t[20]^f,v=t[21]^p,w=t[30]^f,E=t[31]^p,x=t[40]^f,S=t[41]^p;f=r^(c<<1|a>>>31),p=i^(a<<1|c>>>31);const k=t[2]^f,C=t[3]^p,I=t[12]^f,A=t[13]^p,O=t[22]^f,M=t[23]^p,R=t[32]^f,j=t[33]^p,N=t[42]^f,T=t[43]^p;f=s^(u<<1|l>>>31),p=o^(l<<1|u>>>31);const P=t[4]^f,L=t[5]^p,D=t[14]^f,B=t[15]^p,H=t[24]^f,F=t[25]^p,U=t[34]^f,W=t[35]^p,z=t[44]^f,q=t[45]^p;f=c^(h<<1|d>>>31),p=a^(d<<1|h>>>31);const V=t[6]^f,J=t[7]^p,G=t[16]^f,Y=t[17]^p,$=t[26]^f,K=t[27]^p,Q=t[36]^f,X=t[37]^p,Z=t[46]^f,tt=t[47]^p;f=u^(r<<1|i>>>31),p=l^(i<<1|r>>>31);const et=t[8]^f,nt=t[9]^p,rt=t[18]^f,it=t[19]^p,st=t[28]^f,ot=t[29]^p,ct=t[38]^f,at=t[39]^p,ut=t[48]^f,lt=t[49]^p,ht=b,dt=y,ft=m<<4|g>>>28,pt=g<<4|m>>>28,bt=_<<3|v>>>29,yt=v<<3|_>>>29,gt=E<<9|w>>>23,mt=w<<9|E>>>23,_t=x<<18|S>>>14,vt=S<<18|x>>>14,wt=k<<1|C>>>31,Et=C<<1|k>>>31,xt=A<<12|I>>>20,St=I<<12|A>>>20,kt=O<<10|M>>>22,Ct=M<<10|O>>>22,It=j<<13|R>>>19,At=R<<13|j>>>19,Ot=N<<2|T>>>30,Mt=T<<2|N>>>30,Rt=L<<30|P>>>2,jt=P<<30|L>>>2,Nt=D<<6|B>>>26,Tt=B<<6|D>>>26,Pt=F<<11|H>>>21,Lt=H<<11|F>>>21,Dt=U<<15|W>>>17,Bt=W<<15|U>>>17,Ht=q<<29|z>>>3,Ft=z<<29|q>>>3,Ut=V<<28|J>>>4,Wt=J<<28|V>>>4,zt=Y<<23|G>>>9,qt=G<<23|Y>>>9,Vt=$<<25|K>>>7,Jt=K<<25|$>>>7,Gt=Q<<21|X>>>11,Yt=X<<21|Q>>>11,$t=tt<<24|Z>>>8,Kt=Z<<24|tt>>>8,Qt=et<<27|nt>>>5,Xt=nt<<27|et>>>5,Zt=rt<<20|it>>>12,te=it<<20|rt>>>12,ee=ot<<7|st>>>25,ne=st<<7|ot>>>25,re=ct<<8|at>>>24,ie=at<<8|ct>>>24,se=ut<<14|lt>>>18,oe=lt<<14|ut>>>18;t[0]=ht^~xt&Pt,t[1]=dt^~St&Lt,t[10]=Ut^~Zt&bt,t[11]=Wt^~te&yt,t[20]=wt^~Nt&Vt,t[21]=Et^~Tt&Jt,t[30]=Qt^~ft&kt,t[31]=Xt^~pt&Ct,t[40]=Rt^~zt&ee,t[41]=jt^~qt&ne,t[2]=xt^~Pt&Gt,t[3]=St^~Lt&Yt,t[12]=Zt^~bt&It,t[13]=te^~yt&At,t[22]=Nt^~Vt&re,t[23]=Tt^~Jt&ie,t[32]=ft^~kt&Dt,t[33]=pt^~Ct&Bt,t[42]=zt^~ee>,t[43]=qt^~ne&mt,t[4]=Pt^~Gt&se,t[5]=Lt^~Yt&oe,t[14]=bt^~It&Ht,t[15]=yt^~At&Ft,t[24]=Vt^~re&_t,t[25]=Jt^~ie&vt,t[34]=kt^~Dt&$t,t[35]=Ct^~Bt&Kt,t[44]=ee^~gt&Ot,t[45]=ne^~mt&Mt,t[6]=Gt^~se&ht,t[7]=Yt^~oe&dt,t[16]=It^~Ht&Ut,t[17]=At^~Ft&Wt,t[26]=re^~_t&wt,t[27]=ie^~vt&Et,t[36]=Dt^~$t&Qt,t[37]=Bt^~Kt&Xt,t[46]=gt^~Ot&Rt,t[47]=mt^~Mt&jt,t[8]=se^~ht&xt,t[9]=oe^~dt&St,t[18]=Ht^~Ut&Zt,t[19]=Ft^~Wt&te,t[28]=_t^~wt&Nt,t[29]=vt^~Et&Tt,t[38]=$t^~Qt&ft,t[39]=Kt^~Xt&pt,t[48]=Ot^~Rt&zt,t[49]=Mt^~jt&qt,t[0]^=n[2*e],t[1]^=n[2*e+1]}}},1855:function(t,e,n){(function(e){const r=n(1828),i=n(21);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 o(t){return parseInt(/^\D+(\d+)$/.exec(t)[1],10)}function c(t){var e=/^\D+(\d+)x(\d+)$/.exec(t);return[parseInt(e[1],10),parseInt(e[2],10)]}function a(t){var e=t.match(/(.*)\[(.*?)\]$/);return e?""===e[2]?"dynamic":parseInt(e[2],10):null}function u(t){var e=typeof t;if("string"===e)return r.isHexString(t)?new i(r.stripHexPrefix(t),16):new i(t,10);if("number"===e)return new i(t);if(t.toArray)return t;throw new Error("Argument is not a number")}function l(t,n){var s,h,d,f;if("address"===t)return l("uint160",u(n));if("bool"===t)return l("uint8",n?1:0);if("string"===t)return l("bytes",new e(n,"utf8"));if(function(t){return t.lastIndexOf("]")===t.length-1}(t)){if("undefined"===typeof n.length)throw new Error("Not an array?");if("dynamic"!==(s=a(t))&&0!==s&&n.length>s)throw new Error("Elements exceed array size: "+s);for(f in d=[],t=t.slice(0,t.lastIndexOf("[")),"string"===typeof n&&(n=JSON.parse(n)),n)d.push(l(t,n[f]));if("dynamic"===s){var p=l("uint256",n.length);d.unshift(p)}return e.concat(d)}if("bytes"===t)return n=new e(n),d=e.concat([l("uint256",n.length),n]),n.length%32!==0&&(d=e.concat([d,r.zeros(32-n.length%32)])),d;if(t.startsWith("bytes")){if((s=o(t))<1||s>32)throw new Error("Invalid bytes<N> width: "+s);return r.setLengthRight(n,32)}if(t.startsWith("uint")){if((s=o(t))%8||s<8||s>256)throw new Error("Invalid uint<N> width: "+s);if((h=u(n)).bitLength()>s)throw new Error("Supplied uint exceeds width: "+s+" vs "+h.bitLength());if(h<0)throw new Error("Supplied uint is negative");return h.toArrayLike(e,"be",32)}if(t.startsWith("int")){if((s=o(t))%8||s<8||s>256)throw new Error("Invalid int<N> width: "+s);if((h=u(n)).bitLength()>s)throw new Error("Supplied int exceeds width: "+s+" vs "+h.bitLength());return h.toTwos(256).toArrayLike(e,"be",32)}if(t.startsWith("ufixed")){if(s=c(t),(h=u(n))<0)throw new Error("Supplied ufixed is negative");return l("uint256",h.mul(new i(2).pow(new i(s[1]))))}if(t.startsWith("fixed"))return s=c(t),l("int256",u(n).mul(new i(2).pow(new i(s[1]))));throw new Error("Unsupported or invalid type: "+t)}function h(t){return"string"===t||"bytes"===t||"dynamic"===a(t)}function d(t,n){if(t.length!==n.length)throw new Error("Number of types are not matching the values");for(var i,c,a=[],l=0;l<t.length;l++){var h=s(t[l]),d=n[l];if("bytes"===h)a.push(d);else if("string"===h)a.push(new e(d,"utf8"));else if("bool"===h)a.push(new e(d?"01":"00","hex"));else if("address"===h)a.push(r.setLength(d,20));else if(h.startsWith("bytes")){if((i=o(h))<1||i>32)throw new Error("Invalid bytes<N> width: "+i);a.push(r.setLengthRight(d,i))}else if(h.startsWith("uint")){if((i=o(h))%8||i<8||i>256)throw new Error("Invalid uint<N> width: "+i);if((c=u(d)).bitLength()>i)throw new Error("Supplied uint exceeds width: "+i+" vs "+c.bitLength());a.push(c.toArrayLike(e,"be",i/8))}else{if(!h.startsWith("int"))throw new Error("Unsupported or invalid type: "+h);if((i=o(h))%8||i<8||i>256)throw new Error("Invalid int<N> width: "+i);if((c=u(d)).bitLength()>i)throw new Error("Supplied int exceeds width: "+i+" vs "+c.bitLength());a.push(c.toTwos(i).toArrayLike(e,"be",i/8))}}return e.concat(a)}t.exports={rawEncode:function(t,n){var r=[],i=[],o=32*t.length;for(var c in t){var a=s(t[c]),u=l(a,n[c]);h(a)?(r.push(l("uint256",o)),i.push(u),o+=u.length):r.push(u)}return e.concat(r.concat(i))},solidityPack:d,soliditySHA3:function(t,e){return r.keccak(d(t,e))}}}).call(this,n(60).Buffer)},1856:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.filterFromParam=e.FilterPolyfill=void 0;const r=n(1807),i=n(1745),s={jsonrpc:"2.0",id:0};function o(t){return{fromBlock:a(t.fromBlock),toBlock:a(t.toBlock),addresses:void 0===t.address?null:Array.isArray(t.address)?t.address:[t.address],topics:t.topics||[]}}function c(t){const e={fromBlock:u(t.fromBlock),toBlock:u(t.toBlock),topics:t.topics};return null!==t.addresses&&(e.address=t.addresses),e}function a(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 u(t){return"latest"===t?t:(0,i.hexStringFromIntNumber)(t)}function l(){return Object.assign(Object.assign({},s),{error:{code:-32e3,message:"filter not found"}})}function h(){return Object.assign(Object.assign({},s),{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=o(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({},s),{method:"eth_getLogs",params:[c(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 o=await this.getCurrentBlockHeight(),a="latest"===e.toBlock?o:e.toBlock;if(n>o)return h();if(n>e.toBlock)return h();console.log(`Fetching logs from ${n} to ${a} for filter ${t}`);const u=await this.sendAsyncPromise(Object.assign(Object.assign({},s),{method:"eth_getLogs",params:[c(Object.assign(Object.assign({},e),{fromBlock:n,toBlock:a}))]}));if(Array.isArray(u.result)){const e=u.result.map((t=>(0,i.intNumberFromHexString)(t.blockNumber||"0x0"))),s=Math.max(...e);if(s&&s>n){const e=(0,r.IntNumber)(s+1);console.log(`Moving cursor position for filter (${t}) from ${n} to ${e}`),this.cursors.set(t,e)}}return u}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 o=(await Promise.all((0,i.range)(e,n+1).map((t=>this.getBlockHashByNumber((0,r.IntNumber)(t)))))).filter((t=>!!t)),c=(0,r.IntNumber)(e+o.length);return console.log(`Moving cursor position for filter (${t}) from ${e} to ${c}`),this.cursors.set(t,c),Object.assign(Object.assign({},s),{result:o})}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({},s),{method:"eth_blockNumber",params:[]}));return(0,i.intNumberFromHexString)((0,i.ensureHexString)(t))}async getBlockHashByNumber(t){const e=await this.sendAsyncPromise(Object.assign(Object.assign({},s),{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=o},1857:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.JSONRPCMethod=void 0,function(t){t.eth_accounts="eth_accounts",t.eth_coinbase="eth_coinbase",t.net_version="net_version",t.eth_chainId="eth_chainId",t.eth_uninstallFilter="eth_uninstallFilter",t.eth_requestAccounts="eth_requestAccounts",t.eth_sign="eth_sign",t.eth_ecRecover="eth_ecRecover",t.personal_sign="personal_sign",t.personal_ecRecover="personal_ecRecover",t.eth_signTransaction="eth_signTransaction",t.eth_sendRawTransaction="eth_sendRawTransaction",t.eth_sendTransaction="eth_sendTransaction",t.eth_signTypedData_v1="eth_signTypedData_v1",t.eth_signTypedData_v2="eth_signTypedData_v2",t.eth_signTypedData_v3="eth_signTypedData_v3",t.eth_signTypedData_v4="eth_signTypedData_v4",t.eth_signTypedData="eth_signTypedData",t.cbWallet_arbitrary="walletlink_arbitrary",t.wallet_addEthereumChain="wallet_addEthereumChain",t.wallet_switchEthereumChain="wallet_switchEthereumChain",t.wallet_watchAsset="wallet_watchAsset",t.eth_subscribe="eth_subscribe",t.eth_unsubscribe="eth_unsubscribe",t.eth_newFilter="eth_newFilter",t.eth_newBlockFilter="eth_newBlockFilter",t.eth_newPendingTransactionFilter="eth_newPendingTransactionFilter",t.eth_getFilterChanges="eth_getFilterChanges",t.eth_getFilterLogs="eth_getFilterLogs"}(e.JSONRPCMethod||(e.JSONRPCMethod={}))},1858:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SubscriptionManager=void 0;const r=n(1859),i=n(1867),s=()=>{};e.SubscriptionManager=class{constructor(t){const e=new r({provider:t,pollingInterval:15e3,setSkipCacheFlag:!0}),{events:n,middleware:s}=i({blockTracker:e,provider:t});this.events=n,this.subscriptionMiddleware=s}async handleRequest(t){const e={};return await this.subscriptionMiddleware(t,e,s,s),e}destroy(){this.subscriptionMiddleware.destroy()}}},1859:function(t,e,n){const r=n(1829),i=n(1860);function s(t,e){return new Promise((n=>{const r=setTimeout(n,t);r.unref&&e&&r.unref()}))}t.exports=class extends i{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};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 s(this._pollingInterval,!this._keepEventLoopActive)}catch(t){const n=new Error(`PollingBlockTracker - encountered an error while attempting to update latest block:\n${t.stack}`);try{this.emit("error",n)}catch(e){console.error(n)}await s(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}}},1860:function(t,e,n){n(1830),n(1829);const r=n(1863),i=(t,e)=>t+e,s=["sync","latest"];function o(t){return Number.parseInt(t,16)}t.exports=class extends r{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};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(){if(this._currentBlock)return this._currentBlock;return 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){s.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 s.map((t=>this.listenerCount(t))).reduce(i)}_newPotentialLatest(t){const e=this._currentBlock;e&&o(t)<=o(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}}},1861:function(t,e){t.exports=function(){for(var t={},e=0;e<arguments.length;e++){var r=arguments[e];for(var i in r)n.call(r,i)&&(t[i]=r[i])}return t};var n=Object.prototype.hasOwnProperty},1862:function(t,e){t.exports=function(t){var e=(t=t||{}).max||Number.MAX_SAFE_INTEGER,n="undefined"!==typeof t.start?t.start:Math.floor(Math.random()*e);return function(){return n%=e,n++}}},1863:function(t,e,n){const r=n(1864),i=n(42);var s="object"===typeof Reflect?Reflect:null,o=s&&"function"===typeof s.apply?s.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};function c(){i.call(this)}function a(t,e,n){try{o(t,e,n)}catch(r){setTimeout((()=>{throw r}))}}function u(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t[r];return n}t.exports=c,r.inherits(c,i),c.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e.push(arguments[n]);var r="error"===t,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var s;if(e.length>0&&(s=e[0]),s instanceof Error)throw s;var o=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw o.context=s,o}var c=i[t];if(void 0===c)return!1;if("function"===typeof c)a(c,this,e);else{var l=c.length,h=u(c,l);for(n=0;n<l;++n)a(h[n],this,e)}return!0}},1864:function(t,e,n){(function(t){var r=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),n={},r=0;r<e.length;r++)n[e[r]]=Object.getOwnPropertyDescriptor(t,e[r]);return n},i=/%[sdj%]/g;e.format=function(t){if(!g(t)){for(var e=[],n=0;n<arguments.length;n++)e.push(c(arguments[n]));return e.join(" ")}n=1;for(var r=arguments,s=r.length,o=String(t).replace(i,(function(t){if("%%"===t)return"%";if(n>=s)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(e){return"[Circular]"}default:return t}})),a=r[n];n<s;a=r[++n])b(a)||!v(a)?o+=" "+a:o+=" "+c(a);return o},e.deprecate=function(n,r){if("undefined"!==typeof t&&!0===t.noDeprecation)return n;if("undefined"===typeof t)return function(){return e.deprecate(n,r).apply(this,arguments)};var i=!1;return function(){if(!i){if(t.throwDeprecation)throw new Error(r);t.traceDeprecation?console.trace(r):console.error(r),i=!0}return n.apply(this,arguments)}};var s,o={};function c(t,n){var r={seen:[],stylize:u};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),p(n)?r.showHidden=n:n&&e._extend(r,n),m(r.showHidden)&&(r.showHidden=!1),m(r.depth)&&(r.depth=2),m(r.colors)&&(r.colors=!1),m(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=a),l(r,t,r.depth)}function a(t,e){var n=c.styles[e];return n?"\x1b["+c.colors[n][0]+"m"+t+"\x1b["+c.colors[n][1]+"m":t}function u(t,e){return t}function l(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 g(i)||(i=l(t,i,r)),i}var s=function(t,e){if(m(e))return t.stylize("undefined","undefined");if(g(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}if(y(e))return t.stylize(""+e,"number");if(p(e))return t.stylize(""+e,"boolean");if(b(e))return t.stylize("null","null")}(t,n);if(s)return s;var o=Object.keys(n),c=function(t){var e={};return t.forEach((function(t,n){e[t]=!0})),e}(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(n)),E(n)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return h(n);if(0===o.length){if(x(n)){var a=n.name?": "+n.name:"";return t.stylize("[Function"+a+"]","special")}if(_(n))return t.stylize(RegExp.prototype.toString.call(n),"regexp");if(w(n))return t.stylize(Date.prototype.toString.call(n),"date");if(E(n))return h(n)}var u,v="",S=!1,k=["{","}"];(f(n)&&(S=!0,k=["[","]"]),x(n))&&(v=" [Function"+(n.name?": "+n.name:"")+"]");return _(n)&&(v=" "+RegExp.prototype.toString.call(n)),w(n)&&(v=" "+Date.prototype.toUTCString.call(n)),E(n)&&(v=" "+h(n)),0!==o.length||S&&0!=n.length?r<0?_(n)?t.stylize(RegExp.prototype.toString.call(n),"regexp"):t.stylize("[Object]","special"):(t.seen.push(n),u=S?function(t,e,n,r,i){for(var s=[],o=0,c=e.length;o<c;++o)A(e,String(o))?s.push(d(t,e,n,r,String(o),!0)):s.push("");return i.forEach((function(i){i.match(/^\d+$/)||s.push(d(t,e,n,r,i,!0))})),s}(t,n,r,c,o):o.map((function(e){return d(t,n,r,c,e,S)})),t.seen.pop(),function(t,e,n){var r=t.reduce((function(t,e){return e.indexOf("\n")>=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0);if(r>60)return n[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+n[1];return n[0]+e+" "+t.join(", ")+" "+n[1]}(u,v,k)):k[0]+v+k[1]}function h(t){return"["+Error.prototype.toString.call(t)+"]"}function d(t,e,n,r,i,s){var o,c,a;if((a=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?c=a.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):a.set&&(c=t.stylize("[Setter]","special")),A(r,i)||(o="["+i+"]"),c||(t.seen.indexOf(a.value)<0?(c=b(n)?l(t,a.value,null):l(t,a.value,n-1)).indexOf("\n")>-1&&(c=s?c.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+c.split("\n").map((function(t){return" "+t})).join("\n")):c=t.stylize("[Circular]","special")),m(o)){if(s&&i.match(/^\d+$/))return c;(o=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=t.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=t.stylize(o,"string"))}return o+": "+c}function f(t){return Array.isArray(t)}function p(t){return"boolean"===typeof t}function b(t){return null===t}function y(t){return"number"===typeof t}function g(t){return"string"===typeof t}function m(t){return void 0===t}function _(t){return v(t)&&"[object RegExp]"===S(t)}function v(t){return"object"===typeof t&&null!==t}function w(t){return v(t)&&"[object Date]"===S(t)}function E(t){return v(t)&&("[object Error]"===S(t)||t instanceof Error)}function x(t){return"function"===typeof t}function S(t){return Object.prototype.toString.call(t)}function k(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(n){if(m(s)&&(s=Object({NODE_ENV:"production",PUBLIC_URL:"https://cdn.decentraland.org/@dcl/explorer-website/0.1.0-7425750118.commit-ba43842",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_WEBSITE_VERSION:"0.1.0-7425750118.commit-ba43842",REACT_APP_EXPLORER_VERSION:"1.0.131583-20230718133624.commit-7106e1f",REACT_APP_EXPLORER_BASE_URL:""}).NODE_DEBUG||""),n=n.toUpperCase(),!o[n])if(new RegExp("\\b"+n+"\\b","i").test(s)){var r=t.pid;o[n]=function(){var t=e.format.apply(e,arguments);console.error("%s %d: %s",n,r,t)}}else o[n]=function(){};return o[n]},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.isArray=f,e.isBoolean=p,e.isNull=b,e.isNullOrUndefined=function(t){return null==t},e.isNumber=y,e.isString=g,e.isSymbol=function(t){return"symbol"===typeof t},e.isUndefined=m,e.isRegExp=_,e.isObject=v,e.isDate=w,e.isError=E,e.isFunction=x,e.isPrimitive=function(t){return null===t||"boolean"===typeof t||"number"===typeof t||"string"===typeof t||"symbol"===typeof t||"undefined"===typeof t},e.isBuffer=n(1865);var C=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function I(){var t=new Date,e=[k(t.getHours()),k(t.getMinutes()),k(t.getSeconds())].join(":");return[t.getDate(),C[t.getMonth()],e].join(" ")}function A(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(1866),e._extend=function(t,e){if(!e||!v(e))return t;for(var n=Object.keys(e),r=n.length;r--;)t[n[r]]=e[n[r]];return t};var O="undefined"!==typeof Symbol?Symbol("util.promisify.custom"):void 0;function M(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(O&&t[O]){var e;if("function"!==typeof(e=t[O]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,O,{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=[],s=0;s<arguments.length;s++)i.push(arguments[s]);i.push((function(t,r){t?n(t):e(r)}));try{t.apply(this,i)}catch(o){n(o)}return r}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),O&&Object.defineProperty(e,O,{value:e,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(e,r(t))},e.promisify.custom=O,e.callbackify=function(e){if("function"!==typeof e)throw new TypeError('The "original" argument must be of type Function');function n(){for(var n=[],r=0;r<arguments.length;r++)n.push(arguments[r]);var i=n.pop();if("function"!==typeof i)throw new TypeError("The last argument must be of type Function");var s=this,o=function(){return i.apply(s,arguments)};e.apply(this,n).then((function(e){t.nextTick(o,null,e)}),(function(e){t.nextTick(M,e,o)}))}return Object.setPrototypeOf(n,Object.getPrototypeOf(e)),Object.defineProperties(n,r(e)),n}}).call(this,n(53))},1865:function(t,e){t.exports=function(t){return t&&"object"===typeof t&&"function"===typeof t.copy&&"function"===typeof t.fill&&"function"===typeof t.readUInt8}},1866:function(t,e){"function"===typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},1867:function(t,e,n){const r=n(1769).default,i=n(1831),{createAsyncMiddleware:s}=n(1832),o=n(1875),{unsafeRandomBytes:c,incrementHexInt:a}=n(1767),u=n(1811);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(t){let{blockTracker:e,provider:n}=t;const h={},d=o({blockTracker:e,provider:n});let f=!1;const p=new r,b=i({eth_subscribe:s((async function(t,r){if(f)throw new Error("SubscriptionManager - attempting to use after destroying");const i=t.params[0],s=c(16);let o;switch(i){case"newHeads":o=p({subId:s});break;case"logs":const e=t.params[1];o=b({subId:s,filter:await d.newLogFilter(e)});break;default:throw new Error(`SubscriptionManager - unsupported subscription type "${i}"`)}return h[s]=o,void(r.result=s);function p(t){let{subId:r}=t;const s={type:i,destroy:async()=>{e.removeListener("sync",s.update)},update:async t=>{let{oldBlock:e,newBlock:i}=t;const s=i,o=a(e);(await u({provider:n,fromBlock:o,toBlock:s})).map(l).forEach((t=>{y(r,t)}))}};return e.on("sync",s.update),s}function b(t){let{subId:e,filter:n}=t;n.on("update",(t=>y(e,t)));return{type:i,destroy:async()=>await d.uninstallFilter(n.idHex)}}})),eth_unsubscribe:s((async function(t,e){if(f)throw new Error("SubscriptionManager - attempting to use after destroying");const n=t.params[0],r=h[n];if(!r)return void(e.result=!1);delete h[n],await r.destroy(),e.result=!0}))});return b.destroy=function(){p.removeAllListeners();for(const t in h)h[t].destroy(),delete h[t];f=!0},{events:p,middleware:b};function y(t,e){p.emit("notification",{jsonrpc:"2.0",method:"eth_subscription",params:{subscription:t,result:e}})}}},1868:function(t,e){t.exports=function(t){return(e,n,r,i)=>{const s=t[e.method];return void 0===s?r():"function"===typeof s?s(e,n,r,i):(n.result=s,i())}}},1869:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createIdRemapMiddleware=void 0;const r=n(1833);e.createIdRemapMiddleware=function(){return(t,e,n,i)=>{const s=t.id,o=r.getUniqueId();t.id=o,e.id=o,n((n=>{t.id=s,e.id=s,n()}))}}},1870:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createAsyncMiddleware=void 0,e.createAsyncMiddleware=function(t){return async(e,n,r,i)=>{let s;const o=new Promise((t=>{s=t}));let c=null,a=!1;const u=async()=>{a=!0,r((t=>{c=t,s()})),await o};try{await t(e,n,u),a?(await o,c(null)):i(null)}catch(l){c?c(l):i(l)}}}},1871:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createScaffoldMiddleware=void 0,e.createScaffoldMiddleware=function(t){return(e,n,r,i)=>{const s=t[e.method];return void 0===s?r():"function"===typeof s?s(e,n,r,i):(n.result=s,i())}}},1872:function(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(1808);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(1835);Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return i.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return i.getMessageFromCode}});const s=n(1873);Object.defineProperty(e,"ethErrors",{enumerable:!0,get:function(){return s.ethErrors}});const o=n(1809);Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return o.errorCodes}})},1873:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ethErrors=void 0;const r=n(1808),i=n(1835),s=n(1809);function o(t,e){const[n,s]=a(e);return new r.EthereumRpcError(t,n||i.getMessageFromCode(t),s)}function c(t,e){const[n,s]=a(e);return new r.EthereumProviderError(t,n||i.getMessageFromCode(t),s)}function a(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=>o(s.errorCodes.rpc.parse,t),invalidRequest:t=>o(s.errorCodes.rpc.invalidRequest,t),invalidParams:t=>o(s.errorCodes.rpc.invalidParams,t),methodNotFound:t=>o(s.errorCodes.rpc.methodNotFound,t),internal:t=>o(s.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 o(e,t)},invalidInput:t=>o(s.errorCodes.rpc.invalidInput,t),resourceNotFound:t=>o(s.errorCodes.rpc.resourceNotFound,t),resourceUnavailable:t=>o(s.errorCodes.rpc.resourceUnavailable,t),transactionRejected:t=>o(s.errorCodes.rpc.transactionRejected,t),methodNotSupported:t=>o(s.errorCodes.rpc.methodNotSupported,t),limitExceeded:t=>o(s.errorCodes.rpc.limitExceeded,t)},provider:{userRejectedRequest:t=>c(s.errorCodes.provider.userRejectedRequest,t),unauthorized:t=>c(s.errorCodes.provider.unauthorized,t),unsupportedMethod:t=>c(s.errorCodes.provider.unsupportedMethod,t),disconnected:t=>c(s.errorCodes.provider.disconnected,t),chainDisconnected:t=>c(s.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)}}}},1874:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.mergeMiddleware=void 0;const r=n(1834);e.mergeMiddleware=function(t){const e=new r.JsonRpcEngine;return t.forEach((t=>e.push(t))),e.asMiddleware()}},1875:function(t,e,n){const r=n(1937).Mutex,{createAsyncMiddleware:i}=n(1832),s=n(1831),o=n(1876),c=n(1879),a=n(1880),{intToHex:u,hexToInt:l}=n(1767);function h(t){return d((async function(){const e=await t(...arguments),n=u(e.id);return n}))}function d(t){return i((async(e,n)=>{const r=await t.apply(null,e.params);n.result=r}))}function f(t,e){const n=[];for(let r in t)n.push(t[r]);return n}t.exports=function(t){let{blockTracker:e,provider:n}=t,i=0,p={};const b=new r,y=function(t){let{mutex:e}=t;return t=>async(n,r,i,s)=>{(await e.acquire())(),t(n,r,i,s)}}({mutex:b}),g=s({eth_newFilter:y(h(_)),eth_newBlockFilter:y(h(v)),eth_newPendingTransactionFilter:y(h(w)),eth_uninstallFilter:y(d(S)),eth_getFilterChanges:y(d(E)),eth_getFilterLogs:y(d(x))}),m=async t=>{let{oldBlock:e,newBlock:n}=t;if(0===p.length)return;const r=await b.acquire();try{await Promise.all(f(p).map((async t=>{try{await t.update({oldBlock:e,newBlock:n})}catch(r){console.error(r)}})))}catch(i){console.error(i)}r()};return g.newLogFilter=_,g.newBlockFilter=v,g.newPendingTransactionFilter=w,g.uninstallFilter=S,g.getFilterChanges=E,g.getFilterLogs=x,g.destroy=()=>{!async function(){const t=f(p).length;p={},C({prevFilterCount:t,newFilterCount:0})}()},g;async function _(t){const e=new o({provider:n,params:t});await k(e);return e}async function v(){const t=new c({provider:n});await k(t);return t}async function w(){const t=new a({provider:n});await k(t);return t}async function E(t){const e=l(t),n=p[e];if(!n)throw new Error(`No filter for index "${e}"`);return n.getChangesAndClear()}async function x(t){const e=l(t),n=p[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=p[e],r=Boolean(n);return r&&await async function(t){const e=f(p).length;delete p[t];const n=f(p).length;C({prevFilterCount:e,newFilterCount:n})}(e),r}async function k(t){const n=f(p).length,r=await e.getLatestBlock();await t.initialize({currentBlock:r}),i++,p[i]=t,t.id=i,t.idHex=u(i);return C({prevFilterCount:n,newFilterCount:f(p).length}),i}function C(t){let{prevFilterCount:n,newFilterCount:r}=t;0===n&&r>0?e.on("sync",m):n>0&&0===r&&e.removeListener("sync",m)}}},1876:function(t,e,n){const r=n(1830),i=n(1877),s=n(1878),{bnToHex:o,hexToInt:c,incrementHexInt:a,minBlockRef:u,blockRefIsNumber:l}=n(1767);t.exports=class extends s{constructor(t){let{provider:e,params:n}=t;super(),this.type="log",this.ethQuery=new r(e),this.params=Object.assign({fromBlock:"latest",toBlock:"latest",address:void 0,topics:[]},n),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(t){let{currentBlock:e}=t,n=this.params.fromBlock;["latest","pending"].includes(n)&&(n=e),"earliest"===n&&(n="0x0"),this.params.fromBlock=n;const r=u(this.params.toBlock,e),i=Object.assign({},this.params,{toBlock:r}),s=await this._fetchLogs(i);this.addInitialResults(s)}async update(t){let{oldBlock:e,newBlock:n}=t;const r=n;let i;i=e?a(e):n;const s=Object.assign({},this.params,{fromBlock:i,toBlock:r}),o=(await this._fetchLogs(s)).filter((t=>this.matchLog(t)));this.addResults(o)}async _fetchLogs(t){return await i((e=>this.ethQuery.getLogs(t,e)))()}matchLog(t){if(c(this.params.fromBlock)>=c(t.blockNumber))return!1;if(l(this.params.toBlock)&&c(this.params.toBlock)<=c(t.blockNumber))return!1;const e=t.address&&t.address.toLowerCase();if(this.params.address&&e&&!this.params.address.includes(e))return!1;return 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];if(i.includes(null))return!0;i=i.map((t=>t.toLowerCase()));return i.includes(r)}))}}},1877:function(t,e,n){"use strict";const r=(t,e,n,r)=>function(){for(var i=arguments.length,s=new Array(i),o=0;o<i;o++)s[o]=arguments[o];const c=e.promiseModule;return new c(((i,o)=>{e.multiArgs?s.push((function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];e.errorFirst?n[0]?o(n):(n.shift(),i(n)):i(n)})):e.errorFirst?s.push(((t,e)=>{t?o(t):i(e)})):s.push(i);const c=this===n?r:this;Reflect.apply(t,c,s)}))},i=new WeakMap;t.exports=(t,e)=>{e={exclude:[/.+(?:Sync|Stream)$/],errorFirst:!0,promiseModule:Promise,...e};const n=typeof t;if(null===t||"object"!==n&&"function"!==n)throw new TypeError(`Expected \`input\` to be a \`Function\` or \`Object\`, got \`${null===t?"null":n}\``);const s=new WeakMap,o=new Proxy(t,{apply(t,n,i){const c=s.get(t);if(c)return Reflect.apply(c,n,i);const a=e.excludeMain?t:r(t,e,o,t);return s.set(t,a),Reflect.apply(a,n,i)},get(t,n){const c=t[n];if(!((t,n)=>{let r=i.get(t);if(r||(r={},i.set(t,r)),n in r)return r[n];const s=t=>"string"===typeof t||"symbol"===typeof n?n===t:t.test(n),o=Reflect.getOwnPropertyDescriptor(t,n),c=void 0===o||o.writable||o.configurable,a=(e.include?e.include.some(s):!e.exclude.some(s))&&c;return r[n]=a,a})(t,n)||c===Function.prototype[n])return c;const a=s.get(c);if(a)return a;if("function"===typeof c){const n=r(c,e,o,t);return s.set(c,n),n}return c}});return o}},1878:function(t,e,n){const r=n(1810);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}}},1879:function(t,e,n){const r=n(1810),i=n(1811),{incrementHexInt:s}=n(1767);t.exports=class extends r{constructor(t){let{provider:e,params:n}=t;super(),this.type="block",this.provider=e}async update(t){let{oldBlock:e,newBlock:n}=t;const r=n,o=s(e),c=(await i({provider:this.provider,fromBlock:o,toBlock:r})).map((t=>t.hash));this.addResults(c)}}},1880:function(t,e,n){const r=n(1810),i=n(1811),{incrementHexInt:s}=n(1767);t.exports=class extends r{constructor(t){let{provider:e}=t;super(),this.type="tx",this.provider=e}async update(t){let{oldBlock:e}=t;const n=e,r=s(e),o=await i({provider:this.provider,fromBlock:r,toBlock:n}),c=[];for(const i of o)c.push(...i.transactions);this.addResults(c)}}},1881:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WalletSDKUI=void 0;const r=n(1882),i=n(1894),s=n(1896);e.WalletSDKUI=class{constructor(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,linkAPIUrl:t.linkAPIUrl,connected$:t.connected$,isParentConnection:!1})}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");const t=document.documentElement,e=document.createElement("div");e.className="-cbwsdk-css-reset",t.appendChild(e),this.linkFlow.attach(e),this.snackbar.attach(e),this.attached=!0,(0,s.injectCssReset)()}setConnectDisabled(t){this.linkFlow.setConnectDisabled(t)}addEthereumChain(t){}watchAsset(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}inlineWatchAsset(){return!1}inlineSwitchEthereumChain(){return!1}isStandalone(){return!1}}},1882:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinkFlow=void 0;const r=n(1756),i=n(1757),s=n(1883);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.linkAPIUrl=t.linkAPIUrl,this.isParentConnection=t.isParentConnection,this.connected$=t.connected$}attach(t){this.root=document.createElement("div"),this.root.className="-cbwsdk-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$.subscribe((()=>{this.root&&(0,r.render)((0,r.h)(s.TryExtensionLinkDialog,{darkMode:this.darkMode,version:this.version,sessionId:this.sessionId,sessionSecret:this.sessionSecret,linkAPIUrl:this.linkAPIUrl,isOpen:this.isOpen,isConnected:this.isConnected,isParentConnection:this.isParentConnection,onCancel:this.onCancel,connectDisabled:this.connectDisabled}),this.root)}));this.subscriptions.add(t)}}},1883: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(45)),s=n(1756),o=n(1812),c=n(1745),a=n(1884),u=r(n(1885)),l=r(n(1886)),h=r(n(1887)),d=r(n(1888)),f=n(1889),p=n(1891),b=r(n(1893));e.TryExtensionLinkDialog=t=>{const[e,n]=(0,o.useState)(!t.isOpen),[r,c]=(0,o.useState)(!t.isOpen);return(0,o.useEffect)((()=>{const{isOpen:e}=t,r=[window.setTimeout((()=>{c(!e)}),10)];return e?n(!1):r.push(window.setTimeout((()=>{n(!0)}),360)),()=>{r.forEach(window.clearTimeout)}}),[t.isOpen]),(0,s.h)("div",{class:(0,i.default)("-cbwsdk-extension-dialog-container",e&&"-cbwsdk-extension-dialog-container-hidden")},(0,s.h)("style",null,b.default),(0,s.h)("div",{class:(0,i.default)("-cbwsdk-extension-dialog-backdrop",r&&"-cbwsdk-extension-dialog-backdrop-hidden")}),(0,s.h)("div",{class:"-cbwsdk-extension-dialog"},(0,s.h)("div",{class:(0,i.default)("-cbwsdk-extension-dialog-box",r&&"-cbwsdk-extension-dialog-box-hidden")},(0,s.h)(y,{onInstallClick:()=>{window.open("https://api.wallet.coinbase.com/rpc/v2/desktop/chrome","_blank")}}),t.connectDisabled?null:(0,s.h)(g,{darkMode:t.darkMode,version:t.version,sessionId:t.sessionId,sessionSecret:t.sessionSecret,linkAPIUrl:t.linkAPIUrl,isConnected:t.isConnected,isParentConnection:t.isParentConnection}),t.onCancel&&(0,s.h)(_,{onClick:t.onCancel}))))};const y=t=>{let{onInstallClick:e}=t;const[n,r]=(0,o.useState)(!1),i=(0,o.useCallback)((()=>{n?window.location.reload():(e(),r(!0))}),[e,n]);return(0,s.h)("div",{class:"-cbwsdk-extension-dialog-box-top"},(0,s.h)("div",{class:"-cbwsdk-extension-dialog-box-top-install-region"},(0,s.h)("h2",null,"Try the Coinbase Wallet extension"),n&&(0,s.h)("div",{class:"-cbwsdk-extension-dialog-box-top-subtext"},"After installing Coinbase Wallet, refresh the page and connect again."),(0,s.h)("button",{type:"button",onClick:i},n?"Refresh":"Install")),(0,s.h)("div",{class:"-cbwsdk-extension-dialog-box-top-info-region"},(0,s.h)(m,{icon:l.default,text:"Connect to crypto apps with one click"}),(0,s.h)(m,{icon:h.default,text:"Your private key is stored securely"}),(0,s.h)(m,{icon:u.default,text:"Works with Ethereum, Polygon, and more"})))},g=t=>{const e=(0,c.createQrUrl)(t.sessionId,t.sessionSecret,t.linkAPIUrl,t.isParentConnection);return(0,s.h)("div",{"data-testid":"scan-qr-box",class:"-cbwsdk-extension-dialog-box-bottom"},(0,s.h)("div",{class:"-cbwsdk-extension-dialog-box-bottom-description-region"},(0,s.h)("h2",null,"Or scan to connect"),(0,s.h)("body",{class:"-cbwsdk-extension-dialog-box-bottom-description"},"Open"," ",(0,s.h)("a",{href:"https://wallet.coinbase.com/",target:"_blank",rel:"noopener noreferrer"},"Coinbase Wallet")," ","on your mobile phone and scan")),(0,s.h)("div",{class:"-cbwsdk-extension-dialog-box-bottom-qr-region"},(0,s.h)("div",{class:"-cbwsdk-extension-dialog-box-bottom-qr-wrapper"},(0,s.h)(f.QRCode,{content:e,width:150,height:150,fgColor:"#000",bgColor:"transparent",image:{svg:d.default,width:34,height:34}})),(0,s.h)("input",{type:"hidden",name:"cbwsdk-version",value:a.LIB_VERSION}),(0,s.h)("input",{type:"hidden",value:e}),!t.isConnected&&(0,s.h)("div",{"data-testid":"connecting-spinner",class:"-cbwsdk-extension-dialog-box-bottom-qr-connecting"},(0,s.h)(p.Spinner,{size:36,color:"#000"}),(0,s.h)("p",null,"Connecting..."))))},m=t=>(0,s.h)("div",{class:"-cbwsdk-extension-dialog-box-top-description"},(0,s.h)("div",{class:"-cbwsdk-extension-dialog-box-top-description-icon-wrapper"},(0,s.h)("img",{src:t.icon})),(0,s.h)("body",{class:"-cbwsdk-extension-dialog-box-top-description-text"},t.text)),_=t=>(0,s.h)("button",{type:"button",class:"-cbwsdk-extension-dialog-box-cancel",onClick:t.onClick},(0,s.h)("div",{class:"-cbwsdk-extension-dialog-box-cancel-x"}))},1884:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LIB_VERSION=void 0,e.LIB_VERSION="3.1.0"},1885:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTggMEMzLjU4IDAgMCAzLjU4IDAgOHMzLjU4IDggOCA4IDgtMy41OCA4LTgtMy41OC04LTgtOFptNS45MSA3aC0xLjk0Yy0uMS0xLjU3LS40Mi0zLS45MS00LjE1IDEuNDguODggMi41NSAyLjM4IDIuODUgNC4xNVpNOCAxNGMtLjQ1IDAtMS43Mi0xLjc3LTEuOTUtNWgzLjljLS4yMyAzLjIzLTEuNSA1LTEuOTUgNVpNNi4wNSA3QzYuMjggMy43NyA3LjU1IDIgOCAyYy40NSAwIDEuNzIgMS43NyAxLjk1IDVoLTMuOVpNNC45NCAyLjg1QzQuNDYgNCA0LjEzIDUuNDMgNC4wMyA3SDIuMDljLjMtMS43NyAxLjM3LTMuMjcgMi44NS00LjE1Wk0yLjA5IDloMS45NGMuMSAxLjU3LjQyIDMgLjkxIDQuMTVBNS45OTggNS45OTggMCAwIDEgMi4wOSA5Wm04Ljk3IDQuMTVjLjQ4LTEuMTUuODEtMi41OC45MS00LjE1aDEuOTRhNS45OTggNS45OTggMCAwIDEtMi44NSA0LjE1WiIgZmlsbD0iIzE2NTJGMCIvPjwvc3ZnPg=="},1886:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTciIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE1LjYzNSAyLjExN2EzLjg4OSAzLjg4OSAwIDAgMC01LjUyMSAwTDYuODkgNS4zMzVBMy44OTQgMy44OTQgMCAwIDAgNS44IDguNzM5Yy4wODMuNTA2LjI2OCAxLjAxMS41NTMgMS40NjYuMTUxLjI1My4zMzYuNDcyLjUzNy42OTFsLjYyMS42MjQgMS4xNDEtMS4xNDYtLjYyLS42MjRhMi4xMDUgMi4xMDUgMCAwIDEtLjQ4Ny0uNzQxIDIuMzQgMi4zNCAwIDAgMSAuNTAzLTIuNTFsMy4yMDYtMy4yMmEyLjI5MyAyLjI5MyAwIDAgMSAzLjIzOSAwYy44OS44OTQuODkgMi4zNDMgMCAzLjI1M2wtMS41MjcgMS41MzNjLjIzNC42NC4zMzUgMS4zMzEuMzAyIDIuMDA1bDIuMzgzLTIuMzkyYzEuNTEtMS41MzQgMS40OTMtNC4wMjgtLjAxNy01LjU2MVoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBkPSJNMTEuMjcxIDcuNzQ1YTMuMTMgMy4xMyAwIDAgMC0uNTU0LS42OWwtLjYyLS42MjQtMS4xNDIgMS4xNDYuNjIxLjYyM2MuMjE4LjIyLjM4Ni40ODkuNDg3Ljc1OC4zMzUuODI2LjE2NyAxLjgyLS41MDQgMi40OTRsLTMuMjA1IDMuMjE5YTIuMjkzIDIuMjkzIDAgMCAxLTMuMjQgMCAyLjMxNiAyLjMxNiAwIDAgMSAwLTMuMjUybDEuNTI4LTEuNTM0YTQuODE1IDQuODE1IDAgMCAxLS4yODUtMi4wMDVsLTIuMzgzIDIuMzkzYTMuOTI3IDMuOTI3IDAgMCAwIDAgNS41NDQgMy45MDkgMy45MDkgMCAwIDAgNS41MzggMGwzLjIwNS0zLjIxOWEzLjk1OCAzLjk1OCAwIDAgMCAxLjA5MS0zLjQwNCA0LjIxMSA0LjIxMSAwIDAgMC0uNTM3LTEuNDQ5WiIgZmlsbD0iIzE2NTJGMCIvPjwvc3ZnPg=="},1887:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEgN3Y5aDE0VjdIMVptNy41IDQuMzlWMTRoLTF2LTIuNjFjLS40NC0uMTktLjc1LS42My0uNzUtMS4xNGExLjI1IDEuMjUgMCAwIDEgMi41IDBjMCAuNTEtLjMxLjk1LS43NSAxLjE0Wk01LjY3IDZWNC4zM0M1LjY3IDMuMDUgNi43MSAyIDggMnMyLjMzIDEuMDUgMi4zMyAyLjMzVjZoMlY0LjMzQzEyLjMzIDEuOTQgMTAuMzkgMCA4IDBTMy42NyAxLjk0IDMuNjcgNC4zM1Y2aDJaIiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+"},1888:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default='<svg width="100" height="100" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg">\n<circle cx="50" cy="50" r="50" fill="white"/>\n<circle cx="49.9996" cy="49.9996" r="43.6363" fill="#1B53E4"/>\n<circle cx="49.9996" cy="49.9996" r="43.6363" stroke="white"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M19.3379 49.9484C19.3379 66.8508 33.04 80.553 49.9425 80.553C66.8449 80.553 80.5471 66.8508 80.5471 49.9484C80.5471 33.0459 66.8449 19.3438 49.9425 19.3438C33.04 19.3438 19.3379 33.0459 19.3379 49.9484ZM44.0817 40.0799C41.8725 40.0799 40.0817 41.8708 40.0817 44.0799V55.8029C40.0817 58.012 41.8725 59.8029 44.0817 59.8029H55.8046C58.0138 59.8029 59.8046 58.012 59.8046 55.8029V44.0799C59.8046 41.8708 58.0138 40.0799 55.8046 40.0799H44.0817Z" fill="white"/>\n</svg>\n\n'},1889:function(t,e,n){"use strict";(function(t){var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.QRCode=void 0;const i=n(1756),s=n(1812),o=r(n(1890));e.QRCode=e=>{const[n,r]=(0,s.useState)("");return(0,s.useEffect)((()=>{var n,i;const s=new o.default({content:e.content,background:e.bgColor||"#ffffff",color:e.fgColor||"#000000",container:"svg",ecl:"M",width:null!==(n=e.width)&&void 0!==n?n:256,height:null!==(i=e.height)&&void 0!==i?i:256,padding:0,image:e.image}),c=t.from(s.svg(),"utf8").toString("base64");r(`data:image/svg+xml;base64,${c}`)})),n?(0,i.h)("img",{src:n,alt:"QR Code"}):null}}).call(this,n(60).Buffer)},1890:function(t,e){function n(t){this.mode=i.MODE_8BIT_BYTE,this.data=t,this.parsedData=[];for(var e=0,n=this.data.length;e<n;e++){var r=[],s=this.data.charCodeAt(e);s>65536?(r[0]=240|(1835008&s)>>>18,r[1]=128|(258048&s)>>>12,r[2]=128|(4032&s)>>>6,r[3]=128|63&s):s>2048?(r[0]=224|(61440&s)>>>12,r[1]=128|(4032&s)>>>6,r[2]=128|63&s):s>128?(r[0]=192|(1984&s)>>>6,r[1]=128|63&s):r[0]=s,this.parsedData.push(r)}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 r(t,e){this.typeNumber=t,this.errorCorrectLevel=e,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}n.prototype={getLength:function(t){return this.parsedData.length},write:function(t){for(var e=0,n=this.parsedData.length;e<n;e++)t.put(this.parsedData[e],8)}},r.prototype={addData:function(t){var e=new n(t);this.dataList.push(e),this.dataCache=null},isDark:function(t,e){if(t<0||this.moduleCount<=t||e<0||this.moduleCount<=e)throw new Error(t+","+e);return this.modules[t][e]},getModuleCount:function(){return this.moduleCount},make:function(){this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(t,e){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var n=0;n<this.moduleCount;n++){this.modules[n]=new Array(this.moduleCount);for(var i=0;i<this.moduleCount;i++)this.modules[n][i]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(t,e),this.typeNumber>=7&&this.setupTypeNumber(t),null==this.dataCache&&(this.dataCache=r.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=g.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<this.modules.length;i++)for(var s=1*i,o=0;o<this.modules[i].length;o++){var c=1*o;this.modules[i][o]&&(r.beginFill(0,100),r.moveTo(c,s),r.lineTo(c+1,s),r.lineTo(c+1,s+1),r.lineTo(c,s+1),r.endFill())}return r},setupTimingPattern:function(){for(var t=8;t<this.moduleCount-8;t++)null==this.modules[t][6]&&(this.modules[t][6]=t%2==0);for(var e=8;e<this.moduleCount-8;e++)null==this.modules[6][e]&&(this.modules[6][e]=e%2==0)},setupPositionAdjustPattern:function(){for(var t=g.getPatternPosition(this.typeNumber),e=0;e<t.length;e++)for(var n=0;n<t.length;n++){var r=t[e],i=t[n];if(null==this.modules[r][i])for(var s=-2;s<=2;s++)for(var o=-2;o<=2;o++)this.modules[r+s][i+o]=-2==s||2==s||-2==o||2==o||0==s&&0==o}},setupTypeNumber:function(t){for(var e=g.getBCHTypeNumber(this.typeNumber),n=0;n<18;n++){var r=!t&&1==(e>>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=g.getBCHTypeInfo(n),i=0;i<15;i++){var s=!t&&1==(r>>i&1);i<6?this.modules[i][8]=s:i<8?this.modules[i+1][8]=s:this.modules[this.moduleCount-15+i][8]=s}for(i=0;i<15;i++){s=!t&&1==(r>>i&1);i<8?this.modules[8][this.moduleCount-i-1]=s:i<9?this.modules[8][15-i-1+1]=s:this.modules[8][15-i-1]=s}this.modules[this.moduleCount-8][8]=!t},mapData:function(t,e){for(var n=-1,r=this.moduleCount-1,i=7,s=0,o=this.moduleCount-1;o>0;o-=2)for(6==o&&o--;;){for(var c=0;c<2;c++)if(null==this.modules[r][o-c]){var a=!1;s<t.length&&(a=1==(t[s]>>>i&1)),g.getMask(e,r,o-c)&&(a=!a),this.modules[r][o-c]=a,-1==--i&&(s++,i=7)}if((r+=n)<0||this.moduleCount<=r){r-=n,n=-n;break}}}},r.PAD0=236,r.PAD1=17,r.createData=function(t,e,n){for(var i=w.getRSBlocks(t,e),s=new E,o=0;o<n.length;o++){var c=n[o];s.put(c.mode,4),s.put(c.getLength(),g.getLengthInBits(c.mode,t)),c.write(s)}var a=0;for(o=0;o<i.length;o++)a+=i[o].dataCount;if(s.getLengthInBits()>8*a)throw new Error("code length overflow. ("+s.getLengthInBits()+">"+8*a+")");for(s.getLengthInBits()+4<=8*a&&s.put(0,4);s.getLengthInBits()%8!=0;)s.putBit(!1);for(;!(s.getLengthInBits()>=8*a)&&(s.put(r.PAD0,8),!(s.getLengthInBits()>=8*a));)s.put(r.PAD1,8);return r.createBytes(s,i)},r.createBytes=function(t,e){for(var n=0,r=0,i=0,s=new Array(e.length),o=new Array(e.length),c=0;c<e.length;c++){var a=e[c].dataCount,u=e[c].totalCount-a;r=Math.max(r,a),i=Math.max(i,u),s[c]=new Array(a);for(var l=0;l<s[c].length;l++)s[c][l]=255&t.buffer[l+n];n+=a;var h=g.getErrorCorrectPolynomial(u),d=new v(s[c],h.getLength()-1).mod(h);o[c]=new Array(h.getLength()-1);for(l=0;l<o[c].length;l++){var f=l+d.getLength()-o[c].length;o[c][l]=f>=0?d.get(f):0}}var p=0;for(l=0;l<e.length;l++)p+=e[l].totalCount;var b=new Array(p),y=0;for(l=0;l<r;l++)for(c=0;c<e.length;c++)l<s[c].length&&(b[y++]=s[c][l]);for(l=0;l<i;l++)for(c=0;c<e.length;c++)l<o[c].length&&(b[y++]=o[c][l]);return b};for(var i={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},s=1,o=0,c=3,a=2,u=0,l=1,h=2,d=3,f=4,p=5,b=6,y=7,g={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(t){for(var e=t<<10;g.getBCHDigit(e)-g.getBCHDigit(g.G15)>=0;)e^=g.G15<<g.getBCHDigit(e)-g.getBCHDigit(g.G15);return(t<<10|e)^g.G15_MASK},getBCHTypeNumber:function(t){for(var e=t<<12;g.getBCHDigit(e)-g.getBCHDigit(g.G18)>=0;)e^=g.G18<<g.getBCHDigit(e)-g.getBCHDigit(g.G18);return t<<12|e},getBCHDigit:function(t){for(var e=0;0!=t;)e++,t>>>=1;return e},getPatternPosition:function(t){return g.PATTERN_POSITION_TABLE[t-1]},getMask:function(t,e,n){switch(t){case u:return(e+n)%2==0;case l:return e%2==0;case h:return n%3==0;case d:return(e+n)%3==0;case f:return(Math.floor(e/2)+Math.floor(n/3))%2==0;case p:return e*n%2+e*n%3==0;case b:return(e*n%2+e*n%3)%2==0;case y:return(e*n%3+(e+n)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}},getErrorCorrectPolynomial:function(t){for(var e=new v([1],0),n=0;n<t;n++)e=e.multiply(new v([1,m.gexp(n)],0));return e},getLengthInBits:function(t,e){if(1<=e&&e<10)switch(t){case i.MODE_NUMBER:return 10;case i.MODE_ALPHA_NUM:return 9;case i.MODE_8BIT_BYTE:case i.MODE_KANJI:return 8;default:throw new Error("mode:"+t)}else if(e<27)switch(t){case i.MODE_NUMBER:return 12;case i.MODE_ALPHA_NUM:return 11;case i.MODE_8BIT_BYTE:return 16;case i.MODE_KANJI:return 10;default:throw new Error("mode:"+t)}else{if(!(e<41))throw new Error("type:"+e);switch(t){case i.MODE_NUMBER:return 14;case i.MODE_ALPHA_NUM:return 13;case i.MODE_8BIT_BYTE:return 16;case i.MODE_KANJI:return 12;default:throw new Error("mode:"+t)}}},getLostPoint:function(t){for(var e=t.getModuleCount(),n=0,r=0;r<e;r++)for(var i=0;i<e;i++){for(var s=0,o=t.isDark(r,i),c=-1;c<=1;c++)if(!(r+c<0||e<=r+c))for(var a=-1;a<=1;a++)i+a<0||e<=i+a||0==c&&0==a||o==t.isDark(r+c,i+a)&&s++;s>5&&(n+=3+s-5)}for(r=0;r<e-1;r++)for(i=0;i<e-1;i++){var u=0;t.isDark(r,i)&&u++,t.isDark(r+1,i)&&u++,t.isDark(r,i+1)&&u++,t.isDark(r+1,i+1)&&u++,0!=u&&4!=u||(n+=3)}for(r=0;r<e;r++)for(i=0;i<e-6;i++)t.isDark(r,i)&&!t.isDark(r,i+1)&&t.isDark(r,i+2)&&t.isDark(r,i+3)&&t.isDark(r,i+4)&&!t.isDark(r,i+5)&&t.isDark(r,i+6)&&(n+=40);for(i=0;i<e;i++)for(r=0;r<e-6;r++)t.isDark(r,i)&&!t.isDark(r+1,i)&&t.isDark(r+2,i)&&t.isDark(r+3,i)&&t.isDark(r+4,i)&&!t.isDark(r+5,i)&&t.isDark(r+6,i)&&(n+=40);var l=0;for(i=0;i<e;i++)for(r=0;r<e;r++)t.isDark(r,i)&&l++;return n+=10*(Math.abs(100*l/e/e-50)/5)}},m={glog:function(t){if(t<1)throw new Error("glog("+t+")");return m.LOG_TABLE[t]},gexp:function(t){for(;t<0;)t+=255;for(;t>=256;)t-=255;return m.EXP_TABLE[t]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},_=0;_<8;_++)m.EXP_TABLE[_]=1<<_;for(_=8;_<256;_++)m.EXP_TABLE[_]=m.EXP_TABLE[_-4]^m.EXP_TABLE[_-5]^m.EXP_TABLE[_-6]^m.EXP_TABLE[_-8];for(_=0;_<255;_++)m.LOG_TABLE[m.EXP_TABLE[_]]=_;function v(t,e){if(void 0==t.length)throw new Error(t.length+"/"+e);for(var n=0;n<t.length&&0==t[n];)n++;this.num=new Array(t.length-n+e);for(var r=0;r<t.length-n;r++)this.num[r]=t[r+n]}function w(t,e){this.totalCount=t,this.dataCount=e}function E(){this.buffer=[],this.length=0}v.prototype={get:function(t){return this.num[t]},getLength:function(){return this.num.length},multiply:function(t){for(var e=new Array(this.getLength()+t.getLength()-1),n=0;n<this.getLength();n++)for(var r=0;r<t.getLength();r++)e[n+r]^=m.gexp(m.glog(this.get(n))+m.glog(t.get(r)));return new v(e,0)},mod:function(t){if(this.getLength()-t.getLength()<0)return this;for(var e=m.glog(this.get(0))-m.glog(t.get(0)),n=new Array(this.getLength()),r=0;r<this.getLength();r++)n[r]=this.get(r);for(r=0;r<t.getLength();r++)n[r]^=m.gexp(m.glog(t.get(r))+e);return new v(n,0).mod(t)}},w.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],w.getRSBlocks=function(t,e){var n=w.getRsBlockTable(t,e);if(void 0==n)throw new Error("bad rs block @ typeNumber:"+t+"/errorCorrectLevel:"+e);for(var r=n.length/3,i=[],s=0;s<r;s++)for(var o=n[3*s+0],c=n[3*s+1],a=n[3*s+2],u=0;u<o;u++)i.push(new w(c,a));return i},w.getRsBlockTable=function(t,e){switch(e){case s:return w.RS_BLOCK_TABLE[4*(t-1)+0];case o:return w.RS_BLOCK_TABLE[4*(t-1)+1];case c:return w.RS_BLOCK_TABLE[4*(t-1)+2];case a:return w.RS_BLOCK_TABLE[4*(t-1)+3];default:return}},E.prototype={get:function(t){var e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(var n=0;n<e;n++)this.putBit(1==(t>>>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 x=[[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 S(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 n=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,s=0,o=x.length;s<=o;s++){var c=x[s];if(!c)throw new Error("Content too long: expected "+i+" but got "+n);switch(e){case"L":i=c[0];break;case"M":i=c[1];break;case"Q":i=c[2];break;case"H":i=c[3];break;default:throw new Error("Unknwon error correction level: "+e)}if(n<=i)break;r++}if(r>x.length)throw new Error("Content too long");return r}(n,this.options.ecl),u=function(t){switch(t){case"L":return s;case"M":return o;case"Q":return c;case"H":return a;default:throw new Error("Unknwon error correction level: "+t)}}(this.options.ecl);this.qrcode=new r(i,u),this.qrcode.addData(n),this.qrcode.make()}S.prototype.svg=function(t){var e=this.options||{},n=this.qrcode.modules;"undefined"==typeof t&&(t={container:e.container||"svg"});for(var r="undefined"==typeof e.pretty||!!e.pretty,i=r?" ":"",s=r?"\r\n":"",o=e.width,c=e.height,a=n.length,u=o/(a+2*e.padding),l=c/(a+2*e.padding),h="undefined"!=typeof e.join&&!!e.join,d="undefined"!=typeof e.swap&&!!e.swap,f="undefined"==typeof e.xmlDeclaration||!!e.xmlDeclaration,p="undefined"!=typeof e.predefined&&!!e.predefined,b=p?i+'<defs><path id="qrmodule" d="M0 0 h'+l+" v"+u+' H0 z" style="fill:'+e.color+';shape-rendering:crispEdges;" /></defs>'+s:"",y=i+'<rect x="0" y="0" width="'+o+'" height="'+c+'" style="fill:'+e.background+';shape-rendering:crispEdges;"/>'+s,g="",m="",_=0;_<a;_++)for(var v=0;v<a;v++){if(n[v][_]){var w=v*u+e.padding*u,E=_*l+e.padding*l;if(d){var x=w;w=E,E=x}if(h){var S=u+w,k=l+E;w=Number.isInteger(w)?Number(w):w.toFixed(2),E=Number.isInteger(E)?Number(E):E.toFixed(2),S=Number.isInteger(S)?Number(S):S.toFixed(2),m+="M"+w+","+E+" V"+(k=Number.isInteger(k)?Number(k):k.toFixed(2))+" H"+S+" V"+E+" H"+w+" Z "}else g+=p?i+'<use x="'+w.toString()+'" y="'+E.toString()+'" href="#qrmodule" />'+s:i+'<rect x="'+w.toString()+'" y="'+E.toString()+'" width="'+u+'" height="'+l+'" style="fill:'+e.color+';shape-rendering:crispEdges;"/>'+s}}h&&(g=i+'<path x="0" y="0" style="fill:'+e.color+';shape-rendering:crispEdges;" d="'+m+'" />');let C="";if(void 0!==this.options.image&&this.options.image.svg){const t=o*this.options.image.width/100,e=c*this.options.image.height/100;C+=`<svg x="${o/2-t/2}" y="${c/2-e/2}" width="${t}" height="${e}" viewBox="0 0 100 100" preserveAspectRatio="xMinYMin meet">`,C+=this.options.image.svg+s,C+="</svg>"}var I="";switch(t.container){case"svg":f&&(I+='<?xml version="1.0" standalone="yes"?>'+s),I+='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="'+o+'" height="'+c+'">'+s,I+=b+y+g,I+=C,I+="</svg>";break;case"svg-viewbox":f&&(I+='<?xml version="1.0" standalone="yes"?>'+s),I+='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 '+o+" "+c+'">'+s,I+=b+y+g,I+=C,I+="</svg>";break;case"g":I+='<g width="'+o+'" height="'+c+'">'+s,I+=b+y+g,I+=C,I+="</g>";break;default:I+=(b+y+g+C).replace(/^\s+/,"")}return I},t.exports=S},1891: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(1756),s=r(n(1892));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:"-cbwsdk-spinner"},(0,i.h)("style",null,s.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}})))}},1892:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=".-cbwsdk-css-reset .-cbwsdk-spinner{display:inline-block}.-cbwsdk-css-reset .-cbwsdk-spinner svg{display:inline-block;animation:2s linear infinite -cbwsdk-spinner-svg}.-cbwsdk-css-reset .-cbwsdk-spinner svg circle{animation:1.9s ease-in-out infinite both -cbwsdk-spinner-circle;display:block;fill:rgba(0,0,0,0);stroke-dasharray:283;stroke-dashoffset:280;stroke-linecap:round;stroke-width:10px;transform-origin:50% 50%}@keyframes -cbwsdk-spinner-svg{0%{transform:rotateZ(0deg)}100%{transform:rotateZ(360deg)}}@keyframes -cbwsdk-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)}}"},1893:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default='.-cbwsdk-css-reset .-cbwsdk-extension-dialog{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.-cbwsdk-css-reset .-cbwsdk-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}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-backdrop-hidden{opacity:0}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box{display:flex;position:relative;max-width:500px;flex-direction:column;transform:scale(1);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-hidden{opacity:0;transform:scale(0.85)}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top{display:flex;flex-direction:row;background-color:#fff;border-radius:8px;overflow:hidden;min-height:300px}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-subtext{margin-top:15px;font-size:12px;line-height:1.5}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-install-region{display:flex;flex-basis:50%;flex-direction:column;justify-content:center;padding:32px}.-cbwsdk-css-reset .-cbwsdk-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}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-info-region{display:flex;flex-basis:50%;flex-direction:column;justify-content:center;background-color:#fafbfc}.-cbwsdk-css-reset .-cbwsdk-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}.-cbwsdk-css-reset .-cbwsdk-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)}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-description-icon-wrapper img{position:absolute;top:0;bottom:0;left:0;right:0;margin:auto}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-top-description-text{margin-left:16px;flex-grow:1;font-size:13px;line-height:19px;color:#000;align-self:center}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom{display:flex;flex-direction:row;overflow:hidden;border-radius:8px;background-color:#fff;margin-top:8px}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-description-region{display:flex;flex-direction:column;justify-content:center;padding:32px;flex-grow:1}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-description{font-size:13px;line-height:19px;margin-top:12px;color:#aaa}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-description a{font-size:inherit;line-height:inherit;color:#1652f0;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-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}.-cbwsdk-css-reset .-cbwsdk-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)}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-qr-wrapper img{display:block}.-cbwsdk-css-reset .-cbwsdk-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)}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-bottom-qr-connecting>p{font-size:12px;font-weight:bold;color:#000;margin-top:16px}.-cbwsdk-css-reset .-cbwsdk-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}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel-x{position:relative;display:block;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel-x::before,.-cbwsdk-css-reset .-cbwsdk-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}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel-x::before{transform:rotate(45deg)}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel-x::after{transform:rotate(135deg)}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel:hover .-cbwsdk-link-dialog-box-cancel-x-a,.-cbwsdk-css-reset .-cbwsdk-extension-dialog-box-cancel:hover .-cbwsdk-link-dialog-box-cancel-x-b{background-color:#000}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-container{display:block}.-cbwsdk-css-reset .-cbwsdk-extension-dialog-container-hidden{display:none}.-cbwsdk-css-reset .-cbwsdk-extension-dialog h2{display:block;text-align:left;font-size:22px;font-weight:600;line-height:28px;color:#000}'},1894: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.SnackbarInstance=e.SnackbarContainer=e.Snackbar=void 0;const i=r(n(45)),s=n(1756),o=n(1812),c=r(n(1895));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="-cbwsdk-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,s.render)((0,s.h)("div",null,(0,s.h)(e.SnackbarContainer,{darkMode:this.darkMode},Array.from(this.items.entries()).map((t=>{let[n,r]=t;return(0,s.h)(e.SnackbarInstance,Object.assign({},r,{key:n}))})))),this.root)}};e.SnackbarContainer=t=>(0,s.h)("div",{class:(0,i.default)("-cbwsdk-snackbar-container")},(0,s.h)("style",null,c.default),(0,s.h)("div",{class:"-cbwsdk-snackbar"},t.children));e.SnackbarInstance=t=>{let{autoExpand:e,message:n,menuItems:r}=t;const[c,a]=(0,o.useState)(!0),[u,l]=(0,o.useState)(null!==e&&void 0!==e&&e);(0,o.useEffect)((()=>{const t=[window.setTimeout((()=>{a(!1)}),1),window.setTimeout((()=>{l(!0)}),1e4)];return()=>{t.forEach(window.clearTimeout)}}));return(0,s.h)("div",{class:(0,i.default)("-cbwsdk-snackbar-instance",c&&"-cbwsdk-snackbar-instance-hidden",u&&"-cbwsdk-snackbar-instance-expanded")},(0,s.h)("div",{class:"-cbwsdk-snackbar-instance-header",onClick:()=>{l(!u)}},(0,s.h)("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNDkyIDEwLjQxOWE4LjkzIDguOTMgMCAwMTguOTMtOC45M2gxMS4xNjNhOC45MyA4LjkzIDAgMDE4LjkzIDguOTN2MTEuMTYzYTguOTMgOC45MyAwIDAxLTguOTMgOC45M0gxMC40MjJhOC45MyA4LjkzIDAgMDEtOC45My04LjkzVjEwLjQxOXoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEwLjQxOSAwSDIxLjU4QzI3LjMzNSAwIDMyIDQuNjY1IDMyIDEwLjQxOVYyMS41OEMzMiAyNy4zMzUgMjcuMzM1IDMyIDIxLjU4MSAzMkgxMC40MkM0LjY2NSAzMiAwIDI3LjMzNSAwIDIxLjU4MVYxMC40MkMwIDQuNjY1IDQuNjY1IDAgMTAuNDE5IDB6bTAgMS40ODhhOC45MyA4LjkzIDAgMDAtOC45MyA4LjkzdjExLjE2M2E4LjkzIDguOTMgMCAwMDguOTMgOC45M0gyMS41OGE4LjkzIDguOTMgMCAwMDguOTMtOC45M1YxMC40MmE4LjkzIDguOTMgMCAwMC04LjkzLTguOTNIMTAuNDJ6IiBmaWxsPSIjZmZmIi8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNS45OTggMjYuMDQ5Yy01LjU0OSAwLTEwLjA0Ny00LjQ5OC0xMC4wNDctMTAuMDQ3IDAtNS41NDggNC40OTgtMTAuMDQ2IDEwLjA0Ny0xMC4wNDYgNS41NDggMCAxMC4wNDYgNC40OTggMTAuMDQ2IDEwLjA0NiAwIDUuNTQ5LTQuNDk4IDEwLjA0Ny0xMC4wNDYgMTAuMDQ3eiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0xMi43NjIgMTQuMjU0YzAtLjgyMi42NjctMS40ODkgMS40ODktMS40ODloMy40OTdjLjgyMiAwIDEuNDg4LjY2NiAxLjQ4OCAxLjQ4OXYzLjQ5N2MwIC44MjItLjY2NiAxLjQ4OC0xLjQ4OCAxLjQ4OGgtMy40OTdhMS40ODggMS40ODggMCAwMS0xLjQ4OS0xLjQ4OHYtMy40OTh6IiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+",class:"-cbwsdk-snackbar-instance-header-cblogo"}),(0,s.h)("div",{class:"-cbwsdk-snackbar-instance-header-message"},n),(0,s.h)("div",{class:"-gear-container"},!u&&(0,s.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,s.h)("circle",{cx:"12",cy:"12",r:"12",fill:"#F5F7F8"})),(0,s.h)("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDYuNzV2LTEuNWwtMS43Mi0uNTdjLS4wOC0uMjctLjE5LS41Mi0uMzItLjc3bC44MS0xLjYyLTEuMDYtMS4wNi0xLjYyLjgxYy0uMjQtLjEzLS41LS4yNC0uNzctLjMyTDYuNzUgMGgtMS41bC0uNTcgMS43MmMtLjI3LjA4LS41My4xOS0uNzcuMzJsLTEuNjItLjgxLTEuMDYgMS4wNi44MSAxLjYyYy0uMTMuMjQtLjI0LjUtLjMyLjc3TDAgNS4yNXYxLjVsMS43Mi41N2MuMDguMjcuMTkuNTMuMzIuNzdsLS44MSAxLjYyIDEuMDYgMS4wNiAxLjYyLS44MWMuMjQuMTMuNS4yMy43Ny4zMkw1LjI1IDEyaDEuNWwuNTctMS43MmMuMjctLjA4LjUyLS4xOS43Ny0uMzJsMS42Mi44MSAxLjA2LTEuMDYtLjgxLTEuNjJjLjEzLS4yNC4yMy0uNS4zMi0uNzdMMTIgNi43NXpNNiA4LjVhMi41IDIuNSAwIDAxMC01IDIuNSAyLjUgMCAwMTAgNXoiIGZpbGw9IiMwNTBGMTkiLz48L3N2Zz4=",class:"-gear-icon",title:"Expand"}))),r&&r.length>0&&(0,s.h)("div",{class:"-cbwsdk-snackbar-instance-menu"},r.map(((t,e)=>(0,s.h)("div",{class:(0,i.default)("-cbwsdk-snackbar-instance-menu-item",t.isRed&&"-cbwsdk-snackbar-instance-menu-item-is-red"),onClick:t.onClick,key:e},(0,s.h)("svg",{width:t.svgWidth,height:t.svgHeight,viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,s.h)("path",{"fill-rule":t.defaultFillRule,"clip-rule":t.defaultClipRule,d:t.path,fill:"#AAAAAA"})),(0,s.h)("span",{class:(0,i.default)("-cbwsdk-snackbar-instance-menu-item-info",t.isRed&&"-cbwsdk-snackbar-instance-menu-item-info-is-red")},t.info))))))}},1895:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=".-cbwsdk-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}.-cbwsdk-css-reset .-gear-container *{user-select:none}.-cbwsdk-css-reset .-gear-container svg{opacity:0;position:absolute}.-cbwsdk-css-reset .-gear-icon{height:12px;width:12px;z-index:10000}.-cbwsdk-css-reset .-cbwsdk-snackbar{align-items:flex-end;display:flex;flex-direction:column;position:fixed;right:0;top:0;z-index:2147483647}.-cbwsdk-css-reset .-cbwsdk-snackbar *{user-select:none}.-cbwsdk-css-reset .-cbwsdk-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}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header:hover .-gear-container svg{opacity:1}.-cbwsdk-css-reset .-cbwsdk-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}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-cblogo{margin:8px 8px 8px 8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-message{color:#000;font-size:13px;line-height:1.5;user-select:none}.-cbwsdk-css-reset .-cbwsdk-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}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:last-child{margin-bottom:8px !important}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover{background:#f5f7f8;border-radius:6px;transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover span{color:#050f19;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover svg path{fill:#000;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-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}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item *{visibility:inherit;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover{background:rgba(223,95,103,.2);transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover svg path{fill:#df5f67;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover span{color:#df5f67;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-info{color:#aaa;font-size:13px;margin:0 8px 0 32px;position:absolute}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-hidden{opacity:0;text-align:left;transform:translateX(25%);transition:opacity .5s linear}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-expanded .-cbwsdk-snackbar-instance-menu{opacity:1;display:flex;transform:translateY(8px);visibility:visible}"},1896: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(1897));e.injectCssReset=function(){const t=document.createElement("style");t.type="text/css",t.appendChild(document.createTextNode(i.default)),document.documentElement.appendChild(t)}},1897:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default='@namespace svg "http://www.w3.org/2000/svg";.-cbwsdk-css-reset,.-cbwsdk-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:rgba(0,0,0,0);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}.-cbwsdk-css-reset *{box-sizing:border-box;display:initial;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;line-height:1}.-cbwsdk-css-reset [class*=container]{margin:0;padding:0}.-cbwsdk-css-reset style{display:none}'},1898: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}),s=this&&this.__decorate||function(t,e,n,r){var i,s=arguments.length,o=s<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r);else for(var c=t.length-1;c>=0;c--)(i=t[c])&&(o=(s<3?i(o):s>3?i(e,n,o):i(e,n))||o);return s>3&&o&&Object.defineProperty(e,n,o),o},o=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},c=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.WalletSDKRelay=void 0;const a=c(n(1899)),u=n(1786),l=n(1757),h=n(1781),d=n(1789),f=n(1900),p=n(1904),b=n(1745),y=o(n(1905)),g=n(1790),m=n(1827),_=n(1836),v=n(1906),w=n(1907),E=n(1908),x=n(1909);class S extends m.WalletSDKRelayAbstract{constructor(t){super(),this.accountsCallback=null,this.chainCallback=null,this.appName="",this.appLogoUrl=null,this.subscriptions=new l.Subscription,this.linkAPIUrl=t.linkAPIUrl,this.storage=t.storage,this._session=g.Session.load(t.storage)||new g.Session(t.storage).save(),this.relayEventManager=t.relayEventManager,this.eventListener=t.eventListener,this.connection=new f.WalletSDKConnection(this._session.id,this._session.key,this.linkAPIUrl,this.eventListener),this.subscriptions.add(this.connection.sessionConfig$.subscribe({next:t=>{this.onSessionConfigChanged(t)},error:()=>{var t;null===(t=this.eventListener)||void 0===t||t.onEvent(d.EVENTS.GENERAL_ERROR,{message:"error while invoking session config callback"})}})),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(t&&(this.session.linked=t),this.isUnlinkedErrorState=!1,n){const r=n.split(" "),i="true"===this.storage.getItem("IsStandaloneSigning");if(""!==r[0]&&!t&&this.session.linked&&!i){this.isUnlinkedErrorState=!0;const t=this.getSessionIdHash();null===(e=this.eventListener)||void 0===e||e.onEvent(d.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.eventListener)||void 0===t||t.onEvent(d.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=>y.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.eventListener)||void 0===t||t.onEvent(d.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=>y.decrypt(t.metadata.AppVersion,this._session.secret)))).subscribe({next:t=>{this.storage.setItem(m.APP_VERSION_KEY,t)},error:()=>{var t;null===(t=this.eventListener)||void 0===t||t.onEvent(d.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)(y.decrypt(t.metadata.ChainId,this._session.secret),y.decrypt(t.metadata.JsonRpcUrl,this._session.secret))))).pipe((0,h.distinctUntilChanged)()).subscribe({next:t=>{let[e,n]=t;this.chainCallback&&this.chainCallback(e,n)},error:()=>{var t;null===(t=this.eventListener)||void 0===t||t.onEvent(d.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=>y.decrypt(t.metadata.EthereumAddress,this._session.secret)))).subscribe({next:t=>{this.accountsCallback&&this.accountsCallback([t]),S.accountRequestCallbackIds.size>0&&(Array.from(S.accountRequestCallbackIds.values()).forEach((e=>{const n=(0,x.Web3ResponseMessage)({id:e,response:(0,E.RequestEthereumAccountsResponse)([t])});this.invokeCallback(Object.assign(Object.assign({},n),{id:e}))})),S.accountRequestCallbackIds.clear())},error:()=>{var t;null===(t=this.eventListener)||void 0===t||t.onEvent(d.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"selectedAddress"})}})),this.ui=t.uiConstructor({linkAPIUrl:t.linkAPIUrl,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(s){null===(e=this.eventListener)||void 0===e||e.onEvent(d.EVENTS.GENERAL_ERROR,{message:"Had error unsubscribing"})}null===(n=this.eventListener)||void 0===n||n.onEvent(d.EVENTS.SESSION_STATE_CHANGE,{method:"relay::resetAndReload",sessionMetadataChange:"__destroyed, 1",sessionIdHash:this.getSessionIdHash()}),this.connection.destroy();const i=g.Session.load(this.storage);(null===i||void 0===i?void 0:i.id)===this._session.id?this.storage.clear():i&&(null===(r=this.eventListener)||void 0===r||r.onEvent(d.EVENTS.SKIPPED_CLEARING_SESSION,{sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:g.Session.hash(i.id)})),this.ui.reloadUI()}),(t=>{var e;null===(e=this.eventListener)||void 0===e||e.onEvent(d.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:_.Web3Method.signEthereumMessage,params:{message:(0,b.hexStringFromBuffer)(t,!0),address:e,addPrefix:n,typedDataJson:r||null}})}ethereumAddressFromSignedMessage(t,e,n){return this.sendRequest({method:_.Web3Method.ethereumAddressFromSignedMessage,params:{message:(0,b.hexStringFromBuffer)(t,!0),signature:(0,b.hexStringFromBuffer)(e,!0),addPrefix:n}})}signEthereumTransaction(t){return this.sendRequest({method:_.Web3Method.signEthereumTransaction,params:{fromAddress:t.fromAddress,toAddress:t.toAddress,weiValue:(0,b.bigIntStringFromBN)(t.weiValue),data:(0,b.hexStringFromBuffer)(t.data,!0),nonce:t.nonce,gasPriceInWei:t.gasPriceInWei?(0,b.bigIntStringFromBN)(t.gasPriceInWei):null,maxFeePerGas:t.gasPriceInWei?(0,b.bigIntStringFromBN)(t.gasPriceInWei):null,maxPriorityFeePerGas:t.gasPriceInWei?(0,b.bigIntStringFromBN)(t.gasPriceInWei):null,gasLimit:t.gasLimit?(0,b.bigIntStringFromBN)(t.gasLimit):null,chainId:t.chainId,shouldSubmit:!1}})}signAndSubmitEthereumTransaction(t){return this.sendRequest({method:_.Web3Method.signEthereumTransaction,params:{fromAddress:t.fromAddress,toAddress:t.toAddress,weiValue:(0,b.bigIntStringFromBN)(t.weiValue),data:(0,b.hexStringFromBuffer)(t.data,!0),nonce:t.nonce,gasPriceInWei:t.gasPriceInWei?(0,b.bigIntStringFromBN)(t.gasPriceInWei):null,maxFeePerGas:t.maxFeePerGas?(0,b.bigIntStringFromBN)(t.maxFeePerGas):null,maxPriorityFeePerGas:t.maxPriorityFeePerGas?(0,b.bigIntStringFromBN)(t.maxPriorityFeePerGas):null,gasLimit:t.gasLimit?(0,b.bigIntStringFromBN)(t.gasLimit):null,chainId:t.chainId,shouldSubmit:!0}})}submitEthereumTransaction(t,e){return this.sendRequest({method:_.Web3Method.submitEthereumTransaction,params:{signedTransaction:(0,b.hexStringFromBuffer)(t,!0),chainId:e}})}scanQRCode(t){return this.sendRequest({method:_.Web3Method.scanQRCode,params:{regExp:t}})}getQRCodeUrl(){return(0,b.createQrUrl)(this._session.id,this._session.secret,this.linkAPIUrl,!1)}genericRequest(t,e){return this.sendRequest({method:_.Web3Method.generic,params:{action:e,data:t}})}sendGenericMessage(t){return this.sendRequest(t)}sendRequest(t){let e=null;const n=(0,b.randomBytesHex)(8),r=r=>{this.publishWeb3RequestCanceledEvent(n),this.handleErrorResponse(n,t.method,r),null===e||void 0===e||e()};return{promise:new Promise(((i,s)=>{this.ui.isStandalone()||(e=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:r,onResetConnection:this.resetAndReload})),this.relayEventManager.callbacks.set(n,(t=>{if(null===e||void 0===e||e(),t.errorMessage)return s(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,w.Web3RequestMessage)({id:t,request:e}),i=g.Session.load(this.storage);null===(n=this.eventListener)||void 0===n||n.onEvent(d.EVENTS.WEB3_REQUEST,{eventId:r.id,method:`relay::${r.request.method}`,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:i?g.Session.hash(i.id):"",isSessionMismatched:((null===i||void 0===i?void 0:i.id)!==this._session.id).toString()}),this.subscriptions.add(this.publishEvent("Web3Request",r,!0).subscribe({next:t=>{var e;null===(e=this.eventListener)||void 0===e||e.onEvent(d.EVENTS.WEB3_REQUEST_PUBLISHED,{eventId:r.id,method:`relay::${r.request.method}`,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:i?g.Session.hash(i.id):"",isSessionMismatched:((null===i||void 0===i?void 0:i.id)!==this._session.id).toString()})},error:t=>{this.handleWeb3ResponseMessage((0,x.Web3ResponseMessage)({id:r.id,response:{method:r.request.method,errorMessage:t.message}}))}}))}publishWeb3RequestCanceledEvent(t){const e=(0,v.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=>{y.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(y.decrypt(t.data,this.session.secret).pipe((0,h.map)((t=>JSON.parse(t)))).subscribe({next:t=>{const e=(0,x.isWeb3ResponseMessage)(t)?t:null;e&&this.handleWeb3ResponseMessage(e)},error:()=>{var t;null===(t=this.eventListener)||void 0===t||t.onEvent(d.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"incomingEvent"})}}))}catch(e){return}}handleWeb3ResponseMessage(t){var e;const{response:n}=t;if(null===(e=this.eventListener)||void 0===e||e.onEvent(d.EVENTS.WEB3_RESPONSE,{eventId:t.id,method:`relay::${n.method}`,sessionIdHash:this.getSessionIdHash()}),(0,E.isRequestEthereumAccountsResponse)(n))return S.accountRequestCallbackIds.forEach((e=>this.invokeCallback(Object.assign(Object.assign({},t),{id:e})))),void S.accountRequestCallbackIds.clear();this.invokeCallback(t)}handleErrorResponse(t,e,n,r){this.handleWeb3ResponseMessage((0,x.Web3ResponseMessage)({id:t,response:(0,E.ErrorResponse)(e,(null!==n&&void 0!==n?n:p.WalletUIError.UserRejectedRequest).message,r)}))}invokeCallback(t){const e=this.relayEventManager.callbacks.get(t.id);e&&(e(t.response),this.relayEventManager.callbacks.delete(t.id))}requestEthereumAccounts(){const t={method:_.Web3Method.requestEthereumAccounts,params:{appName:this.appName,appLogoUrl:this.appLogoUrl||null}},e=(0,b.randomBytesHex)(8),n=n=>{this.publishWeb3RequestCanceledEvent(e),this.handleErrorResponse(e,t.method,n)};return{promise:new Promise(((r,i)=>{var s;this.relayEventManager.callbacks.set(e,(t=>{if(this.ui.hideRequestEthereumAccounts(),t.errorMessage)return i(new Error(t.errorMessage));r(t)}));const o=(null===(s=null===window||void 0===window?void 0:window.navigator)||void 0===s?void 0:s.userAgent)||null;if(o&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(o))window.location.href=`https://go.cb-w.com/xoXnYwQimhb?cb_url=${encodeURIComponent(window.location.href)}`;else{if(this.ui.inlineAccountsResponse()){const t=t=>{this.handleWeb3ResponseMessage((0,x.Web3ResponseMessage)({id:e,response:(0,E.RequestEthereumAccountsResponse)(t)}))};this.ui.requestEthereumAccounts({onCancel:n,onAccounts:t})}else this.ui.requestEthereumAccounts({onCancel:n});S.accountRequestCallbackIds.add(e),this.ui.inlineAccountsResponse()||this.ui.isStandalone()||this.publishWeb3RequestEvent(e,t)}})),cancel:n}}watchAsset(t,e,n,r,i,s){const o={method:_.Web3Method.watchAsset,params:{type:t,options:{address:e,symbol:n,decimals:r,image:i},chainId:s}};let c=null;const a=(0,b.randomBytesHex)(8),u=t=>{this.publishWeb3RequestCanceledEvent(a),this.handleErrorResponse(a,o.method,t),null===c||void 0===c||c()};this.ui.inlineWatchAsset()||(c=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:u,onResetConnection:this.resetAndReload}));return{cancel:u,promise:new Promise(((u,l)=>{this.relayEventManager.callbacks.set(a,(t=>{if(null===c||void 0===c||c(),t.errorMessage)return l(new Error(t.errorMessage));u(t)}));const h=t=>{this.handleWeb3ResponseMessage((0,x.Web3ResponseMessage)({id:a,response:(0,E.WatchAssetReponse)(!1)}))},d=()=>{this.handleWeb3ResponseMessage((0,x.Web3ResponseMessage)({id:a,response:(0,E.WatchAssetReponse)(!0)}))};this.ui.inlineWatchAsset()&&this.ui.watchAsset({onApprove:d,onCancel:h,type:t,address:e,symbol:n,decimals:r,image:i,chainId:s}),this.ui.inlineWatchAsset()||this.ui.isStandalone()||this.publishWeb3RequestEvent(a,o)}))}}addEthereumChain(t,e,n,r,i,s){const o={method:_.Web3Method.addEthereumChain,params:{chainId:t,rpcUrls:e,blockExplorerUrls:r,chainName:i,iconUrls:n,nativeCurrency:s}};let c=null;const a=(0,b.randomBytesHex)(8),u=t=>{this.publishWeb3RequestCanceledEvent(a),this.handleErrorResponse(a,o.method,t),null===c||void 0===c||c()};this.ui.inlineAddEthereumChain(t)||(c=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:u,onResetConnection:this.resetAndReload}));return{promise:new Promise(((e,n)=>{this.relayEventManager.callbacks.set(a,(t=>{if(null===c||void 0===c||c(),t.errorMessage)return n(new Error(t.errorMessage));e(t)}));const r=t=>{this.handleWeb3ResponseMessage((0,x.Web3ResponseMessage)({id:a,response:(0,E.AddEthereumChainResponse)({isApproved:!1,rpcUrl:""})}))},i=t=>{this.handleWeb3ResponseMessage((0,x.Web3ResponseMessage)({id:a,response:(0,E.AddEthereumChainResponse)({isApproved:!0,rpcUrl:t})}))};this.ui.inlineAddEthereumChain(t)&&this.ui.addEthereumChain({onCancel:r,onApprove:i,chainId:o.params.chainId,rpcUrls:o.params.rpcUrls,blockExplorerUrls:o.params.blockExplorerUrls,chainName:o.params.chainName,iconUrls:o.params.iconUrls,nativeCurrency:o.params.nativeCurrency}),this.ui.inlineAddEthereumChain(t)||this.ui.isStandalone()||this.publishWeb3RequestEvent(a,o)})),cancel:u}}switchEthereumChain(t){const e={method:_.Web3Method.switchEthereumChain,params:{chainId:t}};let n=null;const r=(0,b.randomBytesHex)(8),i=t=>{this.publishWeb3RequestCanceledEvent(r),this.handleErrorResponse(r,e.method,t),null===n||void 0===n||n()};this.ui.inlineSwitchEthereumChain()||(n=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:i,onResetConnection:this.resetAndReload}));return{promise:new Promise(((t,i)=>{this.relayEventManager.callbacks.set(r,(e=>(null===n||void 0===n||n(),e.errorMessage&&e.errorCode?i(u.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=>{if("number"===typeof t){const e=t;this.handleWeb3ResponseMessage((0,x.Web3ResponseMessage)({id:r,response:(0,E.ErrorResponse)(_.Web3Method.switchEthereumChain,p.WalletUIError.SwitchEthereumChainUnsupportedChainId.message,e)}))}else t instanceof p.WalletUIError?this.handleErrorResponse(r,_.Web3Method.switchEthereumChain,t,t.errorCode):this.handleWeb3ResponseMessage((0,x.Web3ResponseMessage)({id:r,response:(0,E.SwitchEthereumChainResponse)({isApproved:!1,rpcUrl:""})}))},onApprove:t=>{this.handleWeb3ResponseMessage((0,x.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}}inlineAddEthereumChain(t){return this.ui.inlineAddEthereumChain(t)}getSessionIdHash(){return g.Session.hash(this._session.id)}sendRequestStandalone(t,e){const n=n=>{this.handleErrorResponse(t,e.method,n)},r=e=>{this.handleWeb3ResponseMessage((0,x.Web3ResponseMessage)({id:t,response:e}))};switch(e.method){case _.Web3Method.signEthereumMessage:this.ui.signEthereumMessage({request:e,onSuccess:r,onCancel:n});break;case _.Web3Method.signEthereumTransaction:this.ui.signEthereumTransaction({request:e,onSuccess:r,onCancel:n});break;case _.Web3Method.submitEthereumTransaction:this.ui.submitEthereumTransaction({request:e,onSuccess:r,onCancel:n});break;case _.Web3Method.ethereumAddressFromSignedMessage:this.ui.ethereumAddressFromSignedMessage({request:e,onSuccess:r});break;default:n()}}onSessionConfigChanged(t){}}S.accountRequestCallbackIds=new Set,s([a.default],S.prototype,"resetAndReload",null),s([a.default],S.prototype,"handleIncomingEvent",null),e.WalletSDKRelay=S},1899:function(t,e,n){"use strict";var r;function i(t,e,n){if(!n||typeof n.value!==r.typeOfFunction)throw new TypeError("Only methods can be decorated with @bind. <"+e+"> is not a method!");return{configurable:r.boolTrue,get:function(){var t=n.value.bind(this);return Object.defineProperty(this,e,{value:t,configurable:r.boolTrue,writable:r.boolTrue}),t}}}Object.defineProperty(e,"__esModule",{value:!0}),function(t){t.typeOfFunction="function",t.boolTrue=!0}(r||(r={})),e.bind=i,e.default=i},1900:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WalletSDKConnection=void 0;const r=n(1757),i=n(1781),s=n(1790),o=n(1807),c=n(1901),a=n(1789),u=n(1902),l=n(1903);e.WalletSDKConnection=class{constructor(t,e,n,c){let l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:WebSocket;this.sessionId=t,this.sessionKey=e,this.eventListener=c,this.subscriptions=new r.Subscription,this.destroyed=!1,this.lastHeartbeatResponse=0,this.nextReqId=(0,o.IntNumber)(1),this.connectedSubject=new r.BehaviorSubject(!1),this.linkedSubject=new r.BehaviorSubject(!1),this.sessionConfigSubject=new r.ReplaySubject(1);const h=new u.RxWebSocket(n+"/rpc",l);this.ws=h,this.subscriptions.add(h.connectionState$.pipe((0,i.tap)((e=>{var n;return null===(n=this.eventListener)||void 0===n?void 0:n.onEvent(a.EVENTS.CONNECTED_STATE_CHANGE,{state:e,sessionIdHash:s.Session.hash(t)})})),(0,i.skip)(1),(0,i.filter)((t=>t===u.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===u.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===u.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=>{var n;const r=e;null===(n=this.eventListener)||void 0===n||n.onEvent(a.EVENTS.LINKED,{sessionIdHash:s.Session.hash(t),linked:r.linked,type:e.type,onlineGuests:r.onlineGuests}),this.linkedSubject.next(r.linked||r.onlineGuests>0)}))),this.subscriptions.add(h.incomingJSONData$.pipe((0,i.filter)((t=>["GetSessionConfigOK","SessionConfigUpdated"].includes(t.type)))).subscribe((e=>{var n;const r=e;null===(n=this.eventListener)||void 0===n||n.onEvent(a.EVENTS.SESSION_CONFIG_RECEIVED,{sessionIdHash:s.Session.hash(t),metadata_keys:r&&r.metadata?Object.keys(r.metadata):void 0}),this.sessionConfigSubject.next({webhookId:r.webhookId,webhookUrl:r.webhookUrl,metadata:r.metadata})})))}connect(){var t;if(this.destroyed)throw new Error("instance is destroyed");null===(t=this.eventListener)||void 0===t||t.onEvent(a.EVENTS.STARTED_CONNECTING,{sessionIdHash:s.Session.hash(this.sessionId)}),this.ws.connect().subscribe()}destroy(){var t;this.subscriptions.unsubscribe(),this.ws.disconnect(),null===(t=this.eventListener)||void 0===t||t.onEvent(a.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,c.ClientMessageSetSessionConfig)({id:(0,o.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){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=(0,c.ClientMessagePublishEvent)({id:(0,o.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){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6e4;const n=t.id;try{this.sendData(t)}catch(s){return(0,r.throwError)(s)}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,c.ClientMessageHostSession)({id:(0,o.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,c.ClientMessageIsLinked)({id:(0,o.IntNumber)(this.nextReqId++),sessionId:this.sessionId});this.sendData(t)}sendGetSessionConfig(){const t=(0,c.ClientMessageGetSessionConfig)({id:(0,o.IntNumber)(this.nextReqId++),sessionId:this.sessionId});this.sendData(t)}}},1901:function(t,e,n){"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)}},1902:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RxWebSocket=e.ConnectionState=void 0;const r=n(1757),i=n(1781);var s;!function(t){t[t.DISCONNECTED=0]="DISCONNECTED",t[t.CONNECTING=1]="CONNECTING",t[t.CONNECTED=2]="CONNECTED"}(s=e.ConnectionState||(e.ConnectionState={}));e.RxWebSocket=class{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:WebSocket;this.WebSocketClass=e,this.webSocket=null,this.connectionStateSubject=new r.BehaviorSubject(s.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(n){return void t.error(n)}this.connectionStateSubject.next(s.CONNECTING),e.onclose=e=>{this.clearWebSocket(),t.error(new Error(`websocket error ${e.code}: ${e.reason}`)),this.connectionStateSubject.next(s.DISCONNECTED)},e.onopen=e=>{t.next(),t.complete(),this.connectionStateSubject.next(s.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(s.DISCONNECTED);try{t.close()}catch(e){}}}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(n){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)}}},1903:function(t,e,n){"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}},1904:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WalletUIError=void 0;class r extends Error{constructor(t,e){super(t),this.message=t,this.errorCode=e}}e.WalletUIError=r,r.UserRejectedRequest=new r("User rejected request"),r.SwitchEthereumChainUnsupportedChainId=new r("Unsupported chainId",4902)},1905:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decrypt=e.encrypt=void 0;const r=n(1757),i=n(1745);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"]),s=new TextEncoder,o=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:n},r,s.encode(t)),c=o.slice(o.byteLength-16),a=o.slice(0,o.byteLength-16),u=new Uint8Array(c),l=new Uint8Array(a),h=new Uint8Array([...n,...u,...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"]),s=(0,i.hexStringToUint8Array)(t),o=s.slice(0,12),c=s.slice(12,28),a=s.slice(28),u=new Uint8Array([...a,...c]),l={name:"AES-GCM",iv:new Uint8Array(o)};try{const t=await window.crypto.subtle.decrypt(l,r,u),e=new TextDecoder;n.next(e.decode(t)),n.complete()}catch(h){n.error(h)}}()}))}},1906:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Web3RequestCanceledMessage=void 0;const r=n(1813);e.Web3RequestCanceledMessage=function(t){return{type:r.RelayMessageType.WEB3_REQUEST_CANCELED,id:t}}},1907:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Web3RequestMessage=void 0;const r=n(1813);e.Web3RequestMessage=function(t){return Object.assign({type:r.RelayMessageType.WEB3_REQUEST},t)}},1908:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EthereumAddressFromSignedMessageResponse=e.SubmitEthereumTransactionResponse=e.SignEthereumTransactionResponse=e.SignEthereumMessageResponse=e.isRequestEthereumAccountsResponse=e.WatchAssetReponse=e.RequestEthereumAccountsResponse=e.SwitchEthereumChainResponse=e.AddEthereumChainResponse=e.ErrorResponse=void 0;const r=n(1836);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.WatchAssetReponse=function(t){return{method:r.Web3Method.watchAsset,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}}},1909:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isWeb3ResponseMessage=e.Web3ResponseMessage=void 0;const r=n(1813);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}},1910:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WalletSDKRelayEventManager=void 0;const r=n(1745);e.WalletSDKRelayEventManager=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}}},1911:function(t){t.exports=JSON.parse('{"name":"@coinbase/wallet-sdk","version":"3.1.0","description":"Coinbase Wallet JavaScript SDK","keywords":["cipher","cipherbrowser","coinbase","coinbasewallet","eth","ether","ethereum","etherium","injection","toshi","wallet","walletlink","web3"],"main":"dist/index.js","types":"dist/index.d.ts","repository":"https://github.com/coinbase/coinbase-wallet-sdk.git","author":"Coinbase, Inc.","license":"Apache-2.0","scripts":{"pretest:unit":"node compile-assets.js","test:unit":"jest","test:unit:coverage":"yarn test:unit && open coverage/lcov-report/index.html","test:karma":"yarn build-npm && karma start","prebuild":"node -p \\"\'export const LIB_VERSION = \' + JSON.stringify(require(\'./package.json\').version) + \';\'\\" > src/version.ts","build":"node compile-assets.js && webpack --config webpack.config.js","build-npm":"tsc -p ./tsconfig.build.json","build:dev":"export LINK_API_URL=\'http://localhost:3000\'; yarn build","build:dev:watch":"nodemon -e \'ts,tsx,js,json,css,scss,svg\' --ignore \'src/**/*-css.ts\' --ignore \'src/**/*-svg.ts\' --watch src/ --exec \'yarn build:dev\'","build:prod":"yarn prebuild && yarn build && yarn build-npm && cp ./package.json ./README.md ./LICENSE build/npm && cp -a src/vendor-js build/npm/dist && sed -i.bak \'s| \\"private\\": true,||g\' build/npm/package.json && rm -f build/npm/package.json.bak","lint:types":"tsc --noEmit","lint:prettier":"prettier --check \\"{src,__tests__}/**/*.(js|ts|tsx)\\"","lint:eslint":"eslint ./src --ext .ts,.tsx","fix:eslint":"yarn lint:eslint --fix","fix:prettier":"prettier . --write","release":"./scripts/release.sh"},"dependencies":{"@metamask/safe-event-emitter":"2.0.0","bind-decorator":"^1.0.11","bn.js":"^5.1.1","clsx":"^1.1.0","eth-block-tracker":"4.4.3","eth-json-rpc-filters":"4.2.2","eth-rpc-errors":"4.0.2","js-sha256":"0.9.0","json-rpc-engine":"6.1.0","keccak":"^3.0.1","preact":"^10.5.9","qs":"^6.10.3","rxjs":"^6.6.3","stream-browserify":"^3.0.0"},"devDependencies":{"@babel/core":"^7.17.9","@babel/plugin-proposal-decorators":"^7.17.9","@babel/plugin-transform-react-jsx":"^7.17.3","@babel/preset-env":"^7.16.11","@babel/preset-typescript":"^7.16.7","@peculiar/webcrypto":"^1.3.3","@testing-library/jest-dom":"^5.16.4","@testing-library/preact":"^2.0.1","@types/bn.js":"^4.11.6","@types/jest":"^27.4.1","@types/node":"^14.14.20","@types/qs":"^6.9.7","@typescript-eslint/eslint-plugin":"^5.7.0","@typescript-eslint/eslint-plugin-tslint":"^5.7.0","@typescript-eslint/parser":"^5.7.0","babel-jest":"^27.5.1","browserify":"17.0.0","copy-webpack-plugin":"^6.4.1","core-js":"^3.8.2","eslint":"^8.4.1","eslint-config-prettier":"^8.3.0","eslint-plugin-import":"^2.25.3","eslint-plugin-preact":"^0.1.0","eslint-plugin-prettier":"^4.0.0","eslint-plugin-simple-import-sort":"^7.0.0","jasmine":"3.8.0","jest":"^27.5.1","jest-chrome":"^0.7.2","karma":"^6.3.15","karma-browserify":"8.1.0","karma-chrome-launcher":"^3.1.0","karma-jasmine":"^4.0.1","nodemon":"^2.0.6","prettier":"^2.5.1","raw-loader":"^4.0.2","regenerator-runtime":"^0.13.7","sass":"^1.50.0","svgo":"^2.8.0","ts-jest":"^27.1.4","ts-loader":"^8.0.13","ts-node":"^10.7.0","tslib":"^2.0.3","typescript":"^4.1.3","watchify":"4.0.0","webpack":"^5.72.0","webpack-cli":"^4.9.2","whatwg-fetch":"^3.5.0"},"engines":{"node":">= 10.0.0"},"_resolved":"https://registry.npmjs.org/@coinbase/wallet-sdk/-/wallet-sdk-3.1.0.tgz","_integrity":"sha512-8IGfVklv/CMfCT4qd9KfL0IwlINsIgSlW1oQB/or8uSY9wAqoY8lIoQVpOyFx7YDK094Xfd9alhulZtRZNJBjw==","_from":"@coinbase/wallet-sdk@3.1.0"}')},1937:function(t,e,n){"use strict";n.r(e),n.d(e,"Mutex",(function(){return o})),n.d(e,"Semaphore",(function(){return s})),n.d(e,"withTimeout",(function(){return c}));function r(t,e,n,r){return new(n||(n=Promise))((function(i,s){function o(t){try{a(r.next(t))}catch(e){s(e)}}function c(t){try{a(r.throw(t))}catch(e){s(e)}}function a(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,c)}a((r=r.apply(t,e||[])).next())}))}function i(t,e){var n,r,i,s,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:c(0),throw:c(1),return:c(2)},"function"===typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function c(c){return function(a){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,c[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&c[0]?r.return:c[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,c[1])).done)return i;switch(r=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,r=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===c[0]||2===c[0])){o=0;continue}if(3===c[0]&&(!i||c[1]>i[0]&&c[1]<i[3])){o.label=c[1];break}if(6===c[0]&&o.label<i[1]){o.label=i[1],i=c;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(c);break}i[2]&&o.ops.pop(),o.trys.pop();continue}c=e.call(t,o)}catch(a){c=[6,a],r=0}finally{n=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,a])}}}Object.create;Object.create;var s=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(this,void 0,void 0,(function(){var e,n,r;return i(this,(function(i){switch(i.label){case 0:return[4,this.acquire()];case 1:e=i.sent(),n=e[0],r=e[1],i.label=2;case 2:return i.trys.push([2,,4,5]),[4,t(n)];case 3:return[2,i.sent()];case 4:return r(),[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}(),o=function(){function t(){this._semaphore=new s(1)}return t.prototype.acquire=function(){return r(this,void 0,void 0,(function(){var t;return i(this,(function(e){switch(e.label){case 0:return[4,this._semaphore.acquire()];case 1:return t=e.sent(),[2,t[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}();function c(t,e,n){var s=this;return void 0===n&&(n=new Error("timeout")),{acquire:function(){return new Promise((function(o,c){return r(s,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=!1,setTimeout((function(){r=!0,c(n)}),e),[4,t.acquire()];case 1:return s=i.sent(),r?(Array.isArray(s)?s[1]:s)():o(s),[2]}}))}))}))},runExclusive:function(t){return r(this,void 0,void 0,(function(){var e,n;return i(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()}}}}}]);
|
|
3
|
+
//# sourceMappingURL=3.7eb2ed93.chunk.js.map
|